feedback5 WY: 华法琳's granted trait stops at the data's 7 / 14 layers per battle, not 12 / 24 (GitHub #175; from PR #192 by @kukiC; the owner's decision of 2026-10-06)
PRTS 卫戍协议:盟约 下半, 3月27日更新#2调整 (revision 439189): 「[Ⅳ阶]华法琳:赋予的特质的叠层上限从 初始12/精锐24 降低至 初始7/精锐14」 — a nerf; the current 参战干员 record says 至多7层 / 14层 and the client blackboard is 7 / 14. Research 02 Addendum 1 had read the line backwards, so the remake overrode garrison_95's cap to 12 / 24. Ported from PR #192 by @kukiC: GRANTED_CAP_OVERRIDE is removed from server/sim/content/garrisons/battle.js and from the client-result layer bound (server/match/fields.js layerAllowanceOf); a granted trait keeps its data cap like a native one. Tests from the PR: garrisons_battle (updated on purpose: the 7th cast reaches 7 / 14, the 8th adds nothing), feedback1-gaps (the bound with 华法琳 + 古米), playtest3 (both cards show 7 / 14); the first two fail without the fix. Docs: research 00 / 01 / 02 corrected (02-bonds.json's note; data/bonds.json regenerated offline — only miraShip.spec.layerGain changed), history 0.1.1's pointer, DESIGN §25.13.2 and the §25.10 table. Golden unchanged (no corpus battle casts 8 times in front of 华法琳).
This commit is contained in:
1 parent
463352d9bc
commit
269d7b0bcf
12 files changed
+77
-31
No files matched your search
@@ -32,7 +32,6 @@
|
||||
import { TICK, SNAPSHOT_EVERY } from '../sim/constants.js';
|
||||
import { layerGainRoom } from '../../shared/constants.js';
|
||||
import { uniteLeft } from '../sim/spec.js';
|
||||
import { GRANTED_CAP_OVERRIDE } from '../sim/content/garrisons/battle.js';
|
||||
import { diyTokenOwner } from '../../shared/diy.js';
|
||||
|
||||
export const MAX_TICKS_PER_INTERVAL = 8;
|
||||
@@ -589,8 +588,8 @@ function layerBondsOf(p, gd) {
|
||||
* §21.26): the traits of its units (garrisons with `bond_add_count` / `bond_add_count_multi`) and the ones their ADD_BOND
|
||||
* traits hand out (`give_garrison_id`, counted for every operator of the player — "所有【X】" reaches them all), each on
|
||||
* the bonds it names (`bond_by_id` ids; `bond_self` / `bond_actived_maxstack`: every bond of the player's snapshot and
|
||||
* units), up to the per-battle cap the sim applies (content/garrisons/battle.js: `max_add_count_per_battle`, the handed-out
|
||||
* 华法琳 trait's GRANTED_CAP_OVERRIDE). A trait the data gives no cap (初雪 / 银灰's freeze trait, 菲莱 / 百炼嘉维尔's per-skill
|
||||
* units), up to the per-battle cap the sim applies (content/garrisons/battle.js: `max_add_count_per_battle` — a handed-out
|
||||
* trait's too, 华法琳's 7 / 14, GitHub #175). A trait the data gives no cap (初雪 / 银灰's freeze trait, 菲莱 / 百炼嘉维尔's per-skill
|
||||
* 萨尔贡, 斯卡蒂's per-kill …) — or a 魔王, whose +extra on every trait gain counts toward no cap — leaves its bonds bounded
|
||||
* only by the room under 999 (Infinity here): such boards legitimately gain hundreds of layers a battle.
|
||||
* @returns {Map<string, number>} bondId → extra allowance (Infinity: uncapped)
|
||||
@@ -602,23 +601,22 @@ function layerAllowanceOf(p, gd) {
|
||||
const lineup = new Set(Object.keys(p.bonds && typeof p.bonds === 'object' ? p.bonds : {}));
|
||||
for (const u of units) for (const b of gd.chess(u.chessId)?.bonds || []) lineup.add(b);
|
||||
let extra = false;
|
||||
const credit = (g, times, handedOut) => {
|
||||
const credit = (g, times) => {
|
||||
const bb = g.bb || {};
|
||||
if (Number.isFinite(bb.extra_cnt)) { extra = true; return; }
|
||||
if (!Number.isFinite(bb.bond_add_count) && !Number.isFinite(bb.bond_add_count_multi)) return;
|
||||
const s = g.bbStr || {};
|
||||
const bonds = s.bond_type === 'bond_by_id' ? String(s.bond_id ?? '').split(',').map((x) => x.trim()).filter((x) => gd.bond(x)) : [...lineup];
|
||||
const override = handedOut ? GRANTED_CAP_OVERRIDE[g.garrisonId] : undefined;
|
||||
const cap = override ?? (Number(bb.max_add_count_per_battle) > 0 ? Number(bb.max_add_count_per_battle) : Infinity);
|
||||
const cap = Number(bb.max_add_count_per_battle) > 0 ? Number(bb.max_add_count_per_battle) : Infinity;
|
||||
for (const b of bonds) out.set(b, (out.get(b) || 0) + cap * times);
|
||||
};
|
||||
for (const u of units) {
|
||||
for (const gid of gd.chess(u.chessId)?.garrisonIds || []) {
|
||||
const g = gd.garrison(gid);
|
||||
if (!g || g.eventType !== 'IN_BATTLE') continue;
|
||||
if (g.effectKey !== 'ADD_BOND') { credit(g, 1, false); continue; }
|
||||
if (g.effectKey !== 'ADD_BOND') { credit(g, 1); continue; }
|
||||
const given = gd.garrison(g.bbStr?.give_garrison_id);
|
||||
if (given && given.eventType === 'IN_BATTLE') credit(given, units.length, true);
|
||||
if (given && given.eventType === 'IN_BATTLE') credit(given, units.length);
|
||||
}
|
||||
}
|
||||
if (extra) for (const b of out.keys()) out.set(b, Infinity);
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
//
|
||||
// ADD_BOND grants `give_garrison_id` to other operators before the first deployment (targets parsed from
|
||||
// the text: 身前一格 / 身前一格【X】/ 自身和身前一格 / 同一行最右边 / 所有【X】). A unit owns a garrison id
|
||||
// at most once (耀骑士临光 already carries the 144/159 it grants to itself). The 华法琳-granted trait
|
||||
// (garrison_95) is capped 12 / 24 per battle instead of the data's 7 / 14 (research 02 Addendum 1).
|
||||
// at most once (耀骑士临光 already carries the 144/159 it grants to itself). A granted trait keeps
|
||||
// its data cap like a native one: 华法琳's garrison_95 stops at 7 / 14 layers per battle (PRTS 下半
|
||||
// 3月27日更新#2: 「从 初始12/精锐24 降低至 初始7/精锐14」; GitHub #175, PR #192 by @kukiC).
|
||||
// layer events act1autochess_gar_event_useskill (skillStart) · _selfkillenemy (kill, every check_cnt) ·
|
||||
// _selfdead (death 'killed'; texts with 替身 also on every substitute ⇄ body swap, read from the
|
||||
// dollkeeper flag unit.trait.doll) · _consume_ammo (ammoUsed; range_id 0-1 self, 1-1 front tile,
|
||||
@@ -43,9 +44,6 @@ import * as S from '../support/index.js';
|
||||
import { mitigate } from '../../damage.js';
|
||||
import { frontOf } from '../../dir.js';
|
||||
|
||||
/** 华法琳's granted trait: per-battle cap override (research 02 Addendum 1: PRTS 3/27 "初始7/精锐14 → 初始12/精锐24"). */
|
||||
export const GRANTED_CAP_OVERRIDE = Object.freeze({ garrison_95_a: 12, garrison_95_b: 24 });
|
||||
|
||||
const ids = (s) => String(s ?? '').split(',').map((x) => x.trim()).filter(Boolean);
|
||||
const EMPTY = Object.freeze([]);
|
||||
/** Status keys for check_ab_flag values used by the data (16 = 冻结). */
|
||||
@@ -68,8 +66,7 @@ export function install(battle) {
|
||||
if (set.has(g.garrisonId)) return null;
|
||||
set.add(g.garrisonId);
|
||||
const bb = g.bb || {};
|
||||
const override = grantedBy ? GRANTED_CAP_OVERRIDE[g.garrisonId] : undefined;
|
||||
const cap = override ?? (S.num(bb.max_add_count_per_battle, 0) > 0 ? S.num(bb.max_add_count_per_battle) : Infinity);
|
||||
const cap = S.num(bb.max_add_count_per_battle, 0) > 0 ? S.num(bb.max_add_count_per_battle) : Infinity;
|
||||
const it = {
|
||||
unit, g, gid: g.garrisonId, key: g.effectKey, bb, bbStr: g.bbStr || {}, grantedBy,
|
||||
cap, capKey: `gar:${g.garrisonId}:${unit.id}`, cnt: 0, k: -1,
|
||||
|
||||
Reference in new issue
Block a user