CreatureLib/src/Battling/TurnChoices/BaseTurnChoice.hpp

32 lines
1.0 KiB
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 {
i32 _randomValue;
u32 _speed;
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(i32 val) noexcept { _randomValue = val; }
inline i32 __GetRandomValue() const noexcept { return _randomValue; }
inline void __SetSpeed(u32 val) noexcept { _speed = val; }
inline u32 __GetSpeed() const noexcept { return _speed; }
};
}
#endif // CREATURELIB_BASETURNCHOICE_HPP