Update to latest Arbutils, use new integer defines
This commit is contained in:
@@ -13,7 +13,7 @@ namespace CreatureLib::Battling {
|
||||
ArbUt::BorrowedPtr<LearnedAttack> _attack;
|
||||
CreatureIndex _target;
|
||||
std::unique_ptr<BattleScript> _attackScript = nullptr;
|
||||
int8_t _priority = 0;
|
||||
i8 _priority = 0;
|
||||
bool _hasFailed = false;
|
||||
|
||||
void ResolveScript(ArbUt::BorrowedPtr<const CreatureLib::Library::AttackData> attack) {
|
||||
@@ -59,8 +59,8 @@ namespace CreatureLib::Battling {
|
||||
|
||||
TurnChoiceKind GetKind() const noexcept override { return TurnChoiceKind ::Attack; }
|
||||
|
||||
inline int8_t GetPriority() const noexcept { return _priority; }
|
||||
inline void SetPriority(int8_t priority) noexcept { _priority = priority; }
|
||||
inline i8 GetPriority() const noexcept { return _priority; }
|
||||
inline void SetPriority(i8 priority) noexcept { _priority = priority; }
|
||||
|
||||
const CreatureIndex& GetTarget() const noexcept { return _target; }
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace CreatureLib::Battling {
|
||||
class Creature;
|
||||
|
||||
class BaseTurnChoice : public ScriptSource {
|
||||
int32_t _randomValue;
|
||||
uint32_t _speed;
|
||||
i32 _randomValue;
|
||||
u32 _speed;
|
||||
|
||||
protected:
|
||||
ArbUt::BorrowedPtr<Creature> _user;
|
||||
@@ -20,11 +20,11 @@ namespace CreatureLib::Battling {
|
||||
[[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; }
|
||||
inline void __SetRandomValue(i32 val) noexcept { _randomValue = val; }
|
||||
inline i32 __GetRandomValue() const noexcept { return _randomValue; }
|
||||
|
||||
inline void __SetSpeed(uint32_t val) noexcept { _speed = val; }
|
||||
inline uint32_t __GetSpeed() const noexcept { return _speed; }
|
||||
inline void __SetSpeed(u32 val) noexcept { _speed = val; }
|
||||
inline u32 __GetSpeed() const noexcept { return _speed; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
#define CREATURELIB_TURNCHOICEKIND_HPP
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
ENUM(TurnChoiceKind, uint8_t, Pass, Attack, Item, Switch, Flee);
|
||||
ENUM(TurnChoiceKind, u8, Pass, Attack, Item, Switch, Flee);
|
||||
}
|
||||
#endif // CREATURELIB_TURNCHOICEKIND_HPP
|
||||
|
||||
Reference in New Issue
Block a user