protosssonny 发表于 2012-9-24 20:23
P叔,还有问题请教你,我想制作多个持续掉血的技能,但是这些状态有冲突,就是掉血的时候只会掉一个状态的血量,不能叠加,怎样才能使这些掉血叠加呢?
#-------------------------------------------------------------------------- # ● HP 自动恢复 #-------------------------------------------------------------------------- def regenerate_hp # 撕裂 if self.state?(34) damage = 100 + rand(10) elsif self.state?(35) damage = 100 + rand(10) elsif self.state?(36) damage = 100 + rand(10) # 毒箭 elsif self.state?(135) damage = 100 + rand(10) elsif self.state?(136) damage = 100 + rand(10) elsif self.state?(137) damage = 100 + rand(10) # 感染 elsif self.state?(166) damage = 100 + rand(10) elsif self.state?(167) damage = 100 + rand(10) elsif self.state?(168) damage = 100 + rand(10) # 灼烧 elsif self.state?(200) damage = 100 + rand(10) elsif self.state?(201) damage = 100 + rand(10) elsif self.state?(202) damage = 100 + rand(10) # 凋零 elsif self.state?(257) damage = 100 + rand(50) elsif self.state?(258) damage = 250 + rand(50) elsif self.state?(259) damage = 500 + rand(100) # 缠绕 elsif self.state?(260) damage = 100 + rand(10) elsif self.state?(261) damage = 100 + rand(10) elsif self.state?(262) damage = 100 + rand(10) # 燃烧 elsif self.state?(272) damage = 100 + rand(10) elsif self.state?(273) damage = 100 + rand(10) elsif self.state?(274) damage = 100 + rand(10) else damage = -(mhp * hrg).to_i end perform_map_damage_effect if $game_party.in_battle && damage > 0 @result.hp_damage = [damage, max_slip_damage].min self.hp -= @result.hp_damage end
#--------------------------------------------------------------------------
# ● HP 自动恢复
#--------------------------------------------------------------------------
def regenerate_hp
# 撕裂
if self.state?(34)
damage = 100 + rand(10)
elsif self.state?(35)
damage = 100 + rand(10)
elsif self.state?(36)
damage = 100 + rand(10)
# 毒箭
elsif self.state?(135)
damage = 100 + rand(10)
elsif self.state?(136)
damage = 100 + rand(10)
elsif self.state?(137)
damage = 100 + rand(10)
# 感染
elsif self.state?(166)
damage = 100 + rand(10)
elsif self.state?(167)
damage = 100 + rand(10)
elsif self.state?(168)
damage = 100 + rand(10)
# 灼烧
elsif self.state?(200)
damage = 100 + rand(10)
elsif self.state?(201)
damage = 100 + rand(10)
elsif self.state?(202)
damage = 100 + rand(10)
# 凋零
elsif self.state?(257)
damage = 100 + rand(50)
elsif self.state?(258)
damage = 250 + rand(50)
elsif self.state?(259)
damage = 500 + rand(100)
# 缠绕
elsif self.state?(260)
damage = 100 + rand(10)
elsif self.state?(261)
damage = 100 + rand(10)
elsif self.state?(262)
damage = 100 + rand(10)
# 燃烧
elsif self.state?(272)
damage = 100 + rand(10)
elsif self.state?(273)
damage = 100 + rand(10)
elsif self.state?(274)
damage = 100 + rand(10)
else
damage = -(mhp * hrg).to_i
end
perform_map_damage_effect if $game_party.in_battle && damage > 0
@result.hp_damage = [damage, max_slip_damage].min
self.hp -= @result.hp_damage
end
|