16 task->
lines[1] = 0x10;
25 task->
lines[0] = 0x10;
40#if VERSION_EU || VERSION_JP
51 if (player->
hp <= 0) {
61 if (player->
hp <= 0) {
72 task->
lines[0] = 0x2B;
77 fighter->
flags &= ~FIGHTER_ASLEEP;
96 if (struck->
hp <= 0) {
105 task->
lines[0] = 0x1D;
120 switch (task->
state) {
133 if (children[0].task ==
NULL) {
144 if (children[0].task ==
NULL) {
150 task->
lines[0] = 0x1D;
158 if (children[0].task ==
NULL) {
160#if VERSION_EU || VERSION_JP
167 if (target->
hp <= 0) {
178 if (children[0].task ==
NULL) {
193 if (children[0].task ==
NULL) {
201 if (children[0].task ==
NULL) {
206 task->
lines[0] = 0x10;
ActionEvents * FIGHTSTG_startActionEvents(s32 side)
Starts running the current action's events for SIDE (FIGHTSTG_updateActionEvents)
BattleAction FIGHTSTG_action
the command being carried out
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
BattleFuncs FIGHTSTG_battleFuncs
the battle's stats and the functions that compute with them
void FIGHTSTG_queueKnockOut(u8 side)
Queues the fall of side's active fighter (event 20), first.
void FIGHTSTG_endEnemyWeakness(void)
Ends the enemy's weakness now: its queued event 24 runs next.
#define EVENT_WEAKNESS_END
the end of the enemy's weakness (BATTLE_KIND_FINAL_LAST)
#define TECH_EFFECT_KNOCK_OUT
#define ACTIVE_FIGHTER(side)
SIDE's active fighter as its row plus the index, which GCC adds with the row's address first.
#define EVENT_STATUS_END
10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
#define FIGHTER_ASLEEP
can't act or run away; a hit may wake it up
EventQueue FIGHTSTG_events
the battle's events and their functions
void FIGHTSTG_queueEnemyTurn(s32 delay)
Queues the enemy's turn (event 3) in delay.
FIGHTSTG.PRO: the battle.
BattleTableEntry *(* FIGHTSTG_battleTableFunc)(s32 id)
how the fight stage and WFIGHTMN read the battle table
static void wakePlayerUp(EnemyAttack *task, BattleChild *children, BattleFighter *fighter)
Wakes the player's sleeping FIGHTER up and says so, ending its sleep's event.
void FIGHTSTG_updateEnemyAttack(EnemyAttack *task, BattleChild *children)
An attack on the player's active fighter (FIGHTSTG_startEnemyAttack): state 1 is the enemy's techniqu...
static void announceEnemyTech(EnemyAttack *task, BattleChild *children, BattleTableEntry *entry)
Queues the enemy's next turn and says the technique it uses (the weakened enemy's own one,...
static void showOtherAttackResult(EnemyAttack *task, BattleChild *children)
The other attack's result: its damage (queueing the player's knockout at 0 HP unless the attack was s...
static void damagePlayer(EnemyAttack *task, BattleChild *children)
Shows the technique's damage and takes it from the player's active fighter's HP (the European version...
EnemyAttack * FIGHTSTG_startEnemyAttack(s32 kind, s32 noKnockout)
Starts an attack on the player's active fighter (FIGHTSTG_updateEnemyAttack): kind 0 for the enemy's ...
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
BattleMessageBox * FIGHTSTG_createMessage(void)
Creates a battle message box (FIGHTSTG_updateMessage)
u8 effects[0x28]
by TECH_EFFECT_*: what each one does, 0 for none
void(* start)(u8 side, s32 tech)
FIGHTSTG_startAction.
u8 hits[4]
whether each hit lands
One of the battle's fighters, three on each side (WFIGHTMN's BattleUnit): a partner's HP and MP go ba...
s16 id
the Digimon (DIGIMON_DATA)
s32(* testWakeUp)(u8 side, s32 value)
void(* show)()
FIGHTSTG_showMessage: (task, type, data)
s8 hitCount
BATTLE_KIND_FINAL_LAST: the partner's hits that did damage.
s32 active[2]
each side's fighter
BattleFighter fighters[2][3]
u8 weakened
BATTLE_KIND_FINAL_LAST: the enemy is weakened (FIGHTSTG_weakenEnemy)
s16 tech
a technique id, set by WFIGHTMN
s16 techs[3]
its first, then those of FIGHTSTG_getEnemyAction's kinds 2 and 3
FIGHTSTG_updateEnemyAttack's task (FIGHTSTG_startEnemyAttack): an attack on the player's active fight...
s32 noKnockout
don't knock the fighter out at 0 HP
void(* setState)(struct EnemyAttack *task, s32 state)
s32 resetIdleMotion
the weakness ended: WFIGHTMN_setIdleMotion once the technique starts
s32 asleep
the fighter was asleep
s32 kind
0 the enemy's technique, 1 another attack
s32 lines[4]
FIGHTSTG_updateMessage's.
s32(* getDelay)(u8 side, s32 kind)
FIGHTSTG_getEventDelay: when an event of side's runs.
s32(* find)(s32 type, u8 side, s32 fighter)
s16 type
0 for a free entry
Any task, seen through its header.
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
BattleScript * WFIGHTMN_startTech(u8 actor, s32 id)
Starts the effect of actor's move id (FIGHTSTG's FIGHTSTG_createBattleScript): its kind and motions f...
void WFIGHTMN_chargeGauge(u8 side, s32 damage)
Adds what damage gives to the current partner's gauge (BATTLE_SETUP.gauges), up to 1000.
s32 WFIGHTMN_setIdleMotion(u8 id, s32 damage)
Sets the idle motion of side id >> 4's fighter: 1 (weak) if damage leaves it with a quarter of its HP...
A turn's or a counterattack's one child, and what WFIGHTMN's battle menu waits for (NULL when it is d...
ActionEvents * events
the queued events (FIGHTSTG_startActionEvents)
BattleMessageBox * message
FIGHTSTG_createMessage.
BattleScript * script
a technique's (FIGHTSTG_createBattleScript)