From 93dcb67ffee05ebf1de0c9a78a8b906eaf161007 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 4 Oct 2026 17:44:27 -0400 Subject: feat: new casino game: cash hunt, fixed verb issue with pai gow --- internal/game/casino.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'internal/game/casino.go') diff --git a/internal/game/casino.go b/internal/game/casino.go index 15e3b6a..710090a 100644 --- a/internal/game/casino.go +++ b/internal/game/casino.go @@ -333,6 +333,16 @@ func (g *Game) executePlay(sess *net.Session, args []string, rawInput string) { input := "" if len(args) > 0 { input = args[0] + // Multi-word names (Cash Hunt, Pai Gow, Big Six) precede any + // optional wager. Resolve the longest matching name first. + for n := len(args); n > 1; n-- { + name := strings.Join(args[:n], " ") + if _, ok := resolveCasinoChoice(choices, name); ok { + input = name + args = append([]string{name}, args[n:]...) + break + } + } } choice, ok := resolveCasinoChoice(choices, input) if !ok { @@ -708,14 +718,15 @@ func (g *Game) casinoBoardReminder(sess *net.Session, category string, menu *cas _, isCraps := snapshot.(*casino.CrapsSnapshot) _, isPoker := snapshot.(*casino.VideoPokerSnapshot) _, isPlinko := snapshot.(*casino.PlinkoSnapshot) + _, isCashHunt := snapshot.(*casino.CashHuntSnapshot) _, isPaiGow := snapshot.(*casino.PaiGowSnapshot) b, isBigSix := snapshot.(*casino.BigSixSnapshot) isBigSix = isBigSix && b.Phase != "playing" && b.Phase != "result" s, isRoulette := snapshot.(*casino.RouletteSnapshot) - if !isPlinko && !isPoker && !isCraps && !isPaiGow && !isBigSix && (!isRoulette || s.Phase == "playing" || s.Phase == "result") { + if !isCashHunt && !isPlinko && !isPoker && !isCraps && !isPaiGow && !isBigSix && (!isRoulette || s.Phase == "playing" || s.Phase == "result") { return "", false } - if !isPlinko && !isPoker && !isCraps && !isPaiGow && !isBigSix && sess.Player.OptionString("casino_display") == "compact" && (menu.Repeat || !menu.ShowBalance) { + if !isCashHunt && !isPlinko && !isPoker && !isCraps && !isPaiGow && !isBigSix && sess.Player.OptionString("casino_display") == "compact" && (menu.Repeat || !menu.ShowBalance) { // The compact reminder is already a short block; leave it intact. return "", false } @@ -801,6 +812,8 @@ func (g *Game) renderCasinoSnapshot(sess *net.Session, snapshot casino.Snapshot) // how verbose the command menus are. size := sess.Player.OptionInt("card_size") switch s := snapshot.(type) { + case *casino.CashHuntSnapshot: + return renderCashHunt(s, mode, unicode) case *casino.PlinkoSnapshot: return renderPlinko(s, mode, unicode) case *casino.PaiGowSnapshot: -- cgit v1.2.3