|
persona-3-dual
A DS demake of Persona 3
|
various calculations used in Battle More...
#include <BattleCalcs.hpp>
Static Public Member Functions | |
| static u32 | attack (BattleParticipant &attacker, BattleParticipant &defender, Skill &skill) |
| Calculates damage of an attack. | |
| static bool | hit (BattleParticipant &attacker, BattleParticipant &defender, Skill &skill) |
| Calculates if a skill hit the target. | |
| static u32 | healing (BattleParticipant &user, Skill &skill) |
| Calculates heal of a skill. | |
| static u32 | allOutAttack (Player &attacker, BattleParticipant &defender, u32 participantCount) |
| Calculates damage of an All out attack. | |
| static u32 | getAtk (BattleStats &attackerStats, Skill &skill) |
| Gets correct stat for damage calculations based on skill type. | |
| static ae::q20_12_t | getLevelDifference (u32 attackerLevel, u32 defenderLevel) |
| Gets a multiplier used for damage calcs based on an arbitrary hardcoded table. | |
| static ae::q20_12_t | getAffinityMtp (BattleStats &battleStats, Skill &skill) |
| Calculate damage multiplier based on resistance & skill affinity. | |
Static Private Member Functions | |
| static uint8_t | getMagicBoostHeal (uint8_t &magic) |
| Calculate healing bonus based on an arbitrary hardcoded table. | |
Static Private Attributes | |
| static const ae::q20_12_t | levelMultipliers [24] |
| static const uint8_t | magicBoostTableHeal [20] |
various calculations used in Battle
These are battle calculations to decide things like damage, healing, hitrate etc. These forumlas are directly from Reload, since those are the only one well documented.
Private functions are helpers.
For a complete breakdown, visit https://steamcommunity.com/sharedfiles/filedetails/?id=3230774091 Credits for this document goes to CTOBN on Steam.
Definition at line 29 of file BattleCalcs.hpp.
|
static |
Calculates damage of an All out attack.
Needs to be called for each BattleParticipant that gets attacked seperatly.
| attacker | Protagonist, his stats are the main part of the calculation. |
| defender | BattleParticipant the attack is targetet at. |
| participantCount | amount of BattleParticipant's executing the attack. |
Definition at line 72 of file BattleCalcs.cpp.


|
static |
Calculates damage of an attack.
| attacker | BattleParticipant using the skill. |
| defender | BattleParticipant the skill is targetet at. |
| skill | skill used. |
Definition at line 6 of file BattleCalcs.cpp.


|
static |
Calculate damage multiplier based on resistance & skill affinity.
| battleStats | Stats to check resistance to the skills affinity. |
| skill | Skil to get affinity from. |
TODO: add repel logic
Definition at line 135 of file BattleCalcs.cpp.

|
static |
Gets correct stat for damage calculations based on skill type.
| attackerStats | Stats of the attacker, to return magic or strength. |
| skill | Needed to determine the type of the skill. |
Definition at line 121 of file BattleCalcs.cpp.

|
static |
Gets a multiplier used for damage calcs based on an arbitrary hardcoded table.
| attackerLevel | Level of the attacker. |
| defenderLevel | Level of the attacked defenderLevel BattleParticipant. |
offset so -13 is 0
Definition at line 126 of file BattleCalcs.cpp.

|
staticprivate |
Calculate healing bonus based on an arbitrary hardcoded table.
| magic | Value to calculate the boost from. |
Definition at line 157 of file BattleCalcs.cpp.

|
static |
Calculates heal of a skill.
| user | BattleParticipant using the skill. |
| skill | The skill used. |
Definition at line 54 of file BattleCalcs.cpp.


|
static |
Calculates if a skill hit the target.
| attacker | BattleParticipant using the skill. |
| defender | BattleParticipant the skill is targetet at. |
| skill | The skill used. |
Definition at line 16 of file BattleCalcs.cpp.


|
staticprivate |
Definition at line 91 of file BattleCalcs.hpp.
|
staticprivate |
Definition at line 98 of file BattleCalcs.hpp.