Class ItemInformation

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.

Constructors

Properties

ammo: {
    has: boolean;
    item: any;
    quantity: number;
}

Ammo information

Type declaration

  • has: boolean

    Whether or not this item has ammo

  • item: any

    A reference to the item that is used as ammo

  • quantity: number

    The amount of ammo that is consumed when the item is used

basic: {
    image: string;
    name: string;
    owner: any;
}

Basic information that is always get the same way for all systems

Type declaration

  • image: string

    The image of the item

  • name: string

    Name of the item

  • owner: any

    Reference to the owner of the item

material: {
    adamantine: boolean;
    silver: boolean;
}

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

Type declaration

  • adamantine: boolean
  • silver: boolean
physical: {
    quantity: number;
}

Physical information used to describe the physical attributes of the item

Type declaration

  • quantity: number

    How many instance of the item are represented by itself.

properties: {
    finesse: boolean;
    magical: boolean;
    returns: boolean;
    thrown: boolean;
}

Special attributes that are used by system rules

Type declaration

  • finesse: boolean

    Does this item have a finesse capability?

  • magical: boolean

    Is this item magical?

  • returns: boolean

    Does this item returns to its owner?

  • thrown: boolean

    Can this item be thrown?

range: {
    max: SystemRange;
    melee: SystemRange;
    min: SystemRange;
}

Information about the ranges of the item

Type declaration

  • max: SystemRange

    The maximun range of this item

  • melee: SystemRange

    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

  • min: SystemRange

    The minimun range of this item

state: {
    equipped: boolean;
}

Represents information about the current state of the item

Type declaration

  • equipped: boolean

    Is the item currently equipped?