aohs吧 关注:19贴子:1,713

论如何玩坏战斗计算式

只看楼主收藏回复

最新研究表明脚本中的值和函数最全
脚本Game_BattlerBase 57~84行:
def mhp; param(0); end # 最大HP Maximum Hit Point
def mmp; param(1); end # 最大MP Maximum Magic Point
def atk; param(2); end # 物理攻击 ATtacK power
def def; param(3); end # 物理防御 DEFense power
def mat; param(4); end # 魔法攻击 Magic ATtack power
def mdf; param(5); end # 魔法防御 Magic DeFense power
def agi; param(6); end # 敏 捷 值 AGIlity
def luk; param(7); end # 幸 运 值 LUcK
def hit; xparam(0); end # 成功几率 HIT rate
def eva; xparam(1); end # 闪避几率 EVAsion rate
def cri; xparam(2); end # 必杀几率 CRItical rate
def cev; xparam(3); end # 闪避必杀几率 Critical EVasion rate
def mev; xparam(4); end # 闪避魔法几率 Magic EVasion rate
def mrf; xparam(5); end # 反射魔法几率 Magic ReFlection rate
def cnt; xparam(6); end # 反击几率 CouNTer attack rate
def hrg; xparam(7); end # HP再生速度 Hp ReGeneration rate
def mrg; xparam(8); end # MP再生速度 Mp ReGeneration rate
def trg; xparam(9); end # TP再生速度 Tp ReGeneration rate
def tgr; sparam(0); end # 受到攻击的几率 TarGet Rate
def grd; sparam(1); end # 防御效果比率 GuaRD effect rate
def rec; sparam(2); end # 恢复效果比率 RECovery effect rate
def pha; sparam(3); end # 药理知识 PHArmacology
def mcr; sparam(4); end # MP消费率 Mp Cost Rate
def tcr; sparam(5); end # TP消耗率 Tp Charge Rate
def pdr; sparam(6); end # 物理伤害加成 Physical Damage Rate
def mdr; sparam(7); end # 魔法伤害加成 Magical Damage Rate
def fdr; sparam(8); end # 地形伤害加成 Floor Damage Rate
def exr; sparam(9); end # 经验获得加成 EXperience Rate
无视param(),其它部分证明像闪避率a.eva回复率a.hrg也能带入计算式


IP属地:北京1楼2014-05-29 23:17回复
    124~129:
    #--------------------------------------------------------------------------
    # ● 检査是否含有某状态
    #--------------------------------------------------------------------------
    def state?(state_id)
    @states.include?(state_id)
    end
    可以使用 a.state?(x) ? 1 : 2


    IP属地:北京2楼2014-05-29 23:17
    回复
      广告
      立即查看
      130~135:
      #--------------------------------------------------------------------------
      # ● 检査是否含有无法战斗状态
      #--------------------------------------------------------------------------
      def death_state?
      state?(death_state_id)
      end
      可以使用 a.death_state? ? 1 : 2


      IP属地:北京3楼2014-05-29 23:17
      回复
        308~313:
        #--------------------------------------------------------------------------
        # ● 判定状态是否免疫
        #--------------------------------------------------------------------------
        def state_resist?(state_id)
        state_resist_set.include?(state_id)
        end
        可以使用 a.state_resist?(x) ? 1 : 2


        IP属地:北京4楼2014-05-29 23:18
        回复
          350~355:
          #--------------------------------------------------------------------------
          # ● 判定技能类型是否被禁用
          #--------------------------------------------------------------------------
          def skill_type_sealed?(stype_id)
          features_set(FEATURE_STYPE_SEAL).include?(stype_id)
          end
          可以使用 a.skill_type_sealed?(x) ? 1 : 2


          IP属地:北京5楼2014-05-29 23:18
          回复
            362~391:
            #--------------------------------------------------------------------------
            # ● 判定技能是否被禁用
            #--------------------------------------------------------------------------
            def skill_sealed?(skill_id)
            features_set(FEATURE_SKILL_SEAL).include?(skill_id)
            end
            #--------------------------------------------------------------------------
            # ● 判定武器是否可以装备
            #--------------------------------------------------------------------------
            def equip_wtype_ok?(wtype_id)
            features_set(FEATURE_EQUIP_WTYPE).include?(wtype_id)
            end
            #--------------------------------------------------------------------------
            # ● 判定护甲是否可以装备
            #--------------------------------------------------------------------------
            def equip_atype_ok?(atype_id)
            features_set(FEATURE_EQUIP_ATYPE).include?(atype_id)
            end
            #--------------------------------------------------------------------------
            # ● 判定是否固定武器
            #--------------------------------------------------------------------------
            def equip_type_fixed?(etype_id)
            features_set(FEATURE_EQUIP_FIX).include?(etype_id)
            end
            #--------------------------------------------------------------------------
            # ● 判定装备是否被禁用
            #--------------------------------------------------------------------------
            def equip_type_sealed?(etype_id)
            features_set(FEATURE_EQUIP_SEAL).include?(etype_id)
            end
            可以使用 a.skill_sealed?(x) ? 1 : 2
            a.equip_wtype_ok?(x) ? 1 : 2
            a.equip_atype_ok?(x) ? 1 : 2
            a.equip_type_fixed?(x) ? 1 : 2
            a.equip_type_sealed?(x) ? 1 : 2


            IP属地:北京6楼2014-05-29 23:18
            回复
              398~403:
              #--------------------------------------------------------------------------
              # ● 判定是否双持武器
              #--------------------------------------------------------------------------
              def dual_wield?
              slot_type == 1
              end
              可以使用 a.dual_wield? ? 1 : 2


              IP属地:北京7楼2014-05-29 23:19
              回复
                428~451:
                #--------------------------------------------------------------------------
                # ● 判定是否自动战斗
                #--------------------------------------------------------------------------
                def auto_battle?
                special_flag(FLAG_ID_AUTO_BATTLE)
                end
                #--------------------------------------------------------------------------
                # ● 判定是否擅长防御
                #--------------------------------------------------------------------------
                def guard?
                special_flag(FLAG_ID_GUARD) && movable?
                end
                #--------------------------------------------------------------------------
                # ● 判定是否保护弱者
                #--------------------------------------------------------------------------
                def substitute?
                special_flag(FLAG_ID_SUBSTITUTE) && movable?
                end
                #--------------------------------------------------------------------------
                # ● 判定是否特技专注
                #--------------------------------------------------------------------------
                def preserve_tp?
                special_flag(FLAG_ID_PRESERVE_TP)
                end
                可以使用 a.auto_battle? ? 1 : 2
                a.guard? ? 1 : 2
                a.substitute? ? 1 : 2
                a.preserve_tp? ? 1 : 2


                IP属地:北京8楼2014-05-29 23:19
                回复
                  广告
                  立即查看
                  544~591:
                  #--------------------------------------------------------------------------
                  # ● 获取隐藏状态
                  #--------------------------------------------------------------------------
                  def hidden?
                  @hidden
                  end
                  #--------------------------------------------------------------------------
                  # ● 判定是否存在
                  #--------------------------------------------------------------------------
                  def exist?
                  !hidden?
                  end
                  #--------------------------------------------------------------------------
                  # ● 判定是否死亡
                  #--------------------------------------------------------------------------
                  def dead?
                  exist? && death_state?
                  end
                  #--------------------------------------------------------------------------
                  # ● 判定是否存活
                  #--------------------------------------------------------------------------
                  def alive?
                  exist? && !death_state?
                  end
                  #--------------------------------------------------------------------------
                  # ● 判定是否正常
                  #--------------------------------------------------------------------------
                  def normal?
                  exist? && restriction == 0
                  end
                  #--------------------------------------------------------------------------
                  # ● 判定是否可以输入指令
                  #--------------------------------------------------------------------------
                  def inputable?
                  normal? && !auto_battle?
                  end
                  #--------------------------------------------------------------------------
                  # ● 判定是否可以行动
                  #--------------------------------------------------------------------------
                  def movable?
                  exist? && restriction < 4
                  end
                  #--------------------------------------------------------------------------
                  # ● 判定是否处于混乱
                  #--------------------------------------------------------------------------
                  def confusion?
                  exist? && restriction >= 1 && restriction <= 3
                  end
                  可以使用 a.hidden? ? 1 : 2
                  a.exist? ? 1 : 2
                  a.dead? ? 1 : 2
                  a.alive? ? 1 : 2
                  a.normal? ? 1 : 2
                  a.inputable? ? 1 : 2
                  a.movable? ? 1 : 2
                  a.confusion? ? 1 : 2


                  IP属地:北京9楼2014-05-29 23:19
                  回复
                    598~609:
                    #--------------------------------------------------------------------------
                    # ● 判定是否队友
                    #--------------------------------------------------------------------------
                    def actor?
                    return false
                    end
                    #--------------------------------------------------------------------------
                    # ● 判定是否敌人
                    #--------------------------------------------------------------------------
                    def enemy?
                    return false
                    end
                    可以使用 a.actor? ? 1 : 2
                    a.enemy? ? 1 : 2


                    IP属地:北京10楼2014-05-29 23:20
                    回复
                      718~729:
                      #--------------------------------------------------------------------------
                      # ● 判定是否能使用普通攻击
                      #--------------------------------------------------------------------------
                      def attack_usable?
                      usable?($data_skills[attack_skill_id])
                      end
                      #--------------------------------------------------------------------------
                      # ● 判定是否能进行防御
                      #--------------------------------------------------------------------------
                      def guard_usable?
                      usable?($data_skills[guard_skill_id])
                      end
                      可以使用 a.attack_usable? ? 1 : 2
                      a.guard_usable? ? 1 : 2


                      IP属地:北京11楼2014-05-29 23:20
                      回复
                        以上大概是能用的所有判断和值了……继续开脑洞吧


                        IP属地:北京12楼2014-05-29 23:20
                        回复
                          @大creeper @BT天谴狂 @天边一道极光@AoS制作组 @大型设备二号 @AFK_hhhentai @zhaoruochong @班师回朝 @o21w @1145916328


                          IP属地:北京13楼2014-05-29 23:22
                          回复
                            IP属地:北京14楼2014-05-29 23:22
                            回复
                              广告
                              立即查看
                              目前只找到再生速度的用法


                              IP属地:北京来自手机贴吧15楼2014-05-29 23:26
                              回复