#============================================================================== # ★ サイクルステート(VX用) #------------------------------------------------------------------------------ #< hatrack >http://hatrack.sakura.ne.jp/ < ver >110116a #============================================================================== #------------------------------------------------------------------------------ #□説明 # # コマンド選択中に右・左で自身のステート変更が可能になります。 # 下記の ▼設定箇所 に循環させたいステートIDを1つ以上設定してください。 # (設定例は3つになっていますが、いくつ設定しても構いません) # # あなたのステートアイデア次第で、いろんな使い方ができると思います。 # 是非、オリジナルのシステムを構築してみてください。 # # #□注意 # # 該当ステートのどの状態にもなっていない場合、 # 右キーでは左から2番目、左キーでは最後に設定したステートに変更されます。 # # なお仕様上、パーティがコマンド選択不能になるステートの設定は推奨されません。 # (戦闘不能・スタン・混乱など) # #------------------------------------------------------------------------------ class Scene_Battle < Scene_Base alias hat0808231140 update_actor_command_selection def update_actor_command_selection # ▼設定箇所(ステートIDを最低2つ以上設定してください) # # 例)[2, 3, 4]と設定すると 毒[002]・暗闇[003]・沈黙[004] を循環します #   [4, 2]と設定すると 沈黙[004]・毒[002] を循環します # hat_cycle_states = [2, 3, 4] # △ここまで 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 Sound.play_equip @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 Sound.play_equip @status_window.refresh end end end