|
Digimon World 3 decomp
The European version, SLES_039.36
|
FIGHTSTG's random rolls: hits, criticals, statuses and the other effects, running away and the statuses' own tests. More...
#include "battle/battle_mode.h"Go to the source code of this file.
Functions | |
| 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. | |
| 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) | |
| static s32 | rollStatus (u8 side, s32 id, s32 block, s32 status, s32 resist, s32 element) |
| Whether a hit inflicts status, like rollPoison without its power: BLOCK keeps the player from it, and the target resists it with RESIST and the resistance to ELEMENT. | |
| 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. | |
| static s32 | rollTechChance (s32 id) |
| Rolls a technique's effect chance (TechData.effectChance, in 128ths) | |
| 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_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_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_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) | |
FIGHTSTG's random rolls: hits, criticals, statuses and the other effects, running away and the statuses' own tests.
Definition in file rolls.c.
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().
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.
|
inlinestatic |
Whether a hit inflicts status, like rollPoison without its power: BLOCK keeps the player from it, and the target resists it with RESIST and the resistance to ELEMENT.
< under it, the technique has none
< magic accuracy, statuses and heals
< magic accuracy, statuses and heals
< magic accuracy, statuses and heals
Definition at line 239 of file rolls.c.
Referenced by FIGHTSTG_rollConfusion(), FIGHTSTG_rollKnockOut(), and FIGHTSTG_rollParalysis().
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.
Rolls a technique's effect chance (TechData.effectChance, in 128ths)
Definition at line 390 of file rolls.c.
Referenced by FIGHTSTG_rollDedigivolve(), FIGHTSTG_rollNoDigivolve(), and FIGHTSTG_rollNoSwitch().
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.