#============================================================================== # □ 戦闘不能付与設定 (for VX Ace) #------------------------------------------------------------------------------ # Version : 1_20120523 # by サリサ・タイクーン # http://www.tycoon812.com/rgss/ #============================================================================== #============================================================================== # □ 素材スイッチ #============================================================================== $rgsslab = {} if $rgsslab == nil $rgsslab["戦闘不能付与設定"] = true if $rgsslab["戦闘不能付与設定"] #============================================================================== # □ カスタマイズポイント #============================================================================== module RGSSLAB end module RGSSLAB::Battle_Impossible_Give_Setting #-------------------------------------------------------------------------- # ○ 戦闘不能付与設定の文字列 # ステートのメモ欄に、[ + NOTE + ]と書くと # そのステートが付与された際に # 生存していないと判定されるようになります。 # (戦闘不能になる訳ではありません) #-------------------------------------------------------------------------- NOTE = "戦闘不能判定" end # カスタマイズポイントは、ここまで #============================================================================== # □ RGSSLAB::Battle_Impossible_Give_Setting [module] #============================================================================== module RGSSLAB::Battle_Impossible_Give_Setting #-------------------------------------------------------------------------- # ○ 素材設定用の定数定義 #-------------------------------------------------------------------------- MATERIAL_NAME = "戦闘不能付与設定" VERSION = 1 RELEASE = 20120523 end #============================================================================== # ■ Game_BattlerBase [class] #============================================================================== class Game_BattlerBase #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_146 = RGSSLAB::Battle_Impossible_Give_Setting #-------------------------------------------------------------------------- # ○ 戦闘不能付与設定判定 #-------------------------------------------------------------------------- def impossible? result = false states.each do | state | result = true if state.note[/\[#{RGSSLAB_146::NOTE}\]/] end return result end end #============================================================================== # ■ Game_Unit [class] #============================================================================== class Game_Unit #-------------------------------------------------------------------------- # ● 全滅判定 [再構築] #-------------------------------------------------------------------------- def all_dead? alive_members.empty? || checking end #-------------------------------------------------------------------------- # ○ 全滅判定のチェック:戦闘不能付与設定の判定用 #-------------------------------------------------------------------------- def checking result = [] members.each do |member| if member.dead? ; result.push(true) elsif member.impossible? ; result.push(true) else ; result.push(false) end end result.each do |judge| return false unless judge end return true end end end