feat(client): castable fire/water bolt with a visible UO fireball (#36) #67

Merged
marco merged 2 commits from feat/spell-fireball-fx into main 2026-07-19 07:59:15 +02:00
Owner

The fire/water bolt is now castable from the client and visible — part of #36.

What lands

  • UO fireball art packed into assets.isoa under effect/: the projectile (0x36D4-0x36E3) and the explosion burst (0x36B0-0x36BC), centre-anchored, confirmed visually during discovery.
  • ActiveEffect: a projectile that flies caster→target then plays a one-shot explosion at impact. Element = tint — fire keeps the art's warm orange, water overlays a cool blue (same art, per the plan; multiply-tint so water reads as cool "blue fire", not pure ice — a dedicated water art is an easy later refinement). GameScreen spawns one per SpellBolt broadcast and floats the damage over the target's head.
  • Cast input: select a creature (click it — now sprite-accurate from #63), then 1 = fire bolt, 2 = water bolt → sends Cast(element, Bolt, target). The server validates mana/LOS/range and broadcasts the SpellBolt the client animates. Server-authoritative throughout (client sends only the intent).

How to try it (just dev)

/spawn dummy, click the dummy to select it, press 1 (fire) or 2 (water) → the bolt flies to the dummy, explodes, and the damage floats over it. (Clicking also engages melee auto-attack on the same target — a dedicated cast-vs-attack target split is a later nicety.)

just lint → 0 warnings. just test → full suite green (GameServer 144, Client.Core 49). Visual tuning (flight time, tint, impact height) is best verified in-client.

Definition of Done (delta)

  • A player casts a fire/water bolt at a selected target from the client (key 1/2).
  • The client animates the projectile flying to the target + an explosion at impact, coloured by element, with the damage number over the target.
  • Server stays authoritative (only a Cast intent leaves the client).
  • Whole solution builds, zero warnings, tests green.

Follow-ups

  • Dummy swing-on-hit (the 8 swing frames 0x1070-0x1077) — a creature hit-reaction, deferred.
  • Depth sorting (#66) affects how the explosion/dummy layer; unrelated to this PR.
The fire/water **bolt is now castable from the client and visible** — part of #36. ## What lands - **UO fireball art** packed into `assets.isoa` under `effect/`: the projectile (`0x36D4-0x36E3`) and the explosion burst (`0x36B0-0x36BC`), centre-anchored, confirmed visually during discovery. - **`ActiveEffect`**: a projectile that flies caster→target then plays a **one-shot explosion** at impact. **Element = tint** — fire keeps the art's warm orange, water overlays a cool blue (same art, per the plan; multiply-tint so water reads as cool "blue fire", not pure ice — a dedicated water art is an easy later refinement). `GameScreen` spawns one per `SpellBolt` broadcast and floats the damage over the target's head. - **Cast input**: select a creature (click it — now sprite-accurate from #63), then **`1` = fire bolt, `2` = water bolt** → sends `Cast(element, Bolt, target)`. The server validates mana/LOS/range and broadcasts the `SpellBolt` the client animates. Server-authoritative throughout (client sends only the intent). ## How to try it (`just dev`) `/spawn dummy`, click the dummy to select it, press **1** (fire) or **2** (water) → the bolt flies to the dummy, explodes, and the damage floats over it. (Clicking also engages melee auto-attack on the same target — a dedicated cast-vs-attack target split is a later nicety.) `just lint` → 0 warnings. `just test` → full suite green (GameServer 144, Client.Core 49). Visual tuning (flight time, tint, impact height) is best verified in-client. ## Definition of Done (delta) - [x] A player casts a fire/water bolt at a selected target from the client (key 1/2). - [x] The client animates the projectile flying to the target + an explosion at impact, coloured by element, with the damage number over the target. - [x] Server stays authoritative (only a `Cast` intent leaves the client). - [x] Whole solution builds, zero warnings, tests green. ## Follow-ups - Dummy **swing-on-hit** (the 8 swing frames `0x1070-0x1077`) — a creature hit-reaction, deferred. - Depth sorting (#66) affects how the explosion/dummy layer; unrelated to this PR.
feat(client): castable fire/water bolt with a visible UO fireball (#36)
All checks were successful
ci / Lint & Test (pull_request) Successful in 1m28s
4ac7634b5f
The spell bolt is now castable from the client and rendered.

- Pack the UO fireball art into assets.isoa under effect/: the projectile
  (0x36D4-0x36E3) and the explosion burst (0x36B0-0x36BC), centre-anchored.
- ActiveEffect: a projectile that flies caster→target then plays a one-shot
  explosion at impact. Element = tint (fire keeps the art's warm orange; water
  overlays a cool blue). GameScreen spawns one per SpellBolt broadcast and floats
  the damage over the target's head.
- Cast input: with a creature selected (click it), 1 = fire bolt, 2 = water bolt
  → sends Cast(element, Bolt, target); the server validates mana/LOS/range and
  broadcasts the SpellBolt the client animates.

Server-authoritative throughout (client sends only the Cast intent). Rebuilt the
committed pack via `just pack`. The dummy swing-on-hit reaction is a follow-up.
fix(spell): flip the projectile facing + free cast for GMs
All checks were successful
ci / Lint & Test (pull_request) Successful in 1m26s
5ccd501c61
- The fireball art's head faces left; mirror it when the target is to the right
  so the head leads toward the target (was reversed — tail led, head trailed).
- A GM/admin casts without spending or requiring mana (freeCast, from the JWT
  admin claim in the handler) — for testing without mana starvation.
marco merged commit 8912623b5f into main 2026-07-19 07:59:15 +02:00
marco deleted branch feat/spell-fireball-fx 2026-07-19 07:59:15 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo!67
No description provided.