Coded some Gen 9 ability/item/move effects

This commit is contained in:
Maruno17
2024-06-15 15:58:31 +01:00
parent 454d5a216a
commit 22b33ca6c2
35 changed files with 596 additions and 234 deletions

View File

@@ -155,7 +155,7 @@ class Battle::Move::SwitchOutTargetStatusMove < Battle::Move
def canMagicCoat?; return true; end
def pbFailsAgainstTarget?(user, target, show_message)
if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
if target.hasActiveAbility?(:SUCTIONCUPS) && !target.beingMoldBroken?
if show_message
@battle.pbShowAbilitySplash(target)
if Battle::Scene::USE_ABILITY_SPLASH
@@ -206,7 +206,7 @@ class Battle::Move::SwitchOutTargetStatusMove < Battle::Move
next if b.fainted? || b.damageState.unaffected
next if b.wild?
next if b.effects[PBEffects::Ingrain]
next if b.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
next if b.hasActiveAbility?(:SUCTIONCUPS) && !b.beingMoldBroken?
newPkmn = @battle.pbGetReplacementPokemonIndex(b.index, true) # Random
next if newPkmn < 0
@battle.pbRecallAndReplace(b.index, newPkmn, true)
@@ -241,7 +241,7 @@ class Battle::Move::SwitchOutTargetDamagingMove < Battle::Move
next if b.fainted? || b.damageState.unaffected || b.damageState.substitute
next if b.wild?
next if b.effects[PBEffects::Ingrain]
next if b.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
next if b.hasActiveAbility?(:SUCTIONCUPS) && !b.beingMoldBroken?
newPkmn = @battle.pbGetReplacementPokemonIndex(b.index, true) # Random
next if newPkmn < 0
@battle.pbRecallAndReplace(b.index, newPkmn, true)
@@ -868,7 +868,7 @@ class Battle::Move::DisableTargetStatusMoves < Battle::Move
end
return true if pbMoveFailedAromaVeil?(user, target, show_message)
if Settings::MECHANICS_GENERATION >= 6 && target.hasActiveAbility?(:OBLIVIOUS) &&
!@battle.moldBreaker
!target.beingMoldBroken?
if show_message
@battle.pbShowAbilitySplash(target)
if Battle::Scene::USE_ABILITY_SPLASH