Support turn queue return prematurely when a creature is recalled, and the ability to resume it later.
This commit is contained in:
@@ -15,17 +15,18 @@ namespace CreatureLib::Battling {
|
||||
uint8_t _creaturesPerSide;
|
||||
std::vector<BattleSide*> _sides;
|
||||
Core::Random _random;
|
||||
|
||||
ChoiceQueue* _currentTurnQueue = nullptr;
|
||||
|
||||
uint8_t _numberOfRecalledSlots = 0;
|
||||
public:
|
||||
const BattleLibrary* GetLibrary() const;
|
||||
[[nodiscard]] const BattleLibrary* GetLibrary() const;
|
||||
|
||||
virtual bool CanUse(const BaseTurnChoice* choice);
|
||||
virtual bool TrySetChoice(BaseTurnChoice* choice);
|
||||
|
||||
void CheckChoicesSetAndRun();
|
||||
|
||||
ChoiceQueue* GetCurrentTurnQueue() const;
|
||||
[[nodiscard]] ChoiceQueue* GetCurrentTurnQueue() const;
|
||||
Core::Random& GetRandom();
|
||||
|
||||
bool CreatureInField(const Creature* creature) const;
|
||||
@@ -33,6 +34,12 @@ namespace CreatureLib::Battling {
|
||||
Creature* GetTarget(const Target& target){
|
||||
return _sides[target.GetSideIndex()]->GetCreature(target.GetCreatureIndex());
|
||||
}
|
||||
|
||||
[[nodiscard]] bool HasRecalledSlots() const;
|
||||
|
||||
void ForceRecall(uint8_t side, uint8_t index);
|
||||
|
||||
void FillRecall(uint8_t side, uint8_t, Creature* c);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user