Implemented and fixed all code required to run at least a single turn.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-12-05 12:56:41 +01:00
parent 5d6ac316eb
commit 6f32d1245b
17 changed files with 171 additions and 58 deletions

View File

@@ -25,7 +25,10 @@ void BattleSide::SetChoice(BaseTurnChoice* choice) {
_choicesSet++;
}
void BattleSide::SetCreature(Creature* creature, uint8_t index) { _creatures[index] = creature; }
void BattleSide::SetCreature(Creature* creature, uint8_t index) {
_creatures[index] = creature;
creature->SetBattleData(_battle, this);
}
bool BattleSide::CreatureOnSide(const Creature* creature) const {
return std::find(_creatures.begin(), _creatures.end(), creature) != _creatures.end();