mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Coded some Gen 9 ability/item/move effects
This commit is contained in:
@@ -37,6 +37,7 @@ class Battle::Move
|
||||
|
||||
def pbContactMove?(user)
|
||||
return false if user.hasActiveAbility?(:LONGREACH)
|
||||
return false if punchingMove? && user.hasActiveItem?(:PUNCHINGGLOVE)
|
||||
return contactMove?
|
||||
end
|
||||
|
||||
@@ -86,9 +87,8 @@ class Battle::Move
|
||||
# Check if target is immune to the move because of its ability
|
||||
#=============================================================================
|
||||
def pbImmunityByAbility(user, target, show_message)
|
||||
return false if @battle.moldBreaker
|
||||
ret = false
|
||||
if target.abilityActive?
|
||||
if target.abilityActive? && !target.beingMoldBroken?
|
||||
ret = Battle::AbilityEffects.triggerMoveImmunity(target.ability, user, target,
|
||||
self, @calcType, @battle, show_message)
|
||||
end
|
||||
@@ -126,8 +126,7 @@ class Battle::Move
|
||||
end
|
||||
|
||||
def pbMoveFailedAromaVeil?(user, target, showMessage = true)
|
||||
return false if @battle.moldBreaker
|
||||
if target.hasActiveAbility?(:AROMAVEIL)
|
||||
if target.hasActiveAbility?(:AROMAVEIL) && !target.beingMoldBroken?
|
||||
if showMessage
|
||||
@battle.pbShowAbilitySplash(target)
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
@@ -141,7 +140,7 @@ class Battle::Move
|
||||
return true
|
||||
end
|
||||
target.allAllies.each do |b|
|
||||
next if !b.hasActiveAbility?(:AROMAVEIL)
|
||||
next if !b.hasActiveAbility?(:AROMAVEIL) || b.beingMoldBroken?
|
||||
if showMessage
|
||||
@battle.pbShowAbilitySplash(b)
|
||||
if Battle::Scene::USE_ABILITY_SPLASH
|
||||
@@ -168,13 +167,13 @@ class Battle::Move
|
||||
return
|
||||
end
|
||||
# Ice Face will take the damage
|
||||
if !@battle.moldBreaker && target.isSpecies?(:EISCUE) &&
|
||||
if !target.beingMoldBroken? && target.isSpecies?(:EISCUE) &&
|
||||
target.form == 0 && target.ability == :ICEFACE && physicalMove?
|
||||
target.damageState.iceFace = true
|
||||
return
|
||||
end
|
||||
# Disguise will take the damage
|
||||
if !@battle.moldBreaker && target.isSpecies?(:MIMIKYU) &&
|
||||
if !target.beingMoldBroken? && target.isSpecies?(:MIMIKYU) &&
|
||||
target.form == 0 && target.ability == :DISGUISE
|
||||
target.damageState.disguise = true
|
||||
return
|
||||
@@ -202,7 +201,7 @@ class Battle::Move
|
||||
target.damageState.endured = true
|
||||
damage -= 1
|
||||
elsif damage == target.totalhp
|
||||
if target.hasActiveAbility?(:STURDY) && !@battle.moldBreaker
|
||||
if target.hasActiveAbility?(:STURDY) && !target.beingMoldBroken?
|
||||
target.damageState.sturdy = true
|
||||
damage -= 1
|
||||
elsif target.hasActiveItem?(:FOCUSSASH) && target.hp == target.totalhp
|
||||
|
||||
Reference in New Issue
Block a user