Skip to Content
The Alchemy Project

include/battle/formations.h

The enemy formations.

Included by battle_internal.h and formations.c.

Structures

NameDescription
structFORMATIONAn enemy formation: its battle type and up to five kinds of enemy, each with the fewest and most of it that appear.

Macros

NameDescription
#defineFORMATION_LAYOUT_SHUFFLED 0Each kind's enemies together, the kinds in a random order.
#defineFORMATION_LAYOUT_INTERLEAVED 1Unused: each enemy drawn from a random kind with any left; no formation has it.
#defineFORMATION_LAYOUT_CENTERED 2The formation's own order, its first enemy in the centre and the rest alternately either side: eleven formations, among them the Bandit with his two Thieves and Menardi with Saturos.
#defineFORMATION_MEMBERS 5The kinds of enemy a formation may hold.
#defineFORMATION_COUNT 380The rows of Formations.
#defineFORMATION_FUSION_DRAGON 347The Fusion Dragon's battle on the Venus Lighthouse Aerie, the one formation the battle code itself tests for: it opens with the storm instead of the curtain (btTransitionRun).

Variables

NameDescription
extern FORMATIONFormations [FORMATION_COUNT]The formations, by formation id (battle/formations.c).
extern Uint16BattleFormationExcludedEnemies [20]The 20 enemies whose defeated flags a monster battle clears before it picks a formation (battle/formations.c).

Description

The enemy formations.

Macros in detail

FORMATION_LAYOUT_SHUFFLED

#define FORMATION_LAYOUT_SHUFFLED 0

Each kind's enemies together, the kinds in a random order. A link battle's opponents stand this way too.

Referenced by btFormationBuildEnemyList(), btRun() and btUnitCollect().

Definition at line 15 of file formations.h.

FORMATION_LAYOUT_INTERLEAVED

#define FORMATION_LAYOUT_INTERLEAVED 1

Unused: each enemy drawn from a random kind with any left; no formation has it.

Referenced by btFormationBuildEnemyList() and btUnitCollect().

Definition at line 18 of file formations.h.

FORMATION_LAYOUT_CENTERED

#define FORMATION_LAYOUT_CENTERED 2

The formation's own order, its first enemy in the centre and the rest alternately either side: eleven formations, among them the Bandit with his two Thieves and Menardi with Saturos.

Referenced by btUnitCollect() and Formations.

Definition at line 22 of file formations.h.

FORMATION_MEMBERS

#define FORMATION_MEMBERS 5

The kinds of enemy a formation may hold.

Referenced by btFormationAverageLevel(), btFormationBuildEnemyList() and btFormationGetRandomMember().

Definition at line 25 of file formations.h.

FORMATION_COUNT

#define FORMATION_COUNT 380

The rows of Formations.

Referenced by btFormationBuildEnemyList(), btFormationGetRandomMember() and Formations.

Definition at line 41 of file formations.h.

FORMATION_FUSION_DRAGON

#define FORMATION_FUSION_DRAGON 347

The Fusion Dragon's battle on the Venus Lighthouse Aerie, the one formation the battle code itself tests for: it opens with the storm instead of the curtain (btTransitionRun).

Referenced by btTransitionRun() and Formations.

Definition at line 46 of file formations.h.