#============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_TITLE') #============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs title screen processing. #============================================================================== class Scene_Title attr_accessor :command_window #-------------------------------------------------------------------------- # * Command: New Game : Scene Switch #-------------------------------------------------------------------------- def commandnewgame_sceneswitch # Switch to map screen new_scene(Scene_Map) end #-------------------------------------------------------------------------- # * Command: Continue #-------------------------------------------------------------------------- def command_continue # If continue is disabled unless @continue_enabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to load screen new_layer(Scene_Load) end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_MAP') #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs map screen processing. #============================================================================== class Scene_Map < SDK::Scene_Base #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update_background super loop do # Loop update_systems # Update Systems break if update_transferplayer? # Break if Transfer Player break if update_transition? # Break if Transition end # End Loop @spriteset.update # Update Spriteset end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @message_window.update # Update message window return if update_game_over? # Exit If Gameover return if update_to_title? # Exit if Title update_transition # Update Transition return if update_message? # Exit If Message update_encounter # Update Encounter update_call_menu # Update Menu Call update_call_debug # Update Debug Call update_calling # Update Calls end #-------------------------------------------------------------------------- # * Frame Update : Systems #-------------------------------------------------------------------------- def update_systems # Update map, interpreter, and player order # (this update order is important for when conditions are fulfilled # to run any event, and the player isn't provided the opportunity to # move in an instant) $game_map.update $game_system.map_interpreter.update $game_player.update if !has_layers? #***** # Update system (timer), screen $game_system.update $game_screen.update end #-------------------------------------------------------------------------- # * Shop Call #-------------------------------------------------------------------------- def call_shop # Clear shop call flag $game_temp.shop_calling = false # Straighten player position $game_player.straighten # Switch to shop screen new_layer(Scene_Shop) #***** end #-------------------------------------------------------------------------- # * Name Input Call #-------------------------------------------------------------------------- def call_name # Clear name input call flag $game_temp.name_calling = false # Straighten player position $game_player.straighten # Switch to name input screen new_layer(Scene_Name) #***** end #-------------------------------------------------------------------------- # * Menu Call #-------------------------------------------------------------------------- def call_menu # Clear menu call flag $game_temp.menu_calling = false # If menu beep flag is set if $game_temp.menu_beep # Play decision SE $game_system.se_play($data_system.decision_se) # Clear menu beep flag $game_temp.menu_beep = false end # Straighten player position $game_player.straighten # Switch to menu screen new_layer(Scene_Menu) #***** end #-------------------------------------------------------------------------- # * Save Call #-------------------------------------------------------------------------- def call_save # Straighten player position $game_player.straighten # Switch to save screen new_layer(Scene_Save) #***** end #-------------------------------------------------------------------------- # * Debug Call #-------------------------------------------------------------------------- def call_debug # Clear debug call flag $game_temp.debug_calling = false # Play decision SE $game_system.se_play($data_system.decision_se) # Straighten player position $game_player.straighten # Switch to debug screen new_layer(Scene_Debug) #***** end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_MENU') #============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs menu screen processing. #============================================================================== class Scene_Menu < SDK::Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(parent = nil, menu_index = 0) @menu_index = menu_index super(parent) end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def update_command # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to map screen new_scene(Scene_Map) return end # If C button was pressed if Input.trigger?(Input::C) # If command other than save or end game, and party members = 0 if $game_party.actors.size == 0 and @command_window.index < 4 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Branch by command window cursor position case @command_window.index when 0 # item # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to item screen new_layer(Scene_Item) when 1 # skill # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 # save # If saving is forbidden if $game_system.save_disabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to save screen new_layer(Scene_Save) when 5 # end game # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to end game screen new_layer(Scene_End) end return end end #-------------------------------------------------------------------------- # * Frame Update (when status window is active) #-------------------------------------------------------------------------- def update_status # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Make command window active @command_window.active = true @status_window.active = false @status_window.index = -1 return end # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 1 # skill # If this actor's action limit is 2 or more if $game_party.actors[@status_window.index].restriction >= 2 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to skill screen new_layer(Scene_Skill, @status_window.index) when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to equipment screen new_layer(Scene_Equip, @status_window.index) when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen new_layer(Scene_Status, @status_window.index) end return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_ITEM') #============================================================================== # ** Scene_Item #------------------------------------------------------------------------------ # This class performs item screen processing. #============================================================================== class Scene_Item < SDK::Scene_Base #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen new_scene(Scene_Menu, 0) return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item unless @item.is_a?(RPG::Item) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @item.scope == 4 || @item.scope == 6 @target_window.index = -1 else @target_window.index = 0 end # If effect scope is other than an ally else # If command event ID is valid if @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen root.clear_layers return end end return end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # If unable to use because items ran out unless $game_party.item_can_use?(@item.id) # Remake item window contents @item_window.refresh end # Erase target window @item_window.active = true @target_window.visible = false @target_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # If items are used up if $game_party.item_number(@item.id) == 0 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply item effects to entire party used = false for i in $game_party.actors used |= i.item_effect(@item) end end # If single target if @target_window.index >= 0 # Apply item use effects to target actor target = $game_party.actors[@target_window.index] used = target.item_effect(@item) end # If an item was used if used # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Redraw item window item @item_window.draw_item(@item_window.index) end # Remake target window contents @target_window.refresh # If all party members are dead if $game_party.all_dead? # Switch to game over screen root.new_scene(Scene_Gameover) return end # If common event ID is valid if @item.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @item.common_event_id # Switch to map screen root.clear_layers return end end # If item wasn't used unless used # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_SKILL') #============================================================================== # ** Scene_Skill #------------------------------------------------------------------------------ # This class performs skill screen processing. #============================================================================== class Scene_Skill < SDK::Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index #-------------------------------------------------------------------------- def initialize(parent = nil, actor_index = 0) @actor_index = actor_index super(parent) end #-------------------------------------------------------------------------- # * Frame Update (if skill window is active) #-------------------------------------------------------------------------- def update_skill # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen new_scene(Scene_Menu, 1) return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the skill window @skill = @skill_window.skill # If unable to use if @skill == nil or not @actor.skill_can_use?(@skill.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is ally if @skill.scope >= 3 # Activate target window @skill_window.active = false @target_window.x = (@skill_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @skill.scope == 4 || @skill.scope == 6 @target_window.index = -1 elsif @skill.scope == 7 @target_window.index = @actor_index - 10 else @target_window.index = 0 end # If effect scope is other than ally else # If common event ID is valid if @skill.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @skill.common_event_id # Play use skill SE $game_system.se_play(@skill.menu_se) # Use up SP @actor.sp -= @skill.sp_cost # Remake each window content @status_window.refresh @skill_window.refresh @target_window.refresh # Switch to map screen root.clear_layers return end end return end # If R button was pressed if Input.trigger?(Input::R) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To next actor @actor_index += 1 @actor_index %= $game_party.actors.size # Switch to different skill screen new_scene(Scene_Skill, @actor_index) return end # If L button was pressed if Input.trigger?(Input::L) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To previous actor @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Switch to different skill screen new_scene(Scene_Skill, @actor_index) return end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Erase target window @skill_window.active = true @target_window.visible = false @target_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # If unable to use because SP ran out unless @actor.skill_can_use?(@skill.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply skill use effects to entire party used = false for i in $game_party.actors used |= i.skill_effect(@actor, @skill) end end # If target is user if @target_window.index <= -2 # Apply skill use effects to target actor target = $game_party.actors[@target_window.index + 10] used = target.skill_effect(@actor, @skill) end # If single target if @target_window.index >= 0 # Apply skill use effects to target actor target = $game_party.actors[@target_window.index] used = target.skill_effect(@actor, @skill) end # If skill was used if used # Play skill use SE $game_system.se_play(@skill.menu_se) # Use up SP @actor.sp -= @skill.sp_cost # Remake each window content @status_window.refresh @skill_window.refresh @target_window.refresh # If entire party is dead if $game_party.all_dead? # Switch to game over screen root.new_scene(Scene_Gameover) return end # If command event ID is valid if @skill.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @skill.common_event_id # Switch to map screen root.clear_layers return end end # If skill wasn't used unless used # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_EQUIP') #============================================================================== # ** Scene_Equip #------------------------------------------------------------------------------ # This class performs equipment screen processing. #============================================================================== class Scene_Equip < SDK::Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index # equip_index : equipment index #-------------------------------------------------------------------------- def initialize(parent = nil, actor_index = 0, equip_index = 0) @actor_index = actor_index @equip_index = equip_index super(parent) end #-------------------------------------------------------------------------- # * Frame Update (when right window is active) #-------------------------------------------------------------------------- def update_right # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen new_scene(Scene_Menu, 2) return end # If C button was pressed if Input.trigger?(Input::C) # If equipment is fixed if @actor.equip_fix?(@right_window.index) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Activate item window @right_window.active = false @item_window.active = true @item_window.index = 0 return end # If R button was pressed if Input.trigger?(Input::R) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To next actor @actor_index += 1 @actor_index %= $game_party.actors.size # Switch to different equipment screen new_scene(Scene_Equip, @actor_index, @right_window.index) return end # If L button was pressed if Input.trigger?(Input::L) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To previous actor @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Switch to different equipment screen new_scene(Scene_Equip, @actor_index, @right_window.index) return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_STATUS') #============================================================================== # ** Scene_Status #------------------------------------------------------------------------------ # This class performs status screen processing. #============================================================================== class Scene_Status < SDK::Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index #-------------------------------------------------------------------------- def initialize(parent = nil, actor_index = 0) @actor_index = actor_index super(parent) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen new_scene(Scene_Menu, 3) return end # If R button was pressed if Input.trigger?(Input::R) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To next actor @actor_index += 1 @actor_index %= $game_party.actors.size # Switch to different status screen new_scene(Scene_Status, @actor_index) return end # If L button was pressed if Input.trigger?(Input::L) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To previous actor @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Switch to different status screen new_scene(Scene_Status, @actor_index) return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_FILE') #============================================================================== # ** Scene_File #------------------------------------------------------------------------------ # This is a superclass for the save screen and load screen. #============================================================================== class Scene_File < SDK::Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # help_text : text string shown in the help window #-------------------------------------------------------------------------- def initialize(parent, help_text) @help_text = help_text super(parent) end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_SAVE') class Scene_Save < Scene_File #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(parent = nil) super(parent, "Which file would you like to save to?") end #-------------------------------------------------------------------------- # * Decision Processing #-------------------------------------------------------------------------- def on_decision(filename) # Play save SE $game_system.se_play($data_system.save_se) # Write save data file = File.open(filename, "wb") write_save_data(file) file.close # If called from event if $game_temp.save_calling # Clear save call flag $game_temp.save_calling = false # Switch to map screen new_scene(Scene_Map) return end # Switch to menu screen new_scene(Scene_Menu, 4) end #-------------------------------------------------------------------------- # * Cancel Processing #-------------------------------------------------------------------------- def on_cancel # Play cancel SE $game_system.se_play($data_system.cancel_se) # If called from event if $game_temp.save_calling # Clear save call flag $game_temp.save_calling = false # Switch to map screen new_scene(Scene_Map) return end # Switch to menu screen new_scene(Scene_Menu, 4) end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_LOAD') #============================================================================== # ** Scene_Load #------------------------------------------------------------------------------ # This class performs load screen processing. #============================================================================== class Scene_Load < Scene_File #-------------------------------------------------------------------------- SDK.log_branch(:Scene_Load, :main_window, :main_end) #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(parent = nil) # Remake temporary object $game_temp = Game_Temp.new # Timestamp selects new file $game_temp.last_file_index = 0 latest_time = Time.at(0) for i in 0..3 filename = make_filename(i) if FileTest.exist?(filename) file = File.open(filename, "r") if file.mtime > latest_time latest_time = file.mtime $game_temp.last_file_index = i end file.close end end super(parent, "Which file would you like to load?") end #-------------------------------------------------------------------------- # * Main Processing : Window #-------------------------------------------------------------------------- def main_window super if @parent != nil && @parent.is_a?(Scene_Title) @parent.command_window.active = false @parent.command_window.visible = false end end #-------------------------------------------------------------------------- # * Main Processing : Ending #-------------------------------------------------------------------------- def main_end if @parent != nil && @parent.is_a?(Scene_Title) && !@parent.command_window.disposed? @parent.command_window.active = true @parent.command_window.visible = true end super end #-------------------------------------------------------------------------- # * Decision Processing #-------------------------------------------------------------------------- def on_decision(filename) # If file doesn't exist unless FileTest.exist?(filename) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play load SE $game_system.se_play($data_system.load_se) # Read save data file = File.open(filename, "rb") read_save_data(file) file.close # Restore BGM and BGS $game_system.bgm_play($game_system.playing_bgm) $game_system.bgs_play($game_system.playing_bgs) # Update map (run parallel process event) $game_map.update # Switch to map screen root.new_scene(Scene_Map) end #-------------------------------------------------------------------------- # * Cancel Processing #-------------------------------------------------------------------------- def on_cancel # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to title screen new_scene(Scene_Title) end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_END') #============================================================================== # ** Scene_End #------------------------------------------------------------------------------ # This class performs game end screen processing. #============================================================================== class Scene_End < SDK::Scene_Base #-------------------------------------------------------------------------- SDK.log_branch(:Scene_End, :main_sprite) #-------------------------------------------------------------------------- # * Main Processing : Sprite #-------------------------------------------------------------------------- def main_sprite @sprite = Sprite.new @sprite.bitmap = Bitmap.new(640, 480) @sprite.bitmap.fill_rect(0, 0, 640, 480, Color.new(0, 0, 0, 200)) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen new_scene(Scene_Menu, 5) return end # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 0 # to title command_to_title when 1 # shutdown command_shutdown when 2 # quit command_cancel end return end end #-------------------------------------------------------------------------- # * Main Processing : Ending #-------------------------------------------------------------------------- def main_end super # If switching to title screen if $scene.is_a?(Scene_Title) # Fade out screen Graphics.transition if @parent == nil # Because layers will have already Graphics.freeze end end #-------------------------------------------------------------------------- # * Process When Choosing [To Title] Command #-------------------------------------------------------------------------- def command_to_title # Play decision SE $game_system.se_play($data_system.decision_se) # Fade out BGM, BGS, and ME Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) # Switch to title screen root.new_scene(Scene_Title) end #-------------------------------------------------------------------------- # * Process When Choosing [Cancel] Command #-------------------------------------------------------------------------- def command_cancel # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to menu screen new_scene(Scene_Menu, 5) end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_SHOP') #============================================================================== # ** Scene_Shop #------------------------------------------------------------------------------ # This class performs shop screen processing. #============================================================================== class Scene_Shop < SDK::Scene_Base #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def update_command # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to map screen new_scene(Scene_Map) return end # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 0 # buy # Play decision SE $game_system.se_play($data_system.decision_se) # Change windows to buy mode @command_window.active = false @dummy_window.visible = false @buy_window.active = true @buy_window.visible = true @buy_window.refresh @status_window.visible = true when 1 # sell # Play decision SE $game_system.se_play($data_system.decision_se) # Change windows to sell mode @command_window.active = false @dummy_window.visible = false @sell_window.active = true @sell_window.visible = true @sell_window.refresh when 2 # quit # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to map screen new_scene(Scene_Map) end return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_NAME') #============================================================================== # ** Scene_Name #------------------------------------------------------------------------------ # This class performs name input screen processing. #============================================================================== class Scene_Name < SDK::Scene_Base #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # If B button was pressed if Input.repeat?(Input::B) # If cursor position is at 0 if @edit_window.index == 0 return end # Play cancel SE $game_system.se_play($data_system.cancel_se) # Delete text @edit_window.back return end # If C button was pressed if Input.trigger?(Input::C) # If cursor position is at [OK] if @input_window.character == nil # If name is empty if @edit_window.name == "" # Return to default name @edit_window.restore_default # If name is empty if @edit_window.name == "" # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) return end # Change actor name @actor.name = @edit_window.name # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to map screen new_scene(Scene_Map) return end # If cursor position is at maximum if @edit_window.index == $game_temp.name_max_char # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If text character is empty if @input_window.character == "" # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Add text character @edit_window.add(@input_window.character) return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_GAMEOVER') #============================================================================== # ** Scene_Gameover #------------------------------------------------------------------------------ # This class performs game over screen processing. #============================================================================== class Scene_Gameover < SDK::Scene_Base #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super # If C button was pressed if Input.trigger?(Input::C) # Switch to title screen new_scene(Scene_Title) end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end #============================================================================== # ** Enable Part III Check #============================================================================== if SDK::Parts.include?(3) || SDK::Indidual_Parts.include?('PART 3#SCENE_DEBUG') #============================================================================== # ** Scene_Debug #------------------------------------------------------------------------------ # This class performs debug screen processing. #============================================================================== class Scene_Debug < SDK::Scene_Base #-------------------------------------------------------------------------- # * Frame Update (when left window is active) #-------------------------------------------------------------------------- def update_left # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to map screen new_scene(Scene_Map) return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Display help if @left_window.mode == 0 text1 = "C (Enter) : ON / OFF" @help_window.contents.draw_text(4, 0, 406, 32, text1) else text1 = "Left : -1 Right : +1" text2 = "L (Pageup) : -10" text3 = "R (Pagedown) : +10" @help_window.contents.draw_text(4, 0, 406, 32, text1) @help_window.contents.draw_text(4, 32, 406, 32, text2) @help_window.contents.draw_text(4, 64, 406, 32, text3) end # Activate right window @left_window.active = false @right_window.active = true @right_window.index = 0 return end end end #============================================================================== # ** Ends Enable Part III Check #============================================================================== end