Fixed issue where you couldn't teach all moves.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-22 14:29:19 +02:00
parent bb5d9d64fe
commit babb384166
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ PkmnLib::Battling::CreatePokemon::LearnMove(const Arbutils::CaseInsensitiveConst
if (!_library->GetMoveLibrary()->TryGet(moveName, move)) {
throw CreatureException("Invalid Move given: " + moveName.std_str());
}
if (_currentMove >= _library->GetSettings()->GetMaximalMoves() - 1) {
if (_currentMove >= _library->GetSettings()->GetMaximalMoves()) {
throw CreatureException("This pokemon already has the maximal allowed moves.");
}
Assert(move != nullptr);