diff options
| author | historia <[not public]> | 2026-10-09 12:32:48 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-09 12:32:48 -0400 |
| commit | e95b15ed51832e46c7d0d90f3c84d0ac0b65fbe3 (patch) | |
| tree | 512ee9e1ce9333670553d90efe55e91d8ecff0fd /internal/game/cmd_registry.go | |
| parent | 9666676766bf21364f4fc4d0d1d336e72f2a91b4 (diff) | |
| download | thehouseoficarus-e95b15ed51832e46c7d0d90f3c84d0ac0b65fbe3.tar.gz | |
feat: pachinko slots randomized, 9th slot removed, RTP set to 100% if played perfectly
Diffstat (limited to 'internal/game/cmd_registry.go')
| -rw-r--r-- | internal/game/cmd_registry.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/game/cmd_registry.go b/internal/game/cmd_registry.go index 2defb9e..ef17925 100644 --- a/internal/game/cmd_registry.go +++ b/internal/game/cmd_registry.go @@ -252,6 +252,8 @@ func (g *Game) casinoOwnedInput(sess *net.Session, cmd string) bool { switch table.Config.Game { case casino.GameCashHunt: return isAllDigits(cmd) || cmd == "settle" + case casino.GamePachinko: + return isAllDigits(cmd) case casino.GamePaiGow: return isAllDigits(cmd) || cmd == "set" || cmd == "house" || cmd == "autoset" || cmd == "settle" } @@ -291,6 +293,7 @@ var casinoCommonVerbs = []string{"watch", "game", "table", "list", "stop", "rule var casinoVerbsByGame = map[casino.GameName][]string{ casino.GameCashHunt: {"bet", "rebet", "difficulty", "paytable", "pick", "settle"}, casino.GamePlinko: {"bet", "rebet", "difficulty", "balls", "paytable"}, + casino.GamePachinko: {"bet", "rebet", "table", "drop"}, casino.GameBlackjack: {"bet", "rebet", "unbet", "hit", "stand", "double", "split", "insurance", "surrender", "decline"}, casino.GameBaccarat: {"bet", "rebet", "unbet"}, casino.GameRoulette: {"bet", "rebet", "unbet"}, @@ -417,6 +420,19 @@ func (g *Game) executeCommand(sess *net.Session, cmd string, args []string, rawI } } + // Pachinko owns bare slot numbers and "drop N" while seated; a "drop" + // with any other argument still drops an item from the world. + if p != nil && g.Casino != nil { + if t, playing := g.Casino.Participation(p.Name); playing && t != nil && t.Config.Game == casino.GamePachinko { + numeric := cmd != "" && cmd[0] >= '0' && cmd[0] <= '9' + dropSlot := cmd == "drop" && len(args) == 1 && isAllDigits(args[0]) + if numeric || dropSlot { + g.executeTableAction(sess, strings.Join(append([]string{cmd}, args...), " ")) + return + } + } + } + // Pai Gow owns these inputs only while seated; leave normal commands alone. if p != nil && g.Casino != nil { if t, playing := g.Casino.Participation(p.Name); playing && t != nil && t.Config.Game == casino.GamePaiGow { |
