Skip to Content
The Alchemy Project

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.

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

NameDescription
structCHARACTER_DEFINITIONA character's definition: the growth curves of its stats, its element bonus, starting level and starting equipment.
structCLASS_ABILITYAn ability a class teaches, and the level it is learned at; The Broken Seal's holds the ability in one byte.
structCLASS_DEFINITIONA class: its series, the element levels it needs, its stat multipliers and the abilities it teaches.
structDJINN_DEFINITIONA Djinni: its ability and the stat bonuses it gives while set.
structENEMY_DEFINITIONAn enemy's definition: its level and stats, items, element preset, the actions it chooses from and its rewards.
structENEMY_ELEMENT_PRESETAn enemy's element preset in EnemyElementPresetTable: the element it attacks with, its level in each element, and its base power and resistance in each.
structLEVEL_UP_RESULTA level up's result: the level reached and the gain in each stat.

Macros

NameDescription
#defineGROWTH_BAND_LEVELS 20Levels between two points of a growth curve.
#defineGROWTH_POINTS 6Points on a growth curve: levels 0 to 100, GROWTH_BAND_LEVELS apart.
#defineUNIT_LEVEL_MAX 99The caps on a unit's level and stats (gmUnitCalculate).
#defineUNIT_ENEMY_HP_MAX 16383maximum HP, an enemy's
#defineUNIT_ENEMY_PP_MAX 9999maximum PP, an enemy's
#defineUNIT_CHARACTER_HP_MAX 1999maximum HP and PP, a character's
#defineUNIT_STAT_MAX 999Attack, Defense and Agility
#defineUNIT_LUCK_MAX 99
#defineUNIT_ELEMENT_MAX 200elemental power and resistance
#defineUNIT_HP_REGEN_MAX 10000
#defineUNIT_PP_REGEN_MAX 200
#defineCLASS_ABILITY_SLOTS 16How many actions a class can teach (CLASS_DEFINITION.abilities).
#defineCLASS_COUNT 244How many classes ClassDefinitionTable holds.
#defineITEM_ACTION (place) (1 << (place))ENEMY_DEFINITION.itemActions' bit for the place in its abilities.
#defineENEMY_ELEMENT_PRESET_COUNT 48How many element presets EnemyElementPresetTable holds; an enemy naming one past the last reads the first.

Enumerations

NameDescription
enumCLASS_SERIES { CLASS_SERIES_SQUIRE, CLASS_SERIES_GUARD, CLASS_SERIES_SWORDS … }CLASS_DEFINITION.series, each named by its first class.
enumENEMY_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.
enumENEMY_ACTION_STRATEGY { ACTION_STRATEGY_EVEN, ACTION_STRATEGY_FALLING, ACTION_STRATE … }ENEMY_DEFINITION.actionStrategy: how btAIChooseAction picks a place in the enemy's eight actions.
enumENEMY_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

NameDescription
extern const CLASS_DEFINITIONClassDefinitionTable []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.

EnumeratorValueDescription
CLASS_SERIES_SQUIRE1
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_NPC12Class 0, "NPC", an enemy's (CLASS_NONE).
CLASS_SERIES_FLAME_USERJenna's, where the others are Guards
CLASS_SERIES_MARINERPiers's, where the others are Water Seers
CLASS_SERIES_PIERROTwith the Mysterious Card equipped
CLASS_SERIES_TAMERwith the Trainer's Whip equipped
CLASS_SERIES_DARK_MAGEwith 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.

EnumeratorValueDescription
TARGET_STRATEGY_MOST_HP0
TARGET_STRATEGY_MOST_MAX_HP1
TARGET_STRATEGY_RANDOM2

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.

EnumeratorValueDescription
ACTION_STRATEGY_EVEN32 in 256 each
ACTION_STRATEGY_FALLINGfrom 53 in 256 down to 11
ACTION_STRATEGY_FIRST_FAVOUREDthe first 113 in 256, down to 5
ACTION_STRATEGY_RANDOM_STARTrandom place first, then each in turn on the enemy's turn
ACTION_STRATEGY_IN_ORDEReach in turn from the remembered place
ACTION_STRATEGY_NEXT_PICKthe next place at each new pick, from 0
ACTION_STRATEGY_SAMEthe 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.

EnumeratorValueDescription
ELEMENT_PRESET_DEFAULT0The row an out-of-range preset reads as, and every enemy's that names none.
ELEMENT_PRESET_BANDIT1
ELEMENT_PRESET_AZART2
ELEMENT_PRESET_CHESTBEATER3
ELEMENT_PRESET_GRISLY4
ELEMENT_PRESET_PUNCH_ANT5
ELEMENT_PRESET_KING_SCORPION6
ELEMENT_PRESET_MAD_PLANT7
ELEMENT_PRESET_WOOD_WALKER8
ELEMENT_PRESET_DRONE_BEE9
ELEMENT_PRESET_MOMONGA11
ELEMENT_PRESET_PIXIE12
ELEMENT_PRESET_MUMMY13
ELEMENT_PRESET_SKELETON14
ELEMENT_PRESET_GHOST15
ELEMENT_PRESET_LIVING_ARMOR16
ELEMENT_PRESET_GARGOYLE17
ELEMENT_PRESET_SERPENT18
ELEMENT_PRESET_AQUA_HYDRA19
ELEMENT_PRESET_AVIMANDER20
ELEMENT_PRESET_TORNADO_LIZARD21
ELEMENT_PRESET_VENUS_DJINNI23
ELEMENT_PRESET_CUTTLE24
ELEMENT_PRESET_MERCURY_DJINNI25
ELEMENT_PRESET_STONE_SOLDIER26
ELEMENT_PRESET_MARS_DJINNI27
ELEMENT_PRESET_JUPITER_DJINNI29
ELEMENT_PRESET_MINI_GOBLIN30
ELEMENT_PRESET_ASSASSIN31
ELEMENT_PRESET_WOLFKIN_CUB32
ELEMENT_PRESET_MERMAN33
ELEMENT_PRESET_GNOME34
ELEMENT_PRESET_GNOME_MAGE36
ELEMENT_PRESET_NIGHTMARE37
ELEMENT_PRESET_MIMIC38
ELEMENT_PRESET_AGATIO39
ELEMENT_PRESET_KARST40
ELEMENT_PRESET_FUSION_DRAGON41
ELEMENT_PRESET_SENTINEL42
ELEMENT_PRESET_GRYPHON43
ELEMENT_PRESET_STAR_MAGICIAN44
ELEMENT_PRESET_VALUKAR45
ELEMENT_PRESET_DULLAHAN46
ELEMENT_PRESET_DOOM_DRAGON47

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.