aboutsummaryrefslogtreecommitdiff
path: root/building_guide/pai_gow.md
blob: bf3a3a3b391b596f7be0f61c3a86fe25753db9dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Pai Gow Poker tables

Configure a `casino_tables` entry:

```yaml
- id: fortune
  game: paigow
  max_players: 6
  min_bet: 5
  max_bet: 1000
  betting_ticks: 30
  pai_gow:
    variant: classic # classic, ez, no_push, face_up
    envy: true
    a2345_second_highest: true # default; false makes A2345 the lowest straight
    action_ticks: 60
```

There are six player seats and one dealer. Each round deals seven packets
from a fresh 53-card deck, including unused seats. No player banking.
Side bets come first: `bet 5 fortune` (and, on a Face Up table,
`bet <amount> pushace`) is placed before the main wager. `bet 20` is the
main wager that commits the round; when every active player has one, the
cards are dealt immediately. A lone bettor is dealt as soon as the main
wager lands, with no timed window. Otherwise the betting window opens and
expires on `betting_ticks`; anyone who has not bet sits out. `unbet main`,
`unbet fortune`, `unbet pushace` or `unbet all` returns an undealt wager,
and `stop` before the deal returns every wager and frees the seat. Both
wagers use the table's limits; each is also bounded to 500,000,000 credits
to keep combined payouts below the economy's credit cap even on unlimited
tables.

`a2345_second_highest` defaults to true and controls whether A-2-3-4-5 is
the second-highest straight (below TJQKA) or the lowest. When enabled the
rule is printed on the felt.

## Player hand setting

`24` or `set 24` selects positions 2 and 4 for the two-card low hand.
`13456` selects those five positions for the high hand. Spaces and order
are immaterial; duplicates, out-of-range positions and other counts are
rejected. Setting locks the hand. Fouls are rejected with a clear warning
and leave the hand unset. `house` (`house way`, `set house`) sets
automatically. Timeout or disconnect sets an unfinished hand the house
way; a committed round cannot be abandoned.

## Variants

* Classic: win both hands for 0.95:1 profit; lose both to lose; otherwise push.
  Whole-credit profit rounds down, with a minimum of one credit on a win,
  consistent with the existing casino economy. This affects small-bet odds.
* EZ: the **partially-wild Joker edition**. No commission. Dealer's best
  five-card hand exactly queen-high pushes the main bets, regardless of split.
* No Push: no commission. When one player hand beats the dealer and the other
  does not, compare the two extra cards dealt after the seven packets. The
  first is the shared player tiebreaker, the second the dealer's. Joker is an
  ace; equal ranks lose to the dealer. Both-win/both-loss results are unchanged.
* Face Up: no commission; the dealer's seven cards are revealed before
  players set theirs. If the dealer's best five-card hand is exactly
  ace-high the round is an automatic push for every main bet. Requires
  `push_ace_high: 5_15_40` or `5_12_40`, which enables the optional Push
  Ace High side bet (`bet <amount> pushace`, capped at half the main
  wager): dealer ace-high without a Joker 5:1, with a Joker 15:1, both
  sides ace-high 40:1, else lost.

Fortune and Envy are independent of all main-game results, including
variant pushes. `push_ace_high` on a non-Face-Up table (or a Face Up table
without it) is rejected by validation.

## Fortune / Envy

Source: [Wizard of Odds Fortune tables](https://wizardofodds.com/games/pai-gow-poker/side-bets/fortune/).
Of the eight published fixed tables compared there, **table 8** has the
lowest house edge: 4.4292% before Envy, about 0.08% with six players each
betting five. These are published theoretical side-bet figures, not a
simulation of this server. Envy value depends on occupancy and wager size.

| Seven-card holding | Profit odds | Fixed Envy credits |
|---|---:|---:|
| Natural seven-card straight flush | 1000:1 | 500 |
| Royal flush + royal match | 750:1 | 250 |
| Wild seven-card straight flush | 500:1 | 150 |
| Five aces | 250:1 | 100 |
| Royal flush | 150:1 | 50 |
| Straight flush | 50:1 | 20 |
| Four of a kind | 25:1 | 5 |
| Full house | 5:1 | 0 |
| Flush | 4:1 | 0 |
| Three of a kind | 3:1 | 0 |
| Straight | 2:1 | 0 |
| Three pair | 1:1 | 0 |

Only the highest listed category pays, using all seven cards regardless
of the actual split. Royal match means suited KQ in the two remaining
cards. Fortune winning wagers also return their stake. A Fortune wager
of at least five qualifies for fixed Envy prizes on **other active players**,
not the bettor, dealer, unused packets or spectators. Multiple qualifying
hands add. The other player need not have a Fortune bet. A losing Fortune
stake is still lost when Envy pays.

With `envy: false` (default), quads improve to **30:1**, a custom local
schedule. The felt displays the effective table.

Variant sources:
* https://wizardofodds.com/games/ez-pai-gow-poker/partially-wild-joker/
* https://wizardofodds.com/games/pai-gow-poker/appendix/4/
* https://wizardofodds.com/games/face-up-pai-gow-poker/

House-way algorithm, settlement internals and Joker art notes are in
[../dev_guide/pai_gow.md](../dev_guide/pai_gow.md).