Class: Game_Item

Game_Item()

new Game_Item()

Game_Item The game object class for handling skills, items, weapons. armor. This is required, because the save data should not include the database object itself.
Properties:
Name Type Description
_dataClass String
_itemId Number

Methods

initialize()

isArmor() → {Boolean}

Returns true if the item is an armor.
Returns:
Type
Boolean

isEquipItem() → {Boolean}

Returns true if the item is equippable (weapon or armor).
Returns:
Type
Boolean

isItem() → {Boolean}

Returns true if the item is an item.
Returns:
Type
Boolean

isNull() → {Boolean}

Returns true if the item is 'null'.
Returns:
Type
Boolean

isSkill() → {Boolean}

Returns true the item is a skill.
Returns:
Type
Boolean

isUsableItem() → {Boolean}

Returns true if the item is a usable item, similar to a potion.
Returns:
Type
Boolean

isWeapon() → {Boolean}

Returns true if the item is a weapon.
Returns:
Type
Boolean

itemId() → {Number}

Returns the current itemId.
Returns:
Type
Number

object() → {RPG.BaseItem}

Returns:
Type
RPG.BaseItem

setEquip(isWeapon, itemId)

Parameters:
Name Type Description
isWeapon Boolean
itemId Number

setObject(item)

Sets the current item of the current Game_Item object.
Parameters:
Name Type Description
item RPG.BaseItem