本帖最后由 soulsaga 于 2019-7-15 01:17 编辑
#-------------------------------------------------------------------------- def share_damage target_actor = share_object result = !!target_actor && target_actor.can_take_damage? if result @recipient = true self.damage = self.damage / 2 target_actor.damage = self.damage @@平分伤害=self.damage if self.index < target_actor.index target_actor.hp -= self.damage if self.index > target_actor.index and @敌群攻 target_actor.damage+=@@平分伤害;self.damage+=@@平分伤害;@敌群攻=false end end return @hp - self.damage end
#--------------------------------------------------------------------------
def share_damage
target_actor = share_object
result = !!target_actor && target_actor.can_take_damage?
if result
@recipient = true
self.damage = self.damage / 2
target_actor.damage = self.damage
@@平分伤害=self.damage if self.index < target_actor.index
target_actor.hp -= self.damage
if self.index > target_actor.index and @敌群攻
target_actor.damage+=@@平分伤害;self.damage+=@@平分伤害;@敌群攻=false
end
end
return @hp - self.damage
end
更新脚本..测试正常.. |