Implements running from battle.
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:
19
src/Battling/TurnChoices/FleeTurnChoice.hpp
Normal file
19
src/Battling/TurnChoices/FleeTurnChoice.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef CREATURELIB_FLEETURNCHOICE_HPP
|
||||
#define CREATURELIB_FLEETURNCHOICE_HPP
|
||||
|
||||
#include "../Models/Creature.hpp"
|
||||
#include "BaseTurnChoice.hpp"
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
class FleeTurnChoice : public BaseTurnChoice {
|
||||
public:
|
||||
FleeTurnChoice(Creature* user) : BaseTurnChoice(user) {}
|
||||
|
||||
TurnChoiceKind GetKind() const override { return TurnChoiceKind ::Flee; }
|
||||
|
||||
protected:
|
||||
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override { GetUser()->GetActiveScripts(scripts); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // CREATURELIB_FLEETURNCHOICE_HPP
|
||||
@@ -4,6 +4,6 @@
|
||||
#include <cstdint>
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
enum class TurnChoiceKind : uint8_t { Pass, Attack, Item, Switch, RunAway };
|
||||
enum class TurnChoiceKind : uint8_t { Pass, Attack, Item, Switch, Flee };
|
||||
}
|
||||
#endif // CREATURELIB_TURNCHOICEKIND_HPP
|
||||
|
||||
Reference in New Issue
Block a user