struct ENEMY_DEFINITION
An enemy's definition: its level and stats, items, element preset, the actions it chooses from and its rewards.
Declared in character.h.
Fields
| Name | Description | |
|---|---|---|
Uint8 | name [15] | Blank in every row: gmBattleUnitSet takes the |
Uint8 | level | enemy's name from the messages instead. |
Uint16 | hp | The base stats gmBattleUnitSet copies into the unit. |
Uint16 | pp | |
Uint16 | attack | |
Uint16 | defense | |
Uint16 | agility | |
Uint8 | luck | |
Uint8 | actionCount | Actions a turn (UNIT.baseActionCount). |
Uint8 | hpRegen | HP restored at each turn's end (UNIT.baseHpRegen). |
Uint8 | ppRegen | PP restored at each turn's end (UNIT.basePpRegen). |
Uint8 | reservedBeforeAiState [2] | 0 in every row. |
BATTLE_AI_STATE | aiState | 0 in every row; the unit's first UNIT.aiState. |
Uint8 | reservedAfterAiState [4] | 0 in every row. |
Uint16 | carriedItems [4] | Items the enemy carries into battle, copied into its unit's inventory to use (itemActions), 0 for none. |
Uint8 | carriedCounts [4] | How many of each item it carries. |
Uint8 | elementPreset | Row of EnemyElementPresetTable, 0 to 43. |
Sint8 | targetStrategy | Whom a single-target attack favours: an ENEMY_TARGET_STRATEGY. |
Sint8 | actionStrategy | How the action is chosen from abilities (btAIChooseAction): an ENEMY_ACTION_STRATEGY. |
Uint8 | itemActions | One bit per place in abilities (ITEM_ACTION): the enemy uses an item it carries there instead. |
Uint16 | abilities [8] | The abilities the enemy chooses from. |
Uint8 | weakEffects [4] | [0] to [2]: the ability effects the enemy is weak to (gmBattleAbilityIsWeakToEffect); [3] is 0 in every row. |
Uint16 | coins | Coins won. |
Sint16 | spoilsItem | The spoils: the one item it may leave behind when defeated, 0 for none. |
Sint16 | spoilsChance | The chance of the item: 1 in 2 to the power spoilsChance - 1, two powers better with btEnemyRecordDefeat's Djinn bonus; 0 for none. |
Uint16 | experience | Experience won. |
Description
An enemy's definition: its level and stats, items, element preset, the actions it chooses from and its rewards.
struct ENEMY_DEFINITION
Referenced by btAIChooseAction(), btEnemyRecordDefeat(), btFormationAverageLevel(), EnemyDefinitions, gmBattleUnitSet(), gmEnemyGetAttackElement() and gmEnemyGetDefinition().
Definition at line 164 of file character.h.
Fields in detail
name
Uint8 name[15]
Blank in every row: gmBattleUnitSet takes the
level
Uint8 level
enemy's name from the messages instead.
hp
Uint16 hp
The base stats gmBattleUnitSet copies into the unit.
pp
Uint16 pp
attack
Uint16 attack
defense
Uint16 defense
agility
Uint16 agility
luck
Uint8 luck
actionCount
Uint8 actionCount
Actions a turn
(UNIT.baseActionCount).
hpRegen
Uint8 hpRegen
HP restored at each turn's end
(UNIT.baseHpRegen).
ppRegen
Uint8 ppRegen
PP restored at each turn's end
(UNIT.basePpRegen).
reservedBeforeAiState
Uint8 reservedBeforeAiState[2]
0 in every row.
aiState
BATTLE_AI_STATE aiState
0 in every row; the unit's
first UNIT.aiState.
reservedAfterAiState
Uint8 reservedAfterAiState[4]
0 in every row.
carriedItems
Uint16 carriedItems[4]
Items the enemy carries into battle, copied into its unit's inventory to use (itemActions), 0 for none.
carriedCounts
Uint8 carriedCounts[4]
How many of each item it carries.
elementPreset
Uint8 elementPreset
Row of EnemyElementPresetTable,
0 to 43.
targetStrategy
Sint8 targetStrategy
Whom a single-target attack
favours: an
ENEMY_TARGET_STRATEGY.
actionStrategy
Sint8 actionStrategy
How the action is chosen from
abilities (btAIChooseAction):
an ENEMY_ACTION_STRATEGY.
itemActions
Uint8 itemActions
One bit per place in
abilities (ITEM_ACTION): the
enemy uses an item it carries
there instead.
abilities
Uint16 abilities[8]
The abilities the enemy chooses from.
weakEffects
Uint8 weakEffects[4]
[0] to [2]: the ability effects the enemy
is weak to
(gmBattleAbilityIsWeakToEffect); [3] is 0
in every row.
coins
Uint16 coins
Coins won.
spoilsItem
Sint16 spoilsItem
The spoils: the one item it may leave behind when defeated, 0 for none.
spoilsChance
Sint16 spoilsChance
The chance of the item: 1 in 2 to the
power spoilsChance - 1, two powers better
with btEnemyRecordDefeat's Djinn bonus; 0
for none.
experience
Uint16 experience
Experience won.