Implement tick-based game loop, combat overhaul, and attack-any-NPC
Replace immediate combat with a 3-second tick engine that resolves actions, NPC AI, status effects, respawns, and passive regeneration. Players queue combat actions (attack/defend/flee/use) that resolve on the next tick. Any NPC can now be attacked — non-hostile targets incur attitude penalties instead of being blocked. Status effects persist in the database and continue ticking while players are offline. Made-with: Cursor
This commit is contained in:
13
TESTING.md
13
TESTING.md
@@ -39,21 +39,24 @@ Run through these checks before every commit to ensure consistent feature covera
|
||||
- [ ] Dead NPCs don't appear in room view
|
||||
|
||||
## Combat - Tick-Based
|
||||
- [ ] `attack <aggressive/hostile npc>` enters combat state
|
||||
- [ ] Can't attack friendly/neutral NPCs
|
||||
- [ ] `attack <npc>` enters combat state with any NPC that has combat stats
|
||||
- [ ] Attacking friendly/neutral NPCs is allowed but incurs attitude penalties
|
||||
- [ ] Attacking non-hostile NPC: attitude shift -30 individual, -15 faction
|
||||
- [ ] "The locals look on in horror" message when attacking non-hostile
|
||||
- [ ] Combat rounds resolve automatically on server ticks (not on command)
|
||||
- [ ] Player receives tick-by-tick combat output (damage dealt, damage taken)
|
||||
- [ ] Default combat action is "attack" if no other action queued
|
||||
- [ ] `defend` / `def` sets defensive stance (reduced incoming damage next tick)
|
||||
- [ ] NPC death: awards XP, shifts attitude -10, shifts faction -5
|
||||
- [ ] Player death: respawns at spawn room with full HP, combat cleared
|
||||
- [ ] Player death: respawns at spawn room with full HP, combat cleared, effects cleared
|
||||
- [ ] NPCs respawn after configured time
|
||||
- [ ] Combat lockout: can only attack/defend/flee/look/use/quit during combat
|
||||
- [ ] Combat lockout: can only attack/defend/flee/look/stats/inv/use/quit during combat
|
||||
- [ ] `flee` queues escape attempt — may fail based on stats
|
||||
- [ ] `use <item>` in combat queues item use for next tick
|
||||
- [ ] Multiple ticks of combat resolve correctly without player input
|
||||
- [ ] Combat ends when NPC dies (player exits combat state)
|
||||
- [ ] Combat ends when player flees successfully
|
||||
- [ ] NPCs without explicit [combat] section get default stats (20 HP, 4 ATK, 2 DEF, 5 XP)
|
||||
|
||||
## Combat - NPC AI
|
||||
- [ ] Hostile NPCs auto-engage players who enter their room
|
||||
@@ -88,7 +91,7 @@ Run through these checks before every commit to ensure consistent feature covera
|
||||
- [ ] HP does not exceed max_hp
|
||||
|
||||
## Tick Engine
|
||||
- [ ] Tick runs at configured interval (~2 seconds)
|
||||
- [ ] Tick runs at configured interval (~3 seconds)
|
||||
- [ ] Tick processes: NPC AI → combat rounds → status effects → respawns → regen
|
||||
- [ ] Tick output is delivered to players promptly
|
||||
- [ ] Server remains responsive to immediate commands between ticks
|
||||
|
||||
Reference in New Issue
Block a user