Atrinik Server 4.0
Objects are one ofthe most important things in Atrinik. They represent every item the player can use, monsters, walls, experience, skills, and many more.
Objects are represented by the obj structure.
An object can also have sub_type, which is usually used to give the same sort of object type different functions.
For example, weapons use the sub_type to determine what kind of weapon it is, slash, impact, cleave or pierce.
An object can have different flags to determine various information about the object.
For example, a sleeping monster object will have the flag FLAG_SLEEP set. A confused monster object will have the flag FLAG_CONFUSED set which will make it move in random directions instead of the one it is attempting to move to. FLAG_PARALYZED will make a monster object unable to move until the flag is cleared.
Flags for objects are controlled by few different macros, including:
Different object types can have different usage meanings of object statistics.
For example, a player object will use these to determine the player stats (wisdom, intelligence, strength, etc).
A monster object will use the same thing to determine the stats as well, but in different usage, for example, wisdom will affect how far the monster can sense other enemy creatures.
An ::object structure should never be created directly, but managed through suitable functions located in common/object.c.