feat: cast by incantation words on the client; remove the instant Cast (2a, #36) #77
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!77
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/incantation-client"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes slice 2a: the client casts by speaking words, and the server's only casting path is the paced FSM (the instant
Castis gone).What changed
QueueWord. The server paces + resolves.PowerWordSpokenflashes the word overhead on the caster in a cool arcane tint (deliberately distinct from warm-yellow chat). The parchment plaque + enemy ribbon are slice 4.Castintent,World.Cast,SpellSystem.Cast, the handler case +BroadcastCastAsync, and the now-deadManaCostPerBolt(mana is charged per word).SpellCastTests(instant path) deleted — the FSM is covered byIncantationTests;TrainingDummyTestsnow casts via the words.Try it (
just dev)/spawn dummy, click it, press 1 then 3 → you speak XEN·VUR, the words flash over your head, and the fire bolt flies. 2 then 3 = water. 0 cancels a half-spoken cast.just lint→ 0 warnings.just test→ full suite green (GameServer 142, Client.Core 53).Definition of Done (delta)
Castpath is gone (client + server); mana is charged per word only.Next: refactor the resolution into a
Spellclass hierarchy +SpellCatalog(owner's ask — one interpreter, no switch forest), then 2b (shield/heal + invalid-combo).Power words now accumulate overhead as they are spoken ("XEN" → "XEN VUR") instead of replacing each other, and get a dark 1px outline so the thin arcane text reads over the world. The window (2.5s) outlasts the ~2s queue timeout so the building incantation stays composed while the caster speaks.The composed power words overhead now clear on an authoritative signal, not a client timer: - New PowerWordsCleared(CasterId) broadcast within AoI whenever an incantation ends — WorldTick sends it for every resolution (bolt landed, out-of-mana, timeout), the handler sends it on a Lop cancel. - The client composes words as spoken ("XEN" → "XEN VUR") and clears them on PowerWordsCleared (with a short linger so the last word reads), or on PlayerDied (death resets any in-progress cast). A safety-net lifetime covers a caster that left view mid-cast. The in-progress incantation is transient by design: it lives in SpellSystem (in-memory), is dropped on disconnect (World.RemovePlayer → Forget) and when the caster becomes a ghost (Step), and is never in the save blob — a relog or a death resets it; you can't preserve a half-spoken cast.