mud/mud.tin
Jared Miller 6344c09275
Restructure combat moves: single-word commands with variant args
The DREAMBOOK always described "punch right/left [target]" as one command
with a direction argument, but the implementation had separate TOML files
and multi-word command names that the dispatcher couldn't reach (it only
matches the first word). Aliases like "pr" also couldn't pass targets
because the shared handler tried to re-derive the move from args.

Changes:
- Merge punch_left/right, dodge_left/right, parry_high/low into single
  TOML files with [variants] sections
- Add command/variant fields to CombatMove for tracking move families
- load_move() now returns list[CombatMove], expanding variants
- Handlers bound to moves via closures at registration time:
  variant handler for base commands (punch → parses direction from args),
  direct handler for aliases and simple moves (pr → move already known)
- Core logic in do_attack/do_defend takes a resolved move
- Combat doc rewritten as rst with architecture details
- Simplify mud.tin aliases (pr/pl/etc are built-in MUD commands now)
2026-02-08 00:20:52 -05:00

18 lines
515 B
Text

#NOP TinTin++ config for connecting to the MUD server
#split 0 1
#session mud localhost 6789
#NOP fly aliases: f<direction> = fly 5 in that direction
#alias {fn} {fly north}
#alias {fs} {fly south}
#alias {fe} {fly east}
#alias {fw} {fly west}
#alias {fne} {fly northeast}
#alias {fnw} {fly northwest}
#alias {fse} {fly southeast}
#alias {fsw} {fly southwest}
#NOP combat aliases (pr/pl/dr/dl/f/v are built into the MUD)
#NOP these are extras for single-key convenience
#alias {o} {sweep}
#alias {r} {roundhouse}