Skip to Content
The Alchemy Project

struct ABILITY_DEFINITION

An ability's definition, a row of AbilityDefinitions: its targeting, ability kind, element, effect, range, PP cost and power.

Declared in battle_unit.h.

Fields

NameDescription
Uint8targetModeABILITY_TARGET.
Uint8flagsbits: 7 usable in battle | 6 usable in the field | 5..4 clear in every row | 3..0 ability kind (ABILITY_FORMULA_MASK).
Uint8elementELEMENT.
Uint8effectABILITY_EFFECT.
Uint8iconThe icon the menus draw.
Uint8reservedAfterIcon [3]0 in every row.
Uint8rangeThe aimed unit and range - 1 either side, or ABILITY_RANGE_ALL.
Uint8ppCostPP the ability costs.
Uint16powerThe ability's power, as its ability kind reads it: for damage, about what the aimed target loses when the user's Power in the element equals the target's Resist (a summon adds to it, see ABILITY_FORMULA_SUMMON); for healing, about what the aimed target regains from a healer with 100 Power in the element; for an attack, what it adds to the blow at an even match, and for a multiplied one the blow's multiple in tenths.
Uint8fieldPsynergyThe field Psynergy the ability works as, 1 (Move) to 16 (Avoid); 0 for none.
Uint8reservedAfterType [3]0 in every row.

Description

An ability's definition, a row of AbilityDefinitions: its targeting, ability kind, element, effect, range, PP cost and power.

struct ABILITY_DEFINITION

Referenced by AbilityDefinitions, btAbilityApplyToTarget(), btActionOrderSort(), btActionRunBuild(), btAIChooseAction(), btAIChooseTarget(), gmAbilityGetDefinition(), mnAbilityApplyToTargets(), mnAbilityPlayUseSound(), mnBattleClassifyEntryKind(), mnBattleCollectPartyCommands(), mnBattleDjinnMenuShowChangePreview(), mnBattlePsynergyMenuRun(), mnItemClassifyUseMode(), mnPsynergyMenuClassifySelectedPsynergy(), mnPsynergyMenuCollectActions(), mnPsynergyMenuDrawPage(), mnPsynergyMenuIsActionRestricted(), mnPsynergyMenuRunList(), mnPsynergyMenuRunSteps(), mnStatusScreenDrawPsynergyPage() and mnStatusScreenShowPsynergyRow().

Definition at line 246 of file battle_unit.h.

Fields in detail

targetMode

Uint8 targetMode

ABILITY_TARGET.

flags

Uint8 flags

bits: 7 usable in battle | 6 usable in the field | 5..4 clear in every row | 3..0 ability kind (ABILITY_FORMULA_MASK).

element

Uint8 element

ELEMENT.

effect

Uint8 effect

ABILITY_EFFECT.

icon

Uint8 icon

The icon the menus draw.

reservedAfterIcon

Uint8 reservedAfterIcon[3]

0 in every row.

range

Uint8 range

The aimed unit and range - 1 either side, or ABILITY_RANGE_ALL.

ppCost

Uint8 ppCost

PP the ability costs.

power

Uint16 power

The ability's power, as its ability kind reads it: for damage, about what the aimed target loses when the user's Power in the element equals the target's Resist (a summon adds to it, see ABILITY_FORMULA_SUMMON); for healing, about what the aimed target regains from a healer with 100 Power in the element; for an attack, what it adds to the blow at an even match, and for a multiplied one the blow's multiple in tenths. The battle README's "How an ability resolves" gives the formulas.

fieldPsynergy

Uint8 fieldPsynergy

The field Psynergy the ability works as, 1 (Move) to 16 (Avoid); 0 for none. The field effects branch on it, and the Status screen counts it as usable in the field.

reservedAfterType

Uint8 reservedAfterType[3]

0 in every row.