Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module ED_Addon
- def self.set_beginner
- $data_enemies.compact.each do |enemy|
- enemy.maxhp *= 0.75
- enemy.maxmp *= 0.8
- enemy.atk *= 0.75
- enemy.def *= 0.75
- enemy.spi *= 0.8
- enemy.agi *= 0.75
- end
- $game_system.diff = 1
- end
- end
- class Game_System
- attr_writer :diff
- alias theo_ed_diff_select_init initialize
- def initialize
- theo_ed_diff_select_init
- @diff = 0
- end
- def diff
- @diff ||= 0
- end
- end
- class Scene_Difficulty < Scene_Base
- def start
- super
- s1 = "Beginner"
- s2 = "Normal"
- @diff_select = Window_Command.new(172, [s1, s2])
- @diff_select.x = (544 - @diff_select.width) / 2
- @diff_select.y = 288
- end
- def update
- super
- @diff_select.update
- if Input.trigger?(Input::C)
- case @diff_select.index
- when 0
- set_beginner
- when 1
- do_noting
- end
- end
- end
- def terminate
- super
- @diff_select.dispose
- end
- def set_beginner
- ED_Addon.set_beginner
- goto_map
- end
- def do_noting
- goto_map
- end
- def goto_map
- confirm_player_location
- Sound.play_decision
- $game_party.setup_starting_members # Initial party
- $game_map.setup($data_system.start_map_id) # Initial map position
- $game_player.moveto($data_system.start_x, $data_system.start_y)
- $game_player.refresh
- $game_player.set_direction(2)
- $scene = Scene_Map.new
- RPG::BGM.fade(1500)
- Graphics.fadeout(60)
- Graphics.wait(40)
- Graphics.frame_count = 0
- RPG::BGM.stop
- $game_map.autoplay
- end
- def confirm_player_location
- if $data_system.start_map_id == 0
- print "Player start location not set."
- exit
- end
- end
- end
- class Scene_Title < Scene_Base
- def command_new_game
- $scene = Scene_Difficulty.new
- end
- end
- class Scene_File < Scene_Base
- alias ed_diff_select_load do_load
- def do_load
- ed_diff_select_load
- ED_Addon.set_beginner if $game_system.diff == 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment