Renamed Script --> BattleScript, some cleanup on it.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
81
src/Battling/ScriptHandling/BattleScript.hpp
Normal file
81
src/Battling/ScriptHandling/BattleScript.hpp
Normal file
@@ -0,0 +1,81 @@
|
||||
#ifndef CREATURELIB_SCRIPT_HPP
|
||||
#define CREATURELIB_SCRIPT_HPP
|
||||
|
||||
#include "../../Library/EffectParameter.hpp"
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
class BaseTurnChoice;
|
||||
class AttackTurnChoice;
|
||||
class SwitchTurnChoice;
|
||||
class ExecutingAttack;
|
||||
class Creature;
|
||||
|
||||
class BattleScript {
|
||||
public:
|
||||
BattleScript() = default;
|
||||
NO_COPY_OR_MOVE(BattleScript);
|
||||
|
||||
virtual ~BattleScript() = default;
|
||||
|
||||
virtual void Stack(){};
|
||||
virtual void OnRemove(){};
|
||||
|
||||
[[nodiscard]] virtual const ArbUt::StringView& GetName() const noexcept = 0;
|
||||
|
||||
virtual void
|
||||
OnInitialize([[maybe_unused]] const ArbUt::List<CreatureLib::Library::EffectParameter*>& parameters){};
|
||||
virtual void OnBeforeTurn([[maybe_unused]] const BaseTurnChoice* choice){};
|
||||
|
||||
virtual void ChangePriority([[maybe_unused]] AttackTurnChoice* choice, [[maybe_unused]] int8_t* priority){};
|
||||
virtual void ChangeAttack([[maybe_unused]] AttackTurnChoice* choice,
|
||||
[[maybe_unused]] ArbUt::StringView* outAttack){};
|
||||
virtual void PreventAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] bool* outResult){};
|
||||
virtual void FailAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] bool* outFailed){};
|
||||
virtual void StopBeforeAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] bool* outResult){};
|
||||
virtual void OnBeforeAttack([[maybe_unused]] ExecutingAttack* attack){};
|
||||
|
||||
virtual void FailIncomingAttack([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
virtual void IsInvulnerable([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
virtual void OnAttackMiss([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target){};
|
||||
virtual void ChangeAttackType([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitNumber, [[maybe_unused]] u8* outType){};
|
||||
virtual void ChangeEffectiveness([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitNumber, [[maybe_unused]] float* effectiveness){};
|
||||
|
||||
virtual void OverrideBasePower([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] u8* basePower){};
|
||||
virtual void ChangeDamageStatsUser([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] Creature** statsUser){};
|
||||
|
||||
virtual void BypassDefensiveStat([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] bool* bypass){};
|
||||
virtual void BypassOffensiveStat([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] bool* bypass){};
|
||||
virtual void ModifyStatModifier([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] float* modifier){};
|
||||
virtual void ModifyDamageModifier([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] float* modifier){};
|
||||
virtual void OverrideDamage([[maybe_unused]] ExecutingAttack* attack, [[maybe_unused]] Creature* target,
|
||||
[[maybe_unused]] u8 hitIndex, [[maybe_unused]] u32* damage){};
|
||||
|
||||
virtual void PreventSecondaryEffects([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] u8 hitNumber,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
virtual void OnSecondaryEffect([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] u8 hitNumber){};
|
||||
|
||||
virtual void OnAfterHits([[maybe_unused]] const ExecutingAttack* attack, [[maybe_unused]] Creature* target){};
|
||||
|
||||
virtual void PreventSelfSwitch([[maybe_unused]] const SwitchTurnChoice* choice,
|
||||
[[maybe_unused]] bool* outResult){};
|
||||
|
||||
virtual void ModifyEffectChance([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] float* chance){};
|
||||
virtual void ModifyIncomingEffectChance([[maybe_unused]] const ExecutingAttack* attack,
|
||||
[[maybe_unused]] Creature* target, [[maybe_unused]] float* chance){};
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_SCRIPT_HPP
|
||||
Reference in New Issue
Block a user