|
Digimon World 3 decomp
The European version, SLES_039.36
|
FIGHTSTG's enemy turn: the enemy's pick of its action from its battle table entry, and its conditions. More...
#include "battle/battle_mode.h"Go to the source code of this file.
Functions | |
| s32 | FIGHTSTG_pickEnemySwitch (EnemyTurn *task) |
| The enemy that the enemy's turn (FIGHTSTG_updateEnemyTurn) switches to: task->target's, or one of the others at random (not the active one), -1 for none. | |
| static void | fleeWhenWeak (EnemyTurn *task, BattleChild *children) |
| In BATTLE_KIND_ESCAPE, the enemy flees once its HP is under a tenth; otherwise its turn goes on to the next state. | |
| static void | showRunAway (EnemyTurn *task, BattleChild *children) |
| Shows the enemy's run-away event, if it has one, and clears it before its turn goes on. | |
| static void | useEnemyTech (EnemyTurn *task, BattleChild *children) |
| Starts the enemy's attack (target 1) or technique TARGET, paying its MP, or shows the message for an enemy without the MP for it. | |
| static void | showEnemyName (EnemyTurn *task, BattleChild *children) |
| Says the name of the enemy that came in. | |
| static void | switchEnemyOut (EnemyTurn *task, BattleChild *children) |
| Picks the enemy to switch in (FIGHTSTG_pickEnemySwitch) and shows the switch's message, or the one for no enemy to switch in. | |
| void | FIGHTSTG_updateEnemyTurn (EnemyTurn *task, BattleChild *children) |
| The enemy's turn: a message when its HP is under a tenth, then one when it is asleep, paralyzed or confused, or else the first action of its battle table entry whose condition holds, and what its target makes it do: attack, a technique, a switch to another enemy (FIGHTSTG_pickEnemySwitch) or a message. | |
| EnemyTurn * | FIGHTSTG_startEnemyTurn (void) |
| Starts the enemy's turn (FIGHTSTG_updateEnemyTurn) | |
| s32 | FIGHTSTG_testEnemyCondition (u8 condition, s16 arg) |
| Whether the condition of an enemy's action holds (BattleTableAction): always, a chance in 128, the enemy's or the partner's HP over or under a share, its MP, the partner's Digimon or flags, the other enemies, the battle and the enemy's boosts. | |
| s32 | FIGHTSTG_getEnemyAction (u8 kind) |
| What an enemy's action target makes it do (EnemyTurn.target): 1 its first technique, its battle table entry's second or third technique, or -1 to -5 for the other actions. | |
FIGHTSTG's enemy turn: the enemy's pick of its action from its battle table entry, and its conditions.
Definition in file enemy_turn.c.
The enemy that the enemy's turn (FIGHTSTG_updateEnemyTurn) switches to: task->target's, or one of the others at random (not the active one), -1 for none.
Definition at line 9 of file enemy_turn.c.
Referenced by switchEnemyOut().
|
inlinestatic |
In BATTLE_KIND_ESCAPE, the enemy flees once its HP is under a tenth; otherwise its turn goes on to the next state.
< the enemy runs away under a tenth of its HP
< a side ran away
Definition at line 68 of file enemy_turn.c.
Referenced by FIGHTSTG_updateEnemyTurn().
|
inlinestatic |
Shows the enemy's run-away event, if it has one, and clears it before its turn goes on.
Definition at line 89 of file enemy_turn.c.
Referenced by FIGHTSTG_updateEnemyTurn().
|
inlinestatic |
Starts the enemy's attack (target 1) or technique TARGET, paying its MP, or shows the message for an enemy without the MP for it.
Definition at line 117 of file enemy_turn.c.
Referenced by FIGHTSTG_updateEnemyTurn().
|
inlinestatic |
Says the name of the enemy that came in.
Definition at line 139 of file enemy_turn.c.
Referenced by FIGHTSTG_updateEnemyTurn().
|
inlinestatic |
Picks the enemy to switch in (FIGHTSTG_pickEnemySwitch) and shows the switch's message, or the one for no enemy to switch in.
Definition at line 150 of file enemy_turn.c.
Referenced by FIGHTSTG_updateEnemyTurn().
| void FIGHTSTG_updateEnemyTurn | ( | EnemyTurn * | task, |
| BattleChild * | children | ||
| ) |
The enemy's turn: a message when its HP is under a tenth, then one when it is asleep, paralyzed or confused, or else the first action of its battle table entry whose condition holds, and what its target makes it do: attack, a technique, a switch to another enemy (FIGHTSTG_pickEnemySwitch) or a message.
The match depends on the goto into the confusion branch, the case -1 next to default, and the enemies pointers of showEnemyName and substate 5.
< can't act or run away; a hit may wake it up
< loses turns at random (FIGHTSTG_battleFuncs.testParalysis)
Definition at line 174 of file enemy_turn.c.
Referenced by FIGHTSTG_startEnemyTurn().
| EnemyTurn * FIGHTSTG_startEnemyTurn | ( | void | ) |
Starts the enemy's turn (FIGHTSTG_updateEnemyTurn)
WFIGHTMN passes them the battle, which they don't read; its code loads it, so no parameter list.
Definition at line 293 of file enemy_turn.c.
Referenced by WFIGHTMN_runTurn().
Whether the condition of an enemy's action holds (BattleTableAction): always, a chance in 128, the enemy's or the partner's HP over or under a share, its MP, the partner's Digimon or flags, the other enemies, the battle and the enemy's boosts.
The match depends on the one fighter pointer that the cases set as they need it, on case 1 keeping its roll in the same variable as the HP share, and on case 10's own loop counter.
< can't act or run away; a hit may wake it up
Definition at line 303 of file enemy_turn.c.
Referenced by FIGHTSTG_updateCounterattack(), and FIGHTSTG_updateEnemyTurn().
What an enemy's action target makes it do (EnemyTurn.target): 1 its first technique, its battle table entry's second or third technique, or -1 to -5 for the other actions.
Definition at line 438 of file enemy_turn.c.
Referenced by FIGHTSTG_updateCounterattack(), and FIGHTSTG_updateEnemyTurn().