CreatureLib/src/Battling/TurnChoices/AttackTurnChoice.hpp

43 lines
1.1 KiB
C++

#ifndef CREATURELIB_ATTACKTURNCHOICE_HPP
#define CREATURELIB_ATTACKTURNCHOICE_HPP
#include "BaseTurnChoice.hpp"
#include "../Models/LearnedAttack.hpp"
#include "../Models/Target.hpp"
namespace CreatureLib::Battling{
class AttackTurnChoice : public BaseTurnChoice {
LearnedAttack* _attack;
Target _target;
Script* _attackScript;
public:
AttackTurnChoice(Creature* user, LearnedAttack* attack, const Target& 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 Target& GetTarget() const{
return _target;
}
void GetActiveScripts(ScriptAggregator &aggr) const override {
aggr.Add(_attackScript);
GetUser()->GetActiveScripts(aggr);
}
};
}
#endif //CREATURELIB_ATTACKTURNCHOICE_HPP