feedback1 integrate: WR 阵法术师 / 轰击术师 attacks hit every enemy in range
# Conflicts: # docs/SIM.md
This commit is contained in:
commit
fcbccd4a32
13 files changed
+535
-59
No files matched your search
@@ -111,8 +111,6 @@ const FLAME_TINTS = Object.freeze([0xffd27a, 0xffa94d, 0xff8a3d, 0xff5a2a]);
|
||||
const SHELL_RISE = 0.34, SHELL_UP = 5.5;
|
||||
/** 蕾缪安 S3 shell (fx 'bombardShell'); `look` 'mortar' is its own flight (_stepMortar). */
|
||||
const BOMBARD_SHELL = Object.freeze({ look: 'mortar', tint: 0xfff2d8, glow: 0xff9c33, trail: 0xffb35c, smoke: 0x3a3430, len: 1.3, width: 0.3, head: 0.56 });
|
||||
/** Sub-professions whose shells are arts (purple blast) — the rest explode orange. */
|
||||
const ARTS_SHELLS = new Set(['blastcaster']);
|
||||
/**
|
||||
* An fx anchored on a unit (extra.id) is drawn at that unit's rendered position while the event's own (x, y) is within
|
||||
* this many tiles of it (it happens on the unit); farther away the fx happens at (x, y) — the sim puts the caster in
|
||||
@@ -130,7 +128,8 @@ const camKey = (c) => (c ? c.tx + c.ty * 1e3 + c.tz * 1e6 + c.tilt * 7.13 + c.di
|
||||
/** Characters of a damage number as drawn (heals get a '+'). */
|
||||
const numChars = (v, style) => String(Math.round(v)).length + (style === 'heal' ? 1 : 0);
|
||||
|
||||
const SPLASH_SUBS = new Set(['aoesniper', 'splashcaster', 'blastcaster', 'bombarder', 'phalanx', 'fortress', 'hammer']);
|
||||
/** Sub-professions whose attacks splash around the struck target (the 阵法术师 / 轰击术师 strike every enemy in range). */
|
||||
const SPLASH_SUBS = new Set(['aoesniper', 'splashcaster', 'bombarder', 'fortress', 'hammer']);
|
||||
|
||||
let fontsReady = false;
|
||||
/** Generate the damage-number bitmap fonts (after web fonts loaded, if possible). */
|
||||
@@ -488,15 +487,14 @@ export class FxSystem {
|
||||
const ux = dist > 1e-6 ? dx / dist : (src.facing || 1) >= 0 ? 1 : -1, uy = dist > 1e-6 ? dy / dist : 0;
|
||||
const hand = Math.min(0.28, dist * 0.3); // the weapon is in front of the body
|
||||
const look = spec.look;
|
||||
const arts = look === 'shell' && ARTS_SHELLS.has(this.ctx.subProfOf ? this.ctx.subProfOf(src.info?.defId) : null);
|
||||
pr.kind = kind; pr.spec = spec; pr.src = src; pr.tgt = tgt; pr.rise = 0;
|
||||
pr.x0 = src.x + ux * hand; pr.y0 = src.y + uy * hand; pr.z0 = chestZ(src);
|
||||
pr.tx = tgt.x; pr.ty = tgt.y; pr.tz = look === 'shell' ? feetZ(tgt) : chestZ(tgt);
|
||||
pr.t = 0; pr.fade = 0; pr.hit = false; pr.emit = Math.random(); pr.ang = Math.atan2(-uy, ux); // ≈ on screen (rows run up)
|
||||
pr.dur = clamp(dist / projSpeed(kind) / this._ts(), 0.04, 1.5);
|
||||
pr.arc = spec.arc ? spec.arc * clamp(0.45 + dist * 0.18, 0.6, 1.8) : 0;
|
||||
pr.glow = arts ? 0xb36bff : spec.glow;
|
||||
pr.trailTint = arts ? 0xc77dff : spec.trail ?? spec.glow;
|
||||
pr.glow = spec.glow;
|
||||
pr.trailTint = spec.trail ?? spec.glow;
|
||||
// boomerang legs: kinematic, from (bx, by, bz) at constant speed towards the target, then back to the thrower
|
||||
pr.phase = 0; pr.bx = pr.x0; pr.by = pr.y0; pr.bz = pr.z0; pr.trav = 0; pr.d0 = Math.max(0.1, dist); pr.ux = ux; pr.uy = uy;
|
||||
pr.spin = Math.random() * 6;
|
||||
|
||||
Reference in new issue
Block a user