# # 特殊混乱ステート(RGSS2) #  (C)2008 TYPE74RX-T # #-------------------------------------------------------------------------- # ★ システムワードの登録:混乱 #-------------------------------------------------------------------------- module RPG class State alias rx_rgss2b14_rx_extract_sys_str_from_note rx_extract_sys_str_from_note def rx_extract_sys_str_from_note rx_get_sys = RX_T.get_system_word_in_note(@note, "特殊混乱") @@rx_copy_str += rx_get_sys @note = @note.sub(rx_get_sys, "") @note = @note.sub("\r\n", "") @rx_sys_str = @@rx_copy_str # メソッドを呼び戻す rx_rgss2b14_rx_extract_sys_str_from_note end end end #============================================================================== # ■ Game_Battler #------------------------------------------------------------------------------ #  バトラーを扱うクラスです。このクラスは Game_Actor クラスと Game_Enemy クラ # スのスーパークラスとして使用されます。 #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias rx_rgss2b14_initialize initialize def initialize # メソッドを呼び戻す rx_rgss2b14_initialize @rx_s_confusion = false # ★ 特殊混乱フラグ end #-------------------------------------------------------------------------- # ★ 特殊混乱フラグ #-------------------------------------------------------------------------- def rx_s_confusion return @rx_s_confusion end #-------------------------------------------------------------------------- # ★ 特殊混乱判定 #-------------------------------------------------------------------------- def rx_get_s_confusion @rx_s_confusion = false for state in states @rx_s_confusion = true if state.rx_sys_str.include?("特殊混乱") end return @rx_invincible end #-------------------------------------------------------------------------- # ● 制約の取得 # 現在付加されているステートから最大の restriction を取得する。 #-------------------------------------------------------------------------- alias rx_rgss2b14_restriction restriction def restriction # ★ 特殊混乱判定 rx_get_s_confusion # メソッドを呼び戻す rx_rgss2b14_restriction end end #============================================================================== # ■ Game_BattleAction #------------------------------------------------------------------------------ #  戦闘行動を扱うクラスです。このクラスは Game_Battler クラスの内部で使用され # ます。 #============================================================================== class Game_BattleAction #-------------------------------------------------------------------------- # ● 味方ユニットを取得 #-------------------------------------------------------------------------- alias rx_rgss2b14_friends_unit friends_unit def friends_unit if battler.rx_s_confusion if battler.actor? return $game_troop else return $game_party end end # メソッドを呼び戻す rx_rgss2b14_friends_unit end #-------------------------------------------------------------------------- # ● 敵ユニットを取得 #-------------------------------------------------------------------------- alias rx_rgss2b14_opponents_unit opponents_unit def opponents_unit if battler.rx_s_confusion if battler.actor? return $game_party else return $game_troop end end # メソッドを呼び戻す rx_rgss2b14_opponents_unit end #-------------------------------------------------------------------------- # ● 行動準備 #-------------------------------------------------------------------------- alias rx_rgss2b14_prepare prepare def prepare if battler.berserker? and battler.rx_s_confusion # ★ 特殊混乱型の混乱なら battler.make_action # ランダム行動設定 return end # メソッドを呼び戻す rx_rgss2b14_prepare end end