Blackjack
Casino card game module. Play classic blackjack (21) against the dealer. Requires PQCasino module to be installed. Standard blackjack rules: get closer to 21 than dealer without busting. Bet gold on each hand. Navigation link appears in Casino. Card images distributed with Casino module.
Requirements
- PQCasino module: Core casino system must be installed and active
- Access to Casino location (usually village)
How to Play
Accessing Blackjack:
- Visit Casino location
- Click "BlackJack" link
- Game interface loads from lib/blackjack.php library
Standard Blackjack Rules:
- Goal: Get hand value closer to 21 than dealer without going over
- Number cards = face value (2-10)
- Face cards (J, Q, K) = 10
- Aces = 1 or 11 (player's choice)
- Bust = hand value > 21 (automatic loss)
Gameplay Flow:
- Place bet (gold wagered)
- Receive 2 cards, dealer receives 2 (1 face up, 1 face down)
- Choose action: Hit (take card), Stand (keep hand), Double Down, Split (if applicable)
- Dealer reveals hand, takes cards until 17+
- Compare hands: Higher wins, ties push (bet returned)
Technical Details
Module Structure:
- Wrapper module that hooks into PQCasino
- Actual game logic in modules/lib/blackjack.php
- Stores cards and dealt state in user prefs
Card Storage:
- cards pref: Text storage of current hand
- dealt pref: Integer count of cards dealt
Hook:
- pqcasino: Adds "BlackJack" navigation link in casino
Strategy
Basic Blackjack Strategy:
- Hit on 11 or less (can't bust)
- Stand on 17+ (high chance of busting)
- Consider dealer's up card when deciding on 12-16
- Double down on 10 or 11 if dealer shows weak card (2-6)
Bankroll Management:
- Don't bet more than you can afford to lose
- Set win/loss limits before playing
- Casino games have house edge (you'll lose long-term)
Comparison to Other Casino Games
- Blackjack: Skill-based card game, lowest house edge
- Slots: Pure luck, higher house edge
- Roulette: Mixed luck/strategy, medium house edge
Blackjack offers best odds if you play with basic strategy.
Limitations
- Requires PQCasino: Won't install or function without casino module
- Simple Implementation: May not have all blackjack variants (insurance, surrender, etc.)
- Card Images External: Distributed with PQCasino, not included in this module
Blackjack: where you try to get 21 without going over, the dealer always seems to pull exactly what they need, and you're mathematically guaranteed to lose gold over time due to house edge. But hey, at least it's more fair than wizard slots.