feat: close the combat loop — creatures retaliate, players die & resurrect (#10) #28
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!28
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/combat-loop"
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?
Closes #10.
Summary
The combat loop is now two-sided: the rat fights back, and you can die.
Direction?) to "propose an action" (Move/Attack/Idle) with a narrowAiPerception; World drives creatures under its lock, starting creature swings throughCombatSystem.ResurrectDelayTicks, ~5s). A ghost walks but cannot attack or be attacked.PlayerDied/PlayerResurrected, carry no HP — just the ghost transition and the resurrect position.Tintchannel (translucent grey ghost);Swing/Attackednow work both directions (a rat hitting you shows a damage number over your player + the rat faces you); a ghost can neither engage nor auto-attack.Death model
You chose the ghost/delay path: on death you become a grey ghost, still able to walk, then auto-resurrect at the spawn after the delay. Manual resurrection (ankh/healer) is a future refinement.
How it was tested
WorldTests: a creature retaliates and damages its attacker; a player killed by a creature becomes a ghost (cannot swing even at an adjacent living target) and resurrects at the spawn with combat restored. Protocol round-trips forPlayerDied/PlayerResurrected. Existing wander/combat/equip/persistence tests unchanged. 184 tests green, zero warnings, CSharpier clean.Needs your eyes (GUI)
Please confirm in-game: hit a rat → it chases and hits back (damage numbers over your player); stand in it long enough (or pull two) → you die, go grey ghost, and pop back at spawn after ~5s. Tell me if the rat's lethality (4 dmg / slow swing) and the ~5s ghost delay feel right — both are one-line tunables.
Checklist
just lintclean · [x]just testgreen (184) · [x] whole solution builds, 0 warnings · [x] multi-platform preserved · [x] tests added