Furter rework on script hooks, simplifying required logic.

This commit is contained in:
2019-11-10 14:32:05 +01:00
parent f72fd5f905
commit 3488784409
18 changed files with 79 additions and 37 deletions

View File

@@ -9,7 +9,7 @@
#include "Target.hpp"
namespace CreatureLib::Battling {
class Battle {
class Battle : public ScriptSource{
const BattleLibrary* _library;
uint8_t _numberOfSides;
uint8_t _creaturesPerSide;
@@ -18,6 +18,7 @@ namespace CreatureLib::Battling {
ChoiceQueue* _currentTurnQueue = nullptr;
uint8_t _numberOfRecalledSlots = 0;
ScriptSet _volatile;
public:
[[nodiscard]] const BattleLibrary* GetLibrary() const;
@@ -40,6 +41,8 @@ namespace CreatureLib::Battling {
void ForceRecall(uint8_t side, uint8_t index);
void FillRecall(uint8_t side, uint8_t, Creature* c);
void GetActiveScripts(ScriptAggregator &aggr) const override;
};
}