#-------------------------------------------------------------------------- # 伤害计算 #-------------------------------------------------------------------------- def make_damage_value(user, item) value = item.damage.eval(user, self, $game_variables) value *= item_element_rate(user, item) value *= pdr if item.physical? value *= mdr if item.magical? value *= rec if item.damage.recover? value = apply_critical(value, user) if @result.critical value = apply_variance(value, item.damage.variance) value = apply_guard(value) # HPMP吸收 value = self.hp;user.mp+=self.mp;self.mp-=self.mp if item.id = 66 and item.is_a?(RPG::Skill) @result.make_damage(value.to_i, item) end
#--------------------------------------------------------------------------
# 伤害计算
#--------------------------------------------------------------------------
def make_damage_value(user, item)
value = item.damage.eval(user, self, $game_variables)
value *= item_element_rate(user, item)
value *= pdr if item.physical?
value *= mdr if item.magical?
value *= rec if item.damage.recover?
value = apply_critical(value, user) if @result.critical
value = apply_variance(value, item.damage.variance)
value = apply_guard(value)
# HPMP吸收
value = self.hp;user.mp+=self.mp;self.mp-=self.mp if item.id = 66 and item.is_a?(RPG::Skill)
@result.make_damage(value.to_i, item)
end
这样做有什么意思呢.. |