mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 14:26:01 +00:00
Some battle method refactoring, fixed typo
This commit is contained in:
@@ -17,8 +17,6 @@ class Battle::Move::Unimplemented < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pseudomove for confusion damage.
|
||||
#===============================================================================
|
||||
@@ -48,10 +46,8 @@ class Battle::Move::Confusion < Battle::Move
|
||||
def pbCritialOverride(user,target); return -1; end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Implements the move Struggle.
|
||||
# Struggle.
|
||||
#===============================================================================
|
||||
class Battle::Move::Struggle < Battle::Move
|
||||
def initialize(battle,move)
|
||||
@@ -85,164 +81,8 @@ class Battle::Move::Struggle < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Generic status problem-inflicting classes.
|
||||
#===============================================================================
|
||||
class Battle::Move::SleepMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanSleep?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbSleep
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbSleep if target.pbCanSleep?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Battle::Move::PoisonMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def initialize(battle,move)
|
||||
super
|
||||
@toxic = false
|
||||
end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanPoison?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbPoison(user,nil,@toxic)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbPoison(user,nil,@toxic) if target.pbCanPoison?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Battle::Move::ParalysisMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanParalyze?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbParalyze(user)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbParalyze(user) if target.pbCanParalyze?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Battle::Move::BurnMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanBurn?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbBurn(user)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbBurn(user) if target.pbCanBurn?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Battle::Move::FreezeMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanFreeze?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbFreeze
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbFreeze if target.pbCanFreeze?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Other problem-causing classes.
|
||||
#===============================================================================
|
||||
class Battle::Move::FlinchMove < Battle::Move
|
||||
def flinchingMove?; return true; end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbFlinch(user)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbFlinch(user)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Battle::Move::ConfuseMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanConfuse?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbConfuse
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
return if !target.pbCanConfuse?(user,false,self)
|
||||
target.pbConfuse
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Generic user's stat increase/decrease classes.
|
||||
# Raise one of user's stats.
|
||||
#===============================================================================
|
||||
class Battle::Move::StatUpMove < Battle::Move
|
||||
def canSnatch?; return true; end
|
||||
@@ -264,8 +104,9 @@ class Battle::Move::StatUpMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Raise multiple of user's stats.
|
||||
#===============================================================================
|
||||
class Battle::Move::MultiStatUpMove < Battle::Move
|
||||
def canSnatch?; return true; end
|
||||
|
||||
@@ -306,8 +147,9 @@ class Battle::Move::MultiStatUpMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Lower multiple of user's stats.
|
||||
#===============================================================================
|
||||
class Battle::Move::StatDownMove < Battle::Move
|
||||
def pbEffectWhenDealingDamage(user,target)
|
||||
return if @battle.pbAllFainted?(target.idxOwnSide)
|
||||
@@ -321,10 +163,8 @@ class Battle::Move::StatDownMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Generic target's stat increase/decrease classes.
|
||||
# Lower one of target's stats.
|
||||
#===============================================================================
|
||||
class Battle::Move::TargetStatDownMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
@@ -346,8 +186,9 @@ class Battle::Move::TargetStatDownMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Lower multiple of target's stats.
|
||||
#===============================================================================
|
||||
class Battle::Move::TargetMultiStatDownMove < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
@@ -432,8 +273,6 @@ class Battle::Move::TargetMultiStatDownMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Fixed damage-inflicting move.
|
||||
#===============================================================================
|
||||
@@ -447,8 +286,6 @@ class Battle::Move::FixedDamageMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Two turn move.
|
||||
#===============================================================================
|
||||
@@ -536,8 +373,6 @@ class Battle::Move::TwoTurnMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Healing move.
|
||||
#===============================================================================
|
||||
@@ -561,8 +396,6 @@ class Battle::Move::HealingMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Recoil move.
|
||||
#===============================================================================
|
||||
@@ -582,8 +415,6 @@ class Battle::Move::RecoilMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Protect move.
|
||||
#===============================================================================
|
||||
@@ -644,8 +475,6 @@ class Battle::Move::ProtectMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Weather-inducing move.
|
||||
#===============================================================================
|
||||
@@ -678,8 +507,6 @@ class Battle::Move::WeatherMove < Battle::Move
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Pledge move.
|
||||
#===============================================================================
|
||||
|
||||
@@ -7,7 +7,7 @@ end
|
||||
#===============================================================================
|
||||
# Does absolutely nothing. Shows a special message. (Celebrate)
|
||||
#===============================================================================
|
||||
class Battle::Move::DoesNothingCongratuations < Battle::Move
|
||||
class Battle::Move::DoesNothingCongratulations < Battle::Move
|
||||
def pbEffectGeneral(user)
|
||||
if user.wild?
|
||||
@battle.pbDisplay(_INTL("Congratulations from {1}!",user.pbThis(true)))
|
||||
|
||||
@@ -1,13 +1,29 @@
|
||||
#===============================================================================
|
||||
# Puts the target to sleep.
|
||||
#===============================================================================
|
||||
class Battle::Move::SleepTarget < Battle::Move::SleepMove
|
||||
class Battle::Move::SleepTarget < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanSleep?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbSleep
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbSleep if target.pbCanSleep?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Puts the target to sleep. Fails if user is not Darkrai. (Dark Void (Gen 7+))
|
||||
#===============================================================================
|
||||
class Battle::Move::SleepTargetIfUserDarkrai < Battle::Move::SleepMove
|
||||
class Battle::Move::SleepTargetIfUserDarkrai < Battle::Move::SleepTarget
|
||||
def pbMoveFailed?(user,targets)
|
||||
if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI
|
||||
@battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis))
|
||||
@@ -21,7 +37,7 @@ end
|
||||
# Puts the target to sleep. Changes the user's form if the user is Meloetta.
|
||||
# (Relic Song)
|
||||
#===============================================================================
|
||||
class Battle::Move::SleepTargetChangeUserMeloettaForm < Battle::Move::SleepMove
|
||||
class Battle::Move::SleepTargetChangeUserMeloettaForm < Battle::Move::SleepTarget
|
||||
def pbEndOfMoveUsageEffect(user,targets,numHits,switchedBattlers)
|
||||
return if numHits==0
|
||||
return if user.fainted? || user.effects[PBEffects::Transform]
|
||||
@@ -56,7 +72,28 @@ end
|
||||
#===============================================================================
|
||||
# Poisons the target.
|
||||
#===============================================================================
|
||||
class Battle::Move::PoisonTarget < Battle::Move::PoisonMove
|
||||
class Battle::Move::PoisonTarget < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def initialize(battle,move)
|
||||
super
|
||||
@toxic = false
|
||||
end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanPoison?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbPoison(user,nil,@toxic)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbPoison(user,nil,@toxic) if target.pbCanPoison?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
@@ -85,7 +122,7 @@ end
|
||||
#===============================================================================
|
||||
# Badly poisons the target. (Poison Fang, Toxic)
|
||||
#===============================================================================
|
||||
class Battle::Move::BadPoisonTarget < Battle::Move::PoisonMove
|
||||
class Battle::Move::BadPoisonTarget < Battle::Move::PoisonTarget
|
||||
def initialize(battle,move)
|
||||
super
|
||||
@toxic = true
|
||||
@@ -99,14 +136,30 @@ end
|
||||
#===============================================================================
|
||||
# Paralyzes the target.
|
||||
#===============================================================================
|
||||
class Battle::Move::ParalyzeTarget < Battle::Move::ParalysisMove
|
||||
class Battle::Move::ParalyzeTarget < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanParalyze?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbParalyze(user)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbParalyze(user) if target.pbCanParalyze?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Paralyzes the target. Doesn't affect target if move's type has no effect on
|
||||
# it. (Thunder Wave)
|
||||
#===============================================================================
|
||||
class Battle::Move::ParalyzeTargetIfNotTypeImmune < Battle::Move::ParalysisMove
|
||||
class Battle::Move::ParalyzeTargetIfNotTypeImmune < Battle::Move::ParalyzeTarget
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
if Effectiveness.ineffective?(target.damageState.typeMod)
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...", target.pbThis(true))) if show_message
|
||||
@@ -120,7 +173,7 @@ end
|
||||
# Paralyzes the target. Does double damage and has perfect accuracy if target is
|
||||
# Minimized. (Body Slam (Gen 6+))
|
||||
#===============================================================================
|
||||
class Battle::Move::ParalyzeTargetTrampleMinimize < Battle::Move::ParalysisMove
|
||||
class Battle::Move::ParalyzeTargetTrampleMinimize < Battle::Move::ParalyzeTarget
|
||||
def tramplesMinimize?(param=1)
|
||||
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return true if param==2 # Double damage
|
||||
@@ -132,7 +185,7 @@ end
|
||||
# Paralyzes the target. Accuracy perfect in rain, 50% in sunshine. Hits some
|
||||
# semi-invulnerable targets. (Thunder)
|
||||
#===============================================================================
|
||||
class Battle::Move::ParalyzeTargetAlwaysHitsInRainHitsTargetInSky < Battle::Move::ParalysisMove
|
||||
class Battle::Move::ParalyzeTargetAlwaysHitsInRainHitsTargetInSky < Battle::Move::ParalyzeTarget
|
||||
def hitsFlyingTargets?; return true; end
|
||||
|
||||
def pbBaseAccuracy(user,target)
|
||||
@@ -166,14 +219,30 @@ end
|
||||
#===============================================================================
|
||||
# Burns the target.
|
||||
#===============================================================================
|
||||
class Battle::Move::BurnTarget < Battle::Move::BurnMove
|
||||
class Battle::Move::BurnTarget < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanBurn?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbBurn(user)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbBurn(user) if target.pbCanBurn?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Burns the target if any of its stats were increased this round.
|
||||
# (Burning Jealousy)
|
||||
#===============================================================================
|
||||
class Battle::Move::BurnTargetIfTargetStatsRaisedThisTurn < Battle::Move::BurnMove
|
||||
class Battle::Move::BurnTargetIfTargetStatsRaisedThisTurn < Battle::Move::BurnTarget
|
||||
def pbAdditionalEffect(user, target)
|
||||
super if target.statsRaisedThisRound
|
||||
end
|
||||
@@ -199,13 +268,29 @@ end
|
||||
#===============================================================================
|
||||
# Freezes the target.
|
||||
#===============================================================================
|
||||
class Battle::Move::FreezeTarget < Battle::Move::FreezeMove
|
||||
class Battle::Move::FreezeTarget < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanFreeze?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbFreeze
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbFreeze if target.pbCanFreeze?(user,false,self)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Freezes the target. Effectiveness against Water-type is 2x. (Freeze-Dry)
|
||||
#===============================================================================
|
||||
class Battle::Move::FreezeTargetSuperEffectiveAgainstWater < Battle::Move::FreezeMove
|
||||
class Battle::Move::FreezeTargetSuperEffectiveAgainstWater < Battle::Move::FreezeTarget
|
||||
def pbCalcTypeModSingle(moveType,defType,user,target)
|
||||
return Effectiveness::SUPER_EFFECTIVE_ONE if defType == :WATER
|
||||
return super
|
||||
@@ -215,7 +300,7 @@ end
|
||||
#===============================================================================
|
||||
# Freezes the target. Accuracy perfect in hail. (Blizzard)
|
||||
#===============================================================================
|
||||
class Battle::Move::FreezeTargetAlwaysHitsInHail < Battle::Move::FreezeMove
|
||||
class Battle::Move::FreezeTargetAlwaysHitsInHail < Battle::Move::FreezeTarget
|
||||
def pbBaseAccuracy(user,target)
|
||||
return 0 if target.effectiveWeather == :Hail
|
||||
return super
|
||||
@@ -448,14 +533,25 @@ end
|
||||
#===============================================================================
|
||||
# Causes the target to flinch.
|
||||
#===============================================================================
|
||||
class Battle::Move::FlinchTarget < Battle::Move::FlinchMove
|
||||
class Battle::Move::FlinchTarget < Battle::Move
|
||||
def flinchingMove?; return true; end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbFlinch(user)
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
target.pbFlinch(user)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Causes the target to flinch. Does double damage and has perfect accuracy if
|
||||
# the target is Minimized. (Dragon Rush (Gen 6+), Steamroller, Stomp)
|
||||
#===============================================================================
|
||||
class Battle::Move::FlinchTargetTrampleMinimize < Battle::Move::FlinchMove
|
||||
class Battle::Move::FlinchTargetTrampleMinimize < Battle::Move::FlinchTarget
|
||||
def tramplesMinimize?(param=1)
|
||||
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return true if param==2 # Double damage
|
||||
@@ -466,7 +562,7 @@ end
|
||||
#===============================================================================
|
||||
# Causes the target to flinch. Fails if the user is not asleep. (Snore)
|
||||
#===============================================================================
|
||||
class Battle::Move::FlinchTargetFailsIfUserNotAsleep < Battle::Move::FlinchMove
|
||||
class Battle::Move::FlinchTargetFailsIfUserNotAsleep < Battle::Move::FlinchTarget
|
||||
def usableWhenAsleep?; return true; end
|
||||
|
||||
def pbMoveFailed?(user,targets)
|
||||
@@ -482,7 +578,7 @@ end
|
||||
# Causes the target to flinch. Fails if this isn't the user's first turn.
|
||||
# (Fake Out)
|
||||
#===============================================================================
|
||||
class Battle::Move::FlinchTargetFailsIfNotUserFirstTurn < Battle::Move::FlinchMove
|
||||
class Battle::Move::FlinchTargetFailsIfNotUserFirstTurn < Battle::Move::FlinchTarget
|
||||
def pbMoveFailed?(user,targets)
|
||||
if user.turnCount > 1
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
@@ -496,7 +592,7 @@ end
|
||||
# Power is doubled if the target is using Bounce, Fly or Sky Drop. Hits some
|
||||
# semi-invulnerable targets. May make the target flinch. (Twister)
|
||||
#===============================================================================
|
||||
class Battle::Move::FlinchTargetDoublePowerIfTargetInSky < Battle::Move::FlinchMove
|
||||
class Battle::Move::FlinchTargetDoublePowerIfTargetInSky < Battle::Move::FlinchTarget
|
||||
def hitsFlyingTargets?; return true; end
|
||||
|
||||
def pbBaseDamage(baseDmg,user,target)
|
||||
@@ -511,14 +607,31 @@ end
|
||||
#===============================================================================
|
||||
# Confuses the target.
|
||||
#===============================================================================
|
||||
class Battle::Move::ConfuseTarget < Battle::Move::ConfuseMove
|
||||
class Battle::Move::ConfuseTarget < Battle::Move
|
||||
def canMagicCoat?; return true; end
|
||||
|
||||
def pbFailsAgainstTarget?(user, target, show_message)
|
||||
return false if damagingMove?
|
||||
return !target.pbCanConfuse?(user, show_message, self)
|
||||
end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if damagingMove?
|
||||
target.pbConfuse
|
||||
end
|
||||
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.damageState.substitute
|
||||
return if !target.pbCanConfuse?(user,false,self)
|
||||
target.pbConfuse
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Confuses the target. Accuracy perfect in rain, 50% in sunshine. Hits some
|
||||
# semi-invulnerable targets. (Hurricane)
|
||||
#===============================================================================
|
||||
class Battle::Move::ConfuseTargetAlwaysHitsInRainHitsTargetInSky < Battle::Move::ConfuseMove
|
||||
class Battle::Move::ConfuseTargetAlwaysHitsInRainHitsTargetInSky < Battle::Move::ConfuseTarget
|
||||
def hitsFlyingTargets?; return true; end
|
||||
|
||||
def pbBaseAccuracy(user,target)
|
||||
|
||||
@@ -1143,7 +1143,7 @@ end
|
||||
# if it is a physical move. Has a different animation depending on the move's
|
||||
# category. (Shell Side Arm)
|
||||
#===============================================================================
|
||||
class Battle::Move::CategoryDependsOnHigherDamagePoisonTarget < Battle::Move::PoisonMove
|
||||
class Battle::Move::CategoryDependsOnHigherDamagePoisonTarget < Battle::Move::PoisonTarget
|
||||
def initialize(battle, move)
|
||||
super
|
||||
@calcCategory = 1
|
||||
|
||||
@@ -9,7 +9,7 @@ end
|
||||
#===============================================================================
|
||||
# Hits twice. May poison the target on each hit. (Twineedle)
|
||||
#===============================================================================
|
||||
class Battle::Move::HitTwoTimesPoisonTarget < Battle::Move::PoisonMove
|
||||
class Battle::Move::HitTwoTimesPoisonTarget < Battle::Move::PoisonTarget
|
||||
def multiHitMove?; return true; end
|
||||
def pbNumHits(user,targets); return 2; end
|
||||
end
|
||||
@@ -18,7 +18,7 @@ end
|
||||
# Hits twice. Causes the target to flinch. Does double damage and has perfect
|
||||
# accuracy if the target is Minimized. (Double Iron Bash)
|
||||
#===============================================================================
|
||||
class Battle::Move::HitTwoTimesFlinchTarget < Battle::Move::FlinchMove
|
||||
class Battle::Move::HitTwoTimesFlinchTarget < Battle::Move::FlinchTarget
|
||||
def multiHitMove?; return true; end
|
||||
def pbNumHits(user,targets); return 2; end
|
||||
def tramplesMinimize?(param=1); return Settings::MECHANICS_GENERATION <= 7; end
|
||||
|
||||
@@ -727,7 +727,7 @@ class Battle::Move::UseLastMoveUsed < Battle::Move
|
||||
"BurnAttackerBeforeUserActs", # Beak Blast
|
||||
# Event moves that do nothing
|
||||
"DoesNothingFailsIfNoAlly", # Hold Hands
|
||||
"DoesNothingCongratuations" # Celebrate
|
||||
"DoesNothingCongratulations" # Celebrate
|
||||
]
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@moveBlacklist += [
|
||||
@@ -951,7 +951,7 @@ class Battle::Move::UseRandomMove < Battle::Move
|
||||
"BurnAttackerBeforeUserActs", # Beak Blast
|
||||
# Event moves that do nothing
|
||||
"DoesNothingFailsIfNoAlly", # Hold Hands
|
||||
"DoesNothingCongratuations" # Celebrate
|
||||
"DoesNothingCongratulations" # Celebrate
|
||||
]
|
||||
@moveBlacklistSignatures = [
|
||||
:SNARL,
|
||||
@@ -1065,7 +1065,7 @@ class Battle::Move::UseRandomMoveFromUserParty < Battle::Move
|
||||
"BurnAttackerBeforeUserActs", # Beak Blast
|
||||
# Event moves that do nothing
|
||||
"DoesNothingFailsIfNoAlly", # Hold Hands
|
||||
"DoesNothingCongratuations" # Celebrate
|
||||
"DoesNothingCongratulations" # Celebrate
|
||||
]
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@moveBlacklist += [
|
||||
|
||||
Reference in New Issue
Block a user