include/game/character.h
The definitions of characters, Djinn and enemies, as The Broken Seal's character.h has them; an enemy's lacks the ten bytes The Broken Seal's keeps before its items.
#include "types.h"#include "static_assert.h"#include "battle/battle_unit.h"#include "battle/battle_side.h"
Included by battle_internal.h, battle_effect_internal.h, field_engine_internal.h, menu_internal.h, shop_internal.h, window_internal.h, game.h and inventory.h.
Structures
| Name | Description | |
|---|---|---|
struct | CHARACTER_DEFINITION | A character's definition: the growth curves of its stats, its element bonus, starting level and starting equipment. |
struct | CLASS_ABILITY | An ability a class teaches, and the level it is learned at; The Broken Seal's holds the ability in one byte. |
struct | CLASS_DEFINITION | A class: its series, the element levels it needs, its stat multipliers and the abilities it teaches. |
struct | DJINN_DEFINITION | A Djinni: its ability and the stat bonuses it gives while set. |
struct | ENEMY_DEFINITION | An enemy's definition: its level and stats, items, element preset, the actions it chooses from and its rewards. |
struct | ENEMY_ELEMENT_PRESET | An enemy's element preset in EnemyElementPresetTable: the element it attacks with, its level in each element, and its base power and resistance in each. |
struct | LEVEL_UP_RESULT | A level up's result: the level reached and the gain in each stat. |
Macros
| Name | Description | |
|---|---|---|
#define | GROWTH_BAND_LEVELS 20 | Levels between two points of a growth curve. |
#define | GROWTH_POINTS 6 | Points on a growth curve: levels 0 to 100, GROWTH_BAND_LEVELS apart. |
#define | UNIT_LEVEL_MAX 99 | The caps on a unit's level and stats (gmUnitCalculate). |
#define | UNIT_ENEMY_HP_MAX 16383 | maximum HP, an enemy's |
#define | UNIT_ENEMY_PP_MAX 9999 | maximum PP, an enemy's |
#define | UNIT_CHARACTER_HP_MAX 1999 | maximum HP and PP, a character's |
#define | UNIT_STAT_MAX 999 | Attack, Defense and Agility |
#define | UNIT_LUCK_MAX 99 | |
#define | UNIT_ELEMENT_MAX 200 | elemental power and resistance |
#define | UNIT_HP_REGEN_MAX 10000 | |
#define | UNIT_PP_REGEN_MAX 200 | |
#define | CLASS_ABILITY_SLOTS 16 | How many actions a class can teach (CLASS_DEFINITION.abilities). |
#define | CLASS_COUNT 244 | How many classes ClassDefinitionTable holds. |
#define | ITEM_ACTION (place) (1 << (place)) | ENEMY_DEFINITION.itemActions' bit for the place in its abilities. |
#define | ENEMY_ELEMENT_PRESET_COUNT 48 | How many element presets EnemyElementPresetTable holds; an enemy naming one past the last reads the first. |
Enumerations
| Name | Description | |
|---|---|---|
enum | CLASS_SERIES { CLASS_SERIES_SQUIRE, CLASS_SERIES_GUARD, CLASS_SERIES_SWORDS … } | CLASS_DEFINITION.series, each named by its first class. |
enum | ENEMY_TARGET_STRATEGY { TARGET_STRATEGY_MOST_HP, TARGET_STRATEGY_MOST_MAX_HP, TARGET … } | ENEMY_DEFINITION.targetStrategy: a single-target attacker favours the target with the most HP left, the most maximum HP, or no one. |
enum | ENEMY_ACTION_STRATEGY { ACTION_STRATEGY_EVEN, ACTION_STRATEGY_FALLING, ACTION_STRATE … } | ENEMY_DEFINITION.actionStrategy: how btAIChooseAction picks a place in the enemy's eight actions. |
enum | ENEMY_ELEMENT_PRESET_ID { ELEMENT_PRESET_DEFAULT, ELEMENT_PRESET_BANDIT, ELEMENT_PRESE … } | The rows of EnemyElementPresetTable (ENEMY_DEFINITION.elementPreset), each named by the first enemy that has it, as The Broken Seal names its own. |
Variables
| Name | Description | |
|---|---|---|
extern const CLASS_DEFINITION | ClassDefinitionTable [] | The 244 classes, by class id. |
STATIC_ASSERT( | offsetof (DJINN_RECOVERY_TABLE, list.count) |
Description
The definitions of characters, Djinn and enemies, as The Broken Seal's
character.h has them; an enemy's lacks the ten bytes The Broken Seal's keeps
before its items.
Macros in detail
GROWTH_BAND_LEVELS
#define GROWTH_BAND_LEVELS 20
Levels between two points of a growth curve.
Referenced by gmUnitLevelUp().
Definition at line 14 of file character.h.
GROWTH_POINTS
#define GROWTH_POINTS 6
Points on a growth curve: levels 0 to 100, GROWTH_BAND_LEVELS apart.
Referenced by gmUnitLevelUp().
Definition at line 16 of file character.h.
UNIT_LEVEL_MAX
#define UNIT_LEVEL_MAX 99
The caps on a unit's level and stats (gmUnitCalculate).
Referenced by btFormationSelectLevelMatchedCandidate(), gmUnitGetExperienceForLevel(), gmUnitLevelUp(), mnBattleStatusScreenRun(), mnStatusScreenShowMemberProgressMessage() and scClearPackPasswordData().
Definition at line 80 of file character.h.
UNIT_ENEMY_HP_MAX
#define UNIT_ENEMY_HP_MAX 16383
maximum HP, an enemy's
Referenced by btEnemyAdjustLevel(), btUnitStrengthen() and gmUnitCalculate().
Definition at line 81 of file character.h.
UNIT_ENEMY_PP_MAX
#define UNIT_ENEMY_PP_MAX 9999
maximum PP, an enemy's
Referenced by btEnemyAdjustLevel() and gmUnitCalculate().
Definition at line 82 of file character.h.
UNIT_CHARACTER_HP_MAX
#define UNIT_CHARACTER_HP_MAX 1999
maximum HP and PP, a character's
Referenced by gmUnitCalculate() and scClearPackPasswordData().
Definition at line 83 of file character.h.
UNIT_STAT_MAX
#define UNIT_STAT_MAX 999
Attack, Defense and Agility
Referenced by btEnemyAdjustLevel(), btUnitStrengthen(), gmUnitCalculate() and scClearPackPasswordData().
Definition at line 84 of file character.h.
UNIT_LUCK_MAX
#define UNIT_LUCK_MAX 99
Referenced by gmUnitCalculate() and scClearPackPasswordData().
Definition at line 85 of file character.h.
UNIT_ELEMENT_MAX
#define UNIT_ELEMENT_MAX 200
elemental power and resistance
Referenced by btEnemyAdjustLevel() and gmUnitCalculate().
Definition at line 86 of file character.h.
UNIT_HP_REGEN_MAX
#define UNIT_HP_REGEN_MAX 10000
Referenced by gmUnitCalculate().
Definition at line 87 of file character.h.
UNIT_PP_REGEN_MAX
#define UNIT_PP_REGEN_MAX 200
Referenced by gmUnitCalculate().
Definition at line 88 of file character.h.
CLASS_ABILITY_SLOTS
#define CLASS_ABILITY_SLOTS 16
How many actions a class can teach (CLASS_DEFINITION.abilities).
Referenced by gmUnitRebuildPsynergyList().
Definition at line 91 of file character.h.
CLASS_COUNT
#define CLASS_COUNT 244
How many classes ClassDefinitionTable holds.
Referenced by gmClassDetermine().
Definition at line 94 of file character.h.
ITEM_ACTION
#define ITEM_ACTION(place) (1 << (place))
ENEMY_DEFINITION.itemActions' bit for the place in its abilities.
Referenced by EnemyDefinitions.
Definition at line 214 of file character.h.
ENEMY_ELEMENT_PRESET_COUNT
#define ENEMY_ELEMENT_PRESET_COUNT 48
How many element presets EnemyElementPresetTable holds; an enemy naming one
past the last reads the first.
Referenced by gmEnemyGetAttackElement(), gmUnitCalculateBaseElements() and gmUnitGetElementLevels().
Definition at line 286 of file character.h.
Enumerations in detail
CLASS_SERIES
enum CLASS_SERIES
CLASS_DEFINITION.series, each named by its first class. The ten The Broken
Seal has are the series a character's elements choose
(ClassSeriesByElements); 11 is in no row, 12 holds class 0, "NPC", an enemy's
(CLASS_NONE), and the five after are The Lost Age's own, which
gmClassDetermine gives for a character or an item.
| Enumerator | Value | Description |
|---|---|---|
CLASS_SERIES_SQUIRE | 1 | |
CLASS_SERIES_GUARD | ||
CLASS_SERIES_SWORDSMAN | ||
CLASS_SERIES_BRUTE | ||
CLASS_SERIES_APPRENTICE | ||
CLASS_SERIES_WATER_SEER | ||
CLASS_SERIES_WIND_SEER | ||
CLASS_SERIES_SEER | ||
CLASS_SERIES_PILGRIM | ||
CLASS_SERIES_HERMIT | ||
CLASS_SERIES_NPC | 12 | Class 0, "NPC", an enemy's (CLASS_NONE). |
CLASS_SERIES_FLAME_USER | Jenna's, where the others are Guards | |
CLASS_SERIES_MARINER | Piers's, where the others are Water Seers | |
CLASS_SERIES_PIERROT | with the Mysterious Card equipped | |
CLASS_SERIES_TAMER | with the Trainer's Whip equipped | |
CLASS_SERIES_DARK_MAGE | with the Tomegathericon equipped |
Definition at line 59 of file character.h.
ENEMY_TARGET_STRATEGY
enum ENEMY_TARGET_STRATEGY
ENEMY_DEFINITION.targetStrategy: a single-target attacker favours the target
with the most HP left, the most maximum HP, or no one. The same column steers
the action choice: with any strategy but TARGET_STRATEGY_MOST_HP an enemy
skips Psynergy it lacks the PP for, and with TARGET_STRATEGY_RANDOM any
Psynergy while sealed.
| Enumerator | Value | Description |
|---|---|---|
TARGET_STRATEGY_MOST_HP | 0 | |
TARGET_STRATEGY_MOST_MAX_HP | 1 | |
TARGET_STRATEGY_RANDOM | 2 |
Definition at line 146 of file character.h.
ENEMY_ACTION_STRATEGY
enum ENEMY_ACTION_STRATEGY
ENEMY_DEFINITION.actionStrategy: how btAIChooseAction picks a place in the
enemy's eight actions. The first three roll against BattleAIActionWeights;
the next two remember the place in the unit's AI state.
| Enumerator | Value | Description |
|---|---|---|
ACTION_STRATEGY_EVEN | 32 in 256 each | |
ACTION_STRATEGY_FALLING | from 53 in 256 down to 11 | |
ACTION_STRATEGY_FIRST_FAVOURED | the first 113 in 256, down to 5 | |
ACTION_STRATEGY_RANDOM_START | random place first, then each in turn on the enemy's turn | |
ACTION_STRATEGY_IN_ORDER | each in turn from the remembered place | |
ACTION_STRATEGY_NEXT_PICK | the next place at each new pick, from 0 | |
ACTION_STRATEGY_SAME | the place last picked |
Definition at line 156 of file character.h.
ENEMY_ELEMENT_PRESET_ID
enum ENEMY_ELEMENT_PRESET_ID
The rows of EnemyElementPresetTable (ENEMY_DEFINITION.elementPreset), each
named by the first enemy that has it, as The Broken Seal names its own. Rows
10, 22, 28 and 35 are spares no enemy has.
| Enumerator | Value | Description |
|---|---|---|
ELEMENT_PRESET_DEFAULT | 0 | The row an out-of-range preset reads as, and every enemy's that names none. |
ELEMENT_PRESET_BANDIT | 1 | |
ELEMENT_PRESET_AZART | 2 | |
ELEMENT_PRESET_CHESTBEATER | 3 | |
ELEMENT_PRESET_GRISLY | 4 | |
ELEMENT_PRESET_PUNCH_ANT | 5 | |
ELEMENT_PRESET_KING_SCORPION | 6 | |
ELEMENT_PRESET_MAD_PLANT | 7 | |
ELEMENT_PRESET_WOOD_WALKER | 8 | |
ELEMENT_PRESET_DRONE_BEE | 9 | |
ELEMENT_PRESET_MOMONGA | 11 | |
ELEMENT_PRESET_PIXIE | 12 | |
ELEMENT_PRESET_MUMMY | 13 | |
ELEMENT_PRESET_SKELETON | 14 | |
ELEMENT_PRESET_GHOST | 15 | |
ELEMENT_PRESET_LIVING_ARMOR | 16 | |
ELEMENT_PRESET_GARGOYLE | 17 | |
ELEMENT_PRESET_SERPENT | 18 | |
ELEMENT_PRESET_AQUA_HYDRA | 19 | |
ELEMENT_PRESET_AVIMANDER | 20 | |
ELEMENT_PRESET_TORNADO_LIZARD | 21 | |
ELEMENT_PRESET_VENUS_DJINNI | 23 | |
ELEMENT_PRESET_CUTTLE | 24 | |
ELEMENT_PRESET_MERCURY_DJINNI | 25 | |
ELEMENT_PRESET_STONE_SOLDIER | 26 | |
ELEMENT_PRESET_MARS_DJINNI | 27 | |
ELEMENT_PRESET_JUPITER_DJINNI | 29 | |
ELEMENT_PRESET_MINI_GOBLIN | 30 | |
ELEMENT_PRESET_ASSASSIN | 31 | |
ELEMENT_PRESET_WOLFKIN_CUB | 32 | |
ELEMENT_PRESET_MERMAN | 33 | |
ELEMENT_PRESET_GNOME | 34 | |
ELEMENT_PRESET_GNOME_MAGE | 36 | |
ELEMENT_PRESET_NIGHTMARE | 37 | |
ELEMENT_PRESET_MIMIC | 38 | |
ELEMENT_PRESET_AGATIO | 39 | |
ELEMENT_PRESET_KARST | 40 | |
ELEMENT_PRESET_FUSION_DRAGON | 41 | |
ELEMENT_PRESET_SENTINEL | 42 | |
ELEMENT_PRESET_GRYPHON | 43 | |
ELEMENT_PRESET_STAR_MAGICIAN | 44 | |
ELEMENT_PRESET_VALUKAR | 45 | |
ELEMENT_PRESET_DULLAHAN | 46 | |
ELEMENT_PRESET_DOOM_DRAGON | 47 |
Definition at line 234 of file character.h.
Variables in detail
offsetof
STATIC_ASSERT(offsetof(DJINN_RECOVERY_TABLE, list.count)
Definition at line 121 of file character.h.