damage = damage * user_hp / user.maxhp if @nowhp_damage
# 現在MP威力
damage = damage * user_mp / user.maxmp if @nowmp_damage
#斩杀
damage = (self.maxhp - self.hp)*2 if @leahp_damage #这里添加了一句
# 放弃伤害属性的变换
@hp_damage = damage unless obj.damage_to_mp
@mp_damage = damage if obj.damage_to_mp
# 反应扩张
if @extension
self.hp -= @hp_damage
self.mp -= @mp_damage
end
# 初期化
@extension = false
@cost_damage = false
@nowhp_damage = false
@nowmp_damage = false
@leahp_damage = false
@ratio_maxdamage = nil
@ratio_nowdamage = nil
# @ratio_leadamage = nil
end
复制代码
● 确认扩张设定
#--------------------------------------------------------------------------
def check_extension(skill)
for ext in skill.extension
# 成本威力
if ext == "成本威力"
@extension = true
next @cost_damage = true
# 現在HP威力
elsif ext == "现HP威力"
@extension = true
next @nowhp_damage = true
# 現在MP威力
elsif ext == "现MP威力"
@extension = true
next @nowmp_damage = true
# 斩杀
elsif ext == "斩杀"
@extension = true
next @leahp_damage = true
def extension
case @id
when 86
return ["伤害动作禁止"]
when 89
return ["随机目标"]
when 94
return ["伤害动作禁止"]
when 96
return ["全域"]
when 98
return ["伤害动作禁止"]
when 99
return ["不显示HELP","行动前无闪光"]
when 100
return ["伤害动作禁止"]
when 101
return ["不显示HELP","行动前无闪光"]
when 102
return ["不显示HELP","行动前无闪光"]
when 103
return ["不显示HELP","行动前无闪光"]
when 207
return ["斩杀"]