DamageBattleMutationInterceptor
伤害 mutation 的生命周期拦截器。
设计意图:
把
DamageMutation真正接到on_damage生命周期上;让目标身上的 ability / item / status / side condition / weather / terrain 都能在伤害真正写回前拿到这次伤害事件;
在 hook 返回数值 relay 时,把新的实际伤害量回写到 mutation。
当前约束:
多目标
DamageMutation仍然共用一个 mutation 负载;因此只有当所有目标都给出一致的新伤害数值时,才会把 relay rewrite 回写成固定值;
如果不同目标想要不同伤害,后续应引入“按目标拆分 mutation”协议,而不是在这里隐式取最后一个 relay。
Properties
Functions
Link copied to clipboard
open override fun intercept(context: BattleMutationInterceptionContext, attachedEffectProcessor: BattleAttachedEffectProcessor): BattleMutationInterceptionResult
拦截当前 mutation。
Link copied to clipboard
判断当前拦截器是否负责处理给定 mutation。