summaryrefslogtreecommitdiffstats
path: root/pokemod/Nature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/Nature.cpp')
-rw-r--r--pokemod/Nature.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/pokemod/Nature.cpp b/pokemod/Nature.cpp
index 02b434ad..1c6fc06d 100644
--- a/pokemod/Nature.cpp
+++ b/pokemod/Nature.cpp
@@ -24,7 +24,7 @@
#include "Pokemod.h"
#include "Nature.h"
-PokeMod::Nature::Nature(const Pokemod& par, const unsigned _id) :
+Nature::Nature(const Pokemod& par, const unsigned _id) :
Object(par, _id),
name(""),
weight(1)
@@ -33,19 +33,19 @@ PokeMod::Nature::Nature(const Pokemod& par, const unsigned _id) :
stats[i].set(1, 1, Frac::Improper);
}
-PokeMod::Nature::Nature(const Pokemod& par, const Nature& n, const unsigned _id) :
+Nature::Nature(const Pokemod& par, const Nature& n, const unsigned _id) :
Object(par, _id)
{
*this = n;
}
-PokeMod::Nature::Nature(const Pokemod& par, const QString& fname, const unsigned _id) :
+Nature::Nature(const Pokemod& par, const QString& fname, const unsigned _id) :
Object(par, _id)
{
load(fname, _id);
}
-bool PokeMod::Nature::validate() const
+bool Nature::validate() const
{
bool valid = true;
pokemod.validationMsg(QString("---Nature \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg);
@@ -62,7 +62,7 @@ bool PokeMod::Nature::validate() const
return valid;
}
-void PokeMod::Nature::load(const QString& fname, const unsigned _id) throw(Exception)
+void Nature::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -81,7 +81,7 @@ void PokeMod::Nature::load(const QString& fname, const unsigned _id) throw(Excep
ini.getValue("weight", weight);
}
-void PokeMod::Nature::save() const throw(Exception)
+void Nature::save() const throw(Exception)
{
Ini ini;
ini.addField("name", name);
@@ -94,57 +94,57 @@ void PokeMod::Nature::save() const throw(Exception)
ini.save(QString("%1/nature/%2.pini").arg(pokemod.getPath()).arg(name));
}
-void PokeMod::Nature::setName(const QString& n)
+void Nature::setName(const QString& n)
{
name = n;
}
-void PokeMod::Nature::setStat(const unsigned s, const unsigned n, const unsigned d) throw(Exception)
+void Nature::setStat(const unsigned s, const unsigned n, const unsigned d) throw(Exception)
{
if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
throw(BoundsException("Nature", "stat"));
stats[s].set(n, d);
}
-void PokeMod::Nature::setStatNum(const unsigned s, const unsigned n) throw(Exception)
+void Nature::setStatNum(const unsigned s, const unsigned n) throw(Exception)
{
if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
throw(BoundsException("Nature", "stat"));
stats[s].setNum(n);
}
-void PokeMod::Nature::setStatDenom(const unsigned s, const unsigned d) throw(Exception)
+void Nature::setStatDenom(const unsigned s, const unsigned d) throw(Exception)
{
if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
throw(BoundsException("Nature", "stat"));
stats[s].setDenom(d);
}
-void PokeMod::Nature::setWeight(const unsigned w) throw(BoundsException)
+void Nature::setWeight(const unsigned w) throw(BoundsException)
{
if (!w)
throw(BoundsException("Nature", "weight"));
weight = w;
}
-QString PokeMod::Nature::getName() const
+QString Nature::getName() const
{
return name;
}
-Frac PokeMod::Nature::getStat(const unsigned s) const throw(BoundsException)
+Frac Nature::getStat(const unsigned s) const throw(BoundsException)
{
if ((pokemod.getRules().getSpecialSplit() ? ST_End_GSC : ST_End_RBY) <= s)
throw(BoundsException("Nature", "stat"));
return stats[s];
}
-unsigned PokeMod::Nature::getWeight() const
+unsigned Nature::getWeight() const
{
return weight;
}
-PokeMod::Nature& PokeMod::Nature::operator=(const Nature& rhs)
+Nature& Nature::operator=(const Nature& rhs)
{
if (this == &rhs)
return *this;