CreatureLib/src/Battling/TurnChoices/BaseTurnChoice.hpp

28 lines
892 B
C++

#ifndef CREATURELIB_BASETURNCHOICE_HPP
#define CREATURELIB_BASETURNCHOICE_HPP
#include "../ScriptHandling/ScriptSource.hpp"
#include "TurnChoiceKind.hpp"
namespace CreatureLib::Battling {
class Creature;
class BaseTurnChoice : public ScriptSource {
int32_t _randomValue;
protected:
ArbUt::BorrowedPtr<Creature> _user;
BaseTurnChoice(ArbUt::BorrowedPtr<Creature> user) noexcept : _user(user){};
public:
virtual ~BaseTurnChoice() = default;
[[nodiscard]] virtual TurnChoiceKind GetKind() const noexcept = 0;
[[nodiscard]] inline const ArbUt::BorrowedPtr<Creature>& GetUser() const noexcept { return _user; }
inline void __SetRandomValue(int32_t val) noexcept { _randomValue = val; }
inline int32_t __GetRandomValue() const noexcept { return _randomValue; }
};
}
#endif // CREATURELIB_BASETURNCHOICE_HPP