Fixed potential slight irregularities in effect chances of elemental Fang moves, tweaked how credits are gathered,

This commit is contained in:
Maruno17
2023-06-27 19:16:14 +01:00
parent aecd9e5bb6
commit 60f8a0cf7b
9 changed files with 51 additions and 57 deletions

View File

@@ -489,6 +489,7 @@ class Battle::Move
def pbAdditionalEffectChance(user, target, effectChance = 0)
return 0 if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker
ret = (effectChance > 0) ? effectChance : @addlEffect
return ret if ret > 100
if (Settings::MECHANICS_GENERATION >= 6 || @function_code != "EffectDependsOnEnvironment") &&
(user.hasActiveAbility?(:SERENEGRACE) || user.pbOwnSide.effects[PBEffects::Rainbow] > 0)
ret *= 2