Files
louiscklaw 866bfd3b42 update,
2025-01-31 19:51:47 +08:00

93 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ER and attributes for combat
![](./ER_for_combat.png)
### Entity
A Battle has a Battle Number (the primary key) and Date(BattleDate) attribute.
A Combat has a Damage, Weapon and a Result attribute.
### Relationship: Involved (battle)
A combat must have battle involved.
A battle will contain at least on combat.
### Relationship: Involved (Attacker / Defender)
A combat must have at least 1 characters involved.
A Characters may contain empty combat history
# ER and attributes for characters
![](./ER_for_characters.png)
### Entity
A Characters has a Name(key), Type, Level, ExperiencePoints, MaxHealth, Health, AttackInScore, DefenceScore, StealthScore, ManaScore, MoneyBank MoneyWallet attribute.
### Relationship: OwnedBy
A character must owned by one player
A player may have many characters
### Relationship: OwnItems
An Items must owned by one character
A character may have many Items
If a character is deleted from the game server, the items will be deleted
### Relationship: Involved
A Combat (either attacker/defender) must owned by one character
A character may involved in many combats
If a character is deleted from the game server, the combat will be deleted
# ER and attributes for customers/players
![](./ER_for_customers.png)
## Entity set
A customers has a AccountNumber(key), Name and EMailAddress attribute.
Name is a Multi-valued attribute containing Forename and Surname.
## Relationship Owned By
A Characters must owned by one character
A customers/player may have many character
If a customer/player is deleted from the game server, the characters will be deleted
# ER and attributes for items/inventory
![](./ER_for_items.png)
## Entity set
A Items has a ItemName, ItemType, WeaponType, Quantity, Range, SingleUse, Price, Equipped, BodyPart, Wearable, Worn attribute
A Score is a Multi-valued attribute containing ManaScore, DefendScore and AttackScore.
A ItemKey is an key to indicate the specific item
## Relationship OwnedItems
A Items must owned by one character
A character may have many items
If a character is deleted from the game server, the Items will be deleted
# Overview of ERs
![](./ER_overview.png)