-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Also something I'm adding to my version, I can add as a PR if it's something that fits with your system. I will mention that mine will be up for a limit time (during a convention) but i've tried to make it so these modules don't break the economy and is balanced.
A tavern mini-game system with two dice games. Players can bet gold and try their luck at the bar.
Features
• Two games - Dice (vs house) and High/Low (streak multiplier)
• Room-restricted - Only works in rooms with isbar: true
• Bet limits - Prevents abuse with max bet caps
• Streak system - High/Low rewards consecutive correct guesses
Commands
| Command | Description |
|---|---|
| gamble | Show gambling menu and available games |
| dice [amount] | Roll 2d6 against the house |
| highorlow [amount] | Start a high/low guessing game |
| high | Guess next roll will be higher |
| low | Guess next roll will be lower |
| highorlow cash | Cash out your winnings |
Games
Dice (vs House)
• Bet 1-1000 gold
• Both player and house roll 2d6
• Highest total wins
• Win: Double your bet
• Lose: Lose your bet
• Tie: Bet returned
High or Low
• Bet 1-500 gold
• First roll shown, guess if next will be higher or lower
• Correct guess increases streak multiplier:
• 1 streak: 1.5x
• 2 streak: 2.0x
• 3 streak: 2.5x
• etc.
• Cash out anytime to lock in winnings
• Wrong guess = lose everything
• Tie = keep streak, roll again
Room Requirement
Gambling requires isbar: true on the room.
To enable in a room, add to the room YAML:
isbar: true
When players enter a bar room, they'll see:
This is a bar/tavern! Type gamble to play games.
UI Examples
Gamble Menu:
╔══════════════════════════════════════╗
║ 🎲 GAMBLING GAMES 🎲 ║
╠══════════════════════════════════════╣
║ ║
║ dice [amount] ║
║ Roll dice against the house. ║
║ Highest roll wins! ║
║ ║
║ highorlow [amount] ║
║ Guess if next roll is higher ║
║ or lower. Win streak = bonus! ║
║ ║
╚══════════════════════════════════════╝
You have 150 gold on hand.
Dice Win:
You bet 50 gold and roll the dice...
Your roll: 🎲 5 + 🎲 4 = 9
House roll: 🎲 2 + 🎲 3 = 5
🎉 YOU WIN! You pocket 50 gold!
You now have 200 gold.
High/Low Streak:
You bet 100 gold on High or Low!
The dice show: 🎲 5
Will the next roll be high or low?
(Or highorlow cash to take your winnings)
high
Last roll was 5, you guessed HIGH...
New roll: 🎲 9
✓ Correct! Streak: 2 (potential win: 200 gold at x2.0)
Will the next roll be high or low?
Balance Notes
• House limit on dice: 1000 gold (prevents huge swings)
• House limit on high/low: 500 gold (multiplier can get high)
• Requires gold on hand (not in bank)
• Room message broadcasts wins/losses to other players
Files
• modules/gambling/gambling.go - Main module code
• modules/gambling/files/datafiles/templates/help/gamble.template - Help file