CreatureLib/src/Battling/Flow/TurnHandler.hpp
Deukhoofd 4dd3700352
All checks were successful
continuous-integration/drone/push Build is passing
Adds script hooks for preventing runaway.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
2021-03-27 14:49:17 +01:00

28 lines
1010 B
C++

#ifndef CREATURELIB_TURNHANDLER_HPP
#define CREATURELIB_TURNHANDLER_HPP
#include "../Models/ExecutingAttack.hpp"
#include "../TurnChoices/AttackTurnChoice.hpp"
#include "../TurnChoices/FleeTurnChoice.hpp"
#include "../TurnChoices/SwitchTurnChoice.hpp"
#include "ChoiceQueue.hpp"
namespace CreatureLib::Battling {
class Battle;
class TurnHandler {
static void ExecuteChoice(const ArbUt::BorrowedPtr<BaseTurnChoice>& choice);
static void ExecuteAttackChoice(const ArbUt::BorrowedPtr<AttackTurnChoice>& choice);
static void HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::BorrowedPtr<Creature>& target);
static void ExecuteSwitchChoice(const ArbUt::BorrowedPtr<SwitchTurnChoice>& choice);
static void ExecuteFleeChoice(const ArbUt::BorrowedPtr<FleeTurnChoice>& choice);
public:
static void RunTurn(const ArbUt::BorrowedPtr<ChoiceQueue>& queue, const ArbUt::BorrowedPtr<Battle>& battle);
};
}
#endif // CREATURELIB_TURNHANDLER_HPP