|
Digimon World 3 decomp
The European version, SLES_039.36
|
FIGHTSTG's action events: the task that runs the events an action queued. More...
#include "battle/battle_mode.h"Go to the source code of this file.
Functions | |
| static void | stealEnemyItem (ActionEvents *task, BattleChild *children) |
| Takes the enemy's item into the bag (up to 99) and says so. | |
| static void | drainHp (ActionEvents *task, BattleChild *children, BattleFighter *fighter) |
| Heals FIGHTER by the drained HP (up to its max HP) and says so. | |
| static void | drainMp (ActionEvents *task, BattleChild *children) |
| Moves the drained MP (as much as the partner has) from the partner to the enemy, up to its max MP, and says so. | |
| static void | showRaisedStatus (ActionEvents *task, BattleChild *children) |
| Says which status (bit 0, 1 or 2 of the event's flags) the technique raises. | |
| static void | showNextRaisedStatus (ActionEvents *task, BattleChild *children) |
| Says the next status the technique raises and clears its bit, so the event runs again for the remaining ones. | |
| static void | applyStatusEvent (ActionEvents *task, BattleChild *children, s32 i) |
| Applies event I's status or battle effect (a poison, a lowered stat, an escape...) and shows its message. | |
| void | FIGHTSTG_updateActionEvents (ActionEvents *task, BattleChild *children) |
| Runs the queued battle events: the first flag set in FIGHTSTG_action.effects picks the step, which shows its message, applies its effect and clears the flag (stealEnemyItem, drainHp, drainMp, showRaisedStatus, showNextRaisedStatus or applyStatusEvent). | |
| ActionEvents * | FIGHTSTG_startActionEvents (s32 side) |
| Starts running the current action's events for SIDE (FIGHTSTG_updateActionEvents) | |
FIGHTSTG's action events: the task that runs the events an action queued.
Definition in file action_events.c.
|
inlinestatic |
Takes the enemy's item into the bag (up to 99) and says so.
Definition at line 6 of file action_events.c.
Referenced by FIGHTSTG_updateActionEvents().
|
inlinestatic |
Heals FIGHTER by the drained HP (up to its max HP) and says so.
Definition at line 19 of file action_events.c.
Referenced by FIGHTSTG_updateActionEvents().
|
inlinestatic |
Moves the drained MP (as much as the partner has) from the partner to the enemy, up to its max MP, and says so.
Definition at line 33 of file action_events.c.
Referenced by FIGHTSTG_updateActionEvents().
|
inlinestatic |
Says which status (bit 0, 1 or 2 of the event's flags) the technique raises.
< PartnerStats.status: one at random
< PartnerStats.status: one at random
< PartnerStats.status: one at random
Definition at line 54 of file action_events.c.
Referenced by FIGHTSTG_updateActionEvents().
|
inlinestatic |
Says the next status the technique raises and clears its bit, so the event runs again for the remaining ones.
< each one that a roll lets
< each one that a roll lets
< each one that a roll lets
Definition at line 68 of file action_events.c.
Referenced by FIGHTSTG_updateActionEvents().
|
inlinestatic |
Applies event I's status or battle effect (a poison, a lowered stat, an escape...) and shows its message.
< FIGHTER_NO_SWITCH for a while
< in BATTLE_KIND_UNK2: takes 70 percent of the partner's HP, ends as BATTLE_FLED
< a side ran away
Definition at line 85 of file action_events.c.
Referenced by FIGHTSTG_updateActionEvents().
| void FIGHTSTG_updateActionEvents | ( | ActionEvents * | task, |
| BattleChild * | children | ||
| ) |
Runs the queued battle events: the first flag set in FIGHTSTG_action.effects picks the step, which shows its message, applies its effect and clears the flag (stealEnemyItem, drainHp, drainMp, showRaisedStatus, showNextRaisedStatus or applyStatusEvent).
The match depends on each event branch ending with its own flag clear and break (the copies are merged after reload, but they make the loop big enough that loop.c leaves 0x10 at each use), on case 2 written next to default in applyStatusEvent's switch (it sets the jump table's base) and on drainMp setting its fighter and enemy before args[0].
< does nothing but for the enemy whose battle table entry lists it first
< raises the critical hit chance
< can't act or run away; a hit may wake it up
< the enemy's item
< HP, in 128ths of the damage
< the partner's, in 128ths of its max MP
< PartnerStats.status: one at random
< each one that a roll lets
Definition at line 137 of file action_events.c.
Referenced by FIGHTSTG_startActionEvents().
| ActionEvents * FIGHTSTG_startActionEvents | ( | s32 | side | ) |
Starts running the current action's events for SIDE (FIGHTSTG_updateActionEvents)
Definition at line 212 of file action_events.c.
Referenced by FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateFirstTech(), and FIGHTSTG_updateTechAction().