Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
first_tech.c File Reference

FIGHTSTG's first technique, the one a side starts the battle with. More...

Include dependency graph for first_tech.c:

Go to the source code of this file.

Functions

static void announceFirstTech (FirstTech *task, BattleChild *children)
 Picks the side's first technique and says it is used (or, for an enemy without the MP, that it is not), noting whether the other side's fighter was asleep.
 
static void showFirstTechResult (FirstTech *task, BattleChild *children)
 Shows the technique's result (its hits, its knockout, the 70 percent of the partner's HP that TECH_EFFECT_END_BATTLE takes, its damage or its miss) and keeps the damage to take.
 
static void takeFirstTechDamage (FirstTech *task)
 Takes the damage from the other side's active fighter, queueing its knockout at 0 HP (and setting step, which ends the technique).
 
static void wakeCounteredUp (FirstTech *task, BattleChild *children, BattleFighter *countered, s32 index)
 Wakes up COUNTERED, the sleeping fighter the technique struck in row INDEX, says so and ends its sleep's event.
 
void FIGHTSTG_updateFirstTech (FirstTech *task, BattleChild *children)
 A side's first technique (FIGHTSTG_startFirstTech): the partner's skills[0] or the enemy's battle table techs[0], its message (announceFirstTech) and WFIGHTMN's WFIGHTMN_startTech, then the damage to the other side's active fighter (showFirstTechResult, takeFirstTechDamage: TECH_EFFECT_KNOCK_OUT knocks it out, TECH_EFFECT_END_BATTLE takes 70 percent of the partner's HP), its waking up when that fighter is asleep (substate 4, wakeCounteredUp) and FIGHTSTG_startEnemyAttack when the partner misses in BATTLE_KIND_FINAL_LAST.
 
FirstTech * FIGHTSTG_startFirstTech (s32 side)
 Starts side's first technique (FIGHTSTG_updateFirstTech)
 

Detailed Description

FIGHTSTG's first technique, the one a side starts the battle with.

Definition in file first_tech.c.

Function Documentation

◆ announceFirstTech()

static void announceFirstTech ( FirstTech *  task,
BattleChild *  children 
)
inlinestatic

Picks the side's first technique and says it is used (or, for an enemy without the MP, that it is not), noting whether the other side's fighter was asleep.

< can't act or run away; a hit may wake it up

Definition at line 8 of file first_tech.c.

Referenced by FIGHTSTG_updateFirstTech().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showFirstTechResult()

static void showFirstTechResult ( FirstTech *  task,
BattleChild *  children 
)
inlinestatic

Shows the technique's result (its hits, its knockout, the 70 percent of the partner's HP that TECH_EFFECT_END_BATTLE takes, its damage or its miss) and keeps the damage to take.

< in BATTLE_KIND_UNK2: takes 70 percent of the partner's HP, ends as BATTLE_FLED

Definition at line 45 of file first_tech.c.

Referenced by FIGHTSTG_updateFirstTech().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ takeFirstTechDamage()

static void takeFirstTechDamage ( FirstTech *  task)
inlinestatic

Takes the damage from the other side's active fighter, queueing its knockout at 0 HP (and setting step, which ends the technique).

Definition at line 83 of file first_tech.c.

Referenced by FIGHTSTG_updateFirstTech().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wakeCounteredUp()

static void wakeCounteredUp ( FirstTech *  task,
BattleChild *  children,
BattleFighter *  countered,
s32  index 
)
inlinestatic

Wakes up COUNTERED, the sleeping fighter the technique struck in row INDEX, says so and ends its sleep's event.

< can't act or run away; a hit may wake it up

Definition at line 101 of file first_tech.c.

Referenced by FIGHTSTG_updateFirstTech().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIGHTSTG_updateFirstTech()

void FIGHTSTG_updateFirstTech ( FirstTech *  task,
BattleChild *  children 
)

A side's first technique (FIGHTSTG_startFirstTech): the partner's skills[0] or the enemy's battle table techs[0], its message (announceFirstTech) and WFIGHTMN's WFIGHTMN_startTech, then the damage to the other side's active fighter (showFirstTechResult, takeFirstTechDamage: TECH_EFFECT_KNOCK_OUT knocks it out, TECH_EFFECT_END_BATTLE takes 70 percent of the partner's HP), its waking up when that fighter is asleep (substate 4, wakeCounteredUp) and FIGHTSTG_startEnemyAttack when the partner misses in BATTLE_KIND_FINAL_LAST.

The match depends on the other side's fighter being found as its row's offset, other * 0x60, added as an int to its slot in the first row, each in a variable of its own in a block of its own (as an index, gcc folds the row into (other * 3 + active) * 32); on the blocks of their own of substate 0's row and of the event that wakeCounteredUp finds; on announceFirstTech's MP test being written tech->mp > fighter->mp and on TECH_EFFECT_END_BATTLE's damage being stored before lines[0].

< in BATTLE_KIND_UNK2: takes 70 percent of the partner's HP, ends as BATTLE_FLED

< its third enemy; winning plays the ending

< can't act or run away; a hit may wake it up

Definition at line 130 of file first_tech.c.

Referenced by FIGHTSTG_startFirstTech().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIGHTSTG_startFirstTech()

FirstTech * FIGHTSTG_startFirstTech ( s32  side)

Starts side's first technique (FIGHTSTG_updateFirstTech)

Definition at line 238 of file first_tech.c.

Referenced by useEnemyTech(), WFIGHTMN_runCommand(), and WFIGHTMN_runConfusedCommand().

Here is the call graph for this function:
Here is the caller graph for this function: