Files
ark-stronghold-protocol/server/sim/content/kits/ops/chess_char_4_15-reckpr.js
T
sganggs 027c8477eb feedback5 WE1: the 「治疗生命值低于50%」 module heal compares HP as its client buff does — 华法琳 / 闪灵 ≤, 瑕光 / 古米 / 塞雷娅 / 录武官 < (follow-up 19)
PRTS gives only the display text; the client's module buffs decide (local [uc]equips.ab + buff_template_data, extracted
2026-10-06): 瑕光 / 古米 / 塞雷娅 GUA-X set_heal_scale_by_hpratio (FilterByTargetHpRatio LT), 录武官 reckpr_e_002_tr (LT),
Touch acmedc_e_tr (LT); 华法琳 bldsk_e_002_tr and 闪灵 shining_e_003_tr — like 黍's GUA-X and 凯尔希's PHY-X —
heal_scale_up[hpratio][LE].

- kits/shared/tier4.js installLowHpHealBonus and tier5.js lowHpHealUp take { atOrBelow }; 华法琳 (tier 4 and 5) and 闪灵's
  PHY-X heal ×1.15 at or below 50 %; the strictly-below kits keep `<` and cite their template.

Golden: no scenario moved (no heal of the corpus lands on an ally at exactly 50 % HP).

Tests: test/content/feedback5-lowhp-heal.test.js (new, 2); kits_t4, kits_alt_t4, kits_t5, kits_alt_t5, op_shining,
standin_acmedc pass.
2026-10-06 15:51:43 +08:00

42 lines
2.3 KiB
JavaScript

// server/sim/content/kits/ops/chess_char_4_15-reckpr.js — 录武官 (char_4196_reckpr) kit, tier 4 (hidden).
// Conventions of the tier-4 kits: ../shared/tier4.js; kit contract and rules: ../README.md.
import { COLS } from '../../../constants.js';
import { isHpLoss } from '../../../damage.js';
import { num, tbb, keySet, skillActive, installLowHpHealBonus, withDefaults } from '../shared/tier4.js';
export default withDefaults({
// ===== 录武官 (physician, hidden) S2 一点关窍 — +ATK; healed allies regain 80 HP per hit taken for 10 s; 学成于聚
chess_char_4_15_a: (bb, chess, def) => {
const t0 = tbb(def, 0);
const tb = def.traitBb || {};
return {
skill: {
kind: 'duration', heal: true,
mods: { atkPct: num(bb.atk) },
onStart({ battle, unit }) { battle.fx('knack', { x: unit.x, y: unit.y, id: unit.id }); },
onHit({ battle, unit, target }) {
if (target && target.alive && target.side === 'ally' && target.kind === 'op') battle.addBuff(target, { key: `reckpr:guard:${unit.id}`, duration: num(bb['attack@buff_duration'], 10), visible: true, source: unit });
},
},
talents: [{ install(battle, unit) { // 学成于聚: an operator in range casts ⇒ +1 SP and ASPD +16 for 8 s
battle.on('skillStart', (c) => {
const a = c.unit;
if (a === unit || a.side !== 'ally' || a.kind !== 'op' || !unit.alive || !unit.deployed || !keySet(unit).has(a.tileR * COLS + a.tileC)) return;
if (!battle.rng.chance(num(t0.prob, 1))) return;
if (!skillActive(unit)) unit.skill?.gainSp(num(t0.sp, 1), 'talent');
battle.addBuff(unit, { key: 'reckpr:t1', duration: num(t0.duration, 8), mods: { aspd: num(t0.attack_speed, 16) }, maxStacks: Math.max(1, num(t0.max_stack_cnt, 1)) });
}, { owner: unit });
} }],
install(battle, unit) {
battle.on('damaged', (c) => {
const t = c.target;
if (t.side !== 'ally' || !t.alive || !(c.amount > 0) || isHpLoss(c.dmg) || !t.findBuff(`reckpr:guard:${unit.id}`)) return;
battle.heal(unit, t, num(bb['attack@fixed_heal_value'], 80));
}, { owner: unit });
installLowHpHealBonus(battle, unit, tb); // PHY-X: reckpr_e_002_tr filters LT (strictly below)
},
};
},
});