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 [UNIT_NAME_SIZE] | Blank in every row; the name comes from the |
Uint8 | level | messages. |
Uint16 | hp | The base stats copied into the unit. |
Uint16 | pp | |
Uint16 | attack | |
Uint16 | defense | |
Uint16 | agility | |
Uint8 | luck | |
Uint8 | actionCount | Actions a turn. |
Uint8 | hpRegen | HP restored at each turn's end. |
Uint8 | ppRegen | PP restored at each turn's end. |
Uint16 | carriedItems [4] | The items the enemy carries into battle, copied into its unit's inventory to use (itemActions), 0 for none; they are not the spoils, which are spoilsItem below. |
Uint8 | carriedCounts [4] | How many of each of carriedItems it carries. |
Uint8 | elementPreset | Row of EnemyElementPresetTable. |
Sint8 | targetStrategy | Whom a single-target attack favours. |
Sint8 | actionStrategy | How the action is chosen from abilities. |
Uint8 | itemActions | One bit per place in abilities (ITEM_ACTION): use an item held instead. |
Uint16 | abilities [8] | The abilities the enemy chooses from. |
Uint8 | weakEffects [4] | The ability effects the enemy is weak to. |
Uint16 | coins | Coins won. |
Sint16 | spoilsItem | The spoils: the one item it may leave behind when defeated (btEnemyRecordDefeat), 0 for none. |
Sint16 | spoilsChance | The chance of the item, as a power of two: 1 in 2 to the power n - 1 (1 always, 6 one in 32), four times as likely with btEnemyRecordDefeat's djinnBonus; 0 for none. |
Uint16 | experience | Experience won. |
Uint8 | padding [2] |
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() and gmEnemyGetDefinition().
Definition at line 170 of file character.h.
Fields in detail
name
Uint8 name[UNIT_NAME_SIZE]
Blank in every row; the name comes from the
level
Uint8 level
messages.
hp
Uint16 hp
The base stats copied into the unit.
pp
Uint16 pp
attack
Uint16 attack
defense
Uint16 defense
agility
Uint16 agility
luck
Uint8 luck
actionCount
Uint8 actionCount
Actions a turn.
hpRegen
Uint8 hpRegen
HP restored at each turn's end.
ppRegen
Uint8 ppRegen
PP restored at each turn's end.
carriedItems
Uint16 carriedItems[4]
The items the enemy carries into battle, copied into its unit's inventory to use (itemActions), 0 for none; they are not the spoils, which are spoilsItem below.
carriedCounts
Uint8 carriedCounts[4]
How many of each of carriedItems it carries.
elementPreset
Uint8 elementPreset
Row of EnemyElementPresetTable.
targetStrategy
Sint8 targetStrategy
Whom a single-target attack favours.
actionStrategy
Sint8 actionStrategy
How the action is chosen from abilities.
itemActions
Uint8 itemActions
One bit per place in abilities (ITEM_ACTION):
use an item held instead.
abilities
Uint16 abilities[8]
The abilities the enemy chooses from.
weakEffects
Uint8 weakEffects[4]
The ability effects the enemy is weak to.
coins
Uint16 coins
Coins won.
spoilsItem
Sint16 spoilsItem
The spoils: the one item it may leave behind
when defeated (btEnemyRecordDefeat), 0 for none.
spoilsChance
Sint16 spoilsChance
The chance of the item, as a power of two: 1 in
2 to the power n - 1 (1 always, 6 one in 32),
four times as likely with btEnemyRecordDefeat's
djinnBonus; 0 for none.
experience
Uint16 experience
Experience won.
padding
Uint8 padding[2]