Update to latest Arbutils.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-12-13 12:32:52 +01:00
parent ecf8582c59
commit bbb2691b91
18 changed files with 152 additions and 164 deletions

View File

@@ -49,7 +49,6 @@ namespace PkmnLib::Battling {
err << "Invalid forme '" << _forme << "' for species '" << _forme << "'.";
throw ArbUt::Exception(err.str());
}
AssertNotNull(forme);
CreatureLib::Library::TalentIndex ability;
if (this->_ability.IsEmpty()) {
ability = forme.value()->GetRandomTalent(rand);
@@ -79,10 +78,7 @@ namespace PkmnLib::Battling {
for (size_t i = 0; i < _attacks.Count(); i++) {
auto& kv = _attacks[i];
auto move = kv.Move;
if (move != nullptr)
attacks[i] = new LearnedMove(move, kv.LearnMethod);
else
attacks[i] = nullptr;
attacks[i] = new LearnedMove(move, kv.LearnMethod);
}
auto ivs = CreatureLib::Library::ClampedStatisticSet<uint8_t, 0, 31>(_ivHp, _ivAttack, _ivDefense, _ivSpAtt,
_ivSpDef, _ivSpeed);
@@ -156,7 +152,6 @@ namespace PkmnLib::Battling {
if (_currentMove >= _library->GetSettings()->GetMaximalAttacks()) {
throw ArbUt::Exception("This pokemon already has the maximal allowed moves.");
}
Assert(v.value() != nullptr);
_attacks.Append(ToLearnMethod(v.value(), method));
return *this;
}