summaryrefslogtreecommitdiffstats
path: root/pokemod/MoveEffect.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-01-19 01:22:22 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-01-19 01:22:22 +0000
commit342d0201b07d9030fced2f3baf3ecdefc841879a (patch)
treef0715cc7b267e2ce2bc93971d9e95c7e0c9b2b62 /pokemod/MoveEffect.cpp
parentd017d90324a439dfb4bd3f25d30deb672bc40fd4 (diff)
downloadsigen-342d0201b07d9030fced2f3baf3ecdefc841879a.tar.gz
sigen-342d0201b07d9030fced2f3baf3ecdefc841879a.tar.xz
sigen-342d0201b07d9030fced2f3baf3ecdefc841879a.zip
[DEL] Removed PokeGen namespace
[ADD] general/AudioCache.h completed [DEL] VERSION removed from subdir .pro files [DEL] audio/ git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@33 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/MoveEffect.cpp')
-rw-r--r--pokemod/MoveEffect.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/pokemod/MoveEffect.cpp b/pokemod/MoveEffect.cpp
index edae397f..297e3344 100644
--- a/pokemod/MoveEffect.cpp
+++ b/pokemod/MoveEffect.cpp
@@ -22,9 +22,9 @@
#include "MoveEffect.h"
-const char* PokeGen::PokeMod::MoveEffect::EffectStr[PokeGen::PokeMod::MoveEffect::E_End_Overworld] = {"Damage", "Status", "Confuse", "Stat", "StealHP", "Counter", "Selfdestruct", "Need Status", "Mirror", "GetMoney", "Never Miss", "Steal Types", "Clear Effects", "Wait And Return", "Self Confuse", "Force Switch", "Hit Multiple", "Hit Multiple Turns", "Flinch", "One Hit K.O.", "Recoil", "Recover", "Rest", "Sheild", "Substitute", "Recharge", "Rage", "Mimic", "Random Move", "Seed", "Disable", "Cut HM", "Fly HM", "Surf HM", "Strength HM", "Flash HM", "Rock Smash HM", "Rock Climb HM", "Whirlpool HM", "Waterfall HM", "Share HP HM ", "Escape HM"};
+const char* PokeMod::MoveEffect::EffectStr[PokeMod::MoveEffect::E_End_Overworld] = {"Damage", "Status", "Confuse", "Stat", "StealHP", "Counter", "Selfdestruct", "Need Status", "Mirror", "GetMoney", "Never Miss", "Steal Types", "Clear Effects", "Wait And Return", "Self Confuse", "Force Switch", "Hit Multiple", "Hit Multiple Turns", "Flinch", "One Hit K.O.", "Recoil", "Recover", "Rest", "Sheild", "Substitute", "Recharge", "Rage", "Mimic", "Random Move", "Seed", "Disable", "Cut HM", "Fly HM", "Surf HM", "Strength HM", "Flash HM", "Rock Smash HM", "Rock Climb HM", "Whirlpool HM", "Waterfall HM", "Share HP HM ", "Escape HM"};
-PokeGen::PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const unsigned _id) :
+PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const unsigned _id) :
Object(par, _id),
chance(1, 1),
effect(UINT_MAX),
@@ -35,19 +35,19 @@ PokeGen::PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const unsigned _id)
{
}
-PokeGen::PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const MoveEffect& e, const unsigned _id) :
+PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const MoveEffect& e, const unsigned _id) :
Object(par, _id)
{
*this = e;
}
-PokeGen::PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const QString& fname, const unsigned _id) :
+PokeMod::MoveEffect::MoveEffect(const Pokemod& par, const QString& fname, const unsigned _id) :
Object(par, _id)
{
load(fname, _id);
}
-bool PokeGen::PokeMod::MoveEffect::validate() const
+bool PokeMod::MoveEffect::validate() const
{
bool valid = true;
pokemod.validationMsg(QString("------Effect with id %1---").arg(id), Pokemod::V_Msg);
@@ -55,7 +55,7 @@ bool PokeGen::PokeMod::MoveEffect::validate() const
return valid;
}
-void PokeGen::PokeMod::MoveEffect::load(const QString& fname, const unsigned _id) throw(Exception)
+void PokeMod::MoveEffect::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -78,7 +78,7 @@ void PokeGen::PokeMod::MoveEffect::load(const QString& fname, const unsigned _id
val4.set(i, j, k);
}
-void PokeGen::PokeMod::MoveEffect::save(const QString& move) const throw(Exception)
+void PokeMod::MoveEffect::save(const QString& move) const throw(Exception)
{
Ini ini;
ini.addField("id", id);
@@ -94,22 +94,22 @@ void PokeGen::PokeMod::MoveEffect::save(const QString& move) const throw(Excepti
ini.save(QString("%1/move/%2/effect/%3.pini").arg(pokemod.getPath()).arg(move).arg(id));
}
-void PokeGen::PokeMod::MoveEffect::setChance(const unsigned n, const unsigned d) throw(Exception)
+void PokeMod::MoveEffect::setChance(const unsigned n, const unsigned d) throw(Exception)
{
chance.set(n, d);
}
-void PokeGen::PokeMod::MoveEffect::setChanceNum(const unsigned n) throw(Exception)
+void PokeMod::MoveEffect::setChanceNum(const unsigned n) throw(Exception)
{
chance.setNum(n);
}
-void PokeGen::PokeMod::MoveEffect::setChanceDenom(const unsigned d) throw(Exception)
+void PokeMod::MoveEffect::setChanceDenom(const unsigned d) throw(Exception)
{
chance.setDenom(d);
}
-void PokeGen::PokeMod::MoveEffect::setEffect(const unsigned e) throw(BoundsException)
+void PokeMod::MoveEffect::setEffect(const unsigned e) throw(BoundsException)
{
if (E_End <= e)
throw(BoundsException("MoveEffect", "effect"));
@@ -120,7 +120,7 @@ void PokeGen::PokeMod::MoveEffect::setEffect(const unsigned e) throw(BoundsExcep
val4.set(1, 1, ((e == E_StealHP) || (e == E_Counter) || (e == E_Selfdestruct) || (e == E_Mirror) || (e == E_GetMoney) || (e == E_WaitAndReturn) || (e == E_Recoil)) ? Frac::Improper : Frac::Proper);
}
-void PokeGen::PokeMod::MoveEffect::setVal1(const unsigned v1) throw(Exception)
+void PokeMod::MoveEffect::setVal1(const unsigned v1) throw(Exception)
{
switch (effect)
{
@@ -153,7 +153,7 @@ void PokeGen::PokeMod::MoveEffect::setVal1(const unsigned v1) throw(Exception)
val1 = v1;
}
-void PokeGen::PokeMod::MoveEffect::setVal2(const unsigned v2) throw(Exception)
+void PokeMod::MoveEffect::setVal2(const unsigned v2) throw(Exception)
{
switch (effect)
{
@@ -168,7 +168,7 @@ void PokeGen::PokeMod::MoveEffect::setVal2(const unsigned v2) throw(Exception)
val2 = v2;
}
-void PokeGen::PokeMod::MoveEffect::setVal3(const int v3)
+void PokeMod::MoveEffect::setVal3(const int v3)
{
switch (effect)
{
@@ -179,72 +179,72 @@ void PokeGen::PokeMod::MoveEffect::setVal3(const int v3)
val3 = v3;
}
-void PokeGen::PokeMod::MoveEffect::setVal4(const unsigned n, const unsigned d) throw(Exception)
+void PokeMod::MoveEffect::setVal4(const unsigned n, const unsigned d) throw(Exception)
{
val4.set(n, d);
}
-void PokeGen::PokeMod::MoveEffect::setVal4Num(const unsigned n) throw(Exception)
+void PokeMod::MoveEffect::setVal4Num(const unsigned n) throw(Exception)
{
val4.setNum(n);
}
-void PokeGen::PokeMod::MoveEffect::setVal4Denom(const unsigned d) throw(Exception)
+void PokeMod::MoveEffect::setVal4Denom(const unsigned d) throw(Exception)
{
val4.setDenom(d);
}
-PokeGen::Frac PokeGen::PokeMod::MoveEffect::getChance() const
+Frac PokeMod::MoveEffect::getChance() const
{
return chance;
}
-unsigned PokeGen::PokeMod::MoveEffect::getChanceNum() const
+unsigned PokeMod::MoveEffect::getChanceNum() const
{
return chance.getNum();
}
-unsigned PokeGen::PokeMod::MoveEffect::getChanceDenom() const
+unsigned PokeMod::MoveEffect::getChanceDenom() const
{
return chance.getDenom();
}
-unsigned PokeGen::PokeMod::MoveEffect::getEffect() const
+unsigned PokeMod::MoveEffect::getEffect() const
{
return effect;
}
-unsigned PokeGen::PokeMod::MoveEffect::getVal1() const
+unsigned PokeMod::MoveEffect::getVal1() const
{
return val1;
}
-unsigned PokeGen::PokeMod::MoveEffect::getVal2() const
+unsigned PokeMod::MoveEffect::getVal2() const
{
return val2;
}
-int PokeGen::PokeMod::MoveEffect::getVal3() const
+int PokeMod::MoveEffect::getVal3() const
{
return val3;
}
-PokeGen::Frac PokeGen::PokeMod::MoveEffect::getVal4() const
+Frac PokeMod::MoveEffect::getVal4() const
{
return val4;
}
-unsigned PokeGen::PokeMod::MoveEffect::getVal4Num() const
+unsigned PokeMod::MoveEffect::getVal4Num() const
{
return val4.getNum();
}
-unsigned PokeGen::PokeMod::MoveEffect::getVal4Denom() const
+unsigned PokeMod::MoveEffect::getVal4Denom() const
{
return val4.getDenom();
}
-PokeGen::PokeMod::MoveEffect& PokeGen::PokeMod::MoveEffect::operator=(const MoveEffect& rhs)
+PokeMod::MoveEffect& PokeMod::MoveEffect::operator=(const MoveEffect& rhs)
{
if (this == &rhs)
return *this;