Commit graph

93 commits

Author SHA1 Message Date
115675c02e
Add mode-aware default prompts with terrain, paint, and admin support 2026-02-14 21:17:03 -05:00
fea7430304
Hide admin commands from non-admin players in command list 2026-02-14 19:21:37 -05:00
1064af87d0
Add @promote and @demote admin commands 2026-02-14 19:21:37 -05:00
11636e073a
Add craft and recipes commands
Implements craft command to create items from recipes by consuming
ingredients from player inventory. Recipes command lists available
recipes or shows details for a specific recipe. Registers commands
and loads recipes at server startup.
2026-02-14 17:58:59 -05:00
7342a70ba2
Add furnish and unfurnish commands 2026-02-14 17:58:47 -05:00
5b6c808050
Add describe command for home zone descriptions
Allows players to set custom descriptions for their home zones.
Only works in the player's own home zone. Saves to TOML file.
2026-02-14 17:58:47 -05:00
5d14011684
Add terrain editing command for home zones 2026-02-14 17:58:30 -05:00
6229c87945
Add home command for personal zone teleportation 2026-02-14 17:17:36 -05:00
4c4d947ce2
Add visibility system for time and weather effects
Night, fog, and storms now reduce viewport size. Night reduces by 6
width and 2 height (21x11 -> 15x9). Thick fog reduces by 8 width and 4
height. Storm reduces by 4 width and 2 height. Effects stack but clamp
to minimum 7x5. Dawn and dusk subtly dim by 2 width.
2026-02-14 16:20:00 -05:00
9594e23011
Add atmosphere rendering function 2026-02-14 16:20:00 -05:00
67a0290ede
Add talk and reply commands with conversation system
Implements player-NPC dialogue using the dialogue tree data model.
Conversation state tracking manages active conversations and transitions
NPCs to "converse" behavior state during dialogue. Commands support
terminal node cleanup and display formatting with numbered choices.
2026-02-14 14:31:39 -05:00
a0360f221c
Wire boundary hooks into player movement
Movement now evaluates boundary enter/exit conditions. Exit checks can
block movement based on carrying items (by name or tag). Enter and exit
messages sent when crossing boundary borders. All boundary logic lives
in move_player() before position update.
2026-02-14 12:39:48 -05:00
e6ca4dc6b1
Fix code review issues for phase 14 2026-02-14 12:12:23 -05:00
71f4ae4ec4
Add builder commands @goto, @dig, @save, and @place
These commands enable runtime world editing:
- @goto teleports to a named zone's spawn point
- @dig creates a new blank zone with specified dimensions
- @save exports the current zone to TOML
- @place spawns a thing from templates at player position
2026-02-14 11:57:26 -05:00
68c18572d6
Add readable objects with read command
Implements TDD feature for readable text on Things:
- Added readable_text field to Thing dataclass
- Extended ThingTemplate to parse readable_text from TOML
- Created read command that finds objects by name/alias in inventory or on ground
- Handles edge cases: no target, not found, not readable
2026-02-14 11:51:52 -05:00
14dc2424ef
Show unlock requirements in help for locked moves
help <move> displays lock status and what's needed to unlock
when the move has an unlock_condition the player hasn't met.
2026-02-14 11:40:46 -05:00
085a19a564
Add score command with stats display
Shows PL, stamina, K/D ratio, time played, and unlocked moves.
Registered as score/stats/profile, available in all modes.
2026-02-14 11:40:45 -05:00
68f8c64cf3
Show corpses distinctly in look command 2026-02-14 09:59:44 -05:00
4878f39124
Add container grammar with get-all and targeting support
- Update _find_container to use targeting module (prefix + ordinal)
- Update cmd_put to use find_in_inventory directly
- Add 'get all from <container>' support with portable item filtering
- Add comprehensive tests for all container grammar features
2026-02-14 01:39:45 -05:00
aca9864881
Wire target resolution into thing commands
Replace local exact-match helpers with targeting module calls for
prefix matching and ordinal disambiguation. Works in get, drop, and
container extraction (get X from Y).
2026-02-14 01:39:45 -05:00
a98f340e5a
Wire target resolution into look command 2026-02-14 01:39:45 -05:00
3f042de360
Add player alias system with persistence and dispatch
Implements a complete alias system allowing players to create command shortcuts.
Aliases are expanded during dispatch with a recursion guard (max 10 levels).

Changes:
- Add aliases field to Player dataclass (dict[str, str])
- Add player_aliases table to database schema
- Add save_aliases() and load_aliases() persistence functions
- Add alias/unalias commands with built-in command protection
- Integrate alias expansion into dispatch() before command resolution
- Add comprehensive test coverage for all features
2026-02-14 01:39:45 -05:00
8bb87965d7
Wire stamina cues into combat and power loops 2026-02-14 01:00:37 -05:00
1dbc3a1c68
Replace magic number with DEATH_PL constant 2026-02-14 01:00:37 -05:00
8d31eeafaf
Extract power-up validation helper 2026-02-14 01:00:37 -05:00
5629f052a4
Add snap neck finisher command
Allows instant kill of unconscious opponents. Only works in combat on targets with unconscious posture. Ends encounter, handles mob despawn, sends dramatic messages to both parties.
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
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
593bfd3028
Add prompt command for customization 2026-02-13 22:48:59 -05:00
780501ceed
Add render_prompt with modal 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
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
aeb3d31702
Add client command to show protocol and terminal info 2026-02-12 15:58:54 -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
889a0d7bcf
Add paint mode for terrain editing 2026-02-11 22:38:14 -05:00
d6920834c8
Add auto-trigger portal on movement 2026-02-11 22:38:14 -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
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
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
b3471a8b94
Add zone registry with register and lookup
Implements a module-level zone registry for looking up zones by name.
Includes register_zone() and get_zone() functions with comprehensive
tests covering single/multiple zones, unknown lookups, and overwrites.
2026-02-11 20:40:31 -05:00
6081c90ad1
Add inventory persistence to player saves
Inventory saved as JSON list of thing template names in an inventory
column. Migration adds column to existing databases. load_player_data
returns inventory list, save_player serializes Thing names from contents.
2026-02-11 20:29:58 -05:00
2e79255aec
Show ground items in look command
After the viewport, look lists Things at the player's position
in a "On the ground: item1, item2" line. No output when empty.
2026-02-11 20:01:10 -05:00
e96fd50de5
Add inventory command with alias "i"
Lists Thing objects in player.contents with 2-space indented format.
Shows "You aren't carrying anything." when inventory is empty.
2026-02-11 20:01:05 -05:00
7c12bf3318
Add Object.move_to(), get and drop commands
Object.move_to() handles containment transfer: removes from old location's
contents, updates location pointer and coordinates, adds to new location.
get/drop commands use move_to to transfer Things between zone and inventory.
Supports name and alias matching for item lookup.
2026-02-11 19:57:38 -05:00