Commit graph

305 commits

Author SHA1 Message Date
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
e9f70ebd2f
Send Char.Vitals on combat resolution and rest completion 2026-02-11 23:13:14 -05:00
d253012122
Add GMCP and MSDP support for rich clients
Implements Phase 7 foundation:
- gmcp.py module with package builders for Char.Vitals, Char.Status,
  Room.Info, Room.Map, and MSDP vitals
- Player helper methods send_gmcp() and send_msdp() for convenience
- Full test coverage for all GMCP/MSDP functions and edge cases
2026-02-11 22:52:16 -05:00
058ba1b7de
Add zone TOML export 2026-02-11 22:38:14 -05:00
3a756cc589
Add ambient message support to zones 2026-02-11 22:38:14 -05:00
889a0d7bcf
Add paint mode for terrain editing 2026-02-11 22:38:14 -05:00
c3884e236b
Add per-zone mob spawn rules
Zones can now define spawn rules in TOML:
- [[spawns]] sections specify mob type, max count, and respawn timer
- SpawnRule dataclass stores configuration
- load_zone() parses spawn rules from TOML
- Added example spawn rules to treehouse zone (squirrel, crow)

This is configuration infrastructure only - actual spawning logic
will be handled by the game loop in a future phase.
2026-02-11 22:38:14 -05:00
b123d55fbd
Add hub zone with portal connections 2026-02-11 22:38:14 -05:00
56c82700b0
Add tutorial zones (flower and treehouse)
Implements the new player funnel with two tutorial zones:
- Flower: 7x7 sealed zone with translucent petals, spawn at center
- Treehouse: 20x15 platform zone with rope ladder and branch exits

Both zones are bounded (non-toroidal) and include portals for progression.
2026-02-11 22:38:14 -05:00
7154dd86d3
Add portal to tavern zone 2026-02-11 22:38:14 -05:00
d6920834c8
Add auto-trigger portal on movement 2026-02-11 22:38:14 -05:00
b3801f780f
Add portal loading from zone TOML files
Zone TOML files can now define portals using [[portals]] sections.
Each portal specifies coordinates (x, y), a target (zone_name:x,y),
and a label. Optional aliases are supported. Portals are
automatically created and placed in the zone when it loads.
2026-02-11 22:38:14 -05:00
cb3ad6a547
Add spawn point support to zones 2026-02-11 22:00:06 -05:00
e724abb926
Add TOML verb support for thing templates
Thing templates can now define verbs in TOML using [verbs] section with
module:function references. Verbs are resolved at spawn time and bound
to the spawned object instance using functools.partial. Works for both
Thing and Container instances.
2026-02-11 21:47:33 -05:00
6ce57ad970
Add key-based unlock as first verb interaction
Implements unlock_handler that checks for a key in player inventory
and unlocks containers. Tests cover error cases (non-container,
not locked, no key), success case, key aliasing, and state preservation.
2026-02-11 21:47:33 -05:00
d2de6bdc16
Add use command for verb-based interaction
Implements a TDD-built 'use' command that lets players invoke
object verbs with optional targets:
- use X - calls X's use verb
- use X on Y - calls X's use verb with Y as args
- Proper error messages for missing objects/verbs
- Tests cover all edge cases including inventory/ground search

Also fixes type checking issue in verb dispatch where get_verb
could return None.
2026-02-11 21:47:33 -05:00
9534df8f9c
Add examine command for object inspection
Implements a global examine/ex command that shows detailed descriptions
of objects. Searches inventory first, then ground at player position.
Works with Things, Containers, and Mobs.
2026-02-11 21:47:33 -05:00
fcfa13c785
Add verb infrastructure on Object
Verbs let any Object have interactive handlers players can trigger.
Uses @verb decorator to mark methods that auto-register on instantiation.

- Object._verbs dict stores verb name to async handler mapping
- Object.register_verb(), get_verb(), has_verb() API
- @verb decorator marks methods with _verb_name attribute
- __post_init__ scans for decorated methods and registers them
- find_object() helper searches inventory then ground by name/alias
- Bound methods stored in _verbs (self already bound)
- Works on Object and all subclasses (Thing, Entity, etc)
- 18 tests covering registration, lookup, decoration, inheritance
2026-02-11 21:47:33 -05:00
4ec09cffda
Improve doc discovery 2026-02-11 21:47:05 -05:00
7d4a75f973
Show portals in look output
Look command now displays portals separately from ground items.
Portals at the player's position are shown after ground items with
the format "Portals: name1, name2". This separates portals from
regular items since they serve a different purpose in gameplay.
2026-02-11 20:58:55 -05:00
aa720edae5
Add enter command for portal zone transitions
Implements portal-based zone transitions with the enter command.
Players can enter portals at their position to move to target zones
with specified coordinates. Includes departure/arrival messaging to
nearby players and automatic look output in the destination zone.
Portals are matched by partial name or exact alias match.
2026-02-11 20:58:55 -05:00
557fffe5fa
Add put and take-from commands for containers 2026-02-11 20:58:55 -05:00
68161fd025
Add container support to thing template loader
Extended ThingTemplate with optional container fields (capacity, closed, locked).
When a template includes capacity, spawn_thing now creates a Container instead
of a regular Thing.

Added two example container templates:
- chest.toml: non-portable, capacity 5, starts closed
- sack.toml: portable, capacity 3, starts open
2026-02-11 20:58:55 -05:00
3be4370b2f
Show container state in look and inventory display
Containers now display their state when viewed:
- Closed containers show "(closed)"
- Open empty containers show "(open, empty)"
- Open containers with items show "(open, containing: item1, item2)"

This applies to both ground items in the look command and inventory items.
Added _format_thing_name helper to both look.py and things.py to handle
the display formatting consistently.
2026-02-11 20:58:55 -05:00