summaryrefslogtreecommitdiff
path: root/src/battle_dome.c
diff options
context:
space:
mode:
authorExpoSeed <>2021-05-15 15:56:17 -0500
committerExpoSeed <>2021-05-15 15:56:17 -0500
commit361fa594b30005edaa8aef5f6b02ac8b15149cba (patch)
tree24cfa5b11022ac28cccd5634e95bfe1e2ad6040c /src/battle_dome.c
parentab8318cc79de60413085b104125490cbae344169 (diff)
Various BUGFIXes and UBFIXes
Diffstat (limited to 'src/battle_dome.c')
-rw-r--r--src/battle_dome.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/battle_dome.c b/src/battle_dome.c
index a3bf3dadf..59e418a06 100644
--- a/src/battle_dome.c
+++ b/src/battle_dome.c
@@ -2766,13 +2766,22 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int arg2)
}
if (TYPE_EFFECT_ATK_TYPE(i) == moveType)
{
- // BUG: TYPE_x2 is not necessary and makes the condition always false if the ability is wonder guard.
+ // BUG: the value of TYPE_x2 does not exist in gTypeEffectiveness, so if defAbility is ABILITY_WONDER_GUARD, the conditional always fails
+ #ifndef BUGFIX
if (TYPE_EFFECT_DEF_TYPE(i) == defType1)
if ((defAbility == ABILITY_WONDER_GUARD && TYPE_EFFECT_MULTIPLIER(i) == TYPE_x2) || defAbility != ABILITY_WONDER_GUARD)
typePower = (typePower * TYPE_EFFECT_MULTIPLIER(i)) / 10;
if (TYPE_EFFECT_DEF_TYPE(i) == defType2 && defType1 != defType2)
if ((defAbility == ABILITY_WONDER_GUARD && TYPE_EFFECT_MULTIPLIER(i) == TYPE_x2) || defAbility != ABILITY_WONDER_GUARD)
typePower = (typePower * TYPE_EFFECT_MULTIPLIER(i)) / 10;
+ #else
+ if (TYPE_EFFECT_DEF_TYPE(i) == defType1)
+ if ((defAbility == ABILITY_WONDER_GUARD && TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_SUPER_EFFECTIVE) || defAbility != ABILITY_WONDER_GUARD)
+ typePower = (typePower * TYPE_EFFECT_MULTIPLIER(i)) / 10;
+ if (TYPE_EFFECT_DEF_TYPE(i) == defType2 && defType1 != defType2)
+ if ((defAbility == ABILITY_WONDER_GUARD && TYPE_EFFECT_MULTIPLIER(i) == TYPE_MUL_SUPER_EFFECTIVE) || defAbility != ABILITY_WONDER_GUARD)
+ typePower = (typePower * TYPE_EFFECT_MULTIPLIER(i)) / 10;
+ #endif
}
i += 3;
}