主题
概述
hna-clearot 用于清理目标身上的周期效果(DOT/HOT)。
基本语法
yaml
- hna-clearot{参数} @目标选择器参数列表
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
key | 字符串 | - | 按 key 清理(支持 * 前缀匹配) |
tag | 字符串 | - | 按标签清理(如 dot/hot) |
source | 字符串 | all | 来源过滤(caster/trigger/all) |
all | 布尔 | false | 是否清理所有匹配实例 |
基本示例
yaml
# 清理目标的"burn-dot"
- hna-clearot{key="burn-dot"} @target
# 清理目标的所有 DOT
- hna-clearot{tag="dot"} @target
# 清理施法者施加的所有周期效果
- hna-clearot{source=caster} @target
# 清理目标的所有周期效果
- hna-clearot{all=true} @target按 key 清理
yaml
# 清理指定 key
- hna-clearot{key="burn-dot"} @target
# 前缀匹配(清理所有以"fire-"开头的)
- hna-clearot{key="fire-*"} @target按标签清理
yaml
# 清理所有 DOT
- hna-clearot{tag="dot"} @target
# 清理所有 HOT
- hna-clearot{tag="hot"} @target按来源清理
yaml
# 清理施法者施加的周期效果
- hna-clearot{source=caster;key="burn-dot"} @target
# 清理触发者施加的周期效果
- hna-clearot{source=trigger} @target
# 清理所有来源的周期效果(默认)
- hna-clearot{source=all} @target实际应用场景
场景 1:净化技能
yaml
Cleanse:
Skills:
# 清理目标的所有 DOT
- hna-clearot{tag="dot"} @target
- effect:particles{p=VILLAGER_HAPPY;a=20} @target
- message{m="&a所有持续伤害已清除!"} @target场景 2:驱散自己的 DOT
yaml
SelfCleanse:
Skills:
# 清理自己身上的所有 DOT
- hna-clearot{tag="dot"} @Self
- message{m="&a你清除了身上的持续伤害!"} @Self场景 3:清理特定 DOT
yaml
RemoveBurn:
Skills:
# 只清理灼烧效果
- hna-clearot{key="burn-dot"} @target
- message{m="&a灼烧效果已清除!"} @target场景 4:清理施法者的效果
yaml
RecallEffects:
Skills:
# 清理施法者施加的所有周期效果
- hna-clearot{source=caster;all=true} @PlayersInRadius{r=20}
- message{m="&e你的周期效果已被召回!"} @Self场景 5:Boss 重置
yaml
BossReset:
Skills:
# 清理所有玩家身上的周期效果
- hna-clearot{all=true} @PlayersInRadius{r=50}
- message{m="&cBoss 清除了所有周期效果!"} @PlayersInRadius{r=50}完整技能示例
yaml
PurifySkill:
Cooldown: 20
Skills:
# 检查目标是否有 DOT
- hna-hasot{tag="dot"} true
# 清理所有 DOT
- hna-clearot{tag="dot"} @target
# 特效
- effect:particles{p=HEART;a=20} @target
- sound{s=entity.player.levelup} @target
- message{m="&a净化完成!所有持续伤害已清除。"} @target
# 给予短暂的免疫 Buff
- hna-buff{key="净化免疫";time=60;level=1} @target与专用清理的区别
| Mechanic | 清理范围 |
|---|---|
hna-clearot | DOT 和 HOT(通用) |
hna-cleardot | 仅 DOT |
hna-clearhot | 仅 HOT |
注意事项
- 不指定
key或tag时,需要设置all=true key支持*前缀匹配source=caster只清理施法者施加的效果- 清理后不会有任何提示,建议配合 message 使用
- 需要明确的目标选择器
调试方法
text
/hnattr periodic list
/hnattr periodic inspect <key>
/hnattr periodic debug detail <key>