fix: 补回驭械术师普通攻击的本体伤害
This commit is contained in:
1 parent
bc50cac01f
commit
823e3d0af4
21 files changed
+1011
-710
No files matched your search
+15
-1
@@ -307,13 +307,27 @@ export function resolveHit(b, u, prof, target, info, x, y) {
|
||||
if (target && target.alive) {
|
||||
let mulT = skillMul;
|
||||
if (prof.dmgMul) { const m = typeof prof.dmgMul === 'function' ? prof.dmgMul(b, u, target) : prof.dmgMul; if (Number.isFinite(m)) mulT *= m; }
|
||||
const funnelMul = prof.funnelMul ? prof.funnelMul(b, u, target) : 1;
|
||||
const attachedFunnel = !!prof.funnelMul && (!info.isSkill || prof.funnelBodyHits > 0);
|
||||
// Unreleased drones are additional damage (PRTS 驭械术师), not a replacement for the caster's attack. A volley
|
||||
// shares one talent roll and attackId; extra drones never duplicate the body. Released skill paths stay separate.
|
||||
// [ASSUMED] Body instances precede additions at the existing projectile impact; a multi-hit volley keeps one ramp.
|
||||
if (!attachedFunnel) mulT *= funnelMul;
|
||||
const hits = prof.hitsFn ? prof.hitsFn(b, u, info) : Math.max(1, prof.hits || 1);
|
||||
// `hitDmgMul` (professions.js header): each instance's 伤害倍率 — the DamageInfo `mul`, after DEF / RES — and only the
|
||||
// first instance may give 受击回复 (砾's two 50 % hits, PRTS 砾 特性备注)
|
||||
const split = Number.isFinite(prof.hitDmgMul) && prof.hitDmgMul > 0 ? prof.hitDmgMul : null;
|
||||
let dealtMain = 0;
|
||||
if (attachedFunnel && info.index === 0) {
|
||||
const bodyHits = Math.max(1, prof.funnelBodyHits || 1);
|
||||
for (let h = 0; h < bodyHits && target.alive; h++) {
|
||||
dealtMain += b.dealDamage(u, target, { amount: atk * scale * mulT, type: baseType,
|
||||
isAttack: true, isSkill: info.isSkill, tags: prof.tags || [], attackId });
|
||||
}
|
||||
}
|
||||
for (let h = 0; h < hits && target.alive; h++) {
|
||||
const d = { amount: atk * scale * mulT, type: baseType, isAttack: true, isSkill: info.isSkill, tags: prof.tags || [], attackId };
|
||||
const d = { amount: atk * scale * mulT * (attachedFunnel ? funnelMul : 1), type: baseType,
|
||||
isAttack: !attachedFunnel, isSkill: info.isSkill, tags: attachedFunnel ? [...(prof.tags || []), 'addition', 'funnel'] : (prof.tags || []), attackId };
|
||||
if (split != null) { d.mul = split; if (h > 0) d.noSp = true; }
|
||||
dealtMain += b.dealDamage(u, target, d);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user