Pure move: every line of a kit, of a helper and of the tier headers is copied verbatim (only the headers' first
line names the new file); a helper used by one kit moved into that kit's file. Glue only: the generated imports,
`export default { … }` around each registry entry, `export { … }` lists in shared/tier2..6.js, and tier4's
`(bb, chess, def)` default-argument wrapper as shared/tier4.js `withDefaults` (applied in each tier-4 kit file).
kits/index.js loads every kit file with a guarded dynamic import (browser-safe, no directory listing); tierN.js
re-export the tier registry (TIER_KITS) and their old named exports (tier1 helpers + tinmanKit, tier6
PITHST_ELEMENTS). The merged registry, every tier default and named export have the same keys, order, frozenness
and function sources as before. test/docs-consistency.test.js reads the moved code at its new paths.
Golden: GOLDEN_FULL=1 node --test test/golden.test.js unchanged.
30 lines
1.5 KiB
JavaScript
30 lines
1.5 KiB
JavaScript
// server/sim/content/kits/ops/chess_char_2_14-flower.js — 调香师 (char_181_flower) kit, tier 2.
|
||
// Conventions of the tier-2 kits: ../shared/tier2.js; kit contract and rules: ../README.md.
|
||
|
||
import { num, talentBb, moduleBb, up } from '../shared/tier1.js';
|
||
|
||
export default {
|
||
// ---------------------------------------------------------------------------------------------------------------
|
||
// 2_14 调香师 精调: ASPD +attack_speed (−50), ATK +atk. 熏衣草: every ally on the field recovers
|
||
// atk_to_hp_recovery_ratio × ATK HP per second. Elite module (RIN-Y, hidden attack@max_target): heals 4 allies.
|
||
// S1 治疗强化·β型 (alt): ATK +atk for its duration.
|
||
chess_char_2_14_a: (bb, chess) => {
|
||
const t = talentBb(chess, 0);
|
||
const cnt = Math.floor(num(moduleBb(chess)['attack@max_target']));
|
||
return {
|
||
trait: cnt > 0 ? { heal: { mode: 'multi', count: cnt } } : undefined,
|
||
skill: { kind: 'duration', heal: true, mods: { atkPct: num(bb.atk), aspd: num(bb.attack_speed) } },
|
||
skills: { 'skcom_heal_up[2]': { kind: 'duration', heal: true, mods: { atkPct: num(bb.atk) } } },
|
||
talents: [{ install(battle, unit) {
|
||
const r = num(t.atk_to_hp_recovery_ratio);
|
||
if (!(r > 0)) return;
|
||
battle.every(1, () => {
|
||
if (!up(unit)) return;
|
||
const amt = unit.s.atk * r;
|
||
for (const a of battle.alliesFor(unit)) if (a.hp < a.s.maxHp) battle.heal(unit, a, amt, { aura: true, tags: ['talent'] });
|
||
}, { owner: unit });
|
||
} }],
|
||
};
|
||
},
|
||
};
|