设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2315|回复: 4
打印 上一主题 下一主题

[已经过期] 有什么方法能让一些状态死亡时仍然保留么?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
106
在线时间
42 小时
注册时间
2019-1-14
帖子
13
1
发表于 2019-2-10 15:03:38 | 显示全部楼层
主站里找的:

    #使用方法:打开脚本编辑器,将脚本插入到main上。
    #在状态备注:<残留>
    #==============================================================================
    # ■ RGSS3 戦闘不能時残留ステート Ver1.01 by 星潟
    #------------------------------------------------------------------------------
    # 戦闘不能に陥った際、消去されないステートを作成します。
    # 用于那些全恢复时也不想要他消除的状态
    # 設定方法.
    # ステート欄に<残留>と記入する。
    #
    # Ver1.01
    # 全回復時・逃走の処理でも戦闘不能時残留ステートの効果が表れていた問題を修正。
    #==============================================================================
    module UnclearableState

      #ステートのメモ欄に記入する為の設定用ワード
      WORD = "<残留>"

    end
    #==============================================================================
    # ■ Game_BattlerBase
    #------------------------------------------------------------------------------
    #  バトラーを扱う基本のクラスです。主に能力値計算のメソッドを含んでいます。こ
    # のクラスは Game_Battler クラスのスーパークラスとして使用されます。
    #==============================================================================
    class Game_BattlerBase
      #--------------------------------------------------------------------------
      # ● オブジェクト初期化
      #--------------------------------------------------------------------------
      alias initialize_un_s initialize
      def initialize
        initialize_un_s
        clear_states2
      end
      #--------------------------------------------------------------------------
      # ● 全回復
      #--------------------------------------------------------------------------
#      alias recover_all_un_s recover_all
#      def recover_all
#       recover_all_un_s
#       clear_states2
#     end
      #--------------------------------------------------------------------------
      # ● ステート情報をクリア
      #--------------------------------------------------------------------------
      def clear_states
        @states = [] if @states == nil
        stc = 0
        stcl = []
        stcl_turns = {}
        stcl_steps = {}
        for state in @states
          if state != nil && $data_states[state].note.include?(UnclearableState::WORD)
            stcl.push(@states[stc])
            stcl_turns[state] = @state_turns[state]
            stcl_steps[state] = @state_steps[state]
          end
          stc += 1
        end
        @states = stcl
        @state_turns = stcl_turns
        @state_steps = stcl_steps
      end
      #--------------------------------------------------------------------------
      # ● ステート情報をクリア
      #--------------------------------------------------------------------------
      def clear_states2
        @states = []
        @state_turns = {}
        @state_steps = {}
      end
    end
    class Game_Battler < Game_BattlerBase
      #--------------------------------------------------------------------------
      # ● 逃げる
      #--------------------------------------------------------------------------
      alias escape_un_s escape
      def escape
        escape_un_s
        clear_states2
      end
    end
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-6 01:16

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表