diff options
Diffstat (limited to 'pokemod/Ability.cpp')
| -rw-r--r-- | pokemod/Ability.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pokemod/Ability.cpp b/pokemod/Ability.cpp index 042a81e0..de32f4b3 100644 --- a/pokemod/Ability.cpp +++ b/pokemod/Ability.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: pokemod/Ability.cpp -// Purpose: Define an ability that Pokémon can possess to add extra +// Purpose: Define an ability that species can possess to add extra // dynamics to the battle system // Author: Ben Boeckel // Modified by: Ben Boeckel @@ -125,11 +125,8 @@ unsigned PokeGen::PokeMod::Ability::GetEffectCount() const const PokeGen::PokeMod::AbilityEffect* PokeGen::PokeMod::Ability::NewEffect(Ini* const ini) { unsigned i = 0; - for (; i < GetEffectCount(); ++i) - { - if (GetEffectByID(i) == UINT_MAX) - break; - } + for (; (i < GetEffectCount()) && (GetEffectByID(i) != UINT_MAX); ++i) + ; AbilityEffect newEffect(pokemod, i); if (ini) newEffect.ImportIni(*ini); |
