Support for ending battles when only one side has creatures that are available for battle.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user