Commit Graph

10 Commits

Author SHA1 Message Date
prosolis
b15c13cde7 Add version system, tax tracking, lottery winner DMs, fmtEuro, audit fixes
- Version system: per-plugin versions via Versioned interface, crash_log and
  version_history DB tables, !version command, crash stats in !botinfo
- Tax tracking: tax_ledger table, trackTaxPaid across all communityTax and
  communityPotAdd sites, tax paid display in !stats and !superstatsexplusalpha
- Lottery: DM winners with winning ticket details and matched numbers bolded
- fmtEuro: generic currency formatter with thousand separators across all
  economy display paths
- Audit fixes: streak_decayed column for Streak Survivor achievement,
  combat_narrative empty-phase guard, crafting success rate integer division,
  RecordCrash nil-DB guard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 01:07:25 -07:00
prosolis
06153880e0 Add UNO addbot, fix audit issues, add fishing to superstats, update README
UNO addbot:
- !uno addbot / !uno removebot for lobby bot management (WinBee, GwinBee)
- Bots ante from community pot, increasing the total pot
- Single human can start a game if bots fill remaining slots
- Per-bot display names throughout (replaces global unoBotName)

Audit fixes:
- Lobby display now always shows both humans and bots (was omitting bots on join)
- Slot check accounts for bots (was only counting humans)
- Color Roulette bot victim name fixed (was showing acting bot's name)
- Lobby display built under lock to prevent stale reads
- Bot name list separated from env var to prevent duplicates
- Extracted shared buildLobbyDisplay helper
- Inlined unnecessary nameOf closure in sudden death

Other:
- T5 masterwork drop rate reduced from 1.5% to 0.5%
- Added fishing stats to !superstatsexplusalpha
- Updated README with all new features

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 20:51:28 -07:00
prosolis
b188d7036b Add UNO sudden death and multiplayer bot turn announcements
2-player UNO (especially No Mercy) regularly stalls past 100 turns.
Sudden death announces at turn 80 with a 20-turn countdown, then
scores hands by card point values — lowest total wins. Applies to
solo (vs bot) and multiplayer when 2 active players remain.

Also adds "It's X's turn" labels to bot plays in multiplayer,
matching the format human plays already had, and adds sudden death
checks to all turn advancement paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 09:27:00 -07:00
prosolis
0d3485c7c2 Add market plugin, arena, holidays, UNO stacking fix, and multiple UX improvements
- Market plugin (#49): daily index snapshots (Yahoo Finance + Finnhub fallback),
  Ollama-generated summaries, !howsthemarket, !marketstatus, !marketreport commands,
  exchange hours with DST support, 30-min room cooldown
- Adventure arena: 5-tier combat gauntlet with 20 monsters, risk-reward cashout,
  death lockout changed from 24h to midnight UTC across all code and flavor text
- Adventure holidays: double daily actions on holidays
- Adventure DM fix: 15-minute response window prevents bare numbers from triggering
  adventure during UNO games
- Adventure scheduler: jitter between morning DMs to avoid Matrix rate limits
- Adventure revive: wire up adv_revived achievement on admin revive
- Column migration system for existing databases (holiday_action_taken)
- Fix italic markdown rendering after newlines
- Fix holdem DMs broken by space groups including DM rooms
- UNO No Mercy: remove stacking escalation rule (any draw card stacks on any other)
- UNO multiplayer: add turn announcements after stack absorption and turn passes,
  jitter between rapid-fire messages with safe mutex handling
- Birthday: add €1,000 gift and 10 XP + €100 community celebration bonus
- Market: guard against division by zero, nil pointer, and timezone errors
- README updates: plugin count 48→49, all new commands, feature flags, architecture

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 21:26:19 -07:00
prosolis
9c6ded13fa Add forex plugin, stability fixes, and async HTTP dispatch
- Add forex plugin (Frankfurter v2 API) with rate lookups, analysis,
  DM-based alerts, and daily cron poll. Backfills 1 year of history
  on startup for moving averages and buy signal scoring.

- Fix bot hang caused by SQLite lock contention in reminder polling:
  rows cursor was held open while writing to the same DB. Collect
  results first, close cursor, then process. Same fix in milkcarton.

- Add sync retry loop so the bot reconnects after network drops
  instead of silently exiting. StopSync() for clean Ctrl+C shutdown.

- Add panic recovery to all dispatch, syncer, and cron paths.

- Make all HTTP-calling plugin commands async (goroutines) so a slow
  or dead external API cannot block the message dispatch pipeline.
  Affects: lookup, stocks, forex, anime, movies, concerts, gaming,
  retro, wotd, urls, howami.

- Extract DisplayName to Base, add db.Exec helper, convert silent
  error discards across the codebase.

- Fix UNO mercy-kill bug (eliminated bot continues playing), adventure
  DM nag spam, stats column mismatch, per-call regex/replacer allocs.

- Update README: forex commands, Finance section, 47 plugins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 09:22:02 -07:00
prosolis
e9890fd880 Add bot defeat tracking, audit fixes, and README UNO section
Add !twinbeeboard command (GogoBee's trophy wall) with unified
bot_defeats table tracking losses across Blackjack, UNO solo, and
UNO multiplayer. Fix No Mercy audit bugs: wild card color choice
routing, bot Color Roulette double-advance, missing DM notifications
for roulette victims and 7-0 swap targets, autoplay Color Roulette
effect. Remove dead code. Update README with full UNO documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:47:46 -07:00
prosolis
9446038646 Add UNO Show 'Em No Mercy game mode
168-card deck with new card types (Skip Everyone, Discard All,
Wild Reverse Draw Four, Wild Draw Six/Ten, Wild Color Roulette),
draw stacking, draw-until-playable, mercy elimination at 25 cards,
and optional 7-0 hand swap/rotation rule. Works in both solo and
multiplayer. Includes blackjack max player increase to 4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 19:37:41 -07:00
prosolis
20332d69d6 Add Wild Draw Four challenge mechanic and bot bluffing
- When a WD4 is played, the victim can challenge or accept
- Challenge succeeds if the WD4 player had a card matching the
  previous color — they draw 4 instead
- Challenge fails: victim draws 6 (4 + 2 penalty)
- Bot as victim: challenges probabilistically based on opponent
  hand size (10-70% chance, more cards = more likely to challenge)
- Bot as player: 20% chance to illegally play WD4 when it has
  matching color cards, making challenges meaningful against it
- Auto-play defaults to accepting (safe option)
- Challenge phase integrates with existing turn timer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 22:18:30 -07:00
prosolis
b9237181b1 Fix Blackjack bugs and UNO multiplayer issues, add simultaneous play
Blackjack:
- Fix handValue soft flag for multi-ace hands (A+A+5 returned soft=false,
  causing dealer to incorrectly stand on soft 17)
- Fix loss display showing €-50 instead of -€50
- Round down Blackjack 1.5x payout per requirements (math.Floor)
- Restrict !bjboard to games room like all other game commands
- Fix leaderboard showing misleading W/L (pushes counted as losses)
- Notify user when bet is capped to max instead of silently capping
- Fix bet max message to use min(MaxBet, maxAvailable)
- Rework to simultaneous play: all players hit/stand independently
  with one shared round timer, reminders at 30s and 10s remaining
- Add !blackjack deal to skip the 60s join wait
- Add mid-round forfeit via !blackjack leave during play
- Set minimum 5s delay for reminder timers to avoid spam on low timeouts

Multiplayer UNO:
- Fix lobby race conditions: move euro debit inside mutex lock to
  prevent lobby overwrites and missed refunds
- Extract shared applyCardEffects to deduplicate card effect logic
  from applyAndAnnounce, botMultiTurn, and applyAutoEffects
- Add 10-minute game inactivity timeout with refunds (was in
  requirements but not implemented)
- Add card count to all "draws a card, turn passes" room messages
  so spectators can track hand sizes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 21:59:57 -07:00
prosolis
e0a201ef97 Add multiplayer UNO, room sentiment tracking, and audit fixes
- Multiplayer UNO: lobby system (2-4 humans + bot), DM-based turns,
  30s auto-play timer, winner-takes-all pot, forfeit handling
- Solo UNO: refactor bot AI to shared standalone functions, support
  starting games from DM, passive UNO call system
- Room sentiment: new room_sentiment_stats table and !roomsentiment
  command showing per-room sentiment breakdown with percentages
- Stop purging llm_classifications (retain indefinitely for analytics)
- Fix multiplayer UNO audit issues: dead code in initMultiGame,
  double game.turns++ on human plays, missing !uno status command
- Update README with UNO commands, config, and architecture

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 10:26:50 -07:00