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.
This commit is contained in:
1 parent
cd180bc752
commit
027c8477eb
12 files changed
+72
-15
No files matched your search
@@ -146,10 +146,16 @@ function pullToFront(battle, unit, e, force) {
|
||||
}
|
||||
|
||||
/** Physician module trait (录武官, 华法琳 elites): heals on allies below hp_ratio are ×heal_scale. */
|
||||
function installLowHpHealBonus(battle, unit, tb) {
|
||||
/**
|
||||
* The module trait "治疗生命值低于50%的友方单位时治疗量提升15%" (heal_scale, hp_ratio): the client's module buff filters the
|
||||
* target's HP before the heal with its own comparison — `atOrBelow` for the template heal_scale_up[hpratio][LE] (华法琳's
|
||||
* PHY-X), strictly below otherwise (录武官's reckpr_e_002_tr: LT). [ASSUMED as before: not on herself]
|
||||
*/
|
||||
function installLowHpHealBonus(battle, unit, tb, { atOrBelow = false } = {}) {
|
||||
const s = num(tb.heal_scale, 0), r = num(tb.hp_ratio, 0);
|
||||
if (!(s > 0) || !(r > 0)) return;
|
||||
battle.on('heal', (c) => { if (c.source === unit && c.target !== unit && c.target.hpRatio < r) c.amount *= s; }, { owner: unit });
|
||||
const low = atOrBelow ? (t) => t.hpRatio <= r + 1e-9 : (t) => t.hpRatio < r;
|
||||
battle.on('heal', (c) => { if (c.source === unit && c.target !== unit && low(c.target)) c.amount *= s; }, { owner: unit });
|
||||
}
|
||||
|
||||
// DESIGN §5.6 documents `(bb, chess)`; content/index.js also passes the normalised def — rebuild it when absent.
|
||||
|
||||
@@ -150,13 +150,18 @@ function burstDamageUp(battle, unit, mul) {
|
||||
}, { owner: unit });
|
||||
}
|
||||
|
||||
/** Modules PHY-X / GUA-X: heals on allies below hp_ratio ×heal_scale. */
|
||||
function lowHpHealUp(battle, unit, tb) {
|
||||
/**
|
||||
* Modules PHY-X / GUA-X "治疗生命值低于50%的友方单位时治疗量提升15%": heals on allies below hp_ratio ×heal_scale. The client's
|
||||
* module buff picks its comparison: `atOrBelow` for heal_scale_up[hpratio][LE] (华法琳's PHY-X), strictly below for 塞雷娅's
|
||||
* GUA-X (set_heal_scale_by_hpratio: LT) and 录武官's PHY-X (reckpr_e_002_tr: LT).
|
||||
*/
|
||||
function lowHpHealUp(battle, unit, tb, { atOrBelow = false } = {}) {
|
||||
const mul = num(tb.heal_scale), thr = num(tb.hp_ratio);
|
||||
if (!(mul > 1) || !(thr > 0)) return;
|
||||
const low = atOrBelow ? (t) => t.hpRatio <= thr + 1e-9 : (t) => t.hpRatio < thr;
|
||||
battle.on('heal', (c) => {
|
||||
if (c.source !== unit || c.opts?.regen || !c.target || c.target.side !== 'ally') return;
|
||||
if (c.target.hpRatio < thr) c.amount *= mul;
|
||||
if (low(c.target)) c.amount *= mul;
|
||||
}, { owner: unit });
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user