From 240af4e5e7b35c912e4d5c922da06223a36dfae7 Mon Sep 17 00:00:00 2001 From: m3rein Date: Sat, 5 Sep 2020 21:23:16 +0200 Subject: [PATCH] Removed all excess whitespace and standardized line endings. --- Data/Scripts/001_Settings.rb | 4 +- .../001_Technical/001_Ruby Utilities.rb | 2 +- .../001_Technical/002_RGSS2Compatibility.rb | 6 +- Data/Scripts/001_Technical/004_Win32API.rb | 10 +-- Data/Scripts/001_Technical/005_Sockets.rb | 70 +++++++++---------- .../Scripts/001_Technical/006_DebugConsole.rb | 8 +-- .../001_Technical/007_Sprite_Resizer.rb | 8 +-- .../001_Technical/008_Plugin_Manager.rb | 4 +- .../002_Game_Switches.rb | 2 +- .../003_Game_Variables.rb | 2 +- .../004_Game_SelfSwitches.rb | 4 +- .../003_Game classes/001_Game_Screen.rb | 2 +- .../003_Game classes/002_Game_System.rb | 8 +-- .../003_Game classes/003_Game_Picture.rb | 2 +- .../003_Game classes/004_Game_CommonEvent.rb | 2 +- .../003_Game classes/005_Game_Character.rb | 2 +- .../003_Game classes/006_Game_Event.rb | 2 +- .../003_Game classes/007_Game_Player.rb | 6 +- .../008_Game_Player_Visuals.rb | 2 +- Data/Scripts/003_Game classes/009_Game_Map.rb | 2 +- .../010_Game_Map_Autoscroll.rb | 54 +++++++------- .../003_Game classes/011_MapFactory.rb | 8 +-- .../Scripts/004_Sprites/001_Sprite_Picture.rb | 2 +- Data/Scripts/004_Sprites/002_Sprite_Timer.rb | 2 +- .../004_Sprites/003_Sprite_Character.rb | 10 +-- .../004_Sprites/004_Sprite_WaterReflection.rb | 4 +- .../004_Sprites/005_Sprite_SurfBase.rb | 4 +- Data/Scripts/004_Sprites/006_Spriteset_Map.rb | 2 +- .../004_Sprites/007_Spriteset_Global.rb | 2 +- .../004_Sprites/008_Sprite_AnimationSprite.rb | 2 +- .../004_Sprites/009_Sprite_DynamicShadows.rb | 10 +-- .../Scripts/004_Sprites/010_ParticleEngine.rb | 24 +++---- .../002_Tilemap_Perspective.rb | 6 +- .../005_Map renderer/003_Tilemap_Original.rb | 4 +- .../005_Map renderer/004_TilemapLoader.rb | 2 +- .../005_Map renderer/005_TileDrawingHelper.rb | 10 +-- .../006_Events and files/001_Interpreter.rb | 2 +- .../006_Events and files/002_EventHandlers.rb | 4 +- .../006_Events and files/003_File_Mixins.rb | 2 +- .../006_Events and files/004_Intl_Messages.rb | 16 ++--- .../006_Events and files/005_PBDebug.rb | 4 +- Data/Scripts/007_Audio/001_Audio.rb | 8 +-- Data/Scripts/007_Audio/002_AudioPlay.rb | 12 ++-- Data/Scripts/007_Audio/003_AudioUtilities.rb | 26 +++---- .../008_Objects and windows/001_FileTests.rb | 10 +-- .../002_BitmapCache.rb | 6 +- .../008_Objects and windows/003_Window.rb | 14 ++-- .../004_SpriteWindow.rb | 16 ++--- .../005_SpriteWindow_text.rb | 52 +++++++------- .../006_SpriteWindow_sprites.rb | 30 ++++---- .../008_Objects and windows/007_DrawText.rb | 6 +- .../008_Objects and windows/008_Messages.rb | 36 +++++----- .../008_Objects and windows/009_TextEntry.rb | 32 ++++----- .../008_Objects and windows/010_EventScene.rb | 8 +-- .../011_Interpolators.rb | 2 +- Data/Scripts/009_Scenes/001_Scene_Map.rb | 6 +- Data/Scripts/009_Scenes/002_Scene_Intro.rb | 2 +- Data/Scripts/009_Scenes/003_Scene_Controls.rb | 2 +- Data/Scripts/009_Scenes/004_Scene_Movie.rb | 6 +- Data/Scripts/009_Scenes/005_Scene_Credits.rb | 2 +- Data/Scripts/009_Scenes/006_Transitions.rb | 22 +++--- Data/Scripts/010_Data/001_MiscData.rb | 6 +- Data/Scripts/010_Data/002_PBMove.rb | 2 +- Data/Scripts/010_Data/003_PBStatuses.rb | 2 +- Data/Scripts/010_Data/004_PBTypes_Extra.rb | 2 +- Data/Scripts/010_Data/005_PBNatures.rb | 2 +- Data/Scripts/010_Data/006_PBGenderRates.rb | 2 +- Data/Scripts/010_Data/007_PBExperience.rb | 6 +- Data/Scripts/010_Data/008_PBStats.rb | 2 +- Data/Scripts/010_Data/009_PBRibbons.rb | 2 +- Data/Scripts/010_Data/010_PBEggGroups.rb | 2 +- Data/Scripts/010_Data/011_PBColors.rb | 2 +- Data/Scripts/010_Data/012_PBHabitats.rb | 2 +- .../001_Battler/001_PokeBattle_Battler.rb | 2 +- .../001_Battler/002_Battler_Initialize.rb | 2 +- .../001_Battler/003_Battler_ChangeSelf.rb | 2 +- .../001_Battler/004_Battler_Statuses.rb | 2 +- .../001_Battler/005_Battler_StatStages.rb | 2 +- .../001_Battler/006_Battler_AbilityAndItem.rb | 2 +- .../008_Battler_UseMove_Targeting.rb | 2 +- .../009_Battler_UseMove_SuccessChecks.rb | 10 +-- .../010_Battler_UseMove_TriggerEffects.rb | 4 +- Data/Scripts/011_Battle/001_PBEnvironment.rb | 2 +- .../002_Move/001_PokeBattle_Move.rb | 4 +- .../011_Battle/002_Move/002_Move_Usage.rb | 4 +- .../002_Move/004_Move_Effects_Generic.rb | 2 +- .../002_Move/006_Move_Effects_080-0FF.rb | 16 ++--- .../002_Move/007_Move_Effects_100-17F.rb | 16 ++--- Data/Scripts/011_Battle/002_PBWeather.rb | 2 +- .../003_Battle/002_PokeBattle_Battle.rb | 8 +-- .../003_Battle/003_Battle_StartAndEnd.rb | 4 +- .../004_Battle_ExpAndMoveLearning.rb | 4 +- .../005_Battle_Action_AttacksPriority.rb | 2 +- .../003_Battle/006_Battle_Action_Switching.rb | 4 +- .../003_Battle/007_Battle_Action_UseItem.rb | 2 +- .../003_Battle/008_Battle_Action_Running.rb | 4 +- .../003_Battle/009_Battle_Action_Other.rb | 2 +- .../003_Battle/010_Battle_Phase_Command.rb | 2 +- .../003_Battle/011_Battle_Phase_Attack.rb | 2 +- .../003_Battle/012_Battle_Phase_EndOfRound.rb | 8 +-- .../011_Battle/003_PBBattleTerrains.rb | 2 +- .../011_Battle/004_AI/001_PokeBattle_AI.rb | 4 +- Data/Scripts/011_Battle/004_AI/002_AI_Item.rb | 2 +- .../011_Battle/004_AI/003_AI_Switch.rb | 6 +- Data/Scripts/011_Battle/004_AI/004_AI_Move.rb | 2 +- .../004_AI/005_AI_Move_EffectScores.rb | 22 +++--- .../004_AI/006_AI_Move_Utilities.rb | 4 +- Data/Scripts/011_Battle/004_PBTargets.rb | 2 +- .../001_PokeBattle_Animation.rb | 2 +- .../002_PokeBattle_SceneAnimations.rb | 2 +- .../003_PokeBattle_SceneConstants.rb | 2 +- .../005_PokeBattle_SceneMenus.rb | 2 +- .../005_Battle scene/006_PokeBattle_Scene.rb | 6 +- .../005_Battle scene/007_Scene_Initialize.rb | 2 +- .../005_Battle scene/008_Scene_Commands.rb | 2 +- .../005_Battle scene/009_Scene_Animations.rb | 2 +- Data/Scripts/011_Battle/005_PBEffects.rb | 8 +-- .../001_PokeBattle_AnimationPlayer.rb | 26 +++---- .../002_PokeBattle_SafariZone.rb | 12 ++-- .../003_PokeBattle_BugContest.rb | 2 +- .../004_PokeBattle_BattlePalace.rb | 52 +++++++------- .../006_PokeBattle_BattleRecord.rb | 10 +-- .../007_PokeBattle_DebugScene.rb | 2 +- .../008_PokeBattle_BattlePeer.rb | 8 +-- .../009_PokeBattle_Clauses.rb | 10 +-- .../011_Battle/008_BattleHandlers_Items.rb | 4 +- .../011_Battle/009_PokeBall_CatchEffects.rb | 4 +- .../011_Battle/010_PokeBattle_ActiveField.rb | 2 +- .../011_Battle/011_PokeBattle_DamageState.rb | 4 +- Data/Scripts/012_Overworld/001_PBTerrain.rb | 2 +- .../Scripts/012_Overworld/002_PField_Field.rb | 8 +-- .../012_Overworld/003_PField_Visuals.rb | 14 ++-- .../012_Overworld/004_PField_Weather.rb | 2 +- .../012_Overworld/005_PField_Metadata.rb | 4 +- .../012_Overworld/006_PField_Battles.rb | 12 ++-- .../012_Overworld/007_PField_Encounters.rb | 10 +-- .../008_PField_EncounterModifiers.rb | 2 +- .../010_PField_RandomDungeons.rb | 18 ++--- .../012_Overworld/011_PField_FieldMoves.rb | 10 +-- .../012_Overworld/012_PField_BerryPlants.rb | 4 +- .../012_Overworld/013_PField_DayCare.rb | 18 ++--- .../014_PField_DependentEvents.rb | 12 ++-- Data/Scripts/012_Overworld/015_PField_Time.rb | 20 +++--- .../013_Trainers/001_PokeBattle_Trainer.rb | 4 +- .../013_Trainers/002_PTrainer_NPCTrainers.rb | 4 +- Data/Scripts/014_Items/001_PItem_Items.rb | 4 +- .../014_Items/002_PItem_ItemEffects.rb | 8 +-- .../014_Items/003_PItem_BattleItemEffects.rb | 2 +- Data/Scripts/014_Items/004_PItem_Phone.rb | 2 +- Data/Scripts/014_Items/005_PItem_PokeRadar.rb | 4 +- Data/Scripts/014_Items/006_PItem_Mail.rb | 2 +- Data/Scripts/014_Items/007_PItem_Sprites.rb | 2 +- Data/Scripts/014_Items/008_PItem_Bag.rb | 2 +- .../015_Pokemon/001_PokeBattle_Pokemon.rb | 6 +- Data/Scripts/015_Pokemon/002_Pokemon_Forms.rb | 6 +- .../015_Pokemon/003_Pokemon_MegaEvolution.rb | 2 +- .../015_Pokemon/004_Pokemon_ShadowPokemon.rb | 8 +-- .../015_Pokemon/005_Pokemon_Evolution.rb | 2 +- .../015_Pokemon/006_Pokemon_Chatter.rb | 2 +- .../015_Pokemon/007_Pokemon_Sprites.rb | 8 +-- .../015_Pokemon/008_Pokemon_Storage.rb | 8 +-- Data/Scripts/016_UI/001_PScreen_PauseMenu.rb | 10 +-- .../Scripts/016_UI/002_PScreen_PokedexMenu.rb | 2 +- .../Scripts/016_UI/003_PScreen_PokedexMain.rb | 2 +- .../016_UI/004_PScreen_PokedexEntry.rb | 2 +- Data/Scripts/016_UI/005_PScreen_Party.rb | 12 ++-- Data/Scripts/016_UI/006_PScreen_Summary.rb | 2 +- Data/Scripts/016_UI/007_PScreen_Bag.rb | 6 +- Data/Scripts/016_UI/008_PScreen_Pokegear.rb | 2 +- Data/Scripts/016_UI/009_PScreen_RegionMap.rb | 4 +- Data/Scripts/016_UI/010_PScreen_Phone.rb | 2 +- Data/Scripts/016_UI/011_PScreen_Jukebox.rb | 2 +- .../Scripts/016_UI/012_PScreen_TrainerCard.rb | 4 +- Data/Scripts/016_UI/015_PScreen_Options.rb | 14 ++-- Data/Scripts/016_UI/016_PScreen_ReadyMenu.rb | 4 +- .../016_UI/017_PScreen_PokemonStorage.rb | 20 +++--- .../Scripts/016_UI/018_PScreen_ItemStorage.rb | 4 +- Data/Scripts/016_UI/019_PScreen_PC.rb | 2 +- .../Scripts/016_UI/020_PScreen_EggHatching.rb | 4 +- Data/Scripts/016_UI/021_PScreen_Evolution.rb | 8 +-- Data/Scripts/016_UI/022_PScreen_Trading.rb | 2 +- .../016_UI/023_PScreen_MoveRelearner.rb | 2 +- .../016_UI/024_PScreen_PurifyChamber.rb | 26 +++---- Data/Scripts/016_UI/025_PScreen_Mart.rb | 10 +-- .../Scripts/016_UI/026_PScreen_MysteryGift.rb | 4 +- Data/Scripts/016_UI/027_PScreen_HallOfFame.rb | 42 +++++------ .../017_Other battles/001_PBattle_Safari.rb | 8 +-- .../002_PBattle_BugContest.rb | 6 +- .../003_PBattle_OrgBattle.rb | 16 ++--- .../004_PBattle_OrgBattleRules.rb | 66 ++++++++--------- .../005_PBattle_OrgBattleGenerator.rb | 52 +++++++------- .../006_PBattle_BattleSwap.rb | 4 +- .../018_Minigames/001_PMinigame_Duel.rb | 60 ++++++++-------- .../002_PMinigame_TripleTriad.rb | 10 +-- .../003_PMinigame_SlotMachine.rb | 2 +- .../004_PMinigame_VoltorbFlip.rb | 4 +- .../018_Minigames/005_PMinigame_Lottery.rb | 2 +- .../018_Minigames/006_PMinigame_Mining.rb | 2 +- .../007_PMinigame_TilePuzzles.rb | 2 +- .../001_PSystem_Controls.rb | 2 +- .../002_PSystem_System.rb | 4 +- .../003_PSystem_FileUtilities.rb | 8 +-- .../004_PSystem_PokemonUtilities.rb | 6 +- .../005_PSystem_Utilities.rb | 20 +++--- Data/Scripts/020_Debug/001_Debug_Menu.rb | 14 ++-- Data/Scripts/020_Debug/002_Debug_Actions.rb | 8 +-- Data/Scripts/020_Debug/003_Debug_Pokemon.rb | 12 ++-- Data/Scripts/020_Debug/004_Editor_Screens.rb | 20 +++--- Data/Scripts/020_Debug/005_Editor_SaveData.rb | 6 +- .../Scripts/020_Debug/006_Editor_DataTypes.rb | 10 +-- Data/Scripts/020_Debug/007_Editor_Listers.rb | 4 +- .../Scripts/020_Debug/008_Editor_Utilities.rb | 6 +- .../020_Debug/009_Editor_TilesetEditor.rb | 2 +- .../010_Editor_MapConnectionEditor.rb | 10 +-- .../020_Debug/011_Editor_SpritePosEditor.rb | 10 +-- .../012_Editor_BattleAnimationEditor.rb | 42 +++++------ Data/Scripts/021_Compiler/002_Compiler_PBS.rb | 26 +++---- .../003_Compiler_MapsAndEvents.rb | 32 ++++----- Data/Scripts/999_Main/999_Main.rb | 2 +- 219 files changed, 929 insertions(+), 929 deletions(-) diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index 60634a782..c17633d49 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -347,7 +347,7 @@ PLANT_SPARKLE_ANIMATION_ID = 7 # message file in the Data folder. Edit only if you have 2 or more # languages to choose from. #=============================================================================== -LANGUAGES = [ +LANGUAGES = [ # ["English","english.dat"], # ["Deutsch","deutsch.dat"] -] \ No newline at end of file +] diff --git a/Data/Scripts/001_Technical/001_Ruby Utilities.rb b/Data/Scripts/001_Technical/001_Ruby Utilities.rb index 64142d1fc..37878fe6f 100644 --- a/Data/Scripts/001_Technical/001_Ruby Utilities.rb +++ b/Data/Scripts/001_Technical/001_Ruby Utilities.rb @@ -208,4 +208,4 @@ end def nil_or_empty?(string) return string.nil? || !string.is_a?(String) || string.size == 0 -end \ No newline at end of file +end diff --git a/Data/Scripts/001_Technical/002_RGSS2Compatibility.rb b/Data/Scripts/001_Technical/002_RGSS2Compatibility.rb index e1fdcc4c2..59068dc49 100644 --- a/Data/Scripts/001_Technical/002_RGSS2Compatibility.rb +++ b/Data/Scripts/001_Technical/002_RGSS2Compatibility.rb @@ -32,8 +32,8 @@ class Win32API def call(*args) if @w32name!="GetAsyncKeyState" - File.open("winapi.txt","ab") { |f| - f.write("call(#{@w32dll},#{@w32name},#{args.inspect})\r\n") + File.open("winapi.txt","ab") { |f| + f.write("call(#{@w32dll},#{@w32name},#{args.inspect})\r\n") } end debug_call(*args) @@ -605,4 +605,4 @@ module RPG # def play # end end -end \ No newline at end of file +end diff --git a/Data/Scripts/001_Technical/004_Win32API.rb b/Data/Scripts/001_Technical/004_Win32API.rb index 495aa517f..8bfbeec65 100644 --- a/Data/Scripts/001_Technical/004_Win32API.rb +++ b/Data/Scripts/001_Technical/004_Win32API.rb @@ -22,7 +22,7 @@ class Win32API wndthreadid = @@GetWindowThreadProcessId.call(nextwindow,processid) if wndthreadid==threadid @@RGSSWINDOW = nextwindow - return @@RGSSWINDOW + return @@RGSSWINDOW end end end until nextwindow==0 @@ -62,7 +62,7 @@ class Win32API hWnd = pbFindRgssWindow window.call(hWnd,9) end - + def Win32API.fillScreen setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L') setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I') @@ -75,8 +75,8 @@ class Win32API Win32API.focusWindow return [width,height] end - - def Win32API.restoreScreen + + def Win32API.restoreScreen setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L') setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I') metrics = Win32API.new('user32','GetSystemMetrics','I','I') @@ -101,4 +101,4 @@ end # Well done for finding this place. # DO NOT EDIT THESE ESSENTIALS_VERSION = "18" -ERROR_TEXT = "" \ No newline at end of file +ERROR_TEXT = "" diff --git a/Data/Scripts/001_Technical/005_Sockets.rb b/Data/Scripts/001_Technical/005_Sockets.rb index 57ad18ce6..47c7cf09a 100644 --- a/Data/Scripts/001_Technical/005_Sockets.rb +++ b/Data/Scripts/001_Technical/005_Sockets.rb @@ -3,7 +3,7 @@ module Win32 buf = "\0" * len Win32API.new("kernel32", "RtlMoveMemory", "ppl", "").call(buf, self, len) buf - end + end end @@ -41,13 +41,13 @@ module Winsock #----------------------------------------------------------------------------- def self.closesocket(*args) Win32API.new(DLL, "closesocket", "p", "l").call(*args) - end + end #----------------------------------------------------------------------------- # * Connect #----------------------------------------------------------------------------- def self.connect(*args) Win32API.new(DLL, "connect", "ppl", "l").call(*args) - end + end #----------------------------------------------------------------------------- # * Get host (Using Adress) #----------------------------------------------------------------------------- @@ -95,7 +95,7 @@ module Winsock #----------------------------------------------------------------------------- def self.inet_ntoa(*args) Win32API.new(DLL, "inet_ntoa", "l", "p").call(*args) - end + end #----------------------------------------------------------------------------- # * Listen #----------------------------------------------------------------------------- @@ -125,7 +125,7 @@ module Winsock #----------------------------------------------------------------------------- def self.setsockopt(*args) Win32API.new(DLL, "setsockopt", "pllpl", "l").call(*args) - end + end #----------------------------------------------------------------------------- # * Shutdown #----------------------------------------------------------------------------- @@ -136,7 +136,7 @@ module Winsock # * Socket #----------------------------------------------------------------------------- def self.socket(*args) - Win32API.new(DLL, "socket", "lll", "l").call(*args) + Win32API.new(DLL, "socket", "lll", "l").call(*args) end #----------------------------------------------------------------------------- # * Get Last Error @@ -162,12 +162,12 @@ class Socket #----------------------------------------------------------------------------- # * Constants #----------------------------------------------------------------------------- - AF_UNSPEC = 0 + AF_UNSPEC = 0 AF_UNIX = 1 AF_INET = 2 AF_IPX = 6 AF_APPLETALK = 16 - PF_UNSPEC = 0 + PF_UNSPEC = 0 PF_UNIX = 1 PF_INET = 2 PF_IPX = 6 @@ -244,13 +244,13 @@ class Socket AI_V4MAPPED = 2048 #-------------------------------------------------------------------------- # * Returns the associated IP address for the given hostname. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def self.getaddress(host) gethostbyname(host)[3].unpack("C4").join(".") end #-------------------------------------------------------------------------- # * Returns the associated IP address for the given hostname. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def self.getservice(serv) case serv when Numeric @@ -271,7 +271,7 @@ class Socket end #-------------------------------------------------------------------------- # * Returns the user's hostname. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def self.gethostname buf = "\0" * 256 Winsock.gethostname(buf, 256) @@ -305,7 +305,7 @@ class Socket end #-------------------------------------------------------------------------- # * Creates an INET-sockaddr struct. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def self.sockaddr_in(port, host) begin [AF_INET, getservice(port)].pack("sn") + gethostbyname(host)[3] + [].pack("x8") @@ -319,7 +319,7 @@ class Socket end #-------------------------------------------------------------------------- # * Creates a new socket and connects it to the given host and port. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def self.open(*args) socket = new(*args) if block_given? @@ -333,14 +333,14 @@ class Socket end #-------------------------------------------------------------------------- # * Creates a new socket. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def initialize(domain, type, protocol) SocketError.check if (@fd = Winsock.socket(domain, type, protocol)) == -1 @fd end #-------------------------------------------------------------------------- # * Accepts incoming connections. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def accept(flags = 0) buf = "\0" * 16 SocketError.check if Winsock.accept(@fd, buf, flags) == -1 @@ -348,21 +348,21 @@ class Socket end #-------------------------------------------------------------------------- # * Binds a socket to the given sockaddr. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def bind(sockaddr) SocketError.check if (ret = Winsock.bind(@fd, sockaddr, sockaddr.size)) == -1 ret end #-------------------------------------------------------------------------- # * Closes a socket. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def close SocketError.check if (ret = Winsock.closesocket(@fd)) == -1 ret end #-------------------------------------------------------------------------- # * Connects a socket to the given sockaddr. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def connect(sockaddr) #return if Network.testing? == 2 SocketError.check if (ret = Winsock.connect(@fd, sockaddr, sockaddr.size)) == -1 @@ -370,28 +370,28 @@ class Socket end #-------------------------------------------------------------------------- # * Listens for incoming connections. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def listen(backlog) SocketError.check if (ret = Winsock.listen(@fd, backlog)) == -1 ret end #-------------------------------------------------------------------------- # * Checks waiting data's status. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def select(timeout) # timeout in seconds - SocketError.check if (ret = Winsock.select(1, [1, @fd].pack("ll"), 0, 0, [timeout.to_i, + SocketError.check if (ret = Winsock.select(1, [1, @fd].pack("ll"), 0, 0, [timeout.to_i, (timeout * 1000000).to_i].pack("ll"))) == -1 ret end #-------------------------------------------------------------------------- # * Checks if data is waiting. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def ready? not select(0) == 0 - end + end #-------------------------------------------------------------------------- # * Reads data from socket. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def read(len) buf = "\0" * len Win32API.new("msvcrt", "_read", "lpl", "l").call(@fd, buf, len) @@ -399,7 +399,7 @@ class Socket end #-------------------------------------------------------------------------- # * Returns received data. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def recv(len, flags = 0) retString="" remainLen=len @@ -415,7 +415,7 @@ class Socket end #-------------------------------------------------------------------------- # * Sends data to a host. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def send(data, flags = 0) SocketError.check if (ret = Winsock.send(@fd, data, data.size, flags)) == -1 ret @@ -423,7 +423,7 @@ class Socket #-------------------------------------------------------------------------- # * Recieves file from a socket # size : file size - # scene : update scene boolean + # scene : update scene boolean #-------------------------------------------------------------------------- def recv_file(size,scene=false,file="") data = [] @@ -464,12 +464,12 @@ class Socket break if ch == "\n" message += ch end - # Return recieved data + # Return recieved data return message end #-------------------------------------------------------------------------- # * Writes data to socket. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def write(data) Win32API.new("msvcrt", "_write", "lpl", "l").call(@fd, data, 1) end @@ -490,7 +490,7 @@ end class TCPSocket < Socket #-------------------------------------------------------------------------- # * Creates a new socket and connects it to the given host and port. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def self.open(*args) socket = new(*args) if block_given? @@ -504,7 +504,7 @@ class TCPSocket < Socket end #-------------------------------------------------------------------------- # * Creates a new socket and connects it to the given host and port. - #-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- def initialize(host, port) super(AF_INET, SOCK_STREAM, IPPROTO_TCP) connect(Socket.sockaddr_in(port, host)) @@ -526,7 +526,7 @@ class SocketError < StandardError #if not Network.testing? == 1 raise Errno.const_get(Errno.constants.detect { |c| Errno.const_get(c).new.errno == errno }) #else - # errno != 0 ? (Network.testresult(true)) : (Network.testresult(false)) + # errno != 0 ? (Network.testresult(true)) : (Network.testresult(false)) #end end end @@ -669,7 +669,7 @@ def pbDownloadToString(url) return data rescue return "" - end + end end def pbDownloadToFile(url, file) @@ -685,7 +685,7 @@ def pbPostToString(url, postdata) return data rescue return "" - end + end end def pbPostToFile(url, postdata, file) @@ -693,4 +693,4 @@ def pbPostToFile(url, postdata, file) pbPostData(url, postdata,file) rescue end -end \ No newline at end of file +end diff --git a/Data/Scripts/001_Technical/006_DebugConsole.rb b/Data/Scripts/001_Technical/006_DebugConsole.rb index 1672d7f25..df28b3449 100644 --- a/Data/Scripts/001_Technical/006_DebugConsole.rb +++ b/Data/Scripts/001_Technical/006_DebugConsole.rb @@ -3,7 +3,7 @@ module Console GENERIC_READ = 0x80000000 GENERIC_WRITE = 0x40000000 FILE_SHARE_READ = 0x00000001 - FILE_SHARE_WRITE = 0x00000002 + FILE_SHARE_WRITE = 0x00000002 CONSOLE_TEXTMODE_BUFFER = 0x00000001 def Console::AllocConsole @@ -76,7 +76,7 @@ module Console echo "Debug Output:\n" echo "-------------------------------\n\n" SetConsoleActiveScreenBuffer(@bufferHandle) - end + end def self.readInput length=20 @@ -113,7 +113,7 @@ module Console def self.readInput2 buffer=0.chr done=false - input="" + input="" eventsread=0.chr*4 while !done if ReadConsole(buffer)==0 @@ -155,4 +155,4 @@ module Kernel echo(string) echo("\r\n") end -end \ No newline at end of file +end diff --git a/Data/Scripts/001_Technical/007_Sprite_Resizer.rb b/Data/Scripts/001_Technical/007_Sprite_Resizer.rb index da9e2a094..093432493 100644 --- a/Data/Scripts/001_Technical/007_Sprite_Resizer.rb +++ b/Data/Scripts/001_Technical/007_Sprite_Resizer.rb @@ -665,7 +665,7 @@ class Bitmap SwapRgb = Win32API.new('./rubyscreen.dll', 'SwapRgb', 'pi', '') rescue nil def setData(x) - RtlMoveMemory_ip.call(self.address, x, x.length) + RtlMoveMemory_ip.call(self.address, x, x.length) end def getData @@ -677,7 +677,7 @@ class Bitmap def swap32(x) return ((x>>24)&0x000000FF)| ((x>>8)&0x0000FF00)| - ((x<<8)&0x00FF0000)| + ((x<<8)&0x00FF0000)| ((x<<24)&0xFF000000) end @@ -716,7 +716,7 @@ class Bitmap b=0;c=2;while b!=len data2[b]=data[c] data2[c]=data[b] - b+=4;c+=4; + b+=4;c+=4; end end #$times.push(Time.now-ttt) @@ -754,4 +754,4 @@ class Bitmap end return @address end -end \ No newline at end of file +end diff --git a/Data/Scripts/001_Technical/008_Plugin_Manager.rb b/Data/Scripts/001_Technical/008_Plugin_Manager.rb index a8e4a2278..bd7538d8f 100644 --- a/Data/Scripts/001_Technical/008_Plugin_Manager.rb +++ b/Data/Scripts/001_Technical/008_Plugin_Manager.rb @@ -340,7 +340,7 @@ module PluginManager return if !installed?(plugin_name) return @@Plugins[plugin_name][:link] end - + # Returns the credits of the specified plugin. def self.credits(plugin_name) return if !installed?(plugin_name) @@ -373,4 +373,4 @@ module PluginManager end return 0 end -end \ No newline at end of file +end diff --git a/Data/Scripts/002_Switches and Variables/002_Game_Switches.rb b/Data/Scripts/002_Switches and Variables/002_Game_Switches.rb index 29b66871e..828092735 100644 --- a/Data/Scripts/002_Switches and Variables/002_Game_Switches.rb +++ b/Data/Scripts/002_Switches and Variables/002_Game_Switches.rb @@ -33,4 +33,4 @@ class Game_Switches @data[switch_id] = value end end -end \ No newline at end of file +end diff --git a/Data/Scripts/002_Switches and Variables/003_Game_Variables.rb b/Data/Scripts/002_Switches and Variables/003_Game_Variables.rb index 0ae70171c..359161b2f 100644 --- a/Data/Scripts/002_Switches and Variables/003_Game_Variables.rb +++ b/Data/Scripts/002_Switches and Variables/003_Game_Variables.rb @@ -33,4 +33,4 @@ class Game_Variables @data[variable_id] = value end end -end \ No newline at end of file +end diff --git a/Data/Scripts/002_Switches and Variables/004_Game_SelfSwitches.rb b/Data/Scripts/002_Switches and Variables/004_Game_SelfSwitches.rb index a65708df7..e39feed27 100644 --- a/Data/Scripts/002_Switches and Variables/004_Game_SelfSwitches.rb +++ b/Data/Scripts/002_Switches and Variables/004_Game_SelfSwitches.rb @@ -13,7 +13,7 @@ class Game_SelfSwitches @data = {} end #----------------------------------------------------------------------------- - # * Get Self Switch + # * Get Self Switch # key : key #----------------------------------------------------------------------------- def [](key) @@ -27,4 +27,4 @@ class Game_SelfSwitches def []=(key, value) @data[key] = value end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/001_Game_Screen.rb b/Data/Scripts/003_Game classes/001_Game_Screen.rb index 6c659c6e9..2db8a1121 100644 --- a/Data/Scripts/003_Game classes/001_Game_Screen.rb +++ b/Data/Scripts/003_Game classes/001_Game_Screen.rb @@ -153,4 +153,4 @@ class Game_Screen end end end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/002_Game_System.rb b/Data/Scripts/003_Game classes/002_Game_System.rb index 8637bdba4..7ad6df994 100644 --- a/Data/Scripts/003_Game classes/002_Game_System.rb +++ b/Data/Scripts/003_Game classes/002_Game_System.rb @@ -2,7 +2,7 @@ # ** Game_System #------------------------------------------------------------------------------ # This class handles data surrounding the system. Backround music, etc. -# is managed here as well. Refer to "$game_system" for the instance of +# is managed here as well. Refer to "$game_system" for the instance of # this class. #============================================================================== @@ -47,7 +47,7 @@ class Game_System ################################################################################ - def bgm_play(bgm) + def bgm_play(bgm) bgm_play_internal(bgm,0) end @@ -226,7 +226,7 @@ class Game_System end def getPlayingBGS - return (@playing_bgs) ? @playing_bgs.clone : nil + return (@playing_bgs) ? @playing_bgs.clone : nil end ################################################################################ @@ -286,4 +286,4 @@ class Game_System event.start end end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/003_Game_Picture.rb b/Data/Scripts/003_Game classes/003_Game_Picture.rb index 6e30c3d13..6fe8ba678 100644 --- a/Data/Scripts/003_Game classes/003_Game_Picture.rb +++ b/Data/Scripts/003_Game classes/003_Game_Picture.rb @@ -153,4 +153,4 @@ class Game_Picture @angle %= 360 end end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/004_Game_CommonEvent.rb b/Data/Scripts/003_Game classes/004_Game_CommonEvent.rb index 978291c46..0b9e52394 100644 --- a/Data/Scripts/003_Game classes/004_Game_CommonEvent.rb +++ b/Data/Scripts/003_Game classes/004_Game_CommonEvent.rb @@ -78,4 +78,4 @@ class Game_CommonEvent @interpreter.update end end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/005_Game_Character.rb b/Data/Scripts/003_Game classes/005_Game_Character.rb index 1ec45ca10..617fa2d8a 100644 --- a/Data/Scripts/003_Game classes/005_Game_Character.rb +++ b/Data/Scripts/003_Game classes/005_Game_Character.rb @@ -866,4 +866,4 @@ class Game_Character @pattern = (@pattern + 1) % 4 @anime_count -= frames_per_pattern end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/006_Game_Event.rb b/Data/Scripts/003_Game classes/006_Game_Event.rb index 52d8c9ad9..970daac66 100644 --- a/Data/Scripts/003_Game classes/006_Game_Event.rb +++ b/Data/Scripts/003_Game classes/006_Game_Event.rb @@ -244,4 +244,4 @@ class Game_Event < Game_Character @interpreter.update end end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/007_Game_Player.rb b/Data/Scripts/003_Game classes/007_Game_Player.rb index e21709a56..dd61b6762 100644 --- a/Data/Scripts/003_Game classes/007_Game_Player.rb +++ b/Data/Scripts/003_Game classes/007_Game_Player.rb @@ -55,7 +55,7 @@ class Game_Player < Game_Character end def pbHasDependentEvents? - return $PokemonGlobal.dependentEvents.length>0 + return $PokemonGlobal.dependentEvents.length>0 end def bump_into_object @@ -486,7 +486,7 @@ def pbCanUseBike?(mapid) return true if pbGetMetadata(mapid,MetadataBicycleAlways) val = pbGetMetadata(mapid,MetadataBicycle) val = pbGetMetadata(mapid,MetadataOutdoor) if val==nil - return (val) ? true : false + return (val) ? true : false end def pbMountBike @@ -502,4 +502,4 @@ def pbDismountBike $PokemonGlobal.bicycle = false pbUpdateVehicle $game_map.autoplayAsCue -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb b/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb index 371254968..ec4f69ec1 100644 --- a/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb +++ b/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb @@ -100,4 +100,4 @@ class Game_Character update_old2 end end -=end \ No newline at end of file +=end diff --git a/Data/Scripts/003_Game classes/009_Game_Map.rb b/Data/Scripts/003_Game classes/009_Game_Map.rb index a069cf087..cb9c8c490 100644 --- a/Data/Scripts/003_Game classes/009_Game_Map.rb +++ b/Data/Scripts/003_Game classes/009_Game_Map.rb @@ -435,4 +435,4 @@ class Game_Map @fog_opacity_duration -= 1 end end -end \ No newline at end of file +end diff --git a/Data/Scripts/003_Game classes/010_Game_Map_Autoscroll.rb b/Data/Scripts/003_Game classes/010_Game_Map_Autoscroll.rb index 00c8e0e40..384a0795d 100644 --- a/Data/Scripts/003_Game classes/010_Game_Map_Autoscroll.rb +++ b/Data/Scripts/003_Game classes/010_Game_Map_Autoscroll.rb @@ -12,61 +12,61 @@ normal event command requires a direction and number of tiles to scroll, Map Autoscroll scrolls the map to center on the tile whose x and y coordinates are given. - + FEATURES - automatic map scrolling to given x,y coordinate (or player) - destination is fixed, so it's possible to scroll to same place even if origin is variable (e.g. moving NPC) - variable speed (just like "Scroll Map" event command) - - diagonal scrolling supported - + - diagonal scrolling supported + SETUP Instead of a "Scroll Map" event command, use the "Call Script" command and enter on the following on the first line: - + autoscroll(x,y) - + (replacing "x" and "y" with the x and y coordinates of the tile to scroll to) - + To specify a scroll speed other than the default (4), use: - + autoscroll(x,y,speed) - + (now also replacing "speed" with the scroll speed from 1-6) - + Diagonal scrolling happens automatically when the destination is diagonal relative to the starting point (i.e., not directly up, down, left or right). To scroll to the player, instead use the following: - - autoscroll_player(speed) - + + autoscroll_player(speed) + Note: because of how the interpreter and the "Call Script" event command are setup, the call to autoscroll(...) can only be on the first line of the "Call Script" event command (and not flowing down to subsequent lines). - + For example, the following call may not work as expected: - + autoscroll($game_variables[1], $game_variables[2]) - + (since the long argument names require dropping down to a second line) A work-around is to setup new variables with shorter names in a preceding (separate) "Call Script" event command: - + @x = $game_variables[1] @y = $game_variables[2] - + and then use those as arguments: - + autoscroll(@x,@y) - + The renaming must be in a separate "Call Script" because otherwise the call to autoscroll(...) isn't on the first line. - + Originally requested by militantmilo80: - http://www.rmxp.net/forums/index.php?showtopic=29519 - + http://www.rmxp.net/forums/index.php?showtopic=29519 + =end class Interpreter @@ -154,9 +154,9 @@ class Game_Map end def scroll_downleft(distance) - @display_x = [@display_x - distance, 0].max + @display_x = [@display_x - distance, 0].max @display_y = [@display_y + distance, - (self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min + (self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min end def scroll_upright(distance) @@ -185,10 +185,10 @@ class Game_Map when 6; scroll_right(distance) when 7; scroll_upleft(distance) when 8; scroll_up(distance) - when 9; scroll_upright(distance) + when 9; scroll_upright(distance) end # Subtract distance scrolled @scroll_rest -= distance end - end -end \ No newline at end of file + end +end diff --git a/Data/Scripts/003_Game classes/011_MapFactory.rb b/Data/Scripts/003_Game classes/011_MapFactory.rb index 121d142e5..e2db2b60b 100644 --- a/Data/Scripts/003_Game classes/011_MapFactory.rb +++ b/Data/Scripts/003_Game classes/011_MapFactory.rb @@ -169,7 +169,7 @@ class PokemonMapFactory return false if !map.valid?(x,y) return true if thisEvent.through if thisEvent==$game_player - return false unless ($DEBUG && Input.press?(Input::CTRL)) || + return false unless ($DEBUG && Input.press?(Input::CTRL)) || map.passable?(x,y,0,thisEvent) else return false unless map.passable?(x,y,0,thisEvent) @@ -269,7 +269,7 @@ class PokemonMapFactory def getThisAndOtherPosRelativePos(thisEvent,otherMapID,otherX,otherY) return [0,0] if !thisEvent return getRelativePos( - thisEvent.map.map_id,thisEvent.x,thisEvent.y,otherMapID,otherX,otherY) + thisEvent.map.map_id,thisEvent.x,thisEvent.y,otherMapID,otherX,otherY) end def getOffsetEventPos(event,xOffset,yOffset) @@ -363,7 +363,7 @@ class PokemonMapFactory for i in 0...@maps.length next if MapFactoryHelper.mapInRange?(@maps[i]) @maps[i] = nil - deleted = true + deleted = true end if deleted @maps.compact! @@ -485,4 +485,4 @@ def updateTilesets for map in maps map.updateTileset if map end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/001_Sprite_Picture.rb b/Data/Scripts/004_Sprites/001_Sprite_Picture.rb index afd0d43e1..47ed370eb 100644 --- a/Data/Scripts/004_Sprites/001_Sprite_Picture.rb +++ b/Data/Scripts/004_Sprites/001_Sprite_Picture.rb @@ -55,4 +55,4 @@ class Sprite_Picture @sprite.angle = @picture.angle @sprite.tone = @picture.tone end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/002_Sprite_Timer.rb b/Data/Scripts/004_Sprites/002_Sprite_Timer.rb index ae37ac026..dd3b97362 100644 --- a/Data/Scripts/004_Sprites/002_Sprite_Timer.rb +++ b/Data/Scripts/004_Sprites/002_Sprite_Timer.rb @@ -41,4 +41,4 @@ class Sprite_Timer @timer.visible=false if @timer end end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/003_Sprite_Character.rb b/Data/Scripts/004_Sprites/003_Sprite_Character.rb index 6f21809d8..dc2de189e 100644 --- a/Data/Scripts/004_Sprites/003_Sprite_Character.rb +++ b/Data/Scripts/004_Sprites/003_Sprite_Character.rb @@ -33,10 +33,10 @@ class BushBitmap for i in 0...4 y = i*charheight if cy>=0 - ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy)) + ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy)) ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170) end - ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0 + ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0 end return ret end @@ -47,10 +47,10 @@ class BushBitmap cy = charheight-depth-2 y = charheight if cy>=0 - ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy)) + ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy)) ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170) end - ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0 + ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0 return ret end end @@ -171,4 +171,4 @@ class Sprite_Character < RPG::Sprite @reflection.update if @reflection @surfbase.update if @surfbase end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb b/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb index 7645c7eba..2525f0d70 100644 --- a/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb +++ b/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb @@ -40,7 +40,7 @@ class Sprite_Reflection return if disposed? shouldShow = @rsprite.visible if !shouldShow - # Just-in-time disposal of sprite + # Just-in-time disposal of sprite if @sprite @sprite.dispose @sprite = nil @@ -87,4 +87,4 @@ class Sprite_Reflection @sprite.src_rect = @rsprite.src_rect end end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/005_Sprite_SurfBase.rb b/Data/Scripts/004_Sprites/005_Sprite_SurfBase.rb index 1b22a4616..1d231ef19 100644 --- a/Data/Scripts/004_Sprites/005_Sprite_SurfBase.rb +++ b/Data/Scripts/004_Sprites/005_Sprite_SurfBase.rb @@ -38,7 +38,7 @@ class Sprite_SurfBase def update return if disposed? if !$PokemonGlobal.surfing && !$PokemonGlobal.diving - # Just-in-time disposal of sprite + # Just-in-time disposal of sprite if @sprite @sprite.dispose @sprite = nil @@ -74,4 +74,4 @@ class Sprite_SurfBase @sprite.opacity = @rsprite.opacity end end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/006_Spriteset_Map.rb b/Data/Scripts/004_Sprites/006_Spriteset_Map.rb index 4578f7111..6c949fbbe 100644 --- a/Data/Scripts/004_Sprites/006_Spriteset_Map.rb +++ b/Data/Scripts/004_Sprites/006_Spriteset_Map.rb @@ -164,4 +164,4 @@ class Spriteset_Map @@viewport1.update @@viewport3.update end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/007_Spriteset_Global.rb b/Data/Scripts/004_Sprites/007_Spriteset_Global.rb index 111434113..22b9fe9f7 100644 --- a/Data/Scripts/004_Sprites/007_Spriteset_Global.rb +++ b/Data/Scripts/004_Sprites/007_Spriteset_Global.rb @@ -31,4 +31,4 @@ class Spriteset_Global end @timer_sprite.update end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb b/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb index 432c10621..f6ab24d60 100644 --- a/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb +++ b/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb @@ -91,4 +91,4 @@ class Spriteset_Map @usersprites[i].update if !@usersprites[i].disposed? end end -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb b/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb index 7a2c8d242..65c77b8e3 100644 --- a/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb +++ b/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb @@ -8,7 +8,7 @@ SHADOW_WARN = true class Sprite_Shadow < RPG::Sprite attr_accessor :character - + def initialize(viewport, character = nil,params=[]) super(viewport) @source = params[0] @@ -104,7 +104,7 @@ class Sprite_Shadow < RPG::Sprite if (@angle_trigo < @anglemin and @angle_trigo > @anglemax) and @anglemin > @anglemax self.opacity = 0 return - end + end end end @@ -179,7 +179,7 @@ end #=================================================== class Spriteset_Map attr_accessor :shadows - + alias shadow_initialize initialize def initialize(map=nil) @shadows = [] @@ -201,7 +201,7 @@ class Spriteset_Map sprite.setShadows(map, @shadows) end $scene.spritesetGlobal.playersprite.setShadows(map, @shadows) - end + end end @@ -252,4 +252,4 @@ def XPML_read(map,markup,event,max_param_number=0) end end return parameter_list -end \ No newline at end of file +end diff --git a/Data/Scripts/004_Sprites/010_ParticleEngine.rb b/Data/Scripts/004_Sprites/010_ParticleEngine.rb index 61b348dad..ce5b78c05 100644 --- a/Data/Scripts/004_Sprites/010_ParticleEngine.rb +++ b/Data/Scripts/004_Sprites/010_ParticleEngine.rb @@ -33,12 +33,12 @@ class Particle_Engine return if disposed? for particle in @effect next if particle.nil? - particle.dispose + particle.dispose end @effect.clear @map = nil @disposed = true - end + end def disposed? return @disposed @@ -64,7 +64,7 @@ class Particle_Engine cls = @effects[type] if cls.nil? particle.dispose if particle - return nil + return nil end if !particle || !particle.is_a?(cls) particle.dispose if particle @@ -94,7 +94,7 @@ class Particle_Engine particle = realloc_effect(event,particle) @effect[i] = particle end - particle.update if particle + particle.update if particle end end end @@ -208,7 +208,7 @@ class ParticleEffect_Event < ParticleEffect @opacity = [] @startingx = self.x + @xoffset @startingy = self.y + @yoffset - @screen_x = self.x + @screen_x = self.x @screen_y = self.y @real_x = @event.real_x @real_y = @event.real_y @@ -299,7 +299,7 @@ class ParticleEffect_Event < ParticleEffect @particles[i].x = @startingx + @xoffset @particlex[i] = 0.0 @particley[i] = 0.0 - end + end if @fade == 0 if @opacity[i] <= 0 @opacity[i] = @originalopacity @@ -307,7 +307,7 @@ class ParticleEffect_Event < ParticleEffect @particles[i].x = @startingx + @xoffset @particlex[i] = 0.0 @particley[i] = 0.0 - end + end else if @opacity[i] <= 0 @opacity[i] = 250 @@ -315,7 +315,7 @@ class ParticleEffect_Event < ParticleEffect @particles[i].x = @startingx + @xoffset @particlex[i] = 0.0 @particley[i] = 0.0 - end + end end calcParticlePos(i) if @randomhue == 1 @@ -349,7 +349,7 @@ class ParticleEffect_Event < ParticleEffect def dispose for particle in @particles - particle.dispose + particle.dispose end for bitmap in @bitmaps.values bitmap.dispose @@ -558,7 +558,7 @@ class Particle_Engine::Splash < ParticleEffect_Event super for i in 0...@maxparticless @particles[i].opacity = 50 - @particles[i].update + @particles[i].update end end end @@ -574,7 +574,7 @@ class Game_Event < Game_Character begin nf_particles_game_map_initialize(map_id, event, map) rescue ArgumentError - nf_particles_game_map_initialize(map_id, event) + nf_particles_game_map_initialize(map_id, event) end end @@ -583,4 +583,4 @@ class Game_Event < Game_Character nf_particles_game_map_refresh @pe_refresh = true end -end \ No newline at end of file +end diff --git a/Data/Scripts/005_Map renderer/002_Tilemap_Perspective.rb b/Data/Scripts/005_Map renderer/002_Tilemap_Perspective.rb index a88a965cf..3a1e0c934 100644 --- a/Data/Scripts/005_Map renderer/002_Tilemap_Perspective.rb +++ b/Data/Scripts/005_Map renderer/002_Tilemap_Perspective.rb @@ -17,7 +17,7 @@ end def passable?(passages,tile_id) return false if tile_id == nil passage = passages[tile_id] - return (passage && passage<15) + return (passage && passage<15) end def getPassabilityMinimap(mapid) @@ -222,7 +222,7 @@ class Draw_Tilemap # This class controls a set of sprites, with end if @flash_data @sprites.push([]) - @contentstrips.push([]) + @contentstrips.push([]) end end @@ -444,4 +444,4 @@ class Sprite_Character self.z=ScreenPosHelper.pbScreenZ(@character,@ch) end end -end \ No newline at end of file +end diff --git a/Data/Scripts/005_Map renderer/003_Tilemap_Original.rb b/Data/Scripts/005_Map renderer/003_Tilemap_Original.rb index 47cdc2c3c..3dddc6b58 100644 --- a/Data/Scripts/005_Map renderer/003_Tilemap_Original.rb +++ b/Data/Scripts/005_Map renderer/003_Tilemap_Original.rb @@ -1,5 +1,5 @@ #=============================================================================== -# +# #=============================================================================== class SynchronizedTilemapAutotilesInternal def initialize(oldat) @@ -115,4 +115,4 @@ class SynchronizedTilemap < Tilemap @autotiles.sync super end -end \ No newline at end of file +end diff --git a/Data/Scripts/005_Map renderer/004_TilemapLoader.rb b/Data/Scripts/005_Map renderer/004_TilemapLoader.rb index 14d0a4720..9c7e60c6a 100644 --- a/Data/Scripts/005_Map renderer/004_TilemapLoader.rb +++ b/Data/Scripts/005_Map renderer/004_TilemapLoader.rb @@ -67,4 +67,4 @@ class TilemapLoader def ox=(v); @tilemap.ox = v; end def oy; @tilemap.oy; end def oy=(v); @tilemap.oy = v; end -end \ No newline at end of file +end diff --git a/Data/Scripts/005_Map renderer/005_TileDrawingHelper.rb b/Data/Scripts/005_Map renderer/005_TileDrawingHelper.rb index 3ebf87843..c5c700482 100644 --- a/Data/Scripts/005_Map renderer/005_TileDrawingHelper.rb +++ b/Data/Scripts/005_Map renderer/005_TileDrawingHelper.rb @@ -16,7 +16,7 @@ class TileDrawingHelper [ [37, 38, 43, 44], [37, 6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44], [37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1, 2, 7, 8] ] ] - + # converts neighbors returned from tableNeighbors to tile indexes NeighborsToTiles = [ 46, 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40, @@ -98,7 +98,7 @@ class TileDrawingHelper for i in 0...4 tile_position = tiles[i] - 1 src.set(tile_position % 6 * 16 + anim, tile_position / 6 * 16, 16, 16) - bitmap.stretch_blt(Rect.new(i % 2 * cxTile + x, i / 2 * cyTile + y, cxTile, cyTile), + bitmap.stretch_blt(Rect.new(i % 2 * cxTile + x, i / 2 * cyTile + y, cxTile, cyTile), autotile, src) end end @@ -115,7 +115,7 @@ class TileDrawingHelper bltSmallRegularTile(bitmap, x, y, cxTile, cyTile, id) elsif id > 0 bltSmallAutotile(bitmap, x, y, cxTile, cyTile, id, frame) - end + end end def bltAutotile(bitmap,x,y,id,frame) @@ -131,6 +131,6 @@ class TileDrawingHelper bltRegularTile(bitmap, x, y, id) elsif id > 0 bltAutotile(bitmap, x, y, id, frame) - end + end end -end \ No newline at end of file +end diff --git a/Data/Scripts/006_Events and files/001_Interpreter.rb b/Data/Scripts/006_Events and files/001_Interpreter.rb index 7f87747ca..a9bbc1fc4 100644 --- a/Data/Scripts/006_Events and files/001_Interpreter.rb +++ b/Data/Scripts/006_Events and files/001_Interpreter.rb @@ -1466,4 +1466,4 @@ class Interpreter result = pbExecuteScript(script) return true end -end \ No newline at end of file +end diff --git a/Data/Scripts/006_Events and files/002_EventHandlers.rb b/Data/Scripts/006_Events and files/002_EventHandlers.rb index 101fc4c12..303af94a5 100644 --- a/Data/Scripts/006_Events and files/002_EventHandlers.rb +++ b/Data/Scripts/006_Events and files/002_EventHandlers.rb @@ -52,7 +52,7 @@ class Event end end end - + # Triggers the event and calls all its event handlers. Normally called only # by the code where the event occurred. The first argument is the sender of # the event, the other arguments are the event's parameters. @@ -169,4 +169,4 @@ class MoveHandlerHash < HandlerHash def initialize super(:PBMoves) end -end \ No newline at end of file +end diff --git a/Data/Scripts/006_Events and files/003_File_Mixins.rb b/Data/Scripts/006_Events and files/003_File_Mixins.rb index 05c4cf5c2..db41d4e36 100644 --- a/Data/Scripts/006_Events and files/003_File_Mixins.rb +++ b/Data/Scripts/006_Events and files/003_File_Mixins.rb @@ -160,4 +160,4 @@ end class StringOutput include FileOutputMixin -end \ No newline at end of file +end diff --git a/Data/Scripts/006_Events and files/004_Intl_Messages.rb b/Data/Scripts/006_Events and files/004_Intl_Messages.rb index ee1ddcab2..3c34f1691 100644 --- a/Data/Scripts/006_Events and files/004_Intl_Messages.rb +++ b/Data/Scripts/006_Events and files/004_Intl_Messages.rb @@ -52,7 +52,7 @@ def pbSetTextMessages lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " } items.push(lastitem) lastitem="" - end + end neednewline=false end if list.code == 101 @@ -84,7 +84,7 @@ def pbSetTextMessages if lastitem!="" items.push(lastitem) lastitem="" - end + end end end end @@ -128,7 +128,7 @@ def pbSetTextMessages lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " } items.push(lastitem) lastitem="" - end + end neednewline=false end if list.code == 101 @@ -160,7 +160,7 @@ def pbSetTextMessages if lastitem!="" items.push(lastitem) lastitem="" - end + end end end end @@ -196,7 +196,7 @@ def pbEachIntlSection(file) if !line[/^\#/] && !line[/^\s*$/] if line[re] if havesection - yield lastsection,sectionname + yield lastsection,sectionname end lastsection.clear sectionname=$~[1] @@ -214,13 +214,13 @@ def pbEachIntlSection(file) end } if havesection - yield lastsection,sectionname + yield lastsection,sectionname end end def pbGetText(infile) begin - file=File.open(infile,"rb") + file=File.open(infile,"rb") rescue raise _INTL("Can't find {1}",infile) end @@ -773,4 +773,4 @@ def _MAPISPRINTF(mapid,*arg) } end return string -end \ No newline at end of file +end diff --git a/Data/Scripts/006_Events and files/005_PBDebug.rb b/Data/Scripts/006_Events and files/005_PBDebug.rb index 988c1ec07..dc7e7e91d 100644 --- a/Data/Scripts/006_Events and files/005_PBDebug.rb +++ b/Data/Scripts/006_Events and files/005_PBDebug.rb @@ -20,7 +20,7 @@ module PBDebug if $DEBUG && $INTERNAL && @@log.length>0 File.open("Data/debuglog.txt", "a+b") { |f| f.write("#{@@log}") } end - @@log.clear + @@log.clear end def self.log(msg) @@ -37,4 +37,4 @@ module PBDebug File.open("Data/dumplog.txt", "a+b") { |f| f.write("#{msg}\r\n") } end end -end \ No newline at end of file +end diff --git a/Data/Scripts/007_Audio/001_Audio.rb b/Data/Scripts/007_Audio/001_Audio.rb index 165da35f2..21b844bfc 100644 --- a/Data/Scripts/007_Audio/001_Audio.rb +++ b/Data/Scripts/007_Audio/001_Audio.rb @@ -144,7 +144,7 @@ module AudioState def self.pitch; @pitch; end def self.volume; @volume; end - def self.waitingBGM=(value); + def self.waitingBGM=(value); Thread.exclusive { @waitingBGM=value; } end @@ -245,7 +245,7 @@ def Audio_me_fade(ms) end def Audio_me_stop() - AudioState::AudioContextStop.call(AudioState.meContext) + AudioState::AudioContextStop.call(AudioState.meContext) end def Audio_bgs_play(name, volume, pitch, position = 0) @@ -264,7 +264,7 @@ def Audio_bgs_fade(ms) end def Audio_bgs_stop() - AudioState::AudioContextStop.call(AudioState.bgsContext) + AudioState::AudioContextStop.call(AudioState.bgsContext) end def Audio_se_play(name, volume, pitch, position = 0) @@ -279,7 +279,7 @@ def Audio_se_play(name, volume, pitch, position = 0) end def Audio_se_stop() - AudioState::AudioContextStop.call(AudioState.seContext) + AudioState::AudioContextStop.call(AudioState.seContext) end diff --git a/Data/Scripts/007_Audio/002_AudioPlay.rb b/Data/Scripts/007_Audio/002_AudioPlay.rb index b7b3e28b9..38ae27cfd 100644 --- a/Data/Scripts/007_Audio/002_AudioPlay.rb +++ b/Data/Scripts/007_Audio/002_AudioPlay.rb @@ -13,7 +13,7 @@ def pbStringToAudioFile(str) end end -# Converts an object to an audio file. +# Converts an object to an audio file. # str -- Either a string showing the filename or an RPG::AudioFile object. # Possible formats for _str_: # filename volume and pitch 100 @@ -41,7 +41,7 @@ end ################################################################################ # Plays a BGM file. -# param -- Either a string showing the filename +# param -- Either a string showing the filename # (relative to Audio/BGM/) or an RPG::AudioFile object. # Possible formats for _param_: # filename volume and pitch 100 @@ -91,7 +91,7 @@ end ################################################################################ # Plays an ME file. -# param -- Either a string showing the filename +# param -- Either a string showing the filename # (relative to Audio/ME/) or an RPG::AudioFile object. # Possible formats for _param_: # filename volume and pitch 100 @@ -140,7 +140,7 @@ end ################################################################################ # Plays a BGS file. -# param -- Either a string showing the filename +# param -- Either a string showing the filename # (relative to Audio/BGS/) or an RPG::AudioFile object. # Possible formats for _param_: # filename volume and pitch 100 @@ -189,7 +189,7 @@ end ################################################################################ # Plays an SE file. -# param -- Either a string showing the filename +# param -- Either a string showing the filename # (relative to Audio/SE/) or an RPG::AudioFile object. # Possible formats for _param_: # filename volume and pitch 100 @@ -289,4 +289,4 @@ def pbPlayCloseMenuSE if FileTest.audio_exist?("Audio/SE/GUI menu close") pbSEPlay("GUI menu close",80) end -end \ No newline at end of file +end diff --git a/Data/Scripts/007_Audio/003_AudioUtilities.rb b/Data/Scripts/007_Audio/003_AudioUtilities.rb index 8b1eea711..a01f7a872 100644 --- a/Data/Scripts/007_Audio/003_AudioUtilities.rb +++ b/Data/Scripts/007_Audio/003_AudioUtilities.rb @@ -17,7 +17,7 @@ Parameters: freq - the frequency of the sound in Hz. The higher the frequency, the higher the pitch. If 0, no sound will be generated. The module Audio::Note contains useful frequencies for tones. - freq can also be a SoundEnvelope or an array of two element arrays, + freq can also be a SoundEnvelope or an array of two element arrays, as follows: freq[0] - time in ms to apply the specified frequency freq[1] - frequency to apply. In between, values will be interpolated @@ -26,7 +26,7 @@ Parameters: async - specifies whether the function will return immediately without waiting for the sound to finish (stands for asynchronous) timbre - specifies the timbre of the tone; from 0.0 through 1.0 - timbre can also be a SoundEnvelope or an array of two element arrays, + timbre can also be a SoundEnvelope or an array of two element arrays, as follows: volume[0] - time in ms to apply the specified timbre volume[1] - timbre to apply. In between, values will be interpolated @@ -206,7 +206,7 @@ class NoteEnvelope def sweeping(duration,sweepDuration) return self if duration<=0 return steady(duration) if sweepDuration<=0 - @envelope.changeDiscrete(0,@maxPoint) + @envelope.changeDiscrete(0,@maxPoint) falling=true while duration>0 dur=duration>sweepDuration ? sweepDuration : duration @@ -368,13 +368,13 @@ class SoundEnvelope; include Enumerable # duration - duration of the sound # attack - attack time (in ms), or time between the start of the sound # and the time where the sound reaches its maximum volume. - # If this value is less than 0, the sound will decay from silence to + # If this value is less than 0, the sound will decay from silence to # the sustain volume instead (see below). # decay - decay time (in ms), or time after the attack phase until # the time where the sound reaches its sustain volume # sustain - sustain volume, or normal volume of sound (0-100) - # release - release time (in ms), or amount of time to fade out the - # sound when it reaches its end. The sound's duration includes its + # release - release time (in ms), or amount of time to fade out the + # sound when it reaches its end. The sound's duration includes its # release time. def self.attackDecayRelease(duration,attack,decay,sustain,release) env=self.new @@ -396,7 +396,7 @@ class SoundEnvelope; include Enumerable return self.new.addValueChanges( value,onDuration,0,offDuration).repeat(totalDuration) end - + def change(delta,volume) return self if delta<0 velength=@e.length @@ -528,7 +528,7 @@ class SoundEnvelopeIterator# :nodoc: def getValue(frame) value=0 if @envIndex==@env.length - value=@env[@envIndex-1][1] + value=@env[@envIndex-1][1] elsif @envIndex==0 value=@env[@envIndex][1] else @@ -539,7 +539,7 @@ class SoundEnvelopeIterator# :nodoc: thisVolume=@env[@envIndex][1] value=(thisVolume-lastVolume)*(frame-lastPos)/(thisPos-lastPos)+lastVolume else - value=@env[@envIndex][1] + value=@env[@envIndex][1] end end while @envIndex+1<=@env.length && @env[@envIndex][0]==frame.to_i @@ -652,7 +652,7 @@ class WaveForm# :nodoc: @exactCounter+=@step while @exactCounter>1.0; @exactCounter-=1.0; end end - + def mixSamples(other) for i in 0...other.sampleCount newSamp=((@samples[i]-0x80)+(other.samples[i]-0x80))/2+0x80 @@ -806,7 +806,7 @@ module Audio timbre1,timbre2,@@sineProc2,@@sineProc2,async) end - @@noiseProc2 = proc { |i,timbre| + @@noiseProc2 = proc { |i,timbre| n = (rand(256)/255.0)*0.1 next (rand(2)==0) ? 1-n : -1+n } @@ -1293,7 +1293,7 @@ end ############################### begin - MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l') + MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l') MciErrorString = Win32API.new('winmm','mciGetErrorString','%w(l,p,l)','l') rescue MciSendString = nil @@ -1347,4 +1347,4 @@ def endRecord(file) MciSendString.call("close RECORDER",0,0,0) end -#Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50) \ No newline at end of file +#Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50) diff --git a/Data/Scripts/008_Objects and windows/001_FileTests.rb b/Data/Scripts/008_Objects and windows/001_FileTests.rb index 864e2d34c..5d0c15cee 100644 --- a/Data/Scripts/008_Objects and windows/001_FileTests.rb +++ b/Data/Scripts/008_Objects and windows/001_FileTests.rb @@ -179,12 +179,12 @@ module RTP # Gets the absolute RGSS paths for the given file name def self.eachPathFor(filename) return if !filename - if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/] + if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/] # filename is already absolute yield filename else # relative path - RTP.eachPath { |path| + RTP.eachPath { |path| if path=="./" yield filename else @@ -423,7 +423,7 @@ end #=============================================================================== -# +# #=============================================================================== module MiniRegistry HKEY_CLASSES_ROOT = 0x80000000 @@ -455,7 +455,7 @@ module MiniRegistry def self.close(hkey); check(RegCloseKey.call(hkey)) if hkey; end def self.get(hkey,subkey,name,defaultValue=nil,bit64=false) - self.open(hkey,subkey,bit64) { |key| + self.open(hkey,subkey,bit64) { |key| return self.read(key,name) rescue defaultValue } return defaultValue @@ -654,4 +654,4 @@ module ::Marshal end end end -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/002_BitmapCache.rb b/Data/Scripts/008_Objects and windows/002_BitmapCache.rb index e44135d17..abdc3a2c5 100644 --- a/Data/Scripts/008_Objects and windows/002_BitmapCache.rb +++ b/Data/Scripts/008_Objects and windows/002_BitmapCache.rb @@ -22,7 +22,7 @@ def canonicalize(c) if x=="." elsif x==".." if pos>=0 - ret.delete_at(pos) + ret.delete_at(pos) pos -= 1 end else @@ -141,7 +141,7 @@ class WeakHashtable def [](key) o=@hash[key] return o if !o - if o.weakref_alive? + if o.weakref_alive? o=o.__getobj__ else @hash.delete(key) @@ -494,4 +494,4 @@ module BitmapCache @cache = {} GC.start end -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/003_Window.rb b/Data/Scripts/008_Objects and windows/003_Window.rb index 60cc33535..5a14e1d27 100644 --- a/Data/Scripts/008_Objects and windows/003_Window.rb +++ b/Data/Scripts/008_Objects and windows/003_Window.rb @@ -414,7 +414,7 @@ class Window @sprites["cursor"].visible=false end for i in @sprites - i[1].z=@z + i[1].z=@z end if @rpgvx @sprites["cursor"].z=@z # For Compatibility @@ -526,23 +526,23 @@ class Window @cursorbitmap.clear @sprites["cursor"].bitmap=@cursorbitmap @sprites["cursor"].src_rect.set(0,0,width,height) - rect = Rect.new(margin,margin, + rect = Rect.new(margin,margin, width - fullmargin, height - fullmargin) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8]) @cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4])# top left @cursorbitmap.blt(width-margin, 0, @_windowskin, cursorrects[5]) # top right @cursorbitmap.blt(0, height-margin, @_windowskin, cursorrects[6]) # bottom right @cursorbitmap.blt(width-margin, height-margin, @_windowskin, cursorrects[7]) # bottom left - rect = Rect.new(margin, 0, + rect = Rect.new(margin, 0, width - fullmargin, margin) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0]) - rect = Rect.new(0, margin, + rect = Rect.new(0, margin, margin, height - fullmargin) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1]) - rect = Rect.new(width - margin, margin, + rect = Rect.new(width - margin, margin, margin, height - fullmargin) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2]) - rect = Rect.new(margin, height-margin, + rect = Rect.new(margin, height-margin, width - fullmargin, margin) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3]) else @@ -605,4 +605,4 @@ class Window sprite.oy=(sprite.zoom_y<=0) ? 0 : (i-y)/sprite.zoom_y end end -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/004_SpriteWindow.rb b/Data/Scripts/008_Objects and windows/004_SpriteWindow.rb index 9e5f8f214..f9d9c36fe 100644 --- a/Data/Scripts/008_Objects and windows/004_SpriteWindow.rb +++ b/Data/Scripts/008_Objects and windows/004_SpriteWindow.rb @@ -208,7 +208,7 @@ def pbRepositionMessageWindow(msgwindow, linecount=2) case $game_message.background when 1; msgwindow.opacity=0 # dim when 2; msgwindow.opacity=0 # transparent - end + end end end @@ -218,7 +218,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false) if eventChanged msgwindow.resizeToFit2(msgwindow.text,Graphics.width*2/3,msgwindow.height) end - msgwindow.y=event.screen_y-48-msgwindow.height + msgwindow.y=event.screen_y-48-msgwindow.height if msgwindow.y<0 msgwindow.y=event.screen_y+24 end @@ -231,7 +231,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false) curwidth=msgwindow.width if curwidth!=Graphics.width msgwindow.width=Graphics.width - msgwindow.width=Graphics.width + msgwindow.width=Graphics.width end end end @@ -467,7 +467,7 @@ end def pbUpdateSpriteHash(windows) for i in windows window=i[1] - if window + if window if window.is_a?(Sprite) || window.is_a?(Window) window.update if !pbDisposed?(window) elsif window.is_a?(Plane) @@ -636,7 +636,7 @@ def pbFadeInAndShow(sprites,visiblesprites=nil) for j in 0..numFrames pbSetSpritesToColor(sprites,Color.new(0,0,0,((numFrames-j)*alphaDiff))) (block_given?) ? yield : pbUpdateSpriteHash(sprites) - end + end } end @@ -754,7 +754,7 @@ if !defined?(_INTL) for i in 1...args.length string.gsub!(/\{#{i}\}/,"#{args[i]}") end - return string + return string end end @@ -776,6 +776,6 @@ if !defined?(_MAPINTL) for i in 2...args.length string.gsub!(/\{#{i}\}/,"#{args[i+1]}") end - return string + return string end -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/005_SpriteWindow_text.rb b/Data/Scripts/008_Objects and windows/005_SpriteWindow_text.rb index 67181a107..5636cb157 100644 --- a/Data/Scripts/008_Objects and windows/005_SpriteWindow_text.rb +++ b/Data/Scripts/008_Objects and windows/005_SpriteWindow_text.rb @@ -1,5 +1,5 @@ #=============================================================================== -# +# #=============================================================================== class SpriteWindowCursorRect < Rect def initialize(window) @@ -95,7 +95,7 @@ class SpriteWindow < Window # Flags used to preserve compatibility # with RGSS/RGSS2's version of Window - module CompatBits + module CompatBits CorrectZ = 1 ExpandBack = 2 ShowScrollArrows = 4 @@ -437,7 +437,7 @@ class SpriteWindow < Window def skinformat=(value) if @skinformat!=value - @skinformat=value + @skinformat=value privRefresh(true) end end @@ -573,9 +573,9 @@ class SpriteWindow < Window hascontents=(@contents && !@contents.disposed?) @sprites["back"].visible=@visible @sprites["contents"].visible=@visible && @openness==255 - @sprites["pause"].visible=supported && @visible && @pause && + @sprites["pause"].visible=supported && @visible && @pause && (@combat & CompatBits::ShowPause) - @sprites["cursor"].visible=supported && @visible && @openness==255 && + @sprites["cursor"].visible=supported && @visible && @openness==255 && (@combat & CompatBits::ShowCursor) @sprites["scroll0"].visible = false @sprites["scroll1"].visible = false @@ -698,7 +698,7 @@ class SpriteWindow < Window @sprites["contents"].y=@y+trimStartY if (@compat & CompatBits::ShowScrollArrows)>0 && @skinformat==0 # Compatibility mode: Make scroll arrows visible - if @skinformat==0 && @_windowskin && !@_windowskin.disposed? && + if @skinformat==0 && @_windowskin && !@_windowskin.disposed? && @contents && !@contents.disposed? @sprites["scroll0"].visible = @visible && hascontents && @oy > 0 @sprites["scroll1"].visible = @visible && hascontents && @ox > 0 @@ -887,7 +887,7 @@ end #=============================================================================== -# +# #=============================================================================== class SpriteWindow_Base < SpriteWindow TEXTPADDING=4 # In pixels @@ -970,7 +970,7 @@ class SpriteWindow_Base < SpriteWindow @sysframe=AnimatedBitmap.new(@curframe) @resolvedFrame=nil __setWindowskin(@sysframe.bitmap) - __resolveSystemFrame() + __resolveSystemFrame() end begin refresh @@ -1000,7 +1000,7 @@ end #=============================================================================== -# +# #=============================================================================== # Represents a window with no formatting capabilities. Its text color can be set, # though, and line breaks are supported, but the text is generally unformatted. @@ -1110,7 +1110,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_AdvancedTextPokemon < SpriteWindow_Base attr_reader :text @@ -1386,7 +1386,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base return 0 if @lastDrawnChar<0 return @numtextchars if @lastDrawnChar>=@fmtchars.length # index after the last character's index - return @fmtchars[@lastDrawnChar][14]+1 + return @fmtchars[@lastDrawnChar][14]+1 end def maxPosition @@ -1590,7 +1590,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base refresh if !@frameskipChanged updateInternal # following line needed to allow "textspeed=-999" to work seamlessly - refresh if @frameskipChanged + refresh if @frameskipChanged end @frameskipChanged = false end @@ -1611,7 +1611,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_InputNumberPokemon < SpriteWindow_Base attr_reader :number @@ -1724,7 +1724,7 @@ class Window_InputNumberPokemon < SpriteWindow_Base self.contents.font.color=@shadowColor pbDrawShadow(self.contents,x+(12-textwidth/2),y, textwidth+4, 32, text) self.contents.font.color=@baseColor - self.contents.draw_text(x+(12-textwidth/2),y, textwidth+4, 32, text) + self.contents.draw_text(x+(12-textwidth/2),y, textwidth+4, 32, text) if @index==i && @active && @frame/15==0 colors=getDefaultTextColors(self.windowskin) self.contents.fill_rect(x+(12-textwidth/2),y+30,textwidth,2,colors[0]) @@ -1735,7 +1735,7 @@ end #=============================================================================== -# +# #=============================================================================== class SpriteWindow_Selectable < SpriteWindow_Base attr_reader :index @@ -1942,7 +1942,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base # self.top_row = row - (self.page_row_max - 1) # dorefresh=true # end -# if oldindex-self.top_item>=((self.page_item_max - 1)/2) +# if oldindex-self.top_item>=((self.page_item_max - 1)/2) # self.top_row+=1 # end # self.top_row = [self.top_row, self.row_max - self.page_row_max].min @@ -1966,7 +1966,7 @@ end #=============================================================================== -# +# #=============================================================================== module UpDownArrowMixin def initUpDownArrow @@ -1997,7 +1997,7 @@ module UpDownArrowMixin @uparrow.color = value @downarrow.color = value end - + def adjustForZoom(sprite) sprite.zoom_x = self.zoom_x sprite.zoom_y = self.zoom_y @@ -2029,7 +2029,7 @@ end #=============================================================================== -# +# #=============================================================================== class SpriteWindow_SelectableEx < SpriteWindow_Selectable include UpDownArrowMixin @@ -2043,7 +2043,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_DrawableCommand < SpriteWindow_SelectableEx attr_reader :baseColor @@ -2149,7 +2149,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_CommandPokemon < Window_DrawableCommand attr_reader :commands @@ -2198,7 +2198,7 @@ class Window_CommandPokemon < Window_DrawableCommand def commands=(value) @commands=value - @item_max=commands.length + @item_max=commands.length self.update_cursor_rect self.refresh end @@ -2241,14 +2241,14 @@ end #=============================================================================== -# +# #=============================================================================== class Window_CommandPokemonEx < Window_CommandPokemon end #=============================================================================== -# +# #=============================================================================== class Window_AdvancedCommandPokemon < Window_DrawableCommand attr_reader :commands @@ -2363,7 +2363,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_AdvancedCommandPokemonEx < Window_AdvancedCommandPokemon -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/006_SpriteWindow_sprites.rb b/Data/Scripts/008_Objects and windows/006_SpriteWindow_sprites.rb index 56451f7ef..5261ccb5e 100644 --- a/Data/Scripts/008_Objects and windows/006_SpriteWindow_sprites.rb +++ b/Data/Scripts/008_Objects and windows/006_SpriteWindow_sprites.rb @@ -58,7 +58,7 @@ end class PngAnimatedBitmap - # Creates an animated bitmap from a PNG file. + # Creates an animated bitmap from a PNG file. def initialize(file,hue=0) @frames=[] @currentFrame=0 @@ -91,9 +91,9 @@ class PngAnimatedBitmap end def width; self.bitmap.width; end - + def height; self.bitmap.height; end - + def deanimate for i in 1...@frames.length @frames[i].dispose @@ -207,7 +207,7 @@ class GifBitmap #File.open("debug.txt","ab") { |f| f.puts("rejecting bitmap") } bitmap.dispose bitmap=nil - end + end if bitmap #File.open("debug.txt","ab") { |f| f.puts("reusing bitmap") } # Have a regular non-animated bitmap @@ -348,7 +348,7 @@ end def pbGetTileBitmap(filename, tile_id, hue) - return BitmapCache.tileEx(filename, tile_id, hue) { |f| + return BitmapCache.tileEx(filename, tile_id, hue) { |f| AnimatedBitmap.new("Graphics/Tilesets/"+filename).deanimate; } end @@ -482,7 +482,7 @@ end #=============================================================================== -# +# #=============================================================================== class AnimatedSprite < SpriteWrapper attr_reader :frame @@ -597,7 +597,7 @@ class AnimatedSprite < SpriteWrapper if @playing @realframes+=1 if @realframes==@frameskip - @realframes=0 + @realframes=0 self.frame+=1 self.frame%=self.framecount end @@ -838,7 +838,7 @@ class PictureWindow < SpriteWindow_Base else @_iconbitmap=AnimatedBitmap.new(pathOrBitmap,hue) self.contents=@_iconbitmap ? @_iconbitmap.bitmap : nil - self.width=@_iconbitmap ? @_iconbitmap.bitmap.width+self.borderX : + self.width=@_iconbitmap ? @_iconbitmap.bitmap.width+self.borderX : 32+self.borderX self.height=@_iconbitmap ? @_iconbitmap.bitmap.height+self.borderY : 32+self.borderY @@ -854,7 +854,7 @@ end #=============================================================================== -# +# #=============================================================================== class Plane def update; end @@ -900,14 +900,14 @@ class LargePlane < Plane def ox; @__ox; end def oy; @__oy; end - - def ox=(value); + + def ox=(value); return if @__ox==value @__ox = value refresh end - def oy=(value); + def oy=(value); return if @__oy==value @__oy = value refresh @@ -944,13 +944,13 @@ class LargePlane < Plane def color; @__sprite.color; end def tone; @__sprite.tone; end - def zoom_x=(v); + def zoom_x=(v); return if @__sprite.zoom_x==v @__sprite.zoom_x = v refresh end - def zoom_y=(v); + def zoom_y=(v); return if @__sprite.zoom_y==v @__sprite.zoom_y = v refresh @@ -1082,4 +1082,4 @@ class AnimatedPlane < LargePlane return if file==nil @bitmap=AnimatedBitmap.new(file,hue) end -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/007_DrawText.rb b/Data/Scripts/008_Objects and windows/007_DrawText.rb index a305e29be..498ddda66 100644 --- a/Data/Scripts/008_Objects and windows/007_DrawText.rb +++ b/Data/Scripts/008_Objects and windows/007_DrawText.rb @@ -837,13 +837,13 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32, for i in 0...characters.length c=characters[i] if i>0 && (charactersInternal[i][0]!=lastalign || - charactersInternal[i][1]!=lasty) + charactersInternal[i][1]!=lasty) # Found end of run widthblocks.push([runstart,i,lastalign,totalwidth,lasty]) runstart=i totalwidth=0 end - lastalign=charactersInternal[i][0] + lastalign=charactersInternal[i][0] lasty=charactersInternal[i][1] extraspace=(charactersInternal[i][4]) ? charactersInternal[i][4] : 0 totalwidth+=c[3]-extraspace @@ -1209,4 +1209,4 @@ def pbDrawImagePositions(bitmap,textpos) bitmap.blt(x,y,srcbitmap.bitmap,srcrect) srcbitmap.dispose end -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/008_Messages.rb b/Data/Scripts/008_Objects and windows/008_Messages.rb index 2b4a19379..4d3ca1111 100644 --- a/Data/Scripts/008_Objects and windows/008_Messages.rb +++ b/Data/Scripts/008_Objects and windows/008_Messages.rb @@ -29,7 +29,7 @@ class Game_Message def visible return @visible || false end - + def background return @background || 0 end @@ -48,7 +48,7 @@ end #=============================================================================== -# +# #=============================================================================== class Scene_Map def updatemini @@ -96,7 +96,7 @@ class Scene_Battle $game_screen.update else $game_map.screen.update - end + end # If timer has reached 0 if $game_system.timer_working and $game_system.timer == 0 # Abort battle @@ -158,7 +158,7 @@ end #=============================================================================== -# +# #=============================================================================== def pbEventCommentInput(*args) parameters = [] @@ -284,7 +284,7 @@ module InterpreterMixin i = (newI>i) ? newI : i+1 else return i - end + end end end @@ -635,7 +635,7 @@ end #=============================================================================== -# +# #=============================================================================== class ChooseNumberParams def initialize @@ -795,15 +795,15 @@ def pbChooseNumber(msgwindow,params) end cmdwindow.dispose Input.update - return ret + return ret end #=============================================================================== -# +# #=============================================================================== -class FaceWindowVX < SpriteWindow_Base +class FaceWindowVX < SpriteWindow_Base def initialize(face) super(0,0,128,128) faceinfo=face.split(",") @@ -841,7 +841,7 @@ end #=============================================================================== -# +# #=============================================================================== def pbGetBasicMapNameFromId(id) begin @@ -877,7 +877,7 @@ def pbCsvField!(str) end end str[0,fieldbytes]="" - if !str[/\A\s*,/] && !str[/\A\s*$/] + if !str[/\A\s*,/] && !str[/\A\s*$/] raise _INTL("Invalid quoted field (in: {1})",ret) end str[0,str.length]=$~.post_match @@ -915,7 +915,7 @@ def pbGetGoldString if $data_system.respond_to?("words") moneyString=_INTL("{1} {2}",$game_party.gold,$data_system.words.gold) else - moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold) + moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold) end end return moneyString @@ -956,7 +956,7 @@ end #=============================================================================== -# +# #=============================================================================== def pbCreateStatusWindow(viewport=nil) msgwindow=Window_AdvancedTextPokemon.new("") @@ -1026,7 +1026,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil) text.gsub!(/\\\\/,"\5") text.gsub!(/\\1/,"\1") if $game_actors - text.gsub!(/\\n\[([1-8])\]/i) { + text.gsub!(/\\n\[([1-8])\]/i) { m = $1.to_i next $game_actors[m].name } @@ -1044,7 +1044,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil) text.gsub!(/\\b/i,"") text.gsub!(/\\r/i,"") isDarkSkin = isDarkWindowskin(msgwindow.windowskin) - text.gsub!(/\\[Cc]\[([0-9]+)\]/) { + text.gsub!(/\\[Cc]\[([0-9]+)\]/) { m = $1.to_i next getSkinColor(msgwindow.windowskin,m,isDarkSkin) } @@ -1054,9 +1054,9 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil) end until text == last_text begin last_text = text.clone - text.gsub!(/\\l\[([0-9]+)\]/i) { + text.gsub!(/\\l\[([0-9]+)\]/i) { linecount = [1,$1.to_i].max - next "" + next "" } end until text == last_text colortag = "" @@ -1428,4 +1428,4 @@ def pbMessageWaitForInput(msgwindow,frames,showPause=false) yield if block_given? end msgwindow.stopPause if msgwindow && showPause -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/009_TextEntry.rb b/Data/Scripts/008_Objects and windows/009_TextEntry.rb index d9b7bd11c..228b859dc 100644 --- a/Data/Scripts/008_Objects and windows/009_TextEntry.rb +++ b/Data/Scripts/008_Objects and windows/009_TextEntry.rb @@ -1,5 +1,5 @@ #=============================================================================== -# +# #=============================================================================== class Window_CharacterEntry < Window_DrawableCommand XSIZE=13 @@ -67,12 +67,12 @@ end #=============================================================================== -# +# #=============================================================================== class CharacterEntryHelper attr_reader :text attr_reader :maxlength - attr_reader :passwordChar + attr_reader :passwordChar attr_accessor :cursor def initialize(text) @@ -163,7 +163,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_TextEntry < SpriteWindow_Base def initialize(text,x,y,width,height,heading=nil,usedarkercolor=false) @@ -205,7 +205,7 @@ class Window_TextEntry < SpriteWindow_Base end def maxlength=(value) - @helper.maxlength=value + @helper.maxlength=value self.refresh end @@ -281,7 +281,7 @@ class Window_TextEntry < SpriteWindow_Base for i in startpos...scanlength c=(@helper.passwordChar!="") ? @helper.passwordChar : textscan[i] textwidth=bitmap.text_size(c).width - next if c=="\n" + next if c=="\n" # Draw text pbDrawShadowText(bitmap,x,y, textwidth+4, 32, c,@baseColor,@shadowColor) # Draw cursor if necessary @@ -300,7 +300,7 @@ end #=============================================================================== -# +# #=============================================================================== def getLineBrokenText(bitmap,value,width,dims) x=0 @@ -367,7 +367,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_MultilineTextEntry < SpriteWindow_Base def initialize(text,x,y,width,height) @@ -412,7 +412,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base end def maxlength=(value) - @helper.maxlength=value + @helper.maxlength=value @textchars=nil self.refresh end @@ -728,7 +728,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base thispos=textchars[i][6] thiscolumn=textchars[i][7] thislength=textchars[i][8] - if thisline==@cursorLine && @cursorColumn>=thiscolumn && + if thisline==@cursorLine && @cursorColumn>=thiscolumn && @cursorColumn<=thiscolumn+thislength cursorY=textchars[i][2]-startY cursorX=textchars[i][1] @@ -751,7 +751,7 @@ end #=============================================================================== -# +# #=============================================================================== class Window_TextEntry_Keyboard < Window_TextEntry def update @@ -1021,14 +1021,14 @@ class PokemonEntryScene @sprites["entry2"].setOtherCharset(@@Characters[@symtype][1]) else # Insert given character if @sprites["entry"].insert(@sprites["entry2"].character) - pbPlayDecisionSE() + pbPlayDecisionSE() else pbPlayBuzzerSE() end end next end - end + end Input.update return ret end @@ -1141,7 +1141,7 @@ class PokemonEntryScene2 end def update - updateInternal + updateInternal end def dispose @@ -1599,7 +1599,7 @@ end #=============================================================================== -# +# #=============================================================================== def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,nofadeout=false) ret="" @@ -1673,4 +1673,4 @@ def pbMessageFreeText(message,currenttext,passwordbox,maxlength,width=240,&block },&block) pbDisposeMessageWindow(msgwindow) return retval -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/010_EventScene.rb b/Data/Scripts/008_Objects and windows/010_EventScene.rb index 0b9f16a9a..0c563b51c 100644 --- a/Data/Scripts/008_Objects and windows/010_EventScene.rb +++ b/Data/Scripts/008_Objects and windows/010_EventScene.rb @@ -3,7 +3,7 @@ def getCubicPoint2(src,t) cx0 = src[2]; cy0 = src[3] cx1 = src[4]; cy1 = src[5] x1 = src[6]; y1 = src[7] - + x1 = cx1+(x1-cx1)*t x0 = x0+(cx0-x0)*t cx0 = cx0+(cx1-cx0)*t @@ -613,7 +613,7 @@ class EventScene return @disposed end - def addBitmap(x, y, bitmap) + def addBitmap(x, y, bitmap) # _bitmap_ can be a Bitmap or an AnimatedBitmap # (update method isn't called if it's animated) # EventScene doesn't take ownership of the passed-in bitmap @@ -628,7 +628,7 @@ class EventScene end def addLabel(x, y, width, text) - addBitmap(x,y,pbTextBitmap(text,width)) + addBitmap(x,y,pbTextBitmap(text,width)) end def addImage(x, y, name) @@ -706,4 +706,4 @@ def pbEventScreen(cls) } viewport.dispose } -end \ No newline at end of file +end diff --git a/Data/Scripts/008_Objects and windows/011_Interpolators.rb b/Data/Scripts/008_Objects and windows/011_Interpolators.rb index 8e69413ab..567defb50 100644 --- a/Data/Scripts/008_Objects and windows/011_Interpolators.rb +++ b/Data/Scripts/008_Objects and windows/011_Interpolators.rb @@ -169,4 +169,4 @@ class PointInterpolator @y = ry1+t*(ry2-ry1) @curframe += 1 end -end \ No newline at end of file +end diff --git a/Data/Scripts/009_Scenes/001_Scene_Map.rb b/Data/Scripts/009_Scenes/001_Scene_Map.rb index 52bb30121..3e8ed2579 100644 --- a/Data/Scripts/009_Scenes/001_Scene_Map.rb +++ b/Data/Scripts/009_Scenes/001_Scene_Map.rb @@ -1,7 +1,7 @@ #=============================================================================== # ** Modified Scene_Map class for Pokémon. #------------------------------------------------------------------------------- -# +# #=============================================================================== class Scene_Map attr_reader :spritesetGlobal @@ -103,7 +103,7 @@ class Scene_Map $game_player.straighten $game_map.update sscene = PokemonPauseMenu_Scene.new - sscreen = PokemonPauseMenu.new(sscene) + sscreen = PokemonPauseMenu.new(sscene) sscreen.pbStartPokemonMenu $game_temp.in_menu = false end @@ -236,4 +236,4 @@ class Scene_Map Graphics.freeze end end -end \ No newline at end of file +end diff --git a/Data/Scripts/009_Scenes/002_Scene_Intro.rb b/Data/Scripts/009_Scenes/002_Scene_Intro.rb index 90e99ac56..7cafe34ef 100644 --- a/Data/Scripts/009_Scenes/002_Scene_Intro.rb +++ b/Data/Scripts/009_Scenes/002_Scene_Intro.rb @@ -131,4 +131,4 @@ class Scene_Intro @eventscene.main Graphics.freeze end -end \ No newline at end of file +end diff --git a/Data/Scripts/009_Scenes/003_Scene_Controls.rb b/Data/Scripts/009_Scenes/003_Scene_Controls.rb index f323f8847..bf1a2de74 100644 --- a/Data/Scripts/009_Scenes/003_Scene_Controls.rb +++ b/Data/Scripts/009_Scenes/003_Scene_Controls.rb @@ -43,4 +43,4 @@ class ButtonEventScene < EventScene scene.dispose Graphics.transition(20) end -end \ No newline at end of file +end diff --git a/Data/Scripts/009_Scenes/004_Scene_Movie.rb b/Data/Scripts/009_Scenes/004_Scene_Movie.rb index b9f98e69a..9b3446a6c 100644 --- a/Data/Scripts/009_Scenes/004_Scene_Movie.rb +++ b/Data/Scripts/009_Scenes/004_Scene_Movie.rb @@ -32,7 +32,7 @@ class Scene_Movie end status = " " * 255 x=movie.call("play FILE",0,0,0) - loop do + loop do sleep(0.1) @message.call(@temp.to_i,11,0,0) Graphics.update @@ -43,10 +43,10 @@ class Scene_Movie break if true_status.to_s != "play" if Input.trigger?(Input::B) movie.call("close FILE",0,0,0) - $scene = Scene_Map.new + $scene = Scene_Map.new break end end $scene = Scene_Map.new end -end \ No newline at end of file +end diff --git a/Data/Scripts/009_Scenes/005_Scene_Credits.rb b/Data/Scripts/009_Scenes/005_Scene_Credits.rb index 8773afe0d..1eff237e8 100644 --- a/Data/Scripts/009_Scenes/005_Scene_Credits.rb +++ b/Data/Scripts/009_Scenes/005_Scene_Credits.rb @@ -228,4 +228,4 @@ _END_ @realOY += @oyChangePerFrame @credit_sprite.oy = @realOY end -end \ No newline at end of file +end diff --git a/Data/Scripts/009_Scenes/006_Transitions.rb b/Data/Scripts/009_Scenes/006_Transitions.rb index 6b31eb27f..bbe30738f 100644 --- a/Data/Scripts/009_Scenes/006_Transitions.rb +++ b/Data/Scripts/009_Scenes/006_Transitions.rb @@ -42,7 +42,7 @@ module Graphics end =end @@transition.update if @@transition && !@@transition.disposed? - @@transition = nil if @@transition && @@transition.disposed? + @@transition = nil if @@transition && @@transition.disposed? end def self.judge_special_transition(duration,filename) @@ -97,7 +97,7 @@ end #=============================================================================== -# +# #=============================================================================== class BreakingGlass def initialize(numframes) @@ -161,7 +161,7 @@ end #=============================================================================== -# +# #=============================================================================== class ShrinkingPieces def initialize(numframes,rotation) @@ -228,7 +228,7 @@ end #=============================================================================== -# +# #=============================================================================== class SplashTransition SPLASH_SIZE = 32 @@ -327,7 +327,7 @@ end #=============================================================================== -# +# #=============================================================================== class RandomStripeTransition RAND_STRIPE_SIZE = 2 @@ -349,7 +349,7 @@ class RandomStripeTransition @viewport.z = 99999 @sprite = Sprite.new(@viewport) @sprite.bitmap = Bitmap.new(Graphics.width,Graphics.height) - ########## + ########## @direction = direction size = RAND_STRIPE_SIZE bands = ((@direction==0) ? Graphics.width : Graphics.height)/size @@ -412,7 +412,7 @@ end #=============================================================================== -# +# #=============================================================================== class ZoomInTransition def initialize(numframes) @@ -467,7 +467,7 @@ end #=============================================================================== -# +# #=============================================================================== class ScrollScreen def initialize(numframes,direction) @@ -538,7 +538,7 @@ end #=============================================================================== -# +# #=============================================================================== class MosaicTransition def initialize(numframes) @@ -594,7 +594,7 @@ end #=============================================================================== -# +# #=============================================================================== class FadeTransition def initialize(numframes) @@ -1614,4 +1614,4 @@ class FourBallBurst end @duration -= 1 end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/001_MiscData.rb b/Data/Scripts/010_Data/001_MiscData.rb index 71fd83680..cb9fe83ea 100644 --- a/Data/Scripts/010_Data/001_MiscData.rb +++ b/Data/Scripts/010_Data/001_MiscData.rb @@ -29,7 +29,7 @@ module PhoneMsgType Generic = 0 Greeting = 1 Body = 2 - BattleRequest = 3 + BattleRequest = 3 end @@ -190,7 +190,7 @@ module PokemonSpeciesData end return ret end - + def self.optionalValues(compilingForms=false) ret = { "Type2" => [SpeciesType2, "e",:PBTypes], @@ -469,4 +469,4 @@ def pbClearData if pbRgssExists?("Data/Tilesets.rvdata") $data_tilesets = load_data("Data/Tilesets.rvdata") end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/002_PBMove.rb b/Data/Scripts/010_Data/002_PBMove.rb index 24da3b49f..cde7e69a1 100644 --- a/Data/Scripts/010_Data/002_PBMove.rb +++ b/Data/Scripts/010_Data/002_PBMove.rb @@ -101,4 +101,4 @@ class PBMove maxPP = pbGetMoveData(@id,MOVE_TOTAL_PP) || 0 return maxPP+maxPP*@ppup/5 end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/003_PBStatuses.rb b/Data/Scripts/010_Data/003_PBStatuses.rb index 17c62e7a2..3b3bfa636 100644 --- a/Data/Scripts/010_Data/003_PBStatuses.rb +++ b/Data/Scripts/010_Data/003_PBStatuses.rb @@ -25,4 +25,4 @@ rescue Exception if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" raise $! end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/004_PBTypes_Extra.rb b/Data/Scripts/010_Data/004_PBTypes_Extra.rb index 8641766a9..eab7ee302 100644 --- a/Data/Scripts/010_Data/004_PBTypes_Extra.rb +++ b/Data/Scripts/010_Data/004_PBTypes_Extra.rb @@ -87,4 +87,4 @@ class PBTypes e = PBTypes.getCombinedEffectiveness(attackType,targetType1,targetType2,targetType3) return e>PBTypeEffectiveness::NORMAL_EFFECTIVE end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/005_PBNatures.rb b/Data/Scripts/010_Data/005_PBNatures.rb index bcd501a44..728f98140 100644 --- a/Data/Scripts/010_Data/005_PBNatures.rb +++ b/Data/Scripts/010_Data/005_PBNatures.rb @@ -84,4 +84,4 @@ module PBNatures end return ret end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/006_PBGenderRates.rb b/Data/Scripts/010_Data/006_PBGenderRates.rb index 0dffe8f34..cfa502211 100644 --- a/Data/Scripts/010_Data/006_PBGenderRates.rb +++ b/Data/Scripts/010_Data/006_PBGenderRates.rb @@ -21,4 +21,4 @@ module PBGenderRates end return 255 # Default value (genderless) end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/007_PBExperience.rb b/Data/Scripts/010_Data/007_PBExperience.rb index cd2acb5b5..1ca4fb55d 100644 --- a/Data/Scripts/010_Data/007_PBExperience.rb +++ b/Data/Scripts/010_Data/007_PBExperience.rb @@ -98,7 +98,7 @@ module PBExperience # Erratic (600000): # For levels 0-50: n**3([100-n]/50) # For levels 51-68: n**3([150-n]/100) - # For levels 69-98: n**3(1.274-[1/50][n/3]-p(n mod 3)) + # For levels 69-98: n**3(1.274-[1/50][n/3]-p(n mod 3)) # where p(x) = array(0.000,0.008,0.014)[x] # For levels 99-100: n**3([160-n]/100) # Fluctuating (1640000): @@ -114,7 +114,7 @@ module PBExperience # Level 101+, use formulae case growth when PBGrowthRates::Medium # 1000000 - return level ** 3 + return level ** 3 when PBGrowthRates::Erratic # 600000 # Different formula that causes 600000 EXP at level 100 return ((level ** 4) * 0.6 / 100).floor @@ -194,4 +194,4 @@ module PBExperience end return mLevel end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/008_PBStats.rb b/Data/Scripts/010_Data/008_PBStats.rb index aa5b1bd73..b81692d2e 100644 --- a/Data/Scripts/010_Data/008_PBStats.rb +++ b/Data/Scripts/010_Data/008_PBStats.rb @@ -63,4 +63,4 @@ rescue Exception if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" raise $! end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/009_PBRibbons.rb b/Data/Scripts/010_Data/009_PBRibbons.rb index 28c0e1598..b74440e81 100644 --- a/Data/Scripts/010_Data/009_PBRibbons.rb +++ b/Data/Scripts/010_Data/009_PBRibbons.rb @@ -256,4 +256,4 @@ module PBRibbons ] return desc[id] end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/010_PBEggGroups.rb b/Data/Scripts/010_Data/010_PBEggGroups.rb index 140d99d81..1fa4580b2 100644 --- a/Data/Scripts/010_Data/010_PBEggGroups.rb +++ b/Data/Scripts/010_Data/010_PBEggGroups.rb @@ -39,4 +39,4 @@ module PBEggGroups ] return names[id] end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/011_PBColors.rb b/Data/Scripts/010_Data/011_PBColors.rb index 9dd811084..7def73872 100644 --- a/Data/Scripts/010_Data/011_PBColors.rb +++ b/Data/Scripts/010_Data/011_PBColors.rb @@ -30,4 +30,4 @@ module PBColors ] return names[id] end -end \ No newline at end of file +end diff --git a/Data/Scripts/010_Data/012_PBHabitats.rb b/Data/Scripts/010_Data/012_PBHabitats.rb index 679ccdd06..715fa1889 100644 --- a/Data/Scripts/010_Data/012_PBHabitats.rb +++ b/Data/Scripts/010_Data/012_PBHabitats.rb @@ -29,4 +29,4 @@ module PBHabitats ] return names[id] end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb b/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb index dbb6d6712..4820daa84 100644 --- a/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb +++ b/Data/Scripts/011_Battle/001_Battler/001_PokeBattle_Battler.rb @@ -662,4 +662,4 @@ class PokeBattle_Battler end return @battle.battlers[(@index^1)] end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/002_Battler_Initialize.rb b/Data/Scripts/011_Battle/001_Battler/002_Battler_Initialize.rb index 36ce6381c..90d270608 100644 --- a/Data/Scripts/011_Battle/001_Battler/002_Battler_Initialize.rb +++ b/Data/Scripts/011_Battle/001_Battler/002_Battler_Initialize.rb @@ -323,4 +323,4 @@ class PokeBattle_Battler @participants.push(b.pokemonIndex) if !@participants.include?(b.pokemonIndex) end end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/003_Battler_ChangeSelf.rb b/Data/Scripts/011_Battle/001_Battler/003_Battler_ChangeSelf.rb index 2b789180a..82c1ddfb9 100644 --- a/Data/Scripts/011_Battle/001_Battler/003_Battler_ChangeSelf.rb +++ b/Data/Scripts/011_Battle/001_Battler/003_Battler_ChangeSelf.rb @@ -298,4 +298,4 @@ class PokeBattle_Battler end def pbHyperMode; end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/004_Battler_Statuses.rb b/Data/Scripts/011_Battle/001_Battler/004_Battler_Statuses.rb index 907b406e9..1322f6f77 100644 --- a/Data/Scripts/011_Battle/001_Battler/004_Battler_Statuses.rb +++ b/Data/Scripts/011_Battle/001_Battler/004_Battler_Statuses.rb @@ -570,4 +570,4 @@ class PokeBattle_Battler return if hasActiveAbility?(:INNERFOCUS) && !@battle.moldBreaker @effects[PBEffects::Flinch] = true end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/005_Battler_StatStages.rb b/Data/Scripts/011_Battle/001_Battler/005_Battler_StatStages.rb index 761c7497a..825887863 100644 --- a/Data/Scripts/011_Battle/001_Battler/005_Battler_StatStages.rb +++ b/Data/Scripts/011_Battle/001_Battler/005_Battler_StatStages.rb @@ -307,4 +307,4 @@ class PokeBattle_Battler def pbResetStatStages PBStats.eachBattleStat { |s| @stages[s] = 0 } end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/006_Battler_AbilityAndItem.rb b/Data/Scripts/011_Battle/001_Battler/006_Battler_AbilityAndItem.rb index ed7a0403d..55b2ccab6 100644 --- a/Data/Scripts/011_Battle/001_Battler/006_Battler_AbilityAndItem.rb +++ b/Data/Scripts/011_Battle/001_Battler/006_Battler_AbilityAndItem.rb @@ -319,4 +319,4 @@ class PokeBattle_Battler pbHeldItemTriggered(@item) end end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/008_Battler_UseMove_Targeting.rb b/Data/Scripts/011_Battle/001_Battler/008_Battler_UseMove_Targeting.rb index 960f51300..cb1aa3305 100644 --- a/Data/Scripts/011_Battle/001_Battler/008_Battler_UseMove_Targeting.rb +++ b/Data/Scripts/011_Battle/001_Battler/008_Battler_UseMove_Targeting.rb @@ -190,4 +190,4 @@ class PokeBattle_Battler pbAddTarget(targets,user,choices[@battle.pbRandom(choices.length)],nearOnly) end end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb b/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb index f842a364a..6b55baecc 100644 --- a/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb +++ b/Data/Scripts/011_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb @@ -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 b0 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 diff --git a/Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb b/Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb index 32b32c07e..0515f27d9 100644 --- a/Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb +++ b/Data/Scripts/011_Battle/002_Move/007_Move_Effects_100-17F.rb @@ -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. \ No newline at end of file +# new effects. diff --git a/Data/Scripts/011_Battle/002_PBWeather.rb b/Data/Scripts/011_Battle/002_PBWeather.rb index d5482b784..e877ca395 100644 --- a/Data/Scripts/011_Battle/002_PBWeather.rb +++ b/Data/Scripts/011_Battle/002_PBWeather.rb @@ -29,4 +29,4 @@ rescue Exception if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" raise $! end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/002_PokeBattle_Battle.rb b/Data/Scripts/011_Battle/003_Battle/002_PokeBattle_Battle.rb index 3757688ca..d2befd236 100644 --- a/Data/Scripts/011_Battle/003_Battle/002_PokeBattle_Battle.rb +++ b/Data/Scripts/011_Battle/003_Battle/002_PokeBattle_Battle.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/003_Battle_StartAndEnd.rb b/Data/Scripts/011_Battle/003_Battle/003_Battle_StartAndEnd.rb index 2149baf8f..4c108afc5 100644 --- a/Data/Scripts/011_Battle/003_Battle/003_Battle_StartAndEnd.rb +++ b/Data/Scripts/011_Battle/003_Battle/003_Battle_StartAndEnd.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/004_Battle_ExpAndMoveLearning.rb b/Data/Scripts/011_Battle/003_Battle/004_Battle_ExpAndMoveLearning.rb index 1708b05a9..75e2a47fc 100644 --- a/Data/Scripts/011_Battle/003_Battle/004_Battle_ExpAndMoveLearning.rb +++ b/Data/Scripts/011_Battle/003_Battle/004_Battle_ExpAndMoveLearning.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/005_Battle_Action_AttacksPriority.rb b/Data/Scripts/011_Battle/003_Battle/005_Battle_Action_AttacksPriority.rb index c4b7f5b5b..413678d42 100644 --- a/Data/Scripts/011_Battle/003_Battle/005_Battle_Action_AttacksPriority.rb +++ b/Data/Scripts/011_Battle/003_Battle/005_Battle_Action_AttacksPriority.rb @@ -251,4 +251,4 @@ class PokeBattle_Battle end return ret end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/006_Battle_Action_Switching.rb b/Data/Scripts/011_Battle/003_Battle/006_Battle_Action_Switching.rb index 3ef5dc5b4..118cde53d 100644 --- a/Data/Scripts/011_Battle/003_Battle/006_Battle_Action_Switching.rb +++ b/Data/Scripts/011_Battle/003_Battle/006_Battle_Action_Switching.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/007_Battle_Action_UseItem.rb b/Data/Scripts/011_Battle/003_Battle/007_Battle_Action_UseItem.rb index 29ee51f57..bf51ddfb7 100644 --- a/Data/Scripts/011_Battle/003_Battle/007_Battle_Action_UseItem.rb +++ b/Data/Scripts/011_Battle/003_Battle/007_Battle_Action_UseItem.rb @@ -141,4 +141,4 @@ class PokeBattle_Battle # Return unused item to Bag pbReturnUnusedItemToBag(item,userBattler.index) end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/008_Battle_Action_Running.rb b/Data/Scripts/011_Battle/003_Battle/008_Battle_Action_Running.rb index 01ed9f073..0b9267a90 100644 --- a/Data/Scripts/011_Battle/003_Battle/008_Battle_Action_Running.rb +++ b/Data/Scripts/011_Battle/003_Battle/008_Battle_Action_Running.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/009_Battle_Action_Other.rb b/Data/Scripts/011_Battle/003_Battle/009_Battle_Action_Other.rb index 89e7f5de2..3486dad05 100644 --- a/Data/Scripts/011_Battle/003_Battle/009_Battle_Action_Other.rb +++ b/Data/Scripts/011_Battle/003_Battle/009_Battle_Action_Other.rb @@ -189,4 +189,4 @@ class PokeBattle_Battle end pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",battler.pbThis)) end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/010_Battle_Phase_Command.rb b/Data/Scripts/011_Battle/003_Battle/010_Battle_Phase_Command.rb index cebeff5fa..18d9a9074 100644 --- a/Data/Scripts/011_Battle/003_Battle/010_Battle_Phase_Command.rb +++ b/Data/Scripts/011_Battle/003_Battle/010_Battle_Phase_Command.rb @@ -247,4 +247,4 @@ class PokeBattle_Battle break if commandsEnd end end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb b/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb index d1b7e89fd..6a1c12314 100644 --- a/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb +++ b/Data/Scripts/011_Battle/003_Battle/011_Battle_Phase_Attack.rb @@ -187,4 +187,4 @@ class PokeBattle_Battle pbAttackPhaseMegaEvolution pbAttackPhaseMoves end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb b/Data/Scripts/011_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb index 04fb7e061..2effb1fe3 100644 --- a/Data/Scripts/011_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb +++ b/Data/Scripts/011_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/003_PBBattleTerrains.rb b/Data/Scripts/011_Battle/003_PBBattleTerrains.rb index 5410ae558..86b0bffa0 100644 --- a/Data/Scripts/011_Battle/003_PBBattleTerrains.rb +++ b/Data/Scripts/011_Battle/003_PBBattleTerrains.rb @@ -22,4 +22,4 @@ rescue Exception if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" raise $! end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/004_AI/001_PokeBattle_AI.rb b/Data/Scripts/011_Battle/004_AI/001_PokeBattle_AI.rb index fd206b723..34582a107 100644 --- a/Data/Scripts/011_Battle/004_AI/001_PokeBattle_AI.rb +++ b/Data/Scripts/011_Battle/004_AI/001_PokeBattle_AI.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/004_AI/002_AI_Item.rb b/Data/Scripts/011_Battle/004_AI/002_AI_Item.rb index 62c857d26..c999f2083 100644 --- a/Data/Scripts/011_Battle/004_AI/002_AI_Item.rb +++ b/Data/Scripts/011_Battle/004_AI/002_AI_Item.rb @@ -179,4 +179,4 @@ class PokeBattle_AI end return 0 end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb b/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb index 98d194863..ccd00898f 100644 --- a/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb +++ b/Data/Scripts/011_Battle/004_AI/003_AI_Switch.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb b/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb index 60a938905..d3b01d83e 100644 --- a/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb +++ b/Data/Scripts/011_Battle/004_AI/004_AI_Move.rb @@ -284,4 +284,4 @@ class PokeBattle_AI score += damagePercentage.to_i return score end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb b/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb index 4658dc36c..e02d995d8 100644 --- a/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb +++ b/Data/Scripts/011_Battle/004_AI/005_AI_Move_EffectScores.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb b/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb index 8f0b8ad8f..81ec1c8e3 100644 --- a/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb +++ b/Data/Scripts/011_Battle/004_AI/006_AI_Move_Utilities.rb @@ -1,6 +1,6 @@ class PokeBattle_AI #============================================================================= - # + # #============================================================================= def pbTargetsMultiple?(move,user) numTargets = 0 @@ -672,4 +672,4 @@ class PokeBattle_AI end end end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/004_PBTargets.rb b/Data/Scripts/011_Battle/004_PBTargets.rb index 44983d050..233ad648a 100644 --- a/Data/Scripts/011_Battle/004_PBTargets.rb +++ b/Data/Scripts/011_Battle/004_PBTargets.rb @@ -67,4 +67,4 @@ module PBTargets target==Other || target==RandomNearFoe end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/001_PokeBattle_Animation.rb b/Data/Scripts/011_Battle/005_Battle scene/001_PokeBattle_Animation.rb index a4ec2bc79..2ad6696fc 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/001_PokeBattle_Animation.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/001_PokeBattle_Animation.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb b/Data/Scripts/011_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb index 53f2fdaae..80c05fa87 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/003_PokeBattle_SceneConstants.rb b/Data/Scripts/011_Battle/005_Battle scene/003_PokeBattle_SceneConstants.rb index 59f2315f5..2f54ea687 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/003_PokeBattle_SceneConstants.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/003_PokeBattle_SceneConstants.rb @@ -60,4 +60,4 @@ module PokeBattle_SceneConstants FOCUSUSER_Y = 224 # 188 FOCUSTARGET_X = 384 # 352 FOCUSTARGET_Y = 96 # 108, 98 -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb b/Data/Scripts/011_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb index 0f35d9383..7615f0ba2 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/005_PokeBattle_SceneMenus.rb @@ -545,4 +545,4 @@ class TargetMenuDisplay < BattleMenuBase def refresh refreshButtons end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb b/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb index 1afdbc543..efe1b762d 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb b/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb index 0bc8e2fcf..62fc45412 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/007_Scene_Initialize.rb @@ -188,4 +188,4 @@ class PokeBattle_Scene shaSprite.visible = false @sprites["shadow_#{idxBattler}"] = shaSprite end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/008_Scene_Commands.rb b/Data/Scripts/011_Battle/005_Battle scene/008_Scene_Commands.rb index ecb59e9f2..1c64f9e50 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/008_Scene_Commands.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/008_Scene_Commands.rb @@ -464,4 +464,4 @@ class PokeBattle_Scene screen.pbDexEntry(species) } end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb b/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb index 36a3b381b..91b58f01e 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/009_Scene_Animations.rb @@ -539,4 +539,4 @@ class PokeBattle_Scene targetSprite.pbSetOrigin end end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/005_PBEffects.rb b/Data/Scripts/011_Battle/005_PBEffects.rb index 32b4bbfb9..bd5647851 100644 --- a/Data/Scripts/011_Battle/005_PBEffects.rb +++ b/Data/Scripts/011_Battle/005_PBEffects.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/006_Other battle types/001_PokeBattle_AnimationPlayer.rb b/Data/Scripts/011_Battle/006_Other battle types/001_PokeBattle_AnimationPlayer.rb index 5a9ba8300..1e8d59fcd 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/001_PokeBattle_AnimationPlayer.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/001_PokeBattle_AnimationPlayer.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb b/Data/Scripts/011_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb index 072e14591..4410fc529 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/002_PokeBattle_SafariZone.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/006_Other battle types/003_PokeBattle_BugContest.rb b/Data/Scripts/011_Battle/006_Other battle types/003_PokeBattle_BugContest.rb index cddc5f4a1..ab16d82fb 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/003_PokeBattle_BugContest.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/003_PokeBattle_BugContest.rb @@ -84,4 +84,4 @@ class PokeBattle_BugContestBattle < PokeBattle_Battle super @decision = 3 if @ballCount<=0 && @decision==0 end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb b/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb index b73849dd7..9ec52f8fc 100644 --- a/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb +++ b/Data/Scripts/011_Battle/006_Other battle types/004_PokeBattle_BattlePalace.rb @@ -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 = (maxpercentpkmnMove.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 } -) \ No newline at end of file +) diff --git a/Data/Scripts/011_Battle/009_PokeBall_CatchEffects.rb b/Data/Scripts/011_Battle/009_PokeBall_CatchEffects.rb index 2d020c0e7..c0c27bf86 100644 --- a/Data/Scripts/011_Battle/009_PokeBall_CatchEffects.rb +++ b/Data/Scripts/011_Battle/009_PokeBall_CatchEffects.rb @@ -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 -}) \ No newline at end of file +}) diff --git a/Data/Scripts/011_Battle/010_PokeBattle_ActiveField.rb b/Data/Scripts/011_Battle/010_PokeBattle_ActiveField.rb index 2cc398fda..505ce3e4f 100644 --- a/Data/Scripts/011_Battle/010_PokeBattle_ActiveField.rb +++ b/Data/Scripts/011_Battle/010_PokeBattle_ActiveField.rb @@ -87,4 +87,4 @@ rescue Exception if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" raise $! end -end \ No newline at end of file +end diff --git a/Data/Scripts/011_Battle/011_PokeBattle_DamageState.rb b/Data/Scripts/011_Battle/011_PokeBattle_DamageState.rb index 5cd7a63cc..f8ffdaeaa 100644 --- a/Data/Scripts/011_Battle/011_PokeBattle_DamageState.rb +++ b/Data/Scripts/011_Battle/011_PokeBattle_DamageState.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/012_Overworld/001_PBTerrain.rb b/Data/Scripts/012_Overworld/001_PBTerrain.rb index 1c93fbd7e..62ed4cc9d 100644 --- a/Data/Scripts/012_Overworld/001_PBTerrain.rb +++ b/Data/Scripts/012_Overworld/001_PBTerrain.rb @@ -90,4 +90,4 @@ module PBTerrain def self.isDoubleWildBattle?(tag) return tag==PBTerrain::TallGrass end -end \ No newline at end of file +end diff --git a/Data/Scripts/012_Overworld/002_PField_Field.rb b/Data/Scripts/012_Overworld/002_PField_Field.rb index 6fde11ba6..3007e329a 100644 --- a/Data/Scripts/012_Overworld/002_PField_Field.rb +++ b/Data/Scripts/012_Overworld/002_PField_Field.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/012_Overworld/003_PField_Visuals.rb b/Data/Scripts/012_Overworld/003_PField_Visuals.rb index 746617d49..7f0ba0b40 100644 --- a/Data/Scripts/012_Overworld/003_PField_Visuals.rb +++ b/Data/Scripts/012_Overworld/003_PField_Visuals.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/012_Overworld/004_PField_Weather.rb b/Data/Scripts/012_Overworld/004_PField_Weather.rb index 5ff118cac..ca39a0ab1 100644 --- a/Data/Scripts/012_Overworld/004_PField_Weather.rb +++ b/Data/Scripts/012_Overworld/004_PField_Weather.rb @@ -271,4 +271,4 @@ module RPG end end end -end \ No newline at end of file +end diff --git a/Data/Scripts/012_Overworld/005_PField_Metadata.rb b/Data/Scripts/012_Overworld/005_PField_Metadata.rb index 32d8e1b41..5a01e28f8 100644 --- a/Data/Scripts/012_Overworld/005_PField_Metadata.rb +++ b/Data/Scripts/012_Overworld/005_PField_Metadata.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/012_Overworld/006_PField_Battles.rb b/Data/Scripts/012_Overworld/006_PField_Battles.rb index 33a6cf6e2..6f27874fd 100644 --- a/Data/Scripts/012_Overworld/006_PField_Battles.rb +++ b/Data/Scripts/012_Overworld/006_PField_Battles.rb @@ -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)= 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 -} \ No newline at end of file +} diff --git a/Data/Scripts/012_Overworld/011_PField_FieldMoves.rb b/Data/Scripts/012_Overworld/011_PField_FieldMoves.rb index fc45d3fcd..f1658311b 100644 --- a/Data/Scripts/012_Overworld/011_PField_FieldMoves.rb +++ b/Data/Scripts/012_Overworld/011_PField_FieldMoves.rb @@ -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 -}) \ No newline at end of file +}) diff --git a/Data/Scripts/012_Overworld/012_PField_BerryPlants.rb b/Data/Scripts/012_Overworld/012_PField_BerryPlants.rb index ff427c42d..b61e38138 100644 --- a/Data/Scripts/012_Overworld/012_PField_BerryPlants.rb +++ b/Data/Scripts/012_Overworld/012_PField_BerryPlants.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/012_Overworld/013_PField_DayCare.rb b/Data/Scripts/012_Overworld/013_PField_DayCare.rb index 7a6c4fdfe..80c0c3922 100644 --- a/Data/Scripts/012_Overworld/013_PField_DayCare.rb +++ b/Data/Scripts/012_Overworld/013_PField_DayCare.rb @@ -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 -} \ No newline at end of file +} diff --git a/Data/Scripts/012_Overworld/014_PField_DependentEvents.rb b/Data/Scripts/012_Overworld/014_PField_DependentEvents.rb index b5b09306a..7e399df31 100644 --- a/Data/Scripts/012_Overworld/014_PField_DependentEvents.rb +++ b/Data/Scripts/012_Overworld/014_PField_DependentEvents.rb @@ -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 -} \ No newline at end of file +} diff --git a/Data/Scripts/012_Overworld/015_PField_Time.rb b/Data/Scripts/012_Overworld/015_PField_Time.rb index 8ca845b23..82a0897ca 100644 --- a/Data/Scripts/012_Overworld/015_PField_Time.rb +++ b/Data/Scripts/012_Overworld/015_PField_Time.rb @@ -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 \ No newline at end of file +end diff --git a/Data/Scripts/013_Trainers/001_PokeBattle_Trainer.rb b/Data/Scripts/013_Trainers/001_PokeBattle_Trainer.rb index 34a4b6fb1..6c187b441 100644 --- a/Data/Scripts/013_Trainers/001_PokeBattle_Trainer.rb +++ b/Data/Scripts/013_Trainers/001_PokeBattle_Trainer.rb @@ -41,7 +41,7 @@ class PokeBattle_Trainer fid|=rand(256)<<24 break if fid!=@id end - return fid + return fid end def setForeignID(other) @@ -268,4 +268,4 @@ class PokeBattle_Trainer @money = INITIAL_MONEY @party = [] end -end \ No newline at end of file +end diff --git a/Data/Scripts/013_Trainers/002_PTrainer_NPCTrainers.rb b/Data/Scripts/013_Trainers/002_PTrainer_NPCTrainers.rb index 053ecbc7a..343092784 100644 --- a/Data/Scripts/013_Trainers/002_PTrainer_NPCTrainers.rb +++ b/Data/Scripts/013_Trainers/002_PTrainer_NPCTrainers.rb @@ -287,7 +287,7 @@ class TrainerWalkingCharSprite < SpriteWrapper super if @animbitmap @animbitmap.update - self.bitmap = @animbitmap.bitmap + self.bitmap = @animbitmap.bitmap end @frame += 1 if @frame>=@frameskip @@ -297,4 +297,4 @@ class TrainerWalkingCharSprite < SpriteWrapper end @updating = false end -end \ No newline at end of file +end diff --git a/Data/Scripts/014_Items/001_PItem_Items.rb b/Data/Scripts/014_Items/001_PItem_Items.rb index 1100fbc12..e16d7f5b9 100644 --- a/Data/Scripts/014_Items/001_PItem_Items.rb +++ b/Data/Scripts/014_Items/001_PItem_Items.rb @@ -907,7 +907,7 @@ end #=============================================================================== def pbChooseItem(var=0,*args) ret = 0 - pbFadeOutIn { + pbFadeOutIn { scene = PokemonBag_Scene.new screen = PokemonBagScreen.new(scene,$PokemonBag) ret = screen.pbChooseItemScreen @@ -963,4 +963,4 @@ def pbChooseItemFromList(message,variable,*args) end $game_variables[variable] = itemid[ret] return itemid[ret] -end \ No newline at end of file +end diff --git a/Data/Scripts/014_Items/002_PItem_ItemEffects.rb b/Data/Scripts/014_Items/002_PItem_ItemEffects.rb index 74e907ea4..6f544747c 100644 --- a/Data/Scripts/014_Items/002_PItem_ItemEffects.rb +++ b/Data/Scripts/014_Items/002_PItem_ItemEffects.rb @@ -157,7 +157,7 @@ ItemHandlers::UseInField.add(:WHITEFLUTE,proc { |item| next 1 }) -ItemHandlers::UseInField.add(:HONEY,proc { |item| +ItemHandlers::UseInField.add(:HONEY,proc { |item| pbUseItemMessage(item) pbSweetScent next 3 @@ -228,7 +228,7 @@ ItemHandlers::UseInField.add(:BICYCLE,proc { |item| if $PokemonGlobal.bicycle pbDismountBike else - pbMountBike + pbMountBike end next 1 end @@ -296,7 +296,7 @@ ItemHandlers::UseInField.add(:ITEMFINDER,proc { |item| else # Item is nearby, face towards it direction = $game_player.direction if offsetX.abs>offsetY.abs - direction = (offsetX<0) ? 4 : 6 + direction = (offsetX<0) ? 4 : 6 else direction = (offsetY<0) ? 8 : 2 end @@ -1107,4 +1107,4 @@ ItemHandlers::UseOnPokemon.add(:ABILITYCAPSULE,proc { |item,pkmn,scene| next true end next false -}) \ No newline at end of file +}) diff --git a/Data/Scripts/014_Items/003_PItem_BattleItemEffects.rb b/Data/Scripts/014_Items/003_PItem_BattleItemEffects.rb index b50f14b14..b2ebcfd73 100644 --- a/Data/Scripts/014_Items/003_PItem_BattleItemEffects.rb +++ b/Data/Scripts/014_Items/003_PItem_BattleItemEffects.rb @@ -674,4 +674,4 @@ ItemHandlers::BattleUseOnBattler.add(:DIREHIT3,proc { |item,battler,scene| battler.effects[PBEffects::FocusEnergy] = 3 scene.pbDisplay(_INTL("{1} is getting pumped!",battler.pbThis)) battler.pokemon.changeHappiness("battleitem") -}) \ No newline at end of file +}) diff --git a/Data/Scripts/014_Items/004_PItem_Phone.rb b/Data/Scripts/014_Items/004_PItem_Phone.rb index 6ef3a30c8..c5c6f839b 100644 --- a/Data/Scripts/014_Items/004_PItem_Phone.rb +++ b/Data/Scripts/014_Items/004_PItem_Phone.rb @@ -299,4 +299,4 @@ def pbPhoneCall(call,phonenum) pbMessage(messages[i]) end pbMessage(_INTL("Click!\\wt[10]\n......\\wt[5] ......\\1")) -end \ No newline at end of file +end diff --git a/Data/Scripts/014_Items/005_PItem_PokeRadar.rb b/Data/Scripts/014_Items/005_PItem_PokeRadar.rb index f11ddb6e1..f9a20789e 100644 --- a/Data/Scripts/014_Items/005_PItem_PokeRadar.rb +++ b/Data/Scripts/014_Items/005_PItem_PokeRadar.rb @@ -153,7 +153,7 @@ end ################################################################################ EncounterModifier.register(proc { |encounter| next encounter if EncounterTypes::EnctypeCompileDens[$PokemonTemp.encounterType]!=1 - if !$PokemonEncounters.isRegularGrass? || + if !$PokemonEncounters.isRegularGrass? || !$PokemonEncounters.isEncounterPossibleHere? || $PokemonGlobal.partner pbPokeRadarCancel @@ -249,4 +249,4 @@ ItemHandlers::UseInField.add(:POKERADAR,proc { |item| ItemHandlers::UseFromBag.add(:POKERADAR,proc { |item| next (pbCanUsePokeRadar?) ? 2 : 0 -}) \ No newline at end of file +}) diff --git a/Data/Scripts/014_Items/006_PItem_Mail.rb b/Data/Scripts/014_Items/006_PItem_Mail.rb index a73d825e6..8ed08cbe3 100644 --- a/Data/Scripts/014_Items/006_PItem_Mail.rb +++ b/Data/Scripts/014_Items/006_PItem_Mail.rb @@ -114,4 +114,4 @@ def pbWriteMail(item,pkmn,pkmnid,scene) return false if scene.pbConfirm(_INTL("Stop giving the Pokémon Mail?")) end end -end \ No newline at end of file +end diff --git a/Data/Scripts/014_Items/007_PItem_Sprites.rb b/Data/Scripts/014_Items/007_PItem_Sprites.rb index b364fb247..89e764c56 100644 --- a/Data/Scripts/014_Items/007_PItem_Sprites.rb +++ b/Data/Scripts/014_Items/007_PItem_Sprites.rb @@ -155,4 +155,4 @@ class HeldItemIconSprite < SpriteWrapper self.bitmap = @animbitmap.bitmap end end -end \ No newline at end of file +end diff --git a/Data/Scripts/014_Items/008_PItem_Bag.rb b/Data/Scripts/014_Items/008_PItem_Bag.rb index fbf6c2751..eed4d3e08 100644 --- a/Data/Scripts/014_Items/008_PItem_Bag.rb +++ b/Data/Scripts/014_Items/008_PItem_Bag.rb @@ -398,4 +398,4 @@ end def pbStoreAllOrNone(*args) return $PokemonBag.pbStoreAllOrNone(*args) -end \ No newline at end of file +end diff --git a/Data/Scripts/015_Pokemon/001_PokeBattle_Pokemon.rb b/Data/Scripts/015_Pokemon/001_PokeBattle_Pokemon.rb index 31638d807..f32354d0a 100644 --- a/Data/Scripts/015_Pokemon/001_PokeBattle_Pokemon.rb +++ b/Data/Scripts/015_Pokemon/001_PokeBattle_Pokemon.rb @@ -11,7 +11,7 @@ class PokeBattle_Pokemon attr_reader :speed # Current Speed stat attr_reader :spatk # Current Special Attack stat attr_reader :spdef # Current Special Defense stat - attr_accessor :status # Status problem (PBStatuses) + attr_accessor :status # Status problem (PBStatuses) attr_accessor :statusCount # Sleep count/Toxic flag attr_accessor :abilityflag # Forces the first/second/hidden (0/1/2) ability attr_accessor :genderflag # Forces male (0) or female (1) @@ -44,7 +44,7 @@ class PokeBattle_Pokemon attr_accessor :obtainLevel # Level obtained attr_accessor :hatchedMap # Map where an egg was hatched attr_accessor :language # Language - attr_accessor :ot # Original Trainer's name + attr_accessor :ot # Original Trainer's name attr_accessor :otgender # Original Trainer's gender: # 0 - male, 1 - female, 2 - mixed, 3 - unknown # For information only, not used to verify @@ -934,4 +934,4 @@ def pbNewPkmn(species,level,owner=nil,withMoves=true) return PokeBattle_Pokemon.new(species,level,owner,withMoves) end alias pbGenPkmn pbNewPkmn -alias pbGenPoke pbNewPkmn \ No newline at end of file +alias pbGenPoke pbNewPkmn diff --git a/Data/Scripts/015_Pokemon/002_Pokemon_Forms.rb b/Data/Scripts/015_Pokemon/002_Pokemon_Forms.rb index ab7d360c4..508aac8a9 100644 --- a/Data/Scripts/015_Pokemon/002_Pokemon_Forms.rb +++ b/Data/Scripts/015_Pokemon/002_Pokemon_Forms.rb @@ -36,7 +36,7 @@ class PokeBattle_Pokemon def fSpecies return pbGetFSpeciesFromForm(@species,formSimple) end - + alias __mf_compatibleWithMove? compatibleWithMove? # Deprecated def compatibleWithMove?(move) v = MultipleForms.call("getMoveCompatibility",self) @@ -134,7 +134,7 @@ def drawSpot(bitmap,spotpattern,x,y,red,green,blue) bitmap.set_pixel(xOrg+1,yOrg,color) bitmap.set_pixel(xOrg,yOrg+1,color) bitmap.set_pixel(xOrg+1,yOrg+1,color) - end + end end end end @@ -687,4 +687,4 @@ MultipleForms.register(:PIKACHU,{ } }) -MultipleForms.copy(:PIKACHU,:EXEGGCUTE,:CUBONE) \ No newline at end of file +MultipleForms.copy(:PIKACHU,:EXEGGCUTE,:CUBONE) diff --git a/Data/Scripts/015_Pokemon/003_Pokemon_MegaEvolution.rb b/Data/Scripts/015_Pokemon/003_Pokemon_MegaEvolution.rb index 221b4013b..96a06382d 100644 --- a/Data/Scripts/015_Pokemon/003_Pokemon_MegaEvolution.rb +++ b/Data/Scripts/015_Pokemon/003_Pokemon_MegaEvolution.rb @@ -107,4 +107,4 @@ MultipleForms.register(:KYOGRE,{ next 1 if isConst?(pkmn.item,PBItems,:BLUEORB) next } -}) \ No newline at end of file +}) diff --git a/Data/Scripts/015_Pokemon/004_Pokemon_ShadowPokemon.rb b/Data/Scripts/015_Pokemon/004_Pokemon_ShadowPokemon.rb index 2e160105f..1865f72c2 100644 --- a/Data/Scripts/015_Pokemon/004_Pokemon_ShadowPokemon.rb +++ b/Data/Scripts/015_Pokemon/004_Pokemon_ShadowPokemon.rb @@ -6,7 +6,7 @@ or Resistances, while in XD the Shadow-type is Super-Effective against all other types. 2/5 - display nature -XD - Shadow Rush -- 55, 100 - Deals damage. +XD - Shadow Rush -- 55, 100 - Deals damage. Colosseum - Shadow Rush -- 90, 100 If this attack is successful, user loses half of HP lost by opponent due to this attack (recoil). If user is in Hyper Mode, this attack has a good chance for a @@ -189,7 +189,7 @@ end #=============================================================================== -# +# #=============================================================================== def pbIsPurifiable?(pkmn) return false if !pkmn @@ -660,7 +660,7 @@ end #=============================================================================== -# +# #=============================================================================== class PokemonTemp attr_accessor :heartgauges @@ -705,4 +705,4 @@ Events.onStepTaken += proc { pkmn.adjustHeart(-1) pkmn.pbUpdateShadowMoves end -} \ No newline at end of file +} diff --git a/Data/Scripts/015_Pokemon/005_Pokemon_Evolution.rb b/Data/Scripts/015_Pokemon/005_Pokemon_Evolution.rb index ecb03f611..7379c7437 100644 --- a/Data/Scripts/015_Pokemon/005_Pokemon_Evolution.rb +++ b/Data/Scripts/015_Pokemon/005_Pokemon_Evolution.rb @@ -331,4 +331,4 @@ def pbCheckEvolution(pokemon,item=0) next pbMiniCheckEvolutionItem(pokemon,evonib,level,poke,item) } end -end \ No newline at end of file +end diff --git a/Data/Scripts/015_Pokemon/006_Pokemon_Chatter.rb b/Data/Scripts/015_Pokemon/006_Pokemon_Chatter.rb index c60236779..f971de152 100644 --- a/Data/Scripts/015_Pokemon/006_Pokemon_Chatter.rb +++ b/Data/Scripts/015_Pokemon/006_Pokemon_Chatter.rb @@ -46,4 +46,4 @@ class PokeBattle_Scene Input.update end end -end \ No newline at end of file +end diff --git a/Data/Scripts/015_Pokemon/007_Pokemon_Sprites.rb b/Data/Scripts/015_Pokemon/007_Pokemon_Sprites.rb index 8f8322360..1b5a72e38 100644 --- a/Data/Scripts/015_Pokemon/007_Pokemon_Sprites.rb +++ b/Data/Scripts/015_Pokemon/007_Pokemon_Sprites.rb @@ -96,7 +96,7 @@ class PokemonIconSprite < SpriteWrapper @counter = 0 self.pokemon = pokemon @logical_x = 0 # Actual x coordinate - @logical_y = 0 # Actual y coordinate + @logical_y = 0 # Actual y coordinate @adjusted_x = 0 # Offset due to "jumping" animation in party screen @adjusted_y = 0 # Offset due to "jumping" animation in party screen end @@ -184,7 +184,7 @@ class PokemonIconSprite < SpriteWrapper return if !@animBitmap super @animBitmap.update - self.bitmap = @animBitmap.bitmap + self.bitmap = @animBitmap.bitmap # Update animation cl = self.counterLimit if cl==0 @@ -321,7 +321,7 @@ class PokemonSpeciesIconSprite < SpriteWrapper return if !@animBitmap super @animBitmap.update - self.bitmap = @animBitmap.bitmap + self.bitmap = @animBitmap.bitmap # Update animation @counter += 1 if @counter>=self.counterLimit @@ -361,4 +361,4 @@ def showShadow?(species) return true # metrics = pbLoadSpeciesMetrics # return (metrics[MetricBattlerAltitude][species] || 0)>0 -end \ No newline at end of file +end diff --git a/Data/Scripts/015_Pokemon/008_Pokemon_Storage.rb b/Data/Scripts/015_Pokemon/008_Pokemon_Storage.rb index fa78371a6..2d6f286f1 100644 --- a/Data/Scripts/015_Pokemon/008_Pokemon_Storage.rb +++ b/Data/Scripts/015_Pokemon/008_Pokemon_Storage.rb @@ -342,7 +342,7 @@ class RegionalStorage end def pbMoveCaughtToParty(pkmn) - getCurrentStorage.pbMoveCaughtToParty(pkmn) + getCurrentStorage.pbMoveCaughtToParty(pkmn) end def pbMoveCaughtToBox(pkmn,box) @@ -350,7 +350,7 @@ class RegionalStorage end def pbStoreCaught(pkmn) - getCurrentStorage.pbStoreCaught(pkmn) + getCurrentStorage.pbStoreCaught(pkmn) end def pbDelete(box,index) @@ -361,7 +361,7 @@ end #=============================================================================== -# +# #=============================================================================== def pbUnlockWallpaper(index) $PokemonStorage.unlockedWallpapers[index] = true @@ -387,4 +387,4 @@ end # Yields every Pokémon in storage in turn. def pbEachNonEggPokemon pbEachPokemon { |pkmn,box| yield(pkmn,box) if !pkmn.egg? } -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/001_PScreen_PauseMenu.rb b/Data/Scripts/016_UI/001_PScreen_PauseMenu.rb index 6045606d6..f8246d2bf 100644 --- a/Data/Scripts/016_UI/001_PScreen_PauseMenu.rb +++ b/Data/Scripts/016_UI/001_PScreen_PauseMenu.rb @@ -172,7 +172,7 @@ class PokemonPauseMenu end elsif cmdPokemon>=0 && command==cmdPokemon hiddenmove = nil - pbFadeOutIn { + pbFadeOutIn { sscene = PokemonParty_Scene.new sscreen = PokemonPartyScreen.new(sscene,$Trainer.party) hiddenmove = sscreen.pbPokemonScreen @@ -185,10 +185,10 @@ class PokemonPauseMenu end elsif cmdBag>=0 && command==cmdBag item = 0 - pbFadeOutIn { + pbFadeOutIn { scene = PokemonBag_Scene.new screen = PokemonBagScreen.new(scene,$PokemonBag) - item = screen.pbStartScreen + item = screen.pbStartScreen (item>0) ? @scene.pbEndScene : @scene.pbRefresh } if item>0 @@ -204,7 +204,7 @@ class PokemonPauseMenu @scene.pbRefresh } elsif cmdTrainer>=0 && command==cmdTrainer - pbFadeOutIn { + pbFadeOutIn { scene = PokemonTrainerCard_Scene.new screen = PokemonTrainerCardScreen.new(scene) screen.pbStartScreen @@ -274,4 +274,4 @@ class PokemonPauseMenu end @scene.pbEndScene if endscene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/002_PScreen_PokedexMenu.rb b/Data/Scripts/016_UI/002_PScreen_PokedexMenu.rb index 88dd07737..4a3a51b60 100644 --- a/Data/Scripts/016_UI/002_PScreen_PokedexMenu.rb +++ b/Data/Scripts/016_UI/002_PScreen_PokedexMenu.rb @@ -123,4 +123,4 @@ class PokemonPokedexMenuScreen end @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/003_PScreen_PokedexMain.rb b/Data/Scripts/016_UI/003_PScreen_PokedexMain.rb index 8e45cd244..765c503b9 100644 --- a/Data/Scripts/016_UI/003_PScreen_PokedexMain.rb +++ b/Data/Scripts/016_UI/003_PScreen_PokedexMain.rb @@ -1188,4 +1188,4 @@ class PokemonPokedexScreen @scene.pbPokedex @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/004_PScreen_PokedexEntry.rb b/Data/Scripts/016_UI/004_PScreen_PokedexEntry.rb index 46a616894..031434d56 100644 --- a/Data/Scripts/016_UI/004_PScreen_PokedexEntry.rb +++ b/Data/Scripts/016_UI/004_PScreen_PokedexEntry.rb @@ -583,4 +583,4 @@ class PokemonPokedexInfoScreen @scene.pbSceneBrief @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/005_PScreen_Party.rb b/Data/Scripts/016_UI/005_PScreen_Party.rb index 739c89613..0639afada 100644 --- a/Data/Scripts/016_UI/005_PScreen_Party.rb +++ b/Data/Scripts/016_UI/005_PScreen_Party.rb @@ -602,7 +602,7 @@ class PokemonParty_Scene self.update end end - + def pbSwitchEnd(oldid,newid) pbSEPlay("GUI party switch") oldsprite = @sprites["pokemon#{oldid}"] @@ -719,7 +719,7 @@ class PokemonParty_Scene end def pbChangeSelection(key,currentsel) - numsprites = (@multiselect) ? 8 : 7 + numsprites = (@multiselect) ? 8 : 7 case key when Input::LEFT begin @@ -792,7 +792,7 @@ class PokemonParty_Scene def pbRefresh for i in 0...6 sprite = @sprites["pokemon#{i}"] - if sprite + if sprite if sprite.is_a?(PokemonPartyPanel) sprite.pokemon = sprite.pokemon else @@ -804,7 +804,7 @@ class PokemonParty_Scene def pbRefreshSingle(i) sprite = @sprites["pokemon#{i}"] - if sprite + if sprite if sprite.is_a?(PokemonPartyPanel) sprite.pokemon = sprite.pokemon else @@ -1323,7 +1323,7 @@ class PokemonPartyScreen end @scene.pbEndScene return nil - end + end end @@ -1334,4 +1334,4 @@ def pbPokemonScreen sscreen = PokemonPartyScreen.new(sscene,$Trainer.party) sscreen.pbPokemonScreen } -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/006_PScreen_Summary.rb b/Data/Scripts/016_UI/006_PScreen_Summary.rb index 02e0e435f..f2b6f32f8 100644 --- a/Data/Scripts/016_UI/006_PScreen_Summary.rb +++ b/Data/Scripts/016_UI/006_PScreen_Summary.rb @@ -1352,4 +1352,4 @@ class PokemonSummaryScreen @scene.pbEndScene return ret end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/007_PScreen_Bag.rb b/Data/Scripts/016_UI/007_PScreen_Bag.rb index 9ca269114..f054aee68 100644 --- a/Data/Scripts/016_UI/007_PScreen_Bag.rb +++ b/Data/Scripts/016_UI/007_PScreen_Bag.rb @@ -317,7 +317,7 @@ class PokemonBag_Scene # Set the selected item's icon @sprites["itemicon"].item = itemlist.item # Set the selected item's description - @sprites["itemtext"].text = (itemlist.item==0) ? _INTL("Close bag.") : + @sprites["itemtext"].text = (itemlist.item==0) ? _INTL("Close bag.") : pbGetMessage(MessageTypes::ItemDescriptions,itemlist.item) end @@ -520,7 +520,7 @@ class PokemonBagScreen qty.times { @bag.pbDeleteItem(item) } @scene.pbRefresh end - end + end elsif cmdRegister>=0 && command==cmdRegister # Register item if @bag.pbIsRegistered?(item) @bag.pbUnregisterItem(item) @@ -713,4 +713,4 @@ class PokemonBagScreen end @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/008_PScreen_Pokegear.rb b/Data/Scripts/016_UI/008_PScreen_Pokegear.rb index eabd7c1d2..f7f188104 100644 --- a/Data/Scripts/016_UI/008_PScreen_Pokegear.rb +++ b/Data/Scripts/016_UI/008_PScreen_Pokegear.rb @@ -149,4 +149,4 @@ class PokemonPokegearScreen end @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/009_PScreen_RegionMap.rb b/Data/Scripts/016_UI/009_PScreen_RegionMap.rb index 2f5ede21c..ce0850b60 100644 --- a/Data/Scripts/016_UI/009_PScreen_RegionMap.rb +++ b/Data/Scripts/016_UI/009_PScreen_RegionMap.rb @@ -357,9 +357,9 @@ end def pbShowMap(region=-1,wallmap=true) - pbFadeOutIn { + pbFadeOutIn { scene = PokemonRegionMap_Scene.new(region,wallmap) screen = PokemonRegionMapScreen.new(scene) screen.pbStartScreen } -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/010_PScreen_Phone.rb b/Data/Scripts/016_UI/010_PScreen_Phone.rb index 9041e40a7..1e23957c9 100644 --- a/Data/Scripts/016_UI/010_PScreen_Phone.rb +++ b/Data/Scripts/016_UI/010_PScreen_Phone.rb @@ -145,4 +145,4 @@ class PokemonPhoneScene pbDisposeSpriteHash(@sprites) @viewport.dispose end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/011_PScreen_Jukebox.rb b/Data/Scripts/016_UI/011_PScreen_Jukebox.rb index 2c07f7c5b..3310995e0 100644 --- a/Data/Scripts/016_UI/011_PScreen_Jukebox.rb +++ b/Data/Scripts/016_UI/011_PScreen_Jukebox.rb @@ -129,4 +129,4 @@ class PokemonJukeboxScreen end @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/012_PScreen_TrainerCard.rb b/Data/Scripts/016_UI/012_PScreen_TrainerCard.rb index 7a52f6fe9..4c3b6d03e 100644 --- a/Data/Scripts/016_UI/012_PScreen_TrainerCard.rb +++ b/Data/Scripts/016_UI/012_PScreen_TrainerCard.rb @@ -85,7 +85,7 @@ class PokemonTrainerCard_Scene pbPlayCloseMenuSE break end - end + end end def pbEndScene @@ -107,4 +107,4 @@ class PokemonTrainerCardScreen @scene.pbTrainerCard @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/015_PScreen_Options.rb b/Data/Scripts/016_UI/015_PScreen_Options.rb index e33e06159..514db5c33 100644 --- a/Data/Scripts/016_UI/015_PScreen_Options.rb +++ b/Data/Scripts/016_UI/015_PScreen_Options.rb @@ -178,7 +178,7 @@ class EnumOption attr_reader :values attr_reader :name - def initialize(name,options,getProc,setProc) + def initialize(name,options,getProc,setProc) @name = name @values = options @getProc = getProc @@ -205,7 +205,7 @@ class EnumOption2 attr_reader :values attr_reader :name - def initialize(name,options,getProc,setProc) + def initialize(name,options,getProc,setProc) @name = name @values = options @getProc = getProc @@ -465,8 +465,8 @@ class PokemonOption_Scene EnumOption.new(_INTL("Text Speed"),[_INTL("Slow"),_INTL("Normal"),_INTL("Fast")], proc { $PokemonSystem.textspeed }, proc { |value| - $PokemonSystem.textspeed = value - MessageConfig.pbSetTextSpeed(pbSettingToTextSpeed(value)) + $PokemonSystem.textspeed = value + MessageConfig.pbSetTextSpeed(pbSettingToTextSpeed(value)) } ), EnumOption.new(_INTL("Battle Effects"),[_INTL("On"),_INTL("Off")], @@ -488,7 +488,7 @@ class PokemonOption_Scene ), NumberOption.new(_INTL("Speech Frame"),1,$SpeechFrames.length, proc { $PokemonSystem.textskin }, - proc { |value| + proc { |value| $PokemonSystem.textskin = value MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/"+$SpeechFrames[value]) } @@ -497,7 +497,7 @@ class PokemonOption_Scene proc { $PokemonSystem.frame }, proc { |value| $PokemonSystem.frame = value - MessageConfig.pbSetSystemFrame($TextFrames[value]) + MessageConfig.pbSetSystemFrame($TextFrames[value]) } ), EnumOption.new(_INTL("Font Style"),[_INTL("Em"),_INTL("R/S"),_INTL("FRLG"),_INTL("DP")], @@ -621,4 +621,4 @@ class PokemonOptionScreen @scene.pbOptions @scene.pbEndScene end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/016_PScreen_ReadyMenu.rb b/Data/Scripts/016_UI/016_PScreen_ReadyMenu.rb index 36f10f252..4d59d7e97 100644 --- a/Data/Scripts/016_UI/016_PScreen_ReadyMenu.rb +++ b/Data/Scripts/016_UI/016_PScreen_ReadyMenu.rb @@ -320,8 +320,8 @@ def pbUseKeyItem $game_temp.in_menu = true $game_map.update sscene = PokemonReadyMenu_Scene.new - sscreen = PokemonReadyMenu.new(sscene) + sscreen = PokemonReadyMenu.new(sscene) sscreen.pbStartReadyMenu(realmoves,realitems) $game_temp.in_menu = false end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/017_PScreen_PokemonStorage.rb b/Data/Scripts/016_UI/017_PScreen_PokemonStorage.rb index 8902eb783..387fc23f5 100644 --- a/Data/Scripts/016_UI/017_PScreen_PokemonStorage.rb +++ b/Data/Scripts/016_UI/017_PScreen_PokemonStorage.rb @@ -538,7 +538,7 @@ class PokemonBoxPartySprite < SpriteWrapper pbDrawTextPositions(self.bitmap,[ [_INTL("Back"),86,242,2,Color.new(248,248,248),Color.new(80,80,80),1] ]) - + xvalues = [18,90,18,90,18,90] yvalues = [2,18,66,82,130,146] for j in 0...6 @@ -632,7 +632,7 @@ class PokemonStorageScene end def pbCloseBox - pbFadeOutAndHide(@sprites) + pbFadeOutAndHide(@sprites) pbDisposeSpriteHash(@sprites) @markingbitmap.dispose if @markingbitmap @boxviewport.dispose @@ -868,11 +868,11 @@ class PokemonStorageScene @selection = selection if selection>=0 return [@storage.currentBox,selection] - elsif selection==-1 # Box name + elsif selection==-1 # Box name return [-4,-1] - elsif selection==-2 # Party Pokémon + elsif selection==-2 # Party Pokémon return [-2,-1] - elsif selection==-3 # Close Box + elsif selection==-3 # Close Box return [-3,-1] end end @@ -947,7 +947,7 @@ class PokemonStorageScene if selection>=0 && selection<6 @selection = selection return selection - elsif selection==6 # Close Box + elsif selection==6 # Close Box @selection = selection return (depositing) ? -3 : -1 end @@ -1365,7 +1365,7 @@ class PokemonStorageScene @sprites["boxparty"] = PokemonBoxPartySprite.new(@storage.party,@boxsidesviewport) @sprites["boxparty"].y = oldPartyY end - + def drawMarkings(bitmap,x,y,width,height,markings) markrect = Rect.new(0,0,16,16) for i in 0...8 @@ -1692,7 +1692,7 @@ class PokemonStorageScreen index = selected[1] if box!=-1 raise _INTL("Can't deposit from box...") - end + end if pbAbleCount<=1 && pbAble?(@storage[box,index]) && !heldpoke pbPlayBuzzerSE pbDisplay(_INTL("That's your last Pokémon!")) @@ -1740,7 +1740,7 @@ class PokemonStorageScreen end @scene.pbHold(selected) @heldpkmn = @storage[box,index] - @storage.pbDelete(box,index) + @storage.pbDelete(box,index) @scene.pbRefresh end @@ -1974,4 +1974,4 @@ class PokemonStorageScreen @scene.pbCloseBox return retval end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/018_PScreen_ItemStorage.rb b/Data/Scripts/016_UI/018_PScreen_ItemStorage.rb index acacb614b..483f3da36 100644 --- a/Data/Scripts/016_UI/018_PScreen_ItemStorage.rb +++ b/Data/Scripts/016_UI/018_PScreen_ItemStorage.rb @@ -86,7 +86,7 @@ class ItemStorage_Scene @sprites["pocketwindow"].x = 14 @sprites["pocketwindow"].y = 16 pbSetNarrowFont(@sprites["pocketwindow"].bitmap) - # Item description + # Item description @sprites["itemtextwindow"] = Window_UnformattedTextPokemon.newWithSize("",84,270,Graphics.width-84,128,@viewport) @sprites["itemtextwindow"].baseColor = ITEMTEXTBASECOLOR @sprites["itemtextwindow"].shadowColor = ITEMTEXTSHADOWCOLOR @@ -362,4 +362,4 @@ module UIHelper helpwindow.visible = oldvisible return ret end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/019_PScreen_PC.rb b/Data/Scripts/016_UI/019_PScreen_PC.rb index 7ffbd0249..703fa120e 100644 --- a/Data/Scripts/016_UI/019_PScreen_PC.rb +++ b/Data/Scripts/016_UI/019_PScreen_PC.rb @@ -256,4 +256,4 @@ end PokemonPCList.registerPC(StorageSystemPC.new) -PokemonPCList.registerPC(TrainerPC.new) \ No newline at end of file +PokemonPCList.registerPC(TrainerPC.new) diff --git a/Data/Scripts/016_UI/020_PScreen_EggHatching.rb b/Data/Scripts/016_UI/020_PScreen_EggHatching.rb index 38c364ba4..0d85e1619 100644 --- a/Data/Scripts/016_UI/020_PScreen_EggHatching.rb +++ b/Data/Scripts/016_UI/020_PScreen_EggHatching.rb @@ -156,7 +156,7 @@ class PokemonEggHatch_Scene Input.update self.update end - end + end def update pbUpdateSpriteHash(@sprites) @@ -231,4 +231,4 @@ Events.onStepTaken += proc { |sender,e| pbHatch(egg) end end -} \ No newline at end of file +} diff --git a/Data/Scripts/016_UI/021_PScreen_Evolution.rb b/Data/Scripts/016_UI/021_PScreen_Evolution.rb index 355777e7c..bff2e78d5 100644 --- a/Data/Scripts/016_UI/021_PScreen_Evolution.rb +++ b/Data/Scripts/016_UI/021_PScreen_Evolution.rb @@ -365,7 +365,7 @@ class PokemonEvolutionScene alphaDiff = 10*20/Graphics.frame_rate loop do sprite.color.red = 255 - sprite.color.green = 255 + sprite.color.green = 255 sprite.color.blue = 255 sprite.color.alpha = alpha sprite.color = sprite.color @@ -383,7 +383,7 @@ class PokemonEvolutionScene for j in 0...currenttempo if alpha<255 sprite.color.red = 255 - sprite.color.green = 255 + sprite.color.green = 255 sprite.color.blue = 255 sprite.color.alpha = alpha sprite.color = sprite.color @@ -485,7 +485,7 @@ class PokemonEvolutionScene break if tone<=0 end end - + def pbStartScreen(pokemon,newspecies) @pokemon = pokemon @newspecies = newspecies @@ -642,4 +642,4 @@ class PokemonEvolutionScene $Trainer.owned[createSpecies] = true pbSeenForm(newpokemon) end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/022_PScreen_Trading.rb b/Data/Scripts/016_UI/022_PScreen_Trading.rb index 930fa603c..f961e3086 100644 --- a/Data/Scripts/016_UI/022_PScreen_Trading.rb +++ b/Data/Scripts/016_UI/022_PScreen_Trading.rb @@ -245,4 +245,4 @@ def pbTradeCheckEvolution(pokemon,pokemon2) next -1 } return ret -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/023_PScreen_MoveRelearner.rb b/Data/Scripts/016_UI/023_PScreen_MoveRelearner.rb index 26072583c..90a6d0973 100644 --- a/Data/Scripts/016_UI/023_PScreen_MoveRelearner.rb +++ b/Data/Scripts/016_UI/023_PScreen_MoveRelearner.rb @@ -222,4 +222,4 @@ def pbRelearnMoveScreen(pokemon) retval = screen.pbStartScreen(pokemon) } return retval -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/024_PScreen_PurifyChamber.rb b/Data/Scripts/016_UI/024_PScreen_PurifyChamber.rb index 6a72b6345..bf6ee56af 100644 --- a/Data/Scripts/016_UI/024_PScreen_PurifyChamber.rb +++ b/Data/Scripts/016_UI/024_PScreen_PurifyChamber.rb @@ -11,12 +11,12 @@ class PurifyChamberSet end def initialize - @list=[] + @list=[] @facing=0 end def facing=(value) - if value>=0 && value<@list.length + if value>=0 && value<@list.length @facing=value end end @@ -46,7 +46,7 @@ Boosted based on number of best circles def shadowAffinity return 0 if @facing<0 || @facing>=@list.length || !@shadow - return (PurifyChamberSet.isSuperEffective(@shadow,@list[@facing])) ? 2 : 1 + return (PurifyChamberSet.isSuperEffective(@shadow,@list[@facing])) ? 2 : 1 end def affinity(i) @@ -89,7 +89,7 @@ Boosted based on number of best circles @list[index]=value @list.compact! @facing=[[@facing,@list.length-1].min,0].max - end + end end # Purify Chamber treats Normal/Normal matchup as super effective @@ -112,7 +112,7 @@ class PurifyChamber # German: der Kryptorbis def self.maximumTempo() # Calculates the maximum possible tempo x=SETSIZE+1 - return ((x*x+x)/2)-1 + return ((x*x+x)/2)-1 end def initialize @@ -352,7 +352,7 @@ module PurifyChamberHelper chamber.insertAfter(chamber.currentSet,position/2,value) end end - end + end end @@ -375,7 +375,7 @@ class PurifyChamberScreen if pkmn.egg? @scene.pbDisplay(_INTL("Can't place an egg there.")) return false - end + end if (position==0) if pkmn.shadowPokemon? # Remove from storage and place in set @@ -596,11 +596,11 @@ class PurifyChamberScreen pbStorePokemon(@chamber[set].shadow) @chamber.setShadow(set,nil) # Remove shadow Pokemon from set if (i+1)!=purifiables.length - @scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!")) + @scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!")) if !@scene.pbConfirm("Would you like to switch sets?") @scene.pbCloseSet() break - end + end end @scene.pbCloseSet() end @@ -725,7 +725,7 @@ class DirectFlowDiagram @points[j]=BitmapSprite.new(8,8,@viewport) @points[j].bitmap.fill_rect(0,0,8,8,Color.new(0,0,0)) end - @points[j].tone=(@strength==2) ? Tone.new(232,232,248) : + @points[j].tone=(@strength==2) ? Tone.new(232,232,248) : Tone.new(16,16,232) @points[j].visible=(@strength!=0) end @@ -798,7 +798,7 @@ class FlowDiagram @points[j]=BitmapSprite.new(8,8,@viewport) @points[j].bitmap.fill_rect(0,0,8,8,Color.new(0,0,0)) end - @points[j].tone=(@strength==2) ? Tone.new(232,232,248) : + @points[j].tone=(@strength==2) ? Tone.new(232,232,248) : Tone.new(16,16,232) @points[j].visible=(@strength!=0) end @@ -909,7 +909,7 @@ class PurifyChamberSetView < SpriteWrapper if @chamber.setCount(@set)==PurifyChamber::SETSIZE points=[points/2,1].max pos/=2 - end + end seg=pos*8/points if seg==7 || seg==0 pos-=1 if button==Input::LEFT @@ -1312,4 +1312,4 @@ class PurifyChamberScene pbFadeInAndShow(@sprites,visible) return pos end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/025_PScreen_Mart.rb b/Data/Scripts/016_UI/025_PScreen_Mart.rb index ab75831c5..a20c85cef 100644 --- a/Data/Scripts/016_UI/025_PScreen_Mart.rb +++ b/Data/Scripts/016_UI/025_PScreen_Mart.rb @@ -387,7 +387,7 @@ class PokemonMart_Scene def pbStartBuyScene(stock,adapter) pbStartBuyOrSellScene(true,stock,adapter) end - + def pbStartSellScene(bag,adapter) if $PokemonBag pbStartSellScene2(bag,adapter) @@ -622,7 +622,7 @@ class PokemonMart_Scene pbPlayCancelSE() ret=0 break - end + end end } } @@ -740,7 +740,7 @@ class PokemonMartScreen raise _INTL("Failed to delete stored items") end end - pbDisplayPaused(_INTL("You have no more room in the Bag.")) + pbDisplayPaused(_INTL("You have no more room in the Bag.")) else @adapter.setMoney(@adapter.getMoney-price) for i in 0...@stock.length @@ -753,7 +753,7 @@ class PokemonMartScreen if $PokemonBag if quantity>=10 && pbIsPokeBall?(item) && hasConst?(PBItems,:PREMIERBALL) if @adapter.addItem(getConst(PBItems,:PREMIERBALL)) - pbDisplayPaused(_INTL("I'll throw in a Premier Ball, too.")) + pbDisplayPaused(_INTL("I'll throw in a Premier Ball, too.")) end end end @@ -929,4 +929,4 @@ class Game_Interpreter end end end -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/026_PScreen_MysteryGift.rb b/Data/Scripts/016_UI/026_PScreen_MysteryGift.rb index 29c7927f9..7869ccf42 100644 --- a/Data/Scripts/016_UI/026_PScreen_MysteryGift.rb +++ b/Data/Scripts/016_UI/026_PScreen_MysteryGift.rb @@ -153,7 +153,7 @@ def pbManageMysteryGifts # Download all gifts from online msgwindow=pbCreateMessageWindow pbMessageDisplay(msgwindow,_INTL("Searching for online gifts...\\wtnp[0]")) - online=pbDownloadToString(MYSTERY_GIFT_URL) + online=pbDownloadToString(MYSTERY_GIFT_URL) pbDisposeMessageWindow(msgwindow) if online=="" pbMessage(_INTL("No online Mystery Gifts found.\\wtnp[20]")) @@ -424,4 +424,4 @@ def pbReceiveMysteryGift(id) end end return false -end \ No newline at end of file +end diff --git a/Data/Scripts/016_UI/027_PScreen_HallOfFame.rb b/Data/Scripts/016_UI/027_PScreen_HallOfFame.rb index 5461962cc..1d07bd7f4 100644 --- a/Data/Scripts/016_UI/027_PScreen_HallOfFame.rb +++ b/Data/Scripts/016_UI/027_PScreen_HallOfFame.rb @@ -7,12 +7,12 @@ # #=============================================================================== # -# To this scripts works, put it above main, put a 512x384 picture in +# To this scripts works, put it above main, put a 512x384 picture in # hallfamebars and a 8x24 background picture in hallfamebg. To call this script, # use 'pbHallOfFameEntry'. After you recorder the first entry, you can access # the hall teams using a PC. You can also check the player Hall of Fame last # number using '$PokemonGlobal.hallOfFameLastNumber'. -# +# #=============================================================================== class HallOfFame_Scene # When true, all pokémon will be in one line @@ -24,7 +24,7 @@ class HallOfFame_Scene ANIMATIONSPEED = 32 # Entry wait time (in 1/20 seconds) between showing each Pokémon (and trainer) ENTRYWAITTIME = 64 - # Maximum number limit of simultaneous hall entries saved. + # Maximum number limit of simultaneous hall entries saved. # 0 = Doesn't save any hall. -1 = no limit # Prefer to use larger numbers (like 500 and 1000) than don't put a limit # If a player exceed this limit, the first one will be removed @@ -90,7 +90,7 @@ class HallOfFame_Scene def slowFadeOut(sprites,exponent) # 2 exponent # To handle values above 8 - extraWaitExponent=exponent-9 + extraWaitExponent=exponent-9 exponent=8 if 8-1 && + $PokemonGlobal.hallOfFame.delete_at(0) if HALLLIMIT>-1 && $PokemonGlobal.hallOfFame.size>HALLLIMIT end @@ -141,7 +141,7 @@ class HallOfFame_Scene else ret=(60*(battlernumber/2)+48)*(xpositionformula(battlernumber)-1) ret+=Graphics.width/2-56 - end + end return ret end @@ -151,7 +151,7 @@ class HallOfFame_Scene ret=32+128*ypositionformula(battlernumber)/2 else ret=96-8*(battlernumber/2) - end + end return ret end @@ -162,7 +162,7 @@ class HallOfFame_Scene ret=(battlernumber/3%2==0) ? (19-battlernumber)%3 : (19+battlernumber)%3 else ret=battlernumber%2*2 - end + end return ret end @@ -172,9 +172,9 @@ class HallOfFame_Scene ret=(battlernumber/3)%2*2 else ret=1 - end + end return ret - end + end def moveSprite(i) spritename=(i>-1) ? "pokemon#{i}" : "trainer" @@ -202,7 +202,7 @@ class HallOfFame_Scene for i in 0...6 # Clear all 6 pokémon sprites and dispose the ones that exists every time # that this method is call - restartSpritePosition(@sprites,"pokemon#{i}") + restartSpritePosition(@sprites,"pokemon#{i}") next if i>=@hallEntry.size xpoint=xpointformula(i) ypoint=ypointformula(i) @@ -288,11 +288,11 @@ class HallOfFame_Scene @sprites["msgwindow"]=pbCreateMessageWindow(@viewport) pbMessageDisplay(@sprites["msgwindow"], _INTL("League champion!\nCongratulations!\\^")) - end + end def writePokemonData(pokemon,hallNumber=-1) overlay=@sprites["overlay"].bitmap - overlay.clear + overlay.clear pokename=pokemon.name speciesname=PBSpecies.getName(pokemon.species) if pokemon.male? @@ -315,7 +315,7 @@ class HallOfFame_Scene if (hallNumber>-1) textPositions.push([_INTL("Hall of Fame No."),Graphics.width/2-104,0,0,BASECOLOR,SHADOWCOLOR]) textPositions.push([hallNumber.to_s,Graphics.width/2+104,0,1,BASECOLOR,SHADOWCOLOR]) - end + end pbDrawTextPositions(overlay,textPositions) end @@ -371,7 +371,7 @@ class HallOfFame_Scene else @battlerIndex+=1 if @battlerIndex<=@hallEntry.size - # If it is a pokémon, write the pokémon text, wait the + # If it is a pokémon, write the pokémon text, wait the # ENTRYWAITTIME and goes to the next battler pbPlayCry(@hallEntry[@battlerIndex-1]) writePokemonData(@hallEntry[@battlerIndex-1]) @@ -395,7 +395,7 @@ class HallOfFame_Scene createTrainerBattler end end - end + end elsif @battlerIndex>@hallEntry.size # Write the trainer data and fade writeTrainerData @@ -406,7 +406,7 @@ class HallOfFame_Scene end fadeSpeed=((Math.log(2**12)-Math.log(FINALFADESPEED))/Math.log(2)).floor pbBGMFade((2**fadeSpeed).to_f/20) if @useMusic - slowFadeOut(@sprites,fadeSpeed) { pbUpdate } + slowFadeOut(@sprites,fadeSpeed) { pbUpdate } @alreadyFadedInEnd=true @battlerIndex+=1 end @@ -508,4 +508,4 @@ def pbHallOfFamePC scene=HallOfFame_Scene.new screen=HallOfFameScreen.new(scene) screen.pbStartScreenPC -end \ No newline at end of file +end diff --git a/Data/Scripts/017_Other battles/001_PBattle_Safari.rb b/Data/Scripts/017_Other battles/001_PBattle_Safari.rb index 9d3a94f25..78a359e39 100644 --- a/Data/Scripts/017_Other battles/001_PBattle_Safari.rb +++ b/Data/Scripts/017_Other battles/001_PBattle_Safari.rb @@ -78,7 +78,7 @@ Events.onStepTakenTransferPossible += proc { |sender,e| if pbInSafari? && pbSafariState.decision==0 && SAFARI_STEPS>0 pbSafariState.steps -= 1 if pbSafariState.steps<=0 - pbMessage(_INTL("PA: Ding-dong!\1")) + pbMessage(_INTL("PA: Ding-dong!\1")) pbMessage(_INTL("PA: Your safari game is over!")) pbSafariState.decision = 1 pbSafariState.pbGoToStart @@ -110,7 +110,7 @@ def pbSafariBattle(species,level) pbPrepareBattle(battle) # Perform the battle itself decision = 0 - pbBattleAnimation(pbGetWildBattleBGM(foeParty),0,foeParty) { + pbBattleAnimation(pbGetWildBattleBGM(foeParty),0,foeParty) { pbSceneStandby { decision = battle.pbStartBattle } @@ -120,7 +120,7 @@ def pbSafariBattle(species,level) pbSafariState.ballcount = battle.ballCount if pbSafariState.ballcount<=0 if decision!=2 # Last Safari Ball was used to catch the wild Pokémon - pbMessage(_INTL("Announcer: You're out of Safari Balls! Game over!")) + pbMessage(_INTL("Announcer: You're out of Safari Balls! Game over!")) end pbSafariState.decision = 1 pbSafariState.pbGoToStart @@ -135,4 +135,4 @@ def pbSafariBattle(species,level) Events.onWildBattleEnd.trigger(nil,species,level,decision) # Return the outcome of the battle return decision -end \ No newline at end of file +end diff --git a/Data/Scripts/017_Other battles/002_PBattle_BugContest.rb b/Data/Scripts/017_Other battles/002_PBattle_BugContest.rb index 4931f3e36..a872f92c5 100644 --- a/Data/Scripts/017_Other battles/002_PBattle_BugContest.rb +++ b/Data/Scripts/017_Other battles/002_PBattle_BugContest.rb @@ -206,7 +206,7 @@ class BugContestState for poke in @otherparty $Trainer.party.push(poke) end - if !interrupted + if !interrupted if @lastPokemon pbNicknameAndStore(@lastPokemon) end @@ -374,7 +374,7 @@ def pbBugContestBattle(species,level) pbPrepareBattle(battle) # Perform the battle itself decision = 0 - pbBattleAnimation(pbGetWildBattleBGM(foeParty),0,foeParty) { + pbBattleAnimation(pbGetWildBattleBGM(foeParty),0,foeParty) { decision = battle.pbStartBattle pbAfterBattle(decision,true) if decision==2 || decision==5 # Lost or drew @@ -402,4 +402,4 @@ def pbBugContestBattle(species,level) Events.onWildBattleEnd.trigger(nil,species,level,decision) # Return false if the player lost or drew the battle, and true if any other result return (decision!=2 && decision!=5) -end \ No newline at end of file +end diff --git a/Data/Scripts/017_Other battles/003_PBattle_OrgBattle.rb b/Data/Scripts/017_Other battles/003_PBattle_OrgBattle.rb index 3f211de08..e7e11bfdb 100644 --- a/Data/Scripts/017_Other battles/003_PBattle_OrgBattle.rb +++ b/Data/Scripts/017_Other battles/003_PBattle_OrgBattle.rb @@ -25,7 +25,7 @@ class PBPokemon @move2=move2 ? move2 : 0 @move3=move3 ? move3 : 0 @move4=move4 ? move4 : 0 - @ev=ev + @ev=ev end =begin @@ -378,7 +378,7 @@ class BattleChallengeData $game_map.need_refresh=true if save pbSave(true) - end + end end def pbGoOn @@ -445,7 +445,7 @@ class BattleChallenge self.data.numPokemon, self.data.battletype,self.data.mode) end - return @rules + return @rules end def modeToRules(doublebattle,numPokemon,battletype,mode) @@ -466,7 +466,7 @@ class BattleChallenge rules.setLevelAdjustment(OpenLevelAdjustment.new(60)) else rules.setRuleset(StandardRules(numPokemon,50)) - rules.setLevelAdjustment(OpenLevelAdjustment.new(50)) + rules.setLevelAdjustment(OpenLevelAdjustment.new(50)) end if doublebattle rules.addBattleRule(DoubleBattle.new) @@ -547,7 +547,7 @@ class BattleChallenge def pbBattle return @bc.extraData.pbBattle(self) if @bc.extraData opponent=pbGenerateBattleTrainer(self.nextTrainer,self.rules) - bttrainers=pbGetBTTrainers(@id) + bttrainers=pbGetBTTrainers(@id) trainerdata=bttrainers[self.nextTrainer] ret=pbOrganizedBattleEx(opponent,self.rules, pbGetMessageFromHash(MessageTypes::EndSpeechLose,trainerdata[4]), @@ -620,7 +620,7 @@ def pbPlayBattle(battledata) battleplayer = PokeBattle_BattleArenaPlayer.new(scene,lastbattle) end bgm = BattlePlayerHelper.pbGetBattleBGM(lastbattle) - pbBattleAnimation(bgm) { + pbBattleAnimation(bgm) { pbSceneStandby { decision = battleplayer.pbStartBattle } @@ -950,7 +950,7 @@ def pbOrganizedBattleEx(opponent,challengedata,endspeech,endspeechwin) pbPrepareBattle(battle) # Perform the battle itself decision = 0 - pbBattleAnimation(pbGetTrainerBattleBGM(opponent)) { + pbBattleAnimation(pbGetTrainerBattleBGM(opponent)) { pbSceneStandby{ decision = battle.pbStartBattle } @@ -982,4 +982,4 @@ end def pbIsBanned?(pokemon) return StandardSpeciesRestriction.new.isValid?(pokemon) -end \ No newline at end of file +end diff --git a/Data/Scripts/017_Other battles/004_PBattle_OrgBattleRules.rb b/Data/Scripts/017_Other battles/004_PBattle_OrgBattleRules.rb index dbdd8e61f..4fd018f63 100644 --- a/Data/Scripts/017_Other battles/004_PBattle_OrgBattleRules.rb +++ b/Data/Scripts/017_Other battles/004_PBattle_OrgBattleRules.rb @@ -152,14 +152,14 @@ class CombinedLevelAdjustment < LevelAdjustment @my=my @their=their end - + def getMyAdjustment(myTeam,theirTeam) - return @my ? @my.getAdjustment(myTeam,theirTeam) : - LevelAdjustment.getNullAdjustment(myTeam,theirTeam) + return @my ? @my.getAdjustment(myTeam,theirTeam) : + LevelAdjustment.getNullAdjustment(myTeam,theirTeam) end def getTheirAdjustment(theirTeam,myTeam) - return @their ? @their.getAdjustment(theirTeam,myTeam) : + return @their ? @their.getAdjustment(theirTeam,myTeam) : LevelAdjustment.getNullAdjustment(theirTeam,myTeam) end end @@ -290,7 +290,7 @@ class SpeciesRestriction for s in specieslist return true if isConst?(species,PBSpecies,s) end - return false + return false end def isValid?(pokemon) @@ -313,7 +313,7 @@ class BannedSpeciesRestriction for s in specieslist return true if isConst?(species,PBSpecies,s) end - return false + return false end def isValid?(pokemon) @@ -336,7 +336,7 @@ class BannedItemRestriction for s in specieslist return true if isConst?(species,PBItems,s) end - return false + return false end def isValid?(pokemon) @@ -360,7 +360,7 @@ class RestrictedSpeciesRestriction for s in specieslist return true if isConst?(species,PBSpecies,s) end - return false + return false end def isValid?(team) @@ -426,8 +426,8 @@ end module LevelRestriction; end - - + + class MinimumLevelRestriction attr_reader :level @@ -650,7 +650,7 @@ module NicknameChecker def check(name,species) name=name.upcase return true if name==getName(species) - if @@names.values.include?(name) + if @@names.values.include?(name) return false end for i in @@namesMaxValue..PBSpecies.maxValue @@ -774,7 +774,7 @@ class PokemonRuleSet end # This rule checks - # - the entire team to determine whether a subset of the team meets the rule, or + # - the entire team to determine whether a subset of the team meets the rule, or # - a list of Pokemon whose length is equal to the suggested number. For an # entire team, the condition must hold for at least one possible subset of # the team, but not necessarily for the entire team. @@ -788,7 +788,7 @@ class PokemonRuleSet end # This rule checks either - # - the entire team to determine whether a subset of the team meets the rule, or + # - the entire team to determine whether a subset of the team meets the rule, or # - whether the entire team meets the rule. If the condition holds for the # entire team, the condition must also hold for any possible subset of the # team with the suggested number. @@ -897,7 +897,7 @@ class PokemonRuleSet error.push(_INTL("{1} Pokémon are needed.",self.minLength)) if error && self.minLength>1 return false elsif team.length>self.maxLength - error.push(_INTL("No more than {1} Pokémon may enter.",self.maxLength)) if error + error.push(_INTL("No more than {1} Pokémon may enter.",self.maxLength)) if error return false end for pokemon in team @@ -985,33 +985,33 @@ end class SoulDewBattleClause < BattleRule def setRule(battle); battle.rules["souldewclause"] = true; end end - - - + + + class SleepClause < BattleRule def setRule(battle); battle.rules["sleepclause"] = true; end end - - - + + + class FreezeClause < BattleRule def setRule(battle); battle.rules["freezeclause"] = true; end end - - - + + + class EvasionClause < BattleRule def setRule(battle); battle.rules["evasionclause"] = true; end end - - - + + + class OHKOClause < BattleRule def setRule(battle); battle.rules["ohkoclause"] = true; end end - - - + + + class PerishSongClause < BattleRule def setRule(battle); battle.rules["perishsong"] = true; end end @@ -1464,8 +1464,8 @@ PokemonChallengeRules.new :LAPRAS,:DITTO,:VAPOREON,:JOLTEON,:SNORLAX, :ARTICUNO,:ZAPDOS,:DRAGONITE,:MEWTWO,:MEW)) - - + + # 2005 Tournament Rules PokemonChallengeRules.new .addPokemonRule(BannedSpeciesRestriction.new( @@ -1550,7 +1550,7 @@ PokemonChallengeRules.new # Battle Time (includes animations) -If the time runs out, the team with the most Pokémon left wins. If both teams have +If the time runs out, the team with the most Pok�mon left wins. If both teams have the same number of Pokémon left, total HP remaining breaks the tie. If both HP totals are identical, the battle is a draw. @@ -1558,4 +1558,4 @@ totals are identical, the battle is a draw. If the player is in the process of switching Pokémon when the time runs out, the one that can still battle that's closest to the top of the roster is chosen. Otherwise, the attack on top of the list is chosen. -=end \ No newline at end of file +=end diff --git a/Data/Scripts/017_Other battles/005_PBattle_OrgBattleGenerator.rb b/Data/Scripts/017_Other battles/005_PBattle_OrgBattleGenerator.rb index 93436f8fa..0c55f8a23 100644 --- a/Data/Scripts/017_Other battles/005_PBattle_OrgBattleGenerator.rb +++ b/Data/Scripts/017_Other battles/005_PBattle_OrgBattleGenerator.rb @@ -113,9 +113,9 @@ def pbGetLegalMoves2(species,maxlevel) deleteAll.call(moves,move2[0]) elsif md.function=="006" && move2[1].function=="005" deleteAll.call(moves,move2[0]) - elsif md.function==move2[1].function && md.basedamage!=0 && + elsif md.function==move2[1].function && md.basedamage!=0 && md.type==move2[1].type && - (md.totalpp==15 || md.totalpp==10 || md.totalpp==move2[1].totalpp) && + (md.totalpp==15 || md.totalpp==10 || md.totalpp==move2[1].totalpp) && (md.basedamage>move2[1].basedamage || (md.basedamage==move2[1].basedamage && md.accuracy>move2[1].accuracy)) # Surf, Flamethrower, Thunderbolt, etc. @@ -130,28 +130,28 @@ def baseStatTotal(move) if !$baseStatTotal[move] $baseStatTotal[move]=pbBaseStatTotal(move) end - return $baseStatTotal[move] + return $baseStatTotal[move] end def babySpecies(move) if !$babySpecies[move] $babySpecies[move]=pbGetBabySpecies(move) end - return $babySpecies[move] + return $babySpecies[move] end def minimumLevel(move) if !$minimumLevel[move] $minimumLevel[move]=pbGetMinimumLevel(move) end - return $minimumLevel[move] + return $minimumLevel[move] end def evolutions(move) if !$evolutions[move] $evolutions[move]=pbGetEvolvedFormData(move,true) end - return $evolutions[move] + return $evolutions[move] end def moveData(move) @@ -173,14 +173,14 @@ end 660-755 - 400-555 (nonlegendary) 756-799 - 580-600 [legendary] (compat1==15 or compat2==15, genderbyte=255) 800-849 - 500- -850-881 - 580- +850-881 - 580- =end class BaseStatRestriction def initialize(mn,mx) - @mn=mn;@mx=mx + @mn=mn;@mx=mx end def isValid?(pkmn) @@ -218,7 +218,7 @@ end def withRestr(rule,minbs,maxbs,legendary) ret=PokemonChallengeRules.new.addPokemonRule(BaseStatRestriction.new(minbs,maxbs)) if legendary==0 - ret.addPokemonRule(NonlegendaryRestriction.new) + ret.addPokemonRule(NonlegendaryRestriction.new) elsif legendary==1 ret.addPokemonRule(InverseRestriction.new(NonlegendaryRestriction.new)) end @@ -280,7 +280,7 @@ def hasMorePowerfulMove(moves,thismove) next if move==0 if moveData(move).type==thisdata.type && moveData(move).basedamage>thisdata.basedamage - return true + return true end end return false @@ -368,7 +368,7 @@ def pbRandomPokemonFromRule(rule,trainer) next if !isConst?(species,PBSpecies,:DIALGA) when :PASSHOBERRY next if !isConst?(species,PBSpecies,:STEELIX) - when :BABIRIBERRY + when :BABIRIBERRY next if !isConst?(species,PBSpecies,:TYRANITAR) when :HABANBERRY next if !isConst?(species,PBSpecies,:GARCHOMP) @@ -385,7 +385,7 @@ def pbRandomPokemonFromRule(rule,trainer) when :DEEPSEATOOTH next if !isConst?(species,PBSpecies,:CLAMPERL) when :THICKCLUB - next if !isConst?(species,PBSpecies,:CUBONE) && + next if !isConst?(species,PBSpecies,:CUBONE) && !isConst?(species,PBSpecies,:MAROWAK) end if itemsym==:LIECHIBERRY && (ev&0x02)==0 @@ -403,11 +403,11 @@ def pbRandomPokemonFromRule(rule,trainer) break end if level<10 - item=(getConst(PBItems,:ORANBERRY) || item) if rand(40)==0 || + item=(getConst(PBItems,:ORANBERRY) || item) if rand(40)==0 || isConst?(item,PBItems,:SITRUSBERRY) end if level>20 - item=(getConst(PBItems,:SITRUSBERRY) || item) if rand(40)==0 || + item=(getConst(PBItems,:SITRUSBERRY) || item) if rand(40)==0 || isConst?(item,PBItems,:ORANBERRY) end moves=$legalMoves[species] @@ -417,7 +417,7 @@ def pbRandomPokemonFromRule(rule,trainer) moves[0]=pbRandomMove moves[1]=pbRandomMove moves[2]=pbRandomMove - moves[3]=pbRandomMove + moves[3]=pbRandomMove end next if moves.length==0 if (moves|[]).length<4 @@ -465,7 +465,7 @@ def pbRandomPokemonFromRule(rule,trainer) hasSpecial=true if d.category==1 end end - if !hasPhysical && (ev&0x02)!=0 + if !hasPhysical && (ev&0x02)!=0 # No physical attack, but emphasizes Attack next if rand(10)<8 end @@ -495,7 +495,7 @@ def pbRandomPokemonFromRule(rule,trainer) end end for i in 0...4 - moves[i]=0 if !moves[i] + moves[i]=0 if !moves[i] end if isConst?(item,PBItems,:LIGHTCLAY) && !moves.include?((getConst(PBMoves,:LIGHTSCREEN) || -1)) && @@ -585,7 +585,7 @@ class PlayerRatingElo K_VALUE = 16 def initialize - @rating=1600.0 + @rating=1600.0 @deviation=0 @volatility=0 @estimatedRating=nil @@ -884,7 +884,7 @@ def pbDecideWinnerScore(party0,party1,rating) end def pbDecideWinner(party0,party1,rating0,rating1) - rating0=(rating0*15.0/100).round + rating0=(rating0*15.0/100).round rating1=(rating1*15.0/100).round score0=pbDecideWinnerScore(party0,party1,rating0) score1=pbDecideWinnerScore(party1,party0,rating1) @@ -1025,7 +1025,7 @@ def pbTrainerInfo(pokemonlist,trfile,rules) end species|=[] # remove duplicates count=0 - (PBTypes.maxValue+1).times { |typ| + (PBTypes.maxValue+1).times { |typ| if types[typ]>=5 types[typ]/=4 types[typ]=10 if types[typ]>10 @@ -1066,7 +1066,7 @@ def pbTrainerInfo(pokemonlist,trfile,rules) end end numbers|=[] - if (numbers.length<6 || + if (numbers.length<6 || !rulesetTeam.hasValidTeam?(numbersPokemon)) for index in 0...pokemonlist.length pkmn=pokemonlist[index] @@ -1100,7 +1100,7 @@ def pbTrainerInfo(pokemonlist,trfile,rules) numbers.sort! end newbttrainers.push([trainerdata[0],trainerdata[1],trainerdata[2], - trainerdata[3],trainerdata[4],numbers]) + trainerdata[3],trainerdata[4],numbers]) end yield(nil) if block_given? pbpokemonlist=[] @@ -1156,7 +1156,7 @@ def isBattlePokemonDuplicate(pk,pk2) if pk.species==pk2.species moves1=[] moves2=[] - 4.times{ + 4.times{ moves1.push(pk.moves[0].id) moves2.push(pk.moves[1].id) } @@ -1178,7 +1178,7 @@ def isBattlePokemonDuplicate(pk,pk2) pk.ev[4]==pk2.ev[4] && pk.ev[5]==pk2.ev[5] return false - end + end end def pbRemoveDuplicates(party) @@ -1356,7 +1356,7 @@ def pbWriteCup(id,rules) cmd=2 elsif cmd==1 cmd=0 - end + end end return if cmd==0 # No if cmd==1 # Yes, use existing @@ -1393,4 +1393,4 @@ def pbWriteCup(id,rules) } pbDisposeMessageWindow(mw) pbMessage(_INTL("Team generation complete.")) -end \ No newline at end of file +end diff --git a/Data/Scripts/017_Other battles/006_PBattle_BattleSwap.rb b/Data/Scripts/017_Other battles/006_PBattle_BattleSwap.rb index 54b8cc98b..6c7b2b30b 100644 --- a/Data/Scripts/017_Other battles/006_PBattle_BattleSwap.rb +++ b/Data/Scripts/017_Other battles/006_PBattle_BattleSwap.rb @@ -54,7 +54,7 @@ class BattleSwapScene @sprites["help"].text=_INTL("Select Pokémon to swap.") @sprites["list"].commands=commands @sprites["list"].index=0 - @mode=1 + @mode=1 end # End the scene here @@ -241,4 +241,4 @@ class BattleSwapScreen end end end -end \ No newline at end of file +end diff --git a/Data/Scripts/018_Minigames/001_PMinigame_Duel.rb b/Data/Scripts/018_Minigames/001_PMinigame_Duel.rb index b84a976cf..265035df8 100644 --- a/Data/Scripts/018_Minigames/001_PMinigame_Duel.rb +++ b/Data/Scripts/018_Minigames/001_PMinigame_Duel.rb @@ -145,34 +145,34 @@ class PokemonDuel pbMessage(_INTL("You study each other's movements...")) elsif action==0 && command==1 pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::Forward]) pbWait(Graphics.frame_rate*4/10) pbShake(9,9,8) pbFlashScreens(false,true) pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Backward]) @hp[1] -= 1 pbMessage(_INTL("Your attack was not blocked!")) elsif action==0 && command==2 pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::ScriptAsync,"jumpForward"]) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::Backward]) pbWait(Graphics.frame_rate) pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Backward]) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,2, - PBMoveRoute::Forward]) + PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::Forward]) pbMessage(_INTL("Your attack was evaded!")) elsif (action==0 || action==1 || action==2) && command==3 pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::ScriptAsync,"jumpForward"]) pbWait(Graphics.frame_rate*4/10) pbMoveRoute(event,[ @@ -183,35 +183,35 @@ class PokemonDuel pbShake(9,9,8) pbFlashScreens(false,true) pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Backward]) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Forward]) @hp[1] -= 3 pbMessage(_INTL("You pierce through the opponent's defenses!")) elsif action==1 && command==0 pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::Forward]) pbWait(Graphics.frame_rate*4/10) pbShake(9,9,8) pbFlashScreens(true,false) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Backward]) @hp[0] -= 1 pbMessage(_INTL("You fail to block the opponent's attack!")) elsif action==1 && command==1 pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::Forward]) pbWait(Graphics.frame_rate*6/10) pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Backward]) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Forward]) pbWait(Graphics.frame_rate*6/10) pbMoveRoute(event,[PBMoveRoute::Backward]) @@ -224,7 +224,7 @@ class PokemonDuel (action==2 && command==2) pbMoveRoute($game_player,[ PBMoveRoute::Backward, - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::ScriptAsync,"jumpForward"]) pbWait(Graphics.frame_rate*8/10) pbMoveRoute(event,[ @@ -235,11 +235,11 @@ class PokemonDuel pbFlashScreens(true,true) pbMoveRoute($game_player,[ PBMoveRoute::Backward, - PBMoveRoute::ChangeSpeed,2]) + PBMoveRoute::ChangeSpeed,2]) pbMoveRoute(event,[ PBMoveRoute::Backward, PBMoveRoute::Backward, - PBMoveRoute::ChangeSpeed,2]) + PBMoveRoute::ChangeSpeed,2]) pbWait(Graphics.frame_rate) pbMoveRoute(event,[PBMoveRoute::Forward]) pbMoveRoute($game_player,[PBMoveRoute::Forward]) @@ -248,22 +248,22 @@ class PokemonDuel pbMessage(_INTL("You hit each other!")) elsif action==2 && command==0 pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::Forward]) pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::ScriptAsync,"jumpBackward"]) pbWait(Graphics.frame_rate) pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Forward]) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,2, - PBMoveRoute::Backward]) + PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::Backward]) pbMessage(_INTL("You evade the opponent's attack!")) elsif action==3 && (command==0 || command==1 || command==2) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,4, + PBMoveRoute::ChangeSpeed,4, PBMoveRoute::ScriptAsync,"jumpForward"]) pbWait(Graphics.frame_rate*4/10) pbMoveRoute($game_player,[ @@ -274,10 +274,10 @@ class PokemonDuel pbShake(9,9,8) pbFlashScreens(true,false) pbMoveRoute($game_player,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Forward]) pbMoveRoute(event,[ - PBMoveRoute::ChangeSpeed,2, + PBMoveRoute::ChangeSpeed,2, PBMoveRoute::Backward]) @hp[0] -= 3 pbMessage(_INTL("The opponent pierces through your defenses!")) @@ -315,10 +315,10 @@ class PokemonDuel def pbEndDuel pbWait(Graphics.frame_rate*3/4) pbMoveRoute($game_player,[ - PBMoveRoute::DirectionFixOff, + PBMoveRoute::DirectionFixOff, PBMoveRoute::ChangeSpeed,@oldmovespeed]) pbMoveRoute(@event,[ - PBMoveRoute::DirectionFixOff, + PBMoveRoute::DirectionFixOff, PBMoveRoute::ChangeSpeed,@oldeventspeed]) fadeTime = Graphics.frame_rate*4/10 alphaDiff = (255.0/fadeTime).ceil @@ -331,7 +331,7 @@ class PokemonDuel @sprites["opponentwindow"].opacity -= alphaDiff Graphics.update Input.update - pbUpdateSceneMap + pbUpdateSceneMap end pbDisposeSpriteHash(@sprites) @viewport.dispose @@ -404,4 +404,4 @@ rescue Exception if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" raise $! end -end \ No newline at end of file +end diff --git a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb index 4147633a4..82be97d85 100644 --- a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb +++ b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb @@ -501,7 +501,7 @@ class TriadScene end end end - return [boardX,boardY] + return [boardX,boardY] end def pbEndPlaceCard(position, cardIndex) @@ -752,7 +752,7 @@ class TriadScreen self.maxCards.times do randCard = @triadCards[rand(@triadCards.length)] pbSubtract(@triadCards,randCard[0]) - cards.push(randCard[0]) + cards.push(randCard[0]) end @scene.pbShowPlayerCards(cards) else @@ -825,7 +825,7 @@ class TriadScreen end else # Opponent's turn - @scene.pbDisplay(_INTL("{1} is making a move...",@opponentName)) + @scene.pbDisplay(_INTL("{1} is making a move...",@opponentName)) scores = [] for cardIndex in 0...opponentCards.length square = TriadSquare.new @@ -1075,7 +1075,7 @@ def pbBuyTriads commands.push([price,speciesname,_INTL("{1} - ${2}",speciesname,visprice),i]) end if commands.length==0 - pbMessage(_INTL("There are no cards that you can buy.")) + pbMessage(_INTL("There are no cards that you can buy.")) return end commands.sort! { |a,b| a[1]<=>b[1] } # name @@ -1318,4 +1318,4 @@ def pbGiveTriadCard(species,quantity=1) return false if !$PokemonGlobal.triads.pbCanStore?(species,quantity) $PokemonGlobal.triads.pbStoreItem(species,quantity) return true -end \ No newline at end of file +end diff --git a/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb b/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb index 793d54618..6f1386c3b 100644 --- a/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb +++ b/Data/Scripts/018_Minigames/003_PMinigame_SlotMachine.rb @@ -401,4 +401,4 @@ def pbSlotMachine(difficulty=1) screen.pbStartScreen(difficulty) } end -end \ No newline at end of file +end diff --git a/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb b/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb index 1277daedb..16a0adcf3 100644 --- a/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb +++ b/Data/Scripts/018_Minigames/004_PMinigame_VoltorbFlip.rb @@ -476,7 +476,7 @@ class VoltorbFlip end end - def pbUpdateCoins + def pbUpdateCoins # Update coins display @sprites["totalCoins"].bitmap.clear pbCreateCoins($PokemonGlobal.coins,44) @@ -623,4 +623,4 @@ def pbVoltorbFlip screen=VoltorbFlipScreen.new(scene) screen.pbStartScreen end -end \ No newline at end of file +end diff --git a/Data/Scripts/018_Minigames/005_PMinigame_Lottery.rb b/Data/Scripts/018_Minigames/005_PMinigame_Lottery.rb index 9f04e7e93..8abd48fe7 100644 --- a/Data/Scripts/018_Minigames/005_PMinigame_Lottery.rb +++ b/Data/Scripts/018_Minigames/005_PMinigame_Lottery.rb @@ -51,4 +51,4 @@ def pbLottery(winnum,nameVar=2,positionVar=3,matchedVar=4) $game_variables[nameVar]=winpoke $game_variables[positionVar]=winpos $game_variables[matchedVar]=winmatched -end \ No newline at end of file +end diff --git a/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb b/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb index abb52703b..7cea00d4d 100644 --- a/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb +++ b/Data/Scripts/018_Minigames/006_PMinigame_Mining.rb @@ -623,4 +623,4 @@ def pbMiningGame screen = MiningGame.new(scene) screen.pbStartScreen } -end \ No newline at end of file +end diff --git a/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb b/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb index 41eef8e00..07ebc03aa 100644 --- a/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb +++ b/Data/Scripts/018_Minigames/007_PMinigame_TilePuzzles.rb @@ -579,4 +579,4 @@ def pbTilePuzzle(game,board,width=0,height=0) ret = screen.pbStartScreen } return ret -end \ No newline at end of file +end diff --git a/Data/Scripts/019_System and utilities/001_PSystem_Controls.rb b/Data/Scripts/019_System and utilities/001_PSystem_Controls.rb index 174dee6ed..4ac4c4541 100644 --- a/Data/Scripts/019_System and utilities/001_PSystem_Controls.rb +++ b/Data/Scripts/019_System and utilities/001_PSystem_Controls.rb @@ -289,4 +289,4 @@ module Mouse @SetClassLong.call(Win32API.pbFindRgssWindow,-12,@oldcursor) @oldcursor = nil end -end \ No newline at end of file +end diff --git a/Data/Scripts/019_System and utilities/002_PSystem_System.rb b/Data/Scripts/019_System and utilities/002_PSystem_System.rb index cdfd13546..b24d36972 100644 --- a/Data/Scripts/019_System and utilities/002_PSystem_System.rb +++ b/Data/Scripts/019_System and utilities/002_PSystem_System.rb @@ -12,7 +12,7 @@ def pbLoadRxData(file) # :nodoc: if $RPGVX return load_data(file+".rvdata") else - return load_data(file+".rxdata") + return load_data(file+".rxdata") end end @@ -134,4 +134,4 @@ end -pbSetUpSystem \ No newline at end of file +pbSetUpSystem diff --git a/Data/Scripts/019_System and utilities/003_PSystem_FileUtilities.rb b/Data/Scripts/019_System and utilities/003_PSystem_FileUtilities.rb index 563a9c6be..b28ef0d07 100644 --- a/Data/Scripts/019_System and utilities/003_PSystem_FileUtilities.rb +++ b/Data/Scripts/019_System and utilities/003_PSystem_FileUtilities.rb @@ -164,11 +164,11 @@ def pbCheckPokemonIconFiles(params,egg=false) if egg bitmapFileName = sprintf("Graphics/Icons/icon%segg_%d",getConstantName(PBSpecies,species),params[3]) rescue nil if !pbResolveBitmap(bitmapFileName) - bitmapFileName = sprintf("Graphics/Icons/icon%03degg_%d",species,params[3]) + bitmapFileName = sprintf("Graphics/Icons/icon%03degg_%d",species,params[3]) if !pbResolveBitmap(bitmapFileName) bitmapFileName = sprintf("Graphics/Icons/icon%segg",getConstantName(PBSpecies,species)) rescue nil if !pbResolveBitmap(bitmapFileName) - bitmapFileName = sprintf("Graphics/Icons/icon%03degg",species) + bitmapFileName = sprintf("Graphics/Icons/icon%03degg",species) if !pbResolveBitmap(bitmapFileName) bitmapFileName = sprintf("Graphics/Icons/iconEgg") end @@ -443,7 +443,7 @@ def pbCryFrameLength(pokemon,form=0,pitch=nil) else pkmnwav = pbResolveAudioSE(pbCryFile(pokemon)) playtime = getPlayTime(pkmnwav) if pkmnwav - end + end end playtime /= pitch # sound is lengthened the lower the pitch # 4 is added to provide a buffer between sounds @@ -678,4 +678,4 @@ def pbGetTrainerVictoryME(trainer) # can be a PokeBattle_Trainer or an array o ret = pbStringToAudioFile("Battle victory") if !ret ret.name = "../../Audio/ME/"+ret.name return ret -end \ No newline at end of file +end diff --git a/Data/Scripts/019_System and utilities/004_PSystem_PokemonUtilities.rb b/Data/Scripts/019_System and utilities/004_PSystem_PokemonUtilities.rb index 6f3474989..ecda3646c 100644 --- a/Data/Scripts/019_System and utilities/004_PSystem_PokemonUtilities.rb +++ b/Data/Scripts/019_System and utilities/004_PSystem_PokemonUtilities.rb @@ -253,7 +253,7 @@ def pbChoosePokemon(variableNumber,nameVarNumber,ableProc=nil,allowIneligible=fa scene = PokemonParty_Scene.new screen = PokemonPartyScreen.new(scene,$Trainer.party) if ableProc - chosen=screen.pbChooseAblePokemon(ableProc,allowIneligible) + chosen=screen.pbChooseAblePokemon(ableProc,allowIneligible) else screen.pbStartScene(_INTL("Choose a Pokémon."),false) chosen = screen.pbChoosePokemon @@ -283,7 +283,7 @@ def pbChooseTradablePokemon(variableNumber,nameVarNumber,ableProc=nil,allowIneli scene = PokemonParty_Scene.new screen = PokemonPartyScreen.new(scene,$Trainer.party) if ableProc - chosen=screen.pbChooseTradablePokemon(ableProc,allowIneligible) + chosen=screen.pbChooseTradablePokemon(ableProc,allowIneligible) else screen.pbStartScene(_INTL("Choose a Pokémon."),false) chosen = screen.pbChoosePokemon @@ -502,4 +502,4 @@ def pbHasEgg?(species) baby = pbGetBabySpecies(species,0,0) return true if species==baby # Is an egg species without incense return false -end \ No newline at end of file +end diff --git a/Data/Scripts/019_System and utilities/005_PSystem_Utilities.rb b/Data/Scripts/019_System and utilities/005_PSystem_Utilities.rb index a24a39499..ed3dd8d8c 100644 --- a/Data/Scripts/019_System and utilities/005_PSystem_Utilities.rb +++ b/Data/Scripts/019_System and utilities/005_PSystem_Utilities.rb @@ -50,7 +50,7 @@ end def pbGetCDID() sendString = proc { |x| - mciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l') + mciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l') next "" if !mciSendString buffer = "\0"*2000 x = mciSendString.call(x,buffer,2000,0) @@ -193,7 +193,7 @@ def beginRecordUI buffer = "\0"*256 MciErrorString.call(code,buffer,256) pbMessage(_INTL("Recording failed: {1}",buffer.gsub(/\x00/,""))) - return false + return false end end @@ -266,10 +266,10 @@ class LinearCongRandom end def getNext16 # calculates @seed * @s1 + @s2 - @seed = ((((@seed&0x0000ffff)*(@s1&0x0000ffff))&0x0000ffff) | - (((((((@seed&0x0000ffff)*(@s1&0x0000ffff))&0xffff0000)>>16) + - ((((@seed&0xffff0000)>>16)*(@s1&0x0000ffff))&0x0000ffff) + - (((@seed&0x0000ffff)*((@s1&0xffff0000)>>16))&0x0000ffff)) & + @seed = ((((@seed&0x0000ffff)*(@s1&0x0000ffff))&0x0000ffff) | + (((((((@seed&0x0000ffff)*(@s1&0x0000ffff))&0xffff0000)>>16) + + ((((@seed&0xffff0000)>>16)*(@s1&0x0000ffff))&0x0000ffff) + + (((@seed&0x0000ffff)*((@s1&0xffff0000)>>16))&0x0000ffff)) & 0x0000ffff)<<16)) + @s2 r = (@seed>>16) r = (r+0xFFFFFFFF)+1 if r<0 @@ -297,7 +297,7 @@ def pbIsJsonString(str) stringLiterals = /"[^"\\\n\r\x00-\x1f\x7f-\x9f]*"/ #" whiteSpace = /[\s]+/ str = str.gsub(charEscapes,"@").gsub(stringLiterals,"true").gsub(whiteSpace," ") - # prevent cases like "truetrue" or "true true" or "true[true]" or "5-2" or "5true" + # prevent cases like "truetrue" or "true true" or "true[true]" or "5-2" or "5true" otherLiterals = /(true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)(?! ?[0-9a-z\-\[\{\"])/ #" str = str.gsub(otherLiterals,"]").gsub(d,"") #" return str[/^[\],:{} ]*$/] ? true : false @@ -708,7 +708,7 @@ def pbTrainerName(name=nil,outfit=0) if trname==nil trname = pbEnterPlayerName(_INTL("Your name?"),0,MAX_PLAYER_NAME_SIZE) if trname=="" - gender = pbGetTrainerTypeGender(trainertype) + gender = pbGetTrainerTypeGender(trainertype) trname = pbSuggestTrainerName(gender) end end @@ -1045,7 +1045,7 @@ def pbMoveTutorChoose(move,movelist=nil,bymachine=false) end else break - end + end end screen.pbEndScene } @@ -1199,4 +1199,4 @@ def pbRecordTrainer return true end return false -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/001_Debug_Menu.rb b/Data/Scripts/020_Debug/001_Debug_Menu.rb index 5ee9bd091..52aebdfd6 100644 --- a/Data/Scripts/020_Debug/001_Debug_Menu.rb +++ b/Data/Scripts/020_Debug/001_Debug_Menu.rb @@ -93,7 +93,7 @@ def pbDebugMenuCommands(showall=true) _INTL("Shadow Pokémon. Choose a Pokémon to show to the Relic Stone for purification.")) commands.add("fieldmenu","purifychamber",_INTL("Use Purify Chamber"), _INTL("Shadow Pokémon. Open the Purify Chamber for purification.")) - + commands.add("main","battlemenu",_INTL("Battle options..."), _INTL("Start battles, reset this map's trainers, ready rematches, edit roamers, etc.")) commands.add("battlemenu","testwildbattle",_INTL("Test Wild Battle"), @@ -112,7 +112,7 @@ def pbDebugMenuCommands(showall=true) _INTL("Make all trainers in the phone ready for rematches.")) commands.add("battlemenu","roamers",_INTL("Roaming Pokémon"), _INTL("Toggle and edit all roaming Pokémon.")) - + commands.add("main","itemsmenu",_INTL("Item options..."), _INTL("Give and take items.")) commands.add("itemsmenu","additem",_INTL("Add Item"), @@ -121,7 +121,7 @@ def pbDebugMenuCommands(showall=true) _INTL("Add a certain number of every item to the Bag.")) commands.add("itemsmenu","emptybag",_INTL("Empty Bag"), _INTL("Remove all items from the Bag.")) - + commands.add("main","pokemonmenu",_INTL("Pokémon options..."), _INTL("Give Pokémon, heal party, fill/empty PC storage, etc.")) commands.add("pokemonmenu","addpokemon",_INTL("Add Pokémon"), @@ -138,7 +138,7 @@ def pbDebugMenuCommands(showall=true) _INTL("Remove all Pokémon in storage.")) commands.add("pokemonmenu","openstorage",_INTL("Access Pokémon Storage"), _INTL("Opens the Pokémon storage boxes in Organize Boxes mode.")) - + commands.add("main","playermenu",_INTL("Player options..."), _INTL("Set money, badges, Pokédexes, player's appearance and name, etc.")) commands.add("playermenu","setbadges",_INTL("Set Badges"), @@ -195,7 +195,7 @@ def pbDebugMenuCommands(showall=true) _INTL("Import all battle animations from the \"Animations\" folder.")) commands.add("editorsmenu","exportanims",_INTL("Export All Battle Animations"), _INTL("Export all battle animations individually to the \"Animations\" folder.")) - + commands.add("main","othermenu",_INTL("Other options..."), _INTL("Mystery Gifts, translations, compile data, etc.")) commands.add("othermenu","mysterygift",_INTL("Manage Mystery Gifts"), @@ -711,7 +711,7 @@ def pbDebugMenuActions(cmd="",sprites=nil,viewport=nil) trname = pbEnterPlayerName("Your name?",0,MAX_PLAYER_NAME_SIZE,$Trainer.name) if trname=="" && pbConfirmMessage(_INTL("Give yourself a default name?")) trainertype = pbGetPlayerTrainerType - gender = pbGetTrainerTypeGender(trainertype) + gender = pbGetTrainerTypeGender(trainertype) trname = pbSuggestTrainerName(gender) end if trname=="" @@ -863,4 +863,4 @@ def pbDebugMenu(showall=true) pbDisposeMessageWindow(sprites["textbox"]) pbDisposeSpriteHash(sprites) viewport.dispose -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/002_Debug_Actions.rb b/Data/Scripts/020_Debug/002_Debug_Actions.rb index 741159765..ff6a5085d 100644 --- a/Data/Scripts/020_Debug/002_Debug_Actions.rb +++ b/Data/Scripts/020_Debug/002_Debug_Actions.rb @@ -1,5 +1,5 @@ #=============================================================================== -# +# #=============================================================================== def pbDefaultMap return $game_map.map_id if $game_map @@ -555,7 +555,7 @@ end #=============================================================================== -# +# #=============================================================================== class PokemonDataCopy attr_accessor :dataOldHash @@ -841,7 +841,7 @@ class PokemonDebugPartyScreen @helpWindow.visible = true end - def pbConfirm(text) + def pbConfirm(text) ret = -1 @messageBox.text = text @messageBox.visible = true @@ -922,4 +922,4 @@ class PokemonDebugPartyScreen @helpWindow.update end alias pbUpdate update -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/003_Debug_Pokemon.rb b/Data/Scripts/020_Debug/003_Debug_Pokemon.rb index d588d396e..ebcd4f799 100644 --- a/Data/Scripts/020_Debug/003_Debug_Pokemon.rb +++ b/Data/Scripts/020_Debug/003_Debug_Pokemon.rb @@ -7,7 +7,7 @@ module PokemonDebugMixin commands.add("hpstatusmenu","fullheal",_INTL("Fully heal")) commands.add("hpstatusmenu","makefainted",_INTL("Make fainted")) commands.add("hpstatusmenu","setpokerus",_INTL("Set Pokérus")) - + commands.add("main","levelstats",_INTL("Level/stats...")) commands.add("levelstats","setlevel",_INTL("Set level")) commands.add("levelstats","setexp",_INTL("Set Exp")) @@ -20,26 +20,26 @@ module PokemonDebugMixin commands.add("conteststats","setsmart",_INTL("Set Smart")) commands.add("conteststats","settough",_INTL("Set Tough")) commands.add("conteststats","setsheen",_INTL("Set Sheen")) - + commands.add("main","moves",_INTL("Moves...")) commands.add("moves","teachmove",_INTL("Teach move")) commands.add("moves","forgetmove",_INTL("Forget move")) commands.add("moves","resetmoves",_INTL("Reset moves")) commands.add("moves","setmovepp",_INTL("Set move PP")) commands.add("moves","setinitialmoves",_INTL("Reset initial moves")) - + commands.add("main","setability",_INTL("Set ability")) commands.add("main","setnature",_INTL("Set nature")) commands.add("main","setgender",_INTL("Set gender")) commands.add("main","speciesform",_INTL("Species/form...")) - + commands.add("main","cosmetic",_INTL("Cosmetic info...")) commands.add("cosmetic","setshininess",_INTL("Set shininess")) commands.add("cosmetic","setpokeball",_INTL("Set Poké Ball")) commands.add("cosmetic","setribbons",_INTL("Set ribbons")) commands.add("cosmetic","setnickname",_INTL("Set nickname")) commands.add("cosmetic","ownership",_INTL("Ownership...")) - + commands.add("main","setegg",_INTL("Set egg")) commands.add("main","shadowpkmn",_INTL("Shadow Pkmn...")) if !settingUpBattle @@ -863,4 +863,4 @@ end class PokemonDebugPartyScreen include PokemonDebugMixin -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/004_Editor_Screens.rb b/Data/Scripts/020_Debug/004_Editor_Screens.rb index 1340c3a07..ca9ea161f 100644 --- a/Data/Scripts/020_Debug/004_Editor_Screens.rb +++ b/Data/Scripts/020_Debug/004_Editor_Screens.rb @@ -75,10 +75,10 @@ def pbNewEncounterType(enc) if i==0 dogen = true unless enc[1][EncounterTypes::Cave] elsif i==1 - dogen = true unless enc[1][EncounterTypes::Land] || - enc[1][EncounterTypes::LandMorning] || - enc[1][EncounterTypes::LandDay] || - enc[1][EncounterTypes::LandNight] || + dogen = true unless enc[1][EncounterTypes::Land] || + enc[1][EncounterTypes::LandMorning] || + enc[1][EncounterTypes::LandDay] || + enc[1][EncounterTypes::LandNight] || enc[1][EncounterTypes::BugContest] else dogen = true @@ -140,7 +140,7 @@ def pbEditEncounterType(enc,etype) params.setRange(minlevel,mLevel) params.setDefaultValue(minlevel) maxlevel = pbMessageChooseNumber(_INTL("Set the maximum level."),params) - enctype[ret][1] = minlevel + enctype[ret][1] = minlevel enctype[ret][2] = maxlevel end cmdwin.dispose @@ -435,14 +435,14 @@ def pbTrainerBattleEditor trainertype = pbTrainerTypeEditorNew(nil) next if trainertype<0 else - next + next end trainername = pbMessageFreeText(_INTL("Now enter the trainer's name."),"",false,32) next if trainername=="" trainerparty = pbGetFreeTrainerParty(trainertype,trainername) if trainerparty<0 pbMessage(_INTL("There is no room to create a trainer of that type and name.")) - next + next end t = pbNewTrainer(trainertype,trainername,trainerparty,false) trainers.push(t) if t @@ -565,7 +565,7 @@ def pbMetadataScreen(defaultMapId=nil) map = pbListScreen(_INTL("SET METADATA"),MapLister.new(map,true)) break if map<0 mapname = (map==0) ? _INTL("Global Metadata") : mapinfos[map].name - data = [] + data = [] properties = (map==0) ? MapScreenScene::GLOBALMETADATA : MapScreenScene::LOCALMAPS for i in 0...properties.length data.push((metadata[map]) ? metadata[map][i+1] : nil) @@ -908,7 +908,7 @@ def pbPokemonEditor regionallist.push(regionalDexes[i][selection]) end numb = regionallist.size-1 - while numb>=0 # Remove every 0 at end of array + while numb>=0 # Remove every 0 at end of array (regionallist[numb]==0) ? regionallist.pop : break numb -= 1 end @@ -1454,4 +1454,4 @@ def pbAnimationsOrganiser info.dispose cmdwin.dispose viewport.dispose -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/005_Editor_SaveData.rb b/Data/Scripts/020_Debug/005_Editor_SaveData.rb index 7c780efa2..da5489090 100644 --- a/Data/Scripts/020_Debug/005_Editor_SaveData.rb +++ b/Data/Scripts/020_Debug/005_Editor_SaveData.rb @@ -354,7 +354,7 @@ end def pbSaveEncounterData encdata = pbLoadEncountersData return if !encdata - mapinfos = pbLoadRxData("Data/MapInfos") + mapinfos = pbLoadRxData("Data/MapInfos") File.open("PBS/encounters.txt","wb") { |f| f.write(0xEF.chr) f.write(0xBB.chr) @@ -789,7 +789,7 @@ def pbSavePokemonData regionallist.push(regionaldata[region][i]) end numb = regionallist.length-1 - while (numb>=0) # remove every 0 at end of array + while (numb>=0) # remove every 0 at end of array (!regionallist[numb] || regionallist[numb]==0) ? regionallist.pop : break numb -= 1 end @@ -1493,4 +1493,4 @@ def pbSaveAllData pbSavePokemonData; Graphics.update pbSavePokemonFormsData; Graphics.update pbSaveShadowMoves; Graphics.update -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/006_Editor_DataTypes.rb b/Data/Scripts/020_Debug/006_Editor_DataTypes.rb index fdaf5bd56..04e371c98 100644 --- a/Data/Scripts/020_Debug/006_Editor_DataTypes.rb +++ b/Data/Scripts/020_Debug/006_Editor_DataTypes.rb @@ -112,7 +112,7 @@ class NonzeroLimitProperty params.setDefaultValue(oldsetting) return pbMessageChooseNumber(_INTL("Set the value for {1}.",settingname),params) end - + def defaultValue return 1 end @@ -191,7 +191,7 @@ class EnumProperty def set(settingname,oldsetting) commands = [] for value in @values - commands.push(value) + commands.push(value) end cmd = pbMessage(_INTL("Choose a value for {1}.",settingname),commands,-1) return oldsetting if cmd<0 @@ -204,7 +204,7 @@ class EnumProperty def format(value) return (value) ? @values[value] : value.inspect - end + end end @@ -740,7 +740,7 @@ module PocketProperty _INTL("TMs & HMs"),_INTL("Berries"),_INTL("Mail"), _INTL("Battle Items"),_INTL("Key Items")] end - + def self.set(settingname,oldsetting) cmd = pbMessage(_INTL("Choose a pocket for this item."),pocketnames(),-1) return (cmd>=0) ? cmd+1 : oldsetting @@ -1516,4 +1516,4 @@ def pbPropertyList(title,data,properties,saveprompt=false) desc.dispose Input.update return retval -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/007_Editor_Listers.rb b/Data/Scripts/020_Debug/007_Editor_Listers.rb index 20ad30f72..870ba24a3 100644 --- a/Data/Scripts/020_Debug/007_Editor_Listers.rb +++ b/Data/Scripts/020_Debug/007_Editor_Listers.rb @@ -509,7 +509,7 @@ class TrainerTypeLister wh = (Graphics.height-64).to_f() else wh = sx*wh - ww = (Graphics.width-256).to_f() + ww = (Graphics.width-256).to_f() end end @sprite.x = (Graphics.width-((Graphics.width-256)/2))-(ww/2) @@ -615,4 +615,4 @@ class TrainerBattleLister @pkmnList.resizeHeightToFit(text,Graphics.width/2) @pkmnList.y = Graphics.height-@pkmnList.height end -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/008_Editor_Utilities.rb b/Data/Scripts/020_Debug/008_Editor_Utilities.rb index 5b04a9211..248534401 100644 --- a/Data/Scripts/020_Debug/008_Editor_Utilities.rb +++ b/Data/Scripts/020_Debug/008_Editor_Utilities.rb @@ -313,7 +313,7 @@ def pbChooseMoveListForSpecies(species,defaultMoveID=0) for command in commands realcommands.push("#{command[1]}") end - ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true) + ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true) cmdwin.dispose return (ret>=0) ? commands[ret][0] : 0 end @@ -374,7 +374,7 @@ def pbChooseBallList(defaultMoveID=-1) for i in commands realcommands.push(i[2]) end - ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true) + ret = pbCommands2(cmdwin,realcommands,-1,moveDefault,true) cmdwin.dispose return (ret>=0) ? commands[ret][0] : defaultMoveID end @@ -546,4 +546,4 @@ def pbCommandsSortable(cmdwindow,commands,cmdIfCancel,defaultindex=-1,sortable=f ret = command cmdwindow.active = false return ret -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/009_Editor_TilesetEditor.rb b/Data/Scripts/020_Debug/009_Editor_TilesetEditor.rb index 7f7deeffc..788b2638c 100644 --- a/Data/Scripts/020_Debug/009_Editor_TilesetEditor.rb +++ b/Data/Scripts/020_Debug/009_Editor_TilesetEditor.rb @@ -206,4 +206,4 @@ rescue Exception if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" raise $! end -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/010_Editor_MapConnectionEditor.rb b/Data/Scripts/020_Debug/010_Editor_MapConnectionEditor.rb index 9bca0e2ea..e16bb9c7d 100644 --- a/Data/Scripts/020_Debug/010_Editor_MapConnectionEditor.rb +++ b/Data/Scripts/020_Debug/010_Editor_MapConnectionEditor.rb @@ -39,7 +39,7 @@ end class SelectionSprite < Sprite def initialize(viewport=nil) @sprite=Sprite.new(viewport) - @sprite.bitmap=nil + @sprite.bitmap=nil @sprite.z=2 @othersprite=nil end @@ -416,10 +416,10 @@ class MapScreenScene otherdims=MapFactoryHelper.getMapDims(i) x1=(thissprite.x-othersprite.x)/4 y1=(thissprite.y-othersprite.y)/4 - if (x1==otherdims[0] || x1==-thisdims[0] || + if (x1==otherdims[0] || x1==-thisdims[0] || y1==otherdims[1] || y1==-thisdims[1]) ret.push(i) - end + end end # If no direct connections, add an indirect connection if ret.length==0 @@ -705,7 +705,7 @@ class MapScreenScene if mousepos hitmap=hittest(mousepos[0],mousepos[1]) if Input.triggerex?(Input::LeftMouseKey) - onClick(hitmap,mousepos[0],mousepos[1]) + onClick(hitmap,mousepos[0],mousepos[1]) elsif Input.triggerex?(Input::RightMouseKey) onRightClick(hitmap,mousepos[0],mousepos[1]) elsif Input.releaseex?(Input::LeftMouseKey) @@ -810,4 +810,4 @@ def pbConnectionsEditor mapscreen.pbMapScreenLoop mapscreen.close } -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/011_Editor_SpritePosEditor.rb b/Data/Scripts/020_Debug/011_Editor_SpritePosEditor.rb index 88bd30d79..af815c79e 100644 --- a/Data/Scripts/020_Debug/011_Editor_SpritePosEditor.rb +++ b/Data/Scripts/020_Debug/011_Editor_SpritePosEditor.rb @@ -1,5 +1,5 @@ #=============================================================================== -# +# #=============================================================================== def findBottom(bitmap) return 0 if !bitmap @@ -42,7 +42,7 @@ end #=============================================================================== -# +# #=============================================================================== class SpritePositioner def pbOpen @@ -390,7 +390,7 @@ class SpritePositioner end end @oldSpeciesIndex = cw.index - cw.dispose + cw.dispose return species end end @@ -398,7 +398,7 @@ end #=============================================================================== -# +# #=============================================================================== class SpritePositionerScreen def initialize(scene) @@ -422,4 +422,4 @@ class SpritePositionerScreen end @scene.pbClose end -end \ No newline at end of file +end diff --git a/Data/Scripts/020_Debug/012_Editor_BattleAnimationEditor.rb b/Data/Scripts/020_Debug/012_Editor_BattleAnimationEditor.rb index 6784dde5d..f1c13c3e4 100644 --- a/Data/Scripts/020_Debug/012_Editor_BattleAnimationEditor.rb +++ b/Data/Scripts/020_Debug/012_Editor_BattleAnimationEditor.rb @@ -26,7 +26,7 @@ class Window_Menu < Window_CommandPokemon def hittest mousepos=Mouse::getMousePos - return -1 if !mousepos + return -1 if !mousepos toprow=self.top_row for i in toprow...toprow+@item_max rc=Rect.new(0,32*(i-toprow),self.contents.width,32) @@ -36,7 +36,7 @@ class Window_Menu < Window_CommandPokemon return i end end - return -1 + return -1 end end @@ -169,7 +169,7 @@ class Button < UIControl return if !mousepos rect=Rect.new(self.x+1,self.y+1,self.width-2,self.height-2) rect=toAbsoluteRect(rect) - if Input.triggerex?(Input::LeftMouseKey) && + if Input.triggerex?(Input::LeftMouseKey) && rect.contains(mousepos[0],mousepos[1]) && !@captured @captured=true self.invalidate @@ -406,7 +406,7 @@ class TextField < UIControl for i in startpos...scanlength c=textscan[i] textwidth=bitmap.text_size(c).width - next if c=="\n" + next if c=="\n" # Draw text shadowtext(bitmap,x,y, textwidth+4, 32, c) # Draw cursor if necessary @@ -885,7 +885,7 @@ class OptionalTextSlider < TextSlider @slider.width=self.width-checkboxwidth @slider.height=self.height @slider.disabled=!@checkbox.checked - end + end end @@ -1109,7 +1109,7 @@ def pbTrackPopupMenu(commands) if Input.trigger?(Input::C) hit=menuwindow.index menuwindow.dispose - return hit + return hit end if Input.trigger?(Input::B) # Escape break @@ -1235,7 +1235,7 @@ class AnimationWindow < SpriteWrapper return end end - # Left arrow + # Left arrow if left.contains(mousepos[0],mousepos[1]) if Input.repeatcount(Input::LeftMouseKey)>30 @start-=3 @@ -1268,7 +1268,7 @@ class CanvasAnimationWindow < AnimationWindow def initialize(canvas,x,y,width,height,viewport=nil) @canvas=canvas super(x,y,width,height,viewport) - end + end end @@ -1571,7 +1571,7 @@ class AnimationCanvas < Sprite def invalidate for i in 0...PBAnimation::MAX_SPRITES invalidateCel(i) - end + end end def invalidateCel(i) @@ -1628,7 +1628,7 @@ class AnimationCanvas < Sprite @animation[frame][i][AnimFrame::X]+=ox @animation[frame][i][AnimFrame::Y]+=oy end - @dirty[i]=true if frame==@currentframe + @dirty[i]=true if frame==@currentframe end end end @@ -1642,7 +1642,7 @@ class AnimationCanvas < Sprite else pbResetCel(@animation[frame][i]) end - @dirty[i]=true if frame==@currentframe + @dirty[i]=true if frame==@currentframe end end end @@ -1790,7 +1790,7 @@ class AnimationCanvas < Sprite if mousepos && pbSpriteHitTest(self,mousepos[0],mousepos[1],false,true) if Input.triggerex?(Input::LeftMouseKey) # Left mouse button selectedcel=-1 - usealpha=(Input.press?(Input::ALT)) ? true : false + usealpha=(Input.press?(Input::ALT)) ? true : false for j in 0...PBAnimation::MAX_SPRITES if pbSpriteHitTest(@celsprites[j],mousepos[0],mousepos[1],usealpha,false) selectedcel=j @@ -1846,7 +1846,7 @@ class AnimationCanvas < Sprite if Input.repeatex?(0x4C) # "L" for lock cel[AnimFrame::LOCKED]=(cel[AnimFrame::LOCKED]==0) ? 1 : 0 @dirty[@currentcel]=true - end + end if Input.repeatex?(0x52) # "R" for rotate right cel[AnimFrame::ANGLE]+=10 cel[AnimFrame::ANGLE]%=360 @@ -1931,7 +1931,7 @@ class AnimationCanvas < Sprite @celsprites[i].y+=BORDERSIZE setPreviousFrame(i) setFrame(i) - @dirty[i]=false + @dirty[i]=false end end end @@ -2819,8 +2819,8 @@ end def pbAnimList(animations,canvas,animwin) commands=[] for i in 0...animations.length - animations[i]=PBAnimation.new if !animations[i] - commands[commands.length]=_INTL("{1} {2}",i,animations[i].name) + animations[i]=PBAnimation.new if !animations[i] + commands[commands.length]=_INTL("{1} {2}",i,animations[i].name) end cmdwin=pbListWindow(commands,320) cmdwin.height=416 @@ -2869,7 +2869,7 @@ def pbAnimList(animations,canvas,animwin) elsif cmd2==2 # Delete if pbConfirmMessage(_INTL("Are you sure you want to delete this animation?")) animations[cmdwin.index]=PBAnimation.new - cmdwin.commands[cmdwin.index]=_INTL("{1} {2}",cmdwin.index,animations[cmdwin.index].name) + cmdwin.commands[cmdwin.index]=_INTL("{1} {2}",cmdwin.index,animations[cmdwin.index].name) cmdwin.refresh end end @@ -3155,7 +3155,7 @@ end -def catmullRom(p1,p2,p3,p4,t) +def catmullRom(p1,p2,p3,p4,t) # p1=prevPoint, p2=startPoint, p3=endPoint, p4=nextPoint, t is from 0 through 1 t2=t*t t3=t2*t @@ -3422,7 +3422,7 @@ end # Window classes ################################################################################ class BitmapDisplayWindow < SpriteWindow_Base - attr_reader :bitmapname + attr_reader :bitmapname attr_reader :hue def initialize(x,y,width,height) @@ -3459,7 +3459,7 @@ class BitmapDisplayWindow < SpriteWindow_Base wh=self.contents.height else wh=sx*wh - ww=self.contents.width + ww=self.contents.width end dest=Rect.new( (self.contents.width-ww)/2, @@ -3806,4 +3806,4 @@ def pbConvertAnimsToNewFormat $PokemonTemp.battleAnims = nil end pbMessage(_INTL("{1} animations converted to new format.",count)) -end \ No newline at end of file +end diff --git a/Data/Scripts/021_Compiler/002_Compiler_PBS.rb b/Data/Scripts/021_Compiler/002_Compiler_PBS.rb index 9f608bc7d..c5ab09b33 100644 --- a/Data/Scripts/021_Compiler/002_Compiler_PBS.rb +++ b/Data/Scripts/021_Compiler/002_Compiler_PBS.rb @@ -114,7 +114,7 @@ def pbCompileConnections record.push(csvInt!(thisline,lineno)) record.push(csvInt!(thisline,lineno)) record.push(csvEnumFieldOrInt!(thisline,hashenum,"",sprintf("(line %d)",lineno))) - record.push(csvInt!(thisline,lineno)) + record.push(csvInt!(thisline,lineno)) if !pbRgssExists?(sprintf("Data/Map%03d.rxdata",record[0])) && !pbRgssExists?(sprintf("Data/Map%03d.rvdata",record[0])) print _INTL("Warning: Map {1}, as mentioned in the map connection data, was not found.\r\n{2}",record[0],FileLineData.linereport) @@ -173,22 +173,22 @@ def pbCompilePhoneData database.generics=section sections.concat(section) when "" - database.battleRequests=section + database.battleRequests=section sections.concat(section) when "" - database.greetingsMorning=section + database.greetingsMorning=section sections.concat(section) when "" - database.greetingsEvening=section + database.greetingsEvening=section sections.concat(section) when "" database.greetings=section sections.concat(section) when "" - database.bodies1=section + database.bodies1=section sections.concat(section) when "" - database.bodies2=section + database.bodies2=section sections.concat(section) end } @@ -496,7 +496,7 @@ class ItemList def initialize; @list = []; end def length; @list.length; end def []=(x,v); @list[x] = v; end - + def [](x) if !@list[x] defrecord = SerialRecord.new @@ -1462,7 +1462,7 @@ def pbCompileTrainers case settingname when "Pokemon" if record[1]>mLevel - raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[1],mLevel,FileLineData.linereport) + raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[1],mLevel,FileLineData.linereport) end when "Moves" record = [record] if record.is_a?(Integer) @@ -1566,7 +1566,7 @@ def pbCompileTrainers case i when TPLEVEL if record[i]>mLevel - raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[i],mLevel,FileLineData.linereport) + raise _INTL("Bad level: {1} (must be 1-{2})\r\n{3}",record[i],mLevel,FileLineData.linereport) end when TPABILITY+3 if record[i]>5 @@ -1641,9 +1641,9 @@ def pbCompileBTTrainers(filename) schema = requiredtypes[key] next if !schema record = pbGetCsvRecord(section[key],0,schema) - rsection[schema[0]] = record + rsection[schema[0]] = record end - trainernames.push(rsection[1]) + trainernames.push(rsection[1]) beginspeech.push(rsection[2]) endspeechwin.push(rsection[3]) endspeechlose.push(rsection[4]) @@ -1690,7 +1690,7 @@ def pbCompileTrainerLists next if key=="Challenges" && name=="DefaultTrainerList" next if !schema record = pbGetCsvRecord(section[key],0,schema) - rsection[schema[0]] = record + rsection[schema[0]] = record end if !rsection[0] raise _INTL("No trainer data file given in section {1}\r\n{2}",name,FileLineData.linereport) @@ -1724,4 +1724,4 @@ def pbCompileTrainerLists } } save_data(sections,"Data/trainer_lists.dat") -end \ No newline at end of file +end diff --git a/Data/Scripts/021_Compiler/003_Compiler_MapsAndEvents.rb b/Data/Scripts/021_Compiler/003_Compiler_MapsAndEvents.rb index 84343d06f..3181a44c6 100644 --- a/Data/Scripts/021_Compiler/003_Compiler_MapsAndEvents.rb +++ b/Data/Scripts/021_Compiler/003_Compiler_MapsAndEvents.rb @@ -41,7 +41,7 @@ def pbImportNewMaps if $RPGVX save_data(mapinfos,"Data/MapInfos.rvdata") else - save_data(mapinfos,"Data/MapInfos.rxdata") + save_data(mapinfos,"Data/MapInfos.rxdata") end pbMessage(_INTL("{1} new map(s) copied to the Data folder were successfully imported.",count)) end @@ -202,7 +202,7 @@ def pbAddPassageList(event,mapData) end #=============================================================================== -# +# #=============================================================================== def safequote(x) x = x.gsub(/\"\#\'\\/) { |a| "\\"+a } @@ -236,13 +236,13 @@ def pbEachPage(e) yield e else e.pages.each { |page| yield page } - end + end end #=============================================================================== -# +# #=============================================================================== class MapData attr_reader :mapinfos @@ -400,7 +400,7 @@ end #=============================================================================== -# +# #=============================================================================== class TrainerChecker def initialize @@ -411,15 +411,15 @@ class TrainerChecker def pbTrainerTypeCheck(symbol) ret = true - if $DEBUG + if $DEBUG return if @dontaskagain if !hasConst?(PBTrainers,symbol) ret = false else trtype = PBTrainers.const_get(symbol) @trainertypes = load_data("Data/trainer_types.dat") if !@trainertypes - ret = false if !@trainertypes || !@trainertypes[trtype] - end + ret = false if !@trainertypes || !@trainertypes[trtype] + end if !ret if pbConfirmMessage(_INTL("Add new trainer named {1}?",symbol)) pbTrainerTypeEditorNew(symbol.to_s) @@ -430,7 +430,7 @@ class TrainerChecker # pbMapInterpreter.command_end rescue nil # end end - end + end return ret end @@ -490,7 +490,7 @@ def pbConvertToTrainerEvent(event,trainerChecker) firstpage.trigger = 2 # On event touch firstpage.list = [] # Clear page's commands # Rename the event if there's nothing above the trainer comments - if isFirstCommand + if isFirstCommand if !event.name[/trainer/i] ret.name = "Trainer(3)" elsif event.name[/^\s*trainer\s+\((\d+)\)\s*$/i] @@ -1002,7 +1002,7 @@ def pbFixEventUse(event,mapID,mapData) # repurposed, which is highly unlikely. It changes the Switch used # in the found event's condition to whichever is named # 's:tsOff?("A")'. - if e && e.pages.length>=2 && + if e && e.pages.length>=2 && e.pages[e.pages.length-1].condition.switch1_valid && e.pages[e.pages.length-1].condition.switch1_id==22 && mapData.switchName(e.pages[e.pages.length-1].condition.switch1_id)!='s:tsOff?("A")' && @@ -1024,7 +1024,7 @@ def pbFixEventUse(event,mapID,mapData) # named 's:tsOff?("A")', it really does look like a door. Make this # command transfer the player on top of it rather than in front of # it. - if e && e.pages.length>=2 && + if e && e.pages.length>=2 && e.pages[e.pages.length-1].condition.switch1_valid && mapData.switchName(e.pages[e.pages.length-1].condition.switch1_id)=='s:tsOff?("A")' # If this is really a door, move transfer target to it @@ -1039,7 +1039,7 @@ def pbFixEventUse(event,mapID,mapData) arr.push(list[_i]); list.delete_at(_i) while _i