|
|
As said in a previous discussion, the game's map is divided in two part :
|
|
|
* The physical map : the list of all tiles in the map (floor/walls).
|
|
|
* The Game State : the list of all entities on the physical map.
|
|
|
|
|
|
Here is a description on what are the different subclasses of entities and what are the attribute of each.
|
|
|
|
|
|
The tree is like this :
|
|
|
Entity
|
|
|
- TriggerEntity
|
|
|
- Being
|
|
|
- - Bearer
|
|
|
- - - Character
|
|
|
|
|
|
* Entities
|
|
|
As said, all things in the GameState are entities. An entity possesses :
|
|
|
- an unique ID to identify the entity.
|
|
|
- an owner ID : the ID of the DecisionMaker ruling and deciding for the entity.
|
|
|
- A center position (X,Y) with double value.
|
|
|
- A list of CollisionBox. Each collision box has a CollisionType to precise what kind of collision it is and a zone(the box itself).
|
|
|
- A visibility zone : the entity may only be aware of others entity in this zone.
|
|
|
|
|
|
The entity abstract class has two direct subclass :
|
|
|
|
|
|
* TriggerEntity.
|
|
|
A TriggerEntity is an entity which triggers an event when another entity moves inside its trigger zone. It possesses :
|
|
|
- A triggered event
|
|
|
- A trigger zone
|
|
|
If the event is successfully triggered, the trigger entity can be destroyed.
|
|
|
|
|
|
* Beings
|
|
|
A Being is entity with HP and a list of Hitbox. An hitbox is a triple (Zone,DamageType,Event). An Being is hit by an attack if the attack falls in one of its hitbox and this hitbox is sensible to one of the attack's DamageType. In response, the Being gives an event which is applied to the attack (can be seen as a generalized resistance's multiplier). A being can die. A dead Being can transform in another entity or be destroyed.
|
|
|
|
|
|
A subclass of Being is a Bearer.
|
|
|
|
|
|
* Bearers
|
|
|
A bearer is a being able to store item in an inventory. Being a bearer is not enough to equip/use the stored item.
|
|
|
|
|
|
A subclass of Bearer is a Character.
|
|
|
|
|
|
* Characters
|
|
|
A character is a bearer possessing other statistics than HP. It may be able to move, attack, use or equip an item. It may be able to cast spell or to have passive spell. It has a species and a name (can be the same as the species' name). |