33 return ae::q20_12_t{0};
37 if (!defStats || defStats->
en == 0)
40 return ae::q20_12_t{0};
48 return fpm::floor(
math.sqrt(
math.div(ae::q20_12_t{movePower * 15 * atk}, ae::q20_12_t{defStats->en})) *
49 ae::q20_12_t{2} * levelDifference * affinityMtp);
54 return ae::q20_12_t{1.0};
void logMessage(LogSeverity severity, std::string_view message, std::source_location location)
Logs a diagnostic message and halts only for fatal messages.
Util to handle error logging.
ParticipantType possibleUsers
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 u32 getAtk(BattleStats &attackerStats, Skill &skill)
Gets correct stat for damage calculations based on skill type.
ae::q20_12_t currentTurnOrderAgility
ParticipantType participantType
virtual BattleStats * getBattleStats()=0
Basic stats / affinities. Used by Personas or directly by Enemies.
Holds character data which a battleParticipant is created from.
Holds data on how the battle concluded.
ae::q20_12_t getTeamMultiplier() override
etl::vector< PersonaBase *, 13 > personas
virtual bool actorCanUse(ActionBase *action)
ae::q20_12_t calculateBaseDamage(BattleParticipant &defender, Skill &skill) override
void setCurrentTurnOrderAgility(ae::q20_12_t boost) override
bool canParticipateInAllOutAttack()
BattlePhase getInitalTurnPhase() override
CharacterProfile characterProfile
PartyMember(const CharacterProfile &iCharacterProfile)
void onDead(Event::BattleResult &battleResult) override