Removed all excess whitespace and standardized line endings.

This commit is contained in:
m3rein
2020-09-05 21:23:16 +02:00
parent caed5bd757
commit 240af4e5e7
219 changed files with 929 additions and 929 deletions

View File

@@ -662,4 +662,4 @@ class PokeBattle_Battler
end
return @battle.battlers[(@index^1)]
end
end
end

View File

@@ -323,4 +323,4 @@ class PokeBattle_Battler
@participants.push(b.pokemonIndex) if !@participants.include?(b.pokemonIndex)
end
end
end
end

View File

@@ -298,4 +298,4 @@ class PokeBattle_Battler
end
def pbHyperMode; end
end
end

View File

@@ -570,4 +570,4 @@ class PokeBattle_Battler
return if hasActiveAbility?(:INNERFOCUS) && !@battle.moldBreaker
@effects[PBEffects::Flinch] = true
end
end
end

View File

@@ -307,4 +307,4 @@ class PokeBattle_Battler
def pbResetStatStages
PBStats.eachBattleStat { |s| @stages[s] = 0 }
end
end
end

View File

@@ -319,4 +319,4 @@ class PokeBattle_Battler
pbHeldItemTriggered(@item)
end
end
end
end

View File

@@ -190,4 +190,4 @@ class PokeBattle_Battler
pbAddTarget(targets,user,choices[@battle.pbRandom(choices.length)],nearOnly)
end
end
end
end

View File

@@ -127,13 +127,13 @@ class PokeBattle_Battler
@effects[PBEffects::Rage] = false
# Do nothing if using Snore/Sleep Talk
if @status==PBStatuses::SLEEP && move.usableWhenAsleep?
@battle.pbDisplay(_INTL("{1} ignored orders and kept sleeping!",pbThis))
@battle.pbDisplay(_INTL("{1} ignored orders and kept sleeping!",pbThis))
return false
end
b = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor
# Use another move
if b<badgeLevel
@battle.pbDisplay(_INTL("{1} ignored orders!",pbThis))
@battle.pbDisplay(_INTL("{1} ignored orders!",pbThis))
return false if !@battle.pbCanShowFightMenu?(@index)
otherMoves = []
eachMoveWithIndex do |m,i|
@@ -275,7 +275,7 @@ class PokeBattle_Battler
@battle.pbDisplay(_INTL("{1} is in love with {2}!",pbThis,
@battle.battlers[@effects[PBEffects::Attract]].pbThis(true)))
if @battle.pbRandom(100)<50
@battle.pbDisplay(_INTL("{1} is immobilized by love!",pbThis))
@battle.pbDisplay(_INTL("{1} is immobilized by love!",pbThis))
@lastMoveFailed = true
return false
end
@@ -405,7 +405,7 @@ class PokeBattle_Battler
if move.pbDamagingMove? && PBTypes.ineffective?(typeMod)
PBDebug.log("[Target immune] #{target.pbThis}'s type immunity")
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
return false
return false
end
# Dark-type immunity to moves made faster by Prankster
if NEWEST_BATTLE_MECHANICS && user.effects[PBEffects::Prankster] &&
@@ -535,4 +535,4 @@ class PokeBattle_Battler
@battle.pbDisplay(_INTL("{1}'s attack missed!",user.pbThis))
end
end
end
end

View File

@@ -72,7 +72,7 @@ class PokeBattle_Battler
next if b.status!=PBStatuses::FROZEN
# NOTE: Non-Fire-type moves that thaw the user will also thaw the
# target (in Gen 6+).
if isConst?(move.calcType,PBTypes,:FIRE) ||
if isConst?(move.calcType,PBTypes,:FIRE) ||
(NEWEST_BATTLE_MECHANICS && move.thawsUser?)
b.pbCureStatus
end
@@ -185,4 +185,4 @@ class PokeBattle_Battler
end
end
end
end
end

View File

@@ -27,4 +27,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -89,7 +89,7 @@ class PokeBattle_Move
def damagingMove?; return @category!=2; end
def statusMove?; return @category==2; end
def usableWhenAsleep?; return false; end
def unusableInGravity?; return false; end
def healingMove?; return false; end
@@ -137,4 +137,4 @@ class PokeBattle_Move
end
return false
end
end
end

View File

@@ -23,7 +23,7 @@ class PokeBattle_Move
def pbMissMessage(user,target); return false; end
#=============================================================================
#
#
#=============================================================================
# Whether the move is currently in the "charging" turn of a two turn attack.
# Is false if Power Herb or another effect lets a two turn move charge and
@@ -347,4 +347,4 @@ class PokeBattle_Move
target.lastFoeAttacker.push(user.index) # For Metal Burst
end
end
end
end

View File

@@ -711,4 +711,4 @@ class PokeBattle_PledgeMove < PokeBattle_Move
id = @overrideAnim if @overrideAnim!=nil
return super
end
end
end

View File

@@ -376,13 +376,13 @@ class PokeBattle_Move_094 < PokeBattle_Move
end
def pbBaseDamage(baseDmg,user,target)
return @presentDmg
return @presentDmg
end
def pbEffectAgainstTarget(user,target)
return if @presentDmg>0
target.pbRecoverHP(target.totalhp/4)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
@@ -622,7 +622,7 @@ class PokeBattle_Move_09B < PokeBattle_Move
if n>=5; ret = 120
elsif n>=4; ret = 100
elsif n>=3; ret = 80
elsif n>=2; ret = 60
elsif n>=2; ret = 60
end
return ret
end
@@ -638,7 +638,7 @@ class PokeBattle_Move_09C < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if target.fainted? || target.effects[PBEffects::HelpingHand]
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return true if pbMoveFailedTargetAlreadyMoved?(target)
@@ -2729,7 +2729,7 @@ class PokeBattle_Move_0DF < PokeBattle_Move
hpGain = (target.totalhp*3/4.0).round
end
target.pbRecoverHP(hpGain)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
end
@@ -2996,15 +2996,15 @@ class PokeBattle_Move_0EB < PokeBattle_Move
if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
@battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("{1} anchors itself!",target.pbThis))
@battle.pbDisplay(_INTL("{1} anchors itself!",target.pbThis))
else
@battle.pbDisplay(_INTL("{1} anchors itself with {2}!",target.pbThis,target.abilityName))
@battle.pbDisplay(_INTL("{1} anchors itself with {2}!",target.pbThis,target.abilityName))
end
@battle.pbHideAbilitySplash(target)
return true
end
if target.effects[PBEffects::Ingrain]
@battle.pbDisplay(_INTL("{1} anchored itself with its roots!",target.pbThis))
@battle.pbDisplay(_INTL("{1} anchored itself with its roots!",target.pbThis))
return true
end
if @battle.wildBattle? && target.level>user.level

View File

@@ -278,7 +278,7 @@ class PokeBattle_Move_10D < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if user.pbHasType?(:GHOST) && target.effects[PBEffects::Curse]
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
@@ -1401,7 +1401,7 @@ end
class PokeBattle_Move_142 < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if !hasConst?(PBTypes,:GHOST) || target.pbHasType?(:GHOST) || !target.canChangeType?
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
@@ -1423,7 +1423,7 @@ end
class PokeBattle_Move_143 < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if !hasConst?(PBTypes,:GRASS) || target.pbHasType?(:GRASS) || !target.canChangeType?
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
@@ -1547,7 +1547,7 @@ class PokeBattle_Move_148 < PokeBattle_Move
def pbEffectAgainstTarget(user,target)
target.effects[PBEffects::Powder] = true
@battle.pbDisplay(_INTL("{1} is covered in powder!",user.pbThis))
end
end
end
@@ -2208,7 +2208,7 @@ class PokeBattle_Move_165 < PokeBattle_Move
@battle.choices[target.index][0]==:Shift) && target.movedThisRound?)
target.effects[PBEffects::GastroAcid] = true
target.effects[PBEffects::Truant] = false
@battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis))
target.pbOnAbilityChanged(target.ability)
end
end
@@ -2434,7 +2434,7 @@ class PokeBattle_Move_16E < PokeBattle_Move
hpGain = (target.totalhp/2.0).round
hpGain = (target.totalhp*2/3.0).round if @battle.field.terrain==PBBattleTerrains::Grassy
target.pbRecoverHP(hpGain)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
end
@@ -2476,7 +2476,7 @@ class PokeBattle_Move_16F < PokeBattle_Move
def pbEffectAgainstTarget(user,target)
return if !@healing
target.pbRecoverHP(target.totalhp/2)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
@@ -2623,4 +2623,4 @@ end
# NOTE: If you're inventing new move effects, use function code 176 and onwards.
# Actually, you might as well use high numbers like 500+ (up to FFFF),
# just to make sure later additions to Essentials don't clash with your
# new effects.
# new effects.

View File

@@ -29,4 +29,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -599,7 +599,7 @@ class PokeBattle_Battle
end
#=============================================================================
#
#
#=============================================================================
# Returns the battler representing the Pokémon at index idxParty in its party,
# on the same side as a battler with battler index of idxBattlerOther.
@@ -650,7 +650,7 @@ class PokeBattle_Battle
return if @field.weather==newWeather
@field.weather = newWeather
duration = (fixedDuration) ? 5 : -1
if duration>0 && user && user.itemActive?
if duration>0 && user && user.itemActive?
duration = BattleHandlers.triggerWeatherExtenderItem(user.item,
@field.weather,duration,user,self)
end
@@ -708,7 +708,7 @@ class PokeBattle_Battle
return if @field.terrain==newTerrain
@field.terrain = newTerrain
duration = (fixedDuration) ? 5 : -1
if duration>0 && user && user.itemActive?
if duration>0 && user && user.itemActive?
duration = BattleHandlers.triggerTerrainExtenderItem(user.item,
newTerrain,duration,user,self)
end
@@ -778,4 +778,4 @@ class PokeBattle_Battle
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@scene.pbReplaceAbilitySplash(battler)
end
end
end

View File

@@ -376,7 +376,7 @@ class PokeBattle_Battle
moneyLost = oldMoney-pbPlayer.money
if moneyLost>0
if trainerBattle?
pbDisplayPaused(_INTL("You gave ${1} to the winner...",moneyLost.to_s_formatted))
pbDisplayPaused(_INTL("You gave ${1} to the winner...",moneyLost.to_s_formatted))
else
pbDisplayPaused(_INTL("You panicked and dropped ${1}...",moneyLost.to_s_formatted))
end
@@ -534,4 +534,4 @@ class PokeBattle_Battle
elsif fainted2; @decision = 1 # Win
end
end
end
end

View File

@@ -188,7 +188,7 @@ class PokeBattle_Battle
curLevel += 1
if curLevel>newLevel
# Gained all the Exp now, end the animation
pkmn.calcStats
pkmn.calcStats
battler.pbUpdate(false) if battler
@scene.pbRefreshOne(battler.index) if battler
break
@@ -260,4 +260,4 @@ class PokeBattle_Battle
end
end
end
end
end

View File

@@ -251,4 +251,4 @@ class PokeBattle_Battle
end
return ret
end
end
end

View File

@@ -189,7 +189,7 @@ class PokeBattle_Battle
switched.push(idxBattler)
else # Player's Pokémon has fainted in a wild battle
switch = false
if !pbDisplayConfirm(_INTL("Use next Pokémon?"))
if !pbDisplayConfirm(_INTL("Use next Pokémon?"))
switch = (pbRun(idxBattler,true)<=0)
else
switch = true
@@ -408,4 +408,4 @@ class PokeBattle_Battle
battler.pbCheckForm
return true
end
end
end

View File

@@ -141,4 +141,4 @@ class PokeBattle_Battle
# Return unused item to Bag
pbReturnUnusedItemToBag(item,userBattler.index)
end
end
end

View File

@@ -35,7 +35,7 @@ class PokeBattle_Battle
if battler.opposes?
return 0 if trainerBattle?
@choices[idxBattler][0] = :Run
@choices[idxBattler][1] = 0
@choices[idxBattler][1] = 0
@choices[idxBattler][2] = nil
return -1
end
@@ -142,4 +142,4 @@ class PokeBattle_Battle
pbDisplayPaused(_INTL("You couldn't get away!"))
return -1
end
end
end

View File

@@ -189,4 +189,4 @@ class PokeBattle_Battle
end
pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",battler.pbThis))
end
end
end

View File

@@ -247,4 +247,4 @@ class PokeBattle_Battle
break if commandsEnd
end
end
end
end

View File

@@ -187,4 +187,4 @@ class PokeBattle_Battle
pbAttackPhaseMegaEvolution
pbAttackPhaseMoves
end
end
end

View File

@@ -79,7 +79,7 @@ class PokeBattle_Battle
b.pbFaint if b.fainted?
end
# Weather damage
# NOTE:
# NOTE:
case curWeather
when PBWeather::Sandstorm
next if !b.takesSandstormDamage?
@@ -442,7 +442,7 @@ class PokeBattle_Battle
if b.effects[PBEffects::Encore]==0 || b.moves[idxEncoreMove].pp==0
b.effects[PBEffects::Encore] = 0
pbDisplay(_INTL("{1}'s encore ended!",b.pbThis))
end
end
else
PBDebug.log("[End of effect] #{b.pbThis}'s encore ended (encored move no longer known)")
b.effects[PBEffects::Encore] = 0
@@ -573,7 +573,7 @@ class PokeBattle_Battle
if b.effects[PBEffects::Uproar]==0
pbDisplay(_INTL("{1} calmed down.",b.pbThis))
else
pbDisplay(_INTL("{1} is making an uproar!",b.pbThis))
pbDisplay(_INTL("{1} is making an uproar!",b.pbThis))
end
end
# Slow Start's end message
@@ -664,4 +664,4 @@ class PokeBattle_Battle
@field.effects[PBEffects::FusionFlare] = false
@endOfRound = false
end
end
end

View File

@@ -22,4 +22,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -39,7 +39,7 @@ class PokeBattle_AI
deviation = c[1].to_f-mean
varianceTimesN += deviation*deviation
end
# Using population standard deviation
# Using population standard deviation
# [(n-1) makes it a sample std dev, would be 0 with only 1 sample]
return Math.sqrt(varianceTimesN/n)
end
@@ -66,4 +66,4 @@ class PokeBattle_AI
@battle.pbRegisterMegaEvolution(idxBattler) if pbEnemyShouldMegaEvolve?(idxBattler)
pbChooseMoves(idxBattler)
end
end
end

View File

@@ -179,4 +179,4 @@ class PokeBattle_AI
end
return 0
end
end
end

View File

@@ -17,7 +17,7 @@ class PokeBattle_AI
# super-effective and powerful
if !shouldSwitch && battler.turnCount>0 && skill>=PBTrainerAI.highSkill
target = battler.pbDirectOpposing(true)
if !target.fainted? && target.lastMoveUsed>0 &&
if !target.fainted? && target.lastMoveUsed>0 &&
(target.level-battler.level).abs<=6
moveData = pbGetMoveData(target.lastMoveUsed)
moveType = moveData[MOVE_TYPE]
@@ -135,7 +135,7 @@ class PokeBattle_AI
if @battle.pbRegisterSwitch(idxBattler,list[0])
PBDebug.log("[AI] #{battler.pbThis} (#{idxBattler}) will switch with " +
"#{@battle.pbParty(idxBattler)[list[0]].name}")
return
return
end
end
end
@@ -179,4 +179,4 @@ class PokeBattle_AI
end
return best
end
end
end

View File

@@ -284,4 +284,4 @@ class PokeBattle_AI
score += damagePercentage.to_i
return score
end
end
end

View File

@@ -213,7 +213,7 @@ class PokeBattle_AI
#---------------------------------------------------------------------------
when "01A"
if user.pbOwnSide.effects[PBEffects::Safeguard]>0
score -= 80
score -= 80
elsif user.status!=0
score -= 40
else
@@ -1431,7 +1431,7 @@ class PokeBattle_AI
end
end
if skill>=PBTrainerAI.highSkill
if isConst?(target.ability,PBAbilities,:TRUANT) &&
if isConst?(target.ability,PBAbilities,:TRUANT) &&
user.opposes?(target)
score -= 90
elsif isConst?(target.ability,PBAbilities,:SLOWSTART) &&
@@ -1460,7 +1460,7 @@ class PokeBattle_AI
score -= 90
end
if skill>=PBTrainerAI.highSkill
if isConst?(user.ability,PBAbilities,:TRUANT) &&
if isConst?(user.ability,PBAbilities,:TRUANT) &&
user.opposes?(target)
score += 90
elsif isConst?(user.ability,PBAbilities,:SLOWSTART) &&
@@ -1487,7 +1487,7 @@ class PokeBattle_AI
end
end
if skill>=PBTrainerAI.highSkill
if isConst?(target.ability,PBAbilities,:TRUANT) &&
if isConst?(target.ability,PBAbilities,:TRUANT) &&
user.opposes?(target)
score -= 90
elsif isConst?(target.ability,PBAbilities,:SLOWSTART) &&
@@ -1795,7 +1795,7 @@ class PokeBattle_AI
score -= 90 if user.effects[PBEffects::Imprison]
#---------------------------------------------------------------------------
when "0B9"
score -= 90 if target.effects[PBEffects::Disable]>0
score -= 90 if target.effects[PBEffects::Disable]>0
#---------------------------------------------------------------------------
when "0BA"
score -= 90 if target.effects[PBEffects::Taunt]>0
@@ -1872,9 +1872,9 @@ class PokeBattle_AI
#---------------------------------------------------------------------------
when "0D4"
if user.hp<=user.totalhp/4
score -= 90
score -= 90
elsif user.hp<=user.totalhp/2
score -= 50
score -= 50
end
#---------------------------------------------------------------------------
when "0D5", "0D6"
@@ -1971,7 +1971,7 @@ class PokeBattle_AI
!target.pbCanLowerStatStage?(PBStats::SPATK,user)
score -= 100
elsif @battle.pbAbleNonActiveCount(user.idxOwnSide)==0
score -= 100
score -= 100
else
score += target.stages[PBStats::ATTACK]*10
score += target.stages[PBStats::SPATK]*10
@@ -2022,7 +2022,7 @@ class PokeBattle_AI
when "0EB"
if target.effects[PBEffects::Ingrain] ||
(skill>=PBTrainerAI.highSkill && target.hasActiveAbility?(:SUCTIONCUPS))
score -= 90
score -= 90
else
ch = 0
@battle.pbParty(target.index).each_with_index do |pkmn,i|
@@ -2952,7 +2952,7 @@ class PokeBattle_AI
#---------------------------------------------------------------------------
when "167"
if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || @battle.pbWeather!=PBWeather::Hail
score -= 90
score -= 90
else
score += 40
end
@@ -3072,4 +3072,4 @@ class PokeBattle_AI
end
return score
end
end
end

View File

@@ -1,6 +1,6 @@
class PokeBattle_AI
#=============================================================================
#
#
#=============================================================================
def pbTargetsMultiple?(move,user)
numTargets = 0
@@ -672,4 +672,4 @@ class PokeBattle_AI
end
end
end
end
end

View File

@@ -67,4 +67,4 @@ module PBTargets
target==Other ||
target==RandomNearFoe
end
end
end

View File

@@ -261,4 +261,4 @@ module PokeBattle_BallAnimationMixin
# The Poké Ball burst animation used when recalling a Pokémon.
def ballBurstRecall(delay,ballX,ballY,ballType)
end
end
end

View File

@@ -879,4 +879,4 @@ class PokeballThrowDeflectAnimation < PokeBattle_Animation
ball.moveXY(delay,8,-32,Graphics.height-96+32) # Back to player's corner
createBallTumbling(ball,delay,8)
end
end
end

View File

@@ -60,4 +60,4 @@ module PokeBattle_SceneConstants
FOCUSUSER_Y = 224 # 188
FOCUSTARGET_X = 384 # 352
FOCUSTARGET_Y = 96 # 108, 98
end
end

View File

@@ -545,4 +545,4 @@ class TargetMenuDisplay < BattleMenuBase
def refresh
refreshButtons
end
end
end

View File

@@ -303,7 +303,7 @@ class PokeBattle_Scene
end
#=============================================================================
#
#
#=============================================================================
def pbSelectBattler(idxBattler,selectMode=1)
numWindows = @battle.sideSizes.max*2
@@ -333,7 +333,7 @@ class PokeBattle_Scene
end
#=============================================================================
#
#
#=============================================================================
# This method is called when the player wins a wild Pokémon battle.
# This method can change the battle's music for example.
@@ -348,4 +348,4 @@ class PokeBattle_Scene
@battleEnd = true
pbBGMPlay(pbGetTrainerVictoryME(@battle.opponent))
end
end
end

View File

@@ -188,4 +188,4 @@ class PokeBattle_Scene
shaSprite.visible = false
@sprites["shadow_#{idxBattler}"] = shaSprite
end
end
end

View File

@@ -464,4 +464,4 @@ class PokeBattle_Scene
screen.pbDexEntry(species)
}
end
end
end

View File

@@ -539,4 +539,4 @@ class PokeBattle_Scene
targetSprite.pbSetOrigin
end
end
end
end

View File

@@ -117,7 +117,7 @@ begin
WaterSport = 111
WeightChange = 112
Yawn = 113
#===========================================================================
# These effects apply to a battler position
#===========================================================================
@@ -130,7 +130,7 @@ begin
Wish = 6
WishAmount = 7
WishMaker = 8
#===========================================================================
# These effects apply to a side
#===========================================================================
@@ -156,7 +156,7 @@ begin
Tailwind = 19
ToxicSpikes = 20
WideGuard = 21
#===========================================================================
# These effects apply to the battle (i.e. both sides)
#===========================================================================
@@ -179,4 +179,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -1,12 +1,12 @@
#===============================================================================
#
#
#===============================================================================
class AnimFrame
X = 0
Y = 1
ZOOMX = 2
ANGLE = 3
MIRROR = 4
MIRROR = 4
BLENDTYPE = 5
VISIBLE = 6
PATTERN = 7
@@ -32,7 +32,7 @@ end
#===============================================================================
#
#
#===============================================================================
def yaxisIntersect(x1,y1,x2,y2,px,py)
dx = x2-x1
@@ -110,7 +110,7 @@ def pbResetCel(frame)
end
#===============================================================================
#
#
#===============================================================================
def pbConvertRPGAnimation(animation)
pbAnim = PBAnimation.new
@@ -170,7 +170,7 @@ end
#===============================================================================
#
#
#===============================================================================
class RPG::Animation
def self.fromOther(otherAnim,id)
@@ -236,7 +236,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PBAnimTiming
attr_accessor :frame
@@ -353,7 +353,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PBAnimations < Array
include Enumerable
@@ -416,7 +416,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PBAnimation < Array
include Enumerable
@@ -621,7 +621,7 @@ end
#===============================================================================
#
#
#===============================================================================
def pbSpriteSetAnimFrame(sprite,frame,user=nil,target=nil,inEditor=false)
return if !sprite
@@ -662,7 +662,7 @@ def pbSpriteSetAnimFrame(sprite,frame,user=nil,target=nil,inEditor=false)
frame[AnimFrame::TONERED],
frame[AnimFrame::TONEGREEN],
frame[AnimFrame::TONEBLUE],
frame[AnimFrame::TONEGRAY]
frame[AnimFrame::TONEGRAY]
)
sprite.ox = sprite.src_rect.width/2
sprite.oy = sprite.src_rect.height/2
@@ -799,7 +799,7 @@ class PBAnimationPlayerX
def update
return if @frame<0
animFrame = @frame/@framesPerTick
# Loop or end the animation if the animation has reached the end
if animFrame >= @animation.length
@frame = (@looping) ? 0 : -1
@@ -822,7 +822,7 @@ class PBAnimationPlayerX
@bgColor.update
@foGraphic.update
@foColor.update
# Update all the sprites to depict the animation's next frame
if @framesPerTick==1 || (@frame%@framesPerTick)==0
thisframe = @animation[animFrame]
@@ -876,4 +876,4 @@ class PBAnimationPlayerX
end
@frame += 1
end
end
end

View File

@@ -24,7 +24,7 @@ class PokeBattle_FakeBattler
def displayGender; return @pokemon.gender; end
def shiny?; return @pokemon.shiny?; end
alias isShiny? shiny?
def fainted?; return false; end
alias isFainted? fainted?
def shadowPokemon?; return false; end
@@ -468,17 +468,17 @@ class PokeBattle_SafariZone
# End of round
if @decision==0
if @ballCount<=0
pbDisplay(_INTL("PA: You have no Safari Balls left! Game over!"))
pbDisplay(_INTL("PA: You have no Safari Balls left! Game over!"))
@decision = 2
elsif pbRandom(100)<5*escapeFactor
pbDisplay(_INTL("{1} fled!",wildpoke.name)) { pbSEPlay("Battle flee") }
@decision = 3
elsif cmd==1 # Bait
pbDisplay(_INTL("{1} is eating!",wildpoke.name))
pbDisplay(_INTL("{1} is eating!",wildpoke.name))
elsif cmd==2 # Rock
pbDisplay(_INTL("{1} is angry!",wildpoke.name))
pbDisplay(_INTL("{1} is angry!",wildpoke.name))
else
pbDisplay(_INTL("{1} is watching carefully!",wildpoke.name))
pbDisplay(_INTL("{1} is watching carefully!",wildpoke.name))
end
# Weather continues
@scene.pbCommonAnimation(PBWeather.animationName(@weather))
@@ -491,4 +491,4 @@ class PokeBattle_SafariZone
end
return @decision
end
end
end

View File

@@ -84,4 +84,4 @@ class PokeBattle_BugContestBattle < PokeBattle_Battle
super
@decision = 3 if @ballCount<=0 && @decision==0
end
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
class PokeBattle_BattlePalace < PokeBattle_Battle
@@BattlePalaceUsualTable = [
@@ -17,15 +17,15 @@ class PokeBattle_BattlePalace < PokeBattle_Battle
58, 37, 5,
34, 11, 55,
35, 5, 60,
56, 22, 22,
35, 45, 20,
44, 50, 6,
56, 22, 22,
30, 58, 12,
30, 13, 57,
40, 50, 10,
18, 70, 12,
88, 6, 6,
56, 22, 22,
35, 45, 20,
44, 50, 6,
56, 22, 22,
30, 58, 12,
30, 13, 57,
40, 50, 10,
18, 70, 12,
88, 6, 6,
42, 50, 8,
56, 22, 22
]
@@ -34,24 +34,24 @@ class PokeBattle_BattlePalace < PokeBattle_Battle
84, 8, 8,
32, 60, 8,
70, 15, 15,
70, 22, 8,
70, 22, 8,
32, 58, 10,
56, 22, 22,
75, 15, 10,
28, 55, 17,
29, 6, 65,
30, 20, 50,
88, 6, 6,
29, 11, 60,
35, 60, 5,
56, 22, 22,
34, 60, 6,
29, 6, 65,
30, 20, 50,
88, 6, 6,
29, 11, 60,
35, 60, 5,
56, 22, 22,
34, 60, 6,
34, 6, 60,
56, 22, 22,
56, 22, 22,
30, 58, 12,
27, 6, 67,
25, 62, 13,
90, 5, 5,
90, 5, 5,
22, 20, 58,
42, 5, 53,
56, 22, 22
@@ -80,7 +80,7 @@ class PokeBattle_BattlePalace < PokeBattle_Battle
thismove = thispkmn.moves[idxMove]
return false if !thismove || thismove.id==0
return false if thismove.pp<=0
if thispkmn.effects[PBEffects::ChoiceBand]>=0 &&
if thispkmn.effects[PBEffects::ChoiceBand]>=0 &&
thismove.id!=thispkmn.effects[PBEffects::ChoiceBand] &&
thispkmn.hasActiveItem?(:CHOICEBAND)
return false
@@ -94,11 +94,11 @@ class PokeBattle_BattlePalace < PokeBattle_Battle
def pbPinchChange(idxPokemon)
thispkmn = @battlers[idxPokemon]
if !thispkmn.effects[PBEffects::Pinch] && thispkmn.status!=PBStatuses::SLEEP &&
if !thispkmn.effects[PBEffects::Pinch] && thispkmn.status!=PBStatuses::SLEEP &&
thispkmn.hp<=thispkmn.totalhp/2
nature = thispkmn.nature
thispkmn.effects[PBEffects::Pinch] = true
if nature==PBNatures::QUIET ||
if nature==PBNatures::QUIET ||
nature==PBNatures::BASHFUL ||
nature==PBNatures::NAIVE ||
nature==PBNatures::QUIRKY ||
@@ -198,7 +198,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PokeBattle_AI
attr_accessor :battlePalace
@@ -242,7 +242,7 @@ class PokeBattle_AI
factor = (maxpercent<hppercent) ? 20 : 40
end
if hppercent<25
factor = (maxpercent<hppercent) ? 30 : 50
factor = (maxpercent<hppercent) ? 30 : 50
end
case thispkmn.status
when PBStatuses::SLEEP, PBStatuses::FROZEN
@@ -272,4 +272,4 @@ class PokeBattle_AI
end
return false
end
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
module PokeBattle_RecordedBattleModule
attr_reader :randomnums
@@ -131,7 +131,7 @@ end
#===============================================================================
#
#
#===============================================================================
module BattlePlayerHelper
def self.pbGetOpponent(battle)
@@ -165,7 +165,7 @@ end
#===============================================================================
#
#
#===============================================================================
module PokeBattle_BattlePlayerModule
module Commands
@@ -254,7 +254,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PokeBattle_RecordedBattle < PokeBattle_Battle
include PokeBattle_RecordedBattleModule
@@ -294,4 +294,4 @@ end
class PokeBattle_BattleArenaPlayer < PokeBattle_BattleArena
include PokeBattle_BattlePlayerModule
end
end

View File

@@ -82,4 +82,4 @@ class PokeBattle_DebugSceneNoLogging
break if yield replacements[rand(replacements.length)],self
end
end
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
# Unused class.
class PokeBattle_NullBattlePeer
@@ -19,7 +19,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PokeBattle_RealBattlePeer
def pbStorePokemon(player,pkmn)
@@ -56,10 +56,10 @@ end
#===============================================================================
#
#
#===============================================================================
class PokeBattle_BattlePeer
def self.create
return PokeBattle_RealBattlePeer.new
end
end
end

View File

@@ -61,8 +61,8 @@ class PokeBattle_Battler
def pbCanSleep?(user,showMessages,move=nil,ignoreStatus=false)
selfsleep = (user && user.index==@index)
if ((@battle.rules["modifiedsleepclause"]) || (!selfsleep && @battle.rules["sleepclause"])) &&
pbHasStatusPokemon?(PBStatuses::SLEEP)
if ((@battle.rules["modifiedsleepclause"]) || (!selfsleep && @battle.rules["sleepclause"])) &&
pbHasStatusPokemon?(PBStatuses::SLEEP)
if showMessages
@battle.pbDisplay(_INTL("But {1} couldn't sleep!",pbThis(true)))
end
@@ -72,7 +72,7 @@ class PokeBattle_Battler
end
def pbCanSleepYawn?
if (@battle.rules["sleepclause"] || @battle.rules["modifiedsleepclause"]) &&
if (@battle.rules["sleepclause"] || @battle.rules["modifiedsleepclause"]) &&
pbHasStatusPokemon?(PBStatuses::SLEEP)
return false
end
@@ -205,7 +205,7 @@ class PokeBattle_Move_0E0 # Self-Destruct
count += @battle.pbAbleNonActiveCount(user.idxOpposingSide)
if count==0
@battle.pbDisplay(_INTL("{1}'s team was disqualified!",user.pbThis))
@battle.decision = (user.opposes?) ? 1 : 2
@battle.decision = (user.opposes?) ? 1 : 2
return false
end
end
@@ -241,4 +241,4 @@ class PokeBattle_Move_0E7 # Destiny Bond
end
return __clauses__pbFailsAgainstTarget?(user,target)
end
end
end

View File

@@ -1293,7 +1293,7 @@ BattleHandlers::EndOfMoveItem.add(:LEPPABERRY,
choice = found[battle.pbRandom(found.length)]
pkmnMove = battler.pokemon.moves[choice]
pkmnMove.pp += 10
pkmnMove.pp = pkmnMove.totalpp if pkmnMove.pp>pkmnMove.totalpp
pkmnMove.pp = pkmnMove.totalpp if pkmnMove.pp>pkmnMove.totalpp
battler.moves[choice].pp = pkmnMove.pp
moveName = PBMoves.getName(pkmnMove.id)
if forced
@@ -1584,4 +1584,4 @@ BattleHandlers::RunFromBattleItem.add(:SMOKEBALL,
proc { |item,battler|
next true
}
)
)

View File

@@ -50,7 +50,7 @@ end
#===============================================================================
#
#
#===============================================================================
module BallHandlers
IsUnconditional = ItemHandlerHash.new
@@ -242,4 +242,4 @@ BallHandlers::OnCatch.add(:HEALBALL,proc { |ball,battle,pkmn|
BallHandlers::OnCatch.add(:FRIENDBALL,proc { |ball,battle,pkmn|
pkmn.happiness = 200
})
})

View File

@@ -87,4 +87,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -7,7 +7,7 @@ class PokeBattle_DamageState
attr_accessor :magicBounce
attr_accessor :totalHPLost # Like hpLost, but cumulative over all hits
attr_accessor :fainted # Whether battler was knocked out by the move
attr_accessor :missed # Whether the move failed the accuracy check
attr_accessor :calcDamage # Calculated damage
attr_accessor :hpLost # HP lost by opponent, inc. HP lost by a substitute
@@ -81,4 +81,4 @@ class PokeBattle_SuccessState
end
clear(false)
end
end
end