#============================================================================== # ■ RGSS3 イベントステート付与/解除不具合修正 Ver1.02 by 星潟 #------------------------------------------------------------------------------ # イベントコマンドでステートを一度解除してから # ステート付与を行うと、ステート付与が無効化される不具合を修正します。 # VXAce_SP1で修正されたように見えますが、あの修正では不完全です。 #============================================================================== # [×]VXAce_SP1なし # 不具合発生の手順を踏む事で無条件に不具合発生。 #------------------------------------------------------------------------------ # [△]VXAce_SP1あり # 不具合発生の手順を踏む事で # 味方パーティメンバーのみ不具合の影響を受けない # パーティにいないアクター、戦闘中であれば、戦闘メンバー以外のアクターや # 敵側は不具合の影響をしっかり受けてしまう。 #------------------------------------------------------------------------------ # [○]本スクリプト導入 # 不具合発生の手順を踏んでも異常は起きない。 #============================================================================== module EventStateAddRemove #付与・解除前にもアクションリザルトを消去するか? #(特定スクリプト導入時不具合発生の恐れがある為、場合によってはfalseに) P = true end class Game_Temp attr_accessor :event_state_changing end class Game_Interpreter #-------------------------------------------------------------------------- # ステートの変更 #-------------------------------------------------------------------------- alias command_313_event_state_changing command_313 def command_313 $game_temp.event_state_changing = true command_313_event_state_changing $game_temp.event_state_changing = nil end #-------------------------------------------------------------------------- # 敵キャラのステート変更 #-------------------------------------------------------------------------- alias command_333_event_state_changing command_333 def command_333 $game_temp.event_state_changing = true command_333_event_state_changing $game_temp.event_state_changing = nil end end class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # ステートの付加 #-------------------------------------------------------------------------- alias add_state_event_state_changing add_state def add_state(state_id) @result.clear_status_effects if $game_temp.event_state_changing && EventStateAddRemove::P add_state_event_state_changing(state_id) @result.clear_status_effects if $game_temp.event_state_changing end #-------------------------------------------------------------------------- # ステートの解除 #-------------------------------------------------------------------------- alias remove_state_event_state_changing remove_state def remove_state(state_id) @result.clear_status_effects if $game_temp.event_state_changing && EventStateAddRemove::P remove_state_event_state_changing(state_id) @result.clear_status_effects if $game_temp.event_state_changing end end