主题
这一页不讲大而全的原理,专门放 拿来就能改的周期效果配方。
如果你已经读过:
那这页可以直接当模板库来用。
一、基础持续回血(direct)
适合:
- 玩家脱战回血
- 常驻恢复类机制
yml
cookbook-basic-regen:
enabled: true
selector: players
interval: 20
condition:
mode: expression
script: target_health < target_max_health && target_health_regen > 0
actions:
- type: heal
amount:
mode: expression
script: target_health_regen什么时候选它
- 你不需要实例追踪
- 你只想“到点执行一次回血”
二、基础持续掉血(direct)
适合:
- 环境灼烧
- 地图伤害区
yml
cookbook-basic-burn:
enabled: false
selector: players
interval: 20
condition:
mode: expression
script: target_health > 1
actions:
- type: damage
amount: 1三、最简单中毒 DOT(instance)
适合:
- 第一条真正可 inspect 的 DOT
yml
cookbook-poison:
enabled: false
mode: instance
selector: mobs
interval: 40
tags: [poison]
condition:
mode: expression
script: target_health > 3
instance:
source: nearest-player
interval: 20
duration: 100
reapply-mode: refresh
tick-condition:
mode: expression
script: target_health > 1
fail-policy: cancel
actions:
- type: damage
amount: 1.5推荐调试命令
text
/hnattr periodic inspect cookbook-poison
/hnattr periodic debug detail cookbook-poison四、持续治疗 HOT(instance)
适合:
- 治疗光环
- 恢复型技能
yml
cookbook-hot:
enabled: false
mode: instance
selector: players
interval: 40
tags: [hot, regen]
condition:
mode: expression
script: target_health < target_max_health
instance:
source: self
interval: 20
duration: 100
reapply-mode: refresh
tick-condition:
mode: expression
script: target_health < target_max_health
fail-policy: cancel
actions:
- type: heal
amount: 2五、叠层流血(stack)
适合:
- 连续命中越打越痛
- 有层数概念的 Debuff
yml
cookbook-bleed-stack:
enabled: false
mode: instance
selector: mobs
interval: 20
tags: [bleed, stack]
condition:
mode: expression
script: target_health > 5
instance:
source: nearest-player
interval: 20
duration: 80
reapply-mode: stack
max-stacks: 5
tick-condition:
mode: expression
script: target_health > 1
fail-policy: cancel
actions:
- type: damage
amount: 1什么时候选 stack
- 你想保留“层数”概念
- 重复命中应当明显叠层
六、合并型灼烧(merge)
适合:
- 重复施加后既想变痛,又想延长持续时间
yml
cookbook-burn-merge:
enabled: false
mode: instance
selector: mobs
interval: 20
tags: [burn, merge]
condition:
mode: expression
script: target_health > 5
instance:
source: nearest-player
interval: 10
duration: 60
reapply-mode: merge
max-stacks: 5
tick-condition:
mode: expression
script: target_health > 1
fail-policy: cancel
actions:
- type: damage
amount: 0.8什么时候选 merge
- 你想让重复命中“越来越重”
- 还想让实例次数一起叠加
七、条件失败只跳过,不取消(skip)
适合:
- 某些跳动可能临时不满足条件
- 但你不想直接把状态销毁
yml
cookbook-skip-demo:
enabled: false
mode: instance
selector: players
interval: 20
condition:
mode: expression
script: target_health > 2
instance:
source: self
interval: 20
duration: 100
reapply-mode: refresh
tick-condition:
mode: expression
script: target_in_combat > 0
fail-policy: skip
actions:
- type: heal
amount: 1语义
- 只有战斗中才执行本跳
- 但脱战时不会销毁实例
- 下次条件满足时还会继续跳
八、结束时爆发一次(on-expire)
适合:
- 蓄积结束后爆一下
- HOT 结束时额外补一口
yml
cookbook-expire-burst:
enabled: false
mode: instance
selector: players
interval: 40
condition:
mode: expression
script: target_health < target_max_health
instance:
source: self
interval: 20
duration: 80
reapply-mode: refresh
fail-policy: cancel
on-expire:
- type: heal
amount: 6
actions:
- type: heal
amount: 1九、创建时先打一小段伤害(on-apply)
适合:
- 上毒时先触发一次即时伤害
- 上状态时给一个瞬时反馈
yml
cookbook-apply-hit:
enabled: false
mode: instance
selector: mobs
interval: 40
condition:
mode: expression
script: target_health > 4
instance:
source: nearest-player
interval: 20
duration: 80
reapply-mode: refresh
on-apply:
- type: damage
amount: 1
actions:
- type: damage
amount: 1十、取消时做收尾动作(on-cancel)
适合:
- 状态被打断时补动作
- 来源失效时回收效果
yml
cookbook-cancel-cleanup:
enabled: false
mode: instance
selector: players
interval: 40
condition:
mode: expression
script: target_health > 2
instance:
source: self
interval: 20
duration: 100
reapply-mode: refresh
tick-condition:
mode: expression
script: target_health > 8
fail-policy: cancel
on-cancel:
- type: heal
amount: 2
actions:
- type: damage
amount: 1十一、复合实例:一跳多动作
当前 instance 模式已经支持 一个实例里带多个 actions。
适合:
- 一边掉血一边回来源
- 一边回血一边打伤害
- 复杂复合效果
yml
cookbook-composite:
enabled: false
mode: instance
selector: mobs
interval: 40
tags: [composite]
condition:
mode: expression
script: target_health > 3
instance:
source: nearest-player
interval: 20
duration: 80
reapply-mode: refresh
actions:
- type: damage
amount: 1.2
- type: damage
amount: 0.6当前复合实例最常见的玩法仍然是“多个 damage action”或“多个 heal action”组合。
十二、调试一切 Cookbook 配方的通用方法
不管你用上面哪种配方,最稳的调试顺序都一样:
1)重载
text
/hnattr reload2)看有没有创建实例
text
/hnattr periodic list3)看详情
text
/hnattr periodic inspect <key>4)开 debug
text
/hnattr periodic debug detail <key>5)必要时手动清理
text
/hnattr periodic clearall十三、怎么从这些配方里选一个起手
你只是要做简单回血
选:
基础持续回血(direct)
你要做真正能排查的 DOT
选:
最简单中毒 DOT(instance)
你要做层数玩法
选:
叠层流血(stack)
你要做越叠越痛的持续效果
选:
合并型灼烧(merge)
你要做有结尾效果的状态
选:
结束时爆发一次(on-expire)
十四、这一页最该记住的重点
- 先从能跑通的模板改,不要一上来就从空白开始。
direct更适合简单常驻周期,instance更适合 DOT / HOT / 状态玩法。stack / merge / hooks / tick-condition是你后面做高级机制的主工具。- 所有实例玩法最终都应该回到这三个命令来排查:
text
/hnattr periodic list
/hnattr periodic inspect <key>
/hnattr periodic debug detail <key>