Creates a new ItemInformation
, you can pass partial values to this
constructor, such as:
let newItemInformation = new ItemInformation();
Optional
init: Partial<ItemInformation>Partial
Ammo information
Whether or not this item has ammo
A reference to the item that is used as ammo
The amount of ammo that is consumed when the item is used
Basic information that is always get the same way for all systems
The image of the item
Name of the item
Reference to the owner of the item
Responsible for representing which materials can be encountered in the item, this will most likely just contain materials that are relevant to the system, so don't expect a full list of materials, but instead a small amount of materials that are different/special enough to be marked by the system
Physical information used to describe the physical attributes of the item
How many instance of the item are represented by itself.
Special attributes that are used by system rules
Does this item have a finesse capability?
Is this item magical?
Does this item returns to its owner?
Can this item be thrown?
Information about the ranges of the item
The maximun range of this item
The melee range of this item, mostly used when the item can be melee or
ranged, otherwise prefer to use the melee range from SystemInformation
The minimun range of this item
Represents information about the current state of the item
Is the item currently equipped?
This class is a very special one, it represents the information that items can have. It is special because not all systems will have support for all the values, i.e. there is no sense in having the
magical
property relevant inside of a sci-fi system.When using these values, we have to take into account that the value may not exist, and because of that all the values are either booleans or objects that can be represented by null, take that into consideration when using these values. Do things if the value is set/true, skip the functionality if the value is unset/false.