Added some more Gen 8 item effects, added Intimidate being blocked by some abilities, fixed Nectars being usable on fainted Oricorio

This commit is contained in:
Maruno17
2021-07-17 20:48:06 +01:00
parent 78f5530cbe
commit 14748f4999
22 changed files with 206 additions and 152 deletions

View File

@@ -541,6 +541,12 @@ class PokeBattle_Battler
return true
end
def effectiveWeather
ret = @battle.pbWeather
ret = :None if [:Sun, :Rain, :HarshSun, :HeavyRain].include?(ret) && hasActiveItem?(:UTILITYUMBRELLA)
return ret
end
def affectedByPowder?(showMsg=false)
return false if fainted?
if pbHasType?(:GRASS) && Settings::MORE_TYPE_EFFECTS

View File

@@ -169,7 +169,7 @@ class PokeBattle_Battler
if isSpecies?(:CASTFORM)
if hasActiveAbility?(:FORECAST)
newForm = 0
case @battle.pbWeather
case effectiveWeather
when :Sun, :HarshSun then newForm = 1
when :Rain, :HeavyRain then newForm = 2
when :Hail then newForm = 3
@@ -187,7 +187,7 @@ class PokeBattle_Battler
if isSpecies?(:CHERRIM)
if hasActiveAbility?(:FLOWERGIFT)
newForm = 0
newForm = 1 if [:Sun, :HarshSun].include?(@battle.pbWeather)
newForm = 1 if [:Sun, :HarshSun].include?(effectiveWeather)
if @form!=newForm
@battle.pbShowAbilitySplash(self,true)
@battle.pbHideAbilitySplash(self)
@@ -199,7 +199,7 @@ class PokeBattle_Battler
end
# Eiscue - Ice Face
if !ability_changed && isSpecies?(:EISCUE) && self.ability = :ICEFACE &&
@form == 1 && @battle.pbWeather == :Hail
@form == 1 && effectiveWeather == :Hail
@canRestoreIceFace = true # Changed form at end of round
end
end

View File

@@ -52,7 +52,7 @@ class PokeBattle_Battler
return false
end
# Weather immunity
if newStatus == :FROZEN && [:Sun, :HarshSun].include?(@battle.pbWeather)
if newStatus == :FROZEN && [:Sun, :HarshSun].include?(effectiveWeather)
@battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages
return false
end

View File

@@ -253,6 +253,17 @@ class PokeBattle_Battler
end
return false
end
if Settings::MECHANICS_GENERATION >= 8 && hasActiveAbility?([:OBLIVIOUS, :OWNTEMPO, :INNERFOCUS, :SCRAPPY])
@battle.pbShowAbilitySplash(self)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!", pbThis, GameData::Stat.get(:ATTACK).name))
else
@battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!", pbThis, abilityName,
GameData::Stat.get(:ATTACK).name))
end
@battle.pbHideAbilitySplash(self)
return false
end
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
return pbLowerStatStageByAbility(:ATTACK,1,user,false)
end

View File

@@ -324,7 +324,7 @@ class PokeBattle_Battler
@battle.pbCommonAnimation("Powder",user)
@battle.pbDisplay(_INTL("When the flame touched the powder on the Pokémon, it exploded!"))
user.lastMoveFailed = true
if ![:Rain, :HeavyRain].include?(@battle.pbWeather) && user.takesIndirectDamage?
if ![:Rain, :HeavyRain].include?(user.effectiveWeather) && user.takesIndirectDamage?
oldHP = user.hp
user.pbReduceHP((user.totalhp/4.0).round,false)
user.pbFaint if user.fainted?

View File

@@ -46,7 +46,7 @@ class PokeBattle_Move
Effectiveness.ineffective_type?(moveType, defType)
end
# Delta Stream's weather
if @battle.pbWeather == :StrongWinds
if target.effectiveWeather == :StrongWinds
ret = Effectiveness::NORMAL_EFFECTIVE_ONE if defType == :FLYING &&
Effectiveness.super_effective_type?(moveType, defType)
end
@@ -349,13 +349,14 @@ class PokeBattle_Move
end
end
# Terrain moves
terrain_multiplier = (Settings::MECHANICS_GENERATION >= 8) ? 1.3 : 1.5
case @battle.field.terrain
when :Electric
multipliers[:base_damage_multiplier] *= 1.5 if type == :ELECTRIC && user.affectedByTerrain?
multipliers[:base_damage_multiplier] *= terrain_multiplier if type == :ELECTRIC && user.affectedByTerrain?
when :Grassy
multipliers[:base_damage_multiplier] *= 1.5 if type == :GRASS && user.affectedByTerrain?
multipliers[:base_damage_multiplier] *= terrain_multiplier if type == :GRASS && user.affectedByTerrain?
when :Psychic
multipliers[:base_damage_multiplier] *= 1.5 if type == :PSYCHIC && user.affectedByTerrain?
multipliers[:base_damage_multiplier] *= terrain_multiplier if type == :PSYCHIC && user.affectedByTerrain?
when :Misty
multipliers[:base_damage_multiplier] /= 2 if type == :DRAGON && target.affectedByTerrain?
end
@@ -381,7 +382,7 @@ class PokeBattle_Move
multipliers[:final_damage_multiplier] *= 0.75
end
# Weather
case @battle.pbWeather
case user.effectiveWeather
when :Sun, :HarshSun
if type == :FIRE
multipliers[:final_damage_multiplier] *= 1.5

View File

@@ -132,7 +132,7 @@ class PokeBattle_Move_008 < PokeBattle_ParalysisMove
def hitsFlyingTargets?; return true; end
def pbBaseAccuracy(user,target)
case @battle.pbWeather
case target.effectiveWeather
when :Sun, :HarshSun
return 50
when :Rain, :HeavyRain
@@ -203,7 +203,7 @@ end
#===============================================================================
class PokeBattle_Move_00D < PokeBattle_FreezeMove
def pbBaseAccuracy(user,target)
return 0 if @battle.pbWeather == :Hail
return 0 if target.effectiveWeather == :Hail
return super
end
end
@@ -309,7 +309,7 @@ class PokeBattle_Move_015 < PokeBattle_ConfuseMove
def hitsFlyingTargets?; return true; end
def pbBaseAccuracy(user,target)
case @battle.pbWeather
case target.effectiveWeather
when :Sun, :HarshSun
return 50
when :Rain, :HeavyRain
@@ -741,7 +741,7 @@ class PokeBattle_Move_028 < PokeBattle_MultiStatUpMove
def pbOnStartUse(user,targets)
increment = 1
increment = 2 if [:Sun, :HarshSun].include?(@battle.pbWeather)
increment = 2 if [:Sun, :HarshSun].include?(user.effectiveWeather)
@statUp[1] = @statUp[3] = increment
end
end

View File

@@ -105,13 +105,13 @@ end
#===============================================================================
class PokeBattle_Move_087 < PokeBattle_Move
def pbBaseDamage(baseDmg,user,target)
baseDmg *= 2 if @battle.pbWeather != :None
baseDmg *= 2 if user.effectiveWeather != :None
return baseDmg
end
def pbBaseType(user)
ret = :NORMAL
case @battle.pbWeather
case user.effectiveWeather
when :Sun, :HarshSun
ret = :FIRE if GameData::Type.exists?(:FIRE)
when :Rain, :HeavyRain
@@ -2064,7 +2064,7 @@ class PokeBattle_Move_0C4 < PokeBattle_TwoTurnMove
def pbIsChargingTurn?(user)
ret = super
if !user.effects[PBEffects::TwoTurnAttack]
if [:Sun, :HarshSun].include?(@battle.pbWeather)
if [:Sun, :HarshSun].include?(user.effectiveWeather)
@powerHerb = false
@chargingTurn = true
@damagingTurn = true
@@ -2079,7 +2079,7 @@ class PokeBattle_Move_0C4 < PokeBattle_TwoTurnMove
end
def pbBaseDamageMultiplier(damageMult,user,target)
damageMult /= 2 if ![:None, :Sun, :HarshSun].include?(@battle.pbWeather)
damageMult /= 2 if ![:None, :Sun, :HarshSun].include?(user.effectiveWeather)
return damageMult
end
end
@@ -2560,7 +2560,7 @@ end
#===============================================================================
class PokeBattle_Move_0D8 < PokeBattle_HealingMove
def pbOnStartUse(user,targets)
case @battle.pbWeather
case user.effectiveWeather
when :Sun, :HarshSun
@healAmount = (user.totalhp*2/3.0).round
when :None, :StrongWinds

View File

@@ -2242,7 +2242,7 @@ class PokeBattle_Move_167 < PokeBattle_Move
def canSnatch?; return true; end
def pbMoveFailed?(user,targets)
if @battle.pbWeather != :Hail
if user.effectiveWeather != :Hail
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
@@ -2416,8 +2416,8 @@ end
#===============================================================================
class PokeBattle_Move_16D < PokeBattle_HealingMove
def pbHealAmount(user)
return (user.totalhp*2/3.0).round if @battle.pbWeather == :Sandstorm
return (user.totalhp/2.0).round
return (user.totalhp * 2 / 3.0).round if user.effectiveWeather == :Sandstorm
return (user.totalhp / 2.0).round
end
end

View File

@@ -80,7 +80,7 @@ class PokeBattle_Battle
attr_accessor :lastMoveUsed # Last move used
attr_accessor :lastMoveUser # Last move user
attr_accessor :first_poke_ball # ID of the first thrown Poké Ball that failed
attr_Accessor :poke_ball_failed # Set after first_poke_ball to prevent it being set again
attr_accessor :poke_ball_failed # Set after first_poke_ball to prevent it being set again
attr_reader :switching # True if during the switching phase of the round
attr_reader :futureSight # True if Future Sight is hitting
attr_reader :endOfRound # True during the end of round

View File

@@ -121,7 +121,7 @@ class PokeBattle_Battle
pbParty(1).each_with_index do |pkmn,idxPkmn|
pbCreateBattler(2*idxPkmn+side,pkmn,idxPkmn)
# Changes the Pokémon's form upon entering battle (if it should)
@peer.pbOnEnteringBattle(self,pkmn,true)
@peer.pbOnEnteringBattle(self, @battlers[2 * idxPkmn + side], pkmn, true)
pbSetSeen(@battlers[2*idxPkmn+side])
@usedInBattle[side][idxPkmn] = true
end

View File

@@ -291,7 +291,7 @@ class PokeBattle_Battle
# Called from def pbReplace above and at the start of battle.
# sendOuts is an array; each element is itself an array: [idxBattler,pkmn]
def pbSendOut(sendOuts,startBattle=false)
sendOuts.each { |b| @peer.pbOnEnteringBattle(self,b[1]) }
sendOuts.each { |b| @peer.pbOnEnteringBattle(self, @battlers[b[0]], b[1]) }
@scene.pbSendOutBattlers(sendOuts,startBattle)
sendOuts.each do |b|
@scene.pbResetMoveIndex(b[0])

View File

@@ -67,16 +67,14 @@ class PokeBattle_Battle
when :ShadowSky then pbDisplay(_INTL("The shadow sky continues."))
end
# Effects due to weather
curWeather = pbWeather
priority.each do |b|
# Weather-related abilities
if b.abilityActive?
BattleHandlers.triggerEORWeatherAbility(b.ability,curWeather,b,self)
BattleHandlers.triggerEORWeatherAbility(b.ability, b.effectiveWeather, b, self)
b.pbFaint if b.fainted?
end
# Weather damage
# NOTE:
case curWeather
case b.effectiveWeather
when :Sandstorm
next if !b.takesSandstormDamage?
pbDisplay(_INTL("{1} is buffeted by the sandstorm!",b.pbThis))
@@ -257,10 +255,8 @@ class PokeBattle_Battle
pbDisplay(_INTL("{1}'s wish came true!",wishMaker))
end
# Sea of Fire damage (Fire Pledge + Grass Pledge combination)
curWeather = pbWeather
for side in 0...2
next if sides[side].effects[PBEffects::SeaOfFire]==0
next if [:Rain, :HeavyRain].include?(curWeather)
@battle.pbCommonAnimation("SeaOfFire") if side==0
@battle.pbCommonAnimation("SeaOfFireOpp") if side==1
priority.each do |b|

View File

@@ -4,7 +4,7 @@
BattleHandlers::SpeedCalcAbility.add(:CHLOROPHYLL,
proc { |ability,battler,mult|
next mult * 2 if [:Sun, :HarshSun].include?(battler.battle.pbWeather)
next mult * 2 if [:Sun, :HarshSun].include?(battler.effectiveWeather)
}
)
@@ -16,7 +16,7 @@ BattleHandlers::SpeedCalcAbility.add(:QUICKFEET,
BattleHandlers::SpeedCalcAbility.add(:SANDRUSH,
proc { |ability,battler,mult|
next mult * 2 if [:Sandstorm].include?(battler.battle.pbWeather)
next mult * 2 if [:Sandstorm].include?(battler.effectiveWeather)
}
)
@@ -28,7 +28,7 @@ BattleHandlers::SpeedCalcAbility.add(:SLOWSTART,
BattleHandlers::SpeedCalcAbility.add(:SLUSHRUSH,
proc { |ability,battler,mult|
next mult * 2 if [:Hail].include?(battler.battle.pbWeather)
next mult * 2 if [:Hail].include?(battler.effectiveWeather)
}
)
@@ -40,7 +40,7 @@ BattleHandlers::SpeedCalcAbility.add(:SURGESURFER,
BattleHandlers::SpeedCalcAbility.add(:SWIFTSWIM,
proc { |ability,battler,mult|
next mult * 2 if [:Rain, :HeavyRain].include?(battler.battle.pbWeather)
next mult * 2 if [:Rain, :HeavyRain].include?(battler.effectiveWeather)
}
)
@@ -147,7 +147,7 @@ BattleHandlers::StatusImmunityAbility.copy(:INSOMNIA,:SWEETVEIL,:VITALSPIRIT)
BattleHandlers::StatusImmunityAbility.add(:LEAFGUARD,
proc { |ability,battler,status|
next true if [:Sun, :HarshSun].include?(battler.battle.pbWeather)
next true if [:Sun, :HarshSun].include?(battler.effectiveWeather)
}
)
@@ -826,13 +826,13 @@ BattleHandlers::AccuracyCalcTargetAbility.add(:NOGUARD,
BattleHandlers::AccuracyCalcTargetAbility.add(:SANDVEIL,
proc { |ability,mods,user,target,move,type|
mods[:evasion_multiplier] *= 1.25 if target.battle.pbWeather == :Sandstorm
mods[:evasion_multiplier] *= 1.25 if target.effectiveWeather == :Sandstorm
}
)
BattleHandlers::AccuracyCalcTargetAbility.add(:SNOWCLOAK,
proc { |ability,mods,user,target,move,type|
mods[:evasion_multiplier] *= 1.25 if target.battle.pbWeather == :Hail
mods[:evasion_multiplier] *= 1.25 if target.effectiveWeather == :Hail
}
)
@@ -916,7 +916,7 @@ BattleHandlers::DamageCalcUserAbility.add(:FLASHFIRE,
BattleHandlers::DamageCalcUserAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type|
if move.physicalMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather)
if move.physicalMove? && [:Sun, :HarshSun].include?(user.effectiveWeather)
mults[:attack_multiplier] *= 1.5
end
}
@@ -1005,7 +1005,7 @@ BattleHandlers::DamageCalcUserAbility.add(:RIVALRY,
BattleHandlers::DamageCalcUserAbility.add(:SANDFORCE,
proc { |ability,user,target,move,mults,baseDmg,type|
if user.battle.pbWeather == :Sandstorm &&
if user.effectiveWeather == :Sandstorm &&
[:ROCK, :GROUND, :STEEL].include?(type)
mults[:base_damage_multiplier] *= 1.3
end
@@ -1026,7 +1026,7 @@ BattleHandlers::DamageCalcUserAbility.add(:SLOWSTART,
BattleHandlers::DamageCalcUserAbility.add(:SOLARPOWER,
proc { |ability,user,target,move,mults,baseDmg,type|
if move.specialMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather)
if move.specialMove? && [:Sun, :HarshSun].include?(user.effectiveWeather)
mults[:attack_multiplier] *= 1.5
end
}
@@ -1122,7 +1122,7 @@ BattleHandlers::DamageCalcUserAllyAbility.add(:BATTERY,
BattleHandlers::DamageCalcUserAllyAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type|
if move.physicalMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather)
if move.physicalMove? && [:Sun, :HarshSun].include?(user.effectiveWeather)
mults[:attack_multiplier] *= 1.5
end
}
@@ -1150,7 +1150,7 @@ BattleHandlers::DamageCalcTargetAbility.copy(:FILTER,:SOLIDROCK)
BattleHandlers::DamageCalcTargetAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type|
if move.specialMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather)
if move.specialMove? && [:Sun, :HarshSun].include?(target.effectiveWeather)
mults[:defense_multiplier] *= 1.5
end
}
@@ -1235,7 +1235,7 @@ BattleHandlers::DamageCalcTargetAbilityNonIgnorable.add(:SHADOWSHIELD,
BattleHandlers::DamageCalcTargetAllyAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type|
if move.specialMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather)
if move.specialMove? && [:Sun, :HarshSun].include?(target.effectiveWeather)
mults[:defense_multiplier] *= 1.5
end
}
@@ -1864,7 +1864,7 @@ BattleHandlers::EORHealingAbility.add(:HEALER,
BattleHandlers::EORHealingAbility.add(:HYDRATION,
proc { |ability,battler,battle|
next if battler.status == :NONE
next if ![:Rain, :HeavyRain].include?(battle.pbWeather)
next if ![:Rain, :HeavyRain].include?(battler.effectiveWeather)
battle.pbShowAbilitySplash(battler)
oldStatus = battler.status
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
@@ -1987,7 +1987,7 @@ BattleHandlers::EORGainItemAbility.add(:HARVEST,
proc { |ability,battler,battle|
next if battler.item
next if !battler.recycleItem || !GameData::Item.get(battler.recycleItem).is_berry?
if ![:Sun, :HarshSun].include?(battle.pbWeather)
if ![:Sun, :HarshSun].include?(battler.effectiveWeather)
next unless battle.pbRandom(100)<50
end
battle.pbShowAbilitySplash(battler)

View File

@@ -455,7 +455,7 @@ class PokeBattle_AI
end
end
if move.function=="028" # Growth
score += 20 if [:Sun, :HarshSun].include?(@battle.pbWeather)
score += 20 if [:Sun, :HarshSun].include?(user.effectiveWeather)
end
end
#---------------------------------------------------------------------------
@@ -1869,7 +1869,7 @@ class PokeBattle_AI
if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?)
score -= 90
else
case @battle.pbWeather
case user.effectiveWeather
when :Sun, :HarshSun
score += 30
when :None
@@ -2159,7 +2159,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90
elsif @battle.pbWeather == :Sun
elsif @battle.field.weather == :Sun
score -= 90
else
user.eachMove do |m|
@@ -2172,7 +2172,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90
elsif @battle.pbWeather == :Rain
elsif @battle.field.weather == :Rain
score -= 90
else
user.eachMove do |m|
@@ -2185,7 +2185,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90
elsif @battle.pbWeather == :Sandstorm
elsif @battle.field.weather == :Sandstorm
score -= 90
end
#---------------------------------------------------------------------------
@@ -2193,7 +2193,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90
elsif @battle.pbWeather == :Hail
elsif @battle.field.weather == :Hail
score -= 90
end
#---------------------------------------------------------------------------
@@ -2522,7 +2522,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90
elsif @battle.pbWeather == :ShadowSky
elsif @battle.field.weather == :ShadowSky
score -= 90
end
#---------------------------------------------------------------------------
@@ -2929,7 +2929,7 @@ class PokeBattle_AI
when "166"
#---------------------------------------------------------------------------
when "167"
if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || @battle.pbWeather != :Hail
if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || user.effectiveWeather != :Hail
score -= 90
else
score += 40
@@ -2988,7 +2988,7 @@ class PokeBattle_AI
else
score += 50
score -= user.hp*100/user.totalhp
score += 30 if @battle.pbWeather == :Sandstorm
score += 30 if user.effectiveWeather == :Sandstorm
end
#---------------------------------------------------------------------------
when "16E"

View File

@@ -43,7 +43,7 @@ class PokeBattle_AI
Effectiveness.ineffective_type?(moveType, defType)
end
# Delta Stream's weather
if @battle.pbWeather == :StrongWinds
if target.effectiveWeather == :StrongWinds
ret = Effectiveness::NORMAL_EFFECTIVE_ONE if defType == :FLYING &&
Effectiveness.super_effective_type?(moveType, defType)
end
@@ -439,7 +439,7 @@ class PokeBattle_AI
end
# Weather
if skill>=PBTrainerAI.mediumSkill
case @battle.pbWeather
case user.effectiveWeather
when :Sun, :HarshSun
if type == :FIRE
multipliers[:final_damage_multiplier] *= 1.5

View File

@@ -3,7 +3,7 @@
#===============================================================================
# Unused class.
class PokeBattle_NullBattlePeer
def pbOnEnteringBattle(battle,pkmn,wild=false); end
def pbOnEnteringBattle(battle, battler, pkmn, wild = false); end
def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false); end
def pbStorePokemon(player,pkmn)
@@ -52,9 +52,11 @@ class PokeBattle_RealBattlePeer
return (box<0) ? "" : $PokemonStorage[box].name
end
def pbOnEnteringBattle(_battle,pkmn,wild=false)
def pbOnEnteringBattle(battle, battler, pkmn, wild = false)
f = MultipleForms.call("getFormOnEnteringBattle",pkmn,wild)
pkmn.form = f if f
battler.form = pkmn.form if battler.form != pkmn.form
MultipleForms.call("changePokemonOnEnteringBattle", battler, pkmn, battle)
end
# For switching out, including due to fainting, and for the end of battle
@@ -63,6 +65,7 @@ class PokeBattle_RealBattlePeer
f = MultipleForms.call("getFormOnLeavingBattle",pkmn,battle,usedInBattle,endBattle)
pkmn.form = f if f && pkmn.form!=f
pkmn.hp = pkmn.totalhp if pkmn.hp>pkmn.totalhp
MultipleForms.call("changePokemonOnLeavingBattle", pkmn, battle, usedInBattle, endBattle)
end
end

View File

@@ -301,7 +301,7 @@ BattleHandlers::UserAbilityEndOfMove.copy(:GRIMNEIGH, :ASONEGRIMNEIGH)
BattleHandlers::AbilityOnSwitchIn.add(:ICEFACE,
proc { |ability, battler, battle|
next if !battler.isSpecies?(:EISCUE) || battler.form != 1
next if battle.pbWeather != :Hail
next if battler.effectiveWeather != :Hail
battle.pbShowAbilitySplash(battler)
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))