当我使用skript编程的时候发现这样一个无法解决的问题,我新写了两个武器词条:决斗伤害(当玩家与怪物1v1时生效)和破围伤害(当玩家与怪物1v多时生效),但是不生效,求大神帮我解决一下,(下附我的问题代码)。另外顺带问一下,我还想写连击伤害(即持续攻击一个怪物获得伤害加成),多击伤害(即攻击一个怪物后攻击另一个获得伤害加成)和持续伤害(流血,中毒类同等效果),如何实现?
伤害代码
// 决斗伤害
loop entities in radius 3 around player:
loop-entity is not player
if entities <= 1:
set {_damage} to {_damage} * ( 1 + {_attackerduelDamage} / 100)
// 破围伤害
loop entities in radius 3 around player:
loop-entity is not player
if entities > 1:
set {_damage} to {_damage} * ( 1 + {_attackersimpleDamage} / 100)
进入战斗代码
function WildStat_isFighting(p: player) :: boolean:
return {WildStat_player_%{_p}%_fighting}
function WildStat_enterFight(p: player):
set {WildStat_player_%{_p}%_fighting} to true
sendTitle({_p},"","&c&l!",5,15,5)
伤害代码
// 决斗伤害
loop entities in radius 3 around player:
loop-entity is not player
if entities <= 1:
set {_damage} to {_damage} * ( 1 + {_attackerduelDamage} / 100)
// 破围伤害
loop entities in radius 3 around player:
loop-entity is not player
if entities > 1:
set {_damage} to {_damage} * ( 1 + {_attackersimpleDamage} / 100)
进入战斗代码
function WildStat_isFighting(p: player) :: boolean:
return {WildStat_player_%{_p}%_fighting}
function WildStat_enterFight(p: player):
set {WildStat_player_%{_p}%_fighting} to true
sendTitle({_p},"","&c&l!",5,15,5)