Items: their definitions, types, flags and effects. More...
Go to the source code of this file.
Data Structures | |
| struct | ItemEffect |
| One effect of an item while equipped: its kind (enum ItemEffectKind) and amount. More... | |
| struct | ItemDefinition |
| An item's definition: its price, type, who can equip it, its bonuses and unleash, its effects and the action it is used for. More... | |
Macros | |
| #define | ITEM_USE_CONSUMED 1 |
| What using an item costs (struct ItemDefinition's useType). | |
| #define | ITEM_USE_MAY_BREAK 2 |
| breaks one time in eight | |
| #define | ITEM_USE_TEACHES 3 |
| Not used up: equipped, it teaches its actionId as Psynergy. | |
| #define | ITEM_USE_EMPTIES 4 |
| Hermes' Water leaves an Empty Bottle. | |
Items: their definitions, types, flags and effects.
Definition in file item.h.
| #define ITEM_USE_CONSUMED 1 |
What using an item costs (struct ItemDefinition's useType).
one is used up
| #define ITEM_USE_TEACHES 3 |
Not used up: equipped, it teaches its actionId as Psynergy.
Definition at line 38 of file item.h.
Referenced by Unit_RefreshPsynergy().
| #define ITEM_USE_EMPTIES 4 |
| enum InventoryEncoding |
| enum ItemFlags |
| enum ItemType |
An item's type (struct ItemDefinition's type, items.tsv's type column).
A unit equips one item of each type, except Psynergy items.
| enum ItemEffectKind |
| Enumerator | |
|---|---|
| ITEM_EFFECT_NONE | |
| ITEM_EFFECT_ADD_HP | |
| ITEM_EFFECT_ADD_HP_REGEN | |
| ITEM_EFFECT_ADD_PP | |
| ITEM_EFFECT_ADD_PP_REGEN | |
| ITEM_EFFECT_ADD_AGILITY | |
| ITEM_EFFECT_ADD_LUCK | |
| ITEM_EFFECT_SCALE_HP | |
| ITEM_EFFECT_SCALE_HP_REGEN | |
| ITEM_EFFECT_SCALE_PP | |
| ITEM_EFFECT_SCALE_PP_REGEN | |
| ITEM_EFFECT_SCALE_ATTACK | |
| ITEM_EFFECT_SCALE_DEFENSE | |
| ITEM_EFFECT_SCALE_AGILITY | |
| ITEM_EFFECT_SCALE_LUCK | |
| ITEM_EFFECT_ADD_VENUS_POWER | Element power and resistance, in the element order Venus, Mercury, Mars, Jupiter. |
| ITEM_EFFECT_ADD_MERCURY_POWER | |
| ITEM_EFFECT_ADD_MARS_POWER | |
| ITEM_EFFECT_ADD_JUPITER_POWER | |
| ITEM_EFFECT_ADD_VENUS_RESIST | |
| ITEM_EFFECT_ADD_MERCURY_RESIST | |
| ITEM_EFFECT_ADD_MARS_RESIST | |
| ITEM_EFFECT_ADD_JUPITER_RESIST | |
| ITEM_EFFECT_ADD_UNLEASH_CHANCE | percent added to the weapon's unleash |
| ITEM_EFFECT_24 | summed by UnitCalc; TBS never reads it |
| ITEM_EFFECT_25 | sets restraint bit 3, which lifts bit 0 |
| ITEM_EFFECT_ADD_TURNS | more actions each round |
| ITEM_EFFECT_LURE | sets FLAG_LURE_CAP while worn: encounters come faster |
| STATIC_ASSERT | ( | sizeof(struct ItemEffect) | = =0x04 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemEffect, kind) | = =0x00 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemEffect, amount) | = =0x01 | ) |
| STATIC_ASSERT | ( | sizeof(struct ItemDefinition) | = =0x2c | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, price) | = =0x00 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, type) | = =0x02 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, flags) | = =0x03 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, equipMask) | = =0x04 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, icon) | = =0x06 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, primaryBonus) | = =0x08 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, secondaryBonus) | = =0x0a | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, unleashChance) | = =0x0b | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, useType) | = =0x0c | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, unleashAction) | = =0x0e | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, element) | = =0x14 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, effects) | = =0x18 | ) |
| STATIC_ASSERT | ( | offsetof(struct ItemDefinition, actionId) | = =0x28 | ) |
| struct ItemDefinition * Item_Get | ( | s32 | item | ) |
Referenced by Clear_PackPasswordData(), GomaCaveEntrance_GiveShamansRod(), and Item_Get().