Skip to Content
The Alchemy Project

struct ITEM_DEFINITION

An item's definition: its price, type, who can equip it, its bonuses and unleash, its effects and the action it is used for.

Declared in item.h.

Fields

NameDescription
Uint16pricecoins
Uint8typeITEM_TYPE; 0 for an item that is not equipment
Uint8flagsITEM_FLAGS
Uint16equipMaskwho can equip it, an EQUIP_CHARACTER bit each
Uint16iconindexes ItemIcons
Sint16attackAttack added while equipped
Sint8defenseDefense added while equipped
Uint8unleashChancein steps of 5 percent
Uint8useTypewhat using it costs (an ITEM_USE_ value)
Uint16unleashAbilitythe action a weapon unleashes, or 0
Uint8padding [4]0 in every row
longelementa weapon's attack element; ELEMENT_NONE for none
EQUIP_EFFECTeffects [EQUIP_EFFECT_SLOTS]what it does while equipped
Uint16abilityIdthe ability used, or taught as Psynergy

Description

An item's definition: its price, type, who can equip it, its bonuses and unleash, its effects and the action it is used for.

struct ITEM_DEFINITION

Referenced by btActionRunBuild(), btAIChooseAction(), btStagingRunItem(), dbShopTestDamageAndAfflictParty(), gmEquipmentGetUnleashRateBonus(), gmEquipmentRollUnleash(), gmFlagRefreshLureCap(), gmInventoryAddItem(), gmInventoryCheckDiscard(), gmInventoryCheckUnequip(), gmInventoryEquip(), gmInventoryFindEquipped(), gmInventoryGetEquippedDefinition(), gmInventoryGetEquippedItem(), gmInventorySnapshotSave(), gmItemCanUnitEquip(), gmItemGetDefinition(), gmUnitGetAttackElement(), gmUnitRebuildPsynergyList(), ItemDefinitionTable, mnIconDrawItem(), mnItemCheckBattleUse(), mnItemClassifyUseMode(), mnItemIconCompose(), mnItemMenuBuildCommands(), mnItemMenuDrawEquipPreview(), mnItemMenuDrawItemDetailsWithCount(), mnItemMenuRunCommands(), mnItemMenuSort(), mnItemUse(), mnShopBuyDone(), mnShopConfirmEquip(), mnShopDrawEquipComparison(), mnShopDrawStock(), mnShopRepairItem(), mnShopSelectBuy(), mnShopSelectBuyCount(), mnShopSelectSellCount(), mnShopSellItem(), mnStatusPanelDraw(), mnStatusScreenShowEquipmentRow() and scNaribweRoomsReadFortune().

Definition at line 184 of file item.h.

Fields in detail

price

Uint16 price

coins

type

Uint8 type

ITEM_TYPE; 0 for an item that is not equipment

flags

Uint8 flags

ITEM_FLAGS

equipMask

Uint16 equipMask

who can equip it, an EQUIP_CHARACTER bit each

icon

Uint16 icon

indexes ItemIcons

attack

Sint16 attack

Attack added while equipped

defense

Sint8 defense

Defense added while equipped

unleashChance

Uint8 unleashChance

in steps of 5 percent

useType

Uint8 useType

what using it costs (an ITEM_USE_ value)

unleashAbility

Uint16 unleashAbility

the action a weapon unleashes, or 0

padding

Uint8 padding[4]

0 in every row

element

long element

a weapon's attack element; ELEMENT_NONE for none

effects

EQUIP_EFFECT effects[EQUIP_EFFECT_SLOTS]

what it does while equipped

abilityId

Uint16 abilityId

the ability used, or taught as Psynergy