diff options
Diffstat (limited to 'pokemod/AbilityEffect.cpp')
| -rw-r--r-- | pokemod/AbilityEffect.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/pokemod/AbilityEffect.cpp b/pokemod/AbilityEffect.cpp index edd84312..dd47c900 100644 --- a/pokemod/AbilityEffect.cpp +++ b/pokemod/AbilityEffect.cpp @@ -26,17 +26,17 @@ #include "Type.h" #include "AbilityEffect.h" -const QStringList PokeMod::AbilityEffect::EffectStr = QStringList() << "Damage to HP" << "Prevent Damage" << "Auto Heal" << "Deal Damage" << "Wilds" << "Stat" << "Status" << "Ability" << "Accuracy/Power Trade" << "Bullseye" << "Item Effect" << "Type" << "Fast Hatch" << "Weather"; -const QStringList PokeMod::AbilityEffect::TriggerStr = QStringList() << "Anything" << "Contact" << "Weather" << "Damage" << "Type" << "HP Boundary" << "Stat Change" << "Status"; -const QStringList PokeMod::AbilityEffect::InteractStr = QStringList() << "Trade" << "Shadow" << "Block"; -const QStringList PokeMod::AbilityEffect::PowerAccStr = QStringList() << "Boost Power" << "Boost Accuracy"; -const QStringList PokeMod::AbilityEffect::ItemStr = QStringList() << "Stat Modifier" << "Type Booster" << "Flinch" << "Go First"; -const QStringList PokeMod::AbilityEffect::CauseStr = QStringList() << "Prevent" << "Inflict"; -const QStringList PokeMod::AbilityEffect::BoostStr = QStringList() << "Boost" << "Hinder"; -const QStringList PokeMod::AbilityEffect::SideStr = QStringList() << "Above" << "Below"; +const QStringList AbilityEffect::EffectStr = QStringList() << "Damage to HP" << "Prevent Damage" << "Auto Heal" << "Deal Damage" << "Wilds" << "Stat" << "Status" << "Ability" << "Accuracy/Power Trade" << "Bullseye" << "Item Effect" << "Type" << "Fast Hatch" << "Weather"; +const QStringList AbilityEffect::TriggerStr = QStringList() << "Anything" << "Contact" << "Weather" << "Damage" << "Type" << "HP Boundary" << "Stat Change" << "Status"; +const QStringList AbilityEffect::InteractStr = QStringList() << "Trade" << "Shadow" << "Block"; +const QStringList AbilityEffect::PowerAccStr = QStringList() << "Boost Power" << "Boost Accuracy"; +const QStringList AbilityEffect::ItemStr = QStringList() << "Stat Modifier" << "Type Booster" << "Flinch" << "Go First"; +const QStringList AbilityEffect::CauseStr = QStringList() << "Prevent" << "Inflict"; +const QStringList AbilityEffect::BoostStr = QStringList() << "Boost" << "Hinder"; +const QStringList AbilityEffect::SideStr = QStringList() << "Above" << "Below"; -PokeMod::AbilityEffect::AbilityEffect(const Pokemod& par, const unsigned _id) : +AbilityEffect::AbilityEffect(const Pokemod& par, const unsigned _id) : Object(par, _id), chance(1, 1), effect(UINT_MAX), @@ -49,19 +49,19 @@ PokeMod::AbilityEffect::AbilityEffect(const Pokemod& par, const unsigned _id) : { } -PokeMod::AbilityEffect::AbilityEffect(const Pokemod& par, const AbilityEffect& e, const unsigned _id) : +AbilityEffect::AbilityEffect(const Pokemod& par, const AbilityEffect& e, const unsigned _id) : Object(par, _id) { *this = e; } -PokeMod::AbilityEffect::AbilityEffect(const Pokemod& par, const QString& fname, const unsigned _id) : +AbilityEffect::AbilityEffect(const Pokemod& par, const QString& fname, const unsigned _id) : Object(par, _id) { load(fname, _id); } -bool PokeMod::AbilityEffect::validate() const +bool AbilityEffect::validate() const { bool valid = true; pokemod.validationMsg(QString("------Effect with id %1---").arg(id), Pokemod::V_Msg); @@ -201,7 +201,7 @@ bool PokeMod::AbilityEffect::validate() const return valid; } -void PokeMod::AbilityEffect::load(const QString& fname, const unsigned _id) throw(Exception) +void AbilityEffect::load(const QString& fname, const unsigned _id) throw(Exception) { Ini ini(fname); if (_id == UINT_MAX) @@ -224,7 +224,7 @@ void PokeMod::AbilityEffect::load(const QString& fname, const unsigned _id) thro tval2.set(i, j); } -void PokeMod::AbilityEffect::save(const QString& ability) const throw(Exception) +void AbilityEffect::save(const QString& ability) const throw(Exception) { Ini ini; ini.addField("id", id); @@ -241,22 +241,22 @@ void PokeMod::AbilityEffect::save(const QString& ability) const throw(Exception) ini.save(QString("%1/ability/%2/effect/%3.pini").arg(pokemod.getPath()).arg(ability).arg(id)); } -void PokeMod::AbilityEffect::setChance(const unsigned n, const unsigned d) throw(Exception) +void AbilityEffect::setChance(const unsigned n, const unsigned d) throw(Exception) { chance.set(n, d); } -void PokeMod::AbilityEffect::setChanceNum(const unsigned n) throw(Exception) +void AbilityEffect::setChanceNum(const unsigned n) throw(Exception) { chance.setNum(n); } -void PokeMod::AbilityEffect::setChanceDenom(const unsigned d) throw(Exception) +void AbilityEffect::setChanceDenom(const unsigned d) throw(Exception) { chance.setDenom(d); } -void PokeMod::AbilityEffect::setEffect(const unsigned e) throw(BoundsException) +void AbilityEffect::setEffect(const unsigned e) throw(BoundsException) { if (E_End <= e) throw(BoundsException("AbilityEffect", "effect")); @@ -266,7 +266,7 @@ void PokeMod::AbilityEffect::setEffect(const unsigned e) throw(BoundsException) val3 = INT_MAX; } -void PokeMod::AbilityEffect::setVal1(const unsigned v1) throw(Exception) +void AbilityEffect::setVal1(const unsigned v1) throw(Exception) { switch (effect) { @@ -305,7 +305,7 @@ void PokeMod::AbilityEffect::setVal1(const unsigned v1) throw(Exception) val1 = v1; } -void PokeMod::AbilityEffect::setVal2(const unsigned v2) throw(Exception) +void AbilityEffect::setVal2(const unsigned v2) throw(Exception) { switch (effect) { @@ -333,7 +333,7 @@ void PokeMod::AbilityEffect::setVal2(const unsigned v2) throw(Exception) val2 = v2; } -void PokeMod::AbilityEffect::setVal3(const int v3) throw(Exception) +void AbilityEffect::setVal3(const int v3) throw(Exception) { switch (effect) { @@ -359,7 +359,7 @@ void PokeMod::AbilityEffect::setVal3(const int v3) throw(Exception) val3 = v3; } -void PokeMod::AbilityEffect::setTrigger(const unsigned t) throw(BoundsException) +void AbilityEffect::setTrigger(const unsigned t) throw(BoundsException) { if (T_End <= t) throw(BoundsException("AbilityEffect", "trigger")); @@ -368,7 +368,7 @@ void PokeMod::AbilityEffect::setTrigger(const unsigned t) throw(BoundsException) tval2.set(1, 1); } -void PokeMod::AbilityEffect::setTval1(const unsigned tv1) throw(Exception) +void AbilityEffect::setTval1(const unsigned tv1) throw(Exception) { switch (trigger) { @@ -399,68 +399,68 @@ void PokeMod::AbilityEffect::setTval1(const unsigned tv1) throw(Exception) tval1 = tv1; } -void PokeMod::AbilityEffect::setTval2(const unsigned n, const unsigned d) throw(Exception) +void AbilityEffect::setTval2(const unsigned n, const unsigned d) throw(Exception) { if (trigger != T_HPBoundary) throw(UnusedException("AbilityEffect", "tval2")); tval2.set(n, d); } -void PokeMod::AbilityEffect::setTval2Num(const unsigned n) throw(Exception) +void AbilityEffect::setTval2Num(const unsigned n) throw(Exception) { if (trigger != T_HPBoundary) throw(UnusedException("AbilityEffect", "tval2")); tval2.setNum(n); } -void PokeMod::AbilityEffect::setTval2Denom(const unsigned d) throw(Exception) +void AbilityEffect::setTval2Denom(const unsigned d) throw(Exception) { if (trigger != T_HPBoundary) throw(UnusedException("AbilityEffect", "tval2")); tval2.setDenom(d); } -Frac PokeMod::AbilityEffect::getChance() const +Frac AbilityEffect::getChance() const { return chance; } -unsigned PokeMod::AbilityEffect::getEffect() const +unsigned AbilityEffect::getEffect() const { return effect; } -unsigned PokeMod::AbilityEffect::getVal1() const +unsigned AbilityEffect::getVal1() const { return val1; } -unsigned PokeMod::AbilityEffect::getVal2() const +unsigned AbilityEffect::getVal2() const { return val2; } -int PokeMod::AbilityEffect::getVal3() const +int AbilityEffect::getVal3() const { return val3; } -unsigned PokeMod::AbilityEffect::getTrigger() const +unsigned AbilityEffect::getTrigger() const { return trigger; } -unsigned PokeMod::AbilityEffect::getTval1() const +unsigned AbilityEffect::getTval1() const { return tval1; } -Frac PokeMod::AbilityEffect::getTval2() const +Frac AbilityEffect::getTval2() const { return tval2; } -PokeMod::AbilityEffect& PokeMod::AbilityEffect::operator=(const AbilityEffect& rhs) +AbilityEffect& AbilityEffect::operator=(const AbilityEffect& rhs) { if (this == &rhs) return *this; |
