feedback1 integrate: 坚固维式重锤's lock belongs to the deployment - a lent hammer and in-place revives follow it (QA)
The lock and its re-arm hook lived in the carrier's hammer grants, so a hammer lent by 萨尔贡 × 娜仁图亚 came back spent in the borrower's next deployment once the lend had run out while it was down, and a window started through the lend ended with it. deploymentOf marks the deployment whose lock is spent; one battle-level hook holds every running window (holdsUndying, also what 信仰搅拌机 S2 steps aside for), so a window outlasts the lend. M3茧甲 and 埃芒加德 revive in place for PRTS's 0-time / 0-cost redeploy and now open a new deployment (revivedInPlace), like 阿戈尔 5's real redeploy.
This commit is contained in:
1 parent
842e1e13c4
commit
d6b1d1bd26
5 files changed
+187
-34
No files matched your search
@@ -33,6 +33,7 @@ import { normalizeChess } from '../../simdata.js';
|
||||
import { aggregateMods } from '../../buffs.js';
|
||||
import { CAT_SHIELD_KEY } from '../tokens.js';
|
||||
import { isHpLoss } from '../../damage.js';
|
||||
import { holdsUndying } from '../items/battle.js';
|
||||
|
||||
const TICK_EPS = 0.01; // minimal status duration (s)
|
||||
const AURA = 0.2; // aura refresh period (s)
|
||||
@@ -287,13 +288,13 @@ const kits = {
|
||||
// before the hit) and N bullets go; with fewer left it still blocks, spends them all and the skill ends (PRTS 备注
|
||||
// "弹药量不足时仍可抵挡致命伤害,此时将消耗所有剩余弹药并退出技能状态"). "自身持有不死时此效果不会生效": a 不死
|
||||
// that runs before it (骑士戒律, priority 20) has already prevented the hit; 坚固维式重锤's held window
|
||||
// (unit.mem.undyingUntil, items/battle.js) runs last, so the guard steps aside while it lasts
|
||||
// (items/battle.js holdsUndying: this deployment's, not run out) runs last, so the guard steps aside while it lasts
|
||||
const cost = Math.max(1, Math.floor(num(bb.ammo_cost, 30)));
|
||||
battle.on('hit', (c) => { if (c.target === unit) unit.mem.rmixerPre = { dmg: c.dmg, hp: unit.hp }; }, { owner: unit, priority: -100 });
|
||||
battle.on('fatal', (c) => {
|
||||
const sk = unit.skill;
|
||||
if (c.unit !== unit || c.prevented || !sk || !sk.active || sk.kind !== 'ammo' || !(sk.ammoLeft > 0)) return;
|
||||
if (battle.time < (unit.mem.undyingUntil ?? -Infinity)) return;
|
||||
if (holdsUndying(battle, unit)) return;
|
||||
c.prevented = true;
|
||||
const pre = unit.mem.rmixerPre;
|
||||
unit.hp = pre && pre.dmg === c.dmg ? Math.max(1, Math.min(unit.s.maxHp, pre.hp)) : 1;
|
||||
|
||||
Reference in new issue
Block a user