feedback5 O19: 自选 kits for 老鲤, 温蒂 (with her 工程蓄水炮) and 望 (with her 棋子 and 跟子)

Three owned 6★ picks get their operator kits (kits/ops/op-lmlee.js, op-weedy.js, op-wang.js, appended to
OPERATOR_KIT_FILES): every skill at rank 4 / 7, both talents, the trait and every module at stage 1 / 3, and the kits of
the two summons (set up by the owner's talent, as 鸿雪's 打字机).

- 老鲤 (行商): MER-X 2 DP, MER-Y ATK +4 % per payment (5 stacks); 和气生财 (±14, ×2 alone; MER-Y Lv3 ±20); 有备无患 through
  the merchantPay hook (5 DP for a guard against the next 晕眩 / 冻结, counter-stun 3 s; MER-X Lv3 4 DP / 4 s); S1 / S3 fire
  at full SP (the owner's AUTO rule), S2's mark bursts per its PRTS notes, S3's push and outside-range dodge.
- 温蒂 (推击手): S1 next attack (push + stun), S2 water mode (×3.2 interval, range +1, 0.9 splash, pushes), S3 liquid
  nitrogen (1.2 splash, push, 移动创伤 1200 per tile); the cannon (20 s, back on its tile, nearest target, pushes, its
  forced skill, fires with her S3 beside her); 蓄水炮强化 SP (PUS-X Lv3 every 2 s and ATK +20 %); PUS-X refund on a 高台,
  PUS-Y +1 force while blocking two; her composed record takes a 高台 (shared/highGround.js unchanged).
- 望 (陷阱师): hits air; 棋子 activation, trigger, in-place return (2 s, cost; TRP-X 2 DP), 跟子 in the PRTS order, 料敌机先
  stacks, S1 DoT + 停顿, S2 line damage + additive slow, S3 x-6 passive and the 天下劫 overflow / bullets.

Match: the 自选 hand count of a placeable summon reads the active module's byModule deploy limit (server/match/player/
diy.js placeableTokens) — 望 with TRP-X gets 7 棋子; nobody else changes (多萝西's 13 stays at the 9 cap).
Docs: PLAYING.md §4 (温蒂 on a 高台), SIM.md §8 (陷阱师 air through the data), kits/README.md (module deploy limit).

Golden: only diy moved — diy-106 … diy-109 are now the 老鲤 / 温蒂 battles (the prototype battles they held move on),
diy-110 … diy-115 are new (望, then the prototypes, seeds per index); roster, bonds, fields, matches, standins unchanged.
Tests: test/content/op_lmlee.test.js (8), op_weedy.test.js (10), op_wang.test.js (8).
This commit is contained in:
sganggs committed 2026-10-06 05:09:27 +08:00
1 parent 996f5d20fe
commit 8627791e53
12 files changed
+2293 -101

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@
## 4. 摆阵与朝向
- 从整备区把干员拖到棋盘:近战位 / 远程位高亮为可放置格。**特性写着「可以放置于远程位」的近战干员(钩索师、推击手:歌蕾蒂娅、崖心、见行者)也能放到高台上**,普通和精锐都可以,装什么模组或者不装模组都一样;其他近战干员只能放在地面。站在高台上时照常攻击,但不阻挡敌人。**水里不能部署**:战场#08(涨潮控制)中间的那条水池(深水区)和官方一样拒绝部署,任何干员和召唤物都放不上去;突袭盟约的干员再部署、战术家的援军自动选战术点时也只会落在岸上。松手后出现**方向轮盘**,向上 / 右 / 下 / 左滑动,棋盘上会用橙色条纹预览旋转后的攻击范围,松手确认;松在中心或点「✕ 点击取消」取消。
- 从整备区把干员拖到棋盘:近战位 / 远程位高亮为可放置格。**特性写着「可以放置于远程位」的近战干员(钩索师、推击手:歌蕾蒂娅、崖心、见行者,以及自选编队的温蒂)也能放到高台上**,普通和精锐都可以,装什么模组或者不装模组都一样;其他近战干员只能放在地面。站在高台上时照常攻击,但不阻挡敌人。**水里不能部署**:战场#08(涨潮控制)中间的那条水池(深水区)和官方一样拒绝部署,任何干员和召唤物都放不上去;突袭盟约的干员再部署、战术家的援军自动选战术点时也只会落在岸上。松手后出现**方向轮盘**,向上 / 右 / 下 / 左滑动,棋盘上会用橙色条纹预览旋转后的攻击范围,松手确认;松在中心或点「✕ 点击取消」取消。
- 想只改朝向:把干员拖回它自己所在的格子再选方向。朝向会一直保留到下一回合。
- **点选按地上的方格**:点哪个方格就选中站在那个方格上的单位,点空方格不选任何单位(点到后一格干员画出来的头部,算作点了后面那一格)。作战中友方同样按方格;敌人在格子之间走动,点它的身体或脚下附近(0.6 格内)即可,飞行敌人点它的身体。
- 拖动时模型一直在指针 / 手指下(脚在指针下方约半格,鼠标和触屏一样),**指针所在的格子**就是落点并高亮;装备拖到哪个格子,就配发给那个格子上的干员;在商店栏上松手则放回原位。
+1 -1
View File
@@ -1229,7 +1229,7 @@ header of professions.js).
| merchant | −3 DP every 3 s (bb cost/interval); retreats when DP runs out |
| skywalker | can block FLY enemies (蒂比's kit: only while airborne — 起飞, flag `liftoff`, which also releases the ground enemies she blocked) |
| stalker | hits every enemy in range; 50 % dodge (bb prob), taunt −1 |
| traper | ranged, ground only |
| traper | ranged; the data's `canHitFly` decides — 望 hits air units (PRTS 分支特性信息 陷阱师 "可对空"; the table's ground-only default applies only to a record without the field). Her 棋子 / 跟子: kits/ops/op-wang.js |
Unknown subprofessions fall back to the profession default (test `professions.test.js` checks every pool subprofession).
+5 -2
View File
@@ -95,7 +95,8 @@ export function diyGameData(gd, records) {
token: { value: (id) => gd.token(id) || tokenOf(id) },
/**
* GameData.placeableTokens for a slotted slot: the summons its record lists (the pick's skill and talents) that are
* placeable, by the variant of the owner form (`bySkill[skillIndex]` sources) — the deploy limit as the count.
* placeable, by the variant of the owner form (`bySkill[skillIndex]` sources) — the deploy limit as the count, the
* active module's own when its variant has one (`byModule`: 望's TRP-X "可同时部署的陷阱数量提升", 6 → 7 棋子).
*/
placeableTokens: {
value: (chessId, loadout = null) => {
@@ -112,7 +113,9 @@ export function diyGameData(gd, records) {
const src = Array.isArray(alt?.sources) ? alt.sources : Array.isArray(v.sources) ? v.sources : [];
if (!src.includes('talent') && !src.includes('skill')) continue;
}
out.push({ tokenId: tid, count: Math.min(posIntOr(v?.stats?.deployLimit, posIntOr(t.deployLimit, 1)), 9) });
const mid = rec.module && rec.module.active ? rec.module.id : null;
const vm = v && mid && isObj(v.byModule) ? v.byModule[mid] ?? null : null;
out.push({ tokenId: tid, count: Math.min(posIntOr(vm?.stats?.deployLimit, posIntOr(v?.stats?.deployLimit, posIntOr(t.deployLimit, 1))), 9) });
}
return out;
},
+2 -1
View File
@@ -184,7 +184,8 @@ both tiers, both forms and both module stages. A 自选 piece has no 特质 and
the kit's business. Summons: `battle.tokenDef(tokenId, unit)` / `battle.spawnToken(unit, …)` resolve the variant of the
pick. A **placeable** summon (data/backups.json `tokens[id].placeable`, made by the pick's skill or a talent — the
variant's `sources`) is a hand piece like any operator's: when the 自选 piece is deployed in prep its player gets one
stack of the variant's `deployLimit` (server/match/player/diy.js `placeableTokens`, PlayerState `grantTokensFor`), places
stack of the variant's `deployLimit` — the picked module's own when its variant has one (望's TRP-X: 7 棋子) —
(server/match/player/diy.js `placeableTokens`, PlayerState `grantTokensFor`), places
it on a legal tile (the token's position / `ownerRange`), loses it with its owner (sold, merged, moved back), and the
match hands every placed piece to the battle as a PlayerBattleInput token unit `{ kind: 'token', tokenId, ownerUid }` —
so a kit finds its pieces before the battle starts as `battle.allyUnits` with `kind === 'token'`, its `defId` and
+3
View File
@@ -133,6 +133,9 @@ export const OPERATOR_KIT_FILES = Object.freeze([
'op-haak.js',
'op-phatom.js',
'op-crosly.js',
'op-lmlee.js',
'op-weedy.js',
'op-wang.js',
]);
/**
+236
View File
@@ -0,0 +1,236 @@
// server/sim/content/kits/ops/op-lmlee.js — 老鲤 (char_322_lmlee) 自选 operator kit: 6★ 行商 (特种), an owned-6★ pick of the
// tier-5 and tier-6 自选 slots; every skill, both talents, the trait and both modules at every form.
// Kit contract and the 自选 rules: ../README.md ("How to add an operator (自选)").
//
// Forms (data/backups.json units.char_322_lmlee, the DIY slot statuses): normal = E2 Lv1, skills at rank 4, no module;
// elite = E2 Lv60, rank 7, the picked module at stage 1 (tier 5) or 3 (tier 6). Potential 0 [ASSUMED: no account].
// Sources: character_table / skill_table / battle_equip_table (zh_CN, as built into backups.json) and PRTS 老鲤 (有备无患
// 备注 "“费用充足”指的是当前费用≥触发天赋所需要消耗的费用 / 自身已拥有本天赋的抵消异常效果时,额外消耗费用效果不会重复触发。本天赋
// 不会对我方单位造成晕眩"; S2 备注 "标记爆炸半径1,可对空 / 撤退老鲤时,如果老鲤没有阻挡存在标记的目标,则标记会消失且不产生任何
// 效果 / …①老鲤被击倒 ②老鲤在阻挡被标记的目标时撤退 ③在标记消失前再次释放本技能"; S3 备注 "闪避效果以伤害来源当前位置为准,
// 无来源伤害始终被视作“来自范围外”"), PRTS 分支特性信息 行商 ("可以且优先攻击自身阻挡的单位" — the engine's blocker rule).
// - Trait (行商) "在场时每3秒消耗3点部署费用(不足时自动撤退)": the profession default (professions.js installMerchant, trait
// bb interval / cost). Module MER-X “无问吉凶” overrides it with 2 DP (trait bb cost −2). Module MER-Y “但思善恶” adds
// "每次特性消耗费用时攻击力+4%,最多可以叠加5次" (hidden module talent atk / max_stack_cnt): every trait payment +atk ATK,
// up to max_stack_cnt stacks, until he leaves the field. "再部署时间减少" is in the stats; "撤退时不返还部署费用" has no
// battle effect here (no manual retreat).
// - T1 和气生财 "老鲤阻挡目标时,使其攻击速度-14,且自身攻击速度+14;当周围八格内仅存在一个敌人时效果翻倍"
// (lmlee_t_1[enemy] / [self].attack_speed, cnt): while he blocks, the blocked enemy ASPD −14 and his own +14, both ×2
// while exactly `cnt` enemy stands on the 3 × 3 around him (his tile included [ASSUMED: the enemy he blocks stands
// there], flyers too). MER-Y stage 3: ∓20.
// - T2 有备无患 "特性消耗费用时,若费用足够则改为消耗5费用,抵消自身受到的下一次晕眩/冻结,并使攻击来源晕眩3秒" (extra_cost,
// stun): a trait payment while DP ≥ |extra_cost| and no guard held pays |extra_cost| instead (the `merchantPay` hook) and
// gives him the guard; the guard cancels the next 晕眩 / 冻结 on him (a cold-on-cold 冻结 too) and stuns its source for
// `stun` s — an enemy only (PRTS: never an ally). MER-X stage 3: 4 DP, 4 s.
// - S1 小惩大诫 (AUTO, 持续时间无限): ATK +atk, 法术闪避 prob. An AUTO skill acting on himself fires as soon as its SP is
// full (`trigger: 'SP_FULL'`, the owner's AUTO rule, kits/README.md checklist 5); the data's DEFAULT would wait for an
// attack.
// - S2 驱凶辟邪 (MANUAL, data DEFAULT): passive ASPD +attack_speed. Cast as he is about to attack: the target of that
// attack is marked (taunt_level: our units select it first — "使其更易受我方攻击"); paper_duration s later the mark bursts
// for (default_atk_scale + n × factor_atk_scale) × his ATK arts damage on every enemy within MARK_RADIUS of it (air
// units too; 中点判定 around the target, the selectable enemies), n = the damage instances our side dealt to the target
// meanwhile (≤ max_stack_cnt; at the cap, or when the target is knocked out, it bursts at once). PRTS 备注: it also
// bursts when he is knocked out, when he leaves while blocking the marked enemy, and when he casts again; when he leaves
// otherwise it vanishes. Counted: every `damaged` instance of an ally (credit included) on it but 元素损伤 and 流失
// [ASSUMED: a hit absorbed by a shield counts]. The burst after a knock-out uses his ATK of the last tick on the field
// [ASSUMED].
// - S3 贵客盈门 (AUTO, 持续时间无限; SP_FULL as S1): range x-4, ATK / DEF +atk / +def, taunt +taunt_level; each attack pushes
// every other enemy of his range with attack@force (小力 = 0) at attack@prob_knockback (radial from him [ASSUMED: the text
// gives no direction — knockback[relative]]); prob to dodge each physical / arts damage whose source stands outside his
// range at that moment (无来源 damage always counts as from outside).
import { num, talentBb, moduleBb, skillRec, statBuff, up } from '../shared/tier1.js';
import { absoluteRangeKeys } from '../../../targeting.js';
import { bodyInKeys } from '../../../body.js';
import { isHpLoss } from '../../../damage.js';
import { acquireTargets, effectiveProfile } from '../../../ai.js';
const S1 = 'skchr_lmlee_1';
const S2 = 'skchr_lmlee_2';
const S3 = 'skchr_lmlee_3';
/** The 3 × 3 around him (range_table x-4): 和气生财's 周围八格 and S3's range when the data carries no grid. */
const X4 = Object.freeze([[1, -1], [1, 0], [1, 1], [0, -1], [0, 0], [0, 1], [-1, -1], [-1, 0], [-1, 1]]);
/** S2 驱凶辟邪's burst radius (PRTS 备注 "标记爆炸半径1"; no blackboard key). */
export const MARK_RADIUS = 1;
/** 有备无患's guard on him (cancels the next 晕眩 / 冻结). */
export const GUARD_KEY = 'lmlee:guard';
/** Tag of S2's burst (not counted as a damage instance on the mark). */
const BURST_TAG = 'lmlee:burst';
const bbOf = (chess, id) => skillRec(chess, id)?.bb ?? {};
const markKey = (unit) => `lmlee:mark:${unit.id}`;
/** End the mark `m` without a burst (he left without blocking the marked enemy, the target left the field). */
function dropMark(battle, unit, m) {
m.alive = false;
if (m.target) battle.removeBuff(m.target, markKey(unit));
}
/** S2's burst of mark `m`: (scale + n × factor) × ATK arts on the selectable enemies within MARK_RADIUS of the target. */
function burstMark(battle, unit, m, b2, atk = null) {
if (!m.alive) return;
m.alive = false;
const t = m.target;
battle.removeBuff(t, markKey(unit));
const x = t.x, y = t.y;
const amount = (atk ?? unit.s.atk) * (num(b2.default_atk_scale) + m.n * num(b2.factor_atk_scale));
battle.fx('explode', { x, y, r: MARK_RADIUS, id: unit.id, dmgType: 'arts', skill: 'lmlee_2', n: m.n });
if (!(amount > 0)) return;
for (const e of battle.foesInRadius(x, y, MARK_RADIUS, true)) {
if (e.alive) battle.dealDamage(unit, e, { amount, type: 'arts', isSkill: true, tags: ['skill', BURST_TAG] });
}
}
export default {
char_322_lmlee: (bb, chess) => {
const t0 = talentBb(chess, 0); // 和气生财 (MER-Y stage 2+: its change)
const t1 = talentBb(chess, 1); // 有备无患 (MER-X stage 2+: its change)
const hidden = moduleBb(chess); // MER-Y: atk / max_stack_cnt per trait payment
const b1 = bbOf(chess, S1), b2 = bbOf(chess, S2), b3 = bbOf(chess, S3);
const s3 = skillRec(chess, S3);
const tauntLv = num(b2.taunt_level, 1);
const maxN = Math.max(1, Math.floor(num(b2.max_stack_cnt, 20)));
return {
skills: {
[S1]: { kind: 'toggle', trigger: { rule: 'SP_FULL' }, mods: { atkPct: num(b1.atk), dodgeArts: num(b1.prob) } },
[S2]: {
kind: 'instant',
// "主动开启:标记目标": the target of the attack he is about to make (the basic strategy casts on that attack)
onStart({ battle, unit }) {
const t = acquireTargets(battle, unit, effectiveProfile(unit)).find((e) => e && e.side === 'enemy' && e.alive);
if (!t) return;
const prev = unit.mem.lmleeMark;
if (prev && prev.alive) burstMark(battle, unit, prev, b2); // ③ cast again before the mark ends
const m = { target: t, n: 0, alive: true, atk: unit.s.atk };
unit.mem.lmleeMark = m;
const dur = num(b2.paper_duration, 5);
battle.addBuff(t, { key: markKey(unit), duration: dur + 0.1, mods: tauntLv ? { taunt: tauntLv } : null, source: unit, tags: ['skill'] });
battle.fx('mark', { x: t.x, y: t.y, id: t.id, src: unit.id, skill: 'lmlee_2' });
battle.after(dur, () => burstMark(battle, unit, m, b2), { owner: unit });
},
},
[S3]: {
kind: 'toggle',
trigger: { rule: 'SP_FULL' },
mods: { atkPct: num(b3.atk), defPct: num(b3.def), taunt: num(b3.taunt_level) },
targeting: { rangeGrid: s3?.rangeGrid ?? X4 },
attack: {
// "攻击小力度推开范围内除当前目标外的敌人"
onHit({ battle, unit, target }) {
const p = num(b3['attack@prob_knockback'], 1), force = num(b3['attack@force'], 0);
if (!(p > 0) || (p < 1 && !battle.rng.chance(p))) return;
for (const e of battle.enemiesInKeys(unit.rangeKeys, unit, { canHitFly: true })) {
if (e !== target && e.alive) battle.push(e, force, { from: unit });
}
},
},
},
},
talents: [
{ install(battle, unit) { // 和气生财: while blocking — the blocked enemy ASPD −, his own +; ×2 with one enemy around
const foe = num(t0['lmlee_t_1[enemy].attack_speed']), self = num(t0['lmlee_t_1[self].attack_speed']);
const alone = Math.max(1, Math.floor(num(t0.cnt, 1)));
if (!foe && !self) return;
const selfKey = 'talent:lmlee:self', foeKey = `talent:lmlee:foe:${unit.id}`;
battle.on('tick', () => {
const blocked = up(unit) ? unit.blocking.filter((e) => e && e.alive) : [];
if (!blocked.length) {
if (unit.findBuff(selfKey)) battle.removeBuff(unit, selfKey);
return;
}
const around = new Set(absoluteRangeKeys(X4, unit.tileR, unit.tileC, unit.dir, 0));
let n = 0;
for (const e of battle.enemies) if (e.alive && !e.hidden && bodyInKeys(e, around)) n++;
const k = n === alone ? 2 : 1;
const cur = unit.findBuff(selfKey);
if (self && (!cur || cur.mods?.aspd !== self * k)) battle.addBuff(unit, { key: selfKey, mods: { aspd: self * k }, tags: ['talent'] });
if (foe) for (const e of blocked) battle.addBuff(e, { key: foeKey, duration: 0.1, mods: { aspd: foe * k }, source: unit, tags: ['talent'] });
}, { owner: unit });
} },
{ install(battle, unit) { // 有备无患: pay |extra_cost| for the guard; the guard cancels the next 晕眩 / 冻结
const pay = Math.abs(num(t1.extra_cost)), stun = num(t1.stun);
if (!(pay > 0)) return;
battle.on('merchantPay', (ctx) => {
if (ctx.unit !== unit || ctx.cancel || unit.findBuff(GUARD_KEY)) return;
const pl = battle.getPlayer(unit.ownerId);
if (!pl || pl.dp + 1e-9 < pay) return; // "费用充足": DP ≥ the talent's cost
ctx.cost = pay;
battle.addBuff(unit, { key: GUARD_KEY, tags: ['talent'] });
battle.fx('shield', { x: unit.x, y: unit.y, id: unit.id, kind: 'lmlee' });
}, { owner: unit, priority: 10 });
battle.on('beforeStatus', (ctx) => {
if (ctx.target !== unit || ctx.cancel || (ctx.status !== 'stun' && ctx.status !== 'freeze') || !unit.findBuff(GUARD_KEY)) return;
ctx.cancel = true;
battle.removeBuff(unit, GUARD_KEY);
const src = ctx.source;
if (stun > 0 && src && src.side === 'enemy' && src.alive) battle.applyStatus(src, 'stun', { duration: stun, source: unit });
battle.fx('counter', { x: unit.x, y: unit.y, id: unit.id });
}, { owner: unit });
} },
],
install(battle, unit) {
// MER-Y “但思善恶”: every trait payment ATK +atk (≤ max_stack_cnt) — counted when the payment goes through (after
// 有备无患 set its cost)
const ma = num(hidden.atk);
if (ma > 0) {
const cap = Math.max(1, Math.floor(num(hidden.max_stack_cnt, 5)));
battle.on('merchantPay', (ctx) => {
if (ctx.unit !== unit || ctx.cancel) return;
const pl = battle.getPlayer(unit.ownerId);
const c = Number.isFinite(ctx.cost) ? Math.max(0, ctx.cost) : 0;
if (!pl || pl.dp < c) return;
battle.addBuff(unit, { key: 'trait:lmlee:merY', refresh: 'stack', stacks: 1, maxStacks: cap, mods: { atkPct: ma }, tags: ['trait'] });
}, { owner: unit, priority: -10 });
}
const sid = unit.skill?.id;
if (sid === S2) {
statBuff(battle, unit, 'skill:lmlee:s2passive', { aspd: num(b2.attack_speed) }); // "被动效果:攻击速度+15"
// the mark: every damage instance of our side on it, its target's knock-out, his leaving the field
battle.on('damaged', (ctx) => {
const m = unit.mem.lmleeMark;
if (!m || !m.alive || ctx.target !== m.target) return;
const who = ctx.source ?? ctx.credit;
const d = ctx.dmg;
if (!who || who.side !== 'ally' || !d || ctx.type === 'element' || isHpLoss(d) || d.tags?.includes(BURST_TAG)) return;
m.n = Math.min(maxN, m.n + 1);
if (m.n >= maxN) burstMark(battle, unit, m, b2);
}, { owner: unit, priority: -20 });
battle.on('tick', () => {
const m = unit.mem.lmleeMark;
if (!m || !m.alive || !up(unit)) return;
m.blocked = m.target.blockedBy === unit; // read when he leaves (his block list is gone by then)
m.atk = unit.s.atk;
}, { owner: unit });
battle.on('death', (ctx) => {
const m = unit.mem.lmleeMark;
if (!m || !m.alive) return;
if (ctx.unit === m.target) {
if (ctx.reason === 'killed') burstMark(battle, unit, m, b2);
else dropMark(battle, unit, m);
} else if (ctx.unit === unit) {
// ① knocked out, ② leaving while blocking the marked enemy ⇒ bursts; else it vanishes
if (ctx.reason === 'killed' || m.blocked) burstMark(battle, unit, m, b2, m.atk);
else dropMark(battle, unit, m);
}
}, { owner: unit, priority: 5 });
}
if (sid === S3) {
// "有55%概率闪避来自范围外的物理或法术伤害" (the source's position now; 无来源 = from outside)
const p = num(b3.prob);
if (p > 0) {
battle.on('hit', (ctx) => {
const d = ctx.dmg;
if (ctx.target !== unit || !unit.skill?.active || !d || d.cancel || !d.canDodge || (d.type !== 'phys' && d.type !== 'arts')) return;
const src = ctx.source;
if (src && bodyInKeys(src, unit.rangeKeySet ?? new Set(unit.rangeKeys ?? []))) return;
if (battle.rng() >= p) return;
d.cancel = true;
battle.fx('dodge', { x: unit.x, y: unit.y, id: unit.id });
if (battle.hasHook('dodge')) battle.emit('dodge', { source: ctx.credit ?? src, target: unit, dmg: d });
}, { owner: unit, priority: -50 });
}
}
},
};
},
};
+403
View File
@@ -0,0 +1,403 @@
// server/sim/content/kits/ops/op-wang.js — 望 (char_2027_wang) 自选 operator kit: 6★ 陷阱师 (特种), an owned-6★ pick of the
// tier-5 and tier-6 自选 slots; every skill, both talents, the trait, the module TRP-X 兽形棋盒 at every form, and the kit of
// her summon 棋子 (token_10064_wang_stone1) with its 跟子. Kit contract and the 自选 rules: ../README.md ("How to add an
// operator (自选)").
//
// Forms (data/backups.json units.char_2027_wang, the DIY slot statuses): normal = E2 Lv1, skills at rank 4, no module;
// elite = E2 Lv60, rank 7, TRP-X at stage 1 (tier 5) or 3 (tier 6). Potential 0 [ASSUMED: no account].
// Sources: character_table / skill_table / battle_equip_table / token_table (zh_CN, as built into backups.json; the 棋子
// owner-form / skill / module variants) and PRTS 望 (铸子 备注: the 跟子 are 望's own projectiles — no unit, they take no
// tile, act and connect like a 棋子; they go on deployable tiles and on undeployable ground with no character unit; order
// "有敌人的>没有敌人的;不可部署地块>可部署地面地块>可部署高台地块…相同优先级时按棋子上>右>下>左"; a 棋子 deals its damage as
// itself, a 跟子 as 望. 料敌机先 备注: the RES ignore is the source's 法术穿透 for that damage. S1 备注 "棋子持有库存达到上限的情况下
// 具有阻回 / 法术伤害效果可独立叠加生效(每个效果会独立记录触发棋子的第二天赋层数)…可对空 / …由望依自身属性预计算伤害后、以无来源
// 的形式施加给目标". S2 备注 "若相连棋子/跟子在上下侧则激活垂直效果范围(自身及上下3格),左右侧则激活水平效果范围…效果范围不因相连
// 棋子/跟子消失而取消激活 / 移动速度降低为直接乘算,可无限叠加,每层独立计时(但移动速度存在0.1数值下限)". S3 备注 "棋子与跟子的
// 攻击范围/触发范围为…,触发时对范围内所有敌方单位造成伤害(可对空) / 技能开启时自动“部署”的为第一天赋的跟子"), PRTS 棋子 (备注
// "技能伤害始终借用持有者的攻击力计算,但伤害来源于自身"), PRTS 分支特性信息 陷阱师 ("可对空 / “敌人已在”…地面行动敌人… / 干员离场
// 后,附属的陷阱随之消失"), PRTS 卫戍协议/帮助 §作战阶段 (placed summons deploy with the board "无视所属干员的持有状态,不消耗持有数量";
// "若召唤物在战斗期间退场,将在满足条件后立即原地再部署1个").
// - Trait (陷阱师): ranged physical arrows, 3-3, hits air units (PRTS 分支特性信息 "可对空"), blocks 1, ground-targetable.
// "陷阱无法放置于敌人已在的格子中": a 棋子 does not come back while a ground enemy stands on its tile (S3: inside her range it
// may). Module TRP-X "部署费用更低(-1)…可同时部署的陷阱数量提升(+1)": the 棋子 variant's cost 2 (the DP of its returns) and
// deploy limit 7 (the hand count — the match's); its attributes in the stats.
// - T1 铸子 (cnt / attack@max_spawn_cnt; "最多拥有7枚"): the 棋子 are hand pieces the player places; they deploy with the board
// for free and without using her stock (stock = cnt at the start, at most STOCK_CAP; the skills add to it). 棋子 / 跟子
// that touch on a side (上下 / 左右) activate each other and stay active once activated [ASSUMED from the S2 备注]; an
// enemy (air units too) on an active one's tile sets it off: its effect, then it is used up (a 棋子 leaves the field; a
// 跟子 is gone) [ASSUMED: a trap is spent by its trigger]. A spent 棋子 comes back on its tile ("原地再部署") after its
// redeploy time (2 s), paying its cost, while 望 is on the field — its own card returns to the stock as it leaves, so the
// stock does not change [ASSUMED]. That return is the mode's deployment of her card: it counts as a 手动部署 for 铸子 —
// one 跟子 on a tile next to it (the PRTS order above), at most attack@max_spawn_cnt on the field [ASSUMED: the battle-start
// deployment does not count]. When 望 leaves the field her 棋子 and 跟子 vanish (PRTS 分支特性信息); the 棋子 come back
// with her.
// - T2 料敌机先 (attack@per_atk_scale / attack@per_magic_resist_penetrate_fixed / attack@max_trigger_cnt): an active 棋子 / 跟子
// gets one stack per piece of the unbroken line it is part of (itself included; the longer of its lines; ≤ the cap),
// kept once reached [ASSUMED]; its damage ×(1 + n × per) and n × pen RES ignored. TRP-X stage 3: 13 % / 12.
// - S1 取势 (AUTO): passive — a triggered piece puts 停顿 attack@sluggish s on the enemy that set it off and a 法术 DoT of
// attack@atk_scale × her ATK every second for attack@sluggish s (precomputed at the trigger with the piece's stacks and
// her damage multipliers; 无来源, credited to her; each one independent). Active — "立即获得两枚棋子": +cnt stock (≤ the
// cap); with the stock full she holds 阻回. An AUTO skill acting on nobody fires at full SP (`trigger: 'SP_FULL'`, the
// owner's AUTO rule).
// - S2 连星 (AUTO, SP_FULL): passive — a triggered piece deals attack@atk_scale × her ATK arts to every enemy on its active
// lines (its tile ± 3 along each side it was ever connected on; air units too) and a 直接乘算 slow attack@move_speed for
// attack@duration s, each one on its own timer, added up (speed ≥ 0.1). Active as S1.
// - S3 天下劫 (MANUAL, data ACTIVE_RANGE on its 4-12; ammo trigger_time): passive — the pieces' trigger and damage area is the
// token skill's range (x-6 in the data; PRTS writes x-1), atk_scale × her ATK arts on every enemy there. Active — no
// attacks, range 4-12; +cnt stock, the part over the cap placed at once as 跟子 on the enemies of her range first (her
// target order), then on other tiles of it by the 铸子 order [ASSUMED for the ties: nearest to her, then by tile]; a 棋子
// coming back inside her range during it drops up to 3 跟子, one bullet each ("第一天赋额外至多部署3枚棋子并消耗等量弹药");
// it ends when the bullets are spent ("棋子耗尽" [ASSUMED]); bullets left at another end return to the stock.
import { num, talentBb, skillRec, up } from '../shared/tier1.js';
import { absoluteRangeKeys, sortEnemyTargets } from '../../../targeting.js';
import { bodyOnTile } from '../../../body.js';
import { COLS, ROWS } from '../../../constants.js';
const S1 = 'skchr_wang_1';
const S2 = 'skchr_wang_2';
const S3 = 'skchr_wang_3';
export const STONE = 'token_10064_wang_stone1';
/** 铸子 "最多拥有7枚" (the 棋子's max deck stack at E2; the talent text). */
export const STOCK_CAP_FALLBACK = 7;
/** 料敌机先's stack cap when the data carries none. */
const T2_CAP_FALLBACK = 3;
/** 连星 "两侧3格" (the token blackboard's tile_count 6, both sides). */
const LINE_FALLBACK = 6;
/** The S3 token skill's range when the data carries none (range_table x-6). */
const X6 = Object.freeze([[2, 0], [1, 0], [0, -2], [0, -1], [0, 0], [0, 1], [0, 2], [-1, 0], [-2, 0]]);
/** 跟子 neighbours in the PRTS order 上 > 右 > 下 > 左 (UP = +row; the mirrored field swaps 右 / 左). */
const SIDES = Object.freeze([[1, 0], [0, 1], [-1, 0], [0, -1]]);
const SIDES_MIRRORED = Object.freeze([[1, 0], [0, -1], [-1, 0], [0, 1]]);
/** "额外至多部署3枚棋子" (S3, no blackboard key). */
const S3_EXTRA = 3;
/** Seconds between two tries of a spent 棋子 to come back. */
const RETRY = 0.25;
const SLOW_KEY = 'wang:slow';
const DOT_KEY = 'wang:qushi';
const TAG = 'wang:stone';
/** Profile the pieces select enemies with: air units too. */
const ANY = Object.freeze({ canHitFly: true });
const bbOf = (chess, id) => skillRec(chess, id)?.bb ?? {};
const keyOf = (r, c) => (r >= 0 && r < ROWS && c >= 0 && c < COLS ? r * COLS + c : -1);
/**
* The 跟子 placement class of a tile: 0 undeployable ground (walkable, nothing may be deployed there), 1 deployable
* ground, 2 deployable 高台; null where no 跟子 may go (outside the field, walls, flyer-only tiles that take nobody).
*/
function tileClass(battle, r, c) {
if (!battle.grid.inRect(r, c)) return null;
const t = battle.grid.tile(r, c);
if (t.build === 'NONE') return t.height === 'LOW' && t.pass === 'ALL' ? 0 : null;
if (t.height === 'LOW' && (t.build === 'ALL' || t.build === 'MELEE')) return 1;
if (t.build === 'RANGED' || t.build === 'ALL') return 2;
return null;
}
/**
* 连星's slow (PRTS 备注 "移动速度降低为直接乘算,可无限叠加,每层独立计时(但移动速度存在0.1数值下限)"): one buff per enemy holding
* every application (its value, its end); moveMul = max(0.1 ÷ base speed, 1 + Σ values).
*/
function addSlow(battle, src, e, value, duration) {
if (!e.alive || !(duration > 0) || !value) return;
const refresh = (unit, b) => {
const now = battle.time;
b.data.list = b.data.list.filter((x) => x.until > now + 1e-9);
if (!b.data.list.length) { battle.removeBuff(unit, b); return; }
const sum = b.data.list.reduce((a, x) => a + x.v, 0);
const floor = Math.min(1, 0.1 / Math.max(1e-6, unit.base.moveSpeed));
const mul = Math.max(floor, 1 + sum);
if (b.mods?.moveMul !== mul) { b.mods = { moveMul: mul }; unit.markDirty(); }
};
let b = e.findBuff(SLOW_KEY);
if (!b) b = battle.addBuff(e, { key: SLOW_KEY, source: src, tags: ['skill'], data: { list: [] }, mods: { moveMul: 1 }, onTick: ({ unit, buff }) => refresh(unit, buff) });
if (!b) return;
b.data.list.push({ v: value, until: battle.time + duration });
refresh(e, b);
}
export default {
char_2027_wang: (bb, chess) => {
const t0 = talentBb(chess, 0); // 铸子: cnt, attack@max_spawn_cnt
const t1 = talentBb(chess, 1); // 料敌机先 (TRP-X stage 2+: its change)
const t0desc = String((chess?.talents ?? []).find((t) => t && t.index === 0)?.desc ?? '');
const capText = /最多拥有(\d+)枚/.exec(t0desc);
const b1 = bbOf(chess, S1), b2 = bbOf(chess, S2), b3 = bbOf(chess, S3);
const s3 = skillRec(chess, S3);
const per = num(t1['attack@per_atk_scale']), pen = num(t1['attack@per_magic_resist_penetrate_fixed']);
const t2cap = Math.max(1, Math.floor(num(t1['attack@max_trigger_cnt'], T2_CAP_FALLBACK)));
const followCap = Math.max(0, Math.floor(num(t0['attack@max_spawn_cnt'])));
const stock0 = Math.max(0, Math.floor(num(t0.cnt)));
const stockCap = capText ? +capText[1] : STOCK_CAP_FALLBACK;
/** Every live piece of 望: her deployed 棋子 and her 跟子, in the order they came. */
const piecesOf = (battle, unit) => {
const out = [];
for (const a of battle.allyUnits) {
if (a.kind !== 'token' || a.defId !== STONE || a.ownerUnit !== unit || !a.alive || !a.deployed || !a.mem.wangNode) continue;
const n = a.mem.wangNode;
n.r = a.tileR; n.c = a.tileC; n.stone = a;
out.push(n);
}
for (const f of unit.mem.wang.followers) out.push(f);
return out.sort((a, b) => a.seq - b.seq);
};
const groundFoeOn = (battle, r, c) => battle.enemies.some((e) => e.alive && !e.hidden && !e.isFlying && bodyOnTile(e, r, c));
const anyFoeOn = (battle, r, c) => battle.enemies.some((e) => e.alive && !e.hidden && bodyOnTile(e, r, c));
/** Place a 跟子 on (r, c) (the caller checked the tile). */
const addFollower = (battle, unit, r, c) => {
const w = unit.mem.wang;
const f = { r, c, seq: ++w.seq, act: false, h: false, v: false, stacks: 0, follower: true };
w.followers.push(f);
battle.fx('summon', { x: c, y: r, id: unit.id, src: unit.id, token: STONE, follower: true });
return f;
};
/** Tiles a 跟子 may take: in the field, a class, no character unit or knocked-out operator, no piece. */
const followerFree = (battle, unit, r, c, taken) => {
const k = keyOf(r, c);
return k >= 0 && !taken.has(k) && tileClass(battle, r, c) != null && !battle.unitAt(r, c) && !battle.downOn(r, c);
};
/** 铸子: up to `n` 跟子 next to (r, c) in the PRTS order; returns how many were placed. */
const dropFollowers = (battle, unit, r, c, n) => {
const w = unit.mem.wang;
let placed = 0;
for (let i = 0; i < n && w.followers.length < followCap; i++) {
const taken = new Set(piecesOf(battle, unit).map((p) => keyOf(p.r, p.c)));
const sides = battle.getPlayer(unit.ownerId)?.mirror ? SIDES_MIRRORED : SIDES;
const cands = [];
sides.forEach(([dr, dc], idx) => {
const rr = r + dr, cc = c + dc;
if (!followerFree(battle, unit, rr, cc, taken)) return;
cands.push({ rr, cc, rank: [anyFoeOn(battle, rr, cc) ? 0 : 1, tileClass(battle, rr, cc), idx] });
});
if (!cands.length) break;
cands.sort((a, b) => a.rank[0] - b.rank[0] || a.rank[1] - b.rank[1] || a.rank[2] - b.rank[2]);
addFollower(battle, unit, cands[0].rr, cands[0].cc);
placed++;
}
return placed;
};
/** S3 bullets: spend `n` (the skill ends with the last). */
const spendAmmo = (battle, unit, n) => {
const sk = unit.skill, w = unit.mem.wang;
if (!sk || sk.id !== S3 || !sk.active || !(n > 0)) return;
w.ammo = Math.max(0, w.ammo - n);
sk.ammoLeft = w.ammo;
if (battle.hasHook('ammoUsed')) battle.emit('ammoUsed', { unit, left: w.ammo, skill: sk });
if (w.ammo <= 0) sk.end('ammo');
};
const inHerRange = (unit, r, c) => !!unit.rangeKeySet?.has(keyOf(r, c));
/** A spent 棋子 comes back on its tile ("原地再部署"); its return drops the 铸子 跟子. */
const scheduleReturn = (battle, unit, stone) => {
const at = battle.time + Math.max(0, num(stone.base.respawnTime));
battle.every(RETRY, (b, sched) => {
if (stone.alive || stone.removed || b.finished) { sched.cancel(); return; }
if (b.time + 1e-9 < at || !up(unit)) return;
const r = stone.homeR, c = stone.homeC;
const s3on = unit.skill?.id === S3 && unit.skill.active && inHerRange(unit, r, c);
if (groundFoeOn(b, r, c) && !s3on) return; // "陷阱无法放置于敌人已在的格子中"
// (a 跟子 on its tile goes: "跟子所在格进行部署…时,该跟子会随之消失")
const w = unit.mem.wang;
const before = w.followers.length;
w.followers = w.followers.filter((f) => f.r !== r || f.c !== c);
if (!b.redeploy(stone, { free: false })) { if (w.followers.length !== before) b.fx('disappear', { x: c, y: r, id: unit.id }); return; }
sched.cancel();
if (s3on) spendAmmo(b, unit, dropFollowers(b, unit, r, c, Math.min(S3_EXTRA, w.ammo)));
else dropFollowers(b, unit, r, c, 1);
}, { owner: unit });
};
/** The 棋子's kit: no attack, untargetable, its node data per deployment, its return when spent. */
const stoneKit = (owner) => ({
skill: null,
trait: { noAttack: true },
install(battle, unit) {
// [ASSUMED] a trap: no enemy selects it
battle.addBuff(unit, { key: 'trait:wangStone', flags: { untargetable: true }, persist: true, allowDead: true });
battle.on('deploy', (ctx) => {
if (ctx.unit !== unit) return;
unit.mem.wangNode = { seq: ++owner.mem.wang.seq, act: false, h: false, v: false, stacks: 0 };
}, { owner: unit });
battle.on('death', (ctx) => {
if (ctx.unit !== unit || battle.finished) return;
unit.removed = false; // the piece is kept (Battle.redeploy accepts it; its hooks stay)
unit.mem.wangNode = null;
scheduleReturn(battle, owner, unit);
}, { owner: unit, priority: -10 });
},
});
return {
skills: {
[S1]: {
kind: 'instant', trigger: { rule: 'SP_FULL' },
onStart({ unit }) { const w = unit.mem.wang; w.stock = Math.min(stockCap, w.stock + Math.max(0, Math.floor(num(b1.cnt)))); },
},
[S2]: {
kind: 'instant', trigger: { rule: 'SP_FULL' },
onStart({ unit }) { const w = unit.mem.wang; w.stock = Math.min(stockCap, w.stock + Math.max(0, Math.floor(num(b2.cnt)))); },
},
[S3]: {
kind: 'ammo',
ammo: Math.max(1, Math.floor(num(b3.trigger_time, 20))),
targeting: { rangeGrid: s3?.rangeGrid ?? null },
attack: { noAttack: true },
onStart({ battle, unit, skill }) {
const w = unit.mem.wang;
w.ammo = skill.ammoLeft;
const total = w.stock + Math.max(0, Math.floor(num(b3.cnt)));
const over = Math.max(0, total - stockCap);
w.stock = Math.min(stockCap, total);
// "将超出上限的棋子优先部署在范围内敌人所在位置": enemies of her (4-12) range first, then other tiles of it
let n = Math.min(over, followCap - w.followers.length);
if (!(n > 0)) return;
const taken = new Set(piecesOf(battle, unit).map((p) => keyOf(p.r, p.c)));
const foes = sortEnemyTargets(battle, unit, battle.enemiesInKeys(unit.rangeKeys, unit, ANY), unit.profile?.priority ?? null);
for (const e of foes) {
if (n <= 0) break;
const r = Math.round(e.y), c = Math.round(e.x);
if (!followerFree(battle, unit, r, c, taken)) continue;
taken.add(keyOf(r, c));
addFollower(battle, unit, r, c);
n--;
}
if (n <= 0) return;
const rest = [];
for (const k of unit.rangeKeys ?? []) {
const r = Math.floor(k / COLS), c = k % COLS;
if (!followerFree(battle, unit, r, c, taken)) continue;
rest.push({ r, c, k, cls: tileClass(battle, r, c), d: Math.max(Math.abs(r - unit.tileR), Math.abs(c - unit.tileC)) });
}
rest.sort((a, b) => a.cls - b.cls || a.d - b.d || a.k - b.k);
for (const t of rest.slice(0, n)) addFollower(battle, unit, t.r, t.c);
},
onEnd({ unit, reason }) {
const w = unit.mem.wang;
if (reason !== 'ammo' && w.ammo > 0) w.stock = Math.min(stockCap, w.stock + w.ammo); // "剩余的弹药返还为棋子"
w.ammo = 0;
},
},
},
talents: [
// 铸子 (and the 棋子's own kit): her 棋子 pieces run the stone kit — set up here, before the battle starts
{ install(battle, unit) {
unit.mem.wang = { stock: stock0, followers: [], seq: 0, ammo: 0 };
for (const t of battle.allyUnits) {
if (t.kind !== 'token' || t.defId !== STONE || t.ownerUnit !== unit || t.alive || t.deployed) continue;
if (t.kit) battle.offOwner(t);
battle._setupUnit(t, stoneKit(unit));
}
} },
{ install() {} }, // 料敌机先 — the pieces' stacks (kit install)
],
install(battle, unit) {
const sid = unit.skill?.id;
const tok = battle.tokenDef(STONE, unit);
const tbb = tok?.skill?.bb ?? {};
const line = Math.max(0, Math.floor(num(tbb.tile_count, LINE_FALLBACK) / 2));
const trigGrid = sid === S3 ? (tok?.skill?.rangeGrid ?? X6) : null;
/** Trigger / damage tiles of a piece: its own tile, or S3's area around it. */
const trigKeys = (n) => (trigGrid ? absoluteRangeKeys(trigGrid, n.r, n.c, 'RIGHT', 0) : [keyOf(n.r, n.c)].filter((k) => k >= 0));
/** 连星's lines of a piece: its tile ± `line` along each side it was connected on. */
const lineKeys = (n) => {
const out = new Set();
for (let k = -line; k <= line; k++) {
if (n.h) { const x = keyOf(n.r, n.c + k); if (x >= 0) out.add(x); }
if (n.v) { const x = keyOf(n.r + k, n.c); if (x >= 0) out.add(x); }
}
return [...out];
};
const hitOpts = (n) => ({ type: 'arts', isSkill: true, mul: 1 + per * n.stacks, resIgnoreFlat: pen * n.stacks, tags: ['skill', TAG] });
/** A piece sets off: its effect (the picked skill's passive) on `foes` (the enemies of its trigger tiles). */
const fire = (n, foes) => {
const src = n.stone ?? unit;
battle.fx('explode', { x: n.c, y: n.r, r: trigGrid ? 2 : 0.5, id: src.id, src: unit.id, dmgType: 'arts', skill: sid === S3 ? 'wang_3' : sid === S2 ? 'wang_2' : 'wang_1' });
if (sid === S1) {
const e = sortEnemyTargets(battle, src, foes.slice(), null)[0];
if (!e) return;
const dur = num(b1['attack@sluggish']);
battle.applyStatus(e, 'sluggish', { duration: dur, source: unit });
// precomputed by 望 at the trigger (her ATK and damage multipliers, the piece's stacks), dealt as 无来源
const s = unit.s;
const amount = s.atk * num(b1['attack@atk_scale']) * (1 + per * n.stacks) * s.dmgDealtMul * s.artsDealtMul;
const rif = pen * n.stacks + s.resIgnoreFlat, rip = s.resIgnorePct;
if (amount > 0 && dur > 0) {
battle.addBuff(e, {
key: DOT_KEY, refresh: 'independent', maxStacks: 999, duration: dur, interval: 1, source: unit, tags: ['skill', 'dot'],
onTick: ({ unit: t }) => { if (t.alive) battle.dealDamage(unit, t, { amount, type: 'arts', canDodge: false, isSkill: true, sourceless: true, resIgnoreFlat: rif, resIgnorePct: rip, tags: ['skill', 'dot', DOT_KEY] }); },
});
}
return;
}
const victims = sid === S2 ? battle.enemiesInKeys(lineKeys(n), src, ANY) : foes;
const scale = sid === S2 ? num(b2['attack@atk_scale']) : num(b3.atk_scale);
for (const e of victims) {
if (!e.alive) continue;
battle.dealDamage(src, e, { amount: unit.s.atk * scale, ...hitOpts(n) });
if (sid === S2 && e.alive) addSlow(battle, unit, e, num(b2['attack@move_speed']), num(b2['attack@duration']));
}
};
/** The piece is spent: a 棋子 leaves the field (it comes back on its own), a 跟子 is gone. */
const spend = (n) => {
n.gone = true;
if (n.stone) { if (n.stone.alive) battle.retreat(n.stone, { reason: 'expired', permanent: true }); return; }
const w = unit.mem.wang;
w.followers = w.followers.filter((f) => f !== n);
};
battle.on('tick', () => {
if (!up(unit) || battle.finished) return;
const nodes = piecesOf(battle, unit);
if (!nodes.length) return;
const at = new Map(nodes.map((n) => [keyOf(n.r, n.c), n]));
for (const n of nodes) { // 棋子相连时相互激活 (kept once active)
for (const [dr, dc] of SIDES) {
const k = keyOf(n.r + dr, n.c + dc);
if (k < 0 || !at.has(k)) continue;
n.act = true;
if (dr) n.v = true; else n.h = true;
}
}
if (per > 0 || pen > 0) {
for (const n of nodes) { // 料敌机先: one stack per piece of its unbroken line (≤ the cap)
if (!n.act) continue;
for (const [dr, dc] of [[0, 1], [1, 0]]) {
let run = 1; // (keyOf is −1 off the stage: never a piece)
for (let k = 1; at.has(keyOf(n.r + dr * k, n.c + dc * k)); k++) run++;
for (let k = 1; at.has(keyOf(n.r - dr * k, n.c - dc * k)); k++) run++;
if (run >= 2) n.stacks = Math.max(n.stacks, Math.min(t2cap, run));
}
}
}
for (const n of nodes) {
if (!n.act || n.gone) continue;
const src = n.stone ?? unit;
const foes = battle.enemiesInKeys(trigKeys(n), src, ANY);
if (!foes.length) continue;
fire(n, foes);
spend(n);
}
}, { owner: unit });
// 阻回 while the stock is full (S1 / S2 备注)
if (sid === S1 || sid === S2) {
battle.on('tick', () => {
const want = up(unit) && unit.mem.wang.stock >= stockCap;
const has = unit.findBuff('wang:stockFull');
if (want && !has) battle.addBuff(unit, { key: 'wang:stockFull', flags: { noSp: true }, tags: ['skill'] });
else if (!want && has) battle.removeBuff(unit, 'wang:stockFull');
}, { owner: unit });
}
// "干员离场后,附属的陷阱随之消失": her 棋子 leave (and come back with her), her 跟子 are gone
battle.on('death', (ctx) => {
if (ctx.unit !== unit || battle.finished) return;
unit.mem.wang.followers = [];
for (const a of battle.allyUnits) {
if (a.kind === 'token' && a.defId === STONE && a.ownerUnit === unit && a.alive) battle.retreat(a, { reason: 'expired', permanent: true });
}
}, { owner: unit });
},
};
},
};
+299
View File
@@ -0,0 +1,299 @@
// server/sim/content/kits/ops/op-weedy.js — 温蒂 (char_400_weedy) 自选 operator kit: 6★ 推击手 (特种), an owned-6★ pick of the
// tier-5 and tier-6 自选 slots; every skill, both talents, the trait, both modules (PUS-X 仿生海龙改型, PUS-Y 新型仿生原型) at
// every form, and the kit of her summon 工程蓄水炮 (token_10009_weedy_cannon). Kit contract and the 自选 rules: ../README.md
// ("How to add an operator (自选)").
//
// Forms (data/backups.json units.char_400_weedy, the DIY slot statuses): normal = E2 Lv1, skills at rank 4, no module;
// elite = E2 Lv60, rank 7, the picked module at stage 1 (tier 5) or 3 (tier 6). Potential 0 [ASSUMED: no account].
// Sources: character_table / skill_table / battle_equip_table / token_table (zh_CN, as built into backups.json; the cannon's
// owner-form / module variants) and PRTS 温蒂 (蓄水炮强化 备注 "天赋文本后半段效果(及模组效果)的作用对象为温蒂自身"; S2 "攻击间隔增大
// (+220%)", 备注 "溅射范围为0.9半径"; S3 备注 "蓄水炮以温蒂的攻击力进行发射…技能范围内没有敌人时温蒂/蓄水炮不会对应发射出液氮炮 /
// 自身优先攻击剩余路径最短的敌人,水炮优先攻击距离自身最近的敌人;液氮炮溅射范围半径1.2,均可对空 / “正比于距离的真实伤害”即…
// 移动创伤(1200伤害/格),再次施加…时仅刷新BUFF的持续时间,不改变真实伤害的来源与每格伤害比例"), PRTS 工程蓄水炮 (备注 "持有禁疗 /
// 蓄水炮的技能和攻击均优先选择离自身最近的敌人作为目标 / 普通攻击…该位移效果仅对前方三格内的地面敌方单位生效 / 部署后20秒自动撤退";
// 技能备注 "蓄水炮进行的发射除基本力度外均以本体的数值为准"), PRTS 特殊机制 移动创伤 (every 0.066 s and once at the end: (distance
// moved since the last update) × 每格伤害 预计算的真实持续伤害, nothing when the difference is > 4 tiles), PRTS 卫戍协议/帮助 (a
// placed summon deploys with the board; "若召唤物在战斗期间退场,将在满足条件后立即原地再部署1个"; a summon's manual skill is
// force-opened).
// - Trait (推击手) "同时攻击阻挡的所有敌人 / 可以放置于远程位": the profession default (pusher `hitAllBlocked`, block 2; melee,
// ground-only — PRTS 分支特性信息 推击手) and the placement rule of the prep (shared/highGround.js: her trait line lets the
// match put her on a 高台, where she attacks and blocks nothing). Module PUS-X "可以放置于远程位,并返还该次部署费用的一半"
// (trait bb value): a redeployment on a ranged (高台) tile gives value × her cost back (as 见行者's PUS-X; the battle-start
// deployment costs nothing). Module PUS-Y "阻挡2个及以上敌人时自身推力增加一级" (trait bb cnt / base_force_level): her
// pushes +base_force_level while she blocks ≥ cnt enemies.
// - T1 工程蓄水炮 (the cannon, a hand piece the player places — "部署位置=全部位"): deploys with the board, leaves 20 s after
// each deployment (its talent `duration`) and comes back on its tile after its redeploy time (35 s; PUS-Y stage 3 "再部署
// 时间减少8秒": the module variant's 27 s), paying its 5 DP, while she is on the field [ASSUMED, as 鸿雪's 打字机]. The
// cannon: untargetable ("不会受到攻击"), 禁疗, blocks nothing, 3-2 range, ranged physical, hits air, the nearest enemy to
// itself first; each attack pushes its target 小力 + 蓄水炮强化's base_force_level along its facing — a ground enemy on the
// three tiles ahead only. Its skill (the copy of S3 the data gives, sktok_weedy_token, MANUAL, 0 SP) is force-opened by the
// 卫戍 strategy: free, once per deployment, by the data's DEFAULT (cast on its attack) — and it fires with every S3 of hers
// while it stands on one of the 4 tiles around her. It fires with her numbers (her ATK, her S3 level; the damage counts
// as hers [ASSUMED: "均以本体的数值为准"]) but its own force (+1 by 蓄水炮强化).
// - T2 蓄水炮强化 (the cannon's talent, x-5): while the cannon stands on one of the 4 tiles around her she gains `sp` SP every
// `interval` s of it (3 s; PUS-X stage 2+: 2.5 / 2 s — the module's token variant) [ASSUMED: the clock runs while it is
// there] and, PUS-X stage 2+, ATK +atk (the module's hidden token talent, 15 % / 20 %; PRTS 备注: on 温蒂 herself).
// - S1 炮管敲击 (AUTO, data DEFAULT — a "next attack"): that attack (every enemy she blocks) at atk_scale × ATK, each target
// pushed along her facing with `force` (中力) and 晕眩 `stun` s.
// - S2 水炮模式 (AUTO, 持续时间无限; SP_FULL — a mode switch on herself, the owner's AUTO rule): attack interval ×(1 +
// base_attack_time) (PRTS lists it as a ratio, "+220%"), ATK +atk, range +ability_range_forward_extend, a ranged attack
// — one shot with a 0.9-tile splash (PRTS 备注), air units too [ASSUMED: a ranged attack reaches air] — every enemy it hits
// pushed with base_force_level (小力) along her facing.
// - S3 液氮大炮 (MANUAL, data SKILL_RANGE on its 4-1): at once, the enemy of the 4-1 with the shortest remaining path and
// every enemy within 1.2 of it (air units too) take atk_scale × ATK arts, the 移动创伤 (`value` × `dist` per tile moved,
// true damage, `duration` s) and a push of `force` along her facing; the cannon fires too (above). The shot is instant
// [ASSUMED: no travel time]. Pushes go along her facing (knockback[dir], as every 推击手 push) [ASSUMED for S2 / S3,
// whose text gives no direction].
import { num, traitBb, skillRec, up, giveSp } from '../shared/tier1.js';
import { absoluteRangeKeys } from '../../../targeting.js';
import { COLS } from '../../../constants.js';
const S1 = 'skchr_weedy_1';
const S2 = 'skchr_weedy_2';
const S3 = 'skchr_weedy_3';
export const CANNON = 'token_10009_weedy_cannon';
/** S3's / the cannon skill's 4-1 when the data carries no grid. */
const GRID_4_1 = Object.freeze([[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]]);
/** PRTS S3 备注 "液氮炮溅射范围半径1.2". */
export const NITRO_SPLASH = 1.2;
/** PRTS S2 备注 "溅射范围为0.9半径". */
export const WATER_SPLASH = 0.9;
/** The 移动创伤 buff on an enemy (one per enemy whoever applies it — PRTS: a new one only refreshes its duration). */
export const RUPTURE_KEY = 'weedy:rupture';
/** PRTS 特殊机制 移动创伤: an update whose distance difference is above this deals nothing. */
const RUPTURE_MAX_STEP = 4;
/** 工程蓄水炮's life when the token carries no `duration` talent (E2: 20 s). */
const LIFE_FALLBACK = 20;
/** Seconds between two tries of a cannon to come back (tile busy, DP short, 温蒂 off the field). */
const RETRY = 0.25;
const TAG_NITRO = 'weedy:nitro';
const bbOf = (chess, id) => skillRec(chess, id)?.bb ?? {};
/** First talent of a normalised token def whose blackboard holds `key` (token talents keep no index). */
const tokTalent = (def, key, not = null) => (def?.talents ?? []).find((t) => t && t.bb && t.bb[key] != null && (not == null || t.bb[not] == null)) ?? null;
/** Push direction along a unit's facing (knockback[dir]). */
const along = (u) => ({ x: u.fwd[1], y: u.fwd[0] });
/** On one of the 4 tiles around (周围4格). */
const beside = (a, b) => Math.abs(a.tileR - b.tileR) + Math.abs(a.tileC - b.tileC) === 1;
/**
* 移动创伤 (PRTS 特殊机制) on enemy `e`: for `duration` s every `interval` s — and once more at the end — the distance it
* moved since the last update × `perTile` as true 持续伤害 from `src` (none when that difference is > 4 tiles). A new
* application while one runs only refreshes its duration: the source and the per-tile damage stay the first one's.
*/
export function rupture(battle, src, e, { duration, perTile, interval }) {
if (!e || !e.alive || !(duration > 0) || !(perTile > 0)) return;
const cur = e.findBuff(RUPTURE_KEY);
if (cur) {
cur.timeLeft = Math.max(cur.timeLeft, duration);
cur.duration = Math.max(cur.duration, duration);
return;
}
const st = { x: e.x, y: e.y, moved: 0, acc: 0 };
const step = (u) => { st.moved += Math.hypot(u.x - st.x, u.y - st.y); st.x = u.x; st.y = u.y; };
const flush = (u) => {
const m = st.moved;
st.moved = 0;
if (!(m > 1e-9) || m > RUPTURE_MAX_STEP || !u.alive) return;
battle.dealDamage(src, u, { amount: m * perTile, type: 'true', canDodge: false, isSkill: true, tags: ['skill', 'dot', RUPTURE_KEY] });
};
const iv = interval > 0 ? interval : 0.066;
battle.addBuff(e, {
key: RUPTURE_KEY, duration, source: src, tags: ['skill'], data: st,
onTick: ({ unit, dt }) => {
step(unit);
st.acc += dt;
if (st.acc + 1e-9 >= iv) { st.acc -= iv; flush(unit); }
},
onExpire: ({ unit }) => { step(unit); flush(unit); },
});
}
/**
* One 液氮炮 of `shooter` (温蒂 or her cannon): the target of the skill range (`grid`, the shooter's facing) — `pick`
* 'path' = the shortest remaining path (温蒂), 'nearest' = nearest to the shooter (the cannon) — and every enemy within
* NITRO_SPLASH of it: atk_scale × 温蒂's ATK arts from `src`, the 移动创伤, a push of `force` along the shooter's facing.
* Returns false when no enemy can be selected there (nothing fires).
*/
export function liquidNitrogen(battle, { shooter, src, atk, sbb, grid, force, pick }) {
const keys = absoluteRangeKeys(grid ?? GRID_4_1, shooter.tileR, shooter.tileC, shooter.dir, 0);
const cands = battle.enemiesInKeys(keys, shooter, { canHitFly: true });
if (!cands.length) return false;
const key = pick === 'nearest' ? (e) => Math.hypot(e.x - shooter.x, e.y - shooter.y) : (e) => battle.remainingDistance(e);
let target = null, best = Infinity;
for (const e of cands) {
const v = key(e);
if (v < best - 1e-9 || (Math.abs(v - best) <= 1e-9 && target && e.spawnSeq < target.spawnSeq)) { best = v; target = e; }
}
const x = target.x, y = target.y;
battle.fx('frostNova', { x, y, r: NITRO_SPLASH, id: shooter.id, src: shooter.id, target: target.id, dmgType: 'arts', skill: 'weedy_3' });
const amount = atk * num(sbb.atk_scale, 1);
const rup = { duration: num(sbb.duration), perTile: num(sbb.value) * num(sbb.dist, 1), interval: num(sbb.interval, 0.066) };
const dir = along(shooter);
for (const e of battle.foesInRadius(x, y, NITRO_SPLASH, true)) {
if (!e.alive) continue;
battle.dealDamage(src, e, { amount, type: 'arts', isSkill: true, tags: ['skill', TAG_NITRO] });
if (!e.alive) continue;
rupture(battle, src, e, rup); // before the push: the push's displacement counts
battle.push(e, force, { from: shooter, dir });
}
return true;
}
/** 温蒂's deployed cannons. */
const cannonsOf = (battle, unit) => battle.allyUnits.filter((a) => a.kind === 'token' && a.defId === CANNON && a.ownerUnit === unit && a.alive && a.deployed);
/** The cannon's kit: its attack push, its skill, 蓄水炮强化 on 温蒂, its life and its redeploys. `owner` = 温蒂. */
function cannonKit(t, owner) {
const def = t.def;
const life = num(tokTalent(def, 'duration')?.bb?.duration, LIFE_FALLBACK);
const boost = tokTalent(def, 'base_force_level')?.bb ?? {}; // 蓄水炮强化: base_force_level, interval, sp
const forceUp = num(boost.base_force_level);
const every = num(boost.interval), sp = num(boost.sp);
const atkUp = num(tokTalent(def, 'atk', 'base_force_level')?.bb?.atk); // PUS-X stage 2+: 温蒂 ATK +atk beside it
const sk = def.skill ?? null;
const sbb = sk?.bb ?? {};
const AHEAD = [[0, 1], [0, 2], [0, 3]];
return {
skill: sk ? {
kind: 'instant',
onStart({ battle, unit }) {
liquidNitrogen(battle, { shooter: unit, src: owner, atk: owner.s.atk, sbb, grid: sk.rangeGrid ?? GRID_4_1, force: num(sbb.force) + forceUp, pick: 'nearest' });
},
} : null,
trait: {
priority: 'nearest',
// "能攻击单个敌人并将其小力度地推开,该位移效果仅对前方三格内的地面敌方单位生效"
afterHit(battle, unit, target) {
if (!target || !target.alive || target.side !== 'enemy' || target.isFlying) return;
const ahead = new Set(absoluteRangeKeys(AHEAD, unit.tileR, unit.tileC, unit.dir, 0));
if (!ahead.has(Math.round(target.y) * COLS + Math.round(target.x))) return;
battle.push(target, forceUp, { from: unit, dir: along(unit) });
},
},
install(battle, unit) {
battle.addBuff(unit, { key: 'trait:weedyCannon', flags: { noHeal: true }, persist: true, allowDead: true }); // 持有禁疗
// 部署后20秒自动撤退
battle.on('deploy', (ctx) => {
if (ctx.unit !== unit || !(life > 0)) return;
const seq = unit.deploySeq;
battle.after(life, () => { if (unit.alive && unit.deploySeq === seq) battle.retreat(unit, { reason: 'expired', permanent: true }); }, { owner: unit });
}, { owner: unit });
// back on its tile after its redeploy time, paying its cost, while 温蒂 is on the field (the piece is kept)
battle.on('death', (ctx) => {
if (ctx.unit !== unit || battle.finished) return;
unit.removed = false;
const at = battle.time + Math.max(0, num(unit.base.respawnTime));
battle.every(RETRY, (b, sched) => {
if (unit.alive || unit.removed) { sched.cancel(); return; }
if (b.time + 1e-9 < at || !up(owner)) return;
if (b.redeploy(unit, { free: false })) sched.cancel();
}, { owner: unit });
}, { owner: unit, priority: -10 });
// 蓄水炮强化 on 温蒂: +sp SP every `interval` s beside her; PUS-X stage 2+: her ATK +atk meanwhile
let acc = 0;
const atkKey = `talent:weedy:cannonAtk:${unit.id}`;
battle.on('tick', ({ dt }) => {
const on = up(unit) && up(owner) && beside(unit, owner);
if (!on) {
acc = 0;
if (atkUp && owner.findBuff(atkKey)) battle.removeBuff(owner, atkKey);
return;
}
if (atkUp && !owner.findBuff(atkKey)) battle.addBuff(owner, { key: atkKey, mods: { atkPct: atkUp }, source: unit, tags: ['talent'] });
if (!(every > 0) || !(sp > 0)) return;
acc += dt;
while (acc + 1e-9 >= every) { acc -= every; giveSp(owner, sp); }
}, { owner: unit });
},
};
}
export default {
char_400_weedy: (bb, chess) => {
const tb = traitBb(chess); // PUS-X: value; PUS-Y: cnt / base_force_level
const b1 = bbOf(chess, S1), b2 = bbOf(chess, S2), b3 = bbOf(chess, S3);
const s3 = skillRec(chess, S3);
const blockCnt = num(tb.cnt), blockForce = num(tb.base_force_level);
/**
* PUS-Y: +base_force_level while she blocks ≥ cnt enemies — counted when the attack starts (`weedyBlocked`, set at
* `beforeAttack`: the first push of an attack frees an enemy before the second is pushed) or when S3 is cast.
*/
const bonus = (u, n = u.mem.weedyBlocked ?? u.blocking.length) => (blockForce && blockCnt > 0 && n >= blockCnt ? blockForce : 0);
return {
skills: {
[S1]: {
kind: 'instant',
attack: {
atkScale: num(b1.atk_scale, 1),
onHit({ battle, unit, target }) {
if (!target || !target.alive || target.side !== 'enemy') return;
battle.applyStatus(target, 'stun', { duration: num(b1.stun), source: unit });
battle.push(target, num(b1.force) + bonus(unit), { from: unit, dir: along(unit) });
},
},
},
[S2]: {
kind: 'toggle',
trigger: { rule: 'SP_FULL' },
mods: { atkPct: num(b2.atk), batPct: num(b2.base_attack_time) },
targeting: { rangeExtend: num(b2.ability_range_forward_extend) },
attack: {
attack: 'ranged', projectile: 'bomb', splashRadius: WATER_SPLASH, canHitFly: true, hitAllBlocked: false, maxTargets: 1,
// every enemy the shot hits is pushed once the hit is resolved (a push of the main target inside the hit would
// move the splash centre: ai.js resolveHit centres it on the target after the main hit's callbacks)
onEachHit({ unit, target }) {
if (target && target.side === 'enemy') (unit.mem.weedyWet ??= []).push(target);
},
onHit({ battle, unit }) {
const list = unit.mem.weedyWet ?? [];
unit.mem.weedyWet = [];
const f = num(b2.base_force_level) + bonus(unit);
for (const e of list) if (e.alive) battle.push(e, f, { from: unit, dir: along(unit) });
},
},
},
[S3]: {
kind: 'instant',
onStart({ battle, unit }) {
liquidNitrogen(battle, { shooter: unit, src: unit, atk: unit.s.atk, sbb: b3, grid: s3?.rangeGrid ?? GRID_4_1, force: num(b3.force) + bonus(unit, unit.blocking.length), pick: 'path' });
// "如果蓄水炮在周围4格内的话也会同样进行发射" (its own skill numbers and force, her ATK)
for (const c of cannonsOf(battle, unit)) {
if (!beside(c, unit)) continue;
const cs = c.def.skill ?? null;
const cbb = cs?.bb ?? b3;
const up1 = num(tokTalent(c.def, 'base_force_level')?.bb?.base_force_level);
liquidNitrogen(battle, { shooter: c, src: unit, atk: unit.s.atk, sbb: cbb, grid: cs?.rangeGrid ?? GRID_4_1, force: num(cbb.force) + up1, pick: 'nearest' });
}
},
},
},
talents: [
// 工程蓄水炮 (and 蓄水炮强化, the cannon's own talent): her cannon pieces run the cannon's kit — set up here, before the
// battle starts (Battle._setupUnit with a kit, as op-bgsnow.js does for its 打字机)
{ install(battle, unit) {
for (const t of battle.allyUnits) {
if (t.kind !== 'token' || t.defId !== CANNON || t.ownerUnit !== unit || t.alive || t.deployed) continue;
if (t.kit) battle.offOwner(t);
battle._setupUnit(t, cannonKit(t, unit));
}
} },
{ install() {} }, // 蓄水炮强化 — the cannon's talent (cannonKit)
],
install(battle, unit) {
if (blockForce) battle.on('beforeAttack', (ctx) => { if (ctx.attacker === unit) unit.mem.weedyBlocked = unit.blocking.length; }, { owner: unit, priority: 100 });
// PUS-X: "可以放置于远程位,并返还该次部署费用的一半" — a redeployment on a ranged tile (unit.ground false)
const back = num(tb.value);
if (back > 0) {
battle.on('deploy', (ctx) => {
if (ctx.unit !== unit || ctx.initial || unit.ground) return;
const n = unit.base.cost * back;
battle.addDp(unit.ownerId, n);
battle.fx('dp', { x: unit.x, y: unit.y, n, id: unit.id });
}, { owner: unit });
}
},
};
},
};
+316
View File
@@ -0,0 +1,316 @@
// test/content/op_lmlee.test.js — the 自选 operator kit of 老鲤 (char_322_lmlee, 6★ 行商; kit
// server/sim/content/kits/ops/op-lmlee.js), fielded the production way (a DIY slot + its `diy` pick, simdata getDiy) in
// every form: tiers 5 / 6, normal (E2 Lv1, skill rank 4, no module) and elite (E2 Lv60, rank 7) with no module, MER-X
// “无问吉凶” or MER-Y “但思善恶” at stage 1 (tier 5) / 3 (tier 6). Every number is read back from data/backups.json; the
// fidelity checklist of kits/README.md item by item.
// Run: node --test test/content/op_lmlee.test.js
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { makeBattle, enemyRec, checkInvariants } from '../helpers/battleHarness.js';
import { KITTED_CHARS, OPERATOR_KITS, KITS } from '../../server/sim/content/kits/index.js';
import { diyPool, validateDiyPicks } from '../../shared/diy.js';
import { GUARD_KEY, MARK_RADIUS } from '../../server/sim/content/kits/ops/op-lmlee.js';
const load = (f) => JSON.parse(readFileSync(new URL(`../../data/${f}.json`, import.meta.url), 'utf8'));
const CHESS = load('chess');
const BACKUPS = load('backups');
const LEE = 'char_322_lmlee';
const FORMS = BACKUPS.units[LEE].forms;
const SLOT = { 5: 'chess_char_5_diy1_a', 6: 'chess_char_6_diy1_a' };
const X = 'uniequip_002_lmlee', Y = 'uniequip_003_lmlee';
const S1 = 'skchr_lmlee_1', S2 = 'skchr_lmlee_2', S3 = 'skchr_lmlee_3';
const formOf = (tier, elite) => FORMS[elite ? (tier === 5 ? '2/60/7/1' : '2/60/7/3') : '2/1/4/0'];
const skillOf = (tier, elite, id) => formOf(tier, elite).skills.find((s) => s.skillId === id);
const modOf = (tier, mod) => (mod ? formOf(tier, true).modules.find((m) => m.uniEquipId === mod) : null);
/** The talent `index` of a form with the picked module's change. */
const talentOf = (tier, elite, mod, index) => modOf(tier, elite ? mod : null)?.talentChanges.find((t) => t.talentIndex === index) ?? formOf(tier, elite).talents.find((t) => t.index === index);
const approx = (a, b, msg, eps = 1e-6) => assert.ok(Math.abs(a - b) <= eps * Math.max(1, Math.abs(b)), `${msg}: ${a} vs ${b}`);
const dummy = (key, o = {}) => enemyRec({ key, hp: 1e9, speed: 0, mass: 0, ...o });
const ENEMIES = {
enemy_dummy: dummy('enemy_dummy'),
enemy_fly: dummy('enemy_fly', { motion: 'FLY' }),
enemy_walk: enemyRec({ key: 'enemy_walk', hp: 1e9, speed: 0.6, mass: 0 }),
enemy_light: dummy('enemy_light', { hp: 1000 }),
enemy_gun: dummy('enemy_gun', { atk: 300, range: 5, bat: 1, dmgType: 'phys' }),
enemy_close: dummy('enemy_close', { atk: 300, range: 1.5, bat: 1, dmgType: 'phys' }),
};
const FORMS_ALL = [[5, false, null], [6, false, null], ...[5, 6].flatMap((t) => [null, X, Y].map((m) => [t, true, m]))];
/** A battle with 老鲤 as uid 1 at (row, col) facing RIGHT, plus `others`. */
function field({ tier = 5, elite = false, mod = null, skill = 0, row = 10, col = 5, others = [], seed = 5, dp = 0 } = {}) {
const h = makeBattle({
defs: { enemies: ENEMIES }, timeLimit: 900, autoFinish: false, seed,
flags: { dpPerSec: 0, dpMax: 999 }, hooks: ['damaged', 'skillStart', 'skillEnd', 'statusApplied', 'death', 'dodge', 'attack'], captureNoisy: true,
units: [{ uid: 1, diy: { slot: SLOT[tier], charId: LEE, skillIndex: skill, uniEquipId: mod }, elite, row, col }, ...others],
});
h.b.players[0].dp = dp;
h.step();
return { h, u: h.unit(1) };
}
function done(h) {
checkInvariants(h.b);
assert.equal(h.b.errors.length, 0, JSON.stringify(h.b.errors[0]));
}
const label = ([tier, elite, mod]) => `T${tier} ${elite ? 'elite' : 'normal'} ${mod ?? 'none'}`;
const from = (h, src) => h.hooksOf('damaged').filter((c) => c.source === src);
test('老鲤 in every 自选 form: his kit (all three skills authored), stats + module attributes, 1-1, blocks 1, melee physical ground-only, 行商, 炎, no 特质; S1 / S3 SP_FULL, S2 the data\'s DEFAULT', () => {
assert.equal(OPERATOR_KITS[LEE], KITS[LEE]);
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
for (const skill of [0, 1, 2]) {
const { h, u } = field({ tier, elite, mod, skill });
const form = formOf(tier, elite), m = elite ? modOf(tier, mod) : null;
assert.deepEqual([u.def.charId, u.def.diyFor, u.skill.id, !!u.kit.generic, u.kit.skillSource], [LEE, SLOT[tier], form.skills[skill].skillId, false, 'skills'], label(f));
assert.deepEqual([u.base.maxHp, u.base.atk, u.base.def], [form.stats.maxHp + (m?.attr.maxHp ?? 0), form.stats.atk + (m?.attr.atk ?? 0), form.stats.def + (m?.attr.def ?? 0)], `${label(f)}: stats`);
assert.deepEqual([u.s.blockCnt, u.profile.attack, u.profile.canHitFly, u.profile.dmgType, u.base.bat, u.profile.sub], [1, 'melee', false, 'phys', 1, 'merchant'], `${label(f)}: 行商`);
assert.deepEqual(u.liveRangeGrid, form.rangeGrid, `${label(f)}: 1-1`);
assert.deepEqual([u.def.bonds, u.def.raw.garrisonIds], [['yanShip'], []], `${label(f)}: bonds / 特质`);
assert.equal(u.skill.rule, skill === 1 ? form.skills[1].trigger.rule : 'SP_FULL', `${label(f)}: trigger`);
assert.ok(!u.s.flags.liftoff && !u.s.flags.camou && !u.s.flags.stealth, `${label(f)}: ground enemies target him`);
done(h);
}
}
assert.deepEqual(formOf(6, true).skills.map((s) => [s.skillType, s.trigger.rule]), [['AUTO', 'DEFAULT'], ['MANUAL', 'DEFAULT'], ['AUTO', 'DEFAULT']]);
assert.deepEqual([modOf(5, X).attr, modOf(6, X).attr, modOf(5, Y).attr, modOf(6, Y).attr], [{ maxHp: 200, atk: 55 }, { maxHp: 300, atk: 74 }, { atk: 57, def: 35 }, { atk: 76, def: 50 }]);
const data = { chess: CHESS, backups: BACKUPS };
for (const t of [5, 6]) assert.ok(diyPool(t, { data, kitted: KITTED_CHARS }).includes(LEE), `tier ${t}`);
assert.equal(validateDiyPicks({ [SLOT[6]]: { charId: LEE, skillIndex: 2, uniEquipId: Y } }, { data, kitted: KITTED_CHARS }).ok, true);
});
test('trait 行商: −3 DP every 3 s while he stands (MER-X: −2), he retreats when the DP runs short; MER-Y: ATK +4 % per payment, 5 stacks at most', () => {
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
const { h, u } = field({ tier, elite, mod, skill: 1, dp: 4 }); // (S2: no cast without an enemy, no ATK bonus)
const cost = elite && mod === X ? 2 : 3;
assert.deepEqual([u.profile.merchantInterval, u.profile.merchantCost], [3, cost], label(f));
h.b.players[0].dp = 100;
const t1 = talentOf(tier, elite, mod, 1);
const extra = Math.abs(t1.bb.extra_cost);
h.run(3.05); // first payment: 有备无患 takes |extra_cost| (DP ≥ it, no guard yet)
approx(h.b.players[0].dp, 100 - extra, `${label(f)}: first payment`);
h.run(3);
approx(h.b.players[0].dp, 100 - extra - cost, `${label(f)}: then the trait's cost`);
const y = elite && mod === Y;
const st = u.findBuff('trait:lmlee:merY');
assert.equal(st?.stacks ?? 0, y ? 2 : 0, `${label(f)}: MER-Y stacks`);
if (y) {
h.run(30);
assert.equal(u.findBuff('trait:lmlee:merY').stacks, 5, `${label(f)}: 5 at most`);
approx(u.s.atk, u.base.atk * (1 + 5 * 0.04), `${label(f)}: ATK +20 %`);
}
h.b.players[0].dp = cost - 0.5;
h.run(3.1);
assert.ok(!u.alive && !u.deployed, `${label(f)}: retreats when the DP runs short`);
done(h);
}
});
test('T1 和气生财: while he blocks one enemy alone in the 3 × 3 — his ASPD +28, its −28; a second enemy around ⇒ ±14; nothing while he blocks nobody (MER-Y stage 3: ±40 / ±20)', () => {
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
const { h, u } = field({ tier, elite, mod, skill: 0, row: 9, col: 5, dp: 999 });
const tb = talentOf(tier, elite, mod, 0).bb;
const self = tb['lmlee_t_1[self].attack_speed'], foe = tb['lmlee_t_1[enemy].attack_speed'];
assert.deepEqual([self, foe, tb.cnt], elite && tier === 6 && mod === Y ? [20, -20, 1] : [14, -14, 1], label(f));
h.run(0.5);
assert.equal(u.findBuff('talent:lmlee:self'), null, `${label(f)}: blocking nobody`);
const w = h.spawn('enemy_walk', { routeIndex: 0 });
assert.ok(h.runUntil(() => w.blockedBy === u, 30), `${label(f)}: the walker reaches him`);
h.step();
approx(u.s.aspd, 100 + 2 * self + (u.skill.active ? 0 : 0), `${label(f)}: ×2 alone`);
approx(w.s.aspd, 100 + 2 * foe, `${label(f)}: its ASPD ×2`);
const other = h.spawn('enemy_dummy', { pos: [10, 6] });
h.step();
approx(u.s.aspd, 100 + self, `${label(f)}: two enemies around`);
approx(w.s.aspd, 100 + foe, `${label(f)}: its ASPD`);
h.b.kill(other, null);
h.b.kill(w, null);
h.run(0.3);
assert.equal(u.findBuff('talent:lmlee:self'), null, `${label(f)}: gone with the block`);
done(h);
}
});
test('T2 有备无患: with DP ≥ 5 a payment costs 5 and arms the guard (MER-X stage 3: 4); the guard cancels the next 晕眩 / 冻结 and stuns its enemy source 3 s (4 s); no second guard while one is held; DP 3–4 pays the trait cost only', () => {
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
const tb = talentOf(tier, elite, mod, 1).bb;
const x3 = elite && tier === 6 && mod === X;
assert.deepEqual([Math.abs(tb.extra_cost), tb.stun], x3 ? [4, 4] : [5, 3], label(f));
const cost = elite && mod === X ? 2 : 3;
const dp0 = Math.abs(tb.extra_cost) - 1;
const { h, u } = field({ tier, elite, mod, skill: 1, dp: dp0 });
h.run(3.05);
approx(h.b.players[0].dp, dp0 - cost, `${label(f)}: DP < |extra_cost| ⇒ the trait cost only`);
assert.equal(u.findBuff(GUARD_KEY), null, `${label(f)}: no guard`);
h.b.players[0].dp = 20;
h.run(3);
approx(h.b.players[0].dp, 20 - Math.abs(tb.extra_cost), `${label(f)}: armed`);
assert.ok(u.findBuff(GUARD_KEY), `${label(f)}: guard`);
h.run(3);
approx(h.b.players[0].dp, 20 - Math.abs(tb.extra_cost) - cost, `${label(f)}: guard held ⇒ trait cost`);
const e = h.spawn('enemy_dummy', { pos: [10, 8] });
assert.equal(h.b.applyStatus(u, 'stun', { duration: 5, source: e }), false, `${label(f)}: stun cancelled`);
assert.ok(!u.s.flags.stun && u.findBuff(GUARD_KEY) === null, `${label(f)}: guard spent`);
assert.ok(e.s.flags.stun, `${label(f)}: the source is stunned`);
approx(e.findBuff('stun').timeLeft, tb.stun, `${label(f)}: ${tb.stun} s`, 0.05);
assert.equal(h.b.applyStatus(u, 'stun', { duration: 1, source: e }), true, `${label(f)}: the next one lands`);
h.run(3.1); // re-armed at the next payment (DP is there)
assert.ok(u.findBuff(GUARD_KEY), `${label(f)}: re-armed`);
h.b.applyStatus(u, 'cold', { duration: 3, source: e });
h.b.applyStatus(u, 'cold', { duration: 3, source: e }); // cold on cold ⇒ 冻结: cancelled
assert.ok(!u.s.flags.freeze && u.findBuff(GUARD_KEY) === null, `${label(f)}: 冻结 cancelled`);
done(h);
}
});
test('S1 小惩大诫 (AUTO, SP_FULL): on at 11 / 10 s with nobody on the field; ATK +25 % / +40 %, 法术闪避 20 % / 25 %, for the rest of the deployment', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S1);
assert.deepEqual([sk.spCost, sk.bb.atk, sk.bb.prob], elite ? [10, 0.4, 0.25] : [11, 0.25, 0.2], `T${tier}`);
const { h, u } = field({ tier, elite, skill: 0, dp: 999 });
assert.deepEqual([u.skill.kind, u.skill.rule], ['toggle', 'SP_FULL']);
h.run(sk.spCost - 0.5);
assert.equal(u.skill.activations, 0);
assert.ok(h.runUntil(() => u.skill.active, 1), `T${tier}: on at full SP`);
approx(u.s.atk, u.base.atk * (1 + sk.bb.atk), `T${tier}: ATK`);
approx(u.s.dodgeArts, sk.bb.prob, `T${tier}: 法术闪避`);
h.run(200);
assert.ok(u.skill.active, `T${tier}: 持续时间无限`);
done(h);
}
});
test('S2 驱凶辟邪: passive ASPD +15 / +20; cast on his attack, the target is marked (taunt +1) and bursts 5 s later for (230 % + 10 % × hits) / (260 % + 15 % × hits) ATK arts within radius 1 (flyers too)', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S2);
assert.deepEqual([sk.bb.attack_speed, sk.bb.default_atk_scale, sk.bb.factor_atk_scale, sk.bb.max_stack_cnt, sk.bb.paper_duration, sk.bb.taunt_level],
elite ? [20, 2.6, 0.15, 25, 5, 1] : [15, 2.3, 0.1, 20, 5, 1], `T${tier}`);
const { h, u } = field({ tier, elite, skill: 1, dp: 999 });
assert.deepEqual([u.skill.kind, u.skill.rule], ['instant', 'DEFAULT']);
approx(u.s.aspd, 100 + sk.bb.attack_speed, `T${tier}: passive`);
u.skill.gainSp(999);
h.run(1);
assert.equal(u.skill.activations, 0, `T${tier}: nobody to attack`);
const t = h.spawn('enemy_dummy', { pos: [10, 6] });
const near = h.spawn('enemy_fly', { pos: [11, 6] }), far = h.spawn('enemy_dummy', { pos: [10, 8] });
assert.ok(h.runUntil(() => u.skill.activations === 1, 3), `T${tier}: cast`);
const mark = t.findBuff(`lmlee:mark:${u.id}`);
assert.ok(mark, `T${tier}: marked`);
assert.equal(t.s.taunt, 1, `T${tier}: taunt +1`);
const t0 = h.b.time;
const n0 = h.hooksOf('damaged').length;
assert.ok(h.runUntil(() => !t.findBuff(`lmlee:mark:${u.id}`), 6), `T${tier}: bursts`);
approx(h.b.time - t0, sk.bb.paper_duration, `T${tier}: after 5 s`, 0.05);
const dmg = h.hooksOf('damaged').slice(n0);
const burst = dmg.filter((c) => c.source === u && c.dmg.tags.includes('lmlee:burst'));
const hits = h.hooksOf('damaged').filter((c) => c.target === t && c.source === u && !c.dmg.tags.includes('lmlee:burst') && h.b.time >= t0).length;
assert.deepEqual(burst.map((c) => c.target).sort((a, b) => a.id - b.id), [t, near].sort((a, b) => a.id - b.id), `T${tier}: radius ${MARK_RADIUS}, the flyer too, not 2 tiles away`);
assert.ok(!burst.some((c) => c.target === far));
for (const c of burst) {
assert.equal(c.type, 'arts');
approx(c.amount, u.s.atk * (sk.bb.default_atk_scale + hits * sk.bb.factor_atk_scale), `T${tier}: ${hits} hits counted`, 1e-3);
}
assert.ok(hits >= 4, `T${tier}: his attacks were counted (${hits})`);
done(h);
}
});
test('S2 驱凶辟邪 bursts early: at the hit cap, when the target is knocked out, on a recast; when he is knocked out; and vanishes when he leaves without blocking it', () => {
const sk = skillOf(6, true, S2);
{ // the cap: 25 instances
const { h, u } = field({ tier: 6, elite: true, skill: 1, dp: 999 });
const t = h.spawn('enemy_dummy', { pos: [10, 6] });
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 3));
for (let i = 0; i < sk.bb.max_stack_cnt - 2; i++) h.b.dealDamage(u, t, { amount: 1, type: 'true' });
assert.ok(t.findBuff(`lmlee:mark:${u.id}`), 'below the cap');
h.b.dealDamage(u, t, { amount: 1, type: 'true' });
h.b.dealDamage(u, t, { amount: 1, type: 'true' });
assert.equal(t.findBuff(`lmlee:mark:${u.id}`), null, 'cap ⇒ at once');
const b = from(h, u).filter((c) => c.dmg.tags.includes('lmlee:burst'));
assert.equal(b.length, 1);
assert.ok(b[0].amount >= u.s.atk * (sk.bb.default_atk_scale + sk.bb.max_stack_cnt * sk.bb.factor_atk_scale) - 1e-3);
done(h);
}
{ // knocked out target ⇒ burst on its spot
const { h, u } = field({ tier: 6, elite: true, skill: 1, dp: 999 });
const t = h.spawn('enemy_light', { pos: [10, 6] });
const by = h.spawn('enemy_dummy', { pos: [11, 6] });
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 3));
h.b.dealDamage(u, t, { amount: 1e7, type: 'true' });
assert.ok(!t.alive);
assert.ok(from(h, u).some((c) => c.target === by && c.dmg.tags.includes('lmlee:burst')), 'the neighbour takes the burst');
done(h);
}
{ // recast ⇒ the old mark bursts
const { h, u } = field({ tier: 6, elite: true, skill: 1, dp: 999 });
const t = h.spawn('enemy_dummy', { pos: [10, 6] });
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 3));
u.skill.gainSp(999);
u.skill.opReadyAt = -Infinity;
assert.ok(h.runUntil(() => u.skill.activations === 2, 3));
assert.equal(from(h, u).filter((c) => c.dmg.tags.includes('lmlee:burst')).length, 1, 'the first mark burst');
assert.ok(t.findBuff(`lmlee:mark:${u.id}`), 'a new mark');
done(h);
}
{ // he is knocked out ⇒ burst; he leaves without blocking it ⇒ nothing
for (const how of ['killed', 'retreat']) {
const { h, u } = field({ tier: 6, elite: true, skill: 1, dp: 999 });
const t = h.spawn('enemy_dummy', { pos: [10, 6] });
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 3));
if (how === 'killed') h.b.dealDamage(t, u, { amount: 1e8, type: 'true' });
else h.b.retreat(u);
assert.equal(t.findBuff(`lmlee:mark:${u.id}`), null, how);
assert.equal(from(h, u).filter((c) => c.dmg.tags.includes('lmlee:burst')).length, how === 'killed' ? 1 : 0, how);
done(h);
}
}
});
test('S3 贵客盈门 (AUTO, SP_FULL): range x-4, ATK / DEF +31 % / +37 %, taunt +1, every attack pushes the other enemies of his range; 55 % / 60 % dodge of damage from outside his range only', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S3);
assert.deepEqual([sk.bb.atk, sk.bb.def, sk.bb.taunt_level, sk.bb.prob, sk.bb['attack@force'], sk.bb['attack@prob_knockback'], sk.rangeId], elite ? [0.37, 0.37, 1, 0.6, 0, 1, 'x-4'] : [0.31, 0.31, 1, 0.55, 0, 1, 'x-4'], `T${tier}`);
const { h, u } = field({ tier, elite, skill: 2, dp: 999, seed: 9 });
assert.deepEqual([u.skill.kind, u.skill.rule], ['toggle', 'SP_FULL']);
u.skill.gainSp(999);
h.step();
assert.ok(u.skill.active, `T${tier}: on at full SP`);
assert.deepEqual(u.liveRangeGrid, sk.rangeGrid, `T${tier}: x-4`);
approx(u.s.atk, u.base.atk * (1 + sk.bb.atk), `T${tier}: ATK`);
approx(u.s.def, u.base.def * (1 + sk.bb.def), `T${tier}: DEF`);
assert.equal(u.s.taunt, 1, `T${tier}: taunt`);
// pushes: the target stays, the other enemy of his range is pushed away (radial)
const a = h.spawn('enemy_dummy', { pos: [10, 6] }), b = h.spawn('enemy_dummy', { pos: [11, 5] });
assert.ok(h.runUntil(() => h.hooksOf('attack').some((c) => c.attacker === u), 3), `T${tier}: attacks`);
const main = h.hooksOf('attack').find((c) => c.attacker === u).targets[0];
const other = main === a ? b : a;
assert.ok(Math.hypot(main.x - (main === a ? 6 : 5), main.y - (main === a ? 10 : 11)) < 1e-6, `T${tier}: the target is not pushed`);
assert.ok(Math.hypot(other.x - (other === a ? 6 : 5), other.y - (other === a ? 10 : 11)) > 1, `T${tier}: the other one is pushed`);
done(h);
}
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S3);
const { h, u } = field({ tier, elite, skill: 2, dp: 999, seed: 21 });
u.skill.gainSp(999);
h.step();
const gun = h.spawn('enemy_gun', { pos: [10, 9] }); // outside x-4
const fist = h.spawn('enemy_close', { pos: [10, 6] }); // inside it
h.b.addBuff(u, { key: 'test:tank', mods: { hpFlat: 1e9 } });
h.run(240);
const taken = (src) => h.hooksOf('damaged').filter((c) => c.target === u && c.source === src).length;
const dodged = (src) => h.hooksOf('dodge').filter((c) => c.target === u && c.source === src).length;
const r = dodged(gun) / (dodged(gun) + taken(gun));
assert.ok(Math.abs(r - sk.bb.prob) < 0.08, `T${tier}: ${(r * 100).toFixed(0)} % of the ranged hits dodged`);
assert.equal(dodged(fist), 0, `T${tier}: none from inside his range`);
assert.ok(taken(fist) > 100);
done(h);
}
});
+351
View File
@@ -0,0 +1,351 @@
// test/content/op_wang.test.js — the 自选 operator kit of 望 (char_2027_wang, 6★ 陷阱师; kit
// server/sim/content/kits/ops/op-wang.js) and of her summon 棋子 (token_10064_wang_stone1) with its 跟子, fielded the
// production way (a DIY slot + its `diy` pick, simdata getDiy; the 棋子 as placed hand pieces of her player) in every form:
// tiers 5 / 6, normal (E2 Lv1, skill rank 4, no module) and elite (E2 Lv60, rank 7) with no module or TRP-X 兽形棋盒 at stage
// 1 (tier 5) / 3 (tier 6). Numbers from data/backups.json; the fidelity checklist of kits/README.md.
// Run: node --test test/content/op_wang.test.js
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { makeBattle, enemyRec, checkInvariants } from '../helpers/battleHarness.js';
import { KITTED_CHARS, OPERATOR_KITS, KITS } from '../../server/sim/content/kits/index.js';
import { diyPool, validateDiyPicks, diyRecord } from '../../shared/diy.js';
import { STONE } from '../../server/sim/content/kits/ops/op-wang.js';
import { getData } from '../../server/data.js';
import { GameData } from '../../server/match/gamedata.js';
import { diyGameData } from '../../server/match/player/diy.js';
const load = (f) => JSON.parse(readFileSync(new URL(`../../data/${f}.json`, import.meta.url), 'utf8'));
const CHESS = load('chess');
const BACKUPS = load('backups');
const WANG = 'char_2027_wang';
const FORMS = BACKUPS.units[WANG].forms;
const TOKREC = BACKUPS.tokens[STONE];
const SLOT = { 5: 'chess_char_5_diy1_a', 6: 'chess_char_6_diy1_a' };
const X = 'uniequip_002_wang';
const S1 = 'skchr_wang_1', S2 = 'skchr_wang_2', S3 = 'skchr_wang_3';
const statusOf = (tier, elite) => (elite ? (tier === 5 ? '2/60/7/1' : '2/60/7/3') : '2/1/4/0');
const formOf = (tier, elite) => FORMS[statusOf(tier, elite)];
const skillOf = (tier, elite, id) => formOf(tier, elite).skills.find((s) => s.skillId === id);
const modOf = (tier, mod) => (mod ? formOf(tier, true).modules.find((m) => m.uniEquipId === mod) : null);
const talentOf = (tier, elite, mod, index) => modOf(tier, elite ? mod : null)?.talentChanges.find((t) => t.talentIndex === index) ?? formOf(tier, elite).talents.find((t) => t.index === index);
const tokOf = (tier, elite, skill, mod) => {
let v = TOKREC.variants[`${WANG}@${statusOf(tier, elite)}`];
if (v.bySkill?.[skill]) v = { ...v, ...v.bySkill[skill] };
if (mod && v.byModule?.[mod]) v = { ...v, ...v.byModule[mod] };
return v;
};
const approx = (a, b, msg, eps = 1e-6) => assert.ok(Math.abs(a - b) <= eps * Math.max(1, Math.abs(b)), `${msg}: ${a} vs ${b}`);
const dummy = (key, o = {}) => enemyRec({ key, hp: 1e9, speed: 0, mass: 0, ...o });
const ENEMIES = {
enemy_dummy: dummy('enemy_dummy'),
enemy_fly: dummy('enemy_fly', { motion: 'FLY' }),
enemy_walk: enemyRec({ key: 'enemy_walk', hp: 1e9, speed: 0.6, mass: 0 }),
enemy_runner: enemyRec({ key: 'enemy_runner', hp: 1e9, speed: 1, mass: 0 }),
};
const FORMS_ALL = [[5, false, null], [6, false, null], ...[5, 6].flatMap((t) => [null, X].map((m) => [t, true, m]))];
/** 望 as uid 1 at (row, col) facing RIGHT; `stones` = the tiles of her placed 棋子 (uids 2, 3 …). */
function field({ tier = 5, elite = false, mod = null, skill = 0, row = 12, col = 3, stones = [], seed = 5, dp = 100, others = [] } = {}) {
const op = { uid: 1, diy: { slot: SLOT[tier], charId: WANG, skillIndex: skill, uniEquipId: mod }, elite, row, col };
const pieces = stones.map(([r, c], i) => ({ uid: 2 + i, kind: 'token', tokenId: STONE, ownerUid: 1, row: r, col: c }));
const h = makeBattle({
defs: { enemies: ENEMIES }, timeLimit: 900, autoFinish: false, seed,
flags: { dpPerSec: 0, dpMax: 999 }, hooks: ['damaged', 'skillStart', 'skillEnd', 'statusApplied', 'death', 'deploy', 'ammoUsed'], captureNoisy: true,
units: [op, ...pieces, ...others],
});
h.b.players[0].dp = dp;
h.step();
const u = h.unit(1);
return { h, u, st: h.b.allyUnits.filter((a) => a.kind === 'token' && a.defId === STONE) };
}
const at = (st, r, c) => st.find((s) => s.homeR === r && s.homeC === c);
/** The tiles [r, c] the 跟子 were placed on, in order (the kit's 'summon' fx with `follower`). */
const placed = (h) => h.eventsOf('fx').filter((e) => e[1] === 'summon' && e[4]?.follower).map((e) => [e[3], e[2]]);
const stoneHits = (h) => h.hooksOf('damaged').filter((c) => c.dmg.tags.includes('wang:stone'));
function done(h) {
checkInvariants(h.b);
assert.equal(h.b.errors.length, 0, JSON.stringify(h.b.errors[0]));
}
const label = ([tier, elite, mod]) => `T${tier} ${elite ? 'elite' : 'normal'} ${mod ?? 'none'}`;
test('望 in every 自选 form: her kit, stats + module attributes, 3-3, blocks 1, ranged physical hitting air, ground-targetable, 炎, no 特质; S1 / S2 SP_FULL, S3 the data\'s ACTIVE_RANGE; her 棋子: untargetable, no attack, the variant\'s cost / redeploy time and skill', () => {
assert.equal(OPERATOR_KITS[WANG], KITS[WANG]);
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
for (const skill of [0, 1, 2]) {
const { h, u, st } = field({ tier, elite, mod, skill, stones: [[9, 6]] });
const form = formOf(tier, elite), m = elite ? modOf(tier, mod) : null;
assert.deepEqual([u.def.charId, u.def.diyFor, u.skill.id, !!u.kit.generic, u.kit.skillSource], [WANG, SLOT[tier], form.skills[skill].skillId, false, 'skills'], label(f));
assert.deepEqual([u.base.maxHp, u.base.atk, u.base.def], [form.stats.maxHp + (m?.attr.maxHp ?? 0), form.stats.atk + (m?.attr.atk ?? 0), form.stats.def + (m?.attr.def ?? 0)], `${label(f)}: stats`);
assert.deepEqual([u.s.blockCnt, u.profile.attack, u.profile.canHitFly, u.profile.dmgType, u.base.bat], [1, 'ranged', true, 'phys', 0.85], `${label(f)}: 陷阱师`);
assert.deepEqual(u.liveRangeGrid, form.rangeGrid, `${label(f)}: 3-3`);
assert.deepEqual([u.def.bonds, u.def.raw.garrisonIds], [['yanShip'], []], `${label(f)}: bonds / 特质`);
assert.equal(u.skill.rule, ['SP_FULL', 'SP_FULL', 'ACTIVE_RANGE'][skill], `${label(f)}: trigger`);
assert.ok(!u.s.flags.liftoff && !u.s.flags.camou && !u.s.flags.stealth, `${label(f)}: ground enemies target her`);
const v = tokOf(tier, elite, skill, elite ? mod : null);
const s = st[0];
assert.ok(s.alive && s.deployed && s.ownerUnit === u, `${label(f)}: the 棋子 deploys with the board`);
assert.deepEqual([s.base.cost, s.base.respawnTime, s.def.skill.id, !!s.s.flags.untargetable, s.s.blockCnt, !!s.profile.noAttack],
[v.stats.cost, v.stats.respawnTime, v.skill.skillId, true, 0, true], `${label(f)}: 棋子`);
assert.equal(s.base.cost, elite && mod === X ? 2 : 3, `${label(f)}: TRP-X 部署费用更低(-1)`);
assert.deepEqual([v.stats.deployLimit], [elite && mod === X ? 7 : 6], `${label(f)}: TRP-X 可同时部署的陷阱数量提升(+1)`);
done(h);
}
}
assert.deepEqual(formOf(6, true).skills.map((s) => [s.skillType, s.trigger.rule]), [['AUTO', 'DEFAULT'], ['AUTO', 'DEFAULT'], ['MANUAL', 'ACTIVE_RANGE']]);
assert.deepEqual([modOf(5, X).attr, modOf(6, X).attr], [{ maxHp: 100, atk: 36 }, { maxHp: 150, atk: 60 }]);
const data = { chess: CHESS, backups: BACKUPS };
for (const t of [5, 6]) assert.ok(diyPool(t, { data, kitted: KITTED_CHARS }).includes(WANG), `tier ${t}`);
assert.equal(validateDiyPicks({ [SLOT[6]]: { charId: WANG, skillIndex: 2, uniEquipId: X } }, { data, kitted: KITTED_CHARS }).ok, true);
});
test('铸子: a lone 棋子 never sets off; two side by side activate each other — an enemy (air too) on one sets it off and it is used up; it stays active once its partner is gone', () => {
{ // lone
const { h, st } = field({ tier: 6, elite: true, skill: 1, stones: [[9, 6]] });
h.spawn('enemy_dummy', { pos: [9, 6] });
h.run(3);
assert.equal(stoneHits(h).length, 0, 'a lone 棋子');
assert.ok(st[0].alive);
done(h);
}
{ // a pair: the flyer sets one off, the other stays active and takes the next
const { h, st } = field({ tier: 6, elite: true, skill: 1, stones: [[9, 6], [9, 7]] });
h.step();
const a = at(st, 9, 6), b = at(st, 9, 7);
assert.ok(a.mem.wangNode.act && b.mem.wangNode.act, 'connected ⇒ active');
assert.equal(placed(h).length, 0, 'the battle-start deployment drops no 跟子');
const fl = h.spawn('enemy_fly', { pos: [9, 7] });
h.step();
assert.ok(!b.alive && a.alive, 'the flyer set off its 棋子, which is used up');
assert.ok(stoneHits(h).some((c) => c.target === fl), 'air units are hit');
h.b.kill(fl, null);
const n0 = stoneHits(h).length;
h.spawn('enemy_dummy', { pos: [9, 6] });
h.step();
assert.ok(!a.alive && stoneHits(h).length > n0, 'still active without its partner');
done(h);
}
});
test('铸子: a spent 棋子 comes back on its tile 2 s later for its cost (TRP-X: 2 DP), not while a ground enemy stands there, not while 望 is away; each return drops one 跟子 next to it in the PRTS order (enemy tile, undeployable ground, ground, 高台; 上 右 下 左)', () => {
for (const mod of [null, X]) {
const { h, u, st } = field({ tier: 6, elite: true, mod, skill: 1, stones: [[10, 6], [10, 7]], dp: 50 });
const b = at(st, 10, 7);
const e = h.spawn('enemy_dummy', { pos: [10, 7] });
h.step();
assert.ok(!b.alive, 'set off');
h.run(3);
assert.ok(!b.alive, 'a ground enemy stands on its tile');
h.b.kill(e, null);
const dp0 = h.b.players[0].dp;
assert.ok(h.runUntil(() => b.alive, 1), 'back');
approx(h.b.players[0].dp, dp0 - (mod === X ? 2 : 3), `${mod ?? 'none'}: its cost`);
// the 跟子: 上 of (10,7) is (11,7) — deployable ground; no enemy anywhere ⇒ undeployable first: (10,7)'s neighbours on
// the flat stage are all deployable road but 右 (10,8) … the order 上 > 右 > 下 > 左 among equals
const f = u.mem.wang.followers;
assert.equal(f.length, 1, 'one 跟子');
assert.deepEqual([f[0].r, f[0].c], [11, 7], '上 first among equal tiles');
done(h);
}
{ // an enemy tile first; undeployable ground before deployable ground
const { h, u, st } = field({ tier: 6, elite: true, skill: 1, stones: [[10, 9], [11, 9]], dp: 50 });
const b = at(st, 10, 9);
h.spawn('enemy_dummy', { pos: [10, 9] });
h.step();
assert.ok(!b.alive);
h.b.kill(h.b.enemies.find((x) => x.alive), null);
const fl = h.spawn('enemy_fly', { pos: [9, 9] }); // 下 of (10,9) holds an enemy (a flyer: no block on the trap rule)
assert.ok(h.runUntil(() => b.alive, 3), 'back (a flyer does not stop it)');
assert.deepEqual(placed(h), [[9, 9]], 'the enemy tile first (before the undeployable 右 (10,10))');
h.step();
assert.ok(h.hooksOf('damaged').some((c) => c.target === fl && c.source === u && c.dmg.tags.includes('wang:stone')), 'the 跟子 sets off at once — its damage is 望\'s');
assert.equal(u.mem.wang.followers.length, 0);
done(h);
}
{ // no enemy around: undeployable ground (10,10) before the road
const { h, u, st } = field({ tier: 6, elite: true, skill: 1, stones: [[10, 9], [11, 9]], dp: 50 });
const b = at(st, 10, 9);
const e = h.spawn('enemy_dummy', { pos: [10, 9] });
h.step();
h.b.kill(e, null);
assert.ok(h.runUntil(() => b.alive, 3));
assert.deepEqual(placed(h), [[10, 10]], '不可部署地块 > 可部署地面地块');
void u;
done(h);
}
{ // 望 away ⇒ her 棋子 leave and wait for her; her 跟子 are gone
const { h, u, st } = field({ tier: 6, elite: true, skill: 1, stones: [[10, 6], [10, 7]], dp: 200 });
u.mem.wang.followers.push({ r: 11, c: 6, seq: 99, act: false, h: false, v: false, stacks: 0, follower: true });
h.b.retreat(u);
assert.ok(st.every((s) => !s.alive), 'they vanish with her');
assert.equal(u.mem.wang.followers.length, 0);
h.run(5);
assert.ok(st.every((s) => !s.alive), 'not back while she is away');
h.b.redeploy(u);
assert.ok(h.runUntil(() => st.every((s) => s.alive), 2), 'back with her');
done(h);
}
});
test('料敌机先: a line of 2 pieces ⇒ 2 stacks (+20 % damage, 18 RES ignored), a line of 3 or more ⇒ 3 (the cap); TRP-X stage 3: 13 % / 12 per stack', () => {
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
const tb = talentOf(tier, elite, mod, 1).bb;
assert.deepEqual([tb['attack@per_atk_scale'], tb['attack@per_magic_resist_penetrate_fixed'], tb['attack@max_trigger_cnt']],
elite && tier === 6 && mod === X ? [0.13, 12, 3] : [0.1, 9, 3], label(f));
const sk = skillOf(tier, elite, S2);
for (const [line, stacks] of [[[[10, 5], [10, 6]], 2], [[[10, 4], [10, 5], [10, 6], [10, 7]], 3]]) {
const { h, u, st } = field({ tier, elite, mod, skill: 1, stones: line });
h.step();
for (const s of st) assert.equal(s.mem.wangNode.stacks, stacks, `${label(f)}: ${line.length} in a line`);
const e = h.spawn('enemy_dummy', { pos: [10, 5] });
h.b.addBuff(e, { key: 'test:res', mods: { resFlat: 50 } });
h.step();
const hit = stoneHits(h).find((c) => c.target === e);
const res = Math.max(0, 50 - tb['attack@per_magic_resist_penetrate_fixed'] * stacks);
approx(hit.amount, u.s.atk * sk.bb['attack@atk_scale'] * (1 + tb['attack@per_atk_scale'] * stacks) * (1 - res / 100), `${label(f)}: ×(1 + ${stacks} × per), ${stacks} × pen`, 1e-4);
done(h);
}
}
});
test('S1 取势 (AUTO, SP_FULL): the triggering enemy is 停顿 6.5 s and takes 105 % / 120 % of 望\'s ATK as 法术 every second for 6.5 s (6 ticks, 无来源 credited to her, independent); the active +2 棋子 (≤ 7) and 阻回 at the cap', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S1);
assert.deepEqual([sk.spCost, sk.bb.cnt, sk.bb['attack@atk_scale'], sk.bb['attack@sluggish']], elite ? [20, 2, 1.2, 6.5] : [21, 2, 1.05, 6.5], `T${tier}`);
const { h, u, st } = field({ tier, elite, skill: 0, stones: [[10, 6], [10, 7]] });
assert.deepEqual([u.skill.kind, u.skill.rule, u.mem.wang.stock], ['instant', 'SP_FULL', 6]);
const e = h.spawn('enemy_dummy', { pos: [10, 7] });
h.step();
const slug = h.hooksOf('statusApplied').find((c) => c.target === e && c.status === 'sluggish');
assert.ok(slug && slug.source === u, `T${tier}: 停顿 from 望`);
approx(slug.duration, sk.bb['attack@sluggish'], `T${tier}: 6.5 s`);
h.run(7);
const ticks = h.hooksOf('damaged').filter((c) => c.target === e && c.dmg.tags.includes('wang:qushi'));
assert.equal(ticks.length, 6, `T${tier}: one per second`);
for (const c of ticks) {
assert.deepEqual([c.source, c.credit, c.type], [null, u, 'arts'], `T${tier}: 无来源 arts credited to her`);
approx(c.amount, u.s.atk * sk.bb['attack@atk_scale'] * (1 + 0.1 * 2), `T${tier}: precomputed with 2 stacks`, 1e-4);
}
// independent: two triggers ⇒ two DoTs ticking together
h.b.kill(e, null);
assert.ok(h.runUntil(() => st.every((s) => s.alive), 5), `T${tier}: back once the tile is clear`);
const e2 = h.spawn('enemy_dummy', { pos: [10, 7] });
h.step();
e2.x = 6; e2.y = 10; // onto the other (still active) 棋子
h.step();
h.step();
assert.equal(e2.buffs.filter((b) => b.key === 'wang:qushi').length, 2, `T${tier}: independent`);
// the active part: +2 stock (6 → 7: the cap), then 阻回
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 1), `T${tier}: cast at full SP`);
assert.equal(u.mem.wang.stock, 7, `T${tier}: 最多拥有7枚`);
h.step();
assert.ok(u.s.flags.noSp, `T${tier}: 阻回 at the cap`);
done(h);
}
});
test('S2 连星 (AUTO, SP_FULL): a triggered piece hits every enemy on its connected lines (its tile ± 3; air too) for 420 % / 480 % ATK arts and slows them 35 % / 40 % for 6 s — each slow on its own timer, added up, speed ≥ 0.1', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S2);
assert.deepEqual([sk.spCost, sk.bb['attack@atk_scale'], sk.bb['attack@move_speed'], sk.bb['attack@duration']], elite ? [16, 4.8, -0.4, 6] : [17, 4.2, -0.35, 6], `T${tier}`);
const { h, u } = field({ tier, elite, skill: 1, stones: [[10, 6], [10, 7]] });
const onLine = h.spawn('enemy_fly', { pos: [10, 9] }); // 3 tiles right of (10,6)…(10,7)+2: on the horizontal line
const beyond = h.spawn('enemy_dummy', { pos: [10, 11] }); // 4 tiles past (10,7)
const off = h.spawn('enemy_dummy', { pos: [11, 7] }); // off the line (vertical never activated)
const trig = h.spawn('enemy_runner', { pos: [10, 7] });
h.b.applyStatus(trig, 'stun', { duration: 99, force: true }); // it stays on the tile (the slow is read off its speed stat)
h.step();
const hit = stoneHits(h);
const victims = new Set(hit.map((c) => c.target));
assert.ok(victims.has(trig) && victims.has(onLine), `T${tier}: the line, air included`);
assert.ok(!victims.has(beyond) && !victims.has(off), `T${tier}: not beyond ± 3 / off the line`);
for (const c of hit.filter((x) => x.target === trig)) approx(c.amount, u.s.atk * sk.bb['attack@atk_scale'] * 1.2, `T${tier}: 2 stacks`, 1e-4);
const slow = trig.findBuff('wang:slow');
approx(trig.s.moveSpeed, trig.base.moveSpeed * (1 + sk.bb['attack@move_speed']), `T${tier}: slowed`);
// a second slow 3 s later adds up and keeps its own timer
h.run(3);
slow.data.list.push({ v: sk.bb['attack@move_speed'], until: h.b.time + 6 });
h.step();
approx(trig.s.moveSpeed, trig.base.moveSpeed * (1 + 2 * sk.bb['attack@move_speed']), `T${tier}: two add up`, 1e-3);
h.run(3.1);
approx(trig.s.moveSpeed, trig.base.moveSpeed * (1 + sk.bb['attack@move_speed']), `T${tier}: the first ended`, 1e-3);
for (let i = 0; i < 5; i++) slow.data.list.push({ v: sk.bb['attack@move_speed'], until: h.b.time + 6 });
h.step();
approx(trig.s.moveSpeed, 0.1, `T${tier}: speed floor 0.1`, 1e-3);
done(h);
}
});
test('S3 天下劫 (MANUAL, ACTIVE_RANGE 4-12, 20 bullets): passive — the pieces set off and hit on x-6 (290 % / 320 %); active — no attacks, range 4-12, +8 棋子 with the overflow placed as 跟子 on the enemies of her range first; returns inside it drop 3 跟子 for 3 bullets; it ends with the last bullet', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S3);
const v = tokOf(tier, elite, 2, null);
assert.deepEqual([sk.spCost, sk.initSp, sk.bb.cnt, sk.bb.trigger_time, sk.bb.atk_scale, sk.rangeId, v.skill.rangeId], elite ? [54, 38, 8, 20, 3.2, '4-12', 'x-6'] : [57, 38, 8, 20, 2.9, '4-12', 'x-6'], `T${tier}`);
{ // passive: x-6 trigger and damage
const { h, u, st } = field({ tier, elite, skill: 2, stones: [[10, 6], [10, 7]] });
const e = h.spawn('enemy_dummy', { pos: [10, 9] }); // 2 tiles right of (10,7): x-6
const fl = h.spawn('enemy_fly', { pos: [12, 7] }); // 2 tiles up of (10,7)
const diag = h.spawn('enemy_dummy', { pos: [11, 8] }); // diagonal: not x-6
h.step();
const hit = stoneHits(h);
assert.ok(hit.some((c) => c.target === e) && hit.some((c) => c.target === fl), `T${tier}: x-6, air too`);
assert.ok(!hit.some((c) => c.target === diag && c.source === at(st, 10, 7)), `T${tier}: (10,7)'s area`);
for (const c of hit.filter((x) => x.target === e)) approx(c.amount, u.s.atk * sk.bb.atk_scale * 1.2, `T${tier}: ${sk.bb.atk_scale * 100} %, 2 stacks`, 1e-4);
done(h);
}
{ // active
const { h, u } = field({ tier, elite, skill: 2, row: 10, col: 3, stones: [[11, 6], [11, 7]], dp: 300 });
u.skill.gainSp(999);
h.run(1);
assert.equal(u.skill.activations, 0, `T${tier}: nobody in 4-12`);
const a = h.spawn('enemy_dummy', { pos: [9, 5] }), b = h.spawn('enemy_dummy', { pos: [10, 7] });
assert.ok(h.runUntil(() => u.skill.active, 1), `T${tier}: an enemy inside 4-12 casts it`);
assert.deepEqual(u.liveRangeGrid, sk.rangeGrid, `T${tier}: 4-12`);
assert.equal(u.skill.attackOverride()?.noAttack, true, `T${tier}: 停止攻击`);
assert.equal(u.mem.wang.stock, 7, `T${tier}: +8, capped`);
const fl = placed(h).map(([r, c]) => `${r},${c}`);
assert.equal(fl.length, 7, `T${tier}: 6 + 8 − 7 over the cap`);
assert.deepEqual(fl.slice(0, 2).sort(), ['10,7', '9,5'], `T${tier}: the enemies' tiles first (${fl})`);
assert.ok(h.hooksOf('damaged').some((c) => c.target === a && c.source === u && c.dmg.tags.includes('wang:stone')), `T${tier}: they set off`);
// inside her range a 棋子 comes back onto an enemy ("可部署至敌人所在位置") — and sets off again
h.b.kill(a, null); h.b.kill(b, null);
u.mem.wang.followers.length = 0;
const stay = h.spawn('enemy_dummy', { pos: [11, 7] });
h.step();
const back = h.hooksOf('deploy').filter((c) => c.unit.defId === STONE).length;
h.run(2.5);
assert.ok(h.hooksOf('deploy').filter((c) => c.unit.defId === STONE).length > back, `T${tier}: back on the enemy's tile during S3`);
h.b.kill(stay, null);
// the bullets: returns inside her range drop 3 跟子 each for 3 bullets — until none is left
u.mem.wang.followers.length = 0;
let guard = 0;
while (u.skill.active && guard++ < 40) {
const e = h.spawn('enemy_dummy', { pos: [11, 7] });
h.step();
h.b.kill(e, null);
u.mem.wang.followers.length = 0;
h.run(2.5);
}
assert.ok(!u.skill.active, `T${tier}: ends`);
const used = h.hooksOf('ammoUsed').filter((c) => c.unit === u);
assert.ok(used.length >= 4 && used[used.length - 1].left === 0, `T${tier}: the 20 bullets spent`);
assert.ok(!u.skill.attackOverride(), `T${tier}: attacks again`);
done(h);
}
}
});
test('the hand: deploying her in prep brings 6 棋子 (TRP-X "可同时部署的陷阱数量提升": 7) — the match\'s data view reads the module variant\'s deploy limit', () => {
const gd = new GameData(getData({ log: { warn() {}, error() {}, info() {} } }), 'mode_multi_hard');
const data = { chess: CHESS, backups: BACKUPS };
for (const [tier, elite, mod, n] of [[5, false, null, 6], [6, false, null, 6], [5, true, null, 6], [6, true, null, 6], [5, true, X, 7], [6, true, X, 7]]) {
const slot = elite ? SLOT[tier].replace(/_a$/, '_b') : SLOT[tier];
const rec = diyRecord(SLOT[tier], { charId: WANG, skillIndex: 1, uniEquipId: mod }, { elite, data });
const view = diyGameData(gd, new Map([[slot, rec]]));
assert.deepEqual(view.placeableTokens(slot, { skillIndex: 1, moduleId: elite ? mod : null }), [{ tokenId: STONE, count: n }], `T${tier} ${elite ? 'elite' : 'normal'} ${mod ?? 'none'}`);
}
});
+329
View File
@@ -0,0 +1,329 @@
// test/content/op_weedy.test.js — the 自选 operator kit of 温蒂 (char_400_weedy, 6★ 推击手; kit
// server/sim/content/kits/ops/op-weedy.js) and of her summon 工程蓄水炮 (token_10009_weedy_cannon), fielded the production
// way (a DIY slot + its `diy` pick, simdata getDiy; the cannon as the placed hand piece of her player) in every form:
// tiers 5 / 6, normal (E2 Lv1, skill rank 4, no module) and elite (E2 Lv60, rank 7) with no module, PUS-X 仿生海龙改型 or
// PUS-Y 新型仿生原型 at stage 1 (tier 5) / 3 (tier 6). Numbers from data/backups.json; the fidelity checklist of kits/README.md.
// Run: node --test test/content/op_weedy.test.js
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { makeBattle, enemyRec, checkInvariants } from '../helpers/battleHarness.js';
import { KITTED_CHARS, OPERATOR_KITS, KITS } from '../../server/sim/content/kits/index.js';
import { diyPool, validateDiyPicks, diyRecord } from '../../shared/diy.js';
import { meleeOnHighGround } from '../../shared/highGround.js';
import { positionClass, placeClass } from '../../server/match/board.js';
import { PUSH_TILES } from '../../server/sim/constants.js';
import { CANNON, RUPTURE_KEY, NITRO_SPLASH, WATER_SPLASH, rupture } from '../../server/sim/content/kits/ops/op-weedy.js';
const load = (f) => JSON.parse(readFileSync(new URL(`../../data/${f}.json`, import.meta.url), 'utf8'));
const CHESS = load('chess');
const BACKUPS = load('backups');
const WEEDY = 'char_400_weedy';
const FORMS = BACKUPS.units[WEEDY].forms;
const TOKREC = BACKUPS.tokens[CANNON];
const SLOT = { 5: 'chess_char_5_diy1_a', 6: 'chess_char_6_diy1_a' };
const X = 'uniequip_002_weedy', Y = 'uniequip_003_weedy';
const S1 = 'skchr_weedy_1', S2 = 'skchr_weedy_2', S3 = 'skchr_weedy_3';
const statusOf = (tier, elite) => (elite ? (tier === 5 ? '2/60/7/1' : '2/60/7/3') : '2/1/4/0');
const formOf = (tier, elite) => FORMS[statusOf(tier, elite)];
const skillOf = (tier, elite, id) => formOf(tier, elite).skills.find((s) => s.skillId === id);
const modOf = (tier, mod) => (mod ? formOf(tier, true).modules.find((m) => m.uniEquipId === mod) : null);
/** The cannon's variant of a form, with the pick's skill / module (getDiyToken). */
const tokOf = (tier, elite, skill, mod) => {
let v = TOKREC.variants[`${WEEDY}@${statusOf(tier, elite)}`];
if (v.bySkill?.[skill]) v = { ...v, ...v.bySkill[skill] };
if (mod && v.byModule?.[mod]) v = { ...v, ...v.byModule[mod] };
return v;
};
const approx = (a, b, msg, eps = 1e-6) => assert.ok(Math.abs(a - b) <= eps * Math.max(1, Math.abs(b)), `${msg}: ${a} vs ${b}`);
const dummy = (key, o = {}) => enemyRec({ key, hp: 1e9, speed: 0, mass: 0, ...o });
const ENEMIES = {
enemy_dummy: dummy('enemy_dummy'),
enemy_heavy: dummy('enemy_heavy', { mass: 9 }),
enemy_fly: dummy('enemy_fly', { motion: 'FLY' }),
enemy_walk: enemyRec({ key: 'enemy_walk', hp: 1e9, speed: 0.6, mass: 0 }),
};
const FORMS_ALL = [[5, false, null], [6, false, null], ...[5, 6].flatMap((t) => [null, X, Y].map((m) => [t, true, m]))];
/** 温蒂 as uid 1 at (row, col) facing RIGHT; `cannon` = the cannon piece's tile (uid 2) or null. */
function field({ tier = 5, elite = false, mod = null, skill = 0, row = 10, col = 5, cannon = null, seed = 5, others = [], dp = 0 } = {}) {
const op = { uid: 1, diy: { slot: SLOT[tier], charId: WEEDY, skillIndex: skill, uniEquipId: mod }, elite, row, col };
const piece = cannon ? [{ uid: 2, kind: 'token', tokenId: CANNON, ownerUid: 1, row: cannon[0], col: cannon[1] }] : [];
const h = makeBattle({
defs: { enemies: ENEMIES }, timeLimit: 900, autoFinish: false, seed,
flags: { dpPerSec: 0, dpMax: 999 }, hooks: ['damaged', 'skillStart', 'skillEnd', 'statusApplied', 'death', 'deploy', 'attack'], captureNoisy: true,
units: [op, ...piece, ...others],
});
h.b.players[0].dp = dp;
h.step();
return { h, u: h.unit(1), c: h.b.allyUnits.find((a) => a.kind === 'token' && a.defId === CANNON) ?? null };
}
const from = (h, src, tag = null) => h.hooksOf('damaged').filter((c) => c.source === src && (!tag || c.dmg.tags.includes(tag)));
function done(h) {
checkInvariants(h.b);
assert.equal(h.b.errors.length, 0, JSON.stringify(h.b.errors[0]));
}
const label = ([tier, elite, mod]) => `T${tier} ${elite ? 'elite' : 'normal'} ${mod ?? 'none'}`;
test('温蒂 in every 自选 form: her kit, stats + module attributes, 1-1, blocks 2, melee physical ground-only, hits every blocked enemy, the 高台 rule, 罗德岛 (协防), no 特质; S1 DEFAULT, S2 SP_FULL, S3 SKILL_RANGE', () => {
assert.equal(OPERATOR_KITS[WEEDY], KITS[WEEDY]);
const data = { chess: CHESS, backups: BACKUPS };
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
for (const skill of [0, 1, 2]) {
const { h, u } = field({ tier, elite, mod, skill });
const form = formOf(tier, elite), m = elite ? modOf(tier, mod) : null;
assert.deepEqual([u.def.charId, u.def.diyFor, u.skill.id, !!u.kit.generic, u.kit.skillSource], [WEEDY, SLOT[tier], form.skills[skill].skillId, false, 'skills'], label(f));
assert.deepEqual([u.base.maxHp, u.base.atk, u.base.def], [form.stats.maxHp + (m?.attr.maxHp ?? 0), form.stats.atk + (m?.attr.atk ?? 0), form.stats.def + (m?.attr.def ?? 0)], `${label(f)}: stats`);
assert.deepEqual([u.s.blockCnt, u.profile.attack, u.profile.canHitFly, u.profile.dmgType, u.base.bat, u.profile.hitAllBlocked], [2, 'melee', false, 'phys', 1.2, true], `${label(f)}: 推击手`);
assert.deepEqual(u.liveRangeGrid, form.rangeGrid, `${label(f)}: 1-1`);
assert.deepEqual([u.def.bonds, u.def.raw.garrisonIds], [['emptyShip'], []], `${label(f)}: bonds / 特质`);
assert.equal(u.skill.rule, ['DEFAULT', 'SP_FULL', 'SKILL_RANGE'][skill], `${label(f)}: trigger`);
assert.ok(!u.s.flags.liftoff && !u.s.flags.camou && !u.s.flags.stealth, `${label(f)}: ground enemies target her`);
done(h);
}
// 「可以放置于远程位」: the composed 自选 record takes a 高台 (shared/highGround.js; the match's placeClass reads it)
const rec = diyRecord(SLOT[tier], { charId: WEEDY, skillIndex: 0, uniEquipId: mod }, { elite, data });
assert.ok(meleeOnHighGround(rec), `${label(f)}: 高台`);
assert.equal(positionClass(rec), 'all', label(f));
assert.equal(placeClass({ fieldRecord: () => rec }, CHESS[elite ? SLOT[tier].replace(/_a$/, '_b') : SLOT[tier]]), 'all', `${label(f)}: placeClass`);
}
assert.deepEqual(formOf(6, true).skills.map((s) => [s.skillType, s.trigger.rule]), [['AUTO', 'DEFAULT'], ['AUTO', 'DEFAULT'], ['MANUAL', 'SKILL_RANGE']]);
assert.deepEqual([modOf(5, X).attr, modOf(6, X).attr, modOf(5, Y).attr, modOf(6, Y).attr], [{ maxHp: 140, atk: 50 }, { maxHp: 210, atk: 72 }, { atk: 46, def: 30 }, { atk: 68, def: 40 }]);
for (const t of [5, 6]) assert.ok(diyPool(t, { data, kitted: KITTED_CHARS }).includes(WEEDY), `tier ${t}`);
assert.equal(validateDiyPicks({ [SLOT[5]]: { charId: WEEDY, skillIndex: 2, uniEquipId: Y } }, { data, kitted: KITTED_CHARS }).ok, true);
});
test('S1 炮管敲击 (AUTO, data DEFAULT): her next attack — 120 % / 135 % ATK physical, the target pushed along her facing with 中力 (weight 0: 2.14 tiles) and 晕眩 0.8 / 0.9 s; a weight-9 enemy is not moved', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S1);
assert.deepEqual([sk.spCost, sk.bb.atk_scale, sk.bb.force, sk.bb.stun], elite ? [6, 1.35, 1, 0.9] : [6, 1.2, 1, 0.8], `T${tier}`);
for (const key of ['enemy_dummy', 'enemy_heavy']) {
const { h, u } = field({ tier, elite, skill: 0 });
const e = h.spawn(key, { pos: [10, 6] });
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 3), `T${tier}: cast on her attack`);
const hit = from(h, u).find((c) => c.dmg.isSkill);
approx(hit.amount, u.s.atk * sk.bb.atk_scale, `T${tier}: ${sk.bb.atk_scale * 100} %`);
assert.equal(hit.type, 'phys');
const st = h.hooksOf('statusApplied').find((c) => c.source === u && c.status === 'stun' && c.target === e);
approx(st.duration, sk.bb.stun, `T${tier}: stun`);
if (key === 'enemy_dummy') approx(e.x - 6, PUSH_TILES[1], `T${tier}: pushed along +x`, 0.06);
else assert.equal(e.x, 6, `T${tier}: weight 9 ⇒ not moved`);
assert.equal(e.y, 10, `T${tier}: straight ahead`);
done(h);
}
}
});
test('S2 水炮模式 (AUTO, SP_FULL): ATK +140 % / +170 %, interval ×3.2, range +1, one ranged shot with a 0.9 splash (flyers too), every enemy hit pushed with 小力 along her facing; 持续时间无限', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S2);
assert.deepEqual([sk.spCost, sk.bb.atk, sk.bb.base_attack_time, sk.bb.ability_range_forward_extend, sk.bb.base_force_level], elite ? [78, 1.7, 2.2, 1, 0] : [84, 1.4, 2.2, 1, 0], `T${tier}`);
const { h, u } = field({ tier, elite, skill: 1 });
assert.deepEqual([u.skill.kind, u.skill.rule], ['toggle', 'SP_FULL']);
u.skill.gainSp(999);
h.step();
assert.ok(u.skill.active, `T${tier}: on at full SP, no enemy needed`);
approx(u.s.atk, u.base.atk * (1 + sk.bb.atk), `T${tier}: ATK`);
approx(u.s.interval, 1.2 * (1 + sk.bb.base_attack_time), `T${tier}: interval`);
assert.deepEqual(u.liveRangeGrid, [[0, 0], [0, 1], [0, 2]], `T${tier}: +1 tile`);
const main = h.spawn('enemy_dummy', { pos: [10, 7] });
const side = h.spawn('enemy_fly', { pos: [10.6, 7] });
const far = h.spawn('enemy_dummy', { pos: [12, 7] });
assert.ok(h.runUntil(() => from(h, u).length >= 2, 6), `T${tier}: a shot lands`);
const hit = from(h, u);
const id = hit[0].dmg.attackId;
const one = hit.filter((c) => c.dmg.attackId === id);
assert.ok(one.some((c) => c.target === main) && one.some((c) => c.target === side), `T${tier}: target + the flyer within ${WATER_SPLASH}`);
assert.ok(!one.some((c) => c.target === far));
for (const c of one) approx(c.amount, u.s.atk, `T${tier}: full damage`);
approx(main.x - 7, PUSH_TILES[0], `T${tier}: 小力 push (weight 0: 1.7 tiles)`, 0.06);
h.run(60);
assert.ok(u.skill.active, `T${tier}: stays on`);
done(h);
}
});
test('S3 液氮大炮 (MANUAL, SKILL_RANGE 4-1): 290 % / 320 % ATK arts on the target and within 1.2 (flyers too), pushed 中力 / 较大力, and the 移动创伤: 1200 true damage per tile moved for 5 / 6 s', () => {
for (const [tier, elite] of [[5, false], [6, true]]) {
const sk = skillOf(tier, elite, S3);
assert.deepEqual([sk.spCost, sk.initSp, sk.bb.atk_scale, sk.bb.force, sk.bb.duration, sk.bb.value, sk.bb.dist, sk.bb.interval, sk.rangeId],
elite ? [37, 16, 3.2, 2, 6, 1200, 1, 0.066, '4-1'] : [40, 13, 2.9, 1, 5, 1200, 1, 0.066, '4-1'], `T${tier}`);
const { h, u } = field({ tier, elite, skill: 2 });
u.skill.gainSp(999);
h.run(1);
assert.equal(u.skill.activations, 0, `T${tier}: nobody in the 4-1`);
const t = h.spawn('enemy_dummy', { pos: [10, 7] }); // 2 tiles ahead: the skill range, not her 1-1
const fly = h.spawn('enemy_fly', { pos: [11, 7] });
const out = h.spawn('enemy_dummy', { pos: [12, 7] });
assert.ok(h.runUntil(() => u.skill.activations === 1, 1), `T${tier}: cast`);
const shot = from(h, u, 'weedy:nitro');
assert.deepEqual(shot.map((c) => c.target).sort((a, b) => a.id - b.id), [t, fly].sort((a, b) => a.id - b.id), `T${tier}: within ${NITRO_SPLASH}`);
for (const c of shot) { assert.equal(c.type, 'arts'); approx(c.amount, u.s.atk * sk.bb.atk_scale, `T${tier}: arts`); }
assert.ok(!shot.some((c) => c.target === out));
const x0 = 7, moved = t.x - x0;
approx(moved, PUSH_TILES[Math.min(3, sk.bb.force)], `T${tier}: pushed`, 0.06);
h.run(sk.bb.duration + 0.2);
assert.equal(t.findBuff(RUPTURE_KEY), null, `T${tier}: ${sk.bb.duration} s`);
const rup = from(h, u, RUPTURE_KEY).filter((c) => c.target === t);
const total = rup.reduce((s, c) => s + c.amount, 0);
approx(total, moved * sk.bb.value, `T${tier}: 1200 per tile of the push`, 0.02);
assert.ok(rup.every((c) => c.type === 'true' && c.dmg.tags.includes('dot')), `T${tier}: true 持续伤害`);
const fr = from(h, u, RUPTURE_KEY).filter((c) => c.target === fly).reduce((a, c) => a + c.amount, 0);
approx(fr, Math.hypot(fly.x - 7, fly.y - 11) * sk.bb.value, `T${tier}: the flyer too (a test flyer is no 静态刚体)`, 0.02);
done(h);
}
});
test('移动创伤: a walker takes 1200 per tile it walks; a second application only refreshes the duration (the first source and ratio stay); an update of more than 4 tiles deals nothing', () => {
const { h, u } = field({ tier: 6, elite: true, skill: 2, row: 12, col: 3 });
const w = h.spawn('enemy_walk', { routeIndex: 0 });
h.run(1);
const x0 = w.x;
rupture(h.b, u, w, { duration: 5, perTile: 1200, interval: 0.066 });
const first = w.findBuff(RUPTURE_KEY);
h.run(3);
rupture(h.b, null, w, { duration: 5, perTile: 9999, interval: 0.066 });
assert.equal(w.findBuff(RUPTURE_KEY), first, 'one buff');
approx(first.timeLeft, 5, 'refreshed to 5 s', 0.01);
assert.ok(h.runUntil(() => !w.findBuff(RUPTURE_KEY), 6));
const x1 = w.x;
const rup = h.hooksOf('damaged').filter((c) => c.target === w && c.dmg.tags.includes(RUPTURE_KEY));
assert.ok(rup.length > 50 && rup.every((c) => c.source === u), 'every update from the first source');
approx(rup.reduce((a, c) => a + c.amount, 0), (x0 - x1) * 1200, '1200 per tile walked', 0.02);
const d = h.spawn('enemy_dummy', { pos: [10, 8] });
rupture(h.b, u, d, { duration: 2, perTile: 1200, interval: 0.066 });
d.x -= 5; // a 5-tile jump between two updates
h.run(2.2);
assert.equal(h.hooksOf('damaged').filter((c) => c.target === d && c.dmg.tags.includes(RUPTURE_KEY)).length, 0, '> 4 tiles: nothing');
done(h);
});
test('T1 工程蓄水炮: the placed cannon deploys with the board — untargetable, 禁疗, blocks nothing, 3-2, physical arrows at the nearest enemy (air too), its stats from the variant; its forced skill fires once per deployment with 温蒂\'s ATK and its own force +1', () => {
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
const { h, u, c } = field({ tier, elite, mod, skill: 0, cannon: [11, 5], dp: 100 });
const v = tokOf(tier, elite, 0, elite ? mod : null);
assert.ok(c && c.alive && c.deployed && c.ownerUnit === u, `${label(f)}: deployed with the board`);
assert.deepEqual([c.base.atk, c.base.respawnTime, c.base.cost, c.s.blockCnt, c.base.bat], [v.stats.atk, v.stats.respawnTime, v.stats.cost, 0, 2.4], `${label(f)}: stats`);
assert.deepEqual([!!c.s.flags.untargetable, !!c.s.flags.noHeal, c.profile.attack, c.profile.canHitFly, c.profile.dmgType, c.profile.priority], [true, true, 'ranged', true, 'phys', 'nearest'], `${label(f)}: profile`);
assert.deepEqual(c.liveRangeGrid, v.rangeGrid, `${label(f)}: 3-2`);
assert.deepEqual([c.skill.id, c.skill.kind, c.skill.rule, c.skill.spCost], ['sktok_weedy_token', 'instant', 'DEFAULT', 0], `${label(f)}: its skill`);
const near = h.spawn('enemy_dummy', { pos: [11, 7] }), farther = h.spawn('enemy_dummy', { pos: [11, 8] });
assert.ok(h.runUntil(() => c.skill.activations === 1, 4), `${label(f)}: its skill on its first attack`);
const sbb = v.skill.bb;
const shot = from(h, u, 'weedy:nitro');
assert.ok(shot.length >= 1 && shot.every((x) => Math.abs(x.amount - u.s.atk * sbb.atk_scale) < 1e-6), `${label(f)}: ${sbb.atk_scale * 100} % of 温蒂's ATK`);
assert.ok(shot.some((x) => x.target === near), `${label(f)}: the nearest enemy`);
approx(near.x - 7, PUSH_TILES[Math.min(3, sbb.force + 1)], `${label(f)}: its force +1`, 0.06);
h.run(30);
assert.equal(c.skill.activations, 1, `${label(f)}: once per deployment`);
void farther;
done(h);
}
});
test('T1 工程蓄水炮: each attack pushes a ground target on the 3 tiles ahead with 小力 + 1 (weight 0: 2.14 tiles), a flyer is hit but not moved; it leaves after 20 s and comes back 35 s later (PUS-Y stage 3: 27 s) for 5 DP — not while 温蒂 is off the field', () => {
for (const f of [[5, false, null], [6, true, Y], [6, true, X]]) {
const [tier, elite, mod] = f;
const { h, u, c } = field({ tier, elite, mod, skill: 0, cannon: [11, 5], dp: 100 });
c.skill.charges = 0; // its forced skill spent: plain attacks only
const g = h.spawn('enemy_dummy', { pos: [11, 6] });
assert.ok(h.runUntil(() => from(h, c).some((x) => x.target === g), 3), `${label(f)}: attacks`);
h.run(0.2);
approx(from(h, c).find((x) => x.target === g).amount, c.s.atk, `${label(f)}: its own ATK`);
approx(g.x - 6, PUSH_TILES[1], `${label(f)}: 小力 + 1`, 0.06);
h.b.kill(g, null);
const fl = h.spawn('enemy_fly', { pos: [11, 6] });
assert.ok(h.runUntil(() => from(h, c).some((x) => x.target === fl), 4), `${label(f)}: hits air`);
assert.equal(fl.x, 6, `${label(f)}: no push on a flyer`);
h.b.kill(fl, null);
const t0 = c.deployedAt;
assert.ok(h.runUntil(() => !c.alive, 25), `${label(f)}: leaves`);
approx(h.b.time - t0, 20, `${label(f)}: after 20 s`, 0.05);
const resp = tokOf(tier, elite, 0, elite ? mod : null).stats.respawnTime;
assert.equal(resp, elite && tier === 6 && mod === Y ? 27 : 35);
const dp0 = h.b.players[0].dp;
h.run(resp - 0.5);
assert.ok(!c.alive, `${label(f)}: not before ${resp} s`);
assert.ok(h.runUntil(() => c.alive, 1), `${label(f)}: back`);
approx(h.b.players[0].dp, dp0 - 5, `${label(f)}: 5 DP`);
assert.deepEqual([c.tileR, c.tileC], [11, 5], `${label(f)}: on its tile`);
// 温蒂 off the field: it does not come back
h.run(20.1);
assert.ok(!c.alive);
h.b.retreat(u);
h.run(resp + 2);
assert.ok(!c.alive, `${label(f)}: not while she is away`);
done(h);
}
});
test('T2 蓄水炮强化: the cannon on one of the 4 tiles around her gives her 1 SP every 3 s (PUS-X stage 3: every 2 s and her ATK +20 %; stage 1: 3 s, no ATK); a diagonal cannon gives nothing', () => {
for (const f of FORMS_ALL) {
const [tier, elite, mod] = f;
const v = tokOf(tier, elite, 1, elite ? mod : null);
const boost = v.talents.find((t) => t.bb.base_force_level != null).bb;
const atkUp = v.talents.find((t) => t.bb.atk != null && t.bb.base_force_level == null)?.bb.atk ?? 0;
const x3 = elite && tier === 6 && mod === X;
assert.deepEqual([boost.interval, boost.sp, atkUp], x3 ? [2, 1, 0.2] : [3, 1, 0], label(f));
for (const [tile, on] of [[[11, 5], true], [[11, 6], false]]) {
const { h, u } = field({ tier, elite, mod, skill: 1, cannon: tile });
const sp0 = u.skill.sp;
h.run(6.01);
approx(u.skill.sp - sp0, 6 + (on ? 6 / boost.interval : 0), `${label(f)} ${on ? 'beside' : 'diagonal'}: SP`, 0.02);
approx(u.s.atk, u.base.atk * (1 + (on ? atkUp : 0)), `${label(f)}: ATK`);
done(h);
}
}
});
test('S3 with the cannon beside her: it fires its own 液氮炮 too (its nearest enemy, her ATK, its force +1); not when it stands elsewhere', () => {
for (const [tile, fires] of [[[11, 5], true], [[12, 5], false]]) {
const { h, u, c } = field({ tier: 6, elite: true, skill: 2, cannon: tile });
c.skill.charges = 0;
const cbb = c.def.skill.bb;
const a = h.spawn('enemy_dummy', { pos: [10, 9] });
const b = h.spawn('enemy_dummy', { pos: [tile[0], 7] });
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 1));
const shot = from(h, u, 'weedy:nitro');
assert.ok(shot.some((x) => x.target === a), 'hers');
assert.equal(shot.some((x) => x.target === b), fires, `the cannon at ${tile}`);
if (fires) approx(b.x - 7, PUSH_TILES[Math.min(3, cbb.force + 1)], 'its force +1', 0.06);
done(h);
}
});
test('PUS-X trait: redeployed on a 高台 she gets half her cost back (not at the battle start, not on the ground); PUS-Y trait: blocking two enemies her pushes are one level stronger', () => {
for (const [tile, ranged] of [[[10, 2], true], [[10, 5], false]]) {
for (const mod of [X, Y, null]) {
const { h, u } = field({ tier: 6, elite: true, mod, skill: 0, row: tile[0], col: tile[1], dp: 0 });
assert.equal(u.ground, !ranged, `${tile}: ground`);
approx(h.b.players[0].dp, 0, 'nothing at the start');
h.b.dealDamage(null, u, { amount: 1e9, type: 'true' });
h.b.players[0].dp = u.base.cost;
assert.ok(h.runUntil(() => u.alive, 80), 'redeployed');
approx(h.b.players[0].dp, mod === X && ranged ? u.base.cost * 0.5 : 0, `${mod ?? 'none'} on ${ranged ? 'a 高台' : 'the ground'}`);
done(h);
}
}
for (const mod of [Y, null]) {
const { h, u } = field({ tier: 6, elite: true, mod, skill: 0, row: 9, col: 5 });
h.b.addBuff(u, { key: 'test:noSp', flags: { noSp: true } }); // no S1 before both are blocked
const w1 = h.spawn('enemy_walk', { routeIndex: 0 });
h.run(1.2);
const w2 = h.spawn('enemy_walk', { routeIndex: 0 });
assert.ok(h.runUntil(() => u.blocking.length === 2, 40), 'two blocked');
const xs = [w1.x, w2.x];
h.b.removeBuff(u, 'test:noSp');
u.skill.gainSp(999);
assert.ok(h.runUntil(() => u.skill.activations === 1, 3));
h.step();
const moved = [w1.x - xs[0], w2.x - xs[1]];
for (const m of moved) approx(m, PUSH_TILES[mod === Y ? 2 : 1], `${mod ?? 'none'}: every blocked enemy pushed`, 0.08);
done(h);
}
});
+347 -96
View File
@@ -4495,8 +4495,8 @@
"snaps": "9e71a576 5f85bc01 c3ec0c6e 907b650d 8d0a1507 16eb2156 378d038b 6506577e 30807fb9 f2c86b9d ec752e72 d7303d83 83002a0a 01b70ca0 09e839c4 98d2358c 161de0dc 5f1fb139 3915cceb aeddf47d a8963bbe 76037450 84a29f92"
},
"diy-106": {
"about": "5_diy1_a=cdfend 5_diy2_b=cdfend 5_diy1_a=cguard 5_diy2_b=cguard 5_diy1_a=csnipe 5_diy2_b=csnipe 5_diy1_a=ccast 5_diy2_b=ccast 5_diy1_a=cmedic 5_diy2_b=cmedic 5_diy1_a=csuppo 5_diy2_b=csuppo",
"fast": true,
"about": "5_diy1_a=lmlee/S1 5_diy2_a=lmlee/S2 5_diy1_a=lmlee/S3 5_diy2_b=lmlee/S1 5_diy1_b=lmlee/S2 5_diy2_b=lmlee/S3 5_diy1_b=lmlee/S1/002_lmlee 5_diy2_b=lmlee/S2/002_lmlee 5_diy1_b=lmlee/S3/002_lmlee 5_diy2_b=lmlee/S1/003_lmlee 5_diy1_b=lmlee/S2/003_lmlee 5_diy2_b=lmlee/S3/003_lmlee",
"fast": false,
"kind": "normal",
"stageId": "act1autochess_m07",
"modeId": "mode_multi_abyss",
@@ -4512,111 +4512,111 @@
"bossHpLeft": null,
"rngDraws": 0,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":0,"total":126,"perfect":false,"leaks":126,"leaksUncounted":0,"coins":0,"dmg":59922,"bossDmg":0,"heal":8548,"deaths":25,"layerGains":{}}},
"players": {"p1":{"killed":0,"total":126,"perfect":false,"leaks":126,"leaksUncounted":0,"coins":0,"dmg":19818,"bossDmg":0,"heal":0,"deaths":3,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_5_diy1_a",2,null,0,0,3,0,1808,2128,0,8,0],
["p1",2,"op","chess_char_5_diy2_b",2,"none",0,0,6,0,9112,3634,0,34,1],
["p1",3,"op","chess_char_5_diy1_a",2,null,0,0,83,0,1003,6580,0,8,0],
["p1",4,"op","chess_char_5_diy2_b",2,"none",0,0,86,0,14738,7835,0,17,0],
["p1",5,"op","chess_char_5_diy1_a",2,null,0,0,153,0,9754,4473,0,27,1],
["p1",6,"op","chess_char_5_diy2_b",2,"none",0,0,94,0,11704,3746,0,27,1],
["p1",7,"op","chess_char_5_diy1_a",2,null,0,0,90,0,2802,2266,0,12,0],
["p1",8,"op","chess_char_5_diy2_b",2,"none",0,0,79,0,3020,2720,0,11,0],
["p1",9,"op","chess_char_5_diy1_a",2,null,0,0,141,0,0,5763,2109,6,0],
["p1",10,"op","chess_char_5_diy2_b",2,"none",0,0,128,0,0,3807,6439,10,1],
["p1",11,"op","chess_char_5_diy1_a",2,null,0,0,112,0,2354,1864,0,12,0],
["p1",12,"op","chess_char_5_diy2_b",2,"none",0,0,148,0,3628,4041,0,16,1],
["p1",1,"op","chess_char_5_diy1_a",0,null,1218.89,0,158,0,14565,6956,0,21,1],
["p1",2,"op","chess_char_5_diy2_a",1,null,869.83,0,149,0,2612,7457,0,10,0],
["p1",3,"op","chess_char_5_diy1_a",2,null,1218.89,0,155,0,2481,6607,0,6,0],
["p1",4,"op","chess_char_5_diy2_b",0,"none",2255,0,10,0,0,0,0,0,0],
["p1",5,"op","chess_char_5_diy1_b",1,"none",2255,0,12,0,0,0,0,0,0],
["p1",6,"op","chess_char_5_diy2_b",2,"none",2255,0,13,0,0,0,0,0,0],
["p1",7,"op","chess_char_5_diy1_b",0,"uniequip_002_lmlee",1301.6,0,14,0,160,1153,0,4,0],
["p1",8,"op","chess_char_5_diy2_b",1,"uniequip_002_lmlee",2455,0,3,0,0,0,0,0,0],
["p1",9,"op","chess_char_5_diy1_b",2,"uniequip_002_lmlee",2455,0,5,0,0,0,0,0,0],
["p1",10,"op","chess_char_5_diy2_b",0,"uniequip_003_lmlee",2255,0,7,0,0,0,0,0,0],
["p1",11,"op","chess_char_5_diy1_b",1,"uniequip_003_lmlee",2255,0,9,0,0,0,0,0,0],
["p1",12,"op","chess_char_5_diy2_b",2,"uniequip_003_lmlee",2255,0,11,0,0,0,0,0,0],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null]
],
"enemies": {"enemy_1251_lysyta_2":[54,0,54,8019,34461],"enemy_1252_lysytb_2":[42,0,42,35352,24551],"enemy_1329_cbshld_2":[30,0,30,5487,911]},
"hooks": [1,153,5814,380,380,358,358,16,25,151,5,5,0,8987,28,10,126,126,1,25,0,0,0],
"events": {"atk":380,"deploy":25,"die":25,"dmg":358,"heal":16,"leak":126,"skill":10,"spawn":140,"status":50},
"fx": {},
"snaps": "57186c39 a89f274b e649d7d9 75621917 006f6ba9 7f3b8dda bb3864de e8193348 16cc7f17 db8194aa e07167eb 0946e952 5d27c316 103f7135 f7e98be4 ef855c6a d34a4bb6 5d39faae c6e66696 77bde8df"
"enemies": {"enemy_1251_lysyta_2":[54,0,54,1457,12117],"enemy_1252_lysytb_2":[42,0,42,12367,7248],"enemy_1329_cbshld_2":[30,0,30,8350,454]},
"hooks": [1,158,5814,95,95,92,92,0,3,156,1,1,0,2003,0,17,126,126,1,3,0,0,0],
"events": {"atk":95,"deploy":30,"die":30,"dmg":92,"fx":2,"leak":126,"skill":2,"spawn":140},
"fx": {"shield":2},
"snaps": "159c1164 d2b6ffc8 0668197d 2db7be6b e584172b 8a5ed693 3ac4cfc0 23c24a79 367b4aa1 fcf2cef7 f3e4dafd 9b42a75e 79670066 90b42250 66293301 b580431d 0e3b1759 f58d36b7 814d8326 29e63ba9"
},
"diy-107": {
"about": "5_diy1_a=acfend 5_diy2_b=acfend 5_diy1_a=acpion 5_diy2_b=acpion 5_diy1_a=acguad 5_diy2_b=acguad 5_diy1_a=acnipe 5_diy2_b=acnipe 5_diy1_a=accast 5_diy2_b=accast 5_diy1_a=acmedc 5_diy2_b=acmedc",
"about": "6_diy1_a=lmlee/S1 6_diy2_a=lmlee/S2 6_diy1_a=lmlee/S3 6_diy2_b=lmlee/S1 6_diy1_b=lmlee/S2 6_diy2_b=lmlee/S3 6_diy1_b=lmlee/S1/002_lmlee 6_diy2_b=lmlee/S2/002_lmlee 6_diy1_b=lmlee/S3/002_lmlee 6_diy2_b=lmlee/S1/003_lmlee 6_diy1_b=lmlee/S2/003_lmlee 6_diy2_b=lmlee/S3/003_lmlee",
"fast": false,
"kind": "normal",
"stageId": "act2autochess_m01",
"modeId": "mode_multi_funny",
"round": 12,
"round": 13,
"seed": 4020340196,
"waveId": "act1autochess_h05",
"time": 203.3,
"ticks": 6099,
"waveId": "act1autochess_h06",
"time": 222.87,
"ticks": 6686,
"reason": "cleared",
"killed": 90,
"total": 90,
"killed": 2,
"total": 96,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 450,
"rngDraws": 5,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":90,"total":90,"perfect":true,"leaks":0,"leaksUncounted":0,"coins":0,"dmg":792864,"bossDmg":0,"heal":34212,"deaths":7,"layerGains":{}}},
"players": {"p1":{"killed":2,"total":96,"perfect":false,"leaks":94,"leaksUncounted":0,"coins":0,"dmg":22253,"bossDmg":0,"heal":0,"deaths":1,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_5_diy1_a",2,null,2604,1,106,0,2245,2604,0,9,1],
["p1",2,"op","chess_char_5_diy2_b",2,"uniequip_002_acfend",2367.8,1,105,0,4281,4374,0,19,1],
["p1",3,"op","chess_char_5_diy1_a",2,null,0,0,100,5,45221,3058,0,15,4],
["p1",4,"op","chess_char_5_diy2_b",2,"uniequip_002_acpion",0,0,7,3,48414,1904,0,24,6],
["p1",5,"op","chess_char_5_diy1_a",2,null,0,0,95,13,46166,11997,0,51,3],
["p1",6,"op","chess_char_5_diy2_b",2,"uniequip_002_acguad",3411,1,8,3,33047,3326,0,19,2],
["p1",7,"op","chess_char_5_diy1_a",2,null,1272,1,2,0,13858,0,0,19,1],
["p1",8,"op","chess_char_5_diy2_b",2,"uniequip_002_acnipe",1587,1,3,38,146945,0,0,177,2],
["p1",9,"op","chess_char_5_diy1_a",2,null,1372,1,4,1,19328,0,0,20,1],
["p1",10,"op","chess_char_5_diy2_b",2,"uniequip_002_accast",1495.56,1,12,27,433358,24418,0,89,3],
["p1",11,"op","chess_char_5_diy1_a",2,null,1224,1,1,0,0,0,11831,36,2],
["p1",12,"op","chess_char_5_diy2_b",2,"uniequip_002_acmedc",1414,1,5,0,0,0,22381,66,2]
["p1",1,"op","chess_char_6_diy1_a",0,null,1582.6,0,126,2,14373,2674,0,26,1],
["p1",2,"op","chess_char_6_diy2_a",1,null,1582.6,0,127,0,5396,2006,0,14,0],
["p1",3,"op","chess_char_6_diy1_a",2,null,1917,0,128,0,2484,1003,0,6,0],
["p1",4,"op","chess_char_6_diy2_b",0,"none",2255,0,4,0,0,0,0,0,0],
["p1",5,"op","chess_char_6_diy1_b",1,"none",2255,0,9,0,0,0,0,0,0],
["p1",6,"op","chess_char_6_diy2_b",2,"none",2255,0,5,0,0,0,0,0,0],
["p1",7,"op","chess_char_6_diy1_b",0,"uniequip_002_lmlee",2555,0,10,0,0,0,0,0,0],
["p1",8,"op","chess_char_6_diy2_b",1,"uniequip_002_lmlee",2555,0,1,0,0,0,0,0,0],
["p1",9,"op","chess_char_6_diy1_b",2,"uniequip_002_lmlee",2555,0,2,0,0,0,0,0,0],
["p1",10,"op","chess_char_6_diy2_b",0,"uniequip_003_lmlee",2255,0,6,0,0,0,0,0,0],
["p1",11,"op","chess_char_6_diy1_b",1,"uniequip_003_lmlee",2255,0,11,0,0,0,0,0,0],
["p1",12,"op","chess_char_6_diy2_b",2,"uniequip_003_lmlee",2255,0,12,0,0,0,0,0,0]
],
"enemies": {"enemy_1229_darmy":[27,27,0,3192,108864],"enemy_1229_darmy_2":[51,51,0,12310,269280],"enemy_9007_acelem":[12,12,0,36180,414720]},
"hooks": [1,106,6099,594,594,1735,1777,160,97,97,28,27,0,32480,0,62,90,0,1,97,0,2,0],
"events": {"atk":764,"deploy":16,"die":97,"dmg":1777,"fx":154,"heal":142,"skill":55,"spawn":102,"status":62},
"fx": {"aoe":52,"beam":25,"burst":2,"dp":18,"slash":57},
"snaps": "03984647 ace8dbe4 49520875 0ad8fbe6 ba7c56bb e58d0120 a539ef32 0e2bc9be 3b333b61 db04449a dace616b 63a39256 5c34a56e d1619dfd 63bd653a d74deb99 1d733ab1 6e8cbc08 04eb4bb7 74b3c8bb 80dc47fc"
"enemies": {"enemy_1229_darmy":[27,2,25,1478,8932],"enemy_1229_darmy_2":[57,0,57,3344,5984],"enemy_9007_acelem":[12,0,12,861,7337]},
"hooks": [1,128,6686,63,63,69,86,0,3,128,1,1,0,2101,0,22,96,94,1,3,0,0,0],
"events": {"atk":63,"deploy":32,"die":34,"dmg":86,"fx":10,"leak":94,"skill":2,"spawn":108,"status":16},
"fx": {"beam":8,"shield":2},
"snaps": "6357c51b ead1bfa0 733d4290 466ba4db eb4a8a98 670d4724 70843939 5d69355c bd7b9bf2 f058e948 dfff07cc 6d237f75 c2417977 a8fe0577 af47efb4 8a1a7c59 b437e8ce d646649c ff9ed20f 4be94191 d00d0c3b 70adb285 2ed652ac"
},
"diy-108": {
"about": "6_diy1_a=acfend 6_diy2_b=acfend 5_diy1_a=sharp2 5_diy2_b=sharp2 6_diy1_a=acpion 6_diy2_b=acpion 5_diy1_a=acspec 5_diy2_b=acspec 6_diy1_a=acguad 6_diy2_b=acguad 5_diy1_a=acsupo 5_diy2_b=acsupo",
"about": "5_diy1_a=weedy/S1 5_diy2_a=weedy/S2 5_diy1_a=weedy/S3 5_diy2_b=weedy/S1 5_diy1_b=weedy/S2 5_diy2_b=weedy/S3 5_diy1_b=weedy/S1/002_weedy 5_diy2_b=weedy/S2/002_weedy 5_diy1_b=weedy/S3/002_weedy 5_diy2_b=weedy/S1/003_weedy 5_diy1_b=weedy/S2/003_weedy 5_diy2_b=weedy/S3/003_weedy",
"fast": false,
"kind": "normal",
"stageId": "act2autochess_m02",
"modeId": "mode_single_hard",
"round": 13,
"round": 12,
"seed": 1366160473,
"waveId": "act1autochess_h06",
"time": 230,
"ticks": 6900,
"reason": "timeout",
"killed": 15,
"total": 36,
"waveId": "act1autochess_h05",
"time": 219.47,
"ticks": 6584,
"reason": "cleared",
"killed": 3,
"total": 72,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 95,
"rngDraws": 0,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":15,"total":36,"perfect":false,"leaks":21,"leaksUncounted":0,"coins":0,"dmg":223366,"bossDmg":0,"heal":0,"deaths":32,"layerGains":{}}},
"players": {"p1":{"killed":3,"total":72,"perfect":false,"leaks":69,"leaksUncounted":0,"coins":0,"dmg":42354,"bossDmg":0,"heal":0,"deaths":20,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_6_diy1_a",2,null,0,0,3,0,0,2604,0,0,0],
["p1",2,"op","chess_char_6_diy2_b",2,"uniequip_002_acfend",0,0,4,0,0,3431,0,0,0],
["p1",3,"op","chess_char_5_diy1_a",0,null,0,0,5,1,41288,1865,0,28,1],
["p1",4,"op","chess_char_5_diy2_b",0,"uniequip_002_sharp2",0,0,8,2,117437,2374,0,51,1],
["p1",5,"op","chess_char_6_diy1_a",2,null,1051.96,1,71,0,9905,3535,0,0,2],
["p1",6,"op","chess_char_6_diy2_b",2,"uniequip_002_acpion",0,0,68,0,22211,5712,0,0,2],
["p1",7,"op","chess_char_5_diy1_a",2,null,1154,1,72,0,0,10386,0,0,0],
["p1",8,"op","chess_char_5_diy2_b",2,"uniequip_002_acspec",1448,1,73,0,0,10136,0,0,0],
["p1",9,"op","chess_char_6_diy1_a",2,null,0,0,43,0,0,5276,0,0,0],
["p1",10,"op","chess_char_6_diy2_b",2,"uniequip_002_acguad",0,0,52,0,0,7062,0,0,0],
["p1",11,"op","chess_char_5_diy1_a",2,null,0,0,6,0,13315,1160,0,28,1],
["p1",12,"op","chess_char_5_diy2_b",2,"uniequip_002_acsupo",0,0,54,0,19210,2860,0,23,1],
["p1",1,"op","chess_char_5_diy1_a",0,null,1627.86,1,96,0,0,3361,0,0,0],
["p1",2,"op","chess_char_5_diy2_a",1,null,0,0,79,0,0,3326,0,0,0],
["p1",3,"op","chess_char_5_diy1_a",2,null,977.27,1,95,0,0,4012,0,0,0],
["p1",4,"op","chess_char_5_diy2_b",0,"none",0,0,90,0,0,3950,0,0,0],
["p1",5,"op","chess_char_5_diy1_b",1,"none",0,0,5,0,0,1975,0,0,0],
["p1",6,"op","chess_char_5_diy2_b",2,"none",0,0,8,3,23273,1975,0,0,1],
["p1",7,"op","chess_char_5_diy1_b",0,"uniequip_002_weedy",0,0,54,0,0,4230,0,0,0],
["p1",8,"op","chess_char_5_diy2_b",1,"uniequip_002_weedy",0,0,9,0,0,2115,0,0,0],
["p1",9,"op","chess_char_5_diy1_b",2,"uniequip_002_weedy",0,0,60,0,12841,4230,0,0,1],
["p1",10,"op","chess_char_5_diy2_b",0,"uniequip_003_weedy",0,0,63,0,0,3950,0,0,0],
["p1",11,"op","chess_char_5_diy1_b",1,"uniequip_003_weedy",0,0,61,0,0,3950,0,0,0],
["p1",12,"op","chess_char_5_diy2_b",2,"uniequip_003_weedy",0,0,3,0,6240,1975,0,0,1],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null]
],
"enemies": {"enemy_1005_yokai_2":[12,12,0,102,639],"enemy_1005_yokai_3":[12,0,11,29968,87430],"enemy_9009_acfort":[12,3,9,26331,135297]},
"hooks": [1,73,6900,439,439,497,550,0,47,67,8,24,0,10810,814,0,36,20,1,35,0,0,17],
"events": {"atk":472,"deploy":35,"die":47,"dmg":550,"fx":92,"leak":20,"skill":48,"spawn":50,"status":162},
"fx": {"beam":35,"dodge":21,"dp":4,"slash":32},
"snaps": "7c7487b3 43a949cf 206930da 90551654 2113b5a2 a7c4855b 59932997 42395489 3f83a15d ffbd721d 646072f3 fc3be7c4 b210ec54 960a9e51 aa1af455 09ccfce3 50e6e3d0 380e639b 9eaf5bef 3b943f89 3933d1fc 3718a2f5 a8ae4307"
"enemies": {"enemy_1005_yokai_2":[18,3,15,574,6428],"enemy_1041_lazerd_2":[24,0,24,38475,9533],"enemy_1042_frostd":[30,0,30,0,26393]},
"hooks": [1,96,6584,137,137,874,874,0,23,92,3,3,0,9736,0,0,72,69,1,23,0,0,0],
"events": {"atk":137,"deploy":22,"die":23,"dmg":874,"fx":3,"leak":69,"skill":6,"spawn":86,"status":48},
"fx": {"frostNova":3},
"snaps": "4a7dbd74 bbb82fff f9a6c70f 5cf2dcb9 d80d5f8c 73acb64f 356353db bc1e6270 d4c83a50 279baf03 5eef539e 6a796c84 3bbf1462 96c6cb96 d47fd448 07d45d91 557d4ed2 f422192d 082933c8 8b8f1455 7c616be7 5c99f332"
},
"diy-109": {
"about": "6_diy1_a=sharp2 6_diy2_b=sharp2 6_diy1_a=acspec 6_diy2_b=acspec 6_diy1_a=acnipe 6_diy2_b=acnipe 6_diy1_a=accast 6_diy2_b=accast 6_diy1_a=acmedc 6_diy2_b=acmedc 6_diy1_a=acsupo 6_diy2_b=acsupo",
"about": "6_diy1_a=weedy/S1 6_diy2_a=weedy/S2 6_diy1_a=weedy/S3 6_diy2_b=weedy/S1 6_diy1_b=weedy/S2 6_diy2_b=weedy/S3 6_diy1_b=weedy/S1/002_weedy 6_diy2_b=weedy/S2/002_weedy 6_diy1_b=weedy/S3/002_weedy 6_diy2_b=weedy/S1/003_weedy 6_diy1_b=weedy/S2/003_weedy 6_diy2_b=weedy/S3/003_weedy",
"fast": false,
"kind": "normal",
"stageId": "act2autochess_m03",
@@ -4624,38 +4624,289 @@
"round": 13,
"seed": 500258608,
"waveId": "act1autochess_h06",
"time": 215.33,
"ticks": 6460,
"time": 220.33,
"ticks": 6610,
"reason": "cleared",
"killed": 15,
"killed": 5,
"total": 123,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 453,
"rngDraws": 0,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":15,"total":123,"perfect":false,"leaks":108,"leaksUncounted":0,"coins":0,"dmg":280261,"bossDmg":0,"heal":30749,"deaths":28,"layerGains":{}}},
"players": {"p1":{"killed":5,"total":123,"perfect":false,"leaks":118,"leaksUncounted":0,"coins":0,"dmg":108307,"bossDmg":0,"heal":0,"deaths":20,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_6_diy1_a",0,null,0,0,5,0,1376,2285,0,5,0],
["p1",2,"op","chess_char_6_diy2_b",0,"uniequip_002_sharp2",0,0,7,0,982,2494,0,2,0],
["p1",3,"op","chess_char_6_diy1_a",2,null,1154,1,155,2,36128,9372,0,79,0],
["p1",4,"op","chess_char_6_diy2_b",2,"uniequip_002_acspec",1484,1,156,2,52788,20167,0,62,0],
["p1",5,"op","chess_char_6_diy1_a",2,null,0,0,140,4,59650,2964,0,77,1],
["p1",6,"op","chess_char_6_diy2_b",2,"uniequip_002_acnipe",0,0,154,6,91210,11325,0,66,1],
["p1",7,"op","chess_char_6_diy1_a",2,null,0,0,86,0,3596,3133,0,4,0],
["p1",8,"op","chess_char_6_diy2_b",2,"uniequip_002_accast",0,0,83,0,19042,8583,0,5,1],
["p1",9,"op","chess_char_6_diy1_a",2,null,0,0,4,0,0,2326,11819,20,1],
["p1",10,"op","chess_char_6_diy2_b",2,"uniequip_002_acmedc",0,0,10,0,0,4670,18930,25,1],
["p1",11,"op","chess_char_6_diy1_a",2,null,0,0,108,0,5752,2320,0,16,1],
["p1",12,"op","chess_char_6_diy2_b",2,"uniequip_002_acsupo",0,0,8,1,9738,1450,0,16,1],
["p1",1,"op","chess_char_6_diy1_a",0,null,256.46,1,148,0,0,4733,0,0,0],
["p1",2,"op","chess_char_6_diy2_a",1,null,0,0,123,0,0,3326,0,0,0],
["p1",3,"op","chess_char_6_diy1_a",2,null,0,0,141,0,0,4989,0,0,0],
["p1",4,"op","chess_char_6_diy2_b",0,"none",0,0,81,0,0,3950,0,0,0],
["p1",5,"op","chess_char_6_diy1_b",1,"none",0,0,131,0,334,3950,0,1,0],
["p1",6,"op","chess_char_6_diy2_b",2,"none",0,0,9,0,29441,1975,0,10,1],
["p1",7,"op","chess_char_6_diy1_b",0,"uniequip_002_weedy",0,0,5,2,4385,2185,0,5,1],
["p1",8,"op","chess_char_6_diy2_b",1,"uniequip_002_weedy",0,0,7,0,2776,2185,0,4,0],
["p1",9,"op","chess_char_6_diy1_b",2,"uniequip_002_weedy",812.74,1,89,3,42142,3557,0,20,2],
["p1",10,"op","chess_char_6_diy2_b",0,"uniequip_003_weedy",0,0,85,0,5807,3950,0,9,3],
["p1",11,"op","chess_char_6_diy1_b",1,"uniequip_003_weedy",0,0,82,0,21072,3950,0,22,0],
["p1",12,"op","chess_char_6_diy2_b",2,"uniequip_003_weedy",0,0,6,0,2350,1975,0,3,1],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null],
["-","~3","device","trap_1105_accrate",null,null,100,1,3,0,0,0,0,0,null]
],
"enemies": {"enemy_1019_jshoot_2":[57,10,47,52058,82202],"enemy_1299_ymkilr_2":[27,0,27,9819,9240],"enemy_1422_lrsldr_2":[39,5,34,9213,188819]},
"hooks": [1,156,6460,632,632,849,850,92,43,151,7,20,0,9133,611,30,123,108,1,43,0,0,0],
"events": {"atk":705,"deploy":30,"die":43,"dmg":822,"fx":36,"heal":76,"leak":108,"skill":42,"spawn":138,"status":149},
"fx": {"aoe":2,"displace":17,"dodge":2,"spGain":15},
"snaps": "17351197 d85b764f 170d4969 276e2353 d5273c76 84c8775e 178ead82 e788140a 7761c24b 8d4c0668 9647f92d 7caa4901 24e1ffd3 00675a6a 82e3afd4 846d95f4 87dfd927 4f075077 94a7b0a4 a3a639d3 4179fb65 3ad0ed6c"
"enemies": {"enemy_1019_jshoot_2":[57,3,54,28366,40125],"enemy_1299_ymkilr_2":[27,0,27,10213,7208],"enemy_1422_lrsldr_2":[39,2,37,2146,60973]},
"hooks": [1,148,6610,356,356,1019,1019,0,25,143,8,8,0,14447,4,26,123,118,1,25,0,0,0],
"events": {"atk":392,"deploy":22,"die":25,"dmg":1019,"fx":15,"leak":118,"skill":16,"spawn":138,"status":8},
"fx": {"displace":12,"frostNova":3},
"snaps": "b268a79d ecd07599 cb4586ec 1512193c fac9115b cd58018d 53b3595c 8156ae60 2cf46195 fc437ad2 f853b53a 65da5a29 904d6890 8baf30dd 2357d315 e7bce521 dfb8a381 c1af79ea 5c813138 21f014c4 c4e1fea8 cb28c2a3"
},
"diy-110": {
"about": "5_diy1_a=wang/S1 5_diy2_a=wang/S2 5_diy1_a=wang/S3 5_diy2_b=wang/S1 5_diy1_b=wang/S2 5_diy2_b=wang/S3 5_diy1_b=wang/S1/002_wang 5_diy2_b=wang/S2/002_wang 5_diy1_b=wang/S3/002_wang 6_diy1_a=wang/S1 6_diy2_a=wang/S2 6_diy1_a=wang/S3",
"fast": false,
"kind": "normal",
"stageId": "act2autochess_m04",
"modeId": "mode_multi_hard",
"round": 12,
"seed": 2140781790,
"waveId": "act1autochess_h05",
"time": 214.1,
"ticks": 6423,
"reason": "cleared",
"killed": 7,
"total": 102,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 0,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":7,"total":102,"perfect":false,"leaks":95,"leaksUncounted":0,"coins":0,"dmg":282960,"bossDmg":0,"heal":0,"deaths":9,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_5_diy1_a",0,null,1169,1,3,0,18847,0,0,218,1],
["p1",2,"op","chess_char_5_diy2_a",1,null,1169,1,4,0,22604,0,0,223,1],
["p1",3,"op","chess_char_5_diy1_a",2,null,1169,1,11,2,24330,0,0,17,1],
["p1",4,"op","chess_char_5_diy2_b",0,"none",1375,1,13,0,13761,0,0,123,1],
["p1",5,"op","chess_char_5_diy1_b",1,"none",1375,1,5,2,24344,0,0,232,1],
["p1",6,"op","chess_char_5_diy2_b",2,"none",1375,1,8,1,43517,0,0,10,1],
["p1",7,"op","chess_char_5_diy1_b",0,"uniequip_002_wang",1475,1,12,1,39069,0,0,220,1],
["p1",8,"op","chess_char_5_diy2_b",1,"uniequip_002_wang",1475,1,14,0,34242,0,0,209,1],
["p1",9,"op","chess_char_5_diy1_b",2,"uniequip_002_wang",1475,1,9,0,52661,0,0,10,1],
["p1",10,"op","chess_char_6_diy1_a",0,null,0,0,120,0,2596,3507,0,27,1],
["p1",11,"op","chess_char_6_diy2_a",1,null,0,0,116,0,4119,3507,0,21,1],
["p1",12,"op","chess_char_6_diy1_a",2,null,0,0,111,1,2870,3507,0,13,0],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null]
],
"enemies": {"enemy_1166_dusbr_2":[45,7,38,1698,209931],"enemy_1170_dushld_2":[27,0,27,6485,35447],"enemy_9011_acrefr":[30,0,30,2338,68341]},
"hooks": [1,122,6423,1335,1335,2191,2191,0,16,111,11,8,0,6412,0,11,102,95,1,16,0,0,0],
"events": {"atk":1335,"deploy":18,"die":16,"dmg":2191,"fx":40,"leak":95,"skill":19,"spawn":116,"status":102},
"fx": {"explode":19,"summon":21},
"snaps": "941f2507 1f02b017 b5a0bbcf b9e31d2e 528ae78e 91942887 6a303812 d84d1cae 7445eca2 7a7a2edb 84e23849 c7adb678 6170d754 bfd7e072 28926e7b b088035f 2fcbafb9 ec04b0b2 2200069d a865855b 7e919058 25616cc0"
},
"diy-111": {
"about": "5_diy1_a=cdfend 5_diy2_b=cdfend 5_diy1_a=cguard 5_diy2_b=cguard 6_diy1_b=wang/S1 6_diy2_b=wang/S2 6_diy1_b=wang/S3 6_diy2_b=wang/S1/002_wang 6_diy1_b=wang/S2/002_wang 6_diy2_b=wang/S3/002_wang 5_diy1_a=csnipe 5_diy2_b=csnipe",
"fast": true,
"kind": "normal",
"stageId": "act1autochess_m01",
"modeId": "mode_single_normal",
"round": 13,
"seed": 452407399,
"waveId": "act1autochess_h06",
"time": 230,
"ticks": 6900,
"reason": "timeout",
"killed": 16,
"total": 150,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 0,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":16,"total":150,"perfect":false,"leaks":134,"leaksUncounted":0,"coins":0,"dmg":312779,"bossDmg":0,"heal":0,"deaths":16,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_5_diy1_a",2,null,0,0,176,0,731,6384,0,35,1],
["p1",2,"op","chess_char_5_diy2_b",2,"none",1730.76,1,174,0,2424,4085,0,119,3],
["p1",3,"op","chess_char_5_diy1_a",2,null,0,0,170,1,10729,7692,0,29,0],
["p1",4,"op","chess_char_5_diy2_b",2,"none",0,0,165,3,14064,10002,0,39,1],
["p1",5,"op","chess_char_6_diy1_b",0,"none",1375,1,4,4,59537,0,0,248,1],
["p1",6,"op","chess_char_6_diy2_b",1,"none",1375,1,5,2,55344,0,0,248,1],
["p1",7,"op","chess_char_6_diy1_b",2,"none",1375,1,11,0,1565,0,0,5,1],
["p1",8,"op","chess_char_6_diy2_b",0,"uniequip_002_wang",1525,1,13,1,46927,0,0,234,1],
["p1",9,"op","chess_char_6_diy1_b",1,"uniequip_002_wang",1525,1,6,0,41495,0,0,199,1],
["p1",10,"op","chess_char_6_diy2_b",2,"uniequip_002_wang",1525,1,14,3,60994,0,0,17,1],
["p1",11,"op","chess_char_5_diy1_a",2,null,1271,1,177,0,809,3813,0,14,0],
["p1",12,"op","chess_char_5_diy2_b",2,"none",0,0,173,2,18159,4530,0,56,1],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null],
["-","~3","device","trap_1105_accrate",null,null,100,1,3,0,0,0,0,0,null]
],
"enemies": {"enemy_1249_lysdb_2":[60,4,54,18280,159416],"enemy_1251_lysyta":[51,12,38,3255,127868],"enemy_1329_cbshld":[39,0,39,14972,25495]},
"hooks": [1,177,6900,1530,1530,1556,1500,0,32,163,12,9,0,12955,0,38,150,131,1,32,0,0,0],
"events": {"atk":1530,"deploy":24,"die":32,"dmg":1500,"fx":70,"leak":131,"skill":21,"spawn":165},
"fx": {"explode":6,"shieldBreak":56,"summon":8},
"snaps": "d1aaf5af 35d6af59 2ab35dc8 9ba4fc0a 36713380 275c6ad9 edb1c4d5 34360102 6aef12cf dff9a82a 77deb5b4 8153a299 85dbad1c d5e5c3fa 48f6184e da987d4b d6e91782 a02ef9ed cc1fd38a 51cbcc8d 0eb59901 144d4ffd ef954f88"
},
"diy-112": {
"about": "5_diy1_a=acfend 5_diy2_b=acfend 5_diy1_a=acpion 5_diy2_b=acpion 5_diy1_a=acguad 5_diy2_b=acguad 5_diy1_a=ccast 5_diy2_b=ccast 5_diy1_a=cmedic 5_diy2_b=cmedic 5_diy1_a=csuppo 5_diy2_b=csuppo",
"fast": false,
"kind": "normal",
"stageId": "act1autochess_m02",
"modeId": "mode_multi_abyss",
"round": 12,
"seed": 3106580722,
"waveId": "act1autochess_h05",
"time": 197.6,
"ticks": 5928,
"reason": "cleared",
"killed": 5,
"total": 135,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 62,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":5,"total":135,"perfect":false,"leaks":130,"leaksUncounted":0,"coins":0,"dmg":185275,"bossDmg":0,"heal":1681,"deaths":24,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_5_diy1_a",2,null,0,0,3,0,2926,2604,0,22,0],
["p1",2,"op","chess_char_5_diy2_b",2,"uniequip_002_acfend",0,0,1,1,20026,3371,0,42,1],
["p1",3,"op","chess_char_5_diy1_a",2,null,1529,1,160,1,23977,3058,0,14,2],
["p1",4,"op","chess_char_5_diy2_b",2,"uniequip_002_acpion",0,0,100,1,55389,3808,0,31,3],
["p1",5,"op","chess_char_5_diy1_a",2,null,0,0,125,0,17384,5276,0,16,1],
["p1",6,"op","chess_char_5_diy2_b",2,"uniequip_002_acguad",0,0,149,1,33388,6822,0,19,1],
["p1",7,"op","chess_char_5_diy1_a",2,null,0,0,104,0,6865,2266,0,17,1],
["p1",8,"op","chess_char_5_diy2_b",2,"none",0,0,98,0,16470,3087,0,37,1],
["p1",9,"op","chess_char_5_diy1_a",2,null,0,0,159,0,0,4208,1476,3,1],
["p1",10,"op","chess_char_5_diy2_b",2,"none",0,0,95,0,0,3508,206,1,1],
["p1",11,"op","chess_char_5_diy1_a",2,null,0,0,137,0,1304,2796,0,4,0],
["p1",12,"op","chess_char_5_diy2_b",2,"none",0,0,109,1,7547,2262,0,19,1]
],
"enemies": {"enemy_2021_syfish":[105,5,100,10120,180575],"enemy_2025_syufo":[30,0,30,32947,4699]},
"hooks": [1,160,5928,492,492,643,752,4,29,159,13,13,0,12002,22,25,135,130,1,50,0,13,16],
"events": {"atk":492,"deploy":25,"die":29,"dmg":752,"fx":103,"heal":4,"leak":130,"skill":26,"spawn":147,"status":96},
"fx": {"aoe":30,"burst":13,"dodge":16,"dp":7,"slash":37},
"snaps": "3c77b2f2 2d68717f e1b87890 e08ce3ac 8a5e7f1f 31ef2cc5 8b253efe 370529ae 3775dd9d 50244d35 5a945311 165da72c 11bc641a ffc8aafe 9cfca40e dd5a9212 99088f8a b69dee9f 2eea76c2 190540f3"
},
"diy-113": {
"about": "5_diy1_a=sharp2 5_diy2_b=sharp2 5_diy1_a=acspec 5_diy2_b=acspec 5_diy1_a=acnipe 5_diy2_b=acnipe 5_diy1_a=accast 5_diy2_b=accast 5_diy1_a=acmedc 5_diy2_b=acmedc 5_diy1_a=acsupo 5_diy2_b=acsupo",
"fast": false,
"kind": "normal",
"stageId": "act1autochess_m03",
"modeId": "mode_multi_funny",
"round": 12,
"seed": 1466195980,
"waveId": "act1autochess_h05",
"time": 211.27,
"ticks": 6338,
"reason": "cleared",
"killed": 151,
"total": 189,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 770,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":151,"total":189,"perfect":false,"leaks":38,"leaksUncounted":0,"coins":0,"dmg":422472,"bossDmg":0,"heal":50683,"deaths":3,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_5_diy1_a",0,null,1865,1,204,5,28825,1865,0,96,2],
["p1",2,"op","chess_char_5_diy2_b",0,"uniequip_002_sharp2",2374,1,200,63,91421,3702,0,121,2],
["p1",3,"op","chess_char_5_diy1_a",2,null,1154,1,179,1,15866,19963,0,168,0],
["p1",4,"op","chess_char_5_diy2_b",2,"uniequip_002_acspec",1448,1,11,4,39522,20556,0,195,0],
["p1",5,"op","chess_char_5_diy1_a",2,null,1272,1,8,17,17523,0,0,96,2],
["p1",6,"op","chess_char_5_diy2_b",2,"uniequip_002_acnipe",1587,1,12,15,48134,0,0,116,2],
["p1",7,"op","chess_char_5_diy1_a",2,null,1372,1,14,12,30073,0,0,50,2],
["p1",8,"op","chess_char_5_diy2_b",2,"uniequip_002_accast",1749,1,4,26,80564,0,0,71,2],
["p1",9,"op","chess_char_5_diy1_a",2,null,1224,1,6,0,0,0,26547,60,2],
["p1",10,"op","chess_char_5_diy2_b",2,"uniequip_002_acmedc",1414,1,9,0,0,9990,24136,55,2],
["p1",11,"op","chess_char_5_diy1_a",2,null,1160,1,13,6,23978,0,0,139,2],
["p1",12,"op","chess_char_5_diy2_b",2,"uniequip_002_acsupo",1430,1,15,2,46566,0,0,129,2],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null],
["-","~3","device","trap_1105_accrate",null,null,100,1,3,0,0,0,0,0,null]
],
"enemies": {
"enemy_1197_sfshu": [18,16,2,121,39812],
"enemy_1197_sfshu_2": [27,22,5,11140,77179],
"enemy_1198_msfshu": [48,40,8,0,123],
"enemy_1198_msfshu_2": [66,56,10,0,234],
"enemy_9010_acpupp": [30,17,13,44816,305124]
},
"hooks": [1,207,6338,1448,1448,1915,1565,173,154,192,20,21,0,36912,6057,35,189,38,1,177,0,0,0],
"events": {"atk":1625,"deploy":15,"die":154,"dmg":1563,"fx":187,"heal":142,"leak":38,"skill":46,"spawn":204,"status":841},
"fx": {"aoe":10,"dodge":10,"ember":23,"revive":2,"shieldBreak":78,"spGain":3,"summon":38,"telegraph":23},
"snaps": "ef5e10e1 f8ef6202 0856fbf3 743f7e3c bdd7c9df fbb1f33e d7aef25c 62f3b029 6462dcba a814041c 5c101efb e2611c0f 4077ab11 206c4c48 2e64350a 0cb2085c 5cf33d8a 34d88b74 6d33ce13 1a4e3d75 902d09d3 34dd3e78"
},
"diy-114": {
"about": "6_diy1_a=acfend 6_diy2_b=acfend 6_diy1_a=acpion 6_diy2_b=acpion 6_diy1_a=acguad 6_diy2_b=acguad 6_diy1_a=acnipe 6_diy2_b=acnipe 6_diy1_a=accast 6_diy2_b=accast 6_diy1_a=acmedc 6_diy2_b=acmedc",
"fast": false,
"kind": "normal",
"stageId": "act1autochess_m04",
"modeId": "mode_single_hard",
"round": 13,
"seed": 4120508441,
"waveId": "act1autochess_h06",
"time": 211.47,
"ticks": 6344,
"reason": "cleared",
"killed": 108,
"total": 183,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 552,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":108,"total":183,"perfect":false,"leaks":75,"leaksUncounted":0,"coins":0,"dmg":569355,"bossDmg":0,"heal":49617,"deaths":16,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_6_diy1_a",2,null,0,0,170,2,646,5208,0,11,1],
["p1",2,"op","chess_char_6_diy2_b",2,"uniequip_002_acfend",3431,1,207,3,16580,3431,0,28,1],
["p1",3,"op","chess_char_6_diy1_a",2,null,0,0,178,6,1769,3058,0,7,2],
["p1",4,"op","chess_char_6_diy2_b",2,"uniequip_002_acpion",0,0,152,13,48051,7165,0,39,3],
["p1",5,"op","chess_char_6_diy1_a",2,null,0,0,194,3,45541,20360,0,67,3],
["p1",6,"op","chess_char_6_diy2_b",2,"uniequip_002_acguad",1,1,205,3,73708,14091,0,70,3],
["p1",7,"op","chess_char_6_diy1_a",2,null,1272,1,4,4,15133,0,0,34,2],
["p1",8,"op","chess_char_6_diy2_b",2,"uniequip_002_acnipe",1643,1,5,39,102309,0,0,185,3],
["p1",9,"op","chess_char_6_diy1_a",2,null,1372,1,15,2,190213,0,0,75,2],
["p1",10,"op","chess_char_6_diy2_b",2,"uniequip_002_accast",0,0,157,11,75404,3638,0,29,1],
["p1",11,"op","chess_char_6_diy1_a",2,null,0,0,145,0,0,5382,14474,25,2],
["p1",12,"op","chess_char_6_diy2_b",2,"uniequip_002_acmedc",0,0,141,0,0,24140,35143,45,2],
["-","~1","device","trap_1105_accrate",null,null,100,1,1,0,0,0,0,0,null],
["-","~2","device","trap_1105_accrate",null,null,100,1,2,0,0,0,0,0,null],
["-","~3","device","trap_1105_accrate",null,null,100,1,3,0,0,0,0,0,null]
],
"enemies": {
"enemy_1197_sfshu": [15,10,5,3608,50780],
"enemy_1197_sfshu_2": [39,20,19,19927,153485],
"enemy_1198_msfshu": [30,21,9,0,67],
"enemy_1198_msfshu_2": [60,47,13,0,195],
"enemy_9010_acpupp": [39,10,29,49219,443858]
},
"hooks": [1,207,6344,800,800,3158,2921,145,124,199,25,23,0,25007,0,55,183,75,1,144,0,0,15],
"events": {"atk":991,"deploy":21,"die":124,"dmg":2921,"fx":210,"heal":125,"leak":75,"skill":48,"spawn":198,"status":22},
"fx": {"aoe":45,"dodge":15,"dp":24,"ember":11,"revive":1,"shieldBreak":35,"slash":36,"spGain":2,"summon":30,"telegraph":11},
"snaps": "acd854e9 b9f7cc4f 3712bbfa 1c0f22b1 f383429e eef02120 58be1170 cac5fb4b fb5760b0 40f677c1 61597d23 3c76af95 16bbb8e1 63da3fda 1474707d 354bc689 ac3b2399 2d6718dd 4577d3fd cc919f09 6ccbba2f 92e55460"
},
"diy-115": {
"about": "6_diy1_a=sharp2 6_diy2_b=sharp2 6_diy1_a=acspec 6_diy2_b=acspec 6_diy1_a=acsupo 6_diy2_b=acsupo",
"fast": false,
"kind": "normal",
"stageId": "act1autochess_m05",
"modeId": "mode_multi_normal",
"round": 13,
"seed": 2479968306,
"waveId": "act1autochess_h06",
"time": 225.33,
"ticks": 6760,
"reason": "cleared",
"killed": 12,
"total": 123,
"unspawned": 0,
"bossHpLeft": null,
"rngDraws": 169,
"errors": {"count":0,"kinds":[]},
"players": {"p1":{"killed":12,"total":123,"perfect":false,"leaks":111,"leaksUncounted":0,"coins":0,"dmg":249484,"bossDmg":0,"heal":0,"deaths":20,"layerGains":{}}},
"units": [
["p1",1,"op","chess_char_6_diy1_a",0,null,0,0,146,4,32431,5595,0,37,1],
["p1",2,"op","chess_char_6_diy2_b",0,"uniequip_002_sharp2",0,0,144,5,64091,7482,0,44,1],
["p1",3,"op","chess_char_6_diy1_a",2,null,1154,1,147,0,14524,8078,0,83,0],
["p1",4,"op","chess_char_6_diy2_b",2,"uniequip_002_acspec",1484,1,145,2,43730,10388,0,85,0],
["p1",5,"op","chess_char_6_diy1_a",2,null,1160,1,5,0,31540,0,0,62,2],
["p1",6,"op","chess_char_6_diy2_b",2,"uniequip_002_acsupo",1450,1,6,0,63168,0,0,91,2]
],
"enemies": {"enemy_1006_shield_3":[21,0,21,8087,71414],"enemy_1043_zomsbr":[66,12,54,1190,188671],"enemy_1402_tgshd_2":[36,0,36,22266,105615]},
"hooks": [1,147,6760,462,462,3535,3598,30697,32,143,6,20,0,11458,6246,32,123,111,1,32,0,0,0],
"events": {"atk":509,"deploy":24,"die":32,"dmg":3505,"fx":340,"leak":111,"skill":44,"spawn":129,"status":789},
"fx": {"displace":19,"expose":321},
"snaps": "ddc538a1 cbceb698 326b4898 f6e27d08 15a0f45e af16dd25 93dea0ab 97d57fc4 a8846bcd 6e0d1701 06f10639 94321c5b bd3f8f0a a16c3881 f2bfdae7 ad792514 96873558 72ca0dbd 940adf20 150cbbe6 06e3dc3b 58c0231f 29f31a26"
}
}
}