Add games system: euro economy, Hangman, Blackjack, coin flip

Euro economy: virtual currency earned passively per message (tiered by
word count, 30s cooldown). Starting balance seeded from corpus character
count. Balance, leaderboard, and transfer commands. Debt system with
configurable limit.

Hangman: collaborative game with phrase pool loaded from file. ASCII
gallows display, tiered scoring (Easy/Medium/Hard/Extreme), early
solution bonus, participant tracking with DM verification. Community
phrase submission with LLM screening.

Blackjack: 1-2 players vs dealer. Standard casino rules (hit soft 17).
Auto-play on timeout. Bet validation against balance and debt limit.
Blackjack pays 1.5x. Separate leaderboard.

Games channel restriction: all game commands (trivia, hangman, blackjack,
flip) restricted to GAMES_ROOM. Dice (!roll) exempt. Trivia also
restricted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-03-11 18:30:17 -07:00
parent 996bb18566
commit cce5160057
9 changed files with 1989 additions and 1 deletions

View File

@@ -38,6 +38,20 @@ FEATURE_TRIVIA=true # set to "false" to disable trivia
FEATURE_ESTEEMED= # set to anything to enable satirical esteemed member posts
ESTEEMED_ROOM= # room ID for esteemed member posts (separate from broadcast rooms)
# ---- Games & Economy ----
GAMES_ROOM= # room ID where game commands work (trivia, hangman, blackjack, flip)
EURO_COOLDOWN_SECONDS=30 # cooldown between passive euro earning
EURO_DEBT_REMINDER=true # weekly DM reminder if in debt
EURO_STARTING_CAP=2500 # max starting balance from corpus
HANGMAN_MAX_WRONG_GUESSES=6
HANGMAN_SOLUTION_BONUS_MULTIPLIER=2
HANGMAN_PHRASE_FILE= # path to newline-delimited phrase file
BLACKJACK_TIMEOUT_SECONDS=60 # auto-play timeout per player turn
BLACKJACK_AUTOPLAY_THRESHOLD=15
BLACKJACK_MIN_BET=1
BLACKJACK_MAX_BET=500
BLACKJACK_DEBT_LIMIT=1000 # max debt before betting disabled
# ---- Space Groups (automatic room grouping for community-wide leaderboards) ----
SPACE_GROUP_THRESHOLD=50 # % of smaller room's members that must overlap (1-100, default 50)