diff options
Diffstat (limited to 'pokemod/AbilityEffect.cpp')
-rw-r--r-- | pokemod/AbilityEffect.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/pokemod/AbilityEffect.cpp b/pokemod/AbilityEffect.cpp index e0cc7f5c..c4f5c470 100644 --- a/pokemod/AbilityEffect.cpp +++ b/pokemod/AbilityEffect.cpp @@ -20,8 +20,6 @@ // with this program. If not, see <http://www.gnu.org/licenses/>. ///////////////////////////////////////////////////////////////////////////// -#include <Ref.h> - #include "Pokemod.h" #include "Ability.h" #include "Type.h" @@ -72,11 +70,11 @@ bool AbilityEffect::validate() const switch (effect) { case E_Stats: - if ((ST_HP == val1) || (ST_End_Battle <= val1) || ((val1 == ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) + if ((Pokemod::ST_HP == val1) || (Pokemod::ST_End_Battle <= val1) || ((val1 == Pokemod::ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) ok = false; break; case E_Status: - if (STS_End <= val1) + if (Pokemod::STS_End <= val1) ok = false; break; case E_Ability: @@ -96,7 +94,7 @@ bool AbilityEffect::validate() const ok = false; break; case E_Weather: - if (W_End_All <= val1) + if (Pokemod::W_End_All <= val1) ok = false; break; } @@ -109,7 +107,7 @@ bool AbilityEffect::validate() const switch (effect) { case E_Stats: - if (BM_End <= val2) + if (Pokemod::BM_End <= val2) ok = false; break; case E_Status: @@ -168,7 +166,7 @@ bool AbilityEffect::validate() const switch (trigger) { case T_Weather: - if (W_End_All <= tval1) + if (Pokemod::W_End_All <= tval1) ok = false; break; case T_Type: @@ -180,11 +178,11 @@ bool AbilityEffect::validate() const ok = false; break; case T_StatChange: - if ((ST_HP == tval1) || (ST_End_Battle <= tval1) || ((tval1 == ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) + if ((Pokemod::ST_HP == tval1) || (Pokemod::ST_End_Battle <= tval1) || ((tval1 == Pokemod::ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) ok = false; break; case T_Status: - if (STS_End <= tval1) + if (Pokemod::STS_End <= tval1) ok = false; break; } @@ -272,11 +270,11 @@ void AbilityEffect::setVal1(const int v1) throw(Exception) switch (effect) { case E_Stats: - if ((ST_HP == val1) || (ST_End_Battle <= val1) || ((val1 == ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) + if ((Pokemod::ST_HP == val1) || (Pokemod::ST_End_Battle <= val1) || ((val1 == Pokemod::ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) throw(BoundsException(className, "val1")); break; case E_Status: - if (STS_End <= v1) + if (Pokemod::STS_End <= v1) throw(BoundsException(className, "val1")); break; case E_Ability: @@ -296,7 +294,7 @@ void AbilityEffect::setVal1(const int v1) throw(Exception) throw(BoundsException(className, "val1")); break; case E_Weather: - if (W_End_All <= v1) + if (Pokemod::W_End_All <= v1) throw(BoundsException(className, "val1")); break; default: @@ -311,7 +309,7 @@ void AbilityEffect::setVal2(const int v2) throw(Exception) switch (effect) { case E_Stats: - if (BM_End <= v2) + if (Pokemod::BM_End <= v2) throw(BoundsException(className, "val2")); break; case E_Status: @@ -374,7 +372,7 @@ void AbilityEffect::setTval1(const int tv1) throw(Exception) switch (trigger) { case T_Weather: - if (W_End_All <= tv1) + if (Pokemod::W_End_All <= tv1) throw(BoundsException(className, "tval1")); break; case T_Type: @@ -386,11 +384,11 @@ void AbilityEffect::setTval1(const int tv1) throw(Exception) throw(BoundsException(className, "tval1")); break; case T_StatChange: - if ((ST_HP == tval1) || (ST_End_Battle <= tval1) || ((tval1 == ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) + if ((Pokemod::ST_HP == tval1) || (Pokemod::ST_End_Battle <= tval1) || ((tval1 == Pokemod::ST_SpecialDefense) && !pokemod->getRules()->getSpecialSplit())) throw(BoundsException(className, "tval1")); break; case T_Status: - if (STS_End <= tv1) + if (Pokemod::STS_End <= tv1) throw(BoundsException(className, "tval1")); break; default: |