feedback5 O7: engine hooks for the 攻城手 / 回环射手 kits — targeting priority 'heaviest' and boomerang flight hooks
- targeting.js PRIORITY_FNS `heaviest` (-e.weight: the current 重量等级, 失重 included): the 攻城手 trait
"优先攻击重量最重的敌人" for the 早露 / 提丰 kits (`trait.priority`); no other unit uses it.
- ai.js throwBoomerang: a catch emits the hook `boomerangCaught` { unit, attackId, isSkill, x, y } (only when a handler
exists); an attack profile's `boomerangOnward(ctx)` takes the flight over after the first hit — ctx.hit(target, x, y)
(a hit of the same attack, resolveHit with its profile), ctx.comeBack(x, y) (the usual way back, once) — and a content
error there still sends the boomerang back. For 娜仁图亚 LPS-Y "每回收5次回旋投射物", S3 "投射物全部回收时", S1's bounces
and S2's dash (the kits come in the next commit).
- docs/SIM.md §5 (the hook) and §8 (the profile flags, the loopshooter row, the priority).
- Additive and behaviour-preserving: no unit of the base has a handler or the flag, so golden is unchanged.
This commit is contained in:
1 parent
742f478526
commit
12fa92d9f6
3 files changed
+34
-7
No files matched your search
@@ -178,6 +178,9 @@ const PRIORITY_FNS = {
|
||||
boss: (e) => (e.isBoss ? 0 : 1),
|
||||
notBurst: (e) => (e.s.flags.burstLock ? 1 : 0),
|
||||
ground: (e) => (e.isFlying ? 1 : 0),
|
||||
// 攻城手 trait "优先攻击重量最重的敌人" (早露 / 提丰: kits/ops/op-poca.js, op-typhon.js): the highest current 重量等级
|
||||
// (Unit.weight: massLevel with 失重 etc.) first, the usual order after that
|
||||
heaviest: (e) => -e.weight,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user