mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Snowstorm, forfeiting trainer battles, battle outcome values
This commit is contained in:
@@ -261,7 +261,7 @@ end
|
||||
class Battle::Move::StartHailWeather < Battle::Move::WeatherMove
|
||||
def initialize(battle, move)
|
||||
super
|
||||
@weatherType = :Hail
|
||||
@weatherType = (Settings::USE_SNOWSTORM_WEATHER_INSTEAD_OF_HAIL) ? :Snowstorm : :Hail
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ end
|
||||
#===============================================================================
|
||||
class Battle::Move::FreezeTargetAlwaysHitsInHail < Battle::Move::FreezeTarget
|
||||
def pbBaseAccuracy(user, target)
|
||||
return 0 if target.effectiveWeather == :Hail
|
||||
return 0 if [:Hail, :Snowstorm].include?(target.effectiveWeather)
|
||||
return super
|
||||
end
|
||||
end
|
||||
|
||||
@@ -821,7 +821,7 @@ class Battle::Move::StartWeakenDamageAgainstUserSideIfHail < Battle::Move
|
||||
def canSnatch?; return true; end
|
||||
|
||||
def pbMoveFailed?(user, targets)
|
||||
if user.effectiveWeather != :Hail
|
||||
if ![:Hail, :Snowstorm].include?(user.effectiveWeather)
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
@@ -1561,7 +1561,7 @@ class Battle::Move::TypeAndPowerDependOnWeather < Battle::Move
|
||||
ret = :WATER if GameData::Type.exists?(:WATER)
|
||||
when :Sandstorm
|
||||
ret = :ROCK if GameData::Type.exists?(:ROCK)
|
||||
when :Hail
|
||||
when :Hail, :Snowstorm
|
||||
ret = :ICE if GameData::Type.exists?(:ICE)
|
||||
when :ShadowSky
|
||||
ret = :NONE
|
||||
|
||||
@@ -12,7 +12,7 @@ class Battle::Move::FleeFromBattle < Battle::Move
|
||||
|
||||
def pbEffectGeneral(user)
|
||||
@battle.pbDisplay(_INTL("{1} fled from battle!", user.pbThis))
|
||||
@battle.decision = 3 # Escaped
|
||||
@battle.decision = Battle::Outcome::FLEE
|
||||
end
|
||||
end
|
||||
|
||||
@@ -52,7 +52,7 @@ class Battle::Move::SwitchOutUserStatusMove < Battle::Move
|
||||
def pbEffectGeneral(user)
|
||||
if user.wild?
|
||||
@battle.pbDisplay(_INTL("{1} fled from battle!", user.pbThis))
|
||||
@battle.decision = 3 # Escaped
|
||||
@battle.decision = Battle::Outcome::FLEE
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -196,7 +196,7 @@ class Battle::Move::SwitchOutTargetStatusMove < Battle::Move
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user, target)
|
||||
@battle.decision = 3 if target.wild? # Escaped from battle
|
||||
@battle.decision = Battle::Outcome::FLEE if target.wild?
|
||||
end
|
||||
|
||||
def pbSwitchOutTargetEffect(user, targets, numHits, switched_battlers)
|
||||
@@ -230,7 +230,7 @@ class Battle::Move::SwitchOutTargetDamagingMove < Battle::Move
|
||||
if target.wild? && target.allAllies.length == 0 && @battle.canRun &&
|
||||
target.level <= user.level &&
|
||||
(target.effects[PBEffects::Substitute] == 0 || ignoresSubstitute?(user))
|
||||
@battle.decision = 3 # Escaped from battle
|
||||
@battle.decision = Battle::Outcome::FLEE
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user