Alchemy
Loading...
Searching...
No Matches

ItemDefinition Struct Reference

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...

#include <game/item.h>

Data Fields

s16 price
 coins
u8 type
 enum ItemType; 0 for an item that is not equipment
u8 flags
 enum ItemFlags
u16 equipMask
 one bit per character that can equip it, bit 0 Isaac
u16 icon
 indexes gUiIcon_ItemIconPointers
s16 primaryBonus
 Attack added while equipped.
s8 secondaryBonus
 Defense added while equipped.
u8 unleashChance
 in steps of 5 percent
u8 useType
 what using it costs (ITEM_USE_), or 0 for nothing
u8 reserved0d
 not named by TBS code
u16 unleashAction
 the action a weapon unleashes, or 0
u8 reserved10 [4]
 not named by TBS code
s32 element
 a weapon's attack element; 4 for none
struct ItemEffect effects [4]
 what it does while equipped
u16 actionId
 the ability used, or taught as Psynergy
u8 reserved2a [2]
 not named by TBS code

Detailed 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.

Definition at line 104 of file item.h.

Field Documentation

◆ price

s16 ItemDefinition::price

◆ type

◆ flags

◆ equipMask

u16 ItemDefinition::equipMask

one bit per character that can equip it, bit 0 Isaac

Definition at line 108 of file item.h.

Referenced by Item_CanOwnerEquipDirect().

◆ icon

u16 ItemDefinition::icon

indexes gUiIcon_ItemIconPointers

Definition at line 109 of file item.h.

Referenced by ItemIcon_Compose(), Shop_DrawUnitItem(), Ui_BuildPatternToSlot(), Ui_PrepareTransferForItem(), and UiGlyph_LoadEntryWithPalette().

◆ primaryBonus

s16 ItemDefinition::primaryBonus

Attack added while equipped.

Definition at line 110 of file item.h.

Referenced by ItemMenu_DrawItemDetails(), and UnitCalc().

◆ secondaryBonus

s8 ItemDefinition::secondaryBonus

Defense added while equipped.

Definition at line 111 of file item.h.

Referenced by ItemMenu_DrawItemDetails(), and UnitCalc().

◆ unleashChance

u8 ItemDefinition::unleashChance

in steps of 5 percent

Definition at line 112 of file item.h.

Referenced by RollWeaponUnleash().

◆ useType

◆ reserved0d

u8 ItemDefinition::reserved0d

not named by TBS code

Definition at line 114 of file item.h.

◆ unleashAction

u16 ItemDefinition::unleashAction

the action a weapon unleashes, or 0

Definition at line 115 of file item.h.

Referenced by RollWeaponUnleash().

◆ reserved10

u8 ItemDefinition::reserved10[4]

not named by TBS code

Definition at line 117 of file item.h.

◆ element

s32 ItemDefinition::element

a weapon's attack element; 4 for none

Definition at line 118 of file item.h.

Referenced by Item_GetEquippedElement(), and ItemMenu_DrawEquipPage().

◆ effects

struct ItemEffect ItemDefinition::effects[4]

what it does while equipped

Definition at line 119 of file item.h.

Referenced by Equipment_GetUnleashRateBonus(), GameFlag_RefreshLureCap(), ItemMenu_DrawItemDetails(), and UnitCalc().

◆ actionId

u16 ItemDefinition::actionId

◆ reserved2a

u8 ItemDefinition::reserved2a[2]

not named by TBS code

Definition at line 121 of file item.h.