KAZIK/docs/native-blackjack-party.md
Artvasil09 881a0061dc Add native NPC visitors with contracts, Clover slots, Pyramid, and party table scenes
Implement 32x32 BFS visitor navigation and daily contracts system with companion .npc journals; add native assembly scenes for Clover slots, Pyramid cards, Blackjack Party and Russian Party; package animation and sprite packs; add comprehensive offline test suites and rebuild shipping binaries.
2026-10-13 09:47:33 +03:00

71 lines
3.9 KiB
Markdown

# Native Blackjack: Shared Table
## Implemented
The graphical blackjack table can seat the player and zero to three AI guests,
with a house dealer. The existing solo mode remains the default. Before a hand,
the four numbered controls select the guest count (also keys 0, 1, 2, 3).
Selection is locked until the hand has ended. Choosing a different count after
a result clears that displayed hand without touching the wallet.
All seats receive actual identities from one shuffled 52-card deck. The deal
is round-robin, followed by the player's turn, timed guest decisions and the
dealer's turn. Each guest has a separate hand, virtual stake and result.
Guest stakes do not come from the player's balance. Guests do not yet have
persistent wallets or bring the hall visitor's identity to their table seat.
Tolya is cautious, Sergey hits more aggressively, and Alisa adapts her stopping
threshold to the dealer's upcard. A two-card eleven can double against an
appropriate upcard. Decisions never examine the hidden dealer card, another
seat's hand or future deck cards. These are limited personality strategies,
not a complete optimal blackjack strategy chart. Dealer stands on all 17s;
player blackjack pays 3:2, pushes return the deducted stake.
A player bust or natural no longer truncates the guests' turns. A dealer
natural resolves all seats immediately. The existing exit confirmation freezes
the table and forfeits only the player's stake on confirmation. Settlement and
NPC challenge progress happen once for the player, never once per guest.
## Artwork
`assets/sprites/tables/blackjack-guests-v1.png` was generated with the built-in
image generator as one transparent three-column, two-row sprite sheet.
Each adult character has an attentive pose and a card-request gesture.
`tools/generators/pack_blackjack_guests.py` normalizes its six cells into
160-by-160 BGRA frames in `assets/animations/tables/blackjack-guests-v1.bin`.
These are two poses per guest, not a full continuous character animation.
Native timed card flights and queued dealer-hand sprites animate each draw.
`blackjack-room-v1.png` and its compiled ANM1 background put the guests behind
the far wooden rim instead of drawing their bodies directly on the felt.
Generation prompt: detailed hand-painted Doom-era pixel sprites, transparent
background, three seated adult guests (bald gray-suited man, dark-haired navy-
jacketed man, auburn-haired emerald-dressed woman); identical anchors and scale
across attentive/extended-hand rows; warm amber light, burgundy shadows; no
table, cards, chips, chairs, text or cross-cell overlap.
Room prompt: empty first-person vintage casino background in the same detailed
pixel style; three empty burgundy chairs behind a wooden blackjack-table rim
at 52% canvas height, green felt below, front padded rim at 90%; dark wood,
brass lights, no people, text or cards. The built-in generator's first room
plate was edited to lower the far rim to the intended midpoint.
## Verification
`tools/tests/blackjack_party_test.inc` runs in the native action suite:
600 complete hands across all three guest counts; exact deck consumption and
card uniqueness; bounded counts; independent player payout; natural/push/bust;
no hidden-card dependence; actual mouse and keyboard selection; safe exit and
frozen timers; render purity and six framebuffer captures.
`check_blackjack_party.py --parity` compares the tested and shipping MASM
procedures and inspects the native captures. `test_blackjack_party.ps1` is a
focused native probe linked against the action-test object.
## Still Pending
Native three/four-player poker, Russian roulette and Buckshot are separate
features. They are not implemented by this blackjack work, and the old console
four-seat poker loop is not connected to the graphical table. Poker still needs
correct multiplayer betting, all-ins, side pots and tie splits before that
loop can become a graphical game.