# 技能ID
if skill.id == 57 && self.damage.is_a?(Numeric)
# 溅射伤害
origin_damage = self.damage * 100
origin_damage /= elements_correct(skill.element_set)
origin_damage = (origin_damage * 0.3).round
for enemy in $game_troop.enemies
if self != enemy
value = origin_damage * enemy.elements_correct(skill.element_set)
value /= 100
enemy.damage = value
enemy.hp -= value
end
end
end
for enemy in $game_troop.enemies
if enemy.damage.is_a?(Numeric)
if enemy.damage > 0
enemy.damage_pop = true
end
end
end
这个溅射就是给其他人循环上一个伤害,可以这样改,这样循环2次之后就会停止循环,可以改动k的数字来改变溅射的敌人
k = 0
for enemy in $game_troop.enemies
if enemy.damage.is_a?(Numeric)
if enemy.damage > 0
enemy.damage_pop = true
end
end
k+= 1
break if k==2
end