Support for ending battles when only one side has creatures that are available for battle.

This commit is contained in:
2019-12-07 21:56:29 +01:00
parent 0483e635ea
commit 262279bd2c
9 changed files with 117 additions and 6 deletions

View File

@@ -37,8 +37,13 @@ void BattleSide::SetChoice(BaseTurnChoice* choice) {
}
void BattleSide::SetCreature(Creature* creature, uint8_t index) {
auto old = _creatures[index];
if (old != nullptr){
old->SetOnBattleField(false);
}
_creatures[index] = creature;
creature->SetBattleData(_battle, this);
creature->SetOnBattleField(true);
}
bool BattleSide::CreatureOnSide(const Creature* creature) const {