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

This commit is contained in:
2020-08-16 11:12:04 +02:00
parent d9badefb07
commit b5a1d74bdb
9 changed files with 16 additions and 13 deletions

View File

@@ -34,7 +34,7 @@ float PkmnLib::Battling::StatCalculator::GetStatBoostModifier(const CreatureLib:
case 4: return 6.0 / 2;
case 5: return 7.0 / 2;
case 6: return 8.0 / 2;
default: throw CreatureException("Stat boost was out of expected range of -6 till 6.");
default: throw ArbUt::Exception("Stat boost was out of expected range of -6 till 6.");
}
}
CreatureLib::Library::StatisticSet<uint32_t>

View File

@@ -40,13 +40,13 @@ namespace PkmnLib::Battling {
if (!this->_library->GetSpeciesLibrary()->TryGet(this->_species, species)) {
std::stringstream err;
err << "Invalid species '" << _species << "'.";
throw CreatureException(err.str());
throw ArbUt::Exception(err.str());
}
ArbUt::BorrowedPtr<const PkmnLib::Library::PokemonForme> forme;
if (!species->TryGetForme(this->_forme, forme)) {
std::stringstream err;
err << "Invalid forme '" << _forme << "' for species '" << _forme << "'.";
throw CreatureException(err.str());
throw ArbUt::Exception(err.str());
}
AssertNotNull(forme);
CreatureLib::Library::TalentIndex ability;
@@ -151,7 +151,7 @@ namespace PkmnLib::Battling {
THROW_CREATURE("Invalid Move given: " << moveName.std_str());
}
if (_currentMove >= _library->GetSettings()->GetMaximalAttacks()) {
throw CreatureException("This pokemon already has the maximal allowed moves.");
throw ArbUt::Exception("This pokemon already has the maximal allowed moves.");
}
Assert(move != nullptr);
_attacks.Append(ToLearnMethod(move, method));