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

@@ -90,4 +90,4 @@ module PBTerrain
def self.isDoubleWildBattle?(tag)
return tag==PBTerrain::TallGrass
end
end
end

View File

@@ -134,7 +134,7 @@ module Events
def self.onEndBattle=(v); @@OnEndBattle = v; end
# Triggers whenever a wild Pokémon is created
# Parameters:
# Parameters:
# e[0] - Pokémon being created
def self.onWildPokemonCreate; @@OnWildPokemonCreate; end
def self.onWildPokemonCreate=(v); @@OnWildPokemonCreate = v; end
@@ -145,7 +145,7 @@ module Events
def self.onWildBattleOverride=(v); @@OnWildBattleOverride = v; end
# Triggers whenever a wild Pokémon battle ends
# Parameters:
# Parameters:
# e[0] - Pokémon species
# e[1] - Pokémon level
# e[2] - Battle result (1-win, 2-loss, 3-escaped, 4-caught, 5-draw)
@@ -153,7 +153,7 @@ module Events
def self.onWildBattleEnd=(v); @@OnWildBattleEnd = v; end
# Triggers whenever an NPC trainer's Pokémon party is loaded
# Parameters:
# Parameters:
# e[0] - Trainer
# e[1] - Items possessed by the trainer
# e[2] - Party
@@ -1384,4 +1384,4 @@ def pbReceiveItem(item,quantity=1)
return true
end
return false # Can't add the item
end
end

View File

@@ -127,9 +127,9 @@ class LightEffect_Lamp < LightEffect
lamp = AnimatedBitmap.new("Graphics/Pictures/LE")
@light = Sprite.new(viewport)
@light.bitmap = Bitmap.new(128,64)
src_rect = Rect.new(0, 0, 64, 64)
@light.bitmap.blt(0, 0, lamp.bitmap, src_rect)
@light.bitmap.blt(20, 0, lamp.bitmap, src_rect)
src_rect = Rect.new(0, 0, 64, 64)
@light.bitmap.blt(0, 0, lamp.bitmap, src_rect)
@light.bitmap.blt(20, 0, lamp.bitmap, src_rect)
@light.visible = true
@light.z = 1000
lamp.dispose
@@ -195,7 +195,7 @@ class LightEffect_DayNight < LightEffect
$game_screen.tone.blue,
$game_screen.tone.gray)
end
end
end
end
@@ -594,7 +594,7 @@ def pbCaveEntranceEx(exiting)
if exiting
sprite.color = Color.new(255,255,255,j*increment)
else
sprite.color = Color.new(0,0,0,j*increment)
sprite.color = Color.new(0,0,0,j*increment)
end
Graphics.update
Input.update
@@ -723,7 +723,7 @@ def pbScrollMap(direction,distance,speed)
pbUpdateSceneMap
break if $game_map.display_x==oldx && $game_map.display_y==oldy
oldx = $game_map.display_x
oldy = $game_map.display_y
oldy = $game_map.display_y
end
end
end
end

View File

@@ -271,4 +271,4 @@ module RPG
end
end
end
end
end

View File

@@ -142,7 +142,7 @@ end
#===============================================================================
class PokemonMapMetadata
attr_reader :erasedEvents
attr_reader :movedEvents
attr_reader :movedEvents
attr_accessor :strengthUsed
attr_accessor :blackFluteUsed
attr_accessor :whiteFluteUsed
@@ -222,4 +222,4 @@ class PokemonTemp
@miniupdate = false
@forceSingleBattle = false
end
end
end

View File

@@ -11,7 +11,7 @@ end
class PokemonTemp
attr_accessor :encounterType
attr_accessor :encounterType
attr_accessor :evolutionLevels
def battleRules
@@ -448,7 +448,7 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
# then trigger and cause the battle to happen against this first trainer and
# themselves.
if !$PokemonTemp.waitingTrainer && pbMapInterpreterRunning? &&
($Trainer.ablePokemonCount>1 ||
($Trainer.ablePokemonCount>1 ||
($Trainer.ablePokemonCount>0 && $PokemonGlobal.partner))
thisEvent = pbMapInterpreter.get_character(0)
# Find all other triggered trainer events
@@ -496,7 +496,7 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
end
def pbDoubleTrainerBattle(trainerID1, trainerName1, trainerPartyID1, endSpeech1,
trainerID2, trainerName2, trainerPartyID2=0, endSpeech2=nil,
trainerID2, trainerName2, trainerPartyID2=0, endSpeech2=nil,
canLose=false, outcomeVar=1)
# Set some battle rules
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
@@ -512,8 +512,8 @@ def pbDoubleTrainerBattle(trainerID1, trainerName1, trainerPartyID1, endSpeech1,
end
def pbTripleTrainerBattle(trainerID1, trainerName1, trainerPartyID1, endSpeech1,
trainerID2, trainerName2, trainerPartyID2, endSpeech2,
trainerID3, trainerName3, trainerPartyID3=0, endSpeech3=nil,
trainerID2, trainerName2, trainerPartyID2, endSpeech2,
trainerID3, trainerName3, trainerPartyID3=0, endSpeech3=nil,
canLose=false, outcomeVar=1)
# Set some battle rules
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
@@ -678,4 +678,4 @@ def pbHoneyGather(pkmn)
chance = 5+((pkmn.level-1)/10)*5
return unless rand(100)<chance
pkmn.setItem(:HONEY)
end
end

View File

@@ -49,7 +49,7 @@ end
#===============================================================================
#
#
#===============================================================================
class PokemonEncounters
attr_reader :stepcount
@@ -84,7 +84,7 @@ class PokemonEncounters
# for the current map.
def hasEncounter?(enc)
return false if @density==nil || enc<0
return @enctypes[enc] ? true : false
return @enctypes[enc] ? true : false
end
# Returns whether encounters for the given encounter type have been defined
@@ -100,7 +100,7 @@ class PokemonEncounters
return false
end
return false if density==nil || enctype<0
return enctypes[enctype] ? true : false
return enctypes[enctype] ? true : false
end
# Returns whether cave-like encounters have been defined for the current map.
@@ -400,7 +400,7 @@ end
#===============================================================================
#
#
#===============================================================================
# Returns a Pokémon generated by a wild encounter, given its species and level.
def pbGenerateWildPokemon(species,level,isRoamer=false)
@@ -465,4 +465,4 @@ def pbEncounter(enctype)
end
$PokemonTemp.encounterType = -1
return true
end
end

View File

@@ -42,4 +42,4 @@ Events.onWildPokemonCreate += proc { |sender,e|
# party = e[0][2] # An array of the trainer's Pokémon
# YOUR CODE HERE
# end
#}
#}

View File

@@ -110,7 +110,7 @@ class DungeonMaze
tiles[i]=[]
for j in 0...TILE_WIDTH*TILE_HEIGHT
tiles[i][j]=0
end
end
end
paintRect(tiles[0],5,0,3,10) # N
paintRect(tiles[1],5,0,3,8) # N E
@@ -136,7 +136,7 @@ class DungeonMaze
[tiles[1],TurnLeft], # N W
[tiles[0],TurnLeft], # W
[tiles[0],None], # N
[nil,None]
[nil,None]
]
return realtiles
end
@@ -203,7 +203,7 @@ class Maze
list=[]
for x in 0...nodeWidth
for y in 0...nodeHeight
list.push(NodeListElement.new(x,y))
list.push(NodeListElement.new(x,y))
end
end
list.shuffle!
@@ -379,10 +379,10 @@ class Dungeon
def initialize(dungeon)
@dungeon=dungeon
end
def xsize; @dungeon.width; end
def ysize; @dungeon.height; end
def [](x,y)
[1,2,3,2][@dungeon[x,y]]
end
@@ -526,13 +526,13 @@ class Dungeon
end
def intersects?(r1,r2)
return !((( r2[0] + r2[2] <= r1[0] ) ||
return !((( r2[0] + r2[2] <= r1[0] ) ||
( r2[0] >= r1[0] + r1[2] ) ||
( r2[1] + r2[3] <= r1[1] ) ||
( r2[1] + r2[3] <= r1[1] ) ||
( r2[1] >= r1[1] + r1[3] ) ) &&
(( r1[0] <= r2[0] + r2[2] )||
( r1[0] >= r2[0] + r2[2] ) ||
( r1[1] + r1[3] <= r2[1] ) ||
( r1[1] + r1[3] <= r2[1] ) ||
( r1[1] >= r2[1] + r2[3] ))
);
end
@@ -581,4 +581,4 @@ Events.onMapCreate += proc { |sender, e|
$game_temp.player_new_y=tile[1]
end
end
}
}

View File

@@ -15,8 +15,8 @@ module HiddenMoveHandlers
UseMove = MoveHandlerHash.new
def self.addCanUseMove(item,proc); CanUseMove.add(item,proc); end
def self.addConfirmUseMove(item,proc); ConfirmUseMove.add(item,proc); end
def self.addUseMove(item,proc); UseMove.add(item,proc); end
def self.addConfirmUseMove(item,proc); ConfirmUseMove.add(item,proc); end
def self.addUseMove(item,proc); UseMove.add(item,proc); end
def self.hasHandler(item)
return CanUseMove[item]!=nil && UseMove[item]!=nil
@@ -156,7 +156,7 @@ def pbHiddenMoveAnimation(pokemon)
interp.update
interp.set(viewport.rect)
bg.oy=(bg.bitmap.height-viewport.rect.height)/2
phase=6 if interp.done?
phase=6 if interp.done?
end
# Constantly stream the strobes across the screen
for strobe in strobes
@@ -823,7 +823,7 @@ def pbSweetScent
viewport.color.red = 255
viewport.color.green = 0
viewport.color.blue = 0
viewport.color.alpha -= 10
viewport.color.alpha -= 10
alphaDiff = 12 * 20 / Graphics.frame_rate
begin
if count==0 && viewport.color.alpha<128
@@ -993,4 +993,4 @@ HiddenMoveHandlers::UseMove.add(:WATERFALL,proc { |move,pokemon|
end
pbAscendWaterfall
next true
})
})

View File

@@ -257,7 +257,7 @@ class BerryPlantSprite
# Check auto-watering
if berryData[0]>0 && berryData[0]<5
# Reset watering
if $game_screen &&
if $game_screen &&
($game_screen.weather_type==PBFieldWeather::Rain ||
$game_screen.weather_type==PBFieldWeather::HeavyRain ||
$game_screen.weather_type==PBFieldWeather::Storm)
@@ -581,4 +581,4 @@ def pbPickBerry(berry,qty=1)
interp.setVariable(berryData)
pbSetSelfSwitch(thisEvent.id,"A",true)
end
end
end

View File

@@ -59,7 +59,7 @@ def pbDayCareDeposit(index)
$PokemonGlobal.daycareEggSteps = 0
return
end
raise _INTL("No room to deposit a Pokémon")
raise _INTL("No room to deposit a Pokémon")
end
def pbDayCareWithdraw(index)
@@ -72,7 +72,7 @@ def pbDayCareWithdraw(index)
$PokemonGlobal.daycare[index][0] = nil
$PokemonGlobal.daycare[index][1] = 0
$PokemonGlobal.daycareEgg = 0
end
end
end
def pbDayCareChoose(text,variable)
@@ -239,7 +239,7 @@ def pbDayCareGenerateEgg
end
# Inheriting Moves
moves = []
othermoves = []
othermoves = []
movefather = father; movemother = mother
if pbIsDitto?(movefather) && !mother.female?
movefather = mother; movemother = father
@@ -280,13 +280,13 @@ def pbDayCareGenerateEgg
end
# Volt Tackle
lightball = false
if (isConst?(father.species,PBSpecies,:PIKACHU) ||
isConst?(father.species,PBSpecies,:RAICHU)) &&
if (isConst?(father.species,PBSpecies,:PIKACHU) ||
isConst?(father.species,PBSpecies,:RAICHU)) &&
isConst?(father.item,PBItems,:LIGHTBALL)
lightball = true
end
if (isConst?(mother.species,PBSpecies,:PIKACHU) ||
isConst?(mother.species,PBSpecies,:RAICHU)) &&
if (isConst?(mother.species,PBSpecies,:PIKACHU) ||
isConst?(mother.species,PBSpecies,:RAICHU)) &&
isConst?(mother.item,PBItems,:LIGHTBALL)
lightball = true
end
@@ -304,7 +304,7 @@ def pbDayCareGenerateEgg
for i in listend...listend+4
moveid = (i>=moves.length) ? 0 : moves[i]
finalmoves[finalmoves.length] = PBMove.new(moveid)
end
end
# Inheriting Individual Values
ivs = []
for i in 0...6
@@ -440,4 +440,4 @@ Events.onStepTaken += proc { |sender,e|
pkmn.pbLearnMove(i[1]) if i[0]==pkmn.level # Learned a new move
end
end
}
}

View File

@@ -69,7 +69,7 @@ def moveThrough(follower,direction)
when 4; follower.move_left # left
when 6; follower.move_right # right
when 8; follower.move_up # up
end
end
follower.through=oldThrough
end
@@ -91,7 +91,7 @@ def moveFancy(follower,direction)
when 4; follower.move_left # left
when 6; follower.move_right # right
when 8; follower.move_up # up
end
end
follower.through=oldThrough
end
end
@@ -178,7 +178,7 @@ class DependentEvents
events=$PokemonGlobal.dependentEvents
found=-1
for i in 0...events.length
# Check original map ID and original event ID
# Check original map ID and original event ID
if events[i][0]==event.map_id && events[i][1]==event.id
# Change current map ID
events[i][2]=newMapID
@@ -224,7 +224,7 @@ class DependentEvents
facing=facings[i]
tile=$MapFactory.getFacingTile(facing,leader)
passable=tile && $MapFactory.isPassableStrict?(tile[0],tile[1],tile[2],follower)
if i==0 && !passable && tile &&
if i==0 && !passable && tile &&
PBTerrain.isLedge?($MapFactory.getTerrainTag(tile[0],tile[1],tile[2]))
# If the tile isn't passable and the tile is a ledge,
# get tile from further behind
@@ -370,7 +370,7 @@ class DependentEvents
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
yield @realEvents[i],events[i]
end
end
end
def updateDependentEvents
@@ -565,4 +565,4 @@ Events.onMapSceneChange += proc { |sender,e|
if mapChanged
$PokemonTemp.dependentEvents.pbMapChangeMoveDependentEvents
end
}
}

View File

@@ -27,7 +27,7 @@ module PBDayNight
Tone.new( 0, 0, 0, 0), # Day/afternoon
Tone.new( 0, 0, 0, 0), # Day/afternoon
Tone.new( 0, 0, 0, 0), # Day/afternoon
Tone.new( -5, -30, -20, 0), # Day/evening # 6PM
Tone.new( -5, -30, -20, 0), # Day/evening # 6PM
Tone.new(-15, -60, -10, 20), # Day/evening
Tone.new(-15, -60, -10, 20), # Day/evening
Tone.new(-40, -75, 5, 40), # Night
@@ -121,8 +121,8 @@ def pbDayNightTint(object)
tone = PBDayNight.getTone
object.tone.set(tone.red,tone.green,tone.blue,tone.gray)
else
object.tone.set(0,0,0,0)
end
object.tone.set(0,0,0,0)
end
end
@@ -172,7 +172,7 @@ def zodiac(month,day)
5,21,6,20, # Gemini
6,21,7,20, # Cancer
7,23,8,22, # Leo
8,23,9,22, # Virgo
8,23,9,22, # Virgo
9,23,10,22, # Libra
10,23,11,21, # Scorpio
11,22,12,21, # Sagittarius
@@ -186,7 +186,7 @@ def zodiac(month,day)
end
return 0
end
# Returns the opposite of the given zodiac sign.
# 0 is Aries, 11 is Pisces.
def zodiacOpposite(sign)
@@ -214,14 +214,14 @@ def pbIsWeekday(wdayVariable,*arg)
ret = true if wd==wday
end
if wdayVariable>0
$game_variables[wdayVariable] = [
$game_variables[wdayVariable] = [
_INTL("Sunday"),
_INTL("Monday"),
_INTL("Tuesday"),
_INTL("Wednesday"),
_INTL("Thursday"),
_INTL("Friday"),
_INTL("Saturday")][wday]
_INTL("Saturday")][wday]
$game_map.need_refresh = true if $game_map
end
return ret
@@ -289,11 +289,11 @@ def pbIsSeason(seasonVariable,*arg)
ret = true if wd==thisseason
end
if seasonVariable>0
$game_variables[seasonVariable] = [
$game_variables[seasonVariable] = [
_INTL("Spring"),
_INTL("Summer"),
_INTL("Autumn"),
_INTL("Winter")][thisseason]
_INTL("Winter")][thisseason]
$game_map.need_refresh = true if $game_map
end
return ret
@@ -310,4 +310,4 @@ def pbGetSeasonName(season)
_INTL("Summer"),
_INTL("Autumn"),
_INTL("Winter")][season]
end
end