feedback7: merge fb7-late — #389 / PR #390 画卷 keeps the items to copy across a merge, #385 / PR #387 spectator bond details count the hand like the own popup, #394 / PR #395 Enter during facing selection follows the focus, #281 the attack range drawn on a tapped operator, #388 引星棘刺 S1 DEF stacks, PR #386 谢拉格 寒风 blows bottom-up (owner)
- Golden union OK (roster-033 / roster-034 moved on both sides: #298 and #388); broad node --test 5598 (5596 pass, 0 fail, 2 skipped); lint 0 errors.
This commit is contained in:
commit
2492966c4f
32 files changed
+913
-138
No files matched your search
@@ -119,17 +119,23 @@ export function registerMeta(registry) {
|
||||
// 画卷 — trap_copy_front_char: copy the operator in range (elite status included) with its equipment. A copied
|
||||
// normal item that completes a pair with an owned one merges at once and the golden stays in the hand (research 04
|
||||
// addendum "两个同名道具(无论是否被装备)会自动合并…并自动返回整备区"); the built-in equipped that golden on the copy.
|
||||
// A copy that completes a three-copy merge (GitHub #389, PR #390): the elite wears nothing — the promotion returns the
|
||||
// copies' equipment to the hand (PRTS 帮助 "在失去该干员(…合并等)…时自动卸除") — and the copied items stay in the hand
|
||||
// too (PRTS 画卷 备注 "获得的装备为未装备状态"), a copied normal item merging with the returned original.
|
||||
wrap(registry, 'chess_item_6_02_m', () => ({
|
||||
onArt(ctx, ev) {
|
||||
const target = (ev.targets || []).find((p) => p && p.kind === 'chess');
|
||||
if (!target) { ev.error = 'BAD_TARGET'; ev.detail = 'no operator in range'; return; }
|
||||
// snapshot before the gain: a gain that completes a merge consumes the target and empties `target.items`, and an
|
||||
// item merge detaches the original's copy from `target.items` while we iterate (the built-in's live loop then
|
||||
// skipped the next item)
|
||||
const itemIds = (target.items || []).map((it) => it.id);
|
||||
const copy = ctx.grantChess(target.id, { requirePool: false, source: 'item:chess_item_6_02_m' });
|
||||
if (!copy) { ev.error = 'HAND_FULL'; return; }
|
||||
// snapshot first: a merge detaches the original's copy of the item from `target.items` while we iterate
|
||||
// (the built-in's live loop then skipped the next item)
|
||||
for (const itemId of (target.items || []).map((it) => it.id)) {
|
||||
const promoted = copy.id !== target.id;
|
||||
for (const itemId of itemIds) {
|
||||
const got = ctx.grantItem(itemId, { source: 'item:chess_item_6_02_m' });
|
||||
const holder = got ? ctx.piece(copy.uid) : null;
|
||||
const holder = got && !promoted ? ctx.piece(copy.uid) : null;
|
||||
if (got && got.id === itemId && holder && holder.kind === 'chess') ctx.equipDirect(got.uid, holder.uid);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -67,7 +67,10 @@ export default {
|
||||
if (z.type === 'guard') {
|
||||
const inZone = (a) => Math.abs(a.tileR - z.r) <= 1 && Math.abs(a.tileC - z.c) <= 1;
|
||||
const allies = battle.alliesFor(unit).filter(inZone);
|
||||
for (const a of allies) battle.addBuff(a, { key: 'thorn2:bastion', duration: AURA_DUR, mods: mods({ defFlat: num(bb.def) }) });
|
||||
// one DEF buff per alchemy unit, so two units on one ally add up (+60 +60; PRTS 度算浪波 备注 「效果均可叠加」,
|
||||
// GitHub #388 — one shared key let the last unit's buff replace the other's)
|
||||
z.defKey ??= `thorn2:bastion:${unit.id}:${unit.mem.bastionSeq = (unit.mem.bastionSeq ?? 0) + 1}`;
|
||||
for (const a of allies) battle.addBuff(a, { key: z.defKey, duration: AURA_DUR, mods: mods({ defFlat: num(bb.def) }) });
|
||||
if (z.acc >= 1 - 1e-9) {
|
||||
z.acc -= 1;
|
||||
const regen = unit.s.atk * num(bb.hp_recovery_per_sec_ratio); // 生命回复速度 (see the header)
|
||||
|
||||
Reference in new issue
Block a user