加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 z2z4 于 2013-6-25 11:53 编辑
比如 默认的 方法名 def make_damage_value(user, item)
后面 def make_damage_value(user, item)
在后面 def make_damage_value(user, item) 当然这个是最终的
那如何利用 alias 别让 后面2个 互相 冲突
def apply_critical(damage, item) item.cri_damage ? damage * item.cri_damage.truncate : damage * 3 end
def apply_critical(damage, item)
item.cri_damage ? damage * item.cri_damage.truncate : damage * 3
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, item) if @result.critical value = apply_variance(value, item.damage.variance) value = apply_guard(value) @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, item) if @result.critical
value = apply_variance(value, item.damage.variance)
value = apply_guard(value)
@result.make_damage(value.to_i, item)
end
=======================================================
def make_damage_value(user, item) value = item.damage.eval(user, self, $game_variables) value = apply_reverse_heel(value, item) 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) if @result.critical value = apply_counter_gain(user, value, item) if user.actor_add_cheack[24] value = apply_variance(value, item.damage.variance) value = apply_guard(value) value = apply_defense_wall(value, item) value = apply_invalidate_wall(value, item) value = apply_metalbody(value, item) value = apply_goldconvert(value, item) value = apply_mpconvert(value, item) value = apply_stand(value, item) @result.make_damage(value.to_i, item) end
def make_damage_value(user, item)
value = item.damage.eval(user, self, $game_variables)
value = apply_reverse_heel(value, item)
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) if @result.critical
value = apply_counter_gain(user, value, item) if user.actor_add_cheack[24]
value = apply_variance(value, item.damage.variance)
value = apply_guard(value)
value = apply_defense_wall(value, item)
value = apply_invalidate_wall(value, item)
value = apply_metalbody(value, item)
value = apply_goldconvert(value, item)
value = apply_mpconvert(value, item)
value = apply_stand(value, item)
@result.make_damage(value.to_i, item)
end
|