Furter rework on script hooks, simplifying required logic.
This commit is contained in:
@@ -6,14 +6,16 @@
|
||||
#include "../TurnChoices/BaseTurnChoice.hpp"
|
||||
|
||||
namespace CreatureLib::Battling{
|
||||
class BattleSide {
|
||||
class BattleSide : public ScriptSource{
|
||||
uint8_t _creaturesPerSide;
|
||||
std::vector<Creature*> _creatures;
|
||||
std::vector<const BaseTurnChoice*> _choices;
|
||||
uint8_t _choicesSet = 0;
|
||||
ScriptSet _volatile;
|
||||
Battle* _battle;
|
||||
public:
|
||||
BattleSide(uint8_t creaturesPerSide)
|
||||
: _creaturesPerSide(creaturesPerSide), _creatures(creaturesPerSide), _choices(creaturesPerSide)
|
||||
explicit BattleSide(Battle* battle, uint8_t creaturesPerSide)
|
||||
: _creaturesPerSide(creaturesPerSide), _creatures(creaturesPerSide), _choices(creaturesPerSide), _battle(battle)
|
||||
{
|
||||
ResetChoices();
|
||||
}
|
||||
@@ -29,6 +31,8 @@ namespace CreatureLib::Battling{
|
||||
Creature* GetCreature(uint8_t index) const;
|
||||
bool CreatureOnSide(const Creature* creature) const;
|
||||
|
||||
void GetActiveScripts(ScriptAggregator &aggr) const override;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user