#============================================================================== # ★ サイクルステート(XP用) #------------------------------------------------------------------------------ #< hatrack >http://hatrack.sakura.ne.jp/ < ver >110116a #============================================================================== #------------------------------------------------------------------------------ #□説明 # # コマンド選択中に右・左で自身のステート変更が可能になります。 # 下記の ▼設定箇所 に循環させたいステートIDを1つ以上設定してください。 # (設定例は3つになっていますが、いくつ設定しても構いません) # # あなたのステートアイデア次第で、いろんな使い方ができると思います。 # 是非、オリジナルのシステムを構築してみてください。 # # #□注意 # # 該当ステートのどの状態にもなっていない場合、 # 右キーでは左から2番目、左キーでは最後に設定したステートに変更されます。 # # なお仕様上、パーティがコマンド選択不能になるステートの設定は推奨されません。 # (戦闘不能・スタン・混乱など) # #------------------------------------------------------------------------------ class Scene_Battle alias hat0808231140 update_phase3_basic_command def update_phase3_basic_command # ▼設定箇所(ステートIDを最低2つ以上設定してください) # # 例)[3, 4, 5]と設定すると 毒[003]・幻惑[004]・沈黙[005] を循環します #   [5, 3]と設定すると 沈黙[005]・毒[003] を循環します # hat_cycle_states = [3, 4, 5] # △ここまで hat0808231140 # オリジナルをコール # 右キーは順に循環 if Input.trigger?(Input::RIGHT) for state_id in hat_cycle_states if @active_battler.state?(state_id) # ステート変更 @active_battler.remove_state(state_id) if state_id == hat_cycle_states.last @active_battler.add_state(hat_cycle_states[0]) else @active_battler.add_state(hat_cycle_states[hat_cycle_states.index(state_id)+1]) end break end if state_id == hat_cycle_states.last @active_battler.add_state(hat_cycle_states[1]) end end $game_system.se_play($data_system.equip_se) @status_window.refresh # 左キーは逆に循環 elsif Input.trigger?(Input::LEFT) for state_id in hat_cycle_states if @active_battler.state?(state_id) # ステート変更 @active_battler.remove_state(state_id) if state_id == hat_cycle_states[0] @active_battler.add_state(hat_cycle_states.last) else @active_battler.add_state(hat_cycle_states[hat_cycle_states.index(state_id)-1]) end break end if state_id == hat_cycle_states.last @active_battler.add_state(hat_cycle_states.last) end end $game_system.se_play($data_system.equip_se) @status_window.refresh end end end