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

@@ -121,6 +121,9 @@ func (p *TriviaPlugin) OnMessage(ctx MessageContext) error {
}
if p.IsCommand(ctx.Body, "trivia") {
if !isGamesRoom(ctx.RoomID) {
return p.SendReply(ctx.RoomID, ctx.EventID, "Games are only available in the games channel!")
}
args := p.GetArgs(ctx.Body, "trivia")
return p.handleTrivia(ctx, args)
}