#include "Battle.hpp" #include "../TurnChoices/AttackTurnChoice.hpp" const CreatureLib::Battling::BattleLibrary *CreatureLib::Battling::Battle::GetLibrary() const { return _library; } bool CreatureLib::Battling::Battle::CanUse(CreatureLib::Battling::BaseTurnChoice *choice) { if (choice->GetKind() == TurnChoiceKind::Attack){ //HOOK: change number of uses needed. return static_cast(choice)->GetAttack()->GetRemainingUses() > 1; } return true; } bool CreatureLib::Battling::Battle::TrySetChoice(CreatureLib::Battling::BaseTurnChoice *choice) { if (!CanUse(choice)) return false; choice->GetUser()->GetBattleSide()->SetChoice(choice); return true; }