Special Def boost for rock types in sandstorm

This commit is contained in:
DizzyEggg 2019-08-05 11:48:50 +02:00
parent 8542e7fb1f
commit 2c2b807a57

View file

@ -5749,6 +5749,10 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
break;
}
// sandstorm sp.def boost for rock types
if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SANDSTORM_ANY && IS_BATTLER_OF_TYPE(battlerDef, TYPE_ROCK) && !usesDefStat)
MulModifier(&modifier, UQ_4_12(1.5));
return ApplyModifier(modifier, defStat);
}