- =begin
 
 
-       RGSS3
 
 
-   
-       ★対象不可エネミー★
 
 
-   
-       存在しているのにターゲットの対象にできない敵を作れるようになります。
 
 
-   
-       ● 仕様 ●==========================================================
 
 
-       選択可能な対象がいなくなると自動的にすべての対象制限を解除します。
 
 
-       --------------------------------------------------------------------
 
 
-       指定した敵は、エネミーターゲットウィンドウには表示されません。
 
 
-       ====================================================================
 
 
-   
-       ● イベントコマンドスクリプト ●====================================
 
 
-       selectable_enemys(index)
 
 
-       上記のスクリプトをイベントコマンドから実行すると、
 
 
-       指定の対象不可エネミーの対象制限を解除することができます。
 
 
-       --------------------------------------------------------------------
 
 
-       indexには1~8のエネミーインデックスを指定してください。
 
 
-       --------------------------------------------------------------------
 
 
-       引数は省略可能で、省略した場合は全てのエネミーの対象制限を解除します。
 
 
-       ====================================================================
 
 
-   
-       ● 指定方法 ●======================================================
 
 
-       データベースの敵キャラのメモ欄に「対象不可」と記述してください。
 
 
-       「」は不要です。
 
 
-       ====================================================================
 
 
-   
-       ver1.00
 
 
-   
-       Last Update : 2012/01/19
 
 
-       01/19 : RGSS2からの移植
 
 
-   
-       ろかん   [url]http://kaisou-ryouiki.sakura.ne.jp/[/url]
 
 
- =end
 
 
-   
- $rsi ||= {}
 
 
- $rsi["対象不可エネミー"] = true
 
 
-   
- class RPG::Enemy < RPG::BaseItem
 
 
-   def unselectable?
 
 
-     self.note.include?("対象不可")
 
 
-   end
 
 
- end
 
 
-   
- class Game_Enemy < Game_Battler
 
 
-   #--------------------------------------------------------------------------
 
 
-   # ● 選択不可エネミー判定
 
 
-   #--------------------------------------------------------------------------
 
 
-   def unselectable?
 
 
-     enemy.unselectable?
 
 
-   end
 
 
- end
 
 
-   
- class Game_Troop < Game_Unit
 
 
-   #--------------------------------------------------------------------------
 
 
-   # ● 公開インスタンス変数
 
 
-   #--------------------------------------------------------------------------
 
 
-   attr_accessor :unselectable_enemys   # 選択不可指定エネミー判定
 
 
-   #--------------------------------------------------------------------------
 
 
-   # ● セットアップ
 
 
-   #--------------------------------------------------------------------------
 
 
-   alias unselectable_enemy_setup setup
 
 
-   def setup(troop_id)
 
 
-     unselectable_enemy_setup(troop_id)
 
 
-     @unselectable_enemys = []
 
 
-     members.each{|enemy| @unselectable_enemys << enemy.unselectable?}
 
 
-   end
 
 
-   #--------------------------------------------------------------------------
 
 
-   # ● 指定インデックスをターゲットにできるか
 
 
-   #--------------------------------------------------------------------------
 
 
-   def target_selectable?(index)
 
 
-     !@unselectable_enemys[index]
 
 
-   end
 
 
-   #--------------------------------------------------------------------------
 
 
-   # ● 選択不可エネミーを選択可能にする
 
 
-   #--------------------------------------------------------------------------
 
 
-   def selectable_enemy(index = -1)
 
 
-     if index == -1
 
 
-       @unselectable_enemys.map!{false}
 
 
-     else
 
 
-       @unselectable_enemys[index] = false
 
 
-     end
 
 
-   end
 
 
-   #--------------------------------------------------------------------------
 
 
-   # ● 生存しているメンバーの配列取得
 
 
-   #--------------------------------------------------------------------------
 
 
-   def alive_members
 
 
-     if @unselectable_enemys.any?
 
 
-       result = members.select{|member| member.alive? && !member.unselectable?}
 
 
-       if result.size.zero?
 
 
-         selectable_enemy
 
 
-         super
 
 
-       else
 
 
-         result
 
 
-       end
 
 
-     else
 
 
-       super
 
 
-     end
 
 
-   end
 
 
- end
 
 
-   
- class Game_Interpreter
 
 
-   #--------------------------------------------------------------------------
 
 
-   # ● 選択不可エネミーを選択可能にする
 
 
-   #--------------------------------------------------------------------------
 
 
-   def selectable_enemy(index = -1)
 
 
-     $game_troop.selectable_enemy(index)
 
 
-   end
 
 
- end