Reworks ScriptSources so we can get individual scripts on a source. Fixed OnEndTurn making no sense.
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-10-29 19:31:08 +02:00
parent 316ac12a01
commit 5fd8abb3a8
16 changed files with 71 additions and 18 deletions

View File

@@ -82,9 +82,12 @@ bool BattleSide::CreatureOnSide(const ArbUt::BorrowedPtr<Creature>& creature) co
const ArbUt::OptionalBorrowedPtr<Creature>& BattleSide::GetCreature(uint8_t index) const { return _creatures[index]; }
void BattleSide::GetActiveScripts(ArbUt::List<ScriptWrapper>& scripts) {
scripts.Append(ScriptWrapper::FromSet(&_volatile));
GetOwnScripts(scripts);
_battle->GetActiveScripts(scripts);
}
void BattleSide::GetOwnScripts(ArbUt::List<ScriptWrapper>& scripts) {
scripts.Append(ScriptWrapper::FromSet(&_volatile));
}
size_t BattleSide::ScriptCount() const { return _battle->ScriptCount() + 1; }
uint8_t BattleSide::GetRandomCreatureIndex() {