From eb22e49d9b23dcd078a7564c24e03b5a9da43160 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Thu, 26 Nov 2020 21:10:45 +0000 Subject: [PATCH] Deleted rubyscreen.dll, eradicated semicolons from when... statements, compiling is now before setting up the system, appeased vocal dissenters --- Data/Scripts/001_Technical/004_RPG__Sprite.rb | 8 +- .../001_Technical/009_Plugin_Manager.rb | 10 +- .../003_Game classes/005_Game_Character.rb | 196 +++++++-------- .../003_Game classes/007_Game_Player.rb | 16 +- .../008_Game_Player_Visuals.rb | 8 +- Data/Scripts/003_Game classes/009_Game_Map.rb | 36 ++- .../010_Game_Map_Autoscroll.rb | 16 +- .../003_Game classes/011_MapFactory.rb | 59 +++-- .../004_Sprites/004_Sprite_WaterReflection.rb | 6 +- .../004_Sprites/009_Sprite_DynamicShadows.rb | 8 +- .../006_Game processing/001_Interpreter.rb | 234 +++++++++--------- .../006_Game processing/002_Scene_Map.rb | 8 +- .../007_Events and files/001_FileTests.rb | 22 +- .../002_MessageConfig.rb | 4 +- .../009_Objects and windows/010_DrawText.rb | 6 +- .../009_Objects and windows/012_TextEntry.rb | 36 +-- Data/Scripts/010_Scenes/001_Transitions.rb | 68 ++--- Data/Scripts/011_Data/001_Data_Cache.rb | 9 +- .../011_Data/001_Game data/001_Game data.rb | 1 - .../011_Data/001_Game data/002_Ability.rb | 1 - .../011_Data/001_Game data/003_Item.rb | 1 - .../011_Data/001_Game data/004_Berry plant.rb | 1 - .../011_Data/001_Game data/005_Metadata.rb | 1 - .../001_Game data/006_Map metadata.rb | 1 - .../011_Data/001_Game data/007_Move.rb | 1 - .../Hardcoded game data/004_PBGenderRates.rb | 16 +- .../001_Battler/003_Battler_ChangeSelf.rb | 10 +- .../001_Battler/004_Battler_Statuses.rb | 54 ++-- .../009_Battler_UseMove_SuccessChecks.rb | 8 +- .../002_Move/003_Move_Usage_Calculations.rb | 4 +- .../002_Move/005_Move_Effects_000-07F.rb | 42 ++-- .../002_Move/006_Move_Effects_080-0FF.rb | 28 +-- .../002_Move/007_Move_Effects_100-17F.rb | 6 +- Data/Scripts/012_Battle/002_PBWeather.rb | 16 +- .../003_Battle/002_PokeBattle_Battle.rb | 37 +-- .../003_Battle/003_Battle_StartAndEnd.rb | 16 +- .../003_Battle/012_Battle_Phase_EndOfRound.rb | 28 +-- .../012_Battle/003_PBBattleTerrains.rb | 8 +- .../004_AI/006_AI_Move_Utilities.rb | 10 +- .../001_PokeBattle_Animation.rb | 30 +-- .../002_PokeBattle_SceneAnimations.rb | 6 +- .../004_PokeBattle_SceneElements.rb | 12 +- .../005_Battle scene/007_Scene_Initialize.rb | 4 +- .../Scripts/013_Overworld/002_PField_Field.rb | 60 +++-- .../013_Overworld/003_PField_Visuals.rb | 8 +- .../013_Overworld/004_PField_Weather.rb | 24 +- .../013_Overworld/005_PField_Metadata.rb | 8 +- .../013_Overworld/006_PField_Battles.rb | 78 +++--- .../010_PField_RandomDungeons.rb | 33 ++- .../013_Overworld/012_PField_BerryPlants.rb | 26 +- .../014_PField_DependentEvents.rb | 26 +- Data/Scripts/015_Items/001_PItem_Items.rb | 14 +- .../015_Items/002_PItem_ItemEffects.rb | 8 +- Data/Scripts/016_Pokemon/001_Pokemon.rb | 6 +- .../Scripts/017_UI/003_PScreen_PokedexMain.rb | 22 +- .../017_UI/004_PScreen_PokedexEntry.rb | 10 +- Data/Scripts/017_UI/006_PScreen_Summary.rb | 18 +- Data/Scripts/017_UI/015_PScreen_Options.rb | 6 +- .../017_UI/017_PScreen_PokemonStorage.rb | 25 +- Data/Scripts/017_UI/019_PScreen_PC.rb | 6 +- Data/Scripts/017_UI/021_PScreen_Evolution.rb | 32 +-- .../002_PMinigame_TripleTriad.rb | 6 +- .../001_PSystem_Controls.rb | 58 ++--- .../003_PSystem_FileUtilities.rb | 20 +- .../005_PSystem_Utilities.rb | 29 +-- Data/Scripts/021_Debug/003_Debug_Pokemon.rb | 36 ++- Data/Scripts/021_Debug/005_Editor_SaveData.rb | 6 +- .../021_Debug/012_Editor_SpritePosEditor.rb | 26 +- Data/Scripts/022_Compiler/001_Data_storage.rb | 10 +- Data/Scripts/022_Compiler/002_Compiler.rb | 15 +- Data/Scripts/022_Compiler/003_Compiler_PBS.rb | 12 +- Data/Scripts/999_Main/999_Main.rb | 2 +- rubyscreen.dll | Bin 28160 -> 0 bytes 73 files changed, 905 insertions(+), 817 deletions(-) delete mode 100644 rubyscreen.dll diff --git a/Data/Scripts/001_Technical/004_RPG__Sprite.rb b/Data/Scripts/001_Technical/004_RPG__Sprite.rb index e719bb11a..e0909f533 100644 --- a/Data/Scripts/001_Technical/004_RPG__Sprite.rb +++ b/Data/Scripts/001_Technical/004_RPG__Sprite.rb @@ -205,10 +205,10 @@ class SpriteAnimation sprite.visible = true sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192) case @_animation_height - when 0; sprite.z = 1 - when 1; sprite.z = sprite.y+32+15 - when 2; sprite.z = sprite.y+32+32+17 - else; sprite.z = 2000 + when 0 then sprite.z = 1 + when 1 then sprite.z = sprite.y+32+15 + when 2 then sprite.z = sprite.y+32+32+17 + else sprite.z = 2000 end sprite.ox = 96 sprite.oy = 96 diff --git a/Data/Scripts/001_Technical/009_Plugin_Manager.rb b/Data/Scripts/001_Technical/009_Plugin_Manager.rb index bd7538d8f..e1ebb5ca3 100644 --- a/Data/Scripts/001_Technical/009_Plugin_Manager.rb +++ b/Data/Scripts/001_Technical/009_Plugin_Manager.rb @@ -219,9 +219,13 @@ module PluginManager optional = false exact = false case def_arg - when :optional; optional = true - when :exact; exact = true - when :optional_exact; optional = true; exact = true + when :optional + optional = true + when :exact + exact = true + when :optional_exact + optional = true + exact = true else self.error("Expected first dependency argument to be one of " + ":optional, :exact or :optional_exact, but got #{dep_arg.inspect}.") diff --git a/Data/Scripts/003_Game classes/005_Game_Character.rb b/Data/Scripts/003_Game classes/005_Game_Character.rb index 6221b5b61..84899b870 100644 --- a/Data/Scripts/003_Game classes/005_Game_Character.rb +++ b/Data/Scripts/003_Game classes/005_Game_Character.rb @@ -309,9 +309,9 @@ class Game_Character #============================================================================= def move_type_random case rand(6) - when 0..3; move_random - when 4; move_forward - when 5; @stop_count = 0 + when 0..3 then move_random + when 4 then move_forward + when 5 then @stop_count = 0 end end @@ -323,9 +323,9 @@ class Game_Character return end case rand(6) - when 0..3; move_toward_player - when 4; move_random - when 5; move_forward + when 0..3 then move_toward_player + when 4 then move_random + when 5 then move_forward end end @@ -349,20 +349,20 @@ class Game_Character end if command.code <= 14 case command.code - when 1; move_down - when 2; move_left - when 3; move_right - when 4; move_up - when 5; move_lower_left - when 6; move_lower_right - when 7; move_upper_left - when 8; move_upper_right - when 9; move_random - when 10; move_toward_player - when 11; move_away_from_player - when 12; move_forward - when 13; move_backward - when 14; jump(command.parameters[0], command.parameters[1]) + when 1 then move_down + when 2 then move_left + when 3 then move_right + when 4 then move_up + when 5 then move_lower_left + when 6 then move_lower_right + when 7 then move_upper_left + when 8 then move_upper_right + when 9 then move_random + when 10 then move_toward_player + when 11 then move_away_from_player + when 12 then move_forward + when 13 then move_backward + when 14 then jump(command.parameters[0], command.parameters[1]) end @move_route_index += 1 if @move_route.skippable or moving? or jumping? return @@ -374,17 +374,17 @@ class Game_Character end if command.code >= 16 and command.code <= 26 case command.code - when 16; turn_down - when 17; turn_left - when 18; turn_right - when 19; turn_up - when 20; turn_right_90 - when 21; turn_left_90 - when 22; turn_180 - when 23; turn_right_or_left_90 - when 24; turn_random - when 25; turn_toward_player - when 26; turn_away_from_player + when 16 then turn_down + when 17 then turn_left + when 18 then turn_right + when 19 then turn_up + when 20 then turn_right_90 + when 21 then turn_left_90 + when 22 then turn_180 + when 23 then turn_right_or_left_90 + when 24 then turn_random + when 25 then turn_toward_player + when 26 then turn_away_from_player end @move_route_index += 1 return @@ -397,18 +397,18 @@ class Game_Character when 28 $game_switches[command.parameters[0]] = false self.map.need_refresh = true - when 29; self.move_speed = command.parameters[0] - when 30; self.move_frequency = command.parameters[0] - when 31; @walk_anime = true - when 32; @walk_anime = false - when 33; @step_anime = true - when 34; @step_anime = false - when 35; @direction_fix = true - when 36; @direction_fix = false - when 37; @through = true - when 38; @through = false - when 39; @always_on_top = true - when 40; @always_on_top = false + when 29 then self.move_speed = command.parameters[0] + when 30 then self.move_frequency = command.parameters[0] + when 31 then @walk_anime = true + when 32 then @walk_anime = false + when 33 then @step_anime = true + when 34 then @step_anime = false + when 35 then @direction_fix = true + when 36 then @direction_fix = false + when 37 then @through = true + when 38 then @through = false + when 39 then @always_on_top = true + when 40 then @always_on_top = false when 41 @tile_id = 0 @character_name = command.parameters[0] @@ -422,10 +422,10 @@ class Game_Character @pattern = command.parameters[3] @original_pattern = @pattern end - when 42; @opacity = command.parameters[0] - when 43; @blend_type = command.parameters[0] - when 44; pbSEPlay(command.parameters[0]) - when 45; eval(command.parameters[0]) + when 42 then @opacity = command.parameters[0] + when 43 then @blend_type = command.parameters[0] + when 44 then pbSEPlay(command.parameters[0]) + when 45 then eval(command.parameters[0]) end @move_route_index += 1 end @@ -512,28 +512,28 @@ class Game_Character def moveLeft90 # anticlockwise case self.direction - when 2; move_right # down - when 4; move_down # left - when 6; move_up # right - when 8; move_left # up + when 2 then move_right # down + when 4 then move_down # left + when 6 then move_up # right + when 8 then move_left # up end end def moveRight90 # clockwise case self.direction - when 2; move_left # down - when 4; move_up # left - when 6; move_down # right - when 8; move_right # up + when 2 then move_left # down + when 4 then move_up # left + when 6 then move_down # right + when 8 then move_right # up end end def move_random case rand(4) - when 0; move_down(false) - when 1; move_left(false) - when 2; move_right(false) - when 3; move_up(false) + when 0 then move_down(false) + when 1 then move_left(false) + when 2 then move_right(false) + when 3 then move_up(false) end end @@ -553,10 +553,10 @@ class Game_Character end return if dirs.length==0 case dirs[rand(dirs.length)] - when 0; move_down(false) - when 1; move_left(false) - when 2; move_right(false) - when 3; move_up(false) + when 0 then move_down(false) + when 1 then move_left(false) + when 2 then move_right(false) + when 3 then move_up(false) end end @@ -614,10 +614,10 @@ class Game_Character def move_forward case @direction - when 2; move_down(false) - when 4; move_left(false) - when 6; move_right(false) - when 8; move_up(false) + when 2 then move_down(false) + when 4 then move_left(false) + when 6 then move_right(false) + when 8 then move_up(false) end end @@ -625,10 +625,10 @@ class Game_Character last_direction_fix = @direction_fix @direction_fix = true case @direction - when 2; move_up(false) - when 4; move_right(false) - when 6; move_left(false) - when 8; move_down(false) + when 2 then move_up(false) + when 4 then move_right(false) + when 6 then move_left(false) + when 8 then move_down(false) end @direction_fix = last_direction_fix end @@ -666,19 +666,19 @@ class Game_Character def jumpForward case self.direction - when 2; jump(0,1) # down - when 4; jump(-1,0) # left - when 6; jump(1,0) # right - when 8; jump(0,-1) # up + when 2 then jump(0,1) # down + when 4 then jump(-1,0) # left + when 6 then jump(1,0) # right + when 8 then jump(0,-1) # up end end def jumpBackward case self.direction - when 2; jump(0,-1) # down - when 4; jump(1,0) # left - when 6; jump(-1,0) # right - when 8; jump(0,1) # up + when 2 then jump(0,-1) # down + when 4 then jump(1,0) # left + when 6 then jump(-1,0) # right + when 8 then jump(0,1) # up end end @@ -697,28 +697,28 @@ class Game_Character def turn_right_90 case @direction - when 2; turn_left - when 4; turn_up - when 6; turn_down - when 8; turn_right + when 2 then turn_left + when 4 then turn_up + when 6 then turn_down + when 8 then turn_right end end def turn_left_90 case @direction - when 2; turn_right - when 4; turn_down - when 6; turn_up - when 8; turn_left + when 2 then turn_right + when 4 then turn_down + when 6 then turn_up + when 8 then turn_left end end def turn_180 case @direction - when 2; turn_up - when 4; turn_right - when 6; turn_left - when 8; turn_down + when 2 then turn_up + when 4 then turn_right + when 6 then turn_left + when 8 then turn_down end end @@ -728,10 +728,10 @@ class Game_Character def turn_random case rand(4) - when 0; turn_up - when 1; turn_right - when 2; turn_left - when 3; turn_down + when 0 then turn_up + when 1 then turn_right + when 2 then turn_left + when 3 then turn_down end end @@ -793,9 +793,9 @@ class Game_Character # 6 => @stop_count > 0 # 0 seconds if @stop_count >= self.move_frequency_real case @move_type - when 1; move_type_random - when 2; move_type_toward_player - when 3; move_type_custom + when 1 then move_type_random + when 2 then move_type_toward_player + when 3 then move_type_custom end end end diff --git a/Data/Scripts/003_Game classes/007_Game_Player.rb b/Data/Scripts/003_Game classes/007_Game_Player.rb index 7c8cc2df4..862cb63a8 100644 --- a/Data/Scripts/003_Game classes/007_Game_Player.rb +++ b/Data/Scripts/003_Game classes/007_Game_Player.rb @@ -351,17 +351,17 @@ class Game_Player < Game_Character if @moved_last_frame || (dir > 0 && dir == @lastdir && Graphics.frame_count - @lastdirframe > Graphics.frame_rate / 20) case dir - when 2; move_down - when 4; move_left - when 6; move_right - when 8; move_up + when 2 then move_down + when 4 then move_left + when 6 then move_right + when 8 then move_up end elsif dir != @lastdir case dir - when 2; turn_down - when 4; turn_left - when 6; turn_right - when 8; turn_up + when 2 then turn_down + when 4 then turn_left + when 6 then turn_right + when 8 then turn_up end end 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 f0bcd28b4..7e57e4eb1 100644 --- a/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb +++ b/Data/Scripts/003_Game classes/008_Game_Player_Visuals.rb @@ -3,10 +3,10 @@ class Game_Player < Game_Character def fullPattern case self.direction - when 2; return self.pattern - when 4; return 4+self.pattern - when 6; return 8+self.pattern - when 8; return 12+self.pattern + when 2 then return self.pattern + when 4 then return self.pattern + 4 + when 6 then return self.pattern + 8 + when 8 then return self.pattern + 12 end return 0 end diff --git a/Data/Scripts/003_Game classes/009_Game_Map.rb b/Data/Scripts/003_Game classes/009_Game_Map.rb index cf0c2f701..c5aa71391 100644 --- a/Data/Scripts/003_Game classes/009_Game_Map.rb +++ b/Data/Scripts/003_Game classes/009_Game_Map.rb @@ -161,14 +161,26 @@ class Game_Map # All other events newx = x; newy = y case d - when 1; newx -= 1; newy += 1 - when 2; newy += 1 - when 3; newx += 1; newy += 1 - when 4; newx -= 1 - when 6; newx += 1 - when 7; newx -= 1; newy -= 1 - when 8; newy -= 1 - when 9; newx += 1; newy -= 1 + when 1 + newx -= 1 + newy += 1 + when 2 + newy += 1 + when 3 + newx += 1 + newy += 1 + when 4 + newx -= 1 + when 6 + newx += 1 + when 7 + newx -= 1 + newy -= 1 + when 8 + newy -= 1 + when 9 + newx += 1 + newy -= 1 end return false if !valid?(newx, newy) for i in [2, 1, 0] @@ -403,10 +415,10 @@ class Game_Map distance = (1<<@scroll_speed)*40.0/Graphics.frame_rate distance = @scroll_rest if distance>@scroll_rest case @scroll_direction - when 2; scroll_down(distance) - when 4; scroll_left(distance) - when 6; scroll_right(distance) - when 8; scroll_up(distance) + when 2 then scroll_down(distance) + when 4 then scroll_left(distance) + when 6 then scroll_right(distance) + when 8 then scroll_up(distance) end @scroll_rest -= distance 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 384a0795d..4d271b17f 100644 --- a/Data/Scripts/003_Game classes/010_Game_Map_Autoscroll.rb +++ b/Data/Scripts/003_Game classes/010_Game_Map_Autoscroll.rb @@ -178,14 +178,14 @@ class Game_Map distance = @scroll_rest if distance>@scroll_rest # Execute scrolling case @scroll_direction - when 1; scroll_downleft(distance) - when 2; scroll_down(distance) - when 3; scroll_downright(distance) - when 4; scroll_left(distance) - when 6; scroll_right(distance) - when 7; scroll_upleft(distance) - when 8; scroll_up(distance) - when 9; scroll_upright(distance) + when 1 then scroll_downleft(distance) + when 2 then scroll_down(distance) + when 3 then scroll_downright(distance) + when 4 then scroll_left(distance) + when 6 then scroll_right(distance) + when 7 then scroll_upleft(distance) + when 8 then scroll_up(distance) + when 9 then scroll_upright(distance) end # Subtract distance scrolled @scroll_rest -= distance diff --git a/Data/Scripts/003_Game classes/011_MapFactory.rb b/Data/Scripts/003_Game classes/011_MapFactory.rb index 3b3cfcc88..a72cbc6d2 100644 --- a/Data/Scripts/003_Game classes/011_MapFactory.rb +++ b/Data/Scripts/003_Game classes/011_MapFactory.rb @@ -294,15 +294,28 @@ class PokemonMapFactory def getFacingTileFromPos(mapID,x,y,direction=0,steps=1) id = mapID case direction - when 1; x -= steps; y += steps - when 2; y += steps - when 3; x += steps; y += steps - when 4; x -= steps - when 6; x += steps - when 7; x -= steps; y -= steps - when 8; y -= steps - when 9; x += steps; y -= steps - else; return [id,x,y] + when 1 + x -= steps + y += steps + when 2 + y += steps + when 3 + x += steps + y += steps + when 4 + x -= steps + when 6 + x += steps + when 7 + x -= steps + y -= steps + when 8 + y -= steps + when 9 + x += steps + y -= steps + else + return [id,x,y] end return getRealTilePos(mapID,x,y) end @@ -333,14 +346,26 @@ class PokemonMapFactory def getFacingCoords(x,y,direction=0,steps=1) case direction - when 1; x -= steps; y += steps - when 2; y += steps - when 3; x += steps; y += steps - when 4; x -= steps - when 6; x += steps - when 7; x -= steps; y -= steps - when 8; y -= steps - when 9; x += steps; y -= steps + when 1 + x -= steps + y += steps + when 2 + y += steps + when 3 + x += steps + y += steps + when 4 + x -= steps + when 6 + x += steps + when 7 + x -= steps + y -= steps + when 8 + y -= steps + when 9 + x += steps + y -= steps end return [x,y] end diff --git a/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb b/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb index 2525f0d70..4f199086c 100644 --- a/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb +++ b/Data/Scripts/004_Sprites/004_Sprite_WaterReflection.rb @@ -66,11 +66,7 @@ class Sprite_Reflection @sprite.zoom_x = @rsprite.zoom_x @sprite.zoom_y = @rsprite.zoom_y frame = (Graphics.frame_count%40)/10 - case frame - when 1; @sprite.zoom_x *= 0.95 - when 3; @sprite.zoom_x *= 1.05 - else; @sprite.zoom_x *= 1.0 - end + @sprite.zoom_x *= [1.0, 0.95, 1.0, 1.05][frame] @sprite.angle = 180.0 @sprite.mirror = true @sprite.bitmap = @rsprite.bitmap diff --git a/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb b/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb index 65c77b8e3..de02b9cd7 100644 --- a/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb +++ b/Data/Scripts/004_Sprites/009_Sprite_DynamicShadows.rb @@ -68,10 +68,10 @@ class Sprite_Shadow < RPG::Sprite sy = (@character.direction - 2) / 2 * @ch if self.angle > 90 or angle < -90 case @character.direction - when 2; sy = (8- 2) / 2 * @ch - when 4; sy = (6- 2) / 2 * @ch - when 6; sy = (4- 2) / 2 * @ch - when 8; sy = (2- 2) / 2 * @ch + when 2 then sy = (8- 2) / 2 * @ch + when 4 then sy = (6- 2) / 2 * @ch + when 6 then sy = (4- 2) / 2 * @ch + when 8 then sy = (2- 2) / 2 * @ch end end self.src_rect.set(sx, sy, @cw, @ch) diff --git a/Data/Scripts/006_Game processing/001_Interpreter.rb b/Data/Scripts/006_Game processing/001_Interpreter.rb index d2ad3eee5..ec1decbaa 100644 --- a/Data/Scripts/006_Game processing/001_Interpreter.rb +++ b/Data/Scripts/006_Game processing/001_Interpreter.rb @@ -261,103 +261,103 @@ class Interpreter @parameters = @list[@index].parameters # Branch by command code case @list[@index].code - when 101; return command_101 # Show Text - when 102; return command_102 # Show Choices - when 402; return command_402 # When [**] - when 403; return command_403 # When Cancel - when 103; return command_103 # Input Number - when 104; return command_104 # Change Text Options - when 105; return command_105 # Button Input Processing - when 106; return command_106 # Wait - when 111; return command_111 # Conditional Branch - when 411; return command_411 # Else - when 112; return command_112 # Loop - when 413; return command_413 # Repeat Above - when 113; return command_113 # Break Loop - when 115; return command_115 # Exit Event Processing - when 116; return command_116 # Erase Event - when 117; return command_117 # Call Common Event - when 118; return command_118 # Label - when 119; return command_119 # Jump to Label - when 121; return command_121 # Control Switches - when 122; return command_122 # Control Variables - when 123; return command_123 # Control Self Switch - when 124; return command_124 # Control Timer - when 125; return command_125 # Change Gold - when 126; return command_126 # Change Items - when 127; return command_127 # Change Weapons - when 128; return command_128 # Change Armor - when 129; return command_129 # Change Party Member - when 131; return command_131 # Change Windowskin - when 132; return command_132 # Change Battle BGM - when 133; return command_133 # Change Battle End ME - when 134; return command_134 # Change Save Access - when 135; return command_135 # Change Menu Access - when 136; return command_136 # Change Encounter - when 201; return command_201 # Transfer Player - when 202; return command_202 # Set Event Location - when 203; return command_203 # Scroll Map - when 204; return command_204 # Change Map Settings - when 205; return command_205 # Change Fog Color Tone - when 206; return command_206 # Change Fog Opacity - when 207; return command_207 # Show Animation - when 208; return command_208 # Change Transparent Flag - when 209; return command_209 # Set Move Route - when 210; return command_210 # Wait for Move's Completion - when 221; return command_221 # Prepare for Transition - when 222; return command_222 # Execute Transition - when 223; return command_223 # Change Screen Color Tone - when 224; return command_224 # Screen Flash - when 225; return command_225 # Screen Shake - when 231; return command_231 # Show Picture - when 232; return command_232 # Move Picture - when 233; return command_233 # Rotate Picture - when 234; return command_234 # Change Picture Color Tone - when 235; return command_235 # Erase Picture - when 236; return command_236 # Set Weather Effects - when 241; return command_241 # Play BGM - when 242; return command_242 # Fade Out BGM - when 245; return command_245 # Play BGS - when 246; return command_246 # Fade Out BGS - when 247; return command_247 # Memorize BGM/BGS - when 248; return command_248 # Restore BGM/BGS - when 249; return command_249 # Play ME - when 250; return command_250 # Play SE - when 251; return command_251 # Stop SE - when 301; return command_301 # Battle Processing - when 601; return command_601 # If Win - when 602; return command_602 # If Escape - when 603; return command_603 # If Lose - when 302; return command_302 # Shop Processing - when 303; return command_303 # Name Input Processing - when 311; return command_311 # Change HP - when 312; return command_312 # Change SP - when 313; return command_313 # Change State - when 314; return command_314 # Recover All - when 315; return command_315 # Change EXP - when 316; return command_316 # Change Level - when 317; return command_317 # Change Parameters - when 318; return command_318 # Change Skills - when 319; return command_319 # Change Equipment - when 320; return command_320 # Change Actor Name - when 321; return command_321 # Change Actor Class - when 322; return command_322 # Change Actor Graphic - when 331; return command_331 # Change Enemy HP - when 332; return command_332 # Change Enemy SP - when 333; return command_333 # Change Enemy State - when 334; return command_334 # Enemy Recover All - when 335; return command_335 # Enemy Appearance - when 336; return command_336 # Enemy Transform - when 337; return command_337 # Show Battle Animation - when 338; return command_338 # Deal Damage - when 339; return command_339 # Force Action - when 340; return command_340 # Abort Battle - when 351; return command_351 # Call Menu Screen - when 352; return command_352 # Call Save Screen - when 353; return command_353 # Game Over - when 354; return command_354 # Return to Title Screen - when 355; return command_355 # Script - else; return true # Other + when 101 then return command_101 # Show Text + when 102 then return command_102 # Show Choices + when 402 then return command_402 # When [**] + when 403 then return command_403 # When Cancel + when 103 then return command_103 # Input Number + when 104 then return command_104 # Change Text Options + when 105 then return command_105 # Button Input Processing + when 106 then return command_106 # Wait + when 111 then return command_111 # Conditional Branch + when 411 then return command_411 # Else + when 112 then return command_112 # Loop + when 413 then return command_413 # Repeat Above + when 113 then return command_113 # Break Loop + when 115 then return command_115 # Exit Event Processing + when 116 then return command_116 # Erase Event + when 117 then return command_117 # Call Common Event + when 118 then return command_118 # Label + when 119 then return command_119 # Jump to Label + when 121 then return command_121 # Control Switches + when 122 then return command_122 # Control Variables + when 123 then return command_123 # Control Self Switch + when 124 then return command_124 # Control Timer + when 125 then return command_125 # Change Gold + when 126 then return command_126 # Change Items + when 127 then return command_127 # Change Weapons + when 128 then return command_128 # Change Armor + when 129 then return command_129 # Change Party Member + when 131 then return command_131 # Change Windowskin + when 132 then return command_132 # Change Battle BGM + when 133 then return command_133 # Change Battle End ME + when 134 then return command_134 # Change Save Access + when 135 then return command_135 # Change Menu Access + when 136 then return command_136 # Change Encounter + when 201 then return command_201 # Transfer Player + when 202 then return command_202 # Set Event Location + when 203 then return command_203 # Scroll Map + when 204 then return command_204 # Change Map Settings + when 205 then return command_205 # Change Fog Color Tone + when 206 then return command_206 # Change Fog Opacity + when 207 then return command_207 # Show Animation + when 208 then return command_208 # Change Transparent Flag + when 209 then return command_209 # Set Move Route + when 210 then return command_210 # Wait for Move's Completion + when 221 then return command_221 # Prepare for Transition + when 222 then return command_222 # Execute Transition + when 223 then return command_223 # Change Screen Color Tone + when 224 then return command_224 # Screen Flash + when 225 then return command_225 # Screen Shake + when 231 then return command_231 # Show Picture + when 232 then return command_232 # Move Picture + when 233 then return command_233 # Rotate Picture + when 234 then return command_234 # Change Picture Color Tone + when 235 then return command_235 # Erase Picture + when 236 then return command_236 # Set Weather Effects + when 241 then return command_241 # Play BGM + when 242 then return command_242 # Fade Out BGM + when 245 then return command_245 # Play BGS + when 246 then return command_246 # Fade Out BGS + when 247 then return command_247 # Memorize BGM/BGS + when 248 then return command_248 # Restore BGM/BGS + when 249 then return command_249 # Play ME + when 250 then return command_250 # Play SE + when 251 then return command_251 # Stop SE + when 301 then return command_301 # Battle Processing + when 601 then return command_601 # If Win + when 602 then return command_602 # If Escape + when 603 then return command_603 # If Lose + when 302 then return command_302 # Shop Processing + when 303 then return command_303 # Name Input Processing + when 311 then return command_311 # Change HP + when 312 then return command_312 # Change SP + when 313 then return command_313 # Change State + when 314 then return command_314 # Recover All + when 315 then return command_315 # Change EXP + when 316 then return command_316 # Change Level + when 317 then return command_317 # Change Parameters + when 318 then return command_318 # Change Skills + when 319 then return command_319 # Change Equipment + when 320 then return command_320 # Change Actor Name + when 321 then return command_321 # Change Actor Class + when 322 then return command_322 # Change Actor Graphic + when 331 then return command_331 # Change Enemy HP + when 332 then return command_332 # Change Enemy SP + when 333 then return command_333 # Change Enemy State + when 334 then return command_334 # Enemy Recover All + when 335 then return command_335 # Enemy Appearance + when 336 then return command_336 # Enemy Transform + when 337 then return command_337 # Show Battle Animation + when 338 then return command_338 # Deal Damage + when 339 then return command_339 # Force Action + when 340 then return command_340 # Abort Battle + when 351 then return command_351 # Call Menu Screen + when 352 then return command_352 # Call Save Screen + when 353 then return command_353 # Game Over + when 354 then return command_354 # Return to Title Screen + when 355 then return command_355 # Script + else return true # Other end end @@ -842,22 +842,22 @@ class Interpreter character = get_character(@parameters[4]) if character != nil case @parameters[5] - when 0; value = character.x # x-coordinate - when 1; value = character.y # y-coordinate - when 2; value = character.direction # direction - when 3; value = character.screen_x # screen x-coordinate - when 4; value = character.screen_y # screen y-coordinate - when 5; value = character.terrain_tag # terrain tag + when 0 then value = character.x # x-coordinate + when 1 then value = character.y # y-coordinate + when 2 then value = character.direction # direction + when 3 then value = character.screen_x # screen x-coordinate + when 4 then value = character.screen_y # screen y-coordinate + when 5 then value = character.terrain_tag # terrain tag end end when 7 # other case @parameters[4] - when 0; value = $game_map.map_id # map ID + when 0 then value = $game_map.map_id # map ID # when 1, 3 # number of party members, steps - when 2; value = $Trainer.money # gold - when 4; value = Graphics.frame_count / Graphics.frame_rate # play time - when 5; value = $game_system.timer / Graphics.frame_rate # timer - when 6; value = $game_system.save_count # save count + when 2 then value = $Trainer.money # gold + when 4 then value = Graphics.frame_count / Graphics.frame_rate # play time + when 5 then value = $game_system.timer / Graphics.frame_rate # timer + when 6 then value = $game_system.save_count # save count end end # Loop for group control @@ -1077,14 +1077,10 @@ class Interpreter end # Set character direction case @parameters[4] - when 8 # up - character.turn_up - when 6 # right - character.turn_right - when 2 # down - character.turn_down - when 4 # left - character.turn_left + when 2 then character.turn_down + when 4 then character.turn_left + when 6 then character.turn_right + when 8 then character.turn_up end # Continue return true @@ -1113,10 +1109,10 @@ class Interpreter #----------------------------------------------------------------------------- def command_204 case @parameters[0] - when 0 # panorama + when 0 # panorama $game_map.panorama_name = @parameters[1] $game_map.panorama_hue = @parameters[2] - when 1 # fog + when 1 # fog $game_map.fog_name = @parameters[1] $game_map.fog_hue = @parameters[2] $game_map.fog_opacity = @parameters[3] @@ -1124,7 +1120,7 @@ class Interpreter $game_map.fog_zoom = @parameters[5] $game_map.fog_sx = @parameters[6] $game_map.fog_sy = @parameters[7] - when 2 # battleback + when 2 # battleback $game_map.battleback_name = @parameters[1] $game_temp.battleback_name = @parameters[1] end diff --git a/Data/Scripts/006_Game processing/002_Scene_Map.rb b/Data/Scripts/006_Game processing/002_Scene_Map.rb index 3e8ed2579..a5738d88d 100644 --- a/Data/Scripts/006_Game processing/002_Scene_Map.rb +++ b/Data/Scripts/006_Game processing/002_Scene_Map.rb @@ -72,10 +72,10 @@ class Scene_Map end $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y) case $game_temp.player_new_direction - when 2; $game_player.turn_down - when 4; $game_player.turn_left - when 6; $game_player.turn_right - when 8; $game_player.turn_up + when 2 then $game_player.turn_down + when 4 then $game_player.turn_left + when 6 then $game_player.turn_right + when 8 then $game_player.turn_up end $game_player.straighten $game_map.update diff --git a/Data/Scripts/007_Events and files/001_FileTests.rb b/Data/Scripts/007_Events and files/001_FileTests.rb index 68a6502be..18fe931f0 100644 --- a/Data/Scripts/007_Events and files/001_FileTests.rb +++ b/Data/Scripts/007_Events and files/001_FileTests.rb @@ -471,14 +471,16 @@ module MiniRegistry type = type.unpack("V")[0] data = data[0,size.unpack("V")[0]] case type - when 1; return data.chop # REG_SZ - when 2; return data.gsub(/%([^%]+)%/) { ENV[$1] || $& } # REG_EXPAND_SZ - when 3; return data # REG_BINARY - when 4; return data.unpack("V")[0] # REG_DWORD - when 5; return data.unpack("V")[0] # REG_DWORD_BIG_ENDIAN - when 11; data.unpack("VV"); return (data[1]<<32|data[0]) # REG_QWORD - else; raise "Type #{type} not supported." + when 1 then return data.chop # REG_SZ + when 2 then return data.gsub(/%([^%]+)%/) { ENV[$1] || $& } # REG_EXPAND_SZ + when 3 then return data # REG_BINARY + when 4 then return data.unpack("V")[0] # REG_DWORD + when 5 then return data.unpack("V")[0] # REG_DWORD_BIG_ENDIAN + when 11 # REG_QWORD + data.unpack("VV") + return (data[1]<<32|data[0]) end + raise "Type #{type} not supported." end private @@ -548,9 +550,9 @@ class StringInput def seek(offset, whence=IO::SEEK_SET) raise IOError, 'closed stream' if @closed case whence - when IO::SEEK_SET; @pos = offset - when IO::SEEK_CUR; @pos += offset - when IO::SEEK_END; @pos = @string.size - offset + when IO::SEEK_SET then @pos = offset + when IO::SEEK_CUR then @pos += offset + when IO::SEEK_END then @pos = @string.size - offset else raise ArgumentError, "unknown seek flag: #{whence}" end diff --git a/Data/Scripts/009_Objects and windows/002_MessageConfig.rb b/Data/Scripts/009_Objects and windows/002_MessageConfig.rb index 5f37472b9..58ef37d5d 100644 --- a/Data/Scripts/009_Objects and windows/002_MessageConfig.rb +++ b/Data/Scripts/009_Objects and windows/002_MessageConfig.rb @@ -206,8 +206,8 @@ def pbRepositionMessageWindow(msgwindow, linecount=2) end if $game_message case $game_message.background - when 1; msgwindow.opacity=0 # dim - when 2; msgwindow.opacity=0 # transparent + when 1 then msgwindow.opacity=0 # dim + when 2 then msgwindow.opacity=0 # transparent end end end diff --git a/Data/Scripts/009_Objects and windows/010_DrawText.rb b/Data/Scripts/009_Objects and windows/010_DrawText.rb index 0a49d277a..3be075bd5 100644 --- a/Data/Scripts/009_Objects and windows/010_DrawText.rb +++ b/Data/Scripts/009_Objects and windows/010_DrawText.rb @@ -863,9 +863,9 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32, next if block[0]>=block[1] for i in block[0]...block[1] case block[2] - when 1; characters[i][1]=xDst+(widthDst-block[3]-4)+characters[i][1] - when 2; characters[i][1]=xDst+((widthDst/2)-(block[3]/2))+characters[i][1] - else; characters[i][1]=xDst+characters[i][1] + when 1 then characters[i][1] = xDst + (widthDst - block[3] - 4) + characters[i][1] + when 2 then characters[i][1] = xDst + ((widthDst / 2) - (block[3] / 2)) + characters[i][1] + else characters[i][1] = xDst + characters[i][1] end end end diff --git a/Data/Scripts/009_Objects and windows/012_TextEntry.rb b/Data/Scripts/009_Objects and windows/012_TextEntry.rb index 93c2b7d24..4ef92c0dd 100644 --- a/Data/Scripts/009_Objects and windows/012_TextEntry.rb +++ b/Data/Scripts/009_Objects and windows/012_TextEntry.rb @@ -1093,9 +1093,9 @@ class PokemonEntryScene2 @cursor3.update updateCursorPos case @cursortype - when 0; @sprite.bitmap=@cursor1.bitmap - when 1; @sprite.bitmap=@cursor2.bitmap - when 2; @sprite.bitmap=@cursor3.bitmap + when 0 then @sprite.bitmap=@cursor1.bitmap + when 1 then @sprite.bitmap=@cursor2.bitmap + when 2 then @sprite.bitmap=@cursor3.bitmap end end @@ -1369,19 +1369,19 @@ class PokemonEntryScene2 elsif Input.repeat?(Input::UP) if @cursorpos<0 # Controls case @cursorpos - when MODE1; @cursorpos = ROWS*(COLUMNS-1) - when MODE2; @cursorpos = ROWS*(COLUMNS-1)+2 - when MODE3; @cursorpos = ROWS*(COLUMNS-1)+4 - when BACK; @cursorpos = ROWS*(COLUMNS-1)+8 - when OK; @cursorpos = ROWS*(COLUMNS-1)+11 + when MODE1 then @cursorpos = ROWS*(COLUMNS-1) + when MODE2 then @cursorpos = ROWS*(COLUMNS-1)+2 + when MODE3 then @cursorpos = ROWS*(COLUMNS-1)+4 + when BACK then @cursorpos = ROWS*(COLUMNS-1)+8 + when OK then @cursorpos = ROWS*(COLUMNS-1)+11 end elsif @cursorpos=ROWS*(COLUMNS-1) # Bottom row of letters case @cursorpos diff --git a/Data/Scripts/010_Scenes/001_Transitions.rb b/Data/Scripts/010_Scenes/001_Transitions.rb index 45f530ddb..3abf7d708 100644 --- a/Data/Scripts/010_Scenes/001_Transitions.rb +++ b/Data/Scripts/010_Scenes/001_Transitions.rb @@ -55,39 +55,39 @@ module Graphics dc = File.basename(filename).downcase case dc # Other coded transitions - when "breakingglass"; @@transition = Transitions::BreakingGlass.new(duration) - when "rotatingpieces"; @@transition = Transitions::ShrinkingPieces.new(duration, true) - when "shrinkingpieces"; @@transition = Transitions::ShrinkingPieces.new(duration, false) - when "splash"; @@transition = Transitions::SplashTransition.new(duration) - when "random_stripe_v"; @@transition = Transitions::RandomStripeTransition.new(duration, 0) - when "random_stripe_h"; @@transition = Transitions::RandomStripeTransition.new(duration, 1) - when "zoomin"; @@transition = Transitions::ZoomInTransition.new(duration) - when "scrolldown"; @@transition = Transitions::ScrollScreen.new(duration, 2) - when "scrollleft"; @@transition = Transitions::ScrollScreen.new(duration, 4) - when "scrollright"; @@transition = Transitions::ScrollScreen.new(duration, 6) - when "scrollup"; @@transition = Transitions::ScrollScreen.new(duration, 8) - when "scrolldownleft"; @@transition = Transitions::ScrollScreen.new(duration, 1) - when "scrolldownright"; @@transition = Transitions::ScrollScreen.new(duration, 3) - when "scrollupleft"; @@transition = Transitions::ScrollScreen.new(duration, 7) - when "scrollupright"; @@transition = Transitions::ScrollScreen.new(duration, 9) - when "mosaic"; @@transition = Transitions::MosaicTransition.new(duration) + when "breakingglass" then @@transition = Transitions::BreakingGlass.new(duration) + when "rotatingpieces" then @@transition = Transitions::ShrinkingPieces.new(duration, true) + when "shrinkingpieces" then @@transition = Transitions::ShrinkingPieces.new(duration, false) + when "splash" then @@transition = Transitions::SplashTransition.new(duration) + when "random_stripe_v" then @@transition = Transitions::RandomStripeTransition.new(duration, 0) + when "random_stripe_h" then @@transition = Transitions::RandomStripeTransition.new(duration, 1) + when "zoomin" then @@transition = Transitions::ZoomInTransition.new(duration) + when "scrolldown" then @@transition = Transitions::ScrollScreen.new(duration, 2) + when "scrollleft" then @@transition = Transitions::ScrollScreen.new(duration, 4) + when "scrollright" then @@transition = Transitions::ScrollScreen.new(duration, 6) + when "scrollup" then @@transition = Transitions::ScrollScreen.new(duration, 8) + when "scrolldownleft" then @@transition = Transitions::ScrollScreen.new(duration, 1) + when "scrolldownright" then @@transition = Transitions::ScrollScreen.new(duration, 3) + when "scrollupleft" then @@transition = Transitions::ScrollScreen.new(duration, 7) + when "scrollupright" then @@transition = Transitions::ScrollScreen.new(duration, 9) + when "mosaic" then @@transition = Transitions::MosaicTransition.new(duration) # HGSS transitions - when "snakesquares"; @@transition = Transitions::SnakeSquares.new(duration) - when "diagonalbubbletl"; @@transition = Transitions::DiagonalBubble.new(duration, 0) - when "diagonalbubbletr"; @@transition = Transitions::DiagonalBubble.new(duration, 1) - when "diagonalbubblebl"; @@transition = Transitions::DiagonalBubble.new(duration, 2) - when "diagonalbubblebr"; @@transition = Transitions::DiagonalBubble.new(duration, 3) - when "risingsplash"; @@transition = Transitions::RisingSplash.new(duration) - when "twoballpass"; @@transition = Transitions::TwoBallPass.new(duration) - when "spinballsplit"; @@transition = Transitions::SpinBallSplit.new(duration) - when "threeballdown"; @@transition = Transitions::ThreeBallDown.new(duration) - when "balldown"; @@transition = Transitions::BallDown.new(duration) - when "wavythreeballup"; @@transition = Transitions::WavyThreeBallUp.new(duration) - when "wavyspinball"; @@transition = Transitions::WavySpinBall.new(duration) - when "fourballburst"; @@transition = Transitions::FourBallBurst.new(duration) + when "snakesquares" then @@transition = Transitions::SnakeSquares.new(duration) + when "diagonalbubbletl" then @@transition = Transitions::DiagonalBubble.new(duration, 0) + when "diagonalbubbletr" then @@transition = Transitions::DiagonalBubble.new(duration, 1) + when "diagonalbubblebl" then @@transition = Transitions::DiagonalBubble.new(duration, 2) + when "diagonalbubblebr" then @@transition = Transitions::DiagonalBubble.new(duration, 3) + when "risingsplash" then @@transition = Transitions::RisingSplash.new(duration) + when "twoballpass" then @@transition = Transitions::TwoBallPass.new(duration) + when "spinballsplit" then @@transition = Transitions::SpinBallSplit.new(duration) + when "threeballdown" then @@transition = Transitions::ThreeBallDown.new(duration) + when "balldown" then @@transition = Transitions::BallDown.new(duration) + when "wavythreeballup" then @@transition = Transitions::WavyThreeBallUp.new(duration) + when "wavyspinball" then @@transition = Transitions::WavySpinBall.new(duration) + when "fourballburst" then @@transition = Transitions::FourBallBurst.new(duration) # Graphic transitions - when ""; @@transition = Transitions::FadeTransition.new(duration) - else; ret = false + when "" then @@transition = Transitions::FadeTransition.new(duration) + else ret = false end Graphics.frame_reset if ret return ret @@ -736,9 +736,9 @@ module Transitions @sprites[k].visible = false @sprites[k].bitmap = @bitmap case origin - when 1; k = i*cx+(cx-1-j) # Top right - when 2; k = @numtiles-1-(i*cx+(cx-1-j)) # Bottom left - when 3; k = @numtiles-1-k # Bottom right + when 1 then k = i*cx+(cx-1-j) # Top right + when 2 then k = @numtiles-1-(i*cx+(cx-1-j)) # Bottom left + when 3 then k = @numtiles-1-k # Bottom right end @frame[k] = ((0.6*j*width+0.8*i*height)*(@numframes/50)/l).floor end diff --git a/Data/Scripts/011_Data/001_Data_Cache.rb b/Data/Scripts/011_Data/001_Data_Cache.rb index b0df3b0a9..7460664cc 100644 --- a/Data/Scripts/011_Data/001_Data_Cache.rb +++ b/Data/Scripts/011_Data/001_Data_Cache.rb @@ -117,9 +117,12 @@ def pbGetSpeciesData(species, form = 0, species_data_type = -1) end return species_data[s][species_data_type] if species_data[s] && species_data[s][species_data_type] case species_data_type - when SpeciesData::TYPE2; return nil - when SpeciesData::BASE_STATS; return [1, 1, 1, 1, 1, 1] - when SpeciesData::EFFORT_POINTS; return [0, 0, 0, 0, 0, 0] + when SpeciesData::TYPE2 + return nil + when SpeciesData::BASE_STATS + return [1, 1, 1, 1, 1, 1] + when SpeciesData::EFFORT_POINTS + return [0, 0, 0, 0, 0, 0] when SpeciesData::STEPS_TO_HATCH, SpeciesData::HEIGHT, SpeciesData::WEIGHT return 1 end diff --git a/Data/Scripts/011_Data/001_Game data/001_Game data.rb b/Data/Scripts/011_Data/001_Game data/001_Game data.rb index b71661605..70f0a8220 100644 --- a/Data/Scripts/011_Data/001_Game data/001_Game data.rb +++ b/Data/Scripts/011_Data/001_Game data/001_Game data.rb @@ -104,7 +104,6 @@ module GameData # @return [Boolean] whether other represents the same thing as this thing def ==(other) return false if other.nil? - validate other => [Symbol, self.class, String, Integer] if other.is_a?(Symbol) return @id == other elsif other.is_a?(self.class) diff --git a/Data/Scripts/011_Data/001_Game data/002_Ability.rb b/Data/Scripts/011_Data/001_Game data/002_Ability.rb index 41dc2698f..2de14fccf 100644 --- a/Data/Scripts/011_Data/001_Game data/002_Ability.rb +++ b/Data/Scripts/011_Data/001_Game data/002_Ability.rb @@ -12,7 +12,6 @@ module GameData include InstanceMethods def initialize(hash) - validate hash => Hash, hash[:id] => Symbol @id = hash[:id] @id_number = hash[:id_number] || -1 @real_name = hash[:name] || "Unnamed" diff --git a/Data/Scripts/011_Data/001_Game data/003_Item.rb b/Data/Scripts/011_Data/001_Game data/003_Item.rb index 69ba5987b..781bd94ca 100644 --- a/Data/Scripts/011_Data/001_Game data/003_Item.rb +++ b/Data/Scripts/011_Data/001_Game data/003_Item.rb @@ -19,7 +19,6 @@ module GameData include InstanceMethods def initialize(hash) - validate hash => Hash, hash[:id] => Symbol @id = hash[:id] @id_number = hash[:id_number] || -1 @real_name = hash[:name] || "Unnamed" diff --git a/Data/Scripts/011_Data/001_Game data/004_Berry plant.rb b/Data/Scripts/011_Data/001_Game data/004_Berry plant.rb index 7cd3ae377..322da1066 100644 --- a/Data/Scripts/011_Data/001_Game data/004_Berry plant.rb +++ b/Data/Scripts/011_Data/001_Game data/004_Berry plant.rb @@ -16,7 +16,6 @@ module GameData include InstanceMethods def initialize(hash) - validate hash => Hash, hash[:id] => Symbol @id = hash[:id] @id_number = hash[:id_number] || -1 @hours_per_stage = hash[:hours_per_stage] || 3 diff --git a/Data/Scripts/011_Data/001_Game data/005_Metadata.rb b/Data/Scripts/011_Data/001_Game data/005_Metadata.rb index acdab800f..d420f6a60 100644 --- a/Data/Scripts/011_Data/001_Game data/005_Metadata.rb +++ b/Data/Scripts/011_Data/001_Game data/005_Metadata.rb @@ -83,7 +83,6 @@ module GameData end def initialize(hash) - validate hash => Hash, hash[:id] => Integer @id = hash[:id] @home = hash[:home] @wild_battle_BGM = hash[:wild_battle_BGM] diff --git a/Data/Scripts/011_Data/001_Game data/006_Map metadata.rb b/Data/Scripts/011_Data/001_Game data/006_Map metadata.rb index 6102f03e2..e68c04edc 100644 --- a/Data/Scripts/011_Data/001_Game data/006_Map metadata.rb +++ b/Data/Scripts/011_Data/001_Game data/006_Map metadata.rb @@ -77,7 +77,6 @@ module GameData end def initialize(hash) - validate hash => Hash, hash[:id] => Integer @id = hash[:id] @outdoor_map = hash[:outdoor_map] @announce_location = hash[:announce_location] diff --git a/Data/Scripts/011_Data/001_Game data/007_Move.rb b/Data/Scripts/011_Data/001_Game data/007_Move.rb index 9fce562ca..d2cea2f25 100644 --- a/Data/Scripts/011_Data/001_Game data/007_Move.rb +++ b/Data/Scripts/011_Data/001_Game data/007_Move.rb @@ -22,7 +22,6 @@ module GameData include InstanceMethods def initialize(hash) - validate hash => Hash, hash[:id] => Symbol @id = hash[:id] @id_number = hash[:id_number] || -1 @real_name = hash[:name] || "Unnamed" diff --git a/Data/Scripts/011_Data/Hardcoded game data/004_PBGenderRates.rb b/Data/Scripts/011_Data/Hardcoded game data/004_PBGenderRates.rb index cfa502211..57aff1803 100644 --- a/Data/Scripts/011_Data/Hardcoded game data/004_PBGenderRates.rb +++ b/Data/Scripts/011_Data/Hardcoded game data/004_PBGenderRates.rb @@ -10,14 +10,14 @@ module PBGenderRates def self.genderByte(gender) case gender - when AlwaysMale; return 0 - when FemaleOneEighth; return 32 - when Female25Percent; return 64 - when Female50Percent; return 128 - when Female75Percent; return 192 - when FemaleSevenEighths; return 224 - when AlwaysFemale; return 254 - when Genderless; return 255 + when AlwaysMale then return 0 + when FemaleOneEighth then return 32 + when Female25Percent then return 64 + when Female50Percent then return 128 + when Female75Percent then return 192 + when FemaleSevenEighths then return 224 + when AlwaysFemale then return 254 + when Genderless then return 255 end return 255 # Default value (genderless) end diff --git a/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb b/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb index 67a9d1bf6..4019f3f10 100644 --- a/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb +++ b/Data/Scripts/012_Battle/001_Battler/003_Battler_ChangeSelf.rb @@ -170,9 +170,9 @@ class PokeBattle_Battler if hasActiveAbility?(:FORECAST) newForm = 0 case @battle.pbWeather - when PBWeather::Sun, PBWeather::HarshSun; newForm = 1 - when PBWeather::Rain, PBWeather::HeavyRain; newForm = 2 - when PBWeather::Hail; newForm = 3 + when PBWeather::Sun, PBWeather::HarshSun then newForm = 1 + when PBWeather::Rain, PBWeather::HeavyRain then newForm = 2 + when PBWeather::Hail then newForm = 3 end if @form!=newForm @battle.pbShowAbilitySplash(self,true) @@ -187,9 +187,7 @@ class PokeBattle_Battler if isSpecies?(:CHERRIM) if hasActiveAbility?(:FLOWERGIFT) newForm = 0 - case @battle.pbWeather - when PBWeather::Sun, PBWeather::HarshSun; newForm = 1 - end + newForm = 1 if [PBWeather::Sun, PBWeather::HarshSun].include?(@battle.pbWeather) if @form!=newForm @battle.pbShowAbilitySplash(self,true) @battle.pbHideAbilitySplash(self) diff --git a/Data/Scripts/012_Battle/001_Battler/004_Battler_Statuses.rb b/Data/Scripts/012_Battle/001_Battler/004_Battler_Statuses.rb index 28f7c8ca1..8b5346376 100644 --- a/Data/Scripts/012_Battle/001_Battler/004_Battler_Statuses.rb +++ b/Data/Scripts/012_Battle/001_Battler/004_Battler_Statuses.rb @@ -30,11 +30,11 @@ class PokeBattle_Battler if showMessages msg = "" case self.status - when PBStatuses::SLEEP; msg = _INTL("{1} is already asleep!",pbThis) - when PBStatuses::POISON; msg = _INTL("{1} is already poisoned!",pbThis) - when PBStatuses::BURN; msg = _INTL("{1} already has a burn!",pbThis) - when PBStatuses::PARALYSIS; msg = _INTL("{1} is already paralyzed!",pbThis) - when PBStatuses::FROZEN; msg = _INTL("{1} is already frozen solid!",pbThis) + when PBStatuses::SLEEP then msg = _INTL("{1} is already asleep!",pbThis) + when PBStatuses::POISON then msg = _INTL("{1} is already poisoned!",pbThis) + when PBStatuses::BURN then msg = _INTL("{1} already has a burn!",pbThis) + when PBStatuses::PARALYSIS then msg = _INTL("{1} is already paralyzed!",pbThis) + when PBStatuses::FROZEN then msg = _INTL("{1} is already frozen solid!",pbThis) end @battle.pbDisplay(msg) end @@ -124,11 +124,11 @@ class PokeBattle_Battler msg = "" if PokeBattle_SceneConstants::USE_ABILITY_SPLASH case newStatus - when PBStatuses::SLEEP; msg = _INTL("{1} stays awake!",pbThis) - when PBStatuses::POISON; msg = _INTL("{1} cannot be poisoned!",pbThis) - when PBStatuses::BURN; msg = _INTL("{1} cannot be burned!",pbThis) - when PBStatuses::PARALYSIS; msg = _INTL("{1} cannot be paralyzed!",pbThis) - when PBStatuses::FROZEN; msg = _INTL("{1} cannot be frozen solid!",pbThis) + when PBStatuses::SLEEP then msg = _INTL("{1} stays awake!",pbThis) + when PBStatuses::POISON then msg = _INTL("{1} cannot be poisoned!",pbThis) + when PBStatuses::BURN then msg = _INTL("{1} cannot be burned!",pbThis) + when PBStatuses::PARALYSIS then msg = _INTL("{1} cannot be paralyzed!",pbThis) + when PBStatuses::FROZEN then msg = _INTL("{1} cannot be frozen solid!",pbThis) end elsif immAlly case newStatus @@ -150,11 +150,11 @@ class PokeBattle_Battler end else case newStatus - when PBStatuses::SLEEP; msg = _INTL("{1} stays awake because of its {2}!",pbThis,abilityName) - when PBStatuses::POISON; msg = _INTL("{1}'s {2} prevents poisoning!",pbThis,abilityName) - when PBStatuses::BURN; msg = _INTL("{1}'s {2} prevents burns!",pbThis,abilityName) - when PBStatuses::PARALYSIS; msg = _INTL("{1}'s {2} prevents paralysis!",pbThis,abilityName) - when PBStatuses::FROZEN; msg = _INTL("{1}'s {2} prevents freezing!",pbThis,abilityName) + when PBStatuses::SLEEP then msg = _INTL("{1} stays awake because of its {2}!",pbThis,abilityName) + when PBStatuses::POISON then msg = _INTL("{1}'s {2} prevents poisoning!",pbThis,abilityName) + when PBStatuses::BURN then msg = _INTL("{1}'s {2} prevents burns!",pbThis,abilityName) + when PBStatuses::PARALYSIS then msg = _INTL("{1}'s {2} prevents paralysis!",pbThis,abilityName) + when PBStatuses::FROZEN then msg = _INTL("{1}'s {2} prevents freezing!",pbThis,abilityName) end end @battle.pbDisplay(msg) @@ -401,16 +401,20 @@ class PokeBattle_Battler anim = ""; msg = "" case self.status when PBStatuses::SLEEP - anim = "Sleep"; msg = _INTL("{1} is fast asleep.",pbThis) + anim = "Sleep" + msg = _INTL("{1} is fast asleep.", pbThis) when PBStatuses::POISON anim = (@statusCount>0) ? "Toxic" : "Poison" - msg = _INTL("{1} was hurt by poison!",pbThis) + msg = _INTL("{1} was hurt by poison!", pbThis) when PBStatuses::BURN - anim = "Burn"; msg = _INTL("{1} was hurt by its burn!",pbThis) + anim = "Burn" + msg = _INTL("{1} was hurt by its burn!", pbThis) when PBStatuses::PARALYSIS - anim = "Paralysis"; msg = _INTL("{1} is paralyzed! It can't move!",pbThis) + anim = "Paralysis" + msg = _INTL("{1} is paralyzed! It can't move!", pbThis) when PBStatuses::FROZEN - anim = "Frozen"; msg = _INTL("{1} is frozen solid!",pbThis) + anim = "Frozen" + msg = _INTL("{1} is frozen solid!", pbThis) end @battle.pbCommonAnimation(anim,self) if anim!="" yield if block_given? @@ -423,11 +427,11 @@ class PokeBattle_Battler self.status = PBStatuses::NONE if showMessages case oldStatus - when PBStatuses::SLEEP; @battle.pbDisplay(_INTL("{1} woke up!",pbThis)) - when PBStatuses::POISON; @battle.pbDisplay(_INTL("{1} was cured of its poisoning.",pbThis)) - when PBStatuses::BURN; @battle.pbDisplay(_INTL("{1}'s burn was healed.",pbThis)) - when PBStatuses::PARALYSIS; @battle.pbDisplay(_INTL("{1} was cured of paralysis.",pbThis)) - when PBStatuses::FROZEN; @battle.pbDisplay(_INTL("{1} thawed out!",pbThis)) + when PBStatuses::SLEEP then @battle.pbDisplay(_INTL("{1} woke up!",pbThis)) + when PBStatuses::POISON then @battle.pbDisplay(_INTL("{1} was cured of its poisoning.",pbThis)) + when PBStatuses::BURN then @battle.pbDisplay(_INTL("{1}'s burn was healed.",pbThis)) + when PBStatuses::PARALYSIS then @battle.pbDisplay(_INTL("{1} was cured of paralysis.",pbThis)) + when PBStatuses::FROZEN then @battle.pbDisplay(_INTL("{1} thawed out!",pbThis)) end end PBDebug.log("[Status change] #{pbThis}'s status was cured") if !showMessages diff --git a/Data/Scripts/012_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb b/Data/Scripts/012_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb index 448804c84..dd54250c8 100644 --- a/Data/Scripts/012_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb +++ b/Data/Scripts/012_Battle/001_Battler/009_Battler_UseMove_SuccessChecks.rb @@ -162,10 +162,10 @@ class PokeBattle_Battler end # Show refusal message and do nothing case @battle.pbRandom(4) - when 0; @battle.pbDisplay(_INTL("{1} won't obey!",pbThis)) - when 1; @battle.pbDisplay(_INTL("{1} turned away!",pbThis)) - when 2; @battle.pbDisplay(_INTL("{1} is loafing around!",pbThis)) - when 3; @battle.pbDisplay(_INTL("{1} pretended not to notice!",pbThis)) + when 0 then @battle.pbDisplay(_INTL("{1} won't obey!",pbThis)) + when 1 then @battle.pbDisplay(_INTL("{1} turned away!",pbThis)) + when 2 then @battle.pbDisplay(_INTL("{1} is loafing around!",pbThis)) + when 3 then @battle.pbDisplay(_INTL("{1} pretended not to notice!",pbThis)) end return false end diff --git a/Data/Scripts/012_Battle/002_Move/003_Move_Usage_Calculations.rb b/Data/Scripts/012_Battle/002_Move/003_Move_Usage_Calculations.rb index ba817641a..b7bccd77c 100644 --- a/Data/Scripts/012_Battle/002_Move/003_Move_Usage_Calculations.rb +++ b/Data/Scripts/012_Battle/002_Move/003_Move_Usage_Calculations.rb @@ -182,8 +182,8 @@ class PokeBattle_Move return false if c<0 # Move-specific "always/never a critical hit" effects case pbCritialOverride(user,target) - when 1; return true - when -1; return false + when 1 then return true + when -1 then return false end # Other effects return true if c>50 # Merciless diff --git a/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb b/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb index 98a2d5109..42cef92dc 100644 --- a/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb +++ b/Data/Scripts/012_Battle/002_Move/005_Move_Effects_000-07F.rb @@ -366,9 +366,9 @@ class PokeBattle_Move_017 < PokeBattle_Move def pbAdditionalEffect(user,target) return if target.damageState.substitute case @battle.pbRandom(3) - when 0; target.pbBurn(user) if target.pbCanBurn?(user,false,self) - when 1; target.pbFreeze if target.pbCanFreeze?(user,false,self) - when 2; target.pbParalyze(user) if target.pbCanParalyze?(user,false,self) + when 0 then target.pbBurn(user) if target.pbCanBurn?(user, false, self) + when 1 then target.pbFreeze if target.pbCanFreeze?(user, false, self) + when 2 then target.pbParalyze(user) if target.pbCanParalyze?(user, false, self) end end end @@ -1893,24 +1893,24 @@ class PokeBattle_Move_060 < PokeBattle_Move end if !checkedTerrain case @battle.environment - when PBEnvironment::Grass; @newType = getID(PBTypes,:GRASS) - when PBEnvironment::TallGrass; @newType = getID(PBTypes,:GRASS) - when PBEnvironment::MovingWater; @newType = getID(PBTypes,:WATER) - when PBEnvironment::StillWater; @newType = getID(PBTypes,:WATER) - when PBEnvironment::Puddle; @newType = getID(PBTypes,:WATER) - when PBEnvironment::Underwater; @newType = getID(PBTypes,:WATER) - when PBEnvironment::Cave; @newType = getID(PBTypes,:ROCK) - when PBEnvironment::Rock; @newType = getID(PBTypes,:GROUND) - when PBEnvironment::Sand; @newType = getID(PBTypes,:GROUND) - when PBEnvironment::Forest; @newType = getID(PBTypes,:BUG) - when PBEnvironment::ForestGrass; @newType = getID(PBTypes,:BUG) - when PBEnvironment::Snow; @newType = getID(PBTypes,:ICE) - when PBEnvironment::Ice; @newType = getID(PBTypes,:ICE) - when PBEnvironment::Volcano; @newType = getID(PBTypes,:FIRE) - when PBEnvironment::Graveyard; @newType = getID(PBTypes,:GHOST) - when PBEnvironment::Sky; @newType = getID(PBTypes,:FLYING) - when PBEnvironment::Space; @newType = getID(PBTypes,:DRAGON) - when PBEnvironment::UltraSpace; @newType = getID(PBTypes,:PSYCHIC) + when PBEnvironment::Grass then @newType = getID(PBTypes,:GRASS) + when PBEnvironment::TallGrass then @newType = getID(PBTypes,:GRASS) + when PBEnvironment::MovingWater then @newType = getID(PBTypes,:WATER) + when PBEnvironment::StillWater then @newType = getID(PBTypes,:WATER) + when PBEnvironment::Puddle then @newType = getID(PBTypes,:WATER) + when PBEnvironment::Underwater then @newType = getID(PBTypes,:WATER) + when PBEnvironment::Cave then @newType = getID(PBTypes,:ROCK) + when PBEnvironment::Rock then @newType = getID(PBTypes,:GROUND) + when PBEnvironment::Sand then @newType = getID(PBTypes,:GROUND) + when PBEnvironment::Forest then @newType = getID(PBTypes,:BUG) + when PBEnvironment::ForestGrass then @newType = getID(PBTypes,:BUG) + when PBEnvironment::Snow then @newType = getID(PBTypes,:ICE) + when PBEnvironment::Ice then @newType = getID(PBTypes,:ICE) + when PBEnvironment::Volcano then @newType = getID(PBTypes,:FIRE) + when PBEnvironment::Graveyard then @newType = getID(PBTypes,:GHOST) + when PBEnvironment::Sky then @newType = getID(PBTypes,:FLYING) + when PBEnvironment::Space then @newType = getID(PBTypes,:DRAGON) + when PBEnvironment::UltraSpace then @newType = getID(PBTypes,:PSYCHIC) end end if !user.pbHasOtherType?(@newType) diff --git a/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb b/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb index 08ed4d4ef..71e214dc0 100644 --- a/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb +++ b/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb @@ -958,20 +958,20 @@ class PokeBattle_Move_0A4 < PokeBattle_Move def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) id = :BODYSLAM # Environment-specific anim case @secretPower - when 1; id = :THUNDERSHOCK if GameData::Move.exists?(:THUNDERSHOCK) - when 2; id = :VINEWHIP if GameData::Move.exists?(:VINEWHIP) - when 3; id = :FAIRYWIND if GameData::Move.exists?(:FAIRYWIND) - when 4; id = :CONFUSIO if GameData::Move.exists?(:CONFUSION) - when 5; id = :WATERPULSE if GameData::Move.exists?(:WATERPULSE) - when 6; id = :MUDSHOT if GameData::Move.exists?(:MUDSHOT) - when 7; id = :ROCKTHROW if GameData::Move.exists?(:ROCKTHROW) - when 8; id = :MUDSLAP if GameData::Move.exists?(:MUDSLAP) - when 9; id = :ICESHARD if GameData::Move.exists?(:ICESHARD) - when 10; id = :INCINERATE if GameData::Move.exists?(:INCINERATE) - when 11; id = :SHADOWSNEAK if GameData::Move.exists?(:SHADOWSNEAK) - when 12; id = :GUST if GameData::Move.exists?(:GUST) - when 13; id = :SWIFT if GameData::Move.exists?(:SWIFT) - when 14; id = :PSYWAVE if GameData::Move.exists?(:PSYWAVE) + when 1 then id = :THUNDERSHOCK if GameData::Move.exists?(:THUNDERSHOCK) + when 2 then id = :VINEWHIP if GameData::Move.exists?(:VINEWHIP) + when 3 then id = :FAIRYWIND if GameData::Move.exists?(:FAIRYWIND) + when 4 then id = :CONFUSIO if GameData::Move.exists?(:CONFUSION) + when 5 then id = :WATERPULSE if GameData::Move.exists?(:WATERPULSE) + when 6 then id = :MUDSHOT if GameData::Move.exists?(:MUDSHOT) + when 7 then id = :ROCKTHROW if GameData::Move.exists?(:ROCKTHROW) + when 8 then id = :MUDSLAP if GameData::Move.exists?(:MUDSLAP) + when 9 then id = :ICESHARD if GameData::Move.exists?(:ICESHARD) + when 10 then id = :INCINERATE if GameData::Move.exists?(:INCINERATE) + when 11 then id = :SHADOWSNEAK if GameData::Move.exists?(:SHADOWSNEAK) + when 12 then id = :GUST if GameData::Move.exists?(:GUST) + when 13 then id = :SWIFT if GameData::Move.exists?(:SWIFT) + when 14 then id = :PSYWAVE if GameData::Move.exists?(:PSYWAVE) end super end diff --git a/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb b/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb index 8e4e614df..7a0bff319 100644 --- a/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb +++ b/Data/Scripts/012_Battle/002_Move/007_Move_Effects_100-17F.rb @@ -563,9 +563,9 @@ class PokeBattle_Move_114 < PokeBattle_Move def pbEffectGeneral(user) hpGain = 0 case [user.effects[PBEffects::Stockpile],1].max - when 1; hpGain = user.totalhp/4 - when 2; hpGain = user.totalhp/2 - when 3; hpGain = user.totalhp + when 1 then hpGain = user.totalhp/4 + when 2 then hpGain = user.totalhp/2 + when 3 then hpGain = user.totalhp end if user.pbRecoverHP(hpGain)>0 @battle.pbDisplay(_INTL("{1}'s HP was restored.",user.pbThis)) diff --git a/Data/Scripts/012_Battle/002_PBWeather.rb b/Data/Scripts/012_Battle/002_PBWeather.rb index e877ca395..c0131b1da 100644 --- a/Data/Scripts/012_Battle/002_PBWeather.rb +++ b/Data/Scripts/012_Battle/002_PBWeather.rb @@ -12,14 +12,14 @@ begin def self.animationName(weather) case weather - when Sun; return "Sun" - when Rain; return "Rain" - when Sandstorm; return "Sandstorm" - when Hail; return "Hail" - when HarshSun; return "HarshSun" - when HeavyRain; return "HeavyRain" - when StrongWinds; return "StrongWinds" - when ShadowSky; return "ShadowSky" + when Sun then return "Sun" + when Rain then return "Rain" + when Sandstorm then return "Sandstorm" + when Hail then return "Hail" + when HarshSun then return "HarshSun" + when HeavyRain then return "HeavyRain" + when StrongWinds then return "StrongWinds" + when ShadowSky then return "ShadowSky" end return nil end diff --git a/Data/Scripts/012_Battle/003_Battle/002_PokeBattle_Battle.rb b/Data/Scripts/012_Battle/003_Battle/002_PokeBattle_Battle.rb index e23266378..79f09a5f5 100644 --- a/Data/Scripts/012_Battle/003_Battle/002_PokeBattle_Battle.rb +++ b/Data/Scripts/012_Battle/003_Battle/002_PokeBattle_Battle.rb @@ -179,15 +179,15 @@ class PokeBattle_Battle def setBattleMode(mode) @sideSizes = case mode - when "triple", "3v3"; [3,3] - when "3v2"; [3,2] - when "3v1"; [3,1] - when "2v3"; [2,3] - when "double", "2v2"; [2,2] - when "2v1"; [2,1] - when "1v3"; [1,3] - when "1v2"; [1,2] - else; [1,1] # Single, 1v1 (default) + when "triple", "3v3" then [3, 3] + when "3v2" then [3, 2] + when "3v1" then [3, 1] + when "2v3" then [2, 3] + when "double", "2v2" then [2, 2] + when "2v1" then [2, 1] + when "1v3" then [1, 3] + when "1v2" then [1, 2] + else [1, 1] # Single, 1v1 (default) end end @@ -220,7 +220,8 @@ class PokeBattle_Battle n = pbSideSize(idxBattler%2) return [0,0,1][idxBattler/2] if n==3 return idxBattler/2 # Same as [0,1][idxBattler/2], i.e. 2 battler slots - when 3; return idxBattler/2 + when 3 + return idxBattler/2 end return 0 end @@ -658,14 +659,14 @@ class PokeBattle_Battle pbCommonAnimation(PBWeather.animationName(@field.weather)) if showAnim pbHideAbilitySplash(user) if user case @field.weather - when PBWeather::Sun; pbDisplay(_INTL("The sunlight turned harsh!")) - when PBWeather::Rain; pbDisplay(_INTL("It started to rain!")) - when PBWeather::Sandstorm; pbDisplay(_INTL("A sandstorm brewed!")) - when PBWeather::Hail; pbDisplay(_INTL("It started to hail!")) - when PBWeather::HarshSun; pbDisplay(_INTL("The sunlight turned extremely harsh!")) - when PBWeather::HeavyRain; pbDisplay(_INTL("A heavy rain began to fall!")) - when PBWeather::StrongWinds; pbDisplay(_INTL("Mysterious strong winds are protecting Flying-type Pokémon!")) - when PBWeather::ShadowSky; pbDisplay(_INTL("A shadow sky appeared!")) + when PBWeather::Sun then pbDisplay(_INTL("The sunlight turned harsh!")) + when PBWeather::Rain then pbDisplay(_INTL("It started to rain!")) + when PBWeather::Sandstorm then pbDisplay(_INTL("A sandstorm brewed!")) + when PBWeather::Hail then pbDisplay(_INTL("It started to hail!")) + when PBWeather::HarshSun then pbDisplay(_INTL("The sunlight turned extremely harsh!")) + when PBWeather::HeavyRain then pbDisplay(_INTL("A heavy rain began to fall!")) + when PBWeather::StrongWinds then pbDisplay(_INTL("Mysterious strong winds are protecting Flying-type Pokémon!")) + when PBWeather::ShadowSky then pbDisplay(_INTL("A shadow sky appeared!")) end # Check for end of primordial weather, and weather-triggered form changes eachBattler { |b| b.pbCheckFormOnWeatherChange } diff --git a/Data/Scripts/012_Battle/003_Battle/003_Battle_StartAndEnd.rb b/Data/Scripts/012_Battle/003_Battle/003_Battle_StartAndEnd.rb index d43c7a678..c22a3cc1d 100644 --- a/Data/Scripts/012_Battle/003_Battle/003_Battle_StartAndEnd.rb +++ b/Data/Scripts/012_Battle/003_Battle/003_Battle_StartAndEnd.rb @@ -273,14 +273,14 @@ class PokeBattle_Battle # Weather announcement pbCommonAnimation(PBWeather.animationName(@field.weather)) case @field.weather - when PBWeather::Sun; pbDisplay(_INTL("The sunlight is strong.")) - when PBWeather::Rain; pbDisplay(_INTL("It is raining.")) - when PBWeather::Sandstorm; pbDisplay(_INTL("A sandstorm is raging.")) - when PBWeather::Hail; pbDisplay(_INTL("Hail is falling.")) - when PBWeather::HarshSun; pbDisplay(_INTL("The sunlight is extremely harsh.")) - when PBWeather::HeavyRain; pbDisplay(_INTL("It is raining heavily.")) - when PBWeather::StrongWinds; pbDisplay(_INTL("The wind is strong.")) - when PBWeather::ShadowSky; pbDisplay(_INTL("The sky is shadowy.")) + when PBWeather::Sun then pbDisplay(_INTL("The sunlight is strong.")) + when PBWeather::Rain then pbDisplay(_INTL("It is raining.")) + when PBWeather::Sandstorm then pbDisplay(_INTL("A sandstorm is raging.")) + when PBWeather::Hail then pbDisplay(_INTL("Hail is falling.")) + when PBWeather::HarshSun then pbDisplay(_INTL("The sunlight is extremely harsh.")) + when PBWeather::HeavyRain then pbDisplay(_INTL("It is raining heavily.")) + when PBWeather::StrongWinds then pbDisplay(_INTL("The wind is strong.")) + when PBWeather::ShadowSky then pbDisplay(_INTL("The sky is shadowy.")) end # Terrain announcement pbCommonAnimation(PBBattleTerrains.animationName(@field.terrain)) diff --git a/Data/Scripts/012_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb b/Data/Scripts/012_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb index ed40e2aa7..98cabf563 100644 --- a/Data/Scripts/012_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb +++ b/Data/Scripts/012_Battle/003_Battle/012_Battle_Phase_EndOfRound.rb @@ -61,14 +61,14 @@ class PokeBattle_Battle # Weather continues pbCommonAnimation(PBWeather.animationName(@field.weather)) case @field.weather -# when PBWeather::Sun; pbDisplay(_INTL("The sunlight is strong.")) -# when PBWeather::Rain; pbDisplay(_INTL("Rain continues to fall.")) - when PBWeather::Sandstorm; pbDisplay(_INTL("The sandstorm is raging.")) - when PBWeather::Hail; pbDisplay(_INTL("The hail is crashing down.")) -# when PBWeather::HarshSun; pbDisplay(_INTL("The sunlight is extremely harsh.")) -# when PBWeather::HeavyRain; pbDisplay(_INTL("It is raining heavily.")) -# when PBWeather::StrongWinds; pbDisplay(_INTL("The wind is strong.")) - when PBWeather::ShadowSky; pbDisplay(_INTL("The shadow sky continues.")); +# when PBWeather::Sun then pbDisplay(_INTL("The sunlight is strong.")) +# when PBWeather::Rain then pbDisplay(_INTL("Rain continues to fall.")) + when PBWeather::Sandstorm then pbDisplay(_INTL("The sandstorm is raging.")) + when PBWeather::Hail then pbDisplay(_INTL("The hail is crashing down.")) +# when PBWeather::HarshSun then pbDisplay(_INTL("The sunlight is extremely harsh.")) +# when PBWeather::HeavyRain then pbDisplay(_INTL("It is raining heavily.")) +# when PBWeather::StrongWinds then pbDisplay(_INTL("The wind is strong.")) + when PBWeather::ShadowSky then pbDisplay(_INTL("The shadow sky continues.")) end # Effects due to weather curWeather = pbWeather @@ -132,10 +132,10 @@ class PokeBattle_Battle # Terrain continues pbCommonAnimation(PBBattleTerrains.animationName(@field.terrain)) case @field.terrain - when PBBattleTerrains::Electric; pbDisplay(_INTL("An electric current is running across the battlefield.")) - when PBBattleTerrains::Grassy; pbDisplay(_INTL("Grass is covering the battlefield.")) - when PBBattleTerrains::Misty; pbDisplay(_INTL("Mist is swirling about the battlefield.")) - when PBBattleTerrains::Psychic; pbDisplay(_INTL("The battlefield is weird.")) + when PBBattleTerrains::Electric then pbDisplay(_INTL("An electric current is running across the battlefield.")) + when PBBattleTerrains::Grassy then pbDisplay(_INTL("Grass is covering the battlefield.")) + when PBBattleTerrains::Misty then pbDisplay(_INTL("Mist is swirling about the battlefield.")) + when PBBattleTerrains::Psychic then pbDisplay(_INTL("The battlefield is weird.")) end end @@ -174,8 +174,8 @@ class PokeBattle_Battle # Get the position to move to pos = -1 case pbSideSize(side) - when 2; pos = [2,3,0,1][b.index] # The unoccupied position - when 3; pos = (side==0) ? 2 : 3 # The centre position + when 2 then pos = [2,3,0,1][b.index] # The unoccupied position + when 3 then pos = (side==0) ? 2 : 3 # The centre position end next if pos<0 # Can't move if the same trainer doesn't control both positions diff --git a/Data/Scripts/012_Battle/003_PBBattleTerrains.rb b/Data/Scripts/012_Battle/003_PBBattleTerrains.rb index 86b0bffa0..25ec40852 100644 --- a/Data/Scripts/012_Battle/003_PBBattleTerrains.rb +++ b/Data/Scripts/012_Battle/003_PBBattleTerrains.rb @@ -9,10 +9,10 @@ begin def self.animationName(terrain) case terrain - when Electric; return "ElectricTerrain" - when Grassy; return "GrassyTerrain" - when Misty; return "MistyTerrain" - when Psychic; return "PsychicTerrain" + when Electric then return "ElectricTerrain" + when Grassy then return "GrassyTerrain" + when Misty then return "MistyTerrain" + when Psychic then return "PsychicTerrain" end return nil end diff --git a/Data/Scripts/012_Battle/004_AI/006_AI_Move_Utilities.rb b/Data/Scripts/012_Battle/004_AI/006_AI_Move_Utilities.rb index 191015980..ff5b56d93 100644 --- a/Data/Scripts/012_Battle/004_AI/006_AI_Move_Utilities.rb +++ b/Data/Scripts/012_Battle/004_AI/006_AI_Move_Utilities.rb @@ -146,11 +146,11 @@ class PokeBattle_AI stage = battler.stages[stat]+6 value = 0 case stat - when PBStats::ATTACK; value = battler.attack - when PBStats::DEFENSE; value = battler.defense - when PBStats::SPATK; value = battler.spatk - when PBStats::SPDEF; value = battler.spdef - when PBStats::SPEED; value = battler.speed + when PBStats::ATTACK then value = battler.attack + when PBStats::DEFENSE then value = battler.defense + when PBStats::SPATK then value = battler.spatk + when PBStats::SPDEF then value = battler.spdef + when PBStats::SPEED then value = battler.speed end return (value.to_f*stageMul[stage]/stageDiv[stage]).floor end diff --git a/Data/Scripts/012_Battle/005_Battle scene/001_PokeBattle_Animation.rb b/Data/Scripts/012_Battle/005_Battle scene/001_PokeBattle_Animation.rb index 2ad6696fc..cc27fb4bb 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/001_PokeBattle_Animation.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/001_PokeBattle_Animation.rb @@ -65,21 +65,21 @@ module PokeBattle_BallAnimationMixin # Poké Ball. def getBattlerColorFromBallType(ballType) case ballType - when 1; return Color.new(132, 189, 247) # Great Ball - when 2; return Color.new(189, 247, 165) # Safari Ball - when 3; return Color.new(255, 255, 123) # Ultra Ball - when 4; return Color.new(189, 165, 231) # Master Ball - when 5; return Color.new(173, 255, 206) # Net Ball - when 6; return Color.new( 99, 206, 247) # Dive Ball - when 7; return Color.new(247, 222, 82) # Nest Ball - when 8; return Color.new(255, 198, 132) # Repeat Ball - when 9; return Color.new(239, 247, 247) # Timer Ball - when 10; return Color.new(255, 140, 82) # Luxury Ball - when 11; return Color.new(255, 74, 82) # Premier Ball - when 12; return Color.new(115, 115, 140) # Dusk Ball - when 13; return Color.new(255, 198, 231) # Heal Ball - when 14; return Color.new(140, 214, 255) # Quick Ball - when 15; return Color.new(247, 66, 41) # Cherish Ball + when 1 then return Color.new(132, 189, 247) # Great Ball + when 2 then return Color.new(189, 247, 165) # Safari Ball + when 3 then return Color.new(255, 255, 123) # Ultra Ball + when 4 then return Color.new(189, 165, 231) # Master Ball + when 5 then return Color.new(173, 255, 206) # Net Ball + when 6 then return Color.new( 99, 206, 247) # Dive Ball + when 7 then return Color.new(247, 222, 82) # Nest Ball + when 8 then return Color.new(255, 198, 132) # Repeat Ball + when 9 then return Color.new(239, 247, 247) # Timer Ball + when 10 then return Color.new(255, 140, 82) # Luxury Ball + when 11 then return Color.new(255, 74, 82) # Premier Ball + when 12 then return Color.new(115, 115, 140) # Dusk Ball + when 13 then return Color.new(255, 198, 231) # Heal Ball + when 14 then return Color.new(140, 214, 255) # Quick Ball + when 15 then return Color.new(247, 66, 41) # Cherish Ball end return Color.new(255, 181, 247) # Poké Ball, Sport Ball, Apricorn Balls, others end diff --git a/Data/Scripts/012_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb b/Data/Scripts/012_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb index 9e5ca0e24..2eaf10e3e 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/002_PokeBattle_SceneAnimations.rb @@ -623,9 +623,9 @@ class BattlerDamageAnimation < PokeBattle_Animation # Animation delay = 0 case @effectiveness - when 0; battler.setSE(delay,"Battle damage normal") - when 1; battler.setSE(delay,"Battle damage weak") - when 2; battler.setSE(delay,"Battle damage super") + when 0 then battler.setSE(delay, "Battle damage normal") + when 1 then battler.setSE(delay, "Battle damage weak") + when 2 then battler.setSE(delay, "Battle damage super") end 4.times do # 4 flashes, each lasting 0.2 (4/20) seconds battler.setVisible(delay,false) diff --git a/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb b/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb index 304ddc7ff..cca0c7bf1 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb @@ -350,8 +350,8 @@ class PokemonDataBox < SpriteWrapper # Data box bobbing while Pokémon is selected if @selected==1 || @selected==2 # Choosing commands/targeted or damaged case (frameCounter/QUARTER_ANIM_PERIOD).floor - when 1; self.y = @spriteY-2 - when 3; self.y = @spriteY+2 + when 1 then self.y = @spriteY-2 + when 3 then self.y = @spriteY+2 end end end @@ -574,8 +574,8 @@ class PokemonBattlerSprite < RPG::Sprite @spriteYExtra = 0 if @selected==1 # When choosing commands for this Pokémon case (frameCounter/QUARTER_ANIM_PERIOD).floor - when 1; @spriteYExtra = 2 - when 3; @spriteYExtra = -2 + when 1 then @spriteYExtra = 2 + when 3 then @spriteYExtra = -2 end end self.x = self.x @@ -584,8 +584,8 @@ class PokemonBattlerSprite < RPG::Sprite # Pokémon sprite blinking when targeted if @selected==2 && @spriteVisible case (frameCounter/SIXTH_ANIM_PERIOD).floor - when 2, 5; self.visible = false - else; self.visible = true + when 2, 5 then self.visible = false + else self.visible = true end end @updating = false diff --git a/Data/Scripts/012_Battle/005_Battle scene/007_Scene_Initialize.rb b/Data/Scripts/012_Battle/005_Battle scene/007_Scene_Initialize.rb index 62fc45412..0367f76f5 100644 --- a/Data/Scripts/012_Battle/005_Battle scene/007_Scene_Initialize.rb +++ b/Data/Scripts/012_Battle/005_Battle scene/007_Scene_Initialize.rb @@ -93,8 +93,8 @@ class PokeBattle_Scene def pbCreateBackdropSprites case @battle.time - when 1; time = "eve" - when 2; time = "night" + when 1 then time = "eve" + when 2 then time = "night" end # Put everything together into backdrop, bases and message bar filenames backdropFilename = @battle.backdrop diff --git a/Data/Scripts/013_Overworld/002_PField_Field.rb b/Data/Scripts/013_Overworld/002_PField_Field.rb index f878cb81d..67157337b 100644 --- a/Data/Scripts/013_Overworld/002_PField_Field.rb +++ b/Data/Scripts/013_Overworld/002_PField_Field.rb @@ -565,14 +565,26 @@ def pbFacingTileRegular(direction=nil,event=nil) y = event.y direction = event.direction if !direction case direction - when 1; y += 1; x -= 1 - when 2; y += 1 - when 3; y += 1; x += 1 - when 4; x -= 1 - when 6; x += 1 - when 7; y -= 1; x -= 1 - when 8; y -= 1 - when 9; y -= 1; x += 1 + when 1 + y += 1 + x -= 1 + when 2 + y += 1 + when 3 + y += 1 + x += 1 + when 4 + x -= 1 + when 6 + x += 1 + when 7 + y -= 1 + x -= 1 + when 8 + y -= 1 + when 9 + y -= 1 + x += 1 end return [$game_map.map_id,x,y] end @@ -652,10 +664,10 @@ module InterpreterFieldMixin # tiles that are passable only from certain directions return if !event.passableStrict?(event.x,event.y,$game_player.direction) case $game_player.direction - when 2; event.move_down # down - when 4; event.move_left # left - when 6; event.move_right # right - when 8; event.move_up # up + when 2 then event.move_down + when 4 then event.move_left + when 6 then event.move_right + when 8 then event.move_up end $PokemonMap.addMovedEvent(@event_id) if $PokemonMap if oldx!=event.x || oldy!=event.y @@ -1098,10 +1110,10 @@ def pbJumpToward(dist=1,playSound=false,cancelSurf=false) x = $game_player.x y = $game_player.y case $game_player.direction - when 2; $game_player.jump(0,dist) # down - when 4; $game_player.jump(-dist,0) # left - when 6; $game_player.jump(dist,0) # right - when 8; $game_player.jump(0,-dist) # up + when 2 then $game_player.jump(0, dist) # down + when 4 then $game_player.jump(-dist, 0) # left + when 6 then $game_player.jump(dist, 0) # right + when 8 then $game_player.jump(0, -dist) # up end if $game_player.x!=x || $game_player.y!=y pbSEPlay("Player jump") if playSound @@ -1276,10 +1288,18 @@ def pbSetEscapePoint xco = $game_player.x yco = $game_player.y case $game_player.direction - when 2; yco -= 1; dir = 8 # Down - when 4; xco += 1; dir = 6 # Left - when 6; xco -= 1; dir = 4 # Right - when 8; yco += 1; dir = 2 # Up + when 2 # Down + yco -= 1 + dir = 8 + when 4 # Left + xco += 1 + dir = 6 + when 6 # Right + xco -= 1 + dir = 4 + when 8 # Up + yco += 1 + dir = 2 end $PokemonGlobal.escapePoint = [$game_map.map_id,xco,yco,dir] end diff --git a/Data/Scripts/013_Overworld/003_PField_Visuals.rb b/Data/Scripts/013_Overworld/003_PField_Visuals.rb index 795cb8b8b..e8c848d25 100644 --- a/Data/Scripts/013_Overworld/003_PField_Visuals.rb +++ b/Data/Scripts/013_Overworld/003_PField_Visuals.rb @@ -703,10 +703,10 @@ end def pbScrollMap(direction,distance,speed) if speed==0 case direction - when 2; $game_map.scroll_down(distance * Game_Map::REAL_RES_Y) - when 4; $game_map.scroll_left(distance * Game_Map::REAL_RES_X) - when 6; $game_map.scroll_right(distance * Game_Map::REAL_RES_X) - when 8; $game_map.scroll_up(distance * Game_Map::REAL_RES_Y) + when 2 then $game_map.scroll_down(distance * Game_Map::REAL_RES_Y) + when 4 then $game_map.scroll_left(distance * Game_Map::REAL_RES_X) + when 6 then $game_map.scroll_right(distance * Game_Map::REAL_RES_X) + when 8 then $game_map.scroll_up(distance * Game_Map::REAL_RES_Y) end else $game_map.start_scroll(direction, distance, speed) diff --git a/Data/Scripts/013_Overworld/004_PField_Weather.rb b/Data/Scripts/013_Overworld/004_PField_Weather.rb index 444510467..0fbbda371 100644 --- a/Data/Scripts/013_Overworld/004_PField_Weather.rb +++ b/Data/Scripts/013_Overworld/004_PField_Weather.rb @@ -206,11 +206,11 @@ module RPG @sprites.each { |s| s.dispose } @sprites.clear return - when PBFieldWeather::Rain; prepareRainBitmap - when PBFieldWeather::HeavyRain, PBFieldWeather::Storm; prepareStormBitmap - when PBFieldWeather::Snow; prepareSnowBitmaps - when PBFieldWeather::Blizzard; prepareBlizzardBitmaps - when PBFieldWeather::Sandstorm; prepareSandstormBitmaps + when PBFieldWeather::Rain then prepareRainBitmap + when PBFieldWeather::HeavyRain, PBFieldWeather::Storm then prepareStormBitmap + when PBFieldWeather::Snow then prepareSnowBitmaps + when PBFieldWeather::Blizzard then prepareBlizzardBitmaps + when PBFieldWeather::Sandstorm then prepareSandstormBitmaps end weatherBitmaps = (@type==PBFieldWeather::None || @type==PBFieldWeather::Sun) ? nil : @weatherTypes[@type][0] ensureSprites @@ -226,13 +226,13 @@ module RPG # @max is (power+1)*4, where power is between 1 and 9 # Set tone of viewport (general screen brightening/darkening) case @type - when PBFieldWeather::None; @viewport.tone.set(0,0,0,0) - when PBFieldWeather::Rain; @viewport.tone.set(-@max*3/4, -@max*3/4, -@max*3/4, 10) - when PBFieldWeather::HeavyRain; @viewport.tone.set(-@max*6/4, -@max*6/4, -@max*6/4, 20) - when PBFieldWeather::Storm; @viewport.tone.set(-@max*6/4, -@max*6/4, -@max*6/4, 20) - when PBFieldWeather::Snow; @viewport.tone.set( @max/2, @max/2, @max/2, 0) - when PBFieldWeather::Blizzard; @viewport.tone.set( @max*3/4, @max*3/4, max*3/4, 0) - when PBFieldWeather::Sandstorm; @viewport.tone.set( @max/2, 0, -@max/2, 0) + when PBFieldWeather::None then @viewport.tone.set(0, 0, 0, 0) + when PBFieldWeather::Rain then @viewport.tone.set(-@max * 3 / 4, -@max * 3 / 4, -@max * 3 / 4, 10) + when PBFieldWeather::HeavyRain then @viewport.tone.set(-@max * 6 / 4, -@max * 6 / 4, -@max * 6 / 4, 20) + when PBFieldWeather::Storm then @viewport.tone.set(-@max * 6 / 4, -@max * 6 / 4, -@max * 6 / 4, 20) + when PBFieldWeather::Snow then @viewport.tone.set( @max / 2, @max / 2, @max / 2, 0) + when PBFieldWeather::Blizzard then @viewport.tone.set( @max * 3 / 4, @max * 3 / 4, max * 3 / 4, 0) + when PBFieldWeather::Sandstorm then @viewport.tone.set( @max / 2, 0, -@max / 2, 0) when PBFieldWeather::Sun @sun = @max if @sun!=@max && @sun!=-@max @sun = -@sun if @sunValue>@max || @sunValue<0 diff --git a/Data/Scripts/013_Overworld/005_PField_Metadata.rb b/Data/Scripts/013_Overworld/005_PField_Metadata.rb index 5c8ceb1f6..a09197307 100644 --- a/Data/Scripts/013_Overworld/005_PField_Metadata.rb +++ b/Data/Scripts/013_Overworld/005_PField_Metadata.rb @@ -182,10 +182,10 @@ class PokemonMapMetadata next if !$game_map.events[i[0][1]] $game_map.events[i[0][1]].moveto(i[1][0],i[1][1]) case i[1][2] - when 2; $game_map.events[i[0][1]].turn_down - when 4; $game_map.events[i[0][1]].turn_left - when 6; $game_map.events[i[0][1]].turn_right - when 8; $game_map.events[i[0][1]].turn_up + when 2 then $game_map.events[i[0][1]].turn_down + when 4 then $game_map.events[i[0][1]].turn_left + when 6 then $game_map.events[i[0][1]].turn_right + when 8 then $game_map.events[i[0][1]].turn_up end end if i[1][3]!=nil diff --git a/Data/Scripts/013_Overworld/006_PField_Battles.rb b/Data/Scripts/013_Overworld/006_PField_Battles.rb index 9ed9f1357..4effb53f1 100644 --- a/Data/Scripts/013_Overworld/006_PField_Battles.rb +++ b/Data/Scripts/013_Overworld/006_PField_Battles.rb @@ -30,26 +30,26 @@ class PokemonTemp when "single", "1v1", "1v2", "2v1", "1v3", "3v1", "double", "2v2", "2v3", "3v2", "triple", "3v3" rules["size"] = rule.to_s.downcase - when "canlose"; rules["canLose"] = true - when "cannotlose"; rules["canLose"] = false - when "canrun"; rules["canRun"] = true - when "cannotrun"; rules["canRun"] = false - when "roamerflees"; rules["roamerFlees"] = true - when "noexp"; rules["expGain"] = false - when "nomoney"; rules["moneyGain"] = false - when "switchstyle"; rules["switchStyle"] = true - when "setstyle"; rules["switchStyle"] = false - when "anims"; rules["battleAnims"] = true - when "noanims"; rules["battleAnims"] = false - when "terrain"; rules["defaultTerrain"] = getID(PBBattleTerrains,var) - when "weather"; rules["defaultWeather"] = getID(PBWeather,var) - when "environment", "environ"; rules["environment"] = getID(PBEnvironment,var) - when "backdrop", "battleback"; rules["backdrop"] = var - when "base"; rules["base"] = var - when "outcome", "outcomevar"; rules["outcomeVar"] = var - when "nopartner"; rules["noPartner"] = true + when "canlose" then rules["canLose"] = true + when "cannotlose" then rules["canLose"] = false + when "canrun" then rules["canRun"] = true + when "cannotrun" then rules["canRun"] = false + when "roamerflees" then rules["roamerFlees"] = true + when "noexp" then rules["expGain"] = false + when "nomoney" then rules["moneyGain"] = false + when "switchstyle" then rules["switchStyle"] = true + when "setstyle" then rules["switchStyle"] = false + when "anims" then rules["battleAnims"] = true + when "noanims" then rules["battleAnims"] = false + when "terrain" then rules["defaultTerrain"] = getID(PBBattleTerrains, var) + when "weather" then rules["defaultWeather"] = getID(PBWeather, var) + when "environment", "environ" then rules["environment"] = getID(PBEnvironment, var) + when "backdrop", "battleback" then rules["backdrop"] = var + when "base" then rules["base"] = var + when "outcome", "outcomevar" then rules["outcomeVar"] = var + when "nopartner" then rules["noPartner"] = true else - raise _INTL("Battle rule \"{1}\" does not exist.",rule) + raise _INTL("Battle rule \"{1}\" does not exist.", rule) end end end @@ -140,12 +140,18 @@ def pbPrepareBattle(battle) if battleRules["base"].nil? case battle.environment when PBEnvironment::Grass, PBEnvironment::TallGrass, - PBEnvironment::ForestGrass; base = "grass" -# when PBEnvironment::Rock; base = "rock" - when PBEnvironment::Sand; base = "sand" - when PBEnvironment::MovingWater, PBEnvironment::StillWater; base = "water" - when PBEnvironment::Puddle; base = "puddle" - when PBEnvironment::Ice; base = "ice" + PBEnvironment::ForestGrass + base = "grass" +# when PBEnvironment::Rock +# base = "rock" + when PBEnvironment::Sand + base = "sand" + when PBEnvironment::MovingWater, PBEnvironment::StillWater + base = "water" + when PBEnvironment::Puddle + base = "puddle" + when PBEnvironment::Ice + base = "ice" end else base = battleRules["base"] @@ -168,24 +174,24 @@ end def pbGetEnvironment ret = GameData::MapMetadata.get($game_map.map_id).battle_environment ret = PBEnvironment::None if !ret - if $PokemonTemp.encounterType==EncounterTypes::OldRod || - $PokemonTemp.encounterType==EncounterTypes::GoodRod || - $PokemonTemp.encounterType==EncounterTypes::SuperRod + if $PokemonTemp.encounterType == EncounterTypes::OldRod || + $PokemonTemp.encounterType == EncounterTypes::GoodRod || + $PokemonTemp.encounterType == EncounterTypes::SuperRod terrainTag = pbFacingTerrainTag else terrainTag = $game_player.terrain_tag end case terrainTag when PBTerrain::Grass, PBTerrain::SootGrass - ret = (ret==PBEnvironment::Forest) ? PBEnvironment::ForestGrass : PBEnvironment::Grass + ret = (ret == PBEnvironment::Forest) ? PBEnvironment::ForestGrass : PBEnvironment::Grass when PBTerrain::TallGrass - ret = (ret==PBEnvironment::Forest) ? PBEnvironment::ForestGrass : PBEnvironment::TallGrass - when PBTerrain::Rock; ret = PBEnvironment::Rock - when PBTerrain::Sand; ret = PBEnvironment::Sand - when PBTerrain::DeepWater, PBTerrain::Water; ret = PBEnvironment::MovingWater - when PBTerrain::StillWater; ret = PBEnvironment::StillWater - when PBTerrain::Puddle; ret = PBEnvironment::Puddle - when PBTerrain::Ice; ret = PBEnvironment::Ice + ret = (ret == PBEnvironment::Forest) ? PBEnvironment::ForestGrass : PBEnvironment::TallGrass + when PBTerrain::Rock then ret = PBEnvironment::Rock + when PBTerrain::Sand then ret = PBEnvironment::Sand + when PBTerrain::DeepWater, PBTerrain::Water then ret = PBEnvironment::MovingWater + when PBTerrain::StillWater then ret = PBEnvironment::StillWater + when PBTerrain::Puddle then ret = PBEnvironment::Puddle + when PBTerrain::Ice then ret = PBEnvironment::Ice end return ret end diff --git a/Data/Scripts/013_Overworld/010_PField_RandomDungeons.rb b/Data/Scripts/013_Overworld/010_PField_RandomDungeons.rb index b95eed63c..bdcd8736d 100644 --- a/Data/Scripts/013_Overworld/010_PField_RandomDungeons.rb +++ b/Data/Scripts/013_Overworld/010_PField_RandomDungeons.rb @@ -335,22 +335,31 @@ class Maze end end - def recurseDepthFirst(x,y,depth) + def recurseDepthFirst(x, y, depth) setVisited(x,y) - dirs=@@dirs.shuffle! + dirs = @@dirs.shuffle! for c in 0...4 - d=dirs[c] - cx=0;cy=0 + d = dirs[c] + cx = 0 + cy = 0 case d - when EdgeMasks::North; cx=x; cy=y-1 - when EdgeMasks::South; cx=x; cy=y+1 - when EdgeMasks::East; cx=x+1; cy=y - when EdgeMasks::West; cx=x-1; cy=y + when EdgeMasks::North + cx = x + cy = y - 1 + when EdgeMasks::South + cx = x + cy = y + 1 + when EdgeMasks::East + cx = x + 1 + cy = y + when EdgeMasks::West + cx = x - 1 + cy = y end - if cx>=0 && cy>=0 && cx= 0 && cy >= 0 && cx < cellWidth && cy < cellHeight + if !getVisited(cx, cy) + clearEdgeNode(x, y, d) + recurseDepthFirst(cx, cy, depth + 1) end end end diff --git a/Data/Scripts/013_Overworld/012_PField_BerryPlants.rb b/Data/Scripts/013_Overworld/012_PField_BerryPlants.rb index d58eb9f72..44c465b4c 100644 --- a/Data/Scripts/013_Overworld/012_PField_BerryPlants.rb +++ b/Data/Scripts/013_Overworld/012_PField_BerryPlants.rb @@ -37,10 +37,10 @@ class BerryPlantMoistureSprite def updateGraphic case @oldmoisture - when -1; @light.setBitmap("") - when 0; @light.setBitmap("Graphics/Characters/berrytreeDry") - when 1; @light.setBitmap("Graphics/Characters/berrytreeDamp") - when 2; @light.setBitmap("Graphics/Characters/berrytreeWet") + when -1 then @light.setBitmap("") + when 0 then @light.setBitmap("Graphics/Characters/berrytreeDry") + when 1 then @light.setBitmap("Graphics/Characters/berrytreeDamp") + when 2 then @light.setBitmap("Graphics/Characters/berrytreeWet") end end @@ -257,10 +257,10 @@ class BerryPlantSprite if pbResolveBitmap("Graphics/Characters/"+filename) @event.character_name=filename case berryData[0] - when 2; @event.turn_down # X sprouted - when 3; @event.turn_left # X taller - when 4; @event.turn_right # X flowering - when 5; @event.turn_up # X berries + when 2 then @event.turn_down # X sprouted + when 3 then @event.turn_left # X taller + when 4 then @event.turn_right # X flowering + when 5 then @event.turn_up # X berries end else @event.character_name="Object ball" @@ -288,11 +288,11 @@ def pbBerryPlant end # Stop the event turning towards the player case berryData[0] - when 1; thisEvent.turn_down # X planted - when 2; thisEvent.turn_down # X sprouted - when 3; thisEvent.turn_left # X taller - when 4; thisEvent.turn_right # X flowering - when 5; thisEvent.turn_up # X berries + when 1 then thisEvent.turn_down # X planted + when 2 then thisEvent.turn_down # X sprouted + when 3 then thisEvent.turn_left # X taller + when 4 then thisEvent.turn_right # X flowering + when 5 then thisEvent.turn_up # X berries end watering = [:SPRAYDUCK, :SQUIRTBOTTLE, :WAILMERPAIL, :SPRINKLOTAD] berry=berryData[1] diff --git a/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb b/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb index 3081ef66c..4079034a9 100644 --- a/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb +++ b/Data/Scripts/013_Overworld/014_PField_DependentEvents.rb @@ -65,10 +65,10 @@ def moveThrough(follower,direction) oldThrough=follower.through follower.through=true case direction - when 2; follower.move_down # down - when 4; follower.move_left # left - when 6; follower.move_right # right - when 8; follower.move_up # up + when 2 then follower.move_down + when 4 then follower.move_left + when 6 then follower.move_right + when 8 then follower.move_up end follower.through=oldThrough end @@ -87,10 +87,10 @@ def moveFancy(follower,direction) oldThrough=follower.through follower.through=true case direction - when 2; follower.move_down # down - when 4; follower.move_left # left - when 6; follower.move_right # right - when 8; follower.move_up # up + when 2 then follower.move_down + when 4 then follower.move_left + when 6 then follower.move_right + when 8 then follower.move_up end follower.through=oldThrough end @@ -155,11 +155,11 @@ class DependentEvents newEvent = Game_Event.new(eventData[0],rpgEvent,$MapFactory.getMap(eventData[2])) newEvent.character_name = eventData[6] newEvent.character_hue = eventData[7] - case eventData[5] # direction - when 2; newEvent.turn_down - when 4; newEvent.turn_left - when 6; newEvent.turn_right - when 8; newEvent.turn_up + case eventData[5] # direction + when 2 then newEvent.turn_down + when 4 then newEvent.turn_left + when 6 then newEvent.turn_right + when 8 then newEvent.turn_up end return newEvent end diff --git a/Data/Scripts/015_Items/001_PItem_Items.rb b/Data/Scripts/015_Items/001_PItem_Items.rb index f0dac6e50..e752684f3 100644 --- a/Data/Scripts/015_Items/001_PItem_Items.rb +++ b/Data/Scripts/015_Items/001_PItem_Items.rb @@ -532,11 +532,15 @@ def pbUseItem(bag,item,bagscene=nil) elsif useType==2 # Item is usable from bag intret = ItemHandlers.triggerUseFromBag(item) case intret - when 0; return 0 - when 1; return 1 # Item used - when 2; return 2 # Item used, end screen - when 3; bag.pbDeleteItem(item); return 1 # Item used, consume item - when 4; bag.pbDeleteItem(item); return 2 # Item used, end screen and consume item + when 0 then return 0 + when 1 then return 1 # Item used + when 2 then return 2 # Item used, end screen + when 3 # Item used, consume item + bag.pbDeleteItem(item) + return 1 + when 4 # Item used, end screen and consume item + bag.pbDeleteItem(item) + return 2 end pbMessage(_INTL("Can't use that here.")) return 0 diff --git a/Data/Scripts/015_Items/002_PItem_ItemEffects.rb b/Data/Scripts/015_Items/002_PItem_ItemEffects.rb index d2965359e..8966adb90 100644 --- a/Data/Scripts/015_Items/002_PItem_ItemEffects.rb +++ b/Data/Scripts/015_Items/002_PItem_ItemEffects.rb @@ -299,10 +299,10 @@ ItemHandlers::UseInField.add(:ITEMFINDER,proc { |item| direction = (offsetY<0) ? 8 : 2 end case direction - when 2; $game_player.turn_down - when 4; $game_player.turn_left - when 6; $game_player.turn_right - when 8; $game_player.turn_up + when 2 then $game_player.turn_down + when 4 then $game_player.turn_left + when 6 then $game_player.turn_right + when 8 then $game_player.turn_up end pbWait(Graphics.frame_rate*3/10) pbMessage(_INTL("Huh? The {1}'s responding!\1",GameData::Item.get(item).name)) diff --git a/Data/Scripts/016_Pokemon/001_Pokemon.rb b/Data/Scripts/016_Pokemon/001_Pokemon.rb index bb128011b..6a0135a26 100644 --- a/Data/Scripts/016_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/016_Pokemon/001_Pokemon.rb @@ -224,9 +224,9 @@ class Pokemon # Return sole gender option for all male/all female/genderless species gender_rate = pbGetSpeciesData(@species, formSimple, SpeciesData::GENDER_RATE) case gender_rate - when PBGenderRates::AlwaysMale; return 0 - when PBGenderRates::AlwaysFemale; return 1 - when PBGenderRates::Genderless; return 2 + when PBGenderRates::AlwaysMale then return 0 + when PBGenderRates::AlwaysFemale then return 1 + when PBGenderRates::Genderless then return 2 end # Return gender for species that can be male or female return @genderflag if @genderflag && (@genderflag == 0 || @genderflag == 1) diff --git a/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb b/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb index 232d87a4c..253b73417 100644 --- a/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb +++ b/Data/Scripts/017_UI/003_PScreen_PokedexMain.rb @@ -760,12 +760,12 @@ class PokemonPokedex_Scene # Remove all unseen species from the results dexlist = dexlist.find_all { |item| next $Trainer.seen[item[0]] } case $PokemonGlobal.pokedexMode - when MODENUMERICAL; dexlist.sort! { |a,b| a[4]<=>b[4] } - when MODEATOZ; dexlist.sort! { |a,b| a[1]<=>b[1] } - when MODEHEAVIEST; dexlist.sort! { |a,b| b[3]<=>a[3] } - when MODELIGHTEST; dexlist.sort! { |a,b| a[3]<=>b[3] } - when MODETALLEST; dexlist.sort! { |a,b| b[2]<=>a[2] } - when MODESMALLEST; dexlist.sort! { |a,b| a[2]<=>b[2] } + when MODENUMERICAL then dexlist.sort! { |a,b| a[4]<=>b[4] } + when MODEATOZ then dexlist.sort! { |a,b| a[1]<=>b[1] } + when MODEHEAVIEST then dexlist.sort! { |a,b| b[3]<=>a[3] } + when MODELIGHTEST then dexlist.sort! { |a,b| a[3]<=>b[3] } + when MODETALLEST then dexlist.sort! { |a,b| b[2]<=>a[2] } + when MODESMALLEST then dexlist.sort! { |a,b| a[2]<=>b[2] } end return dexlist end @@ -822,17 +822,17 @@ class PokemonPokedex_Scene ret = nil # Set background case mode - when 0; @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_order") - when 1; @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_name") + when 0 then @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_order") + when 1 then @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_name") when 2 if PBTypes.regularTypesCount==18 @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_type_18") else @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_type") end - when 3,4; @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_size") - when 5; @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_color") - when 6; @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_shape") + when 3, 4 then @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_size") + when 5 then @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_color") + when 6 then @sprites["searchbg"].setBitmap("Graphics/Pictures/Pokedex/bg_search_shape") end selindex = selitems.clone index = selindex[0] diff --git a/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb b/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb index 3bc5828c2..841b0238b 100644 --- a/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb +++ b/Data/Scripts/017_UI/004_PScreen_PokedexEntry.rb @@ -186,8 +186,8 @@ class PokemonPokedexInfo_Scene thisformname = thisform[2] else # Necessarily applies only to form 0 case thisform[1] - when 0; thisformname = _INTL("Male") - when 1; thisformname = _INTL("Female") + when 0 then thisformname = _INTL("Male") + when 1 then thisformname = _INTL("Female") else thisformname = (multiforms) ? _INTL("One Form") : _INTL("Genderless") end @@ -212,9 +212,9 @@ class PokemonPokedexInfo_Scene @sprites["formicon"].visible = (@page==3) if @sprites["formicon"] # Draw page-specific information case page - when 1; drawPageInfo - when 2; drawPageArea - when 3; drawPageForms + when 1 then drawPageInfo + when 2 then drawPageArea + when 3 then drawPageForms end end diff --git a/Data/Scripts/017_UI/006_PScreen_Summary.rb b/Data/Scripts/017_UI/006_PScreen_Summary.rb index 73ee6532a..700cdc97a 100644 --- a/Data/Scripts/017_UI/006_PScreen_Summary.rb +++ b/Data/Scripts/017_UI/006_PScreen_Summary.rb @@ -347,11 +347,11 @@ class PokemonSummary_Scene drawMarkings(overlay,84,292) # Draw page-specific information case page - when 1; drawPageOne - when 2; drawPageTwo - when 3; drawPageThree - when 4; drawPageFour - when 5; drawPageFive + when 1 then drawPageOne + when 2 then drawPageTwo + when 3 then drawPageThree + when 4 then drawPageFour + when 5 then drawPageFive end end @@ -409,8 +409,12 @@ class PokemonSummary_Scene ownerbase = Color.new(64,64,64) ownershadow = Color.new(176,176,176) case @pokemon.owner.gender - when 0; ownerbase = Color.new(24,112,216); ownershadow = Color.new(136,168,208) - when 1; ownerbase = Color.new(248,56,32); ownershadow = Color.new(224,152,144) + when 0 + ownerbase = Color.new(24, 112, 216) + ownershadow = Color.new(136, 168, 208) + when 1 + ownerbase = Color.new(248, 56, 32) + ownershadow = Color.new(224, 152, 144) end textpos.push([@pokemon.owner.name,435,176,2,ownerbase,ownershadow]) textpos.push([sprintf("%05d",@pokemon.owner.public_id),435,208,2,Color.new(64,64,64),Color.new(176,176,176)]) diff --git a/Data/Scripts/017_UI/015_PScreen_Options.rb b/Data/Scripts/017_UI/015_PScreen_Options.rb index 79d73f52e..21aa1ff1a 100644 --- a/Data/Scripts/017_UI/015_PScreen_Options.rb +++ b/Data/Scripts/017_UI/015_PScreen_Options.rb @@ -106,9 +106,9 @@ $VersionStyles = [ def pbSettingToTextSpeed(speed) case speed - when 0; return 2 - when 1; return 1 - when 2; return -2 + when 0 then return 2 + when 1 then return 1 + when 2 then return -2 end return MessageConfig::TextSpeed || 1 end diff --git a/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb b/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb index 471e579f6..4b310ab6a 100644 --- a/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb +++ b/Data/Scripts/017_UI/017_PScreen_PokemonStorage.rb @@ -1582,10 +1582,10 @@ class PokemonStorageScreen _INTL("Cancel") ]) case command - when 0; pbWithdraw(selected,nil) - when 1; pbSummary(selected,nil) - when 2; pbMark(selected,nil) - when 3; pbRelease(selected,nil) + when 0 then pbWithdraw(selected, nil) + when 1 then pbSummary(selected, nil) + when 2 then pbMark(selected, nil) + when 3 then pbRelease(selected, nil) end end end @@ -1615,10 +1615,10 @@ class PokemonStorageScreen _INTL("Cancel") ]) case command - when 0; pbStore([-1,selected],nil) - when 1; pbSummary([-1,selected],nil) - when 2; pbMark([-1,selected],nil) - when 3; pbRelease([-1,selected],nil) + when 0 then pbStore([-1, selected], nil) + when 1 then pbSummary([-1, selected], nil) + when 2 then pbMark([-1, selected], nil) + when 3 then pbRelease([-1, selected], nil) end end end @@ -1961,15 +1961,18 @@ class PokemonStorageScreen retval = selected break end - when 1; pbSummary(selected,nil) + when 1 + pbSummary(selected,nil) when 2 # Store/Withdraw if selected[0]==-1 pbStore(selected,nil) else pbWithdraw(selected,nil) end - when 3; pbItem(selected,nil) - when 4; pbMark(selected,nil) + when 3 + pbItem(selected,nil) + when 4 + pbMark(selected,nil) end end end diff --git a/Data/Scripts/017_UI/019_PScreen_PC.rb b/Data/Scripts/017_UI/019_PScreen_PC.rb index a5f666d4e..d4b442fce 100644 --- a/Data/Scripts/017_UI/019_PScreen_PC.rb +++ b/Data/Scripts/017_UI/019_PScreen_PC.rb @@ -111,9 +111,9 @@ def pbTrainerPCMenu _INTL("Turn Off") ],-1,nil,command) case command - when 0; pbPCItemStorage - when 1; pbPCMailbox - else; break + when 0 then pbPCItemStorage + when 1 then pbPCMailbox + else break end end end diff --git a/Data/Scripts/017_UI/021_PScreen_Evolution.rb b/Data/Scripts/017_UI/021_PScreen_Evolution.rb index 8cc062232..ab2c9b46e 100644 --- a/Data/Scripts/017_UI/021_PScreen_Evolution.rb +++ b/Data/Scripts/017_UI/021_PScreen_Evolution.rb @@ -259,22 +259,22 @@ class SpriteMetafilePlayer value=@metafile[j][1] for sprite in @sprites case code - when SpriteMetafile::X; sprite.x=value - when SpriteMetafile::Y; sprite.y=value - when SpriteMetafile::OX; sprite.ox=value - when SpriteMetafile::OY; sprite.oy=value - when SpriteMetafile::ZOOM_X; sprite.zoom_x=value - when SpriteMetafile::ZOOM_Y; sprite.zoom_y=value - when SpriteMetafile::SRC_RECT; sprite.src_rect=value - when SpriteMetafile::VISIBLE; sprite.visible=value - when SpriteMetafile::Z; sprite.z=value # prevent crashes - when SpriteMetafile::ANGLE; sprite.angle=(value==180) ? 179.9 : value - when SpriteMetafile::MIRROR; sprite.mirror=value - when SpriteMetafile::BUSH_DEPTH; sprite.bush_depth=value - when SpriteMetafile::OPACITY; sprite.opacity=value - when SpriteMetafile::BLEND_TYPE; sprite.blend_type=value - when SpriteMetafile::COLOR; sprite.color=value - when SpriteMetafile::TONE; sprite.tone=value + when SpriteMetafile::X then sprite.x = value + when SpriteMetafile::Y then sprite.y = value + when SpriteMetafile::OX then sprite.ox = value + when SpriteMetafile::OY then sprite.oy = value + when SpriteMetafile::ZOOM_X then sprite.zoom_x = value + when SpriteMetafile::ZOOM_Y then sprite.zoom_y = value + when SpriteMetafile::SRC_RECT then sprite.src_rect = value + when SpriteMetafile::VISIBLE then sprite.visible = value + when SpriteMetafile::Z then sprite.z = value # prevent crashes + when SpriteMetafile::ANGLE then sprite.angle = (value == 180) ? 179.9 : value + when SpriteMetafile::MIRROR then sprite.mirror = value + when SpriteMetafile::BUSH_DEPTH then sprite.bush_depth = value + when SpriteMetafile::OPACITY then sprite.opacity = value + when SpriteMetafile::BLEND_TYPE then sprite.blend_type = value + when SpriteMetafile::COLOR then sprite.color = value + when SpriteMetafile::TONE then sprite.tone = value end end end diff --git a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb index 838b257f9..807c08786 100644 --- a/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb +++ b/Data/Scripts/018_Minigames/002_PMinigame_TripleTriad.rb @@ -56,9 +56,9 @@ class TriadCard aType = @type oType = opponent.type case PBTypes.getEffectiveness(aType,oType) - when PBTypeEffectiveness::INEFFECTIVE; return -2 - when PBTypeEffectiveness::NOT_EFFECTIVE_ONE; return -1 - when PBTypeEffectiveness::SUPER_EFFECTIVE_ONE; return 1 + when PBTypeEffectiveness::INEFFECTIVE then return -2 + when PBTypeEffectiveness::NOT_EFFECTIVE_ONE then return -1 + when PBTypeEffectiveness::SUPER_EFFECTIVE_ONE then return 1 end return 0 end diff --git a/Data/Scripts/020_System and utilities/001_PSystem_Controls.rb b/Data/Scripts/020_System and utilities/001_PSystem_Controls.rb index 081ec035a..75a8e1a7b 100644 --- a/Data/Scripts/020_System and utilities/001_PSystem_Controls.rb +++ b/Data/Scripts/020_System and utilities/001_PSystem_Controls.rb @@ -98,36 +98,36 @@ module Input def self.buttonToKey(button) case button - when Input::DOWN; return [0x28] # Down - when Input::LEFT; return [0x25] # Left - when Input::RIGHT; return [0x27] # Right - when Input::UP; return [0x26] # Up - when Input::TAB; return [0x09] # Tab - when Input::A; return [0x5A,0x57,0x59,0x10] # Z, W, Y, Shift - when Input::B; return [0x58,0x1B] # X, ESC - when Input::C; return [0x43,0x0D,0x20] # C, ENTER, Space -# when Input::X; return [0x41] # A -# when Input::Y; return [0x53] # S -# when Input::Z; return [0x44] # D - when Input::L; return [0x41,0x51,0x21] # A, Q, Page Up - when Input::R; return [0x53,0x22] # S, Page Down - when Input::ENTER; return [0x0D] # ENTER - when Input::ESC; return [0x1B] # ESC - when Input::SHIFT; return [0x10] # Shift - when Input::CTRL; return [0x11] # Ctrl - when Input::ALT; return [0x12] # Alt - when Input::BACKSPACE; return [0x08] # Backspace - when Input::DELETE; return [0x2E] # Delete - when Input::HOME; return [0x24] # Home - when Input::ENDKEY; return [0x23] # End - when Input::F5; return [0x46,0x74,0x09] # F, F5, Tab - when Input::ONLYF5; return [0x74] # F5 - when Input::F6; return [0x75] # F6 - when Input::F7; return [0x76] # F7 - when Input::F8; return [0x77] # F8 - when Input::F9; return [0x78] # F9 - else; return [] + when Input::DOWN then return [0x28] # Down + when Input::LEFT then return [0x25] # Left + when Input::RIGHT then return [0x27] # Right + when Input::UP then return [0x26] # Up + when Input::TAB then return [0x09] # Tab + when Input::A then return [0x5A, 0x57, 0x59, 0x10] # Z, W, Y, Shift + when Input::B then return [0x58, 0x1B] # X, ESC + when Input::C then return [0x43, 0x0D, 0x20] # C, ENTER, Space +# when Input::X then return [0x41] # A +# when Input::Y then return [0x53] # S +# when Input::Z then return [0x44] # D + when Input::L then return [0x41, 0x51, 0x21] # A, Q, Page Up + when Input::R then return [0x53, 0x22] # S, Page Down + when Input::ENTER then return [0x0D] # ENTER + when Input::ESC then return [0x1B] # ESC + when Input::SHIFT then return [0x10] # Shift + when Input::CTRL then return [0x11] # Ctrl + when Input::ALT then return [0x12] # Alt + when Input::BACKSPACE then return [0x08] # Backspace + when Input::DELETE then return [0x2E] # Delete + when Input::HOME then return [0x24] # Home + when Input::ENDKEY then return [0x23] # End + when Input::F5 then return [0x46, 0x74, 0x09] # F, F5, Tab + when Input::ONLYF5 then return [0x74] # F5 + when Input::F6 then return [0x75] # F6 + when Input::F7 then return [0x76] # F7 + when Input::F8 then return [0x77] # F8 + when Input::F9 then return [0x78] # F9 end + return [] end def self.dir4 diff --git a/Data/Scripts/020_System and utilities/003_PSystem_FileUtilities.rb b/Data/Scripts/020_System and utilities/003_PSystem_FileUtilities.rb index d7f70b8c1..4a2cdac88 100644 --- a/Data/Scripts/020_System and utilities/003_PSystem_FileUtilities.rb +++ b/Data/Scripts/020_System and utilities/003_PSystem_FileUtilities.rb @@ -85,11 +85,11 @@ def pbCheckPokemonBitmapFiles(params) factors.each_with_index do |factor,index| newVal = ((i/(2**index))%2==0) ? factor[1] : factor[2] case factor[0] - when 0; trySpecies = newVal - when 2; tryGender = newVal - when 3; tryShiny = newVal - when 4; tryForm = newVal - when 5; tryShadow = newVal + when 0 then trySpecies = newVal + when 2 then tryGender = newVal + when 3 then tryShiny = newVal + when 4 then tryForm = newVal + when 5 then tryShadow = newVal end end for j in 0...2 # Try using the species' internal name and then its ID number @@ -192,11 +192,11 @@ def pbCheckPokemonIconFiles(params,egg=false) factors.each_with_index do |factor,index| newVal = ((i/(2**index))%2==0) ? factor[1] : factor[2] case factor[0] - when 0; trySpecies = newVal - when 1; tryGender = newVal - when 2; tryShiny = newVal - when 3; tryForm = newVal - when 4; tryShadow = newVal + when 0 then trySpecies = newVal + when 1 then tryGender = newVal + when 2 then tryShiny = newVal + when 3 then tryForm = newVal + when 4 then tryShadow = newVal end end for j in 0...2 # Try using the species' internal name and then its ID number diff --git a/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb b/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb index e04f18164..b6aaec359 100644 --- a/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb +++ b/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb @@ -105,13 +105,13 @@ def pbGetLanguage() return 0 if ret==0 # Unknown end case ret - when 0x11; return 1 # Japanese - when 0x09; return 2 # English - when 0x0C; return 3 # French - when 0x10; return 4 # Italian - when 0x07; return 5 # German - when 0x0A; return 7 # Spanish - when 0x12; return 8 # Korean + when 0x11 then return 1 # Japanese + when 0x09 then return 2 # English + when 0x0C then return 3 # French + when 0x10 then return 4 # Italian + when 0x07 then return 5 # German + when 0x0A then return 7 # Spanish + when 0x12 then return 8 # Korean end return 2 # Use 'English' by default end @@ -182,7 +182,8 @@ end def beginRecordUI code = beginRecord case code - when 0; return true + when 0 + return true when 256+66 pbMessage(_INTL("All recording devices are in use. Recording is not possible now.")) return false @@ -758,10 +759,10 @@ def getRandomNameEx(type,variable,upper,maxLength=100) name = "" formats = [] case type - when 0; formats = %w( F5 BvE FE FE5 FEvE ) # Names for males - when 1; formats = %w( vE6 vEvE6 BvE6 B4 v3 vEv3 Bv3 ) # Names for females - when 2; formats = %w( WE WEU WEvE BvE BvEU BvEvE ) # Neutral gender names - else; return "" + when 0 then formats = %w( F5 BvE FE FE5 FEvE ) # Names for males + when 1 then formats = %w( vE6 vEvE6 BvE6 B4 v3 vEv3 Bv3 ) # Names for females + when 2 then formats = %w( WE WEU WEvE BvE BvEU BvEvE ) # Neutral gender names + else return "" end format = formats[rand(formats.length)] format.scan(/./) { |c| @@ -816,8 +817,8 @@ def getRandomNameEx(type,variable,upper,maxLength=100) } name = name[0,maxLength] case upper - when 0; name = name.upcase - when 1; name[0,1] = name[0,1].upcase + when 0 then name = name.upcase + when 1 then name[0, 1] = name[0, 1].upcase end if $game_variables && variable $game_variables[variable] = name diff --git a/Data/Scripts/021_Debug/003_Debug_Pokemon.rb b/Data/Scripts/021_Debug/003_Debug_Pokemon.rb index 874b6c7c5..0b5bea963 100644 --- a/Data/Scripts/021_Debug/003_Debug_Pokemon.rb +++ b/Data/Scripts/021_Debug/003_Debug_Pokemon.rb @@ -318,12 +318,24 @@ module PokemonDebugMixin #=========================================================================== when "setbeauty", "setcool", "setcute", "setsmart", "settough", "setsheen" case command - when "setbeauty"; statname = _INTL("Beauty"); defval = pkmn.beauty - when "setcool"; statname = _INTL("Cool"); defval = pkmn.cool - when "setcute"; statname = _INTL("Cute"); defval = pkmn.cute - when "setsmart"; statname = _INTL("Smart"); defval = pkmn.smart - when "settough"; statname = _INTL("Tough"); defval = pkmn.tough - when "setsheen"; statname = _INTL("Sheen"); defval = pkmn.sheen + when "setbeauty" + statname = _INTL("Beauty") + defval = pkmn.beauty + when "setcool" + statname = _INTL("Cool") + defval = pkmn.cool + when "setcute" + statname = _INTL("Cute") + defval = pkmn.cute + when "setsmart" + statname = _INTL("Smart") + defval = pkmn.smart + when "settough" + statname = _INTL("Tough") + defval = pkmn.tough + when "setsheen" + statname = _INTL("Sheen") + defval = pkmn.sheen end params = ChooseNumberParams.new params.setRange(0,255) @@ -332,12 +344,12 @@ module PokemonDebugMixin _INTL("Set the Pokémon's {1} (max. 255).",statname),params) { pbUpdate } if newval!=defval case command - when "setbeauty"; pkmn.beauty = newval - when "setcool"; pkmn.cool = newval - when "setcute"; pkmn.cute = newval - when "setsmart"; pkmn.smart = newval - when "settough"; pkmn.tough = newval - when "setsheen"; pkmn.sheen = newval + when "setbeauty" then pkmn.beauty = newval + when "setcool" then pkmn.cool = newval + when "setcute" then pkmn.cute = newval + when "setsmart" then pkmn.smart = newval + when "settough" then pkmn.tough = newval + when "setsheen" then pkmn.sheen = newval end pbRefreshSingle(pkmnid) end diff --git a/Data/Scripts/021_Debug/005_Editor_SaveData.rb b/Data/Scripts/021_Debug/005_Editor_SaveData.rb index 5b3effaf6..bb0672638 100644 --- a/Data/Scripts/021_Debug/005_Editor_SaveData.rb +++ b/Data/Scripts/021_Debug/005_Editor_SaveData.rb @@ -30,9 +30,9 @@ def pbSaveTypes cname = getConstantName(PBTypes,j) rescue pbGetTypeConst(j) next if !cname || cname=="" case PBTypes.getEffectiveness(j,i) - when PBTypeEffectiveness::SUPER_EFFECTIVE_ONE; weak.push(cname) - when PBTypeEffectiveness::NOT_EFFECTIVE_ONE; resist.push(cname) - when PBTypeEffectiveness::INEFFECTIVE; immune.push(cname) + when PBTypeEffectiveness::SUPER_EFFECTIVE_ONE then weak.push(cname) + when PBTypeEffectiveness::NOT_EFFECTIVE_ONE then resist.push(cname) + when PBTypeEffectiveness::INEFFECTIVE then immune.push(cname) end end f.write("Weaknesses = "+weak.join(",")+"\r\n") if weak.length>0 diff --git a/Data/Scripts/021_Debug/012_Editor_SpritePosEditor.rb b/Data/Scripts/021_Debug/012_Editor_SpritePosEditor.rb index 8242fb272..71a3894d0 100644 --- a/Data/Scripts/021_Debug/012_Editor_SpritePosEditor.rb +++ b/Data/Scripts/021_Debug/012_Editor_SpritePosEditor.rb @@ -244,39 +244,39 @@ class SpritePositioner Input.update self.update case param - when 0; @sprites["info"].setTextToFit("Ally Position = #{xpos},#{ypos}") - when 1; @sprites["info"].setTextToFit("Enemy Position = #{xpos},#{ypos}") - when 3; @sprites["info"].setTextToFit("Shadow Position = #{xpos}") + when 0 then @sprites["info"].setTextToFit("Ally Position = #{xpos},#{ypos}") + when 1 then @sprites["info"].setTextToFit("Enemy Position = #{xpos},#{ypos}") + when 3 then @sprites["info"].setTextToFit("Shadow Position = #{xpos}") end if Input.repeat?(Input::UP) && param!=3 ypos -= 1 case param - when 0; @metrics[SpeciesData::METRIC_PLAYER_Y][@species] = ypos - when 1; @metrics[SpeciesData::METRIC_ENEMY_Y][@species] = ypos + when 0 then @metrics[SpeciesData::METRIC_PLAYER_Y][@species] = ypos + when 1 then @metrics[SpeciesData::METRIC_ENEMY_Y][@species] = ypos end refresh elsif Input.repeat?(Input::DOWN) && param!=3 ypos += 1 case param - when 0; @metrics[SpeciesData::METRIC_PLAYER_Y][@species] = ypos - when 1; @metrics[SpeciesData::METRIC_ENEMY_Y][@species] = ypos + when 0 then @metrics[SpeciesData::METRIC_PLAYER_Y][@species] = ypos + when 1 then @metrics[SpeciesData::METRIC_ENEMY_Y][@species] = ypos end refresh end if Input.repeat?(Input::LEFT) xpos -= 1 case param - when 0; @metrics[SpeciesData::METRIC_PLAYER_X][@species] = xpos - when 1; @metrics[SpeciesData::METRIC_ENEMY_X][@species] = xpos - when 3; @metrics[SpeciesData::METRIC_SHADOW_X][@species] = xpos + when 0 then @metrics[SpeciesData::METRIC_PLAYER_X][@species] = xpos + when 1 then @metrics[SpeciesData::METRIC_ENEMY_X][@species] = xpos + when 3 then @metrics[SpeciesData::METRIC_SHADOW_X][@species] = xpos end refresh elsif Input.repeat?(Input::RIGHT) xpos += 1 case param - when 0; @metrics[SpeciesData::METRIC_PLAYER_X][@species] = xpos - when 1; @metrics[SpeciesData::METRIC_ENEMY_X][@species] = xpos - when 3; @metrics[SpeciesData::METRIC_SHADOW_X][@species] = xpos + when 0 then @metrics[SpeciesData::METRIC_PLAYER_X][@species] = xpos + when 1 then @metrics[SpeciesData::METRIC_ENEMY_X][@species] = xpos + when 3 then @metrics[SpeciesData::METRIC_SHADOW_X][@species] = xpos end refresh end diff --git a/Data/Scripts/022_Compiler/001_Data_storage.rb b/Data/Scripts/022_Compiler/001_Data_storage.rb index 3c05e13a7..28c43b8ec 100644 --- a/Data/Scripts/022_Compiler/001_Data_storage.rb +++ b/Data/Scripts/022_Compiler/001_Data_storage.rb @@ -52,11 +52,11 @@ module SerialRecords while strm.pos=2 - pbLoadMessages("Data/"+LANGUAGES[$PokemonSystem.language][1]) end pbSetWindowText(nil) end @@ -722,8 +715,6 @@ module Compiler mustCompile = false # Should recompile if new maps were imported mustCompile |= import_new_maps - # Should recompile if no existing data is found - mustCompile |= !(PBSpecies.respond_to?("maxValue") rescue false) # If no PBS file, create one and fill it, then recompile if !safeIsDirectory?("PBS") Dir.mkdir("PBS") rescue nil diff --git a/Data/Scripts/022_Compiler/003_Compiler_PBS.rb b/Data/Scripts/022_Compiler/003_Compiler_PBS.rb index ecae80523..0d50bc953 100644 --- a/Data/Scripts/022_Compiler/003_Compiler_PBS.rb +++ b/Data/Scripts/022_Compiler/003_Compiler_PBS.rb @@ -169,10 +169,14 @@ module Compiler print _INTL("Warning: Map {1}, as mentioned in the map connection data, was not found.\r\n{2}",record[3],FileLineData.linereport) end case record[1] - when "N"; raise _INTL("North side of first map must connect with south side of second map\r\n{1}",FileLineData.linereport) if record[4]!="S" - when "S"; raise _INTL("South side of first map must connect with north side of second map\r\n{1}",FileLineData.linereport) if record[4]!="N" - when "E"; raise _INTL("East side of first map must connect with west side of second map\r\n{1}",FileLineData.linereport) if record[4]!="W" - when "W"; raise _INTL("West side of first map must connect with east side of second map\r\n{1}",FileLineData.linereport) if record[4]!="E" + when "N" + raise _INTL("North side of first map must connect with south side of second map\r\n{1}", FileLineData.linereport) if record[4] != "S" + when "S" + raise _INTL("South side of first map must connect with north side of second map\r\n{1}", FileLineData.linereport) if record[4] != "N" + when "E" + raise _INTL("East side of first map must connect with west side of second map\r\n{1}", FileLineData.linereport) if record[4] != "W" + when "W" + raise _INTL("West side of first map must connect with east side of second map\r\n{1}", FileLineData.linereport) if record[4] != "E" end records.push(record) } diff --git a/Data/Scripts/999_Main/999_Main.rb b/Data/Scripts/999_Main/999_Main.rb index c7fcd37d6..6c9fcd5e2 100644 --- a/Data/Scripts/999_Main/999_Main.rb +++ b/Data/Scripts/999_Main/999_Main.rb @@ -1,5 +1,5 @@ -pbSetUpSystem Compiler.main +pbSetUpSystem class Scene_DebugIntro def main diff --git a/rubyscreen.dll b/rubyscreen.dll deleted file mode 100644 index a6a34ea840c5efb2a21fffea3efd02bf3688eb5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28160 zcmeHw4SZD9weOkC023IP5l4&~C1|WrC_>0c!iSBT5p7B3E5xcX1qt#EP39z8b4#LJ9WK-cY!THr1&_IO9wqVroX2X5N3Tea_68e4yU; zz2Ck4HL~aI@4fcgYp=c5+Up!k?s!D9OOoV3NF*d_H=guY#J}hNX+ZIa(JzjWwrBos z%x>H4-;G(YY*YvN#>7g|ALHmL16Qm1)GJEQ`B&*&70F&N2!TPx0W zY725bYQ}D&yZ!SQmLbbCXGPDl!Pt6B5Koauqw+`y&H z`8AsB1$64vZgB~4~G|{>g0WqO9+}3iTV07T-&u`m|k+bB%u>?)&eU*#buKR>DhovpS}?M zSq6Gsz|fDt2|S55py-ufyClYts|+aoKz{OI{J(T%fk*N~} zRlKqvzYLfcOV{e}LQ>LyRto6$tL2@MF%2^=r>vO)d&1wPzBPH@hn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