Spellcast shove FX on caster
Co-authored-by: Cursor <cursoragent@cursor.com>
@@ -1923,6 +1923,17 @@ export class WorldView
1923
1923
payload.tileX,
1924
1924
payload.tileY
1925
1925
);
1926
// Spell casts push the caster visually toward the spell's target.
1927
// (Presentation only; server authority remains combat-resolution.)
1928
const caster = payload.casterId != null
1929
? this.entities.get(payload.casterId)
1930
: null;
1931
if (caster && !caster.dying)
1932
{
1933
const casterPivotX = caster.visualX + (caster.stackOffsetX ?? 0);
1934
const casterPivotY = caster.visualY + (caster.stackOffsetY ?? 0);
1935
this.#applyShoveInDirection(caster, toPivot.x - casterPivotX, toPivot.y - casterPivotY);
1936
}
1926
1937
const sortY = Math.max(fromPivot.y, toPivot.y) + 0.02;
1927
1938
const angle = Math.atan2(toPivot.y - fromPivot.y, toPivot.x - fromPivot.x) * (180 / Math.PI);
1928
1939
const object = new GameObject(0, 0, image, SORT_FX);
@@ -1923,6 +1923,17 @@ export class WorldView1923
payload.tileX,1923
payload.tileX,1924
payload.tileY1924
payload.tileY1925
);1925
);1926
// Spell casts push the caster visually toward the spell's target.1927
// (Presentation only; server authority remains combat-resolution.)1928
const caster = payload.casterId != null1929
? this.entities.get(payload.casterId)1930
: null;1931
if (caster && !caster.dying)1932
{1933
const casterPivotX = caster.visualX + (caster.stackOffsetX ?? 0);1934
const casterPivotY = caster.visualY + (caster.stackOffsetY ?? 0);1935
this.#applyShoveInDirection(caster, toPivot.x - casterPivotX, toPivot.y - casterPivotY);1936
}1926
const sortY = Math.max(fromPivot.y, toPivot.y) + 0.02;1937
const sortY = Math.max(fromPivot.y, toPivot.y) + 0.02;1927
const angle = Math.atan2(toPivot.y - fromPivot.y, toPivot.x - fromPivot.x) * (180 / Math.PI);1938
const angle = Math.atan2(toPivot.y - fromPivot.y, toPivot.x - fromPivot.x) * (180 / Math.PI);1928
const object = new GameObject(0, 0, image, SORT_FX);1939
const object = new GameObject(0, 0, image, SORT_FX);