Project1

标题: 新人关于属性问题 [打印本页]

作者: b209009    时间: 2011-11-2 19:07
标题: 新人关于属性问题
怎么那力量和攻击力关联上,RMXP人物一开始力量67,但攻击力为0,这样不带武器就杀不了怪。比如力量和攻击力的比例1比2。人物力量67,攻击力就134.
不知道能不能理解,再解释下,就是力量加多少攻击力也能加上多少。dsu_plus_rewardpost_czw
作者: zjd540921697    时间: 2011-11-2 21:17
希望对你有帮助 这是空手攻击脚本插在main钱
#=========================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#=========================================================================


# 空手的攻击防御力           by Claimh
#------------------------------------------------------------------
# http://www.k3.dion.ne.jp/~claimh/
#========================================================================

module Arm_Element
  ARM_ATK = []
  ARM_PDEF = []
  ARM_MDEF = []
  ARM_ELEMENT = []
  ARM_ELE_PLUS = []
  ARM_ELE_MINUS = []
  ARM_ANIMATION1 = []
  ARM_ANIMATION2 = []
  #===================================================================
  # 自定义开始
  #====================================================================
  # 空手时1号角色攻击力与力量值的百分比关系(60%)
  ARM_ATK[1] = 0.6
  # 空手时2号角色攻击力与力量值的百分比关系(70%),以下类推,不一一举例。
  ARM_ATK[1] = 0.7
  
  # 空手时1号角色防御力与灵巧值的百分比关系(60%)
  ARM_PDEF[1] = 0.6
  
  # 空手时1号角色魔法防御力与速度值的百分比关系(60%)
  ARM_MDEF[1] = 0.6
  
  # 空手时攻击方动画编号
  ARM_ANIMATION1[1] = 1
  
  # 空手时挨打方动画编号
  ARM_ANIMATION2[1] = 4
  
  #————以下几个慎用,是空手时的属性增减,不推荐修改
  
  ARM_ELEMENT[1] = [1]
  ARM_ELE_PLUS[1] = []
  ARM_ELE_MINUS[1] = []
end

class Game_Actor < Game_Battler
  include Arm_Element
  #--------------------------------------------------------------------
  #------------------------------------------------------------------
  alias base_atk_arm base_atk
  def base_atk
    if @weapon_id == 0 and ARM_ATK[@actor_id] != nil
      return $data_actors[@actor_id].parameters[2, @level] * ARM_ATK[@actor_id]
    end
    return base_atk_arm
  end

  #--------------------------------------------------------------------
  #-------------------------------------------------------------------
  alias base_pdef_arm base_pdef
  def base_pdef
    if @weapon_id == 0 and ARM_PDEF[@actor_id] != nil
      return base_pdef_arm + $data_actors[@actor_id].parameters[3, @level] * ARM_PDEF[@actor_id]
    end
    return base_pdef_arm
  end
  
  #--------------------------------------------------------------------
  #--------------------------------------------------------------------
  alias base_mdef_arm base_mdef
  def base_mdef
    if @weapon_id == 0 and ARM_MDEF[@actor_id] != nil
      return base_mdef_arm + $data_actors[@actor_id].parameters[4, @level] * ARM_MDEF[@actor_id]
    end
    return base_mdef_arm
  end

  #------------------------------------------------------------------
  #--------------------------------------------------------------
  alias element_set_arm element_set
  def element_set
    if @weapon_id == 0 and ARM_ELEMENT[@actor_id] != []
      return ARM_ELEMENT[@actor_id]
    end
    return element_set_arm
  end

  #-----------------------------------------------------------------
  #-------------------------------------------------------------------
  alias plus_state_set_arm plus_state_set
  def plus_state_set
    if @weapon_id == 0 and ARM_ELE_PLUS[@actor_id] != []
      return ARM_ELE_PLUS[@actor_id]
    end
    return plus_state_set_arm
  end
  
  #-------------------------------------------------------------------
  #------------------------------------------------------------------
  alias minus_state_set_arm minus_state_set
  def minus_state_set
    if @weapon_id == 0 and ARM_ELE_MINUS[@actor_id] != []
      return ARM_ELE_MINUS[@actor_id]
    end
    return minus_state_set_arm
  end

  #------------------------------------------------------------------
  #-----------------------------------------------------------------
  alias animation1_id_arm animation1_id
  def animation1_id
    if @weapon_id == 0 and ARM_ANIMATION1[@actor_id] != nil
      return ARM_ANIMATION1[@actor_id]
    end
    return animation1_id_arm
  end
  
  #---------------------------------------------------------------------
  #------------------------------------------------------------------
  alias animation2_id_arm animation2_id
  def animation2_id
    if @weapon_id == 0 and ARM_ANIMATION2[@actor_id] != nil
      return ARM_ANIMATION2[@actor_id]
    end
    return animation2_id_arm
  end
end



#=====================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#====================================================================



作者: 钢铁列兵    时间: 2011-11-2 21:19
本帖最后由 钢铁列兵 于 2011-11-2 21:21 编辑

你说的那个在Game_Battler 3中修改。
找到下面这句atk = [attacker.atk - self.pdef / 2, 0].max,按标识修改就可以了
话说默认的战斗已经设置力量的考量了的




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1