Renamed Target class to CreatureIndex

This commit is contained in:
2019-12-05 09:53:48 +01:00
parent a8730d983f
commit 5d6ac316eb
4 changed files with 20 additions and 20 deletions

View File

@@ -1,18 +1,18 @@
#ifndef CREATURELIB_ATTACKTURNCHOICE_HPP
#define CREATURELIB_ATTACKTURNCHOICE_HPP
#include "../Models/CreatureIndex.hpp"
#include "../Models/LearnedAttack.hpp"
#include "../Models/Target.hpp"
#include "BaseTurnChoice.hpp"
namespace CreatureLib::Battling {
class AttackTurnChoice : public BaseTurnChoice {
LearnedAttack* _attack;
Target _target;
CreatureIndex _target;
Script* _attackScript;
public:
AttackTurnChoice(Creature* user, LearnedAttack* attack, const Target& target)
AttackTurnChoice(Creature* user, LearnedAttack* attack, const CreatureIndex& target)
: BaseTurnChoice(user), _attack(attack), _target(target) {}
inline LearnedAttack* GetAttack() const { return _attack; }
@@ -24,7 +24,7 @@ namespace CreatureLib::Battling {
return _attack->GetAttack()->GetPriority();
}
const Target& GetTarget() const { return _target; }
const CreatureIndex& GetTarget() const { return _target; }
Script* GetAttackScript() { return _attackScript; }