mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user