fix: 修复洛洛 S2 越界续锁与旧弹倍率干扰;Golden 因独立浮游/本体攻击更新 roster-004、roster-005、bond-victoriaShip-low、bond-victoriaShip-high、coop3-ABYSS-5、coop4-FUNNY-6、coop4-ABYSS-7、coop2-NORMAL-8-serverrun、coop2-NORMAL-1-coverage-standins

This commit is contained in:
星闌 committed 2026-10-11 16:54:03 +08:00
1 parent bc50cac01f
commit f567e8045e
9 files changed
+461 -127

No files matched your search

@@ -1,10 +1,18 @@
// server/sim/content/kits/ops/chess_char_2_10-rockr.js — 洛洛 (char_4040_rockr) kit, tier 2.
// Conventions of the tier-2 kits: ../shared/tier2.js; kit contract and rules: ../README.md.
import { canTargetEnemy } from '../../../targeting.js';
import { bodyInKeys } from '../../../body.js';
import { canTargetEnemy, sortEnemyTargets } from '../../../targeting.js';
import { num, talentBb, up } from '../shared/tier1.js';
import { onDefaultSkill } from '../shared/tier2.js';
export const DRONE_TAG = 'rockr:drone';
const firstTarget = (battle, unit) => {
const prof = unit.profile;
const candidates = battle.enemiesInKeys(unit.rangeKeys, unit, prof);
for (const e of battle.blockedTargets(unit, prof)) if (!candidates.includes(e)) candidates.push(e);
sortEnemyTargets(battle, unit, candidates, prof.priority);
return candidates[0] ?? null;
};
export default {
// ---------------------------------------------------------------------------------------------------------------
@@ -15,7 +23,6 @@ export default {
// S1 战术咏唱·γ型 (alt): ASPD +attack_speed; the target lock belongs to 自负此轭 only.
chess_char_2_10_a: (bb, chess) => {
const t = talentBb(chess, 0);
const s2 = onDefaultSkill(chess);
const endOverload = (battle, unit) => {
if (unit.mem.rockFunnel) { unit.profile.funnel = unit.mem.rockFunnel; unit.mem.rockFunnel = null; }
battle.removeBuff(unit, 'rockr:overload');
@@ -26,19 +33,52 @@ export default {
onStart({ battle, unit, skill }) {
unit.mem.rockOverAt = battle.time + skill.duration / 2;
unit.mem.rockOver = false;
unit.mem.rockLock = null;
// The released drone inherits the trait's ramp; the body still attacks only inside its own range.
// `funnelMul` separates the addition; older profiles fold it into `dmgMul`. Keep launched shots unchanged.
const key = typeof unit.profile.funnelMul === 'function' ? 'funnelMul' : 'dmgMul';
const mul = unit.profile[key];
unit.profile = { ...unit.profile, [key]: null };
const lock = firstTarget(battle, unit);
unit.mem.rockDrone = { lock, cd: 0, key, mul,
target: unit.trait.funnelTarget, scale: unit.trait.funnelScale };
unit.mem.rockLock = lock;
},
onTick({ battle, unit }) {
if (unit.mem.rockOver || battle.time + 1e-9 < unit.mem.rockOverAt) return;
unit.mem.rockOver = true;
onTick({ battle, unit, dt }) {
if (!unit.mem.rockOver && battle.time + 1e-9 >= unit.mem.rockOverAt) {
unit.mem.rockOver = true;
const f = unit.profile.funnel;
if (f) { unit.mem.rockFunnel = f; unit.profile.funnel = { ...f, max: f.max * num(bb.scale, 1) }; }
battle.addBuff(unit, { key: 'rockr:overload', mods: { atkPct: num(bb.atk) }, visible: true, tags: ['skill'] });
battle.fx('overload', { x: unit.x, y: unit.y, id: unit.id });
}
const d = unit.mem.rockDrone;
if (!d || !unit.alive || !unit.skill.active) return;
d.cd = Math.max(0, d.cd - dt);
// [ASSUMED] A newly unselectable lock returns under the shared targetability rules.
if (d.lock && !canTargetEnemy(unit, d.lock, unit.profile)) d.lock = null;
if (!d.lock) d.lock = firstTarget(battle, unit);
unit.mem.rockLock = d.lock;
if (!d.lock || d.cd > 1e-9) return;
d.cd = unit.s.interval;
// Official S2 releases one drone (1 + attack@cnt = 1 at both ranks). Keep pre-skill shots from changing its ramp.
// [ASSUMED] As the existing independent skill drones, no launch-flight delay; body control does not pause it.
const f = unit.profile.funnel;
if (f) { unit.mem.rockFunnel = f; unit.profile.funnel = { ...f, max: f.max * num(bb.scale, 1) }; }
battle.addBuff(unit, { key: 'rockr:overload', mods: { atkPct: num(bb.atk) }, visible: true, tags: ['skill'] });
battle.fx('overload', { x: unit.x, y: unit.y, id: unit.id });
d.scale = d.target === d.lock.id ? Math.min(f.max, (d.scale ?? f.init) + f.delta) : f.init;
d.target = d.lock.id;
battle.fx('drone', { x: d.lock.x, y: d.lock.y, id: unit.id });
battle.dealDamage(unit, d.lock, { amount: unit.s.atk * unit.s.atkScaleMul * d.scale,
type: 'arts', isSkill: true, isAttack: false, tags: ['skill', 'drone', DRONE_TAG] });
},
onEnd({ battle, unit, reason }) {
const over = unit.mem.rockOver ? battle.time - unit.mem.rockOverAt : 0;
const d = unit.mem.rockDrone;
unit.mem.rockDrone = null;
endOverload(battle, unit);
if (d) {
unit.trait.funnelTarget = d.target;
unit.trait.funnelScale = d.scale;
unit.profile = { ...unit.profile, [d.key]: d.mul };
}
unit.mem.rockOver = false;
unit.mem.rockLock = null;
if (over > 0 && reason !== 'death' && unit.alive) battle.applyStatus(unit, 'stun', { duration: over, source: unit });
@@ -46,12 +86,6 @@ export default {
},
skills: { 'skcom_magic_rage[3]': { kind: 'duration', mods: { aspd: num(bb.attack_speed) } } },
talents: [{ install(battle, unit) {
if (s2) battle.on('beforeAttack', (ctx) => {
if (ctx.attacker !== unit || !unit.skill?.active) return;
const L = unit.mem.rockLock;
if (L && L.alive && bodyInKeys(L, unit.rangeKeySet) && canTargetEnemy(unit, L, ctx.profile || unit.profile)) ctx.targets = [L];
else unit.mem.rockLock = ctx.targets[0] ?? null;
}, { owner: unit });
const iv = num(t.interval), max = Math.floor(num(t.max_stack_cnt)), v = num(t.atk);
if (!(iv > 0) || !(max > 0) || !v) return;
battle.on('tick', () => {