Implements running from battle.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-12-15 11:52:10 +01:00
parent 0fad615050
commit 6ba708ad12
16 changed files with 160 additions and 54 deletions

View 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

View File

@@ -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