Used ClangFormat style guide I'm happy with.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,48 +1,39 @@
|
||||
#ifndef CREATURELIB_ATTACKTURNCHOICE_HPP
|
||||
#define CREATURELIB_ATTACKTURNCHOICE_HPP
|
||||
|
||||
#include "BaseTurnChoice.hpp"
|
||||
#include "../Models/LearnedAttack.hpp"
|
||||
#include "../Models/Target.hpp"
|
||||
#include "BaseTurnChoice.hpp"
|
||||
|
||||
namespace CreatureLib::Battling{
|
||||
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){}
|
||||
: BaseTurnChoice(user), _attack(attack), _target(target) {}
|
||||
|
||||
inline LearnedAttack* GetAttack() const{
|
||||
return _attack;
|
||||
}
|
||||
inline LearnedAttack* GetAttack() const { return _attack; }
|
||||
|
||||
TurnChoiceKind GetKind() const override {
|
||||
return TurnChoiceKind ::Attack;
|
||||
}
|
||||
TurnChoiceKind GetKind() const override { return TurnChoiceKind ::Attack; }
|
||||
|
||||
int8_t GetPriority() const{
|
||||
//HOOK: Change priority
|
||||
int8_t GetPriority() const {
|
||||
// HOOK: Change priority
|
||||
return _attack->GetAttack()->GetPriority();
|
||||
}
|
||||
|
||||
const Target& GetTarget() const{
|
||||
return _target;
|
||||
}
|
||||
const Target& GetTarget() const { return _target; }
|
||||
|
||||
Script* GetAttackScript(){
|
||||
return _attackScript;
|
||||
}
|
||||
Script* GetAttackScript() { return _attackScript; }
|
||||
|
||||
protected:
|
||||
void GetActiveScripts(std::vector<ScriptWrapper> &scripts) override {
|
||||
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override {
|
||||
scripts.emplace_back(&_attackScript);
|
||||
GetUser()->GetActiveScripts(scripts);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif //CREATURELIB_ATTACKTURNCHOICE_HPP
|
||||
#endif // CREATURELIB_ATTACKTURNCHOICE_HPP
|
||||
|
||||
Reference in New Issue
Block a user