2019-10-31 11:02:23 +00:00
|
|
|
#ifndef CREATURELIB_TURNHANDLER_HPP
|
|
|
|
#define CREATURELIB_TURNHANDLER_HPP
|
|
|
|
|
2019-11-03 12:47:50 +00:00
|
|
|
#include "../Models/ExecutingAttack.hpp"
|
2019-11-28 11:55:22 +00:00
|
|
|
#include "../TurnChoices/AttackTurnChoice.hpp"
|
2019-12-15 10:52:10 +00:00
|
|
|
#include "../TurnChoices/FleeTurnChoice.hpp"
|
2019-12-14 11:15:30 +00:00
|
|
|
#include "../TurnChoices/SwitchTurnChoice.hpp"
|
2019-11-28 11:55:22 +00:00
|
|
|
#include "ChoiceQueue.hpp"
|
2019-10-31 11:02:23 +00:00
|
|
|
|
|
|
|
namespace CreatureLib::Battling {
|
|
|
|
class Battle;
|
|
|
|
|
|
|
|
class TurnHandler {
|
2021-03-27 13:49:17 +00:00
|
|
|
static void ExecuteChoice(const ArbUt::BorrowedPtr<BaseTurnChoice>& choice);
|
2019-10-31 12:13:36 +00:00
|
|
|
|
2020-08-14 13:18:00 +00:00
|
|
|
static void ExecuteAttackChoice(const ArbUt::BorrowedPtr<AttackTurnChoice>& choice);
|
2020-06-04 19:58:28 +00:00
|
|
|
static void HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::BorrowedPtr<Creature>& target);
|
2019-11-28 11:55:22 +00:00
|
|
|
|
2021-03-27 13:49:17 +00:00
|
|
|
static void ExecuteSwitchChoice(const ArbUt::BorrowedPtr<SwitchTurnChoice>& choice);
|
|
|
|
static void ExecuteFleeChoice(const ArbUt::BorrowedPtr<FleeTurnChoice>& choice);
|
2019-12-14 11:15:30 +00:00
|
|
|
|
2019-10-31 11:02:23 +00:00
|
|
|
public:
|
2021-03-27 13:49:17 +00:00
|
|
|
static void RunTurn(const ArbUt::BorrowedPtr<ChoiceQueue>& queue, const ArbUt::BorrowedPtr<Battle>& battle);
|
2019-10-31 11:02:23 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2019-11-28 11:55:22 +00:00
|
|
|
#endif // CREATURELIB_TURNHANDLER_HPP
|