Commit graph

328 commits

Author SHA1 Message Date
d6d62abdb8
Add flying dodge mechanic at resolve time
When altitude differs at resolve time (attacker or defender changed flying state during window phase), attack misses. Treated as successful dodge with zero damage.
2026-02-14 01:00:37 -05:00
4da8d41b45
Add z-axis altitude check for starting combat
Players must be at same altitude (both flying or both grounded) to initiate combat. Attack fails with 'You can't reach them from here!' if altitude differs.
2026-02-14 01:00:37 -05:00
d8cd880b61
Add sleep command for deep rest recovery 2026-02-14 01:00:37 -05:00
36fcbecc12
Block quit command during combat 2026-02-14 01:00:37 -05:00
a4c9f31056
Cancel power-up tasks when combat starts
When combat begins, any active power-up task on either the attacker
or defender should be cancelled to prevent background power changes
during combat. This ensures players can't continue charging while
fighting.

The fix checks both entities for a _power_task attribute and cancels
it if present, then clears the reference.
2026-02-14 01:00:37 -05:00
2a546a3171
Fix operator precedence in POV smart conjugation
The {s} conjugation check had incorrect operator precedence that
evaluated the ch/sh suffix check independently of the prev_text
existence check. This could lead to confusing logic flow even
though it didn't crash due to len() handling empty strings safely.

Fixed by wrapping both suffix conditions in parentheses so they're
both guarded by the prev_text truthiness check.
2026-02-14 01:00:37 -05:00
afe99ceff5
Wire combat move and state into prompt variables 2026-02-13 23:21:53 -05:00
47534b1514
Add visible stamina cue broadcasts 2026-02-13 23:21:53 -05:00
4e8459df5f
Convert combat resolution to POV templates 2026-02-13 23:21:52 -05:00
15cc0d1ae0
Add announce and resolve templates to combat moves 2026-02-13 23:21:50 -05:00
2b21257d26
Add POV template engine for combat messages 2026-02-13 23:05:19 -05:00
292557e5fd
Add power up/down commands
Implements power level management system with tick-based power-up loop.
Players can raise PL toward max_pl (costs stamina per tick), lower PL
instantly, set exact PL targets, and cancel ongoing power-ups.
2026-02-13 23:01:33 -05:00
72b877c5d1
Send GMCP Char.Vitals after each command 2026-02-13 22:48:59 -05:00
593bfd3028
Add prompt command for customization 2026-02-13 22:48:59 -05:00
4930f1408b
Wire render_prompt into server shell loop 2026-02-13 22:48:59 -05:00
780501ceed
Add render_prompt with modal templates 2026-02-13 22:48:59 -05:00
9729e853e1
Add color markup engine for prompt templates 2026-02-13 22:48:59 -05:00
525b2fd812
Refactor look command to use structured room display
- Add Where: header with zone description
- Add Location: line with quadrant and coordinates
- Add Nearby: line showing entities in viewport (not on player's tile)
- Add Exits: line showing available cardinal directions
- Replace 'Here:' with individual entity lines showing posture
- Replace 'Portals:' with individual 'You see {name}.' lines
- Add look <thing> routing to examine command
- Add comprehensive tests for new structured output
- Update existing tests to match new output format
2026-02-13 22:20:48 -05:00
d7d4fff701
Add render/room.py with structured room display functions 2026-02-13 22:20:48 -05:00
1f7db3a205
Add posture property to Entity for room display 2026-02-13 22:06:18 -05:00
f3ba262fbc
Add bending research 2026-02-13 21:39:12 -05:00
bb86166205
Add chi related notes 2026-02-13 21:39:06 -05:00
6ff0f3a507
Add experience roadmap to docs index 2026-02-13 20:51:02 -05:00
dd6acfd1b8
Add experience layer roadmap (phases 8-15) 2026-02-13 20:50:38 -05:00
d83f41f907
Add a library brainstorm 2026-02-13 12:16:35 -05:00
8d0ca744c7
Add 210 Grimm fairy tales as individual text files 2026-02-13 12:16:35 -05:00
947dd73912
Add Grimm fairy tales splitter script 2026-02-13 11:28:56 -05:00
65fe92b4e0
Add a brainstorm text file 2026-02-12 19:08:10 -05:00
9ee4ff050d
Add combat and defense aliases 2026-02-12 18:31:26 -05:00
61ab785b59
Send telegraph messages to player when mobs attack 2026-02-12 18:22:30 -05:00
a4a95694f8
Remove player from zone contents on disconnect
Player objects were removed from the players dict on quit/disconnect
but never removed from zone._contents, leaving ghost * markers on
other players' maps.
2026-02-12 17:00:19 -05:00
b63b054997
Show entities at player position beneath the map
Adds a "Here: goblin, Ally" line after the map grid listing mobs and
other players sharing the tile. Dead mobs are excluded.
2026-02-12 17:00:19 -05:00
4cff1475c3
Remove player from zone contents on disconnect
Player objects were removed from the players dict on quit/disconnect
but never removed from zone._contents, leaving ghost * markers on
other players' maps.
2026-02-12 16:41:04 -05:00
833c0efa3a
Add a thorough tintin document 2026-02-12 16:31:34 -05:00
200cc00129
Dedupe MSDP vitals to avoid spamming idle clients
Cache last-sent values on Player and skip send_msdp() when
nothing changed. Idle players no longer get a packet every second.
2026-02-12 16:31:17 -05:00
fb758c8f36
Add protocol negotiation doc 2026-02-12 16:24:37 -05:00
bd5f83e890
Skip empty lines during name prompt and fix tintin send syntax
The server now skips spurious empty lines from client negotiation bytes
during the name prompt, only closing on actual connection loss. This
makes the login flow robust against clients that send IAC bytes with
trailing CRLF during negotiation.

Also fixed tintin++ CATCH handlers to use proper \} syntax matching the
documented examples.
2026-02-12 16:24:37 -05:00
aafdcdca42
Move GMCP/MSDP offers to initial negotiation
The old begin_advanced_negotiation relied on a telnetlib3 hook that races with the negotiation timer — by the time it fires, the timer has already declared negotiation complete. Moving to begin_negotiation sends the offers alongside standard options (TTYPE, NAWS, ECHO) so clients see them immediately.
2026-02-12 16:24:37 -05:00
05b377f00a
Add debug logging for GMCP/MSDP negotiation offers 2026-02-12 16:24:37 -05:00
7ba4ab90fb
Add MSDP status bar and protocol negotiation to mud.tin 2026-02-12 16:24:37 -05:00
bcf8ae28d1
Fix reconnect alias and add comments to mud.tin 2026-02-12 15:58:54 -05:00
aeb3d31702
Add client command to show protocol and terminal info 2026-02-12 15:58:54 -05:00
ee0dc839d8
Offer GMCP/MSDP during connection and guard tick sends
The server never proactively offered GMCP or MSDP to clients, so
telnetlib3 logged "cannot send MSDP without negotiation" every second.
Now the server sends WILL GMCP and WILL MSDP on connection, and
send_msdp_vitals checks negotiation state before attempting to send.
2026-02-12 15:58:54 -05:00
c3848fe57d
Update telnetlib3 to 2.4.0 2026-02-12 12:15:49 -05:00
f418805b78
Fix portal type narrowing in zone tests 2026-02-11 23:17:50 -05:00
64c25b1025
Send Char.Vitals on combat stamina spend 2026-02-11 23:13:21 -05:00
3d386fbf99
Fix GMCP and MSDP support for rich clients 2026-02-11 23:13:14 -05:00
ca282851e3
Update test_char_vitals_sent_on_rest_complete to expect both Status and Vitals 2026-02-11 23:13:14 -05:00
6ed71873b5
Fix line length in test_gmcp.py 2026-02-11 23:13:14 -05:00
e247d70612
Send Char.Status on combat end and rest state changes 2026-02-11 23:13:14 -05:00