#============================================================================== # ☆ RGSS2(VX)専用 VXバグフィックス Ver 1.10 #------------------------------------------------------------------------------ # 河原 つつみ # 連絡先 :『アクマの脳髄』http://www.akunou.com/ #------------------------------------------------------------------------------ # VXデフォルトスクリプトのスプライト関係のバグや記述抜けを修正します。 # 修正のため、関数をほとんど再定義していますので少し注意。 # # ◆修正内容 # プレイヤー・イベント間のX座標とY座標の差が同値の際に # イベントコマンド等で『プレイヤーの方を向く』或いは『プレイヤーの逆を向く』を指定すると # コマンドが無視されてしまう仕様の修正。 # 敵を倒した後、イベントで敵全体にステートを付加すると # コラプスエフェクトが再表示されてしまうバグの修正。 # Scene_Skillのビューポートの解放のし忘れを修正。 # 逃走したはずの敵が、ステート解消と同時に可視になってしまうバグの修正。 #------------------------------------------------------------------------------ # ■更新履歴 # Ver 1.10 『プレイヤーの方を向く』/『プレイヤーの逆を向く』の仕様変更追加。 #============================================================================== #============================================================================== # ■ Game_Character #============================================================================== class Game_Character #-------------------------------------------------------------------------- # ◎ プレイヤーの方を向く #-------------------------------------------------------------------------- def turn_toward_player sx = distance_x_from_player sy = distance_y_from_player if sx.abs > sy.abs # 横の距離のほうが長い sx > 0 ? turn_left : turn_right else#if sx.abs < sy.abs # 縦の距離のほうが長い sy > 0 ? turn_up : turn_down end end #-------------------------------------------------------------------------- # ◎ プレイヤーの逆を向く #-------------------------------------------------------------------------- def turn_away_from_player sx = distance_x_from_player sy = distance_y_from_player if sx.abs > sy.abs # 横の距離のほうが長い sx > 0 ? turn_right : turn_left else#if sx.abs < sy.abs # 縦の距離のほうが長い sy > 0 ? turn_down : turn_up end end end #============================================================================== # ■ Game_Interpreter #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ◎ ステートの変更 #-------------------------------------------------------------------------- def command_313 iterate_actor_id(@params[0]) do |actor| if @params[1] == 0 live = (actor.hp > 0) actor.add_state(@params[2]) actor.perform_collapse if live else actor.remove_state(@params[2]) end end return true end #-------------------------------------------------------------------------- # ◎ 敵キャラのステート変更 #-------------------------------------------------------------------------- def command_333 iterate_enemy_index(@params[0]) do |enemy| if @params[2] == 1 # 戦闘不能の変更なら enemy.immortal = false # 不死身フラグをクリア end if @params[1] == 0 live = (enemy.hp > 0) enemy.add_state(@params[2]) enemy.perform_collapse if live else enemy.remove_state(@params[2]) end end return true end end #============================================================================== # ■ Scene_Skill #============================================================================== class Scene_Skill < Scene_Base #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- alias akunou3_terminate terminate def terminate akunou3_terminate @viewport.dispose end end #============================================================================== # ■ Scene_Battle #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ◎ 戦闘行動の処理 #-------------------------------------------------------------------------- def process_action return if judge_win_loss return if $game_temp.next_scene != nil set_next_active_battler if @active_battler == nil turn_end return end return if @active_battler.dead? if !@active_battler.hidden @message_window.clear wait(5) @active_battler.white_flash = true unless @active_battler.action.forcing @active_battler.action.prepare end if @active_battler.action.valid? execute_action end end unless @active_battler.action.forcing @message_window.clear if !@active_battler.hidden remove_states_auto display_current_state if !@active_battler.hidden end if !@active_battler.hidden @active_battler.white_flash = false @message_window.clear end end #-------------------------------------------------------------------------- # ◎ ステート自然解除 #-------------------------------------------------------------------------- def remove_states_auto last_st = @active_battler.states @active_battler.remove_states_auto if !@active_battler.hidden and @active_battler.states != last_st wait(5) display_state_changes(@active_battler) wait(30) @message_window.clear end end end