#ifndef CREATURELIB_ATTACKTURNCHOICE_HPP #define CREATURELIB_ATTACKTURNCHOICE_HPP #include "../Models/CreatureIndex.hpp" #include "../Models/LearnedAttack.hpp" #include "BaseTurnChoice.hpp" namespace CreatureLib::Battling { class AttackTurnChoice : public BaseTurnChoice { LearnedAttack* _attack; CreatureIndex _target; Script* _attackScript = nullptr; public: AttackTurnChoice(Creature* user, LearnedAttack* attack, const CreatureIndex& target) : BaseTurnChoice(user), _attack(attack), _target(target) {} inline LearnedAttack* GetAttack() const { return _attack; } TurnChoiceKind GetKind() const override { return TurnChoiceKind ::Attack; } int8_t GetPriority() const { // HOOK: Change priority return _attack->GetAttack()->GetPriority(); } const CreatureIndex& GetTarget() const { return _target; } Script* GetAttackScript() { return _attackScript; } protected: void GetActiveScripts(std::vector& scripts) override { scripts.emplace_back(&_attackScript); GetUser()->GetActiveScripts(scripts); } }; } #endif // CREATURELIB_ATTACKTURNCHOICE_HPP