# ▼▲▼ No90. シンボルエンカウント・サポート ▼▲▼ # # update 2009/ 2/21 # #============================================================================== # --- エンカウントシンボル化 --- #============================================================================== module XEventSymbolize def symbolinitialize # 判別 if not @symbolinitialized and @event.pages[0].list[0].code == 301 troop_id = @event.pages[0].list[0].parameters[0] move_route1 = RPG::MoveRoute.new move_route1.list = [RPG::MoveCommand.new(42, [0]), RPG::MoveCommand.new] move_route2 = RPG::MoveRoute.new move_route2.list = [RPG::MoveCommand.new(42, [255]), RPG::MoveCommand.new] # 専用リストの生成 list = [] list.push(RPG::EventCommand.new(221, 0, [])) list.push(RPG::EventCommand.new(209, 0, [0, move_route1])) list.push(RPG::EventCommand.new(301, 0, [troop_id, true, false])) list.push(RPG::EventCommand.new(601, 0, [])) list.push(RPG::EventCommand.new(209, 1, [0, move_route2])) list.push(RPG::EventCommand.new(116, 1, [])) list.push(RPG::EventCommand.new( 0, 1, [])) list.push(RPG::EventCommand.new(602, 0, [])) list.push(RPG::EventCommand.new(209, 1, [0, move_route2])) list.push(RPG::EventCommand.new(355, 1, ["$game_map.events[@event_id].blinkstop!"])) list.push(RPG::EventCommand.new( 0, 1, [])) list.push(RPG::EventCommand.new(604, 0, [])) list.push(RPG::EventCommand.new( 0, 0, [])) # エンカウントシンボル化! @event.pages[0].list = list end @symbolinitialized = true end end class Game_Event < Game_Character include XEventSymbolize alias no90_refresh refresh def refresh symbolinitialize no90_refresh end end #============================================================================== # --- イベント点滅停止 --- #============================================================================== module XEventBlinkStop def blinkstop! @blinkstop_duration = 120 end def initialize super @symbolinitialized = false @blinkstop_duration = 0 end def update return (@blinkstop_duration -= 1) if @blinkstop_duration > 0 super end def through return (@blinkstop_duration > 0 or super) end def opacity return (@blinkstop_duration / 2 % 3 + 1) * super / 4 if @blinkstop_duration > 0 return super end end class Game_Event < Game_Character include XEventBlinkStop end