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

@@ -107,10 +107,10 @@ Creature* CreateCreature::Create() {
_magAttackPotential, _magDefensePotential, _speedPotential);
auto attacks = std::vector<LearnedAttack*>(_attacks.size());
for (auto kv : _attacks) {
attacks.push_back(new LearnedAttack(std::get<0>(kv), std::get<1>(kv)));
for (size_t i = 0; i < attacks.size(); i++) {
auto kv = _attacks[i];
attacks[i] = new LearnedAttack(std::get<0>(kv), std::get<1>(kv));
}
return new Creature(species, variant, _level, experience, statExperience, statPotential, identifier, gender,
_coloring, heldItem, _nickname, talent, attacks);
return new Creature(_library, species, variant, _level, experience, statExperience, statPotential, identifier,
gender, _coloring, heldItem, _nickname, talent, attacks);
}