Improve readability of BattleScript.hpp
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2022-03-23 18:38:43 +01:00
parent eccf2c9121
commit de818c9fd6
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 65 additions and 67 deletions

View File

@ -43,91 +43,89 @@ namespace CreatureLib::Battling {
[[nodiscard]] virtual const ArbUt::StringView& GetName() const noexcept = 0;
#define _par_ [[maybe_unused]]
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
virtual void OnInitialize(_par_ const BattleLibrary* non_null,
_par_ const ArbUt::List<CreatureLib::Library::EffectParameter*>& parameters){};
virtual void OnBeforeTurn(_par_ const BaseTurnChoice* non_null choice){};
virtual void OnInitialize(const BattleLibrary* non_null,
const ArbUt::List<CreatureLib::Library::EffectParameter*>& parameters){};
virtual void OnBeforeTurn(const BaseTurnChoice* non_null choice){};
virtual void ChangeSpeed(_par_ BaseTurnChoice* non_null choice, _par_ u32* non_null speed){};
virtual void ChangePriority(_par_ AttackTurnChoice* non_null choice, _par_ i8* non_null priority){};
virtual void ChangeAttack(_par_ AttackTurnChoice* non_null choice,
_par_ ArbUt::StringView* non_null outAttack){};
virtual void ModifyNumberOfHits(_par_ AttackTurnChoice* non_null choice, _par_ u8* non_null numberOfHits){};
virtual void PreventAttack(_par_ ExecutingAttack* non_null attack, _par_ bool* non_null outResult){};
virtual void FailAttack(_par_ ExecutingAttack* non_null attack, _par_ bool* non_null outFailed){};
virtual void StopBeforeAttack(_par_ ExecutingAttack* non_null attack, _par_ bool* non_null outResult){};
virtual void OnBeforeAttack(_par_ ExecutingAttack* non_null attack){};
virtual void ChangeSpeed(BaseTurnChoice* non_null choice, u32* non_null speed){};
virtual void ChangePriority(AttackTurnChoice* non_null choice, i8* non_null priority){};
virtual void ChangeAttack(AttackTurnChoice* non_null choice, ArbUt::StringView* non_null outAttack){};
virtual void ModifyNumberOfHits(AttackTurnChoice* non_null choice, u8* non_null numberOfHits){};
virtual void PreventAttack(ExecutingAttack* non_null attack, bool* non_null outResult){};
virtual void FailAttack(ExecutingAttack* non_null attack, bool* non_null outFailed){};
virtual void StopBeforeAttack(ExecutingAttack* non_null attack, bool* non_null outResult){};
virtual void OnBeforeAttack(ExecutingAttack* non_null attack){};
virtual void FailIncomingAttack(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ bool* non_null outResult){};
virtual void IsInvulnerable(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ bool* non_null outResult){};
virtual void OnAttackMiss(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target){};
virtual void ChangeAttackType(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitNumber, _par_ u8* non_null outType){};
virtual void ChangeEffectiveness(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitNumber, _par_ float* non_null effectiveness){};
virtual void BlockCritical(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitNumber, _par_ bool* non_null blockCritical){};
virtual void FailIncomingAttack(ExecutingAttack* non_null attack, Creature* non_null target,
bool* non_null outResult){};
virtual void IsInvulnerable(ExecutingAttack* non_null attack, Creature* non_null target,
bool* non_null outResult){};
virtual void OnAttackMiss(ExecutingAttack* non_null attack, Creature* non_null target){};
virtual void ChangeAttackType(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitNumber,
u8* non_null outType){};
virtual void ChangeEffectiveness(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitNumber,
float* non_null effectiveness){};
virtual void BlockCritical(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitNumber,
bool* non_null blockCritical){};
virtual void OverrideBasePower(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ u8* non_null basePower){};
virtual void ChangeDamageStatsUser(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ Creature* non_null* non_null statsUser){};
virtual void OverrideBasePower(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
u8* non_null basePower){};
virtual void ChangeDamageStatsUser(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
Creature* non_null* non_null statsUser){};
virtual void BypassDefensiveStat(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ bool* non_null bypass){};
virtual void BypassOffensiveStat(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ bool* non_null bypass){};
virtual void ModifyStatModifier(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ float* non_null modifier){};
virtual void ModifyDamageModifier(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ float* non_null modifier){};
virtual void OverrideDamage(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ u32* non_null damage){};
virtual void OverrideIncomingDamage(_par_ ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitIndex, _par_ u32* non_null damage){};
virtual void BypassDefensiveStat(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
bool* non_null bypass){};
virtual void BypassOffensiveStat(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
bool* non_null bypass){};
virtual void ModifyStatModifier(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
float* non_null modifier){};
virtual void ModifyDamageModifier(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
float* non_null modifier){};
virtual void OverrideDamage(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
u32* non_null damage){};
virtual void OverrideIncomingDamage(ExecutingAttack* non_null attack, Creature* non_null target, u8 hitIndex,
u32* non_null damage){};
virtual void OnIncomingHit(_par_ const ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitNumber){};
virtual void OnFaintingOpponent(_par_ const ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitNumber){};
virtual void OnIncomingHit(const ExecutingAttack* non_null attack, Creature* non_null target, u8 hitNumber){};
virtual void OnFaintingOpponent(const ExecutingAttack* non_null attack, Creature* non_null target,
u8 hitNumber){};
virtual void PreventStatBoostChange(_par_ Creature* non_null target, _par_ Library::Statistic stat,
_par_ i8 diffAmount, _par_ bool selfInflicted,
_par_ bool* non_null prevent){};
virtual void ModifyStatBoostChange(_par_ Creature* non_null target, _par_ Library::Statistic stat,
_par_ i8* non_null diffAmount){};
virtual void PreventSecondaryEffects(_par_ const ExecutingAttack* non_null attack,
_par_ Creature* non_null target, _par_ u8 hitNumber,
_par_ bool* non_null outResult){};
virtual void OnSecondaryEffect(_par_ const ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ u8 hitNumber){};
virtual void PreventStatBoostChange(Creature* non_null target, Library::Statistic stat, i8 diffAmount,
bool selfInflicted, bool* non_null prevent){};
virtual void ModifyStatBoostChange(Creature* non_null target, Library::Statistic stat,
i8* non_null diffAmount){};
virtual void PreventSecondaryEffects(const ExecutingAttack* non_null attack, Creature* non_null target,
u8 hitNumber, bool* non_null outResult){};
virtual void OnSecondaryEffect(const ExecutingAttack* non_null attack, Creature* non_null target,
u8 hitNumber){};
virtual void OnAfterHits(_par_ const ExecutingAttack* non_null attack, _par_ Creature* non_null target){};
virtual void OnAfterHits(const ExecutingAttack* non_null attack, Creature* non_null target){};
virtual void PreventSelfSwitch(_par_ const SwitchTurnChoice* non_null choice, _par_ bool* non_null outResult){};
virtual void PreventOpponentSwitch(_par_ const SwitchTurnChoice* non_null choice,
_par_ bool* non_null outResult){};
virtual void PreventSelfSwitch(const SwitchTurnChoice* non_null choice, bool* non_null outResult){};
virtual void PreventOpponentSwitch(const SwitchTurnChoice* non_null choice, bool* non_null outResult){};
virtual void ModifyEffectChance(_par_ const ExecutingAttack* non_null attack, _par_ Creature* non_null target,
_par_ float* non_null chance){};
virtual void ModifyIncomingEffectChance(_par_ const ExecutingAttack* non_null attack,
_par_ Creature* non_null target, _par_ float* non_null chance){};
virtual void ModifyEffectChance(const ExecutingAttack* non_null attack, Creature* non_null target,
float* non_null chance){};
virtual void ModifyIncomingEffectChance(const ExecutingAttack* non_null attack, Creature* non_null target,
float* non_null chance){};
virtual void OnFail(_par_ Creature* non_null target){};
virtual void OnOpponentFail(_par_ Creature* non_null target){};
virtual void OnFail(Creature* non_null target){};
virtual void OnOpponentFail(Creature* non_null target){};
virtual void PreventRunAway(_par_ const FleeTurnChoice* non_null choice, _par_ bool* non_null result){};
virtual void PreventOpponentRunAway(_par_ const FleeTurnChoice* non_null choice, _par_ bool* non_null result){};
virtual void PreventRunAway(const FleeTurnChoice* non_null choice, bool* non_null result){};
virtual void PreventOpponentRunAway(const FleeTurnChoice* non_null choice, bool* non_null result){};
virtual void OnEndTurn(){};
virtual void OnDamage(Creature* non_null, DamageSource, _par_ u32 oldHealth, _par_ u32 newHealth){};
virtual void OnDamage(Creature* non_null, DamageSource, u32 oldHealth, u32 newHealth){};
virtual void OnFaint(Creature* non_null, DamageSource){};
virtual void OnSwitchIn(Creature* non_null){};
virtual void OnAfterHeldItemConsume(Creature* non_null, const Library::Item* non_null){};
#pragma GCC diagnostic pop
};
}