diff options
Diffstat (limited to 'pokemod/Move.cpp')
| -rw-r--r-- | pokemod/Move.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pokemod/Move.cpp b/pokemod/Move.cpp index f38a62b3..68749cac 100644 --- a/pokemod/Move.cpp +++ b/pokemod/Move.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: pokemod/Move.cpp -// Purpose: Define a move that Pokémon can learn +// Purpose: Define a move that species can learn // Author: Ben Boeckel // Modified by: Ben Boeckel // Created: Sat May 26 2007 22:51:21 @@ -22,6 +22,9 @@ #include "Move.h" +const char* PokeGen::PokeMod::Move::TargetStr[PokeGen::PokeMod::Move::T_End] = {"Player", "Enemy", "Both", "Random"}; +const char* PokeGen::PokeMod::Move::ChoiceStr[PokeGen::PokeMod::Move::C_End] = {"Player", "Enemy", "Random"}; + PokeGen::PokeMod::Move::Move(const Pokemod* par, const unsigned _id) : Object(_id, par), name(""), @@ -232,7 +235,7 @@ QString PokeGen::PokeMod::Move::GetName() const return name; } -PokeGen::PokeMod::Frac PokeGen::PokeMod::Move::GetAccuracy() const +PokeGen::Frac PokeGen::PokeMod::Move::GetAccuracy() const { return accuracy; } @@ -322,11 +325,8 @@ unsigned PokeGen::PokeMod::Move::GetEffectCount() const const PokeGen::PokeMod::MoveEffect* PokeGen::PokeMod::Move::NewEffect(Ini* const ini) { unsigned i = 0; - for (; i < GetEffectCount(); ++i) - { - if (!GetEffect(i)) - break; - } + for (; (i < GetEffectCount()) && (GetEffectByID(i) != UINT_MAX); ++i) + ; MoveEffect newEffect(pokemod, i); if (ini) newEffect.ImportIni(*ini); |
