From babb384166e860b670a14e8791972b70d5379c9d Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 22 Apr 2020 14:29:19 +0200 Subject: [PATCH] Fixed issue where you couldn't teach all moves. --- src/Battling/Pokemon/CreatePokemon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Battling/Pokemon/CreatePokemon.cpp b/src/Battling/Pokemon/CreatePokemon.cpp index d634c61..0b4c307 100644 --- a/src/Battling/Pokemon/CreatePokemon.cpp +++ b/src/Battling/Pokemon/CreatePokemon.cpp @@ -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);