diff options
Diffstat (limited to 'pokemod/ItemEffect.cpp')
-rw-r--r-- | pokemod/ItemEffect.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/pokemod/ItemEffect.cpp b/pokemod/ItemEffect.cpp index 4581b5e5..2a115a07 100644 --- a/pokemod/ItemEffect.cpp +++ b/pokemod/ItemEffect.cpp @@ -22,16 +22,16 @@ #include "ItemEffect.h" -const char* PokeGen::PokeMod::ItemEffect::EffectStr[PokeGen::PokeMod::ItemEffect::E_End] = {"HP Cure", "Revive", "Cure Status", "Level Boost", "Stat Boost", "Flinch", "Go First", "Keep Alive", "Modify Stat (Battle Only)", "Shield (Battle Only)", "Run (Battle Only)", "PP Boost", "Type Boost", "PP Restore", "Experience Share", "Fishing Rod", "Repel", "Escape", "TM", "HM", "Map", "Ball", "Itemfinder", "Bike", "Scope", "Coin", "Coin Case", "Berry", "Acorn"}; -const char* PokeGen::PokeMod::ItemEffect::RelativeStr[PokeGen::PokeMod::ItemEffect::R_End] = {"Absolute", "Relative"}; -const char* PokeGen::PokeMod::ItemEffect::EscapeStr[PokeGen::PokeMod::ItemEffect::ES_End] = {"Anywhere", "Dungeon"}; -const char* PokeGen::PokeMod::ItemEffect::RepelStr[PokeGen::PokeMod::ItemEffect::RP_End] = {"First", "Max", "All"}; -const char* PokeGen::PokeMod::ItemEffect::AmountStr[PokeGen::PokeMod::ItemEffect::A_End] = {"All", "One"}; -const char* PokeGen::PokeMod::ItemEffect::SpecialPhysicalStr[PokeGen::PokeMod::ItemEffect::SP_End] = {"Special", "Physical"}; -const char* PokeGen::PokeMod::ItemEffect::BallTypeStr[PokeGen::PokeMod::ItemEffect::B_End] = {"Regular", "Master", "Level", "Love", "Area", "Time", "Battle", "Friend", "Stat", "Type", "Weight"}; -const char* PokeGen::PokeMod::ItemEffect::BerryTypeStr[PokeGen::PokeMod::ItemEffect::B2_End] = {"HP Cure", "Status Cure"}; +const char* PokeMod::ItemEffect::EffectStr[PokeMod::ItemEffect::E_End] = {"HP Cure", "Revive", "Cure Status", "Level Boost", "Stat Boost", "Flinch", "Go First", "Keep Alive", "Modify Stat (Battle Only)", "Shield (Battle Only)", "Run (Battle Only)", "PP Boost", "Type Boost", "PP Restore", "Experience Share", "Fishing Rod", "Repel", "Escape", "TM", "HM", "Map", "Ball", "Itemfinder", "Bike", "Scope", "Coin", "Coin Case", "Berry", "Acorn"}; +const char* PokeMod::ItemEffect::RelativeStr[PokeMod::ItemEffect::R_End] = {"Absolute", "Relative"}; +const char* PokeMod::ItemEffect::EscapeStr[PokeMod::ItemEffect::ES_End] = {"Anywhere", "Dungeon"}; +const char* PokeMod::ItemEffect::RepelStr[PokeMod::ItemEffect::RP_End] = {"First", "Max", "All"}; +const char* PokeMod::ItemEffect::AmountStr[PokeMod::ItemEffect::A_End] = {"All", "One"}; +const char* PokeMod::ItemEffect::SpecialPhysicalStr[PokeMod::ItemEffect::SP_End] = {"Special", "Physical"}; +const char* PokeMod::ItemEffect::BallTypeStr[PokeMod::ItemEffect::B_End] = {"Regular", "Master", "Level", "Love", "Area", "Time", "Battle", "Friend", "Stat", "Type", "Weight"}; +const char* PokeMod::ItemEffect::BerryTypeStr[PokeMod::ItemEffect::B2_End] = {"HP Cure", "Status Cure"}; -PokeGen::PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const unsigned _id) : +PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const unsigned _id) : Object(par, _id), overworld(false), battle(false), @@ -44,19 +44,19 @@ PokeGen::PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const unsigned _id) { } -PokeGen::PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const ItemEffect& e, const unsigned _id) : +PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const ItemEffect& e, const unsigned _id) : Object(par, _id) { *this = e; } -PokeGen::PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const QString& fname, const unsigned _id) : +PokeMod::ItemEffect::ItemEffect(const Pokemod& par, const QString& fname, const unsigned _id) : Object(par, _id) { load(fname, _id); } -bool PokeGen::PokeMod::ItemEffect::validate() const +bool PokeMod::ItemEffect::validate() const { bool valid = true; pokemod.validationMsg(QString("------Effect with id %1---").arg(id), Pokemod::V_Msg); @@ -295,7 +295,7 @@ bool PokeGen::PokeMod::ItemEffect::validate() const return valid; } -void PokeGen::PokeMod::ItemEffect::load(const QString& fname, const unsigned _id) throw(Exception) +void PokeMod::ItemEffect::load(const QString& fname, const unsigned _id) throw(Exception) { Ini ini(fname); if (_id == UINT_MAX) @@ -316,7 +316,7 @@ void PokeGen::PokeMod::ItemEffect::load(const QString& fname, const unsigned _id val4.set(i, j); } -void PokeGen::PokeMod::ItemEffect::save(const QString& item) const throw(Exception) +void PokeMod::ItemEffect::save(const QString& item) const throw(Exception) { Ini ini; ini.addField("id", id); @@ -332,7 +332,7 @@ void PokeGen::PokeMod::ItemEffect::save(const QString& item) const throw(Excepti ini.save(QString("%1/item/%2/effect/%3.pini").arg(pokemod.getPath()).arg(item).arg(id)); } -void PokeGen::PokeMod::ItemEffect::setOverworld(const bool o) throw(Exception) +void PokeMod::ItemEffect::setOverworld(const bool o) throw(Exception) { switch (effect) { @@ -373,17 +373,17 @@ void PokeGen::PokeMod::ItemEffect::setOverworld(const bool o) throw(Exception) overworld = o; } -void PokeGen::PokeMod::ItemEffect::setBattle(const bool b) +void PokeMod::ItemEffect::setBattle(const bool b) { battle = b; } -void PokeGen::PokeMod::ItemEffect::setHeld(const bool h) +void PokeMod::ItemEffect::setHeld(const bool h) { held = h; } -void PokeGen::PokeMod::ItemEffect::setEffect(const unsigned e) throw(Exception) +void PokeMod::ItemEffect::setEffect(const unsigned e) throw(Exception) { if (E_End <= e) throw(BoundsException("ItemEffect", "effect out-of-bounds")); @@ -430,7 +430,7 @@ void PokeGen::PokeMod::ItemEffect::setEffect(const unsigned e) throw(Exception) val4.set(1, 1, ((e == E_TypeBoost) || (e == E_PPBoost)) ? Frac::Over1 : Frac::Proper); } -void PokeGen::PokeMod::ItemEffect::setVal1(const int v1) throw(Exception) +void PokeMod::ItemEffect::setVal1(const int v1) throw(Exception) { switch (effect) { @@ -491,7 +491,7 @@ void PokeGen::PokeMod::ItemEffect::setVal1(const int v1) throw(Exception) val1 = v1; } -void PokeGen::PokeMod::ItemEffect::setVal2(const unsigned v2) throw(Exception) +void PokeMod::ItemEffect::setVal2(const unsigned v2) throw(Exception) { switch (effect) { @@ -563,7 +563,7 @@ void PokeGen::PokeMod::ItemEffect::setVal2(const unsigned v2) throw(Exception) val2 = v2; } -void PokeGen::PokeMod::ItemEffect::setVal3(const unsigned v3) throw(Exception) +void PokeMod::ItemEffect::setVal3(const unsigned v3) throw(Exception) { switch (effect) { @@ -625,7 +625,7 @@ void PokeGen::PokeMod::ItemEffect::setVal3(const unsigned v3) throw(Exception) val3 = v3; } -void PokeGen::PokeMod::ItemEffect::setVal4(const unsigned n, const unsigned d) throw(Exception) +void PokeMod::ItemEffect::setVal4(const unsigned n, const unsigned d) throw(Exception) { switch (effect) { @@ -658,7 +658,7 @@ void PokeGen::PokeMod::ItemEffect::setVal4(const unsigned n, const unsigned d) t val4.set(n, d); } -void PokeGen::PokeMod::ItemEffect::setVal4Num(const unsigned n) throw(Exception) +void PokeMod::ItemEffect::setVal4Num(const unsigned n) throw(Exception) { switch (effect) { @@ -691,7 +691,7 @@ void PokeGen::PokeMod::ItemEffect::setVal4Num(const unsigned n) throw(Exception) val4.setNum(n); } -void PokeGen::PokeMod::ItemEffect::setVal4Denom(const unsigned d) throw(Exception) +void PokeMod::ItemEffect::setVal4Denom(const unsigned d) throw(Exception) { switch (effect) { @@ -724,57 +724,57 @@ void PokeGen::PokeMod::ItemEffect::setVal4Denom(const unsigned d) throw(Exceptio val4.setDenom(d); } -bool PokeGen::PokeMod::ItemEffect::getOverworld() const +bool PokeMod::ItemEffect::getOverworld() const { return overworld; } -bool PokeGen::PokeMod::ItemEffect::getBattle() const +bool PokeMod::ItemEffect::getBattle() const { return battle; } -bool PokeGen::PokeMod::ItemEffect::getHeld() const +bool PokeMod::ItemEffect::getHeld() const { return held; } -unsigned PokeGen::PokeMod::ItemEffect::getEffect() const +unsigned PokeMod::ItemEffect::getEffect() const { return effect; } -int PokeGen::PokeMod::ItemEffect::getVal1() const +int PokeMod::ItemEffect::getVal1() const { return val1; } -unsigned PokeGen::PokeMod::ItemEffect::getVal2() const +unsigned PokeMod::ItemEffect::getVal2() const { return val2; } -unsigned PokeGen::PokeMod::ItemEffect::getVal3() const +unsigned PokeMod::ItemEffect::getVal3() const { return val3; } -PokeGen::Frac PokeGen::PokeMod::ItemEffect::getVal4() const +Frac PokeMod::ItemEffect::getVal4() const { return val4; } -unsigned PokeGen::PokeMod::ItemEffect::getVal4Num() const +unsigned PokeMod::ItemEffect::getVal4Num() const { return val4.getNum(); } -unsigned PokeGen::PokeMod::ItemEffect::getVal4Denom() const +unsigned PokeMod::ItemEffect::getVal4Denom() const { return val4.getDenom(); } -PokeGen::PokeMod::ItemEffect& PokeGen::PokeMod::ItemEffect::operator=(const ItemEffect& rhs) +PokeMod::ItemEffect& PokeMod::ItemEffect::operator=(const ItemEffect& rhs) { if (this == &rhs) return *this; |