summaryrefslogtreecommitdiffstats
path: root/pokemod/Nature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Nature.cpp')
-rw-r--r--pokemod/Nature.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp
index eaacfab8..fa52ef43 100644
--- a/pokemod/Nature.cpp
+++ b/pokemod/Nature.cpp
@@ -28,7 +28,7 @@ Nature::Nature(const Pokemod* par, const int _id) :
name(""),
weight(1)
{
- for (int i = 0; i < ST_End_GSC; ++i)
+ for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
stats[i].set(1, 1, Frac::Improper);
}
@@ -71,7 +71,7 @@ void Nature::load(const QString& fname, const int _id) throw(Exception)
int i;
int j;
ini.getValue("name", name);
- for (int k = 0; k < ST_End_GSC; ++k)
+ for (int k = 0; k < Pokemod::ST_End_GSC; ++k)
{
ini.getValue(QString("stat-%1-n").arg(k), i, 1);
ini.getValue(QString("stat-%1-n").arg(k), j, 1);
@@ -84,7 +84,7 @@ void Nature::save() const throw(Exception)
{
Ini ini;
ini.addField("name", name);
- for (int i = 0; i < ST_End_GSC; ++i)
+ for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
{
ini.addField(QString("stat-%1-n").arg(i), stats[i].getNum());
ini.addField(QString("stat-%1-d").arg(i), stats[i].getNum());
@@ -100,21 +100,21 @@ void Nature::setName(const QString& n)
void Nature::setStat(const int s, const int n, const int d) throw(Exception)
{
- if ((pokemod->getRules()->getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
+ if ((pokemod->getRules()->getSpecialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY) <= s)
throw(BoundsException(className, "stat"));
stats[s].set(n, d);
}
void Nature::setStatNum(const int s, const int n) throw(Exception)
{
- if ((pokemod->getRules()->getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
+ if ((pokemod->getRules()->getSpecialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY) <= s)
throw(BoundsException(className, "stat"));
stats[s].setNum(n);
}
void Nature::setStatDenom(const int s, const int d) throw(Exception)
{
- if ((pokemod->getRules()->getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
+ if ((pokemod->getRules()->getSpecialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY) <= s)
throw(BoundsException(className, "stat"));
stats[s].setDenom(d);
}
@@ -133,7 +133,7 @@ QString Nature::getName() const
Frac Nature::getStat(const int s) const throw(BoundsException)
{
- if ((pokemod->getRules()->getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
+ if ((pokemod->getRules()->getSpecialSplit() ? Pokemod::ST_End_GSC : Pokemod::ST_End_RBY) <= s)
throw(BoundsException(className, "stat"));
return stats[s];
}
@@ -148,7 +148,7 @@ Nature& Nature::operator=(const Nature& rhs)
if (this == &rhs)
return *this;
name = rhs.name;
- for (int i = 0; i < ST_End_GSC; ++i)
+ for (int i = 0; i < Pokemod::ST_End_GSC; ++i)
stats[i] = rhs.stats[i];
weight = rhs.weight;
return *this;