|
Digimon World 3 decomp
The European version, SLES_039.36
|
FIGHTSTG's battle state: the battle table, stats, elements and resistances, the fighters, the events queue, the action and its effects, the rolls and the damage (battle.c, battle_table.c, stats.c, damage.c, rolls.c, boosts.c, events.c, speed.c, tech_effects.c, enemy_turn.c and start.c). More...
Go to the source code of this file.
Data Structures | |
| struct | BattleTableAction |
| What an enemy does: its target (FIGHTSTG_getEnemyAction) when the condition holds. More... | |
| struct | BattleTableEntry |
| struct | EnemyTurn |
| FIGHTSTG_startEnemyTurn's task. More... | |
| struct | BattleEvent |
| An event of the battle, as it is queued (FIGHTSTG_pushEvent) More... | |
| struct | QueuedEvent |
| A queued event: its time counts down to when it runs. More... | |
| struct | EventKey |
| What FIGHTSTG_removeEvents removes the events of: an event's first two args, as FIGHTSTG_queueRecovery and the others push them. More... | |
| struct | EventQueueFuncs |
| The event queue's functions (FIGHTSTG_events.funcs) More... | |
| struct | EventDelay |
| An event kind's delay range (FIGHTSTG_eventDelays, by kind): FIGHTSTG_getEventDelay adds a random part below div, and clamps to min and max where they are not 0. More... | |
| struct | EventQueue |
| The battle's events (FIGHTSTG_events) More... | |
| struct | BattleFighter |
| One of the battle's fighters, three on each side (WFIGHTMN's BattleUnit): a partner's HP and MP go back to the party when the battle ends. More... | |
| struct | BattleSpeed |
| How the battle's frames go by (FIGHTSTG_setSpeed sets it) More... | |
| struct | ElementBoost |
| The battle's element boost: one element's techniques do more damage, and the ones of the element it weakens less (FIGHTSTG_getElementBoost) More... | |
| struct | BattleState |
| What a battle starts from: WFIGHTMN_start zeroes it as one block, and FIGHTSTG_testRunAway reads runAttempts through a pointer to it. More... | |
| struct | Battle |
| FIGHTSTG_battle: the battle. More... | |
| struct | BattleAction |
| FIGHTSTG_action: the technique being carried out. More... | |
| struct | HitStatus |
| A status a weapon's hits can inflict. More... | |
| struct | BattleStats |
| A side's stats as FIGHTSTG_computeStats works them out. More... | |
| struct | BattleFuncs |
| FIGHTSTG_battleFuncs. More... | |
Macros | |
| #define | FILE_BATTLE_TABLE 0x1CF |
| A table of 0x46-byte entries that start with an s16 id, 0 after the last (FIGHTSTG_findBattleTableIndex) | |
| #define | BATTLE_STAT_ATTACK 0 |
| BattleStats.stats' indices: the partner's first five battle stats. | |
| #define | BATTLE_STAT_DEFENSE 1 |
| against it | |
| #define | BATTLE_STAT_SPIRIT 2 |
| magic damage, and against it | |
| #define | BATTLE_STAT_WISDOM 3 |
| magic accuracy, statuses and heals | |
| #define | BATTLE_STAT_SPEED 4 |
| physical accuracy, evasion and running away | |
| #define | ELEMENT_FIRST 2 |
| The elements (TechData.element, BattleStats.element) and the families (TechData.family, BattleStats.family) start at 2: under it, none. | |
| #define | ELEMENT_COUNT 7 |
| #define | FAMILY_FIRST 2 |
| #define | TECH_PHYSICAL 2 |
| TechData.icon's kinds of attack. | |
| #define | TECH_MAGIC 3 |
| FIGHTSTG_rollMagicHit and FIGHTSTG_computeMagicDamage. | |
| #define | RESIST_POISON 7 |
| BattleStats.resist's indices: against the elements (element - ELEMENT_FIRST), then against the statuses. | |
| #define | RESIST_PARALYSIS 8 |
| #define | RESIST_CONFUSION 9 |
| #define | RESIST_SLEEP 10 |
| #define | RESIST_KNOCK_OUT 11 |
| #define | RESIST_COUNT 12 |
| #define | BATTLE_TABLE_FALLBACK 3 |
| BattleTableEntry.actions' last one, which the enemy takes when none of the others' conditions holds: its own is never tested. | |
| #define | EVENT_END_BATTLE 1 |
| The types of the battle's events: WFIGHTMN runs a state for each (WFIGHTMN_runTurn) | |
| #define | EVENT_PLAYER_TURN 2 |
| #define | EVENT_ENEMY_TURN 3 |
| #define | EVENT_RUN_AWAY 4 |
| #define | EVENT_AUTO_RECOVER_END 5 |
| #define | EVENT_RECOVERY 6 |
| #define | EVENT_CLEAR_FIELD 7 |
| #define | EVENT_PARTNER_TECH 8 |
| a technique of the partner's, run as its command | |
| #define | EVENT_STATUS_DAMAGE 9 |
| the damage of a poisoned fighter (FIGHTER_POISONED) | |
| #define | EVENT_STATUS_END 10 |
| 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP | |
| #define | EVENT_BOOST_END 13 |
| 13-15: the end of a boost, by the stat | |
| #define | EVENT_RESTRICTION_END 16 |
| 16-17: the end of a restriction (FIGHTER_NO_SWITCH or FIGHTER_NO_DIGIVOLVE) | |
| #define | EVENT_BLAST 18 |
| the partner's digivolution for the battle | |
| #define | EVENT_BLAST_END 19 |
| #define | EVENT_KNOCK_OUT 20 |
| #define | EVENT_SPECIAL_END 21 |
| the end of the partner's special state | |
| #define | EVENT_DIGIDEVOLVE 22 |
| #define | EVENT_LAST_ENEMY 23 |
| the last battle's third enemy comes in | |
| #define | EVENT_WEAKNESS_END 24 |
| the end of the enemy's weakness (BATTLE_KIND_FINAL_LAST) | |
| #define | BATTLE_KIND_NORMAL 0 |
| The kinds of battle (Battle.kind), which WFIGHTMN picks by the battle and the mode it came from. | |
| #define | BATTLE_KIND_ESCAPE 1 |
| the enemy runs away under a tenth of its HP | |
| #define | BATTLE_KIND_UNK2 2 |
| the enemy keeps an eleventh of its HP | |
| #define | BATTLE_KIND_NO_DAMAGE 3 |
| the partner's hits do no damage | |
| #define | BATTLE_KIND_FINAL 4 |
| battle 0x144, the last one: its first enemy | |
| #define | BATTLE_KIND_FINAL_SECOND 5 |
| its second enemy | |
| #define | BATTLE_KIND_FINAL_LAST 6 |
| its third enemy; winning plays the ending | |
| #define | BATTLE_FLED 0 |
| How a battle ends (FIGHTSTG_endBattle) | |
| #define | BATTLE_WON 1 |
| #define | BATTLE_LOST 2 |
| #define | SIDE_PLAYER 0 |
| The battle's sides, as the functions that take a side want them: side >> 4 is its row of FIGHTSTG_battle.state.fighters, and SIDE_ENEMY - side the other side. | |
| #define | SIDE_ENEMY 0x10 |
| #define | FIGHTER_POISONED 1 |
| BattleFighter.flags: the statuses, which the techniques give (FIGHTSTG_inflict*) and events of type EVENT_STATUS_END + n end. | |
| #define | FIGHTER_PARALYZED 2 |
| loses turns at random (FIGHTSTG_battleFuncs.testParalysis) | |
| #define | FIGHTER_CONFUSED 4 |
| #define | FIGHTER_ASLEEP 8 |
| can't act or run away; a hit may wake it up | |
| #define | FIGHTER_NO_SWITCH 0x10 |
| can't switch out or run away (TECH_EFFECT_NO_SWITCH) | |
| #define | FIGHTER_NO_DIGIVOLVE 0x20 |
| can't digivolve or use a switch-in technique (TECH_EFFECT_NO_DIGIVOLVE) | |
| #define | TECH_EFFECT_FIRST 2 |
| A technique's effect (TechData.effect), which FIGHTSTG_applyTechEffect carries out when its hit lands, and BattleAction.effects' index. | |
| #define | TECH_EFFECT_POISON 2 |
| #define | TECH_EFFECT_PARALYSIS 3 |
| #define | TECH_EFFECT_CONFUSION 4 |
| #define | TECH_EFFECT_SLEEP 5 |
| #define | TECH_EFFECT_KNOCK_OUT 6 |
| #define | TECH_EFFECT_DRAIN 8 |
| HP, in 128ths of the damage. | |
| #define | TECH_EFFECT_MULTI_HIT 9 |
| #define | TECH_EFFECT_ENEMY_ONLY 10 |
| does nothing but for the enemy whose battle table entry lists it first | |
| #define | TECH_EFFECT_CRITICAL 11 |
| raises the critical hit chance | |
| #define | TECH_EFFECT_STEAL 12 |
| the enemy's item | |
| #define | TECH_EFFECT_NO_SWITCH 13 |
| FIGHTER_NO_SWITCH for a while. | |
| #define | TECH_EFFECT_NO_DIGIVOLVE 14 |
| FIGHTER_NO_DIGIVOLVE for a while. | |
| #define | TECH_EFFECT_LOWER_ATTACK 26 |
| #define | TECH_EFFECT_LOWER_DEFENSE 27 |
| #define | TECH_EFFECT_DRAIN_MP 29 |
| the partner's, in 128ths of its max MP | |
| #define | TECH_EFFECT_DOUBLE_MAGIC 31 |
| two magic hits, as techniques 0x1B9 and 0x1BA | |
| #define | TECH_EFFECT_RAISE_ONE_STATUS 32 |
| PartnerStats.status: one at random. | |
| #define | TECH_EFFECT_RAISE_EACH_STATUS 33 |
| each one that a roll lets | |
| #define | TECH_EFFECT_RAISE_ALL_STATUS 34 |
| #define | TECH_EFFECT_END_BATTLE 35 |
| in BATTLE_KIND_UNK2: takes 70 percent of the partner's HP, ends as BATTLE_FLED | |
| #define | HIT_POISON 0 |
| The statuses a weapon's hits can inflict (BattleStats.statuses) | |
| #define | HIT_PARALYSIS 1 |
| #define | HIT_CONFUSION 2 |
| #define | HIT_KNOCK_OUT 3 |
| its power is read by nothing | |
| #define | HIT_DRAIN 4 |
| its power is in 128ths of the damage | |
| #define | HIT_STATUS_COUNT 5 |
| #define | BATTLE_ACTION_STATE_SIZE ((u8 *)&FIGHTSTG_action.start - (u8 *)&FIGHTSTG_action) |
| FIGHTSTG_action's bytes before start, which a new action clears. | |
| #define | ACTIVE_FIGHTER(side) (FIGHTSTG_battle.state.fighters[side] + FIGHTSTG_battle.state.active[side]) |
| SIDE's active fighter as its row plus the index, which GCC adds with the row's address first. | |
Functions | |
| EnemyTurn * | FIGHTSTG_startEnemyTurn () |
| WFIGHTMN passes them the battle, which they don't read; its code loads it, so no parameter list. | |
| void | FIGHTSTG_queuePlayerTurn (s32 delay) |
| The events they queue for WFIGHTMN, and its turn's substate. | |
| void | FIGHTSTG_queueEnemyTurn (s32 delay) |
| Queues the enemy's turn (event 3) in delay. | |
| void | FIGHTSTG_endBattle (s32 result) |
| Ends the battle: queues event 1 ahead of the others, with how it ended (BATTLE_FLED, BATTLE_WON or BATTLE_LOST) for WFIGHTMN. | |
| void | FIGHTSTG_queueRunAway (u8 side) |
| Queues side's attempt to run away (event 4) | |
| void | FIGHTSTG_queueRecovery (u8 side, s32 fighter, s32 big) |
| Queues a fighter's recovery of HP (event 6, with what getHeal takes as big), or sets the one already queued to 0xBD. | |
| void | FIGHTSTG_queueKnockOut (u8 side) |
| Queues the fall of side's active fighter (event 20), first. | |
| void | FIGHTSTG_queueBlast (void) |
| Queues the partner's digivolution for the battle (event 18), now. | |
| void | FIGHTSTG_queueBlastEnd (s32 kind) |
| Queues the end of the partner's digivolution for the battle (event 19), after delay kind + 3. | |
| void | FIGHTSTG_queueSpecialEnd (void) |
| Queues the end of the partner's special state (event 21): the USA version pushes back the one already queued. | |
| void | FIGHTSTG_weakenEnemy (void) |
| Weakens the enemy in BATTLE_KIND_FINAL_LAST: halves its boosts of stats 1 and 2 and queues the end (event 24) in 3000. | |
| void | FIGHTSTG_endEnemyWeakness (void) |
| Ends the enemy's weakness now: its queued event 24 runs next. | |
| void | FIGHTSTG_pushEvent (BattleEvent *event) |
| FIGHTSTG_events.funcs.push: queues an event in the first free one of the 99 slots, due after its delay. | |
| void | FIGHTSTG_pushEventFirst (BattleEvent *event) |
| FIGHTSTG_events.funcs.pushFirst: queues an event ahead of all the others, which wait its delay longer (at least 1, 2 in the European version) | |
| s32 | FIGHTSTG_popEvent (void) |
| Pops the next event: the one due soonest (in EU, events of types 2 and 3 give way to any due no later), moving all the others' times on by its. | |
| s32 | FIGHTSTG_findEventFrom (s32 start) |
| The first queued event from slot start of the type being looked for (FIGHTSTG_events.findType, 1-24), or -1. | |
| s32 | FIGHTSTG_findFirstEvent (s32 type) |
| FIGHTSTG_events.funcs.first: the first queued event of type, or -1. | |
| s32 | FIGHTSTG_findNextEvent (void) |
| FIGHTSTG_events.funcs.next: the next queued event of the same type, or -1. | |
| s32 | FIGHTSTG_findEvent (s32 type, u8 side, s32 fighter) |
| FIGHTSTG_events.funcs.find: the first queued event of type for side's fighter, or -1. | |
| void | FIGHTSTG_removeEvents (EventKey *key) |
| FIGHTSTG_events.funcs.remove: drops every queued event of key's side and fighter. | |
| void | FIGHTSTG_updateRoot (Task *task, Task **children) |
| The mode's root task: loads WFIGHTTS (the battle test, with the mode's argument) or WFIGHTMN and starts it, then runs the battle's update. | |
| 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. | |
| 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. | |
| void | FIGHTSTG_queueLastEnemy (void) |
| Queues the coming in of the last battle's third enemy, first. | |
| 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. | |
| s32 | FIGHTSTG_getEventDelay (u8 side, s32 kind) |
| FIGHTSTG_events.funcs.getDelay: the time until side's next event of kind (FIGHTSTG_eventDelays): random, or from the active fighters' stats and the other side's resistances, within the kind's range. | |
| void | FIGHTSTG_cureStatus (u8 side, s32 fighter, s32 item) |
| An item's cure (FIGHTSTG_events.funcs.cureStatus): items 0xBE-0xC5 clear a status of the fighter and remove its events, 0xC4 and 0xC5 all of them. | |
| void | FIGHTSTG_tryPoison (void) |
| TECH_EFFECT_POISON: poisons the target when rollPoison lets it, twice as strongly when the acting fighter is special. | |
| void | FIGHTSTG_tryParalysis (void) |
| TECH_EFFECT_PARALYSIS: paralyzes the target when rollParalysis lets it, with the technique's effectPower or the accessory's, twice as strongly when the acting fighter is special. | |
| void | FIGHTSTG_tryConfusion (void) |
| TECH_EFFECT_CONFUSION: confuses the target when rollConfusion lets it, with the technique's effectPower or the accessory's, twice as strongly when the acting fighter is special. | |
| void | FIGHTSTG_trySleep (void) |
| TECH_EFFECT_SLEEP: puts the target to sleep when rollSleep lets it, twice as strongly when the acting fighter is special. | |
| void | FIGHTSTG_tryKnockOut (void) |
| TECH_EFFECT_KNOCK_OUT: knocks the target out when rollKnockOut lets it. | |
| void | FIGHTSTG_rollMultiHit (void) |
| TECH_EFFECT_MULTI_HIT and the triple-hit accessory: rolls the other hits, 3 or the technique's hitCount in all; in BATTLE_KIND_FINAL_LAST the player's missed first hit makes them all miss. | |
| void | FIGHTSTG_tryDrain (void) |
| When rollDrain allows it, the action's drain becomes its damage times a 128th of the technique's effectPower (effect 8) or the player's HIT_DRAIN power, doubled when the acting fighter is special. | |
| void | FIGHTSTG_markEnemyOnly (void) |
| TECH_EFFECT_ENEMY_ONLY outside its own enemy's hands: marks the effect, which takes the place of the hit. | |
| void | FIGHTSTG_markCritical (void) |
| TECH_EFFECT_CRITICAL: marks the effect, which rollCritical has used. | |
| void | FIGHTSTG_lowerAttack (void) |
| TECH_EFFECT_LOWER_ATTACK: lowers the attack of the other side's active fighter by the technique's effectPower in 128ths and starts its event (not when side 0 acts with BATTLE_BLOCK_LOWER_ATTACK set). | |
| void | FIGHTSTG_lowerDefense (void) |
| TECH_EFFECT_LOWER_DEFENSE: lowers the defense of the other side's active fighter by the technique's effectPower in 128ths and starts its event. | |
| void | FIGHTSTG_drainMp (void) |
| TECH_EFFECT_DRAIN_MP: takes the technique's effectPower in 128ths of the player's fighter's max MP, at most what it has, as the action's drain. | |
| void | FIGHTSTG_raiseOneStatus (void) |
| TECH_EFFECT_RAISE_ONE_STATUS: when rollStatusRaise lets it, raises one of the partner's status values at random by the technique's effectPower. | |
| void | FIGHTSTG_raiseEachStatus (void) |
| TECH_EFFECT_RAISE_EACH_STATUS: raises each of the partner's status values that rollStatusRaise lets by the technique's effectPower. | |
| void | FIGHTSTG_raiseAllStatus (void) |
| TECH_EFFECT_RAISE_ALL_STATUS: when rollStatusRaise lets it, raises all of the partner's status values by the technique's effectPower. | |
| void | FIGHTSTG_tryNoSwitch (void) |
| TECH_EFFECT_NO_SWITCH: marks the effect when rollNoSwitch lets it. | |
| void | FIGHTSTG_startDoubleMagic (void) |
| Starts a TECH_EFFECT_DOUBLE_MAGIC technique: two magic hits, each with the damage of technique 0x1B9 or 0x1BA. | |
| void | FIGHTSTG_startEndBattle (void) |
| Starts a TECH_EFFECT_END_BATTLE technique: in BATTLE_KIND_UNK2 its effect, elsewhere a plain physical hit. | |
| void | FIGHTSTG_applyTechEffect (void) |
| Carries out the effect of a technique whose hit landed. | |
| void | FIGHTSTG_trySteal (void) |
| TECH_EFFECT_STEAL: when the enemy's active fighter holds an item and rollSteal lets the player take it, marks the effect and loads the item names. | |
| void | FIGHTSTG_queueBoostEnd (u8 side, s32 fighter, s32 kind, s32 tech) |
| Queues the end of a fighter's boost of stat kind, 12 frames on when a technique (tech) gave it and 8 when an item did (tech 0), or pushes back the one already queued. | |
| s32 | FIGHTSTG_findBattleTableIndex (s32 id) |
| Enemy Digimon id's index in the battle table (FILE_BATTLE_TABLE: each enemy's stats, techniques and actions), or -1. | |
| BattleTableEntry * | FIGHTSTG_getBattleTableEntry (s32 id) |
| Enemy Digimon id's entry in the battle table, or NULL. | |
| BattleStats * | FIGHTSTG_computeStats (u8 side, s32 which, s32 index) |
| Works out a side's stats into its BattleStats: the partner's totals with the fighter's boosts, its resistances and what its equipment and accessories add, or the enemy's (computeEnemyStats). | |
| s32 | FIGHTSTG_getElementBoost (s32 value, s32 element) |
| What the battle's element boost adds to value for a technique of the given element: the boost's amount in 128ths of value for the boosted element, half as much taken off for the element it weakens, nothing otherwise. | |
| s32 | FIGHTSTG_adjustDamage (u8 side, s32 id, s32 value) |
| A hit's damage from its base value: the element boost, half again against the target's family, the user's damage bonus, the element against the target's resistance, the triple hit's 0.4, a critical hit and the target's damage cut; at most 5 times value. | |
| s32 | FIGHTSTG_rollCritical (u8 side, s32 id) |
| Whether a physical hit is critical: a chance of 4 in 128 with the technique's critical boost or the accessory's, more against the target's family and while the target is paralyzed, asleep or confused. | |
| s32 | FIGHTSTG_rollMagicCritical (u8 side, s32 id) |
| Whether a magic hit is critical: a chance from the technique's element power against the target's resistance, more against the target's family and while the target is paralyzed, asleep or confused. | |
| void | FIGHTSTG_queueClearField (s32 time) |
| events.c's statuses and events | |
| void | FIGHTSTG_inflictConfusion (u8 side, s32 fromTech, u8 strength) |
| Confuses side's active fighter (FIGHTER_CONFUSED) with a strength, and queues its end (put off by the strength when a technique, fromTech, causes it) or pushes back the one already queued. | |
| void | FIGHTSTG_inflictPoison (u8 side, s32 fighter, s32 damage) |
| Poisons a fighter (FIGHTER_POISONED), and queues its damage or updates the one already queued. | |
| void | FIGHTSTG_inflictParalysis (u8 side, s32 unused, u8 strength) |
| Paralyzes side's active fighter (FIGHTER_PARALYZED) with a strength, and queues its end, which the strength puts off, or pushes back the one already queued. | |
| void | FIGHTSTG_inflictSleep (u8 side, s32 unused, u8 strength) |
| Puts side's active fighter to sleep (FIGHTER_ASLEEP) with a strength, and queues its end, which the strength puts off, or pushes back the one already queued. | |
| void | FIGHTSTG_queuePartnerTech (s32 tech) |
| Queues the partner's technique tech, to run as its command. | |
| void | FIGHTSTG_queueAutoRecoverEnd (u8 side) |
| Queues the end of side's automatic recovery (item 0xBD), or pushes back the one already queued. | |
| void | FIGHTSTG_startRestriction (s32 tech) |
| Restricts the partner with technique tech: sets FIGHTER_NO_SWITCH or FIGHTER_NO_DIGIVOLVE by the technique's effect, and queues the restriction's end (by its effectPower) or pushes back the one already queued. | |
| void | FIGHTSTG_queueDigidevolve (void) |
| Queues the partner's digidevolution, first. | |
| void | FIGHTSTG_startAction (u8 side, s32 tech) |
| the functions of FIGHTSTG_battle, FIGHTSTG_action and FIGHTSTG_battleFuncs | |
| void | FIGHTSTG_countFrames (void) |
| How many frames the battle moves on this frame by its speed mode: as many as went by, none, a quarter of them or twice as many. | |
| void | FIGHTSTG_setSpeed (s32 mode) |
| Sets the battle's speed mode and counts this frame again. | |
| s32 | FIGHTSTG_computeDamage (u8 side, s32 id) |
| A technique's power from the user's attack against the target's defense (an enemy's scaled by its unkA / 16), passed on to FIGHTSTG_adjustDamage. | |
| s32 | FIGHTSTG_computeMagicDamage (u8 side, s32 id) |
| A magic technique's damage: its power by the user's spirit against the target's (half to twice as much), the element boost and resistance, half again against the target's family, a critical hit and the target's damage cut; at most 5 times the power. | |
| s32 | FIGHTSTG_getDamage (s32 *args) |
| getDamage: the damage of an event (args: the side, the fighter and the base damage) to the fighter if it is its side's active one, less a tenth of its resist[1] and resist[RESIST_POISON], as a part of its max HP: at least 1, at most half the max HP. | |
| s32 | FIGHTSTG_computeCounterDamage (u8 side, s32 id, s32 value) |
| The damage of a counterattack on value: the partner's first skill deals it as one hit (the triple hit set aside), another technique its power in 64ths of value (32nds when the fighter is special) | |
| s32 | FIGHTSTG_computeHeal (u8 side, s32 id) |
| The HP a healing technique restores: 64 times its power, and an eighth of it per point of the user's wisdom. | |
| s32 | FIGHTSTG_getHeal (u8 side, s32 index, s32 big) |
| The HP a fighter regains: 8 to 16 128ths of its max HP when big, 4 to 8 otherwise. | |
| s32 | FIGHTSTG_rollHit (u8 side, s32 id) |
| Whether a physical hit lands: the technique's accuracy with the speed and level differences and the accuracy and evasion accessories (the critical accessory costs the player some); the enemy hits at least 1 in 4, the player in BATTLE_KIND_FINAL_LAST 2 in 3. | |
| s32 | FIGHTSTG_rollMagicHit (u8 side, s32 id) |
| Whether a magic hit lands: the technique's accuracy with the wisdom and level differences; the player in BATTLE_KIND_FINAL_LAST hits 2 in 3. | |
| s32 | FIGHTSTG_rollPoison (u8 side, s32 id) |
| The poison a hit inflicts, or 0: the technique's or the accessory's chance and an eighth of the user's wisdom, less the target's resistances and wisdom (BATTLE_BLOCK_POISON keeps the player from it) | |
| s32 | FIGHTSTG_rollParalysis (u8 side, s32 id) |
| Whether a hit paralyzes, like rollPoison (BATTLE_BLOCK_PARALYSIS keeps the player from it) | |
| s32 | FIGHTSTG_rollConfusion (u8 side, s32 id) |
| Whether a hit confuses, like rollPoison (BATTLE_BLOCK_CONFUSION keeps the player from it) | |
| s32 | FIGHTSTG_rollSleep (u8 side, s32 id) |
| Whether a hit puts the target to sleep, like rollPoison with the technique's chance (BATTLE_BLOCK_SLEEP keeps the player from it) | |
| s32 | FIGHTSTG_rollKnockOut (u8 side, s32 id) |
| Whether a hit knocks the target out, like rollPoison (BATTLE_BLOCK_KNOCK_OUT keeps the player from it) | |
| s32 | FIGHTSTG_rollSteal (u8 side, s32 id) |
| Whether the player steals the enemy's item: its itemChance in 1024 by the speed ratio (at most twice) and the technique's and the accessory's chance. | |
| s32 | FIGHTSTG_rollDrain (u8 side, s32 id) |
| Whether a hit drains HP: the technique's chance, or the accessory's for a technique without an effect. | |
| s32 | FIGHTSTG_rollDedigivolve (s32 actor, s32 id) |
| Whether a technique turns the player's fighter back: never when it is one of the partners' own Digimon (DIGIMON_DATA's first PARTNER_COUNT, as initNewGameData reads them), otherwise the technique's chance. | |
| s32 | FIGHTSTG_rollStatusRaise (s32 actor, s32 id) |
| Whether a status raise works: the technique's chance and an eighth of what the enemy's wisdom has over the partner's. | |
| s32 | FIGHTSTG_rollNoSwitch (s32 actor, s32 id) |
| Whether TECH_EFFECT_NO_SWITCH works: the technique's chance. | |
| s32 | FIGHTSTG_rollNoDigivolve (s32 actor, s32 id) |
| Whether TECH_EFFECT_NO_DIGIVOLVE works: the technique's chance. | |
| s32 | FIGHTSTG_testRunAway (u8 side) |
| FIGHTSTG_battleFuncs.testRunAway: a random test for side running away, from both sides' stats; the player can't while BATTLE_BLOCK_RUN_AWAY is set, and in the European version neither can the enemy while its fighter is asleep. | |
| s32 | FIGHTSTG_rollCounter (s32 side, s32 damage) |
| FIGHTSTG_battleFuncs.rollCounter: a random test, likelier the bigger damage is next to the player's fighter's max HP; side is not used. | |
| s32 | FIGHTSTG_testWakeUp (u8 side, s32 value) |
| FIGHTSTG_battleFuncs.testWakeUp: whether a hit of value wakes side's fighter up, likelier the bigger value is next to the fighter's defense, less likely the stronger its sleep and the later its end (EVENT_STATUS_END. | |
| s32 | FIGHTSTG_testConfusion (u8 side) |
| FIGHTSTG_battleFuncs.testConfusion: a random test of side's confusion against its resists 9 and 3. | |
| s32 | FIGHTSTG_testParalysis (u8 side) |
| FIGHTSTG_battleFuncs.testParalysis: whether side's paralysis costs it the turn, a random test of its strength against resists 8 and 4 (at least a chance of 32 in 128) | |
| void | FIGHTSTG_changeBoost (u8 side, s32 index, s32 stat, s32 percent) |
| Changes a fighter's stat boost by percent 128ths of the stat without it, between minus half the stat and the stat; nothing for an empty or knocked-out fighter. | |
| s32 | FIGHTSTG_getGaugeGain (s32 damage) |
| What the partner's damage adds to the gauge: the square of its percent of the max HP over 20, more with accessories 0x149 and 0x14A, at most 1000. | |
| s32 | FIGHTSTG_getTechCost (u8 side, s32 id) |
| A technique's MP cost; accessories 0x143 and 0x144 cut the player's, to no less than 1. | |
| static BattleFighter * | FIGHTSTG_getActiveFighter (s32 row) |
| Row's active fighter (FIGHTSTG_battle.state.fighters[row][active[row]]), as the row's offset in bytes added to the slot's fighter in row 0. | |
Variables | |
| EventDelay | FIGHTSTG_eventDelays [] |
| the delay ranges of FIGHTSTG_getEventDelay's kinds | |
| Battle | FIGHTSTG_battle |
| Shared between the overlay's objects. | |
| BattleAction | FIGHTSTG_action |
| the command being carried out | |
| BattleFuncs | FIGHTSTG_battleFuncs |
| the battle's stats and the functions that compute with them | |
| s16 | FIGHTSTG_boostStats [] |
| the stat of BattleStats.stats that each of BattleFighter.boosts adds to | |
| EventQueue | FIGHTSTG_events |
| the battle's events and their functions | |
| u8 | FIGHTSTG_statusEvents [] |
| FIGHTSTG_cureStatus's event types. | |
| u8 | FIGHTSTG_statusFlags [] |
| and the status flags they clear | |
| BattleEvent | FIGHTSTG_newEvent |
| what FIGHTSTG_pushEvent is given | |
| BattleTableEntry *(* | FIGHTSTG_battleTableFunc )(s32 id) |
| how the fight stage and WFIGHTMN read the battle table | |
| s32 | FIGHTSTG_opposedElements [] |
| the element whose boost (FIGHTSTG_getElementBoost) weakens each one | |
| s32 | FIGHTSTG_eventPopModes [] |
| per event type, FIGHTSTG_popEvent takes (1), peeks at (-1) or skips (0) it | |
| s32 | FIGHTSTG_boostEvents [] |
| FIGHTSTG_queueBoostEnd's event types. | |
| s32 | FIGHTSTG_techEvents [] |
| and of FIGHTSTG_startRestriction | |
FIGHTSTG's battle state: the battle table, stats, elements and resistances, the fighters, the events queue, the action and its effects, the rolls and the damage (battle.c, battle_table.c, stats.c, damage.c, rolls.c, boosts.c, events.c, speed.c, tech_effects.c, enemy_turn.c and start.c).
Definition in file battle.h.
| #define FILE_BATTLE_TABLE 0x1CF |
| #define BATTLE_STAT_ATTACK 0 |
BattleStats.stats' indices: the partner's first five battle stats.
physical damage
| #define BATTLE_STAT_WISDOM 3 |
| #define BATTLE_STAT_SPEED 4 |
| #define ELEMENT_FIRST 2 |
The elements (TechData.element, BattleStats.element) and the families (TechData.family, BattleStats.family) start at 2: under it, none.
| #define TECH_PHYSICAL 2 |
TechData.icon's kinds of attack.
FIGHTSTG_rollHit and FIGHTSTG_computeDamage
| #define TECH_MAGIC 3 |
| #define RESIST_POISON 7 |
BattleStats.resist's indices: against the elements (element - ELEMENT_FIRST), then against the statuses.
| #define BATTLE_TABLE_FALLBACK 3 |
BattleTableEntry.actions' last one, which the enemy takes when none of the others' conditions holds: its own is never tested.
| #define EVENT_END_BATTLE 1 |
| #define EVENT_PARTNER_TECH 8 |
| #define EVENT_STATUS_DAMAGE 9 |
| #define EVENT_STATUS_END 10 |
| #define EVENT_BOOST_END 13 |
| #define EVENT_RESTRICTION_END 16 |
| #define EVENT_BLAST 18 |
| #define EVENT_SPECIAL_END 21 |
| #define EVENT_LAST_ENEMY 23 |
| #define EVENT_WEAKNESS_END 24 |
| #define BATTLE_KIND_NORMAL 0 |
| #define BATTLE_KIND_ESCAPE 1 |
| #define BATTLE_KIND_UNK2 2 |
| #define BATTLE_KIND_NO_DAMAGE 3 |
| #define BATTLE_KIND_FINAL 4 |
| #define BATTLE_KIND_FINAL_LAST 6 |
| #define BATTLE_FLED 0 |
| #define SIDE_PLAYER 0 |
| #define FIGHTER_POISONED 1 |
BattleFighter.flags: the statuses, which the techniques give (FIGHTSTG_inflict*) and events of type EVENT_STATUS_END + n end.
takes damage (EVENT_STATUS_DAMAGE)
| #define FIGHTER_PARALYZED 2 |
| #define FIGHTER_ASLEEP 8 |
| #define FIGHTER_NO_SWITCH 0x10 |
| #define FIGHTER_NO_DIGIVOLVE 0x20 |
| #define TECH_EFFECT_FIRST 2 |
A technique's effect (TechData.effect), which FIGHTSTG_applyTechEffect carries out when its hit lands, and BattleAction.effects' index.
under it, the technique has none
| #define TECH_EFFECT_ENEMY_ONLY 10 |
| #define TECH_EFFECT_CRITICAL 11 |
| #define TECH_EFFECT_NO_SWITCH 13 |
| #define TECH_EFFECT_NO_DIGIVOLVE 14 |
| #define TECH_EFFECT_DRAIN_MP 29 |
| #define TECH_EFFECT_DOUBLE_MAGIC 31 |
| #define TECH_EFFECT_RAISE_ONE_STATUS 32 |
PartnerStats.status: one at random.
| #define TECH_EFFECT_RAISE_EACH_STATUS 33 |
| #define TECH_EFFECT_END_BATTLE 35 |
| #define HIT_POISON 0 |
The statuses a weapon's hits can inflict (BattleStats.statuses)
| #define BATTLE_ACTION_STATE_SIZE ((u8 *)&FIGHTSTG_action.start - (u8 *)&FIGHTSTG_action) |
| #define ACTIVE_FIGHTER | ( | side | ) | (FIGHTSTG_battle.state.fighters[side] + FIGHTSTG_battle.state.active[side]) |
SIDE's active fighter as its row plus the index, which GCC adds with the row's address first.
The battle code reaches the active fighter in three ways that compile to different instructions: this one, &fighters[side][active[side]] (most of it) and FIGHTSTG_getActiveFighter's below; the match depends on which one each place uses.
| EnemyTurn * FIGHTSTG_startEnemyTurn | ( | void | ) |
WFIGHTMN passes them the battle, which they don't read; its code loads it, so no parameter list.
(void): unprototyped, as WFIGHTMN passes it &FIGHTSTG_battle
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().
| void FIGHTSTG_queuePlayerTurn | ( | s32 | delay | ) |
The events they queue for WFIGHTMN, and its turn's substate.
The events they queue for WFIGHTMN, and its turn's substate.
Definition at line 360 of file events.c.
Referenced by queueFirstTurns(), WFIGHTMN_runCommand(), WFIGHTMN_runConfusedCommand(), and WFIGHTMN_runTurn().
| void FIGHTSTG_queueEnemyTurn | ( | s32 | delay | ) |
Queues the enemy's turn (event 3) in delay.
Definition at line 368 of file events.c.
Referenced by announceEnemyTech(), FIGHTSTG_updateEnemyTurn(), FIGHTSTG_updateOneHpTurn(), queueFirstTurns(), and WFIGHTMN_runTurn().
| void FIGHTSTG_endBattle | ( | s32 | result | ) |
Ends the battle: queues event 1 ahead of the others, with how it ended (BATTLE_FLED, BATTLE_WON or BATTLE_LOST) for WFIGHTMN.
< FIGHTSTG_endBattle
Definition at line 377 of file events.c.
Referenced by applyStatusEvent(), endBattleOnKnockOut(), fleeWhenWeak(), and WFIGHTMN_runAway().
| void FIGHTSTG_queueRunAway | ( | u8 | side | ) |
Queues side's attempt to run away (event 4)
Definition at line 386 of file events.c.
Referenced by FIGHTSTG_updateEnemyTurn(), and WFIGHTMN_runCommand().
Queues a fighter's recovery of HP (event 6, with what getHeal takes as big), or sets the one already queued to 0xBD.
Definition at line 417 of file events.c.
Referenced by useItemTech(), and WFIGHTMN_checkEquip().
| void FIGHTSTG_queueKnockOut | ( | u8 | side | ) |
Queues the fall of side's active fighter (event 20), first.
Definition at line 107 of file battle.c.
Referenced by damageEnemy(), dealTechDamage(), drainEnemy(), FIGHTSTG_updateEnemyAttack(), showCounterResult(), showFirstTechResult(), showOtherAttackResult(), takeFirstTechDamage(), and WFIGHTMN_takeDamage().
| void FIGHTSTG_queueBlast | ( | void | ) |
Queues the partner's digivolution for the battle (event 18), now.
< the partner's digivolution for the battle
Definition at line 90 of file battle.c.
Referenced by WFIGHTMN_chargeGauge().
| void FIGHTSTG_queueBlastEnd | ( | s32 | kind | ) |
Queues the end of the partner's digivolution for the battle (event 19), after delay kind + 3.
Definition at line 98 of file battle.c.
Referenced by WFIGHTMN_blast().
| void FIGHTSTG_queueSpecialEnd | ( | void | ) |
Queues the end of the partner's special state (event 21): the USA version pushes back the one already queued.
< the end of the partner's special state
Definition at line 117 of file battle.c.
Referenced by announceKnockOut(), startSpecial(), and WFIGHTMN_tag().
| void FIGHTSTG_weakenEnemy | ( | void | ) |
Weakens the enemy in BATTLE_KIND_FINAL_LAST: halves its boosts of stats 1 and 2 and queues the end (event 24) in 3000.
< the end of the enemy's weakness (BATTLE_KIND_FINAL_LAST)
Definition at line 160 of file battle.c.
Referenced by WFIGHTMN_countHit().
| void FIGHTSTG_endEnemyWeakness | ( | void | ) |
Ends the enemy's weakness now: its queued event 24 runs next.
< the end of the enemy's weakness (BATTLE_KIND_FINAL_LAST)
Definition at line 173 of file battle.c.
Referenced by FIGHTSTG_updateEnemyAttack(), and WFIGHTMN_endWeakness().
| void FIGHTSTG_pushEvent | ( | BattleEvent * | event | ) |
FIGHTSTG_events.funcs.push: queues an event in the first free one of the 99 slots, due after its delay.
Definition at line 11 of file events.c.
Referenced by FIGHTSTG_inflictConfusion(), FIGHTSTG_inflictParalysis(), FIGHTSTG_inflictPoison(), FIGHTSTG_inflictSleep(), FIGHTSTG_pushEventFirst(), FIGHTSTG_queueAutoRecoverEnd(), FIGHTSTG_queueBlast(), FIGHTSTG_queueBlastEnd(), FIGHTSTG_queueBoostEnd(), FIGHTSTG_queueClearField(), FIGHTSTG_queueEnemyTurn(), FIGHTSTG_queuePartnerTech(), FIGHTSTG_queuePlayerTurn(), FIGHTSTG_queueRecovery(), FIGHTSTG_queueRunAway(), FIGHTSTG_queueSpecialEnd(), FIGHTSTG_startRestriction(), and FIGHTSTG_weakenEnemy().
| void FIGHTSTG_pushEventFirst | ( | BattleEvent * | event | ) |
FIGHTSTG_events.funcs.pushFirst: queues an event ahead of all the others, which wait its delay longer (at least 1, 2 in the European version)
Definition at line 54 of file events.c.
Referenced by FIGHTSTG_endBattle(), FIGHTSTG_queueDigidevolve(), FIGHTSTG_queueKnockOut(), FIGHTSTG_queueLastEnemy(), and FIGHTSTG_queueSpecialEnd().
| s32 FIGHTSTG_popEvent | ( | void | ) |
The first queued event from slot start of the type being looked for (FIGHTSTG_events.findType, 1-24), or -1.
Definition at line 159 of file events.c.
Referenced by FIGHTSTG_findEvent(), FIGHTSTG_findFirstEvent(), FIGHTSTG_findNextEvent(), and FIGHTSTG_queueClearField().
| s32 FIGHTSTG_findNextEvent | ( | void | ) |
FIGHTSTG_events.funcs.find: the first queued event of type for side's fighter, or -1.
Definition at line 187 of file events.c.
Referenced by FIGHTSTG_inflictConfusion(), FIGHTSTG_inflictParalysis(), FIGHTSTG_inflictPoison(), FIGHTSTG_inflictSleep(), FIGHTSTG_queueAutoRecoverEnd(), FIGHTSTG_queueBoostEnd(), FIGHTSTG_queueRecovery(), FIGHTSTG_queueSpecialEnd(), and FIGHTSTG_startRestriction().
| void FIGHTSTG_removeEvents | ( | EventKey * | key | ) |
The mode's root task: loads WFIGHTTS (the battle test, with the mode's argument) or WFIGHTMN and starts it, then runs the battle's update.
Definition at line 7 of file start.c.
Referenced by FIGHTSTG_start().
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().
| 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().
| void FIGHTSTG_queueLastEnemy | ( | void | ) |
Queues the coming in of the last battle's third enemy, first.
< the last battle's third enemy comes in
Definition at line 152 of file battle.c.
Referenced by FIGHTSTG_updateOneHpTurn().
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().
FIGHTSTG_events.funcs.getDelay: the time until side's next event of kind (FIGHTSTG_eventDelays): random, or from the active fighters' stats and the other side's resistances, within the kind's range.
< magic damage, and against it
< magic damage, and against it
< magic damage, and against it
< magic damage, and against it
< magic damage, and against it
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
Definition at line 224 of file events.c.
Referenced by FIGHTSTG_inflictConfusion(), FIGHTSTG_inflictParalysis(), FIGHTSTG_inflictSleep(), FIGHTSTG_queueAutoRecoverEnd(), FIGHTSTG_queueBlastEnd(), FIGHTSTG_queueBoostEnd(), FIGHTSTG_queueRunAway(), and FIGHTSTG_queueSpecialEnd().
| void FIGHTSTG_tryPoison | ( | void | ) |
TECH_EFFECT_POISON: poisons the target when rollPoison lets it, twice as strongly when the acting fighter is special.
Definition at line 7 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect(), and FIGHTSTG_startAction().
| void FIGHTSTG_tryParalysis | ( | void | ) |
TECH_EFFECT_PARALYSIS: paralyzes the target when rollParalysis lets it, with the technique's effectPower or the accessory's, twice as strongly when the acting fighter is special.
< under it, the technique has none
Definition at line 23 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect(), and FIGHTSTG_startAction().
| void FIGHTSTG_tryConfusion | ( | void | ) |
TECH_EFFECT_CONFUSION: confuses the target when rollConfusion lets it, with the technique's effectPower or the accessory's, twice as strongly when the acting fighter is special.
< under it, the technique has none
Definition at line 48 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect(), and FIGHTSTG_startAction().
| void FIGHTSTG_trySleep | ( | void | ) |
TECH_EFFECT_SLEEP: puts the target to sleep when rollSleep lets it, twice as strongly when the acting fighter is special.
Definition at line 72 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_tryKnockOut | ( | void | ) |
TECH_EFFECT_KNOCK_OUT: knocks the target out when rollKnockOut lets it.
Definition at line 89 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect(), and FIGHTSTG_startAction().
| void FIGHTSTG_rollMultiHit | ( | void | ) |
TECH_EFFECT_MULTI_HIT and the triple-hit accessory: rolls the other hits, 3 or the technique's hitCount in all; in BATTLE_KIND_FINAL_LAST the player's missed first hit makes them all miss.
< under it, the technique has none
< its third enemy; winning plays the ending
Definition at line 100 of file tech_effects.c.
Referenced by FIGHTSTG_startAction().
| void FIGHTSTG_tryDrain | ( | void | ) |
When rollDrain allows it, the action's drain becomes its damage times a 128th of the technique's effectPower (effect 8) or the player's HIT_DRAIN power, doubled when the acting fighter is special.
The match depends on each branch doubling and scaling its own value.
< HP, in 128ths of the damage
< its power is in 128ths of the damage
< HP, in 128ths of the damage
Definition at line 142 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect(), and FIGHTSTG_startAction().
| void FIGHTSTG_markEnemyOnly | ( | void | ) |
TECH_EFFECT_ENEMY_ONLY outside its own enemy's hands: marks the effect, which takes the place of the hit.
Definition at line 179 of file tech_effects.c.
Referenced by FIGHTSTG_startAction().
| void FIGHTSTG_markCritical | ( | void | ) |
TECH_EFFECT_CRITICAL: marks the effect, which rollCritical has used.
Definition at line 184 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_lowerAttack | ( | void | ) |
TECH_EFFECT_LOWER_ATTACK: lowers the attack of the other side's active fighter by the technique's effectPower in 128ths and starts its event (not when side 0 acts with BATTLE_BLOCK_LOWER_ATTACK set).
The match depends on team being a u8.
< to 10: attack, defense, speed (a technique's boost stat + 8)
Definition at line 211 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_lowerDefense | ( | void | ) |
TECH_EFFECT_LOWER_DEFENSE: lowers the defense of the other side's active fighter by the technique's effectPower in 128ths and starts its event.
Definition at line 226 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_drainMp | ( | void | ) |
TECH_EFFECT_DRAIN_MP: takes the technique's effectPower in 128ths of the player's fighter's max MP, at most what it has, as the action's drain.
Definition at line 237 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_raiseOneStatus | ( | void | ) |
TECH_EFFECT_RAISE_ONE_STATUS: when rollStatusRaise lets it, raises one of the partner's status values at random by the technique's effectPower.
Definition at line 252 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_raiseEachStatus | ( | void | ) |
TECH_EFFECT_RAISE_EACH_STATUS: raises each of the partner's status values that rollStatusRaise lets by the technique's effectPower.
Definition at line 267 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_raiseAllStatus | ( | void | ) |
TECH_EFFECT_RAISE_ALL_STATUS: when rollStatusRaise lets it, raises all of the partner's status values by the technique's effectPower.
Definition at line 282 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_tryNoSwitch | ( | void | ) |
TECH_EFFECT_NO_SWITCH: marks the effect when rollNoSwitch lets it.
Definition at line 297 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
| void FIGHTSTG_startDoubleMagic | ( | void | ) |
Starts a TECH_EFFECT_DOUBLE_MAGIC technique: two magic hits, each with the damage of technique 0x1B9 or 0x1BA.
Definition at line 308 of file tech_effects.c.
Referenced by FIGHTSTG_startAction().
| void FIGHTSTG_startEndBattle | ( | void | ) |
Starts a TECH_EFFECT_END_BATTLE technique: in BATTLE_KIND_UNK2 its effect, elsewhere a plain physical hit.
< the enemy keeps an eleventh of its HP
Definition at line 334 of file tech_effects.c.
Referenced by FIGHTSTG_startAction().
| void FIGHTSTG_applyTechEffect | ( | void | ) |
Carries out the effect of a technique whose hit landed.
< HP, in 128ths of the damage
< the enemy's item
< raises the critical hit chance
< the partner's, in 128ths of its max MP
< PartnerStats.status: one at random
< each one that a roll lets
< FIGHTER_NO_SWITCH for a while
Definition at line 348 of file tech_effects.c.
Referenced by FIGHTSTG_startAction().
| void FIGHTSTG_trySteal | ( | void | ) |
TECH_EFFECT_STEAL: when the enemy's active fighter holds an item and rollSteal lets the player take it, marks the effect and loads the item names.
The match depends on funcs being a const pointer: the front end puts its value in the call, so only the %hi of its own initialization is left for CSE to share with the call's address.
< ITMNAM
Definition at line 193 of file tech_effects.c.
Referenced by FIGHTSTG_applyTechEffect().
Queues the end of a fighter's boost of stat kind, 12 frames on when a technique (tech) gave it and 8 when an item did (tech 0), or pushes back the one already queued.
Definition at line 565 of file events.c.
Referenced by boostAttack(), boostDefense(), boostFighterStat(), boostSideStat(), boostSpeed(), FIGHTSTG_lowerAttack(), FIGHTSTG_lowerDefense(), FIGHTSTG_reviveFighter(), lowerEnemySpeed(), restoreSide(), showLoweredStat(), and weakenEnemyDefense().
Enemy Digimon id's index in the battle table (FILE_BATTLE_TABLE: each enemy's stats, techniques and actions), or -1.
Definition at line 7 of file battle_table.c.
Referenced by FIGHTSTG_getBattleTableEntry().
| BattleTableEntry * FIGHTSTG_getBattleTableEntry | ( | s32 | id | ) |
Enemy Digimon id's entry in the battle table, or NULL.
Definition at line 20 of file battle_table.c.
| BattleStats * FIGHTSTG_computeStats | ( | u8 | side, |
| s32 | which, | ||
| s32 | index | ||
| ) |
Works out a side's stats into its BattleStats: the partner's totals with the fighter's boosts, its resistances and what its equipment and accessories add, or the enemy's (computeEnemyStats).
The match depends on one s16 pointer walking the totals, the accessories and the equipment alike: its extra sets give it the references that put it before found in the global allocator.
< its power is read by nothing
< its power is read by nothing
< its power is in 128ths of the damage
< its power is in 128ths of the damage
Definition at line 42 of file stats.c.
Referenced by FIGHTSTG_changeBoost(), FIGHTSTG_computeCounterDamage(), FIGHTSTG_computeDamage(), FIGHTSTG_computeHeal(), FIGHTSTG_computeMagicDamage(), FIGHTSTG_getDamage(), FIGHTSTG_rollCritical(), FIGHTSTG_rollDrain(), FIGHTSTG_rollHit(), FIGHTSTG_rollMagicCritical(), FIGHTSTG_rollMagicHit(), FIGHTSTG_rollPoison(), FIGHTSTG_rollSleep(), FIGHTSTG_rollStatusRaise(), FIGHTSTG_rollSteal(), FIGHTSTG_testConfusion(), FIGHTSTG_testParalysis(), FIGHTSTG_testRunAway(), FIGHTSTG_testWakeUp(), and rollStatus().
What the battle's element boost adds to value for a technique of the given element: the boost's amount in 128ths of value for the boosted element, half as much taken off for the element it weakens, nothing otherwise.
Definition at line 16 of file damage.c.
Referenced by FIGHTSTG_adjustDamage(), and FIGHTSTG_computeMagicDamage().
A hit's damage from its base value: the element boost, half again against the target's family, the user's damage bonus, the element against the target's resistance, the triple hit's 0.4, a critical hit and the target's damage cut; at most 5 times value.
< under it, the technique has none
Definition at line 35 of file damage.c.
Referenced by FIGHTSTG_computeCounterDamage(), and FIGHTSTG_computeDamage().
Whether a physical hit is critical: a chance of 4 in 128 with the technique's critical boost or the accessory's, more against the target's family and while the target is paralyzed, asleep or confused.
< under it, the technique has none
< raises the critical hit chance
< loses turns at random (FIGHTSTG_battleFuncs.testParalysis)
< can't act or run away; a hit may wake it up
Definition at line 9 of file rolls.c.
Referenced by FIGHTSTG_adjustDamage().
Whether a magic hit is critical: a chance from the technique's element power against the target's resistance, more against the target's family and while the target is paralyzed, asleep or confused.
< loses turns at random (FIGHTSTG_battleFuncs.testParalysis)
< can't act or run away; a hit may wake it up
Definition at line 72 of file rolls.c.
Referenced by FIGHTSTG_computeMagicDamage().
| void FIGHTSTG_queueClearField | ( | s32 | time | ) |
events.c's statuses and events
events.c's statuses and events
Definition at line 436 of file events.c.
Referenced by boostElement(), boostFieldElement(), and boostRandomElement().
Confuses side's active fighter (FIGHTER_CONFUSED) with a strength, and queues its end (put off by the strength when a technique, fromTech, causes it) or pushes back the one already queued.
< 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
< 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
Definition at line 506 of file events.c.
Referenced by applyStatusEvent(), and confuseFighters().
Poisons a fighter (FIGHTER_POISONED), and queues its damage or updates the one already queued.
< the damage of a poisoned fighter (FIGHTER_POISONED)
< the damage of a poisoned fighter (FIGHTER_POISONED)
< takes damage (EVENT_STATUS_DAMAGE)
Definition at line 456 of file events.c.
Referenced by applyStatusEvent().
Paralyzes side's active fighter (FIGHTER_PARALYZED) with a strength, and queues its end, which the strength puts off, or pushes back the one already queued.
< 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
< 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
< loses turns at random (FIGHTSTG_battleFuncs.testParalysis)
Definition at line 481 of file events.c.
Referenced by applyStatusEvent().
Puts side's active fighter to sleep (FIGHTER_ASLEEP) with a strength, and queues its end, which the strength puts off, or pushes back the one already queued.
< 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
< 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
< can't act or run away; a hit may wake it up
Definition at line 535 of file events.c.
Referenced by applyStatusEvent(), and FIGHTSTG_updateActionEvents().
| void FIGHTSTG_queuePartnerTech | ( | s32 | tech | ) |
Queues the partner's technique tech, to run as its command.
< a technique of the partner's, run as its command
Definition at line 80 of file battle.c.
Referenced by dealTechDamage().
| void FIGHTSTG_queueAutoRecoverEnd | ( | u8 | side | ) |
Queues the end of side's automatic recovery (item 0xBD), or pushes back the one already queued.
Definition at line 396 of file events.c.
Referenced by useItemTech().
| void FIGHTSTG_startRestriction | ( | s32 | tech | ) |
Restricts the partner with technique tech: sets FIGHTER_NO_SWITCH or FIGHTER_NO_DIGIVOLVE by the technique's effect, and queues the restriction's end (by its effectPower) or pushes back the one already queued.
< FIGHTER_NO_SWITCH for a while
< FIGHTER_NO_DIGIVOLVE for a while
< can't switch out or run away (TECH_EFFECT_NO_SWITCH)
< can't digivolve or use a switch-in technique (TECH_EFFECT_NO_DIGIVOLVE)
Definition at line 43 of file battle.c.
Referenced by applyStatusEvent(), and useSupportTech().
| void FIGHTSTG_queueDigidevolve | ( | void | ) |
Queues the partner's digidevolution, first.
Definition at line 143 of file battle.c.
Referenced by useSupportTech().
the functions of FIGHTSTG_battle, FIGHTSTG_action and FIGHTSTG_battleFuncs
the functions of FIGHTSTG_battle, FIGHTSTG_action and FIGHTSTG_battleFuncs
< two magic hits, as techniques 0x1B9 and 0x1BA
< in BATTLE_KIND_UNK2: takes 70 percent of the partner's HP, ends as BATTLE_FLED
< does nothing but for the enemy whose battle table entry lists it first
< FIGHTSTG_rollHit and FIGHTSTG_computeDamage
< under it, the technique has none
< its power is read by nothing
< its power is in 128ths of the damage
< under it, the technique has none
< FIGHTSTG_rollMagicHit and FIGHTSTG_computeMagicDamage
< under it, the technique has none
Definition at line 404 of file tech_effects.c.
| void FIGHTSTG_countFrames | ( | void | ) |
How many frames the battle moves on this frame by its speed mode: as many as went by, none, a quarter of them or twice as many.
Definition at line 7 of file speed.c.
Referenced by FIGHTSTG_setSpeed().
| void FIGHTSTG_setSpeed | ( | s32 | mode | ) |
A technique's power from the user's attack against the target's defense (an enemy's scaled by its unkA / 16), passed on to FIGHTSTG_adjustDamage.
The match depends on the division in each branch.
< physical damage
< against it
< physical damage
< against it
Definition at line 89 of file damage.c.
A magic technique's damage: its power by the user's spirit against the target's (half to twice as much), the element boost and resistance, half again against the target's family, a critical hit and the target's damage cut; at most 5 times the power.
< magic damage, and against it
< magic damage, and against it
Definition at line 122 of file damage.c.
getDamage: the damage of an event (args: the side, the fighter and the base damage) to the fighter if it is its side's active one, less a tenth of its resist[1] and resist[RESIST_POISON], as a part of its max HP: at least 1, at most half the max HP.
The match depends on the fighter pointer.
Definition at line 196 of file damage.c.
Whether a physical hit lands: the technique's accuracy with the speed and level differences and the accuracy and evasion accessories (the critical accessory costs the player some); the enemy hits at least 1 in 4, the player in BATTLE_KIND_FINAL_LAST 2 in 3.
< its third enemy; winning plays the ending
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
< under it, the technique has none
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
Definition at line 123 of file rolls.c.
Whether a magic hit lands: the technique's accuracy with the wisdom and level differences; the player in BATTLE_KIND_FINAL_LAST hits 2 in 3.
< its third enemy; winning plays the ending
< magic accuracy, statuses and heals
< magic accuracy, statuses and heals
Definition at line 165 of file rolls.c.
The poison a hit inflicts, or 0: the technique's or the accessory's chance and an eighth of the user's wisdom, less the target's resistances and wisdom (BATTLE_BLOCK_POISON keeps the player from it)
< under it, the technique has none
< magic accuracy, statuses and heals
< magic accuracy, statuses and heals
< magic accuracy, statuses and heals
Definition at line 195 of file rolls.c.
Whether the player steals the enemy's item: its itemChance in 1024 by the speed ratio (at most twice) and the technique's and the accessory's chance.
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
Definition at line 325 of file rolls.c.
FIGHTSTG_battleFuncs.testRunAway: a random test for side running away, from both sides' stats; the player can't while BATTLE_BLOCK_RUN_AWAY is set, and in the European version neither can the enemy while its fighter is asleep.
The match depends on the battle's runAttempts being read through a pointer to its state, taken before side is tested again, and on the flags being tested with family as a halfword.
< can't act or run away; a hit may wake it up
< can't switch out or run away (TECH_EFFECT_NO_SWITCH)
< loses turns at random (FIGHTSTG_battleFuncs.testParalysis)
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
< can't act or run away; a hit may wake it up
< loses turns at random (FIGHTSTG_battleFuncs.testParalysis)
< physical accuracy, evasion and running away
< physical accuracy, evasion and running away
Definition at line 451 of file rolls.c.
FIGHTSTG_battleFuncs.testWakeUp: whether a hit of value wakes side's fighter up, likelier the bigger value is next to the fighter's defense, less likely the stronger its sleep and the later its end (EVENT_STATUS_END.
< 10-12: the end of FIGHTER_PARALYZED, FIGHTER_CONFUSED or FIGHTER_ASLEEP
< against it
Definition at line 510 of file rolls.c.
|
inlinestatic |
Row's active fighter (FIGHTSTG_battle.state.fighters[row][active[row]]), as the row's offset in bytes added to the slot's fighter in row 0.
Definition at line 497 of file battle.h.
Referenced by announceFirstTech(), announceTech(), chargeUser(), dealTechDamage(), showFirstTechResult(), takeFirstTechDamage(), and wakeUpOrCounter().
|
extern |
the delay ranges of FIGHTSTG_getEventDelay's kinds
Definition at line 214 of file events.c.
Referenced by FIGHTSTG_getEventDelay().
|
extern |
Shared between the overlay's objects.
Shared between the overlay's objects.
Definition at line 16 of file battle.c.
Referenced by addFighters(), announceEnemyTech(), announceFirstTech(), announceKnockOut(), applyStatusEvent(), boostAttack(), boostDefense(), boostElement(), boostFieldElement(), boostFighterStat(), boostRandomElement(), boostSideStat(), boostSpeed(), bringSecondEnemy(), confirmSwitchIn(), confuseFighters(), cureStatus(), cureStatusTech(), damageEnemy(), damagePlayer(), drainEnemy(), drainMp(), drainMp(), endBattleOnKnockOut(), FIGHTSTG_changeBoost(), FIGHTSTG_computeCounterDamage(), FIGHTSTG_computeDamage(), FIGHTSTG_computeHeal(), FIGHTSTG_computeMagicDamage(), FIGHTSTG_computeStats(), FIGHTSTG_countFrames(), FIGHTSTG_createTechWindows(), FIGHTSTG_cureStatus(), FIGHTSTG_drainMp(), FIGHTSTG_drawHud(), FIGHTSTG_drawSpriteAnim(), FIGHTSTG_findFighters(), FIGHTSTG_getActiveFighter(), FIGHTSTG_getDamage(), FIGHTSTG_getElementBoost(), FIGHTSTG_getEnemyAction(), FIGHTSTG_getEventDelay(), FIGHTSTG_getGaugeGain(), FIGHTSTG_getHeal(), FIGHTSTG_getPairDigimon(), FIGHTSTG_getTechCost(), FIGHTSTG_inflictConfusion(), FIGHTSTG_inflictParalysis(), FIGHTSTG_inflictPoison(), FIGHTSTG_inflictSleep(), FIGHTSTG_lowerAttack(), FIGHTSTG_lowerDefense(), FIGHTSTG_pickEnemySwitch(), FIGHTSTG_queueAutoRecoverEnd(), FIGHTSTG_queueBlastEnd(), FIGHTSTG_queueDigidevolve(), FIGHTSTG_queueKnockOut(), FIGHTSTG_queuePartnerTech(), FIGHTSTG_queueRunAway(), FIGHTSTG_queueSpecialEnd(), FIGHTSTG_raiseAllStatus(), FIGHTSTG_raiseEachStatus(), FIGHTSTG_raiseOneStatus(), FIGHTSTG_reviveFighter(), FIGHTSTG_rollCounter(), FIGHTSTG_rollCritical(), FIGHTSTG_rollDedigivolve(), FIGHTSTG_rollDrain(), FIGHTSTG_rollHit(), FIGHTSTG_rollMagicCritical(), FIGHTSTG_rollMagicHit(), FIGHTSTG_rollMultiHit(), FIGHTSTG_rollPoison(), FIGHTSTG_rollSleep(), FIGHTSTG_rollStatusRaise(), FIGHTSTG_rollSteal(), FIGHTSTG_runItemScript(), FIGHTSTG_setConfusedName(), FIGHTSTG_setMessageName(), FIGHTSTG_setSpeed(), FIGHTSTG_showCommands(), FIGHTSTG_showDigivolveNames(), FIGHTSTG_showFighterNames(), FIGHTSTG_showFightersMessage(), FIGHTSTG_showMessage(), FIGHTSTG_showSwitchFighters(), FIGHTSTG_showSwitchInChoices(), FIGHTSTG_showTechPage(), FIGHTSTG_startAction(), FIGHTSTG_startEndBattle(), FIGHTSTG_startRestriction(), FIGHTSTG_stepMotion(), FIGHTSTG_testConfusion(), FIGHTSTG_testEnemyCondition(), FIGHTSTG_testParalysis(), FIGHTSTG_testRunAway(), FIGHTSTG_testWakeUp(), FIGHTSTG_tryConfusion(), FIGHTSTG_tryDrain(), FIGHTSTG_tryParalysis(), FIGHTSTG_tryPoison(), FIGHTSTG_trySleep(), FIGHTSTG_trySteal(), FIGHTSTG_updateActionEvents(), FIGHTSTG_updateBattleSound(), FIGHTSTG_updateCameraTurn(), FIGHTSTG_updateCommandMenu(), FIGHTSTG_updateCounterattack(), FIGHTSTG_updateDigivolveMenu(), FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateEnemyTurn(), FIGHTSTG_updateFace(), FIGHTSTG_updateFirstTech(), FIGHTSTG_updateHpTweens(), FIGHTSTG_updateHud(), FIGHTSTG_updateItem(), FIGHTSTG_updateJump(), FIGHTSTG_updateMove(), FIGHTSTG_updateOneHpTurn(), FIGHTSTG_updateRoot(), FIGHTSTG_updateSpriteAnim(), FIGHTSTG_updateSwitchMenu(), FIGHTSTG_updateTechAction(), FIGHTSTG_updateTechMenu(), FIGHTSTG_weakenEnemy(), fillGauge(), findPairTech(), fleeWhenWeak(), healEnemy(), healPartner(), healWithTech(), lowerEnemySpeed(), lowerEnemyStat(), playCounterTech(), queueFirstTurns(), restoreHalfHpMp(), restoreSide(), reviveParty(), reviveSide(), rollStatus(), runDigivolveMenu(), setBattleKind(), setUpDrain(), setUpItemTech(), showCounterResult(), showEnemyName(), showLoweredStat(), showOtherAttackResult(), showRunAway(), startTechScript(), stealEnemyItem(), switchConfusionMusic(), useEnemyTech(), useItemTech(), wakeCounteredUp(), wakePlayerUp(), wakeUpOrCounter(), weakenEnemyDefense(), WFIGHTMN_blast(), WFIGHTMN_bringLastEnemy(), WFIGHTMN_cancelBlast(), WFIGHTMN_chargeGauge(), WFIGHTMN_clearField(), WFIGHTMN_countHit(), WFIGHTMN_cureStatus(), WFIGHTMN_digidevolve(), WFIGHTMN_digivolve(), WFIGHTMN_endBattle(), WFIGHTMN_endBlast(), WFIGHTMN_endBoost(), WFIGHTMN_endRestriction(), WFIGHTMN_endSpecial(), WFIGHTMN_endWeakness(), WFIGHTMN_initFighters(), WFIGHTMN_knockOut(), WFIGHTMN_limitDamage(), WFIGHTMN_markFought(), WFIGHTMN_pairTech(), WFIGHTMN_recordTech(), WFIGHTMN_recover(), WFIGHTMN_restoreEnemy(), WFIGHTMN_runCommand(), WFIGHTMN_runTurn(), WFIGHTMN_setIdleMotion(), WFIGHTMN_start(), WFIGHTMN_startTech(), WFIGHTMN_tag(), WFIGHTMN_takeDamage(), and WFIGHTTS_battleTest().
|
extern |
the command being carried out
Definition at line 12 of file battle.c.
Referenced by announceFirstTech(), announceTech(), applyStatusEvent(), choosePartnerScript(), damagePlayer(), dealTechDamage(), drainHp(), drainMp(), FIGHTSTG_applyTechEffect(), FIGHTSTG_drainMp(), FIGHTSTG_lowerAttack(), FIGHTSTG_lowerDefense(), FIGHTSTG_raiseAllStatus(), FIGHTSTG_raiseEachStatus(), FIGHTSTG_raiseOneStatus(), FIGHTSTG_rollMultiHit(), FIGHTSTG_startAction(), FIGHTSTG_startDoubleMagic(), FIGHTSTG_startEndBattle(), FIGHTSTG_tryConfusion(), FIGHTSTG_tryDrain(), FIGHTSTG_tryKnockOut(), FIGHTSTG_tryNoSwitch(), FIGHTSTG_tryParalysis(), FIGHTSTG_tryPoison(), FIGHTSTG_trySleep(), FIGHTSTG_trySteal(), FIGHTSTG_updateActionEvents(), FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateFirstTech(), markTechEffect(), setTechIdleMotions(), showFirstTechResult(), showNextRaisedStatus(), showOtherAttackResult(), showRaisedStatus(), startTechScript(), and WFIGHTMN_startTech().
|
extern |
the battle's stats and the functions that compute with them
Definition at line 25 of file battle.c.
Referenced by boostAttack(), boostDefense(), boostFieldElement(), boostFighterStat(), boostSideStat(), boostSpeed(), FIGHTSTG_adjustDamage(), FIGHTSTG_computeCounterDamage(), FIGHTSTG_computeDamage(), FIGHTSTG_computeHeal(), FIGHTSTG_computeMagicDamage(), FIGHTSTG_computeStats(), FIGHTSTG_getDamage(), FIGHTSTG_getEventDelay(), FIGHTSTG_lowerAttack(), FIGHTSTG_lowerDefense(), FIGHTSTG_raiseAllStatus(), FIGHTSTG_raiseEachStatus(), FIGHTSTG_raiseOneStatus(), FIGHTSTG_reviveFighter(), FIGHTSTG_rollCritical(), FIGHTSTG_rollDrain(), FIGHTSTG_rollHit(), FIGHTSTG_rollMagicCritical(), FIGHTSTG_rollMagicHit(), FIGHTSTG_rollMultiHit(), FIGHTSTG_rollPoison(), FIGHTSTG_rollSleep(), FIGHTSTG_rollStatusRaise(), FIGHTSTG_rollSteal(), FIGHTSTG_showTechPage(), FIGHTSTG_startAction(), FIGHTSTG_startDoubleMagic(), FIGHTSTG_startEndBattle(), FIGHTSTG_testConfusion(), FIGHTSTG_testParalysis(), FIGHTSTG_testRunAway(), FIGHTSTG_testWakeUp(), FIGHTSTG_tryConfusion(), FIGHTSTG_tryDrain(), FIGHTSTG_tryKnockOut(), FIGHTSTG_tryNoSwitch(), FIGHTSTG_tryParalysis(), FIGHTSTG_tryPoison(), FIGHTSTG_trySleep(), FIGHTSTG_trySteal(), FIGHTSTG_updateConfusedMenu(), FIGHTSTG_updateCounterattack(), FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateEnemyTurn(), FIGHTSTG_updateFirstTech(), FIGHTSTG_updateTechMenu(), getHealDamage(), healEnemy(), healWithTech(), lowerEnemySpeed(), lowerEnemyStat(), playCounterTech(), queueFirstTurns(), rollStatus(), setUpItemTech(), useSupportTech(), wakeUpOrCounter(), weakenEnemyDefense(), WFIGHTMN_chargeGauge(), WFIGHTMN_recover(), WFIGHTMN_runAway(), WFIGHTMN_runCommand(), WFIGHTMN_startTech(), and WFIGHTMN_takeDamage().
|
extern |
the stat of BattleStats.stats that each of BattleFighter.boosts adds to
Definition at line 7 of file boosts.c.
Referenced by FIGHTSTG_changeBoost().
|
extern |
the battle's events and their functions
Definition at line 43 of file events.c.
Referenced by announceEnemyTech(), announceKnockOut(), boostElement(), boostRandomElement(), bringSecondEnemy(), cureStatus(), cureStatusTech(), FIGHTSTG_cureStatus(), FIGHTSTG_endBattle(), FIGHTSTG_endEnemyWeakness(), FIGHTSTG_findEvent(), FIGHTSTG_findEventFrom(), FIGHTSTG_findFirstEvent(), FIGHTSTG_findNextEvent(), FIGHTSTG_getEventDelay(), FIGHTSTG_inflictConfusion(), FIGHTSTG_inflictParalysis(), FIGHTSTG_inflictPoison(), FIGHTSTG_inflictSleep(), FIGHTSTG_popEvent(), FIGHTSTG_pushEvent(), FIGHTSTG_pushEventFirst(), FIGHTSTG_queueAutoRecoverEnd(), FIGHTSTG_queueBoostEnd(), FIGHTSTG_queueClearField(), FIGHTSTG_queueRecovery(), FIGHTSTG_queueSpecialEnd(), FIGHTSTG_removeEvents(), FIGHTSTG_reviveFighter(), FIGHTSTG_startRestriction(), FIGHTSTG_testWakeUp(), FIGHTSTG_updateCounterattack(), FIGHTSTG_updateEnemyTurn(), FIGHTSTG_updateOneHpTurn(), queueFirstTurns(), showRunAway(), wakeCounteredUp(), wakePlayerUp(), wakeUpOrCounter(), WFIGHTMN_blast(), WFIGHTMN_cancelBlast(), WFIGHTMN_cureStatus(), WFIGHTMN_digidevolve(), WFIGHTMN_endAutoRecover(), WFIGHTMN_endBattle(), WFIGHTMN_endBoost(), WFIGHTMN_endRestriction(), WFIGHTMN_endSpecial(), WFIGHTMN_knockOut(), WFIGHTMN_recover(), WFIGHTMN_restoreEnemy(), WFIGHTMN_runAway(), WFIGHTMN_runCommand(), WFIGHTMN_runConfusedCommand(), WFIGHTMN_runTurn(), WFIGHTMN_tag(), and WFIGHTMN_takeDamage().
|
extern |
FIGHTSTG_cureStatus's event types.
FIGHTSTG_cureStatus's event types.
Definition at line 299 of file events.c.
Referenced by FIGHTSTG_cureStatus().
|
extern |
|
extern |
what FIGHTSTG_pushEvent is given
Definition at line 1086 of file model_mesh.c.
Referenced by FIGHTSTG_endBattle(), FIGHTSTG_inflictConfusion(), FIGHTSTG_inflictParalysis(), FIGHTSTG_inflictPoison(), FIGHTSTG_inflictSleep(), FIGHTSTG_queueAutoRecoverEnd(), FIGHTSTG_queueBlast(), FIGHTSTG_queueBlastEnd(), FIGHTSTG_queueBoostEnd(), FIGHTSTG_queueClearField(), FIGHTSTG_queueDigidevolve(), FIGHTSTG_queueEnemyTurn(), FIGHTSTG_queueKnockOut(), FIGHTSTG_queueLastEnemy(), FIGHTSTG_queuePartnerTech(), FIGHTSTG_queuePlayerTurn(), FIGHTSTG_queueRecovery(), FIGHTSTG_queueRunAway(), FIGHTSTG_queueSpecialEnd(), FIGHTSTG_startRestriction(), and FIGHTSTG_weakenEnemy().
|
extern |
how the fight stage and WFIGHTMN read the battle table
Definition at line 50 of file battle_sound.c.
Referenced by announceFirstTech(), computeEnemyStats(), FIGHTSTG_computeCounterDamage(), FIGHTSTG_getEnemyAction(), FIGHTSTG_rollSteal(), FIGHTSTG_setMessageName(), FIGHTSTG_showFighterNames(), FIGHTSTG_showFightersMessage(), FIGHTSTG_startAction(), FIGHTSTG_updateCounterattack(), FIGHTSTG_updateEnemyAttack(), FIGHTSTG_updateEnemyTurn(), FIGHTSTG_updateOneHpTurn(), FIGHTSTG_weakenEnemy(), showEnemyName(), WFIGHTMN_endBattle(), WFIGHTMN_initFighters(), and WFIGHTMN_knockOut().
|
extern |
the element whose boost (FIGHTSTG_getElementBoost) weakens each one
Definition at line 6 of file damage.c.
Referenced by FIGHTSTG_getElementBoost().
|
extern |
per event type, FIGHTSTG_popEvent takes (1), peeks at (-1) or skips (0) it
per event type, FIGHTSTG_popEvent takes (1), peeks at (-1) or skips (0) it
Definition at line 32 of file events.c.
Referenced by FIGHTSTG_popEvent().
|
extern |
FIGHTSTG_queueBoostEnd's event types.
FIGHTSTG_queueBoostEnd's event types.
Definition at line 558 of file events.c.
Referenced by FIGHTSTG_queueBoostEnd().
|
extern |
and of FIGHTSTG_startRestriction
and of FIGHTSTG_startRestriction
Definition at line 7 of file battle.c.
Referenced by FIGHTSTG_startRestriction().