mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 15:44:57 +00:00
Merge branch 'dev' into ai
This commit is contained in:
@@ -553,7 +553,7 @@ class Battle::Battler
|
||||
end
|
||||
|
||||
def takesShadowSkyDamage?
|
||||
return false if fainted?
|
||||
return false if !takesIndirectDamage?
|
||||
return false if shadowPokemon?
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ class Battle::Battler
|
||||
@fainted = true
|
||||
# Check for end of Neutralizing Gas/Unnerve
|
||||
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
|
||||
pbItemsOnUnnerveEnding if hasActiveAbility?(:UNNERVE, true)
|
||||
pbItemsOnUnnerveEnding if hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], true)
|
||||
# Check for end of primordial weather
|
||||
@battle.pbEndPrimordialWeather
|
||||
end
|
||||
@@ -29,7 +29,7 @@ class Battle::Battler
|
||||
Battle::AbilityEffects.triggerOnBattlerFainting(b.ability, b, self, @battle)
|
||||
end
|
||||
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
|
||||
pbItemsOnUnnerveEnding if hasActiveAbility?(:UNNERVE, true)
|
||||
pbItemsOnUnnerveEnding if hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], true)
|
||||
end
|
||||
|
||||
# Used for Emergency Exit/Wimp Out. Returns whether self has switched out.
|
||||
@@ -162,7 +162,8 @@ class Battle::Battler
|
||||
def pbOnLosingAbility(oldAbil, suppressed = false)
|
||||
if oldAbil == :NEUTRALIZINGGAS && (suppressed || !@effects[PBEffects::GastroAcid])
|
||||
pbAbilitiesOnNeutralizingGasEnding
|
||||
elsif oldAbil == :UNNERVE && (suppressed || !@effects[PBEffects::GastroAcid])
|
||||
elsif [:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH].include?(oldAbil) &&
|
||||
(suppressed || !@effects[PBEffects::GastroAcid])
|
||||
pbItemsOnUnnerveEnding
|
||||
elsif oldAbil == :ILLUSION && @effects[PBEffects::Illusion]
|
||||
@effects[PBEffects::Illusion] = nil
|
||||
@@ -200,7 +201,7 @@ class Battle::Battler
|
||||
# Held item consuming/removing
|
||||
#=============================================================================
|
||||
def canConsumeBerry?
|
||||
return false if @battle.pbCheckOpposingAbility(:UNNERVE, @index)
|
||||
return false if @battle.pbCheckOpposingAbility([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], @index)
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -383,7 +383,7 @@ class Battle::Battler
|
||||
end
|
||||
target.damageState.protected = true
|
||||
@battle.successStates[user.index].protected = true
|
||||
if move.pbContactMove?(user) && user.affectedByContactEffect?
|
||||
if move.pbContactMove?(user) && user.affectedByContactEffect? && user.takesIndirectDamage?
|
||||
@battle.scene.pbDamageAnimation(user)
|
||||
user.pbReduceHP(user.totalhp / 8, false)
|
||||
@battle.pbDisplay(_INTL("{1} was hurt!", user.pbThis))
|
||||
|
||||
@@ -26,7 +26,7 @@ class Battle::Battler
|
||||
when 1 # Gulping Form
|
||||
user.pbLowerStatStageByAbility(:DEFENSE, 1, target, false)
|
||||
when 2 # Gorging Form
|
||||
target.pbParalyze(user) if target.pbCanParalyze?(user, false)
|
||||
user.pbParalyze(target) if user.pbCanParalyze?(target, false)
|
||||
end
|
||||
@battle.pbHideAbilitySplash(target)
|
||||
user.pbItemHPHealCheck if user.hp < oldHP
|
||||
|
||||
Reference in New Issue
Block a user