Fixed issue where you couldn't teach all moves.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
bb5d9d64fe
commit
babb384166
|
@ -154,7 +154,7 @@ PkmnLib::Battling::CreatePokemon::LearnMove(const Arbutils::CaseInsensitiveConst
|
||||||
if (!_library->GetMoveLibrary()->TryGet(moveName, move)) {
|
if (!_library->GetMoveLibrary()->TryGet(moveName, move)) {
|
||||||
throw CreatureException("Invalid Move given: " + moveName.std_str());
|
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.");
|
throw CreatureException("This pokemon already has the maximal allowed moves.");
|
||||||
}
|
}
|
||||||
Assert(move != nullptr);
|
Assert(move != nullptr);
|
||||||
|
|
Loading…
Reference in New Issue