feat(gameserver): server-authoritative fire/water bolt (#36) #58
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!58
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/spell-fire-bolt"
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?
Spell-system slice 1 (part of #36): the server-authoritative fire/water bolt. This is the authoritative core — the visible client animation is the next slice (see FX plan below).
What lands
Cast(Element, Form, TargetId)client intent (pre-picked target, likeAttack) and aSpellBolt(CasterId, TargetId, Element, Damage)broadcast within the caster's AoI for the client to animate.SpellSystem.Cast(fire/waterBolt): rejects a dead caster / unknown target / self / not-enough-mana (no spend); otherwise spends mana (no refund), trains Magery on resolution, then lands (LOS + range OK) or fizzles (out of range / no line of sight). Fire hits harder than water; damage scales with Magery; bolt range caps at the AoI radius (you can only hit whom you can see).CombatSystem.ApplyDamageso spells and melee kill identically (player → ghost + resurrection; creature → slay + corpse) — the agreed middle way, extracted from the melee resolution with no behaviour change to melee.PlayerDied) to the AoI and privately cues the caster on reject/fizzle/skill-gain.SpellOptionsbound fromGameOptions.Verification
just lint→ 0 warnings.just test→ full suite green (GameServer 135, Shared 51, Client.Core 46, Auth 12, Assets 4, AssetExtractor 7). NewSpellCastTestscover: lands with fire damage, fire > water, not-enough-mana rejects (no spend), out-of-range/no-LOS fizzle (mana still spent), self/unknown-target/unimplemented-form rejects, lethal bolt drops a corpse, casting trains Magery.Definition of Done (delta)
Next slice — the VISIBLE fireball (owner's ask: reuse UO art)
Mapped and ready: UO effect art lives in
art.mul(~0x36xx); the client already hasSpriteAnimatorwith aColor? tint(per-element hue for free) and a one-shot animation pattern. Plan: a discovery pass (AssetExtractor statics --range) to find the fireball/explosion ids → add aneffect/namespace to the pack → a clientActiveEffectthat flies the projectile caster→target onSpellBoltand plays the explosion at impact. Tracked on #36.