PRTS: 分支特性信息 吟游者 「特性为基于自身攻击力来增加受益者的“生命回复速度”属性」 (魔王, 浊心斯卡蒂); the 备注 of 调香师 熏衣草, 瑕光 S2, 铃兰 S3 and 锡人 S2 「生命恢复的提供方式为增加目标的“生命回复速度”属性…不受治疗加成和禁疗影响」 (铃兰: none in the first second, refreshed every second); 异常效果 禁疗 「增减生命回复速度…的效果不会被识别为治疗类能力」. These were heals from the provider, which damage.js refused on 收割者 / 不屈者 / 武者 (noHeal) and under 禁疗 — 隐德来希 gained nothing under 魔王. This is the separation proposed in PR #135 by @SpiritedAwayCN, written anew (the PR's patch is not used): - professions.js bardRegen: the trait is an hpRegen buff per bard refreshed every 0.25 s; 魔王's 微尘 ×1.5 goes through its `bardRegen` hook (both 魔王 kits); 浊心斯卡蒂's pulse and the 海嗣 token use it too. - 调香师 (every ally), 瑕光 S2 (the skill range, removed at its end), 铃兰 S3 (from the first full second, removed at its end), 锡人 (per 炼金单元, its cached ATK): hpRegen buffs instead of battle.heal. - damage.js: a `regen` tick takes no healing multiplier and a heal hook cannot change its amount (no 治疗加成 on any 生命回复速度); 流明's 凡人之愿 and 华法琳's S1 bonus skip a regen tick of their own. Direct heals are unchanged (still refused / scaled); 魔王 S3's redistribution and 纯烬's HoT are untouched. Other per-second recoveries without such a note stay heals (引星棘刺, 塞雷娅 S3, 流明 / 纯烬 HoTs; 余 闲云隐市 and 天马之盔 left open). Golden moved (every one fields 魔王 / 浊心斯卡蒂 / 调香师 / 瑕光 S2 / 铃兰 / 锡人): roster-004, roster-005, roster-006, roster-011, roster-013, roster-015, roster-016, roster-018, roster-023, roster-025, roster-030, roster-032, roster-035, roster-037, roster-039, roster-041, roster-042, roster-045, roster-046; bond-deputShip-high, bond-emptyShip-low, bond-emptyShip-high, bond-indomShip-high, bond-kazimierzShip-low, bond-kazimierzShip-high, bond-sargonShip-low, bond-sargonShip-high, bond-skillfulShip-high; boss-boss_1-pair, boss-boss_1-solo, boss-boss_2-solo, boss-boss_3-pair, boss-boss_3-solo, boss-boss_4-solo, boss-boss_5-pair, boss-boss_5-solo, boss-boss_6-solo, boss-boss_7-pair, boss-boss_7-solo, hidden-boss_8-solo, hidden-boss_9-pair, hidden-boss_9-solo, hidden-boss_10-solo, unite-1; solo-NORMAL-1, solo-HARD-1, solo-ABYSS-1, coop4-ABYSS-7, coop2-NORMAL-8-serverrun, coop2-NORMAL-14-standins. Docs: SIM.md (heal pipeline, bard row), PLAYING.md, kits/README.md (checklist item 11).
60 lines
3.2 KiB
JavaScript
60 lines
3.2 KiB
JavaScript
// server/sim/content/kits/ops/chess_char_5_04-bldsk.js — 华法琳 (char_171_bldsk) kit, tier 5 (hidden).
|
||
// Conventions of the tier-5 kits: ../shared/tier5.js; kit contract and rules: ../README.md.
|
||
|
||
import { HALF_HP, NEVER, num, on, inRange, talent, traitBb, lowHpHealUp } from '../shared/tier5.js';
|
||
|
||
export default {
|
||
// ---------------------------------------------------------------------------------------------------------------
|
||
// 华法琳 — S1 紧急包扎 (charges, attack SP): the next heal on a target below half HP adds hp_ratio × its max HP.
|
||
// T1 血液样本回收: an enemy dying in range → +2 SP to herself and to a random ally in range.
|
||
// Module (elite): heals on allies below 50 % ×1.15.
|
||
chess_char_5_04_a: (bb, chess) => {
|
||
const t0 = talent(chess, 0), tb = traitBb(chess);
|
||
const ratio = num(bb.hp_ratio);
|
||
return {
|
||
skill: {
|
||
kind: 'charges', heal: true, trigger: NEVER,
|
||
onStart({ unit }) { unit.mem.bldskBonus = unit.mem.bldskTarget ?? null; },
|
||
},
|
||
talents: [{ install(battle, unit) { // 血液样本回收
|
||
battle.on('kill', (c) => {
|
||
const v = c.victim;
|
||
if (v.side !== 'enemy' || !on(unit) || !inRange(unit, v)) return;
|
||
unit.skill?.gainSp(num(t0['bldsk_t_1[self].sp']), 'talent');
|
||
const others = battle.alliesInGrid(unit).filter((a) => a !== unit && a.skill && !a.skill.noSkill && a.skill.kind !== 'passive');
|
||
const pick = battle.rng.pick(others);
|
||
if (pick) pick.skill.gainSp(num(t0['bldsk_t_1[rand].sp']), 'talent');
|
||
}, { owner: unit });
|
||
} }],
|
||
install(battle, unit) {
|
||
// the skill only fires for a heal target below half HP: checked right before the heal
|
||
battle.on('beforeAttack', (c) => {
|
||
if (c.attacker !== unit) return;
|
||
unit.mem.bldskNoSp = false;
|
||
const sk = unit.skill;
|
||
if (!sk || !sk.ready || unit.s.flags.silence) return;
|
||
const t = c.targets[0];
|
||
if (!t || t.side !== 'ally' || !(t.hpRatio < HALF_HP)) return;
|
||
unit.mem.bldskTarget = t;
|
||
// the heal made by the skill recovers no attack SP (engine rule for skill attacks: cost N ⇒ every N+1 heals)
|
||
if (sk.activate('DEFAULT')) unit.mem.bldskNoSp = true;
|
||
unit.mem.bldskTarget = null;
|
||
}, { owner: unit });
|
||
battle.on('spGain', (c) => {
|
||
if (c.unit !== unit || c.reason !== 'attack' || !unit.mem.bldskNoSp) return;
|
||
unit.mem.bldskNoSp = false;
|
||
c.amount = 0;
|
||
}, { owner: unit, priority: 100 });
|
||
battle.on('heal', (c) => { // merged into the same heal
|
||
if (c.source !== unit || c.opts?.regen || !unit.mem.bldskBonus || c.target !== unit.mem.bldskBonus) return; // (not her own 生命回复速度 tick)
|
||
unit.mem.bldskBonus = null;
|
||
// the bonus is part of the same heal: the healer's and the target's healing multipliers apply to it too
|
||
c.amount += c.target.s.maxHp * ratio * num(unit.s.healingDealtMul, 1) * num(c.target.s.healingTakenMul, 1);
|
||
battle.fx('healAoe', { x: c.target.x, y: c.target.y, id: c.target.id, r: 0.5 });
|
||
}, { owner: unit, priority: 10 });
|
||
lowHpHealUp(battle, unit, tb);
|
||
},
|
||
};
|
||
},
|
||
};
|