Skip to Content
The Alchemy Project

struct STAT_STATE

The running totals gmUnitCalculate builds a unit's stats in.

Declared in game_internal.h.

Fields

NameDescription
Sint32hpMaximum HP.
Sint32ppMaximum PP.
Sint32attackAttack, 0 to UNIT_STAT_MAX once clamped.
Sint32defenseDefense, 0 to UNIT_STAT_MAX once clamped.
Sint32agilityAgility, 0 to UNIT_STAT_MAX once clamped.
Sint32unusedNever written; a gap between Agility and Luck.
Sint32luckLuck, 0 to UNIT_LUCK_MAX once clamped.
Sint32actionCountActions a turn.
Sint32hpRegenHP regained each turn.
Sint32ppRegenPP regained each turn.
struct { Sint32power, resistance, element ; Sint32 resistance; } element[ELEMENT_COUNT]Each element's power and resistance.
Sint32kindThe item effect being applied.
Sint32unusedAfterKind [2]Never written.
Sint32amountThe amount of the item effect being applied.
ITEM_DEFINITION *itemThe equipped item being applied.
Sint32unusedAfterItemNever written.

Description

The running totals gmUnitCalculate builds a unit's stats in.

struct STAT_STATE

Referenced by gmUnitCalculate().

Definition at line 71 of file game_internal.h.

Fields in detail

hp

Sint32 hp

Maximum HP.

pp

Sint32 pp

Maximum PP.

attack

Sint32 attack

Attack, 0 to UNIT_STAT_MAX once clamped.

defense

Sint32 defense

Defense, 0 to UNIT_STAT_MAX once clamped.

agility

Sint32 agility

Agility, 0 to UNIT_STAT_MAX once clamped.

unused

Sint32 unused

Never written; a gap between Agility and Luck.

luck

Sint32 luck

Luck, 0 to UNIT_LUCK_MAX once clamped.

actionCount

Sint32 actionCount

Actions a turn.

hpRegen

Sint32 hpRegen

HP regained each turn.

ppRegen

Sint32 ppRegen

PP regained each turn.

power, resistance, element

struct { Sint32 power; Sint32 resistance; } element[ELEMENT_COUNT]

Each element's power and resistance.

kind

Sint32 kind

The item effect being applied.

unusedAfterKind

Sint32 unusedAfterKind[2]

Never written.

amount

Sint32 amount

The amount of the item effect being applied.

item

ITEM_DEFINITION *item

The equipped item being applied.

unusedAfterItem

Sint32 unusedAfterItem

Never written.