The Great Enspacening begins!

This commit is contained in:
Maruno17
2021-12-18 12:20:31 +00:00
parent 2480ab0f9e
commit f7b76ae62e
138 changed files with 567 additions and 567 deletions

View File

@@ -74,7 +74,7 @@ class Battle::Move
# NOTE: This method is only ever called while using a move (and also by the
# AI), so using @calcType here is acceptable.
def physicalMove?(thisType=nil)
def physicalMove?(thisType = nil)
return (@category==0) if Settings::MOVE_CATEGORY_PER_MOVE
thisType ||= @calcType
thisType ||= @type
@@ -84,7 +84,7 @@ class Battle::Move
# NOTE: This method is only ever called while using a move (and also by the
# AI), so using @calcType here is acceptable.
def specialMove?(thisType=nil)
def specialMove?(thisType = nil)
return (@category==1) if Settings::MOVE_CATEGORY_PER_MOVE
thisType ||= @calcType
thisType ||= @type
@@ -134,7 +134,7 @@ class Battle::Move
def danceMove?; return @flags.any? { |f| f[/^Dance$/i] }; end
# Causes perfect accuracy (param=1) and double damage (param=2).
def tramplesMinimize?(_param=1); return false; end
def tramplesMinimize?(_param = 1); return false; end
def nonLethal?(_user,_target); return false; end # For False Swipe
def ignoresSubstitute?(user) # user is the Pokémon using this move

View File

@@ -61,7 +61,7 @@ class Battle::Move
def pbDesignateTargetsForHit(targets, hitNum); return targets; end # For Dragon Darts
def pbRepeatHit?; return false; end # For Dragon Darts
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
return if !showAnimation
if user.effects[PBEffects::ParentalBond]==1
@battle.pbCommonAnimation("ParentalBond",user,targets)
@@ -122,7 +122,7 @@ class Battle::Move
return false
end
def pbMoveFailedAromaVeil?(user,target,showMessage=true)
def pbMoveFailedAromaVeil?(user,target,showMessage = true)
return false if @battle.moldBreaker
if target.hasActiveAbility?(:AROMAVEIL)
if showMessage
@@ -265,7 +265,7 @@ class Battle::Move
#=============================================================================
# Messages upon being hit
#=============================================================================
def pbEffectivenessMessage(user,target,numTargets=1)
def pbEffectivenessMessage(user,target,numTargets = 1)
return if target.damageState.disguise || target.damageState.iceFace
if Effectiveness.super_effective?(target.damageState.typeMod)
if numTargets>1
@@ -282,7 +282,7 @@ class Battle::Move
end
end
def pbHitEffectivenessMessages(user,target,numTargets=1)
def pbHitEffectivenessMessages(user,target,numTargets = 1)
return if target.damageState.disguise || target.damageState.iceFace
if target.damageState.substitute
@battle.pbDisplay(_INTL("The substitute took damage for {1}!",target.pbThis(true)))

View File

@@ -240,7 +240,7 @@ class Battle::Move
return target.defense, target.stages[:DEFENSE]+6
end
def pbCalcDamage(user,target,numTargets=1)
def pbCalcDamage(user,target,numTargets = 1)
return if statusMove?
if target.damageState.disguise || target.damageState.iceFace
target.damageState.calcDamage = 1
@@ -476,7 +476,7 @@ class Battle::Move
#=============================================================================
# Additional effect chance
#=============================================================================
def pbAdditionalEffectChance(user,target,effectChance=0)
def pbAdditionalEffectChance(user,target,effectChance = 0)
return 0 if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker
ret = (effectChance>0) ? effectChance : @addlEffect
if Settings::MECHANICS_GENERATION >= 6 || @function != "EffectDependsOnEnvironment"

View File

@@ -41,8 +41,8 @@ class Battle::Move::Confusion < Battle::Move
@snatched = false
end
def physicalMove?(thisType=nil); return true; end
def specialMove?(thisType=nil); return false; end
def physicalMove?(thisType = nil); return true; end
def specialMove?(thisType = nil); return false; end
def pbCritialOverride(user,target); return -1; end
end
@@ -70,8 +70,8 @@ class Battle::Move::Struggle < Battle::Move
@snatched = false
end
def physicalMove?(thisType=nil); return true; end
def specialMove?(thisType=nil); return false; end
def physicalMove?(thisType = nil); return true; end
def specialMove?(thisType = nil); return false; end
def pbEffectAfterAllHits(user,target)
return if target.damageState.unaffected
@@ -279,7 +279,7 @@ end
class Battle::Move::FixedDamageMove < Battle::Move
def pbFixedDamage(user,target); return 1; end
def pbCalcDamage(user,target,numTargets=1)
def pbCalcDamage(user,target,numTargets = 1)
target.damageState.critical = false
target.damageState.calcDamage = pbFixedDamage(user,target)
target.damageState.calcDamage = 1 if target.damageState.calcDamage<1
@@ -367,7 +367,7 @@ class Battle::Move::TwoTurnMove < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if @chargingTurn && !@damagingTurn # Charging anim
super
end
@@ -601,7 +601,7 @@ class Battle::Move::PledgeMove < Battle::Move
@battle.pbCommonAnimation(animName) if animName
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
return if @pledgeSetup # No animation for setting up
id = @overrideAnim if @overrideAnim
return super

View File

@@ -640,7 +640,7 @@ class Battle::Move::AttackTwoTurnsLater < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if !@battle.futureSight # Charging anim
super
end

View File

@@ -1721,7 +1721,7 @@ end
class Battle::Move::UserStealTargetPositiveStatStages < Battle::Move
def ignoresSubstitute?(user); return true; end
def pbCalcDamage(user,target,numTargets=1)
def pbCalcDamage(user,target,numTargets = 1)
if target.hasRaisedStatStages?
pbShowAnimation(@id,user,target,1) # Stat stage-draining animation
@battle.pbDisplay(_INTL("{1} stole the target's boosted stats!",user.pbThis))
@@ -1931,7 +1931,7 @@ class Battle::Move::StartSwapAllBattlersBaseDefensiveStats < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
return if @battle.field.effects[PBEffects::WonderRoom]>0 # No animation
super
end

View File

@@ -174,7 +174,7 @@ end
# Minimized. (Body Slam (Gen 6+))
#===============================================================================
class Battle::Move::ParalyzeTargetTrampleMinimize < Battle::Move::ParalyzeTarget
def tramplesMinimize?(param=1)
def tramplesMinimize?(param = 1)
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
return true if param==2 # Double damage
return super
@@ -442,7 +442,7 @@ class Battle::Move::CureUserPartyStatus < Battle::Move
return target.status == :NONE
end
def pbAromatherapyHeal(pkmn,battler=nil)
def pbAromatherapyHeal(pkmn,battler = nil)
oldStatus = (battler) ? battler.status : pkmn.status
curedName = (battler) ? battler.pbThis : pkmn.name
if battler
@@ -488,7 +488,7 @@ class Battle::Move::CureUserPartyStatus < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
super
if @id == :AROMATHERAPY
@battle.pbDisplay(_INTL("A soothing aroma wafted through the area!"))
@@ -552,7 +552,7 @@ end
# the target is Minimized. (Dragon Rush (Gen 6+), Steamroller, Stomp)
#===============================================================================
class Battle::Move::FlinchTargetTrampleMinimize < Battle::Move::FlinchTarget
def tramplesMinimize?(param=1)
def tramplesMinimize?(param = 1)
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
return true if param==2 # Double damage
return super
@@ -1388,7 +1388,7 @@ class Battle::Move::TransformUserIntoTarget < Battle::Move
user.pbTransform(target)
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
super
@battle.scene.pbChangePokemon(user,targets[0].pokemon)
end

View File

@@ -98,7 +98,7 @@ class Battle::Move::OHKO < Battle::Move::FixedDamageMove
return target.totalhp
end
def pbHitEffectivenessMessages(user,target,numTargets=1)
def pbHitEffectivenessMessages(user,target,numTargets = 1)
super
if target.fainted?
@battle.pbDisplay(_INTL("It's a one-hit KO!"))
@@ -310,7 +310,7 @@ end
# Does double damage and has perfect accuracy if the target is Minimized.
#===============================================================================
class Battle::Move::PowerHigherWithUserHeavierThanTarget < Battle::Move
def tramplesMinimize?(param=1)
def tramplesMinimize?(param = 1)
return true if Settings::MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage
return super
end
@@ -850,7 +850,7 @@ class Battle::Move::RemoveScreens < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
if user.pbOpposingSide.effects[PBEffects::LightScreen]>0 ||
user.pbOpposingSide.effects[PBEffects::Reflect]>0 ||
user.pbOpposingSide.effects[PBEffects::AuroraVeil]>0
@@ -1121,7 +1121,7 @@ end
# Minimized. (Flying Press)
#===============================================================================
class Battle::Move::EffectivenessIncludesFlyingType < Battle::Move
def tramplesMinimize?(param=1)
def tramplesMinimize?(param = 1)
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
return true if param==2 # Double damage
return super
@@ -1195,8 +1195,8 @@ class Battle::Move::CategoryDependsOnHigherDamageIgnoreTargetAbility < Battle::M
@calcCategory = 1
end
def physicalMove?(thisType=nil); return (@calcCategory==0); end
def specialMove?(thisType=nil); return (@calcCategory==1); end
def physicalMove?(thisType = nil); return (@calcCategory==0); end
def specialMove?(thisType = nil); return (@calcCategory==1); end
def pbOnStartUse(user,targets)
# Calculate user's effective attacking value
@@ -1568,7 +1568,7 @@ class Battle::Move::TypeDependsOnUserDrive < Battle::Move
return ret
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
t = pbBaseType(user)
hitNum = 0
hitNum = 1 if t == :ELECTRIC
@@ -1623,7 +1623,7 @@ class Battle::Move::TypeAndPowerDependOnWeather < Battle::Move
return ret
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
t = pbBaseType(user)
hitNum = 1 if t == :FIRE # Type-specific anims
hitNum = 2 if t == :WATER

View File

@@ -19,9 +19,9 @@ end
# accuracy if the target is Minimized. (Double Iron Bash)
#===============================================================================
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
def multiHitMove?; return true; end
def pbNumHits(user, targets); return 2; end
def tramplesMinimize?(param = 1); return Settings::MECHANICS_GENERATION <= 7; end
end
#===============================================================================
@@ -615,7 +615,7 @@ class Battle::Move::MultiTurnAttackBideThenReturnDoubleDamage < Battle::Move::Fi
user.effects[PBEffects::Bide] -= 1
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if !@damagingTurn # Charging anim
super
end

View File

@@ -649,7 +649,7 @@ class Battle::Move::StartPerishCountsForAllBattlers < Battle::Move
target.effects[PBEffects::PerishSongUser] = user.index
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
super
@battle.pbDisplay(_INTL("All Pokémon that hear the song will faint in three turns!"))
end

View File

@@ -279,7 +279,7 @@ class Battle::Move::StartNegateHeldItems < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
return if @battle.field.effects[PBEffects::MagicRoom]>0 # No animation
super
end

View File

@@ -80,7 +80,7 @@ class Battle::Move::RandomlyDamageOrHealTarget < Battle::Move
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if @presentDmg==0 # Healing anim
super
end
@@ -125,7 +125,7 @@ class Battle::Move::HealAllyOrDamageFoe < Battle::Move
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if @healing # Healing anim
super
end
@@ -193,7 +193,7 @@ class Battle::Move::CurseTargetOrLowerUserSpd1RaiseUserAtkDef1 < Battle::Move
user.pbItemHPHealCheck
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if !user.pbHasType?(:GHOST) # Non-Ghost anim
super
end
@@ -288,7 +288,7 @@ class Battle::Move::EffectDependsOnEnvironment < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
id = :BODYSLAM # Environment-specific anim
case @secretPower
when 1 then id = :THUNDERSHOCK if GameData::Move.exists?(:THUNDERSHOCK)
@@ -371,7 +371,7 @@ class Battle::Move::DoublePowerAfterFusionFlare < Battle::Move
@battle.field.effects[PBEffects::FusionBolt] = true
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if (targets.length>0 && targets[0].damageState.critical) ||
@doublePower # Charged anim
super
@@ -396,7 +396,7 @@ class Battle::Move::DoublePowerAfterFusionBolt < Battle::Move
@battle.field.effects[PBEffects::FusionFlare] = true
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
hitNum = 1 if (targets.length>0 && targets[0].damageState.critical) ||
@doublePower # Charged anim
super
@@ -777,7 +777,7 @@ class Battle::Move::UseLastMoveUsedByTarget < Battle::Move
user.pbUseMoveSimple(target.lastRegularMoveUsed,target.index)
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
# No animation
end
end

View File

@@ -637,7 +637,7 @@ class Battle::Move::StartSlowerBattlersActFirst < Battle::Move
end
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
def pbShowAnimation(id,user,targets,hitNum = 0,showAnimation = true)
return if @battle.field.effects[PBEffects::TrickRoom]>0 # No animation
super
end