diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-10-26 20:46:09 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-10-26 20:46:09 +0000 |
| commit | 4385af885daf460a18e236f08509358f764b2c8c (patch) | |
| tree | 6c2838312dd7f42769280e24e8abc16b53c165cb /pokemod/Nature.cpp | |
| parent | 1f08afc80c73087bf9bde639754670548b89fc9f (diff) | |
Reverted repo back to rev24 because committing of rev25 messed up
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@26 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Nature.cpp')
| -rw-r--r-- | pokemod/Nature.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp index ac028170..816d005d 100644 --- a/pokemod/Nature.cpp +++ b/pokemod/Nature.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: pokemod/Nature.cpp -// Purpose: Define a nature that species can possess +// Purpose: Define a nature that Pokémon can possess // Author: Ben Boeckel // Modified by: Ben Boeckel // Created: Sun Mar 18 22:58:48 2007 @@ -24,8 +24,7 @@ PokeGen::PokeMod::Nature::Nature(const Pokemod* par, const unsigned _id) : Object(_id, par), - name(""), - weight(1) + name("") { for (unsigned i = 0; i < ST_End_GSC; ++i) stats[i].Set(1, 1, true); @@ -45,11 +44,6 @@ bool PokeGen::PokeMod::Nature::Validate() pokemod->ValidationMsg("Name is not defined"); isValid = false; } - if (!weight) - { - pokemod->ValidationMsg("Weight is not valid"); - isValid = false; - } return isValid; } @@ -68,7 +62,6 @@ void PokeGen::PokeMod::Nature::ImportIni(Ini& ini, const unsigned _id) ini.GetValue(QString("stat-%1-n").arg(k), j, 1); stats[k].Set(1, 1, true); } - ini.GetValue("weight", weight); } void PokeGen::PokeMod::Nature::ExportIni(QFile& fout) const @@ -80,7 +73,6 @@ void PokeGen::PokeMod::Nature::ExportIni(QFile& fout) const exNature.AddField(QString("stat-%1-n").arg(i), stats[i].GetNum()); exNature.AddField(QString("stat-%1-d").arg(i), stats[i].GetNum()); } - exNature.AddField("weight", weight); exNature.Export(fout); } @@ -110,19 +102,12 @@ bool PokeGen::PokeMod::Nature::SetStatDenom(const unsigned s, const unsigned d) return false; } -bool PokeGen::PokeMod::Nature::SetWeight(const unsigned w) -{ - if (w) - weight = w; - return (weight == w); -} - QString PokeGen::PokeMod::Nature::GetName() const { return name; } -PokeGen::Frac PokeGen::PokeMod::Nature::GetStat(const unsigned s) const +PokeGen::PokeMod::Frac PokeGen::PokeMod::Nature::GetStat(const unsigned s) const { if (s < (pokemod->IsSpecialSplit() ? ST_End_GSC : ST_End_RBY)) return stats[s]; @@ -138,8 +123,3 @@ unsigned PokeGen::PokeMod::Nature::GetStatDenom(const unsigned s) const { return GetStat(s).GetDenom(); } - -unsigned PokeGen::PokeMod::Nature::GetWeight() const -{ - return weight; -} |
