mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Added class GameData::BattleWeather
This commit is contained in:
@@ -170,9 +170,9 @@ class PokeBattle_Battler
|
||||
if hasActiveAbility?(:FORECAST)
|
||||
newForm = 0
|
||||
case @battle.pbWeather
|
||||
when PBWeather::Sun, PBWeather::HarshSun then newForm = 1
|
||||
when PBWeather::Rain, PBWeather::HeavyRain then newForm = 2
|
||||
when PBWeather::Hail then newForm = 3
|
||||
when :Sun, :HarshSun then newForm = 1
|
||||
when :Rain, :HeavyRain then newForm = 2
|
||||
when :Hail then newForm = 3
|
||||
end
|
||||
if @form!=newForm
|
||||
@battle.pbShowAbilitySplash(self,true)
|
||||
@@ -187,7 +187,7 @@ class PokeBattle_Battler
|
||||
if isSpecies?(:CHERRIM)
|
||||
if hasActiveAbility?(:FLOWERGIFT)
|
||||
newForm = 0
|
||||
newForm = 1 if [PBWeather::Sun, PBWeather::HarshSun].include?(@battle.pbWeather)
|
||||
newForm = 1 if [:Sun, :HarshSun].include?(@battle.pbWeather)
|
||||
if @form!=newForm
|
||||
@battle.pbShowAbilitySplash(self,true)
|
||||
@battle.pbHideAbilitySplash(self)
|
||||
|
||||
@@ -52,8 +52,7 @@ class PokeBattle_Battler
|
||||
return false
|
||||
end
|
||||
# Weather immunity
|
||||
if newStatus == :FROZEN &&
|
||||
(@battle.pbWeather==PBWeather::Sun || @battle.pbWeather==PBWeather::HarshSun)
|
||||
if newStatus == :FROZEN && [:Sun, :HarshSun].include?(@battle.pbWeather)
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -323,8 +323,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
|
||||
w = @battle.pbWeather
|
||||
if w!=PBWeather::Rain && w!=PBWeather::HeavyRain && user.takesIndirectDamage?
|
||||
if ![:Rain, :HeavyRain].include?(@battle.pbWeather) && user.takesIndirectDamage?
|
||||
oldHP = user.hp
|
||||
user.pbReduceHP((user.totalhp/4.0).round,false)
|
||||
user.pbFaint if user.fainted?
|
||||
@@ -341,7 +340,7 @@ class PokeBattle_Battler
|
||||
# Primordial Sea, Desolate Land
|
||||
if move.damagingMove?
|
||||
case @battle.pbWeather
|
||||
when PBWeather::HeavyRain
|
||||
when :HeavyRain
|
||||
if move.calcType == :FIRE
|
||||
@battle.pbDisplay(_INTL("The Fire-type attack fizzled out in the heavy rain!"))
|
||||
user.lastMoveFailed = true
|
||||
@@ -349,7 +348,7 @@ class PokeBattle_Battler
|
||||
pbEndTurn(choice)
|
||||
return
|
||||
end
|
||||
when PBWeather::HarshSun
|
||||
when :HarshSun
|
||||
if move.calcType == :WATER
|
||||
@battle.pbDisplay(_INTL("The Water-type attack evaporated in the harsh sunlight!"))
|
||||
user.lastMoveFailed = true
|
||||
|
||||
Reference in New Issue
Block a user