2019-10-29 10:19:25 +00:00
|
|
|
#ifndef CREATURELIB_ATTACKTURNCHOICE_HPP
|
|
|
|
#define CREATURELIB_ATTACKTURNCHOICE_HPP
|
|
|
|
|
|
|
|
#include "BaseTurnChoice.hpp"
|
|
|
|
#include "../Models/LearnedAttack.hpp"
|
2019-11-02 12:57:43 +00:00
|
|
|
#include "../Models/Target.hpp"
|
2019-10-29 10:19:25 +00:00
|
|
|
|
|
|
|
namespace CreatureLib::Battling{
|
|
|
|
class AttackTurnChoice : public BaseTurnChoice {
|
|
|
|
LearnedAttack* _attack;
|
2019-11-02 12:57:43 +00:00
|
|
|
Target _target;
|
2019-10-29 10:19:25 +00:00
|
|
|
public:
|
2019-11-02 12:57:43 +00:00
|
|
|
AttackTurnChoice(Creature* user, LearnedAttack* attack, const Target& target)
|
|
|
|
: BaseTurnChoice(user), _attack(attack), _target(target){}
|
2019-10-29 10:19:25 +00:00
|
|
|
|
|
|
|
inline LearnedAttack* GetAttack() const{
|
|
|
|
return _attack;
|
|
|
|
}
|
2019-10-31 11:02:23 +00:00
|
|
|
|
|
|
|
TurnChoiceKind GetKind() const override {
|
|
|
|
return TurnChoiceKind ::Attack;
|
|
|
|
}
|
2019-10-31 11:31:31 +00:00
|
|
|
|
|
|
|
int8_t GetPriority() const{
|
|
|
|
//HOOK: Change priority
|
|
|
|
return _attack->GetAttack()->GetPriority();
|
|
|
|
}
|
2019-11-02 12:57:43 +00:00
|
|
|
|
|
|
|
const Target& GetTarget() const{
|
|
|
|
return _target;
|
|
|
|
}
|
2019-10-29 10:19:25 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif //CREATURELIB_ATTACKTURNCHOICE_HPP
|