Advertisement
Double_X

YEA-BattleEngine No Selection

Jun 16th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.93 KB | None | 0 0
  1. #------------------------------------------------------------------------------|
  2. #  * Edit class: Scene_Battle                                                  |
  3. #------------------------------------------------------------------------------|
  4.  
  5. class Scene_Battle < Scene_Base
  6.  
  7.   #----------------------------------------------------------------------------|
  8.   #  Rewrite method: on_skill_ok                                               |
  9.   #----------------------------------------------------------------------------|
  10.   def on_skill_ok
  11.     @skill = @skill_window.item
  12.     $game_temp.battle_aid = @skill
  13.     BattleManager.actor.input.set_skill(@skill.id)
  14.     BattleManager.actor.last_skill.object = @skill
  15.     # Rewritten to stop showing target selection windows when they're not needed
  16.     if @skill.for_opponent?
  17.       @skill.need_selection? ? select_enemy_selection : on_enemy_ok
  18.     elsif @skill.for_friend?
  19.       @skill.need_selection? ? select_actor_selection : on_actor_ok
  20.     else
  21.       @skill_window.hide
  22.       next_command
  23.       $game_temp.battle_aid = nil
  24.     end
  25.     #
  26.   end # on_skill_ok
  27.  
  28.   #----------------------------------------------------------------------------|
  29.   #  Rewrite method: on_item_ok                                                |
  30.   #----------------------------------------------------------------------------|
  31.   def on_item_ok
  32.     @item = @item_window.item
  33.     $game_temp.battle_aid = @item
  34.     BattleManager.actor.input.set_item(@item.id)
  35.     # Rewritten to stop showing target selection windows when they're not needed
  36.     if @item.for_opponent?
  37.       @item.need_selection? ? select_enemy_selection : on_enemy_ok
  38.     elsif @item.for_friend?
  39.       @item.need_selection? ? select_actor_selection : on_actor_ok
  40.     else
  41.       @item_window.hide
  42.       next_command
  43.       $game_temp.battle_aid = nil
  44.     end
  45.     #
  46.     $game_party.last_item.object = @item
  47.   end # on_item_ok
  48.  
  49. end # Scene_Battle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement