the_goth_cardgame_collection/games/blackjack
thw 163a3665d2 first commit 2026-11-14 05:25:51 +01:00
..
__pycache__ first commit 2026-11-14 05:25:51 +01:00
models first commit 2026-11-14 05:25:51 +01:00
views first commit 2026-11-14 05:25:51 +01:00
README.md first commit 2026-11-14 05:25:51 +01:00
start.py first commit 2026-11-14 05:25:51 +01:00

README.md

† Blackjack – Devil's Gambit †

Deutsch | English


🇩🇪 Deutsch

Überblick

Blackjack – Devil's Gambit kombiniert klassische Vegas-Kartenregeln mit einem gnadenlosen Multi-Player-Goldpot, spiellevel-skalierten Erhöhungen, Divine Punishment auf Gottheit-Rang und dem unausweichlichen Devil's Deal.

1. Kontoverwaltung, UI-Logik & Grundregeln

  • Bewusstes Goldbeutel-System (0–5 Konten):
    • Neue Seelen starten ohne automatisch aufgezwungenes Startkonto. Erst nach dem bewussten Anlegen eines Goldbeutels (bis zu 5 separate Konten, Startkapital je 1.000 Gold) werden Gegner-Setup, XP-Umtausch, Tischauswahl und Konto-Statistiken freigeschaltet.
    • Nicht klickbare Elemente (fehlendes Konto, zu wenig Gold für den Tisch oder nicht genügend XP für den Tausch) werden visuell über einen automatischen Graustufen-Filter gesperrt.
  • Permanente Gold-Transparenz & Eigene Statistik-Ansicht:
    • Sobald ein Goldbeutel ausgewählt ist, wird das aktuelle Guthaben dauerhaft sowohl oben rechts in der Topbar als auch prominent im Gold-Banner des Kontomenüs angezeigt.
    • Über den eigenen Button Statistiken in der Topbar öffnet sich BlackjackStatsView als dedizierte Ansicht zur Auswertung jedes einzelnen Goldbeutels (inkl. Tischfilter).
  • Fester Grundeinsatz (Ante): Zu Beginn jeder Runde legt jeder Teilnehmer (Spieler & aktive Bots) exakt 10 Gold Grundeinsatz in den gemeinsamen Pot.
  • Kartenverteilung:
    • Du erhältst 2 eigene Karten (für dich sichtbar, für Gegner verdeckt).
    • Bis zu 3 KI-Gegner erhalten jeweils 2 verdeckte Karten.
    • Der Haus-Dealer erhält 1 offene Karte (Upcard) und 1 verdeckte Karte (Hole Card).
  • Dealer-Regel: Der Haus-Dealer muss bei 16 oder weniger weitere Karten ziehen (Hit) und bleibt ab 17 bis 21 stehen (Stand).
  • No Surrender: Ein vorzeitiges Aufgeben gegen halben Einsatz existiert nicht. Wer aussteigt, lässt sein gesamtes bisher gesetztes Gold im Pot zurück.
  • Sofortsieg 7-7-7: Hält ein Spieler oder Bot drei Siebenen (7-7-7), endet die Runde augenblicklich und der gesamte Pot geht sofort an diese Hand.
  • Tischvarianten:
    • Klassisch (bj_classic): 2 Decks, einfacher Level-Einsatzmultiplikator (1x), 1.0x XP.
    • Hoher Einsatz (bj_highstakes): 6 Decks, doppelter Level-Einsatzmultiplikator (2x), 1.45x XP.

2. Devil's Gambit: Der 4-Stufen-Ablaufbaum

Jeder Zug eines Spielers (und jedes Bots) durchläuft strikt nacheinander vier Entscheidungsknoten. Erhöhungen erscheinen erst, nachdem man sich aktiv fürs Weiterspielen entschieden hat:

+------------------+
|   Rundenstart    |  (10 Gold Grundeinsatz pro Person -> je 2 Karten)
+---------+--------+
          |
+---------v--------+                    +----------------------------+
|   1. Mitgehen?   +--- Nein (eben) ----> Als FERTIG markiert        |
+---------+--------+                    +-------------+--------------+
          |                                           |
          +--- Nein (gegen Erhöhung) ---> VERLOREN!   |
          |    (Gold im Pot verloren)        |        |
         Ja                                  |        |
          |                                  |        |
+---------v--------+                         |        |
|    2. Ziehen?    +-- Nein --+              |        |
| (Hit/Double/Split|          |              |        |
+---------+--------+          |              |        |
         Ja                   |              |        |
          |                   |              |        |
+---------v--------+          |              v        v
|  Karte gezogen!  |          |         +------------------+
|    Über 21?      +-- Ja ----+---------> Nächster Spieler |
+---------+--------+          |         | (Verloren / Out) |
        Nein                  |         +------------------+
          |                   |
+---------v-------------------v-+       +------------------+
|         3. Erhöhen?           +--Ja---> Pot erhöhen!     |
|  (Chips skalieren mit Level)  |       | (Zwingt Gegner   |
+---------+---------------------+       |  zum Mitgehen)   |
        Nein                            +--------+---------+
          |                                      |
+---------v--------+                             |
|    4. Fertig?    +-- Ja (Karten sperren) ------+
+---------+--------+                             |
        Nein (Offen bleiben)                     |
          |                                      |
+---------v--------------------------------------v-+
|             Nächster Spieler am Zug              |
+--------------------------------------------------+

Besondere Karten-Aktionen in Schritt 2 (Ziehen?)

  • Hit (Karte ziehen): Zieht 1 Karte. Unter/gleich 21 geht es weiter zu Schritt 3 (Erhöhen?), über 21 ist die Hand sofort raus (Bust).
  • Double Down (Verdoppeln): Nur bei genau 2 Startkarten möglich. Verdoppelt deinen Einsatz auf das Doppelte des aktuellen Tisch-Höchsteinsatzes, zieht genau eine Karte und sperrt die Hand automatisch als Fertig.
  • Split (Teilen): Haben deine ersten beiden Karten denselben Blackjack-Wert, kannst du gegen einen zweiten Einsatz zwei getrennte Hände parallel weiterspielen.
  • Level-skalierte Erhöhungen: Während der Grundeinsatz beim Geben immer bei 10 Gold bleibt, wachsen deine vier Erhöhungs-Chips in Schritt 3 automatisch alle 5 Blackjack-Level (mit jedem neuen Prestige-Rang) mit. Pro Runde sind bis zu 4 Erhöhungen möglich.

3. KI-Gegner (Stufe 0 bis Gottheit)

Du kannst bis zu 3 Bots gleichzeitig an den Tisch setzen:

  • Stufe 0 – Verwirrte Seele: Unberechenbare Zufallszüge.
  • Stufe 1 – Akolyth: Vorsichtiges Spiel, hält früh.
  • Stufe 2 – Nachtwanderer: Solide Grundwerte, jagt bei zwei 7ern aktiv die 7-7-7.
  • Stufe 3 – Schatten-Zocker: Bezieht die offene Karte des Haus-Dealers ein.
  • Stufe 4 – Experte: Spielt mathematische Basisstrategie (Dealer Stands on 17).
  • Stufe 5 – Großmeister: Zählt alle offenen Karten per Hi-Lo-System (Running & True Count) über den gesamten Kartenschuh mit.
  • Stufe 6 – Gottheit (Gnadenlos / Online-Standard): Nutzt vollständige Illustrious-18-Indexabweichungen, erhöht bei positivem True Count kompromisslos mit Maximal-Chips, nutzt aggressives Double-Down-Timing und steigt bei negativer Erwartung gegen teure Raises eiskalt aus.

4. Gold-Umtausch, Divine Punishment & The Devil's Deal

Sinkt ein Goldbeutel unter das Tischminimum von 10 Gold, greift ein mehrstufiges System, das ausschließlich an dein Blackjack-Level gekoppelt ist:

  1. Regulärer Umtausch (bis einschl. Schöpfergeist V, bevor jemals Gottheit erreicht wurde):
    • Fester Kurs: 10.000 Blackjack-XP → +10 Gold.
  2. Divine Punishment Mode (ab erstmaligem Erreichen von Gottheit 1 / Level 1.296):
    • Ab sofort wird für jedes Level ab Schöpfergeist V dein realer XP-Durchschnitt pro Partie aufgezeichnet.
    • Strafkurs: +10 Gold kosten das 10-Fache deines durchschnittlichen XP-Gewinns aus dem vorherigen Level (z. B. Ø 34 Mio. XP auf Schöpfergeist V → 340 Mio. XP für +10 Gold).
    • Harter Boden (Floor): Du kannst durch Divine Punishment niemals auf Level 0 abstürzen, sondern fällst maximal bis auf die exakte Unterkante von Schöpfergeist V zurück.
  3. The Devil's Deal (Am Abgrund von Schöpfergeist V):
    • Stehst du ohne verbleibenden XP-Puffer auf der Untergrenze von Schöpfergeist V, sperrt sich der XP-Tausch und The Devil's Deal öffnet sich.
    • Seelen-Opfer: Du kannst ein anderes Seelen-Profil aus der Datenbank opfern (unwiderruflich löschen!), sofern dieses andere Profil in Blackjack mindestens Rang Stütze I (Level 421+) erreicht hat. Dafür erhältst du +10 Teufelsmünzen.
    • Unausweichlicher Lock & Auto-Save: Sobald die 10 Teufelsmünzen angenommen wurden, startet das Spiel sofort am gesperrten Tisch (devils_deal_active = 1). Alle Zurück-Buttons und anderen Spiele im Hauptmenü verschwinden. Nach jedem einzelnen Klick speichert das Spiel den kompletten Tischzustand in der Datenbank. Schließt du das Fenster, existiert beim nächsten Login ausschließlich „Pakt fortsetzen (Resume)“, bis der Pakt durch Sieg oder Bankrott entschieden ist!

Modulstruktur (games/blackjack/)

games/blackjack/
├── start.py                        # Einstiegspunkt & Devil's-Deal-Lock-Routing
├── README.md                       # Spielspezifische Dokumentation (DE/EN)
├── models/
│   ├── blackjack_engine.py         # Spiel-Logik, Deck, Pot, Split/Double & JSON-Serialisierung
│   ├── hand_evaluator.py           # Punktberechnung, Soft-Hands, Blackjack & 7-7-7 Prüfung
│   ├── player_hand.py              # Datenmodell für Spielerhände (inkl. Split-Status)
│   ├── bot_seat.py                 # Sitz- & Statusmodell für KI-Gegner
│   └── bot_ai.py                   # 4-Stufen-KI von Stufe 0 bis Stufe 6 (Gottheit / Hi-Lo Counter)
└── views/
    ├── blackjack_menu_view.py      # Kontoverwaltung, Gold-Banner, Gegner-Setup & Tischwahl
    ├── blackjack_stats_view.py     # Dedizierte Konto-Statistik-Ansicht pro Goldbeutel
    ├── blackjack_table_view.py     # Spieltisch, 4-Knoten-Ablaufbaum & Auto-Save-Persistenz
    └── round_result_dialog.py      # Runden-Auswertung mit Gewinn/Verlust-GIFs & Level-Up-Anzeige

🇬🇧 English

Overview

Blackjack – Devil's Gambit fuses classic Vegas card rules with a ruthless multi-player gold pot, level-scaled bet raises, Divine Punishment at Deity rank, and the inescapable Devil's Deal.

1. Account Management, UI Logic & Core Rules

  • Deliberate Gold Pouch System (0–5 Accounts):
    • New Souls start cleanly with zero pre-created accounts. Only after explicitly creating a Gold Pouch (up to 5 independent pouches, 1,000 Gold starting balance each) do opponent setup, XP exchange, table entry, and account statistics unlock.
    • Unavailable actions (no account created yet, insufficient gold for table entry, or insufficient XP for exchange) are visually locked using an automatic grayscale dimming filter.
  • Persistent Gold Visibility & Dedicated Stats View:
    • Once a pouch is active, your current Gold balance is permanently displayed both in the topbar and inside a prominent Gold banner within the account panel.
    • Clicking Statistics in the topbar opens BlackjackStatsView, a dedicated full-screen statistics breakdown for each individual Gold Pouch (filterable by table variant).
  • Fixed Initial Ante: Every participant (player & active bots) places a mandatory 10 Gold entry ante into the shared pot when cards are dealt.
  • Dealing & Visibility:
    • You receive 2 cards (visible to you, hidden from opponents).
    • Up to 3 AI opponents receive 2 hidden cards each.
    • The House Dealer receives 1 face-up card (Upcard) and 1 face-down card (Hole Card).
  • Dealer Rule: The House Dealer hits on 16 or less and stands on 17 through 21.
  • No Surrender: Leaving a hand forfeits every coin you have already committed to the pot.
  • Instant 7-7-7 Victory: Holding three Sevens (7-7-7) immediately ends the round and awards the entire pot to that hand.
  • Variants:
    • Classic (bj_classic): 2 decks, 1x level chip scale, 1.0x XP multiplier.
    • High Stakes (bj_highstakes): 6 decks, 2x level chip scale, 1.45x XP multiplier.

2. Devil's Gambit: 4-Step Turn Flowchart

Every turn follows a strict 4-step decision tree. Raising options only unlock after committing to stay in the hand:

  1. Step 1 – Match Bet / Continue?
    • If an opponent raised, you must match the deficit (+{X} Gold) to stay alive—declining eliminates your hand immediately (Lost).
    • If no raise is pending, choose Continue Playing to enter your turn, or Mark as Ready to lock your cards right away and pass to the next seat.
  2. Step 2 – Draw Card? (Skipped if your cards are already locked)
    • Choose Draw Card (Hit), Double Down (on 2 cards: doubles table bet, draws 1 card, locks hand), Split (on equal-value pair: places second bet to play two hands side-by-side), or No Card.
    • Exceeding 21 results in an immediate Bust and passes the turn.
  3. Step 3 – Raise Bet?
    • Pick one of your 4 level-scaled raise chips (scaling up every 5 Blackjack levels) to increase the table stake and force all other active players—even those who already locked their cards—to match on their next turn, or choose No Raise.
  4. Step 4 – Ready?
    • Choose Yes — Ready (Lock Cards) so you draw no further cards, or No — Next Player to keep your hand open for the next cycle.

3. AI Personalities (Level 0 to Deity)

  • Level 0 – Lost Soul: Unpredictable random decisions.
  • Level 1 – Acolyte: Cautious play, stands early.
  • Level 2 – Nightwalker: Solid fundamentals, actively chases 7-7-7 on paired Sevens.
  • Level 3 – Shadow Gambler: Evaluates the House Dealer's upcard.
  • Level 4 – Expert: Executes optimal Dealer-Stands-on-17 Basic Strategy.
  • Level 5 – Grandmaster: Tracks the shoe using Hi-Lo card counting (Running & True Count).
  • Level 6 – Deity (Merciless / Online Standard): Full Illustrious-18 count index deviations, maximum value-raising pressure on strong hands/counts, optimal soft & hard Double Downs, and disciplined folds against unfavorable pot odds.

4. Gold Exchange, Divine Punishment & The Devil's Deal

When a pouch drops below the 10 Gold table minimum, progression rules bound strictly to your Blackjack level apply:

  1. Standard Exchange (Before ever reaching Deity 1):
    • Fixed rate: 10,000 Blackjack XP → +10 Gold.
  2. Divine Punishment Mode (Upon reaching Deity 1 / Level 1,296+):
    • The game records your real average XP earned per match for every level starting at Creator Spirit V.
    • Punishment Rate: +10 Gold costs 10x your average match XP from the previous level.
    • Hard Floor: Divine Punishment can never drop you to zero—your fall is strictly capped at the exact floor of Creator Spirit V.
  3. The Devil's Deal (At the floor of Creator Spirit V):
    • Once stranded at the bottom of Creator Spirit V, XP exchange locks and The Devil's Deal awakens.
    • Soul Sacrifice: Permanently erase another Soul profile that has reached at least Support I (Level 421+) in Blackjack to receive +10 Devil's Coins.
    • No Escape & Per-Click Auto-Save: Accepting the pact immediately locks you at the Blackjack table (devils_deal_active = 1). All exit buttons and other games are disabled, and every single button click auto-saves the entire table, shoe, and pot state to SQLite. Closing and reopening the app presents Resume Pact as your sole option until you either win your way free or lose the last coin!

Module Structure (games/blackjack/)

games/blackjack/
├── start.py                        # Module entry point & Devil's Deal lock routing
├── README.md                       # Game-specific manual (DE/EN)
├── models/
│   ├── blackjack_engine.py         # Core rules, shoe, pot, Split/Double & JSON state serialization
│   ├── hand_evaluator.py           # Hand scoring, soft totals, natural Blackjack & 7-7-7 detection
│   ├── player_hand.py              # Data model for player hands (incl. split tracking)
│   ├── bot_seat.py                 # Seat & status model for AI opponents
│   └── bot_ai.py                   # 4-step flowchart AI from Level 0 up to Level 6 (Deity counter)
└── views/
    ├── blackjack_menu_view.py      # Account management, Gold banner, bot setup & variant cards
    ├── blackjack_stats_view.py     # Dedicated per-pouch statistics screen
    ├── blackjack_table_view.py     # Game table UI, 4-node turn state machine & per-click auto-save
    └── round_result_dialog.py      # Showdown modal with win/loss GIFs & level-up banner