Rules for Sabacc for SWG

The object of Sabacc is to have the highest card total which is less than or equal to 23. A total which is over 23, under negative 23, or exactly zero is a bomb out, and requires the holder of the hand to pay a penalty (see below).
There are two pots to be won in the game of sabacc. A pot is the total amount of credits staked by all the players in one hand of the card game. Each pot should be set apart from the other, to keep them separate and distinct. The first of the two pots is the hand pot, which is always taken by the player who wins the hand. The second is the sabacc pot, which continually builds, and can only be won with a special hand (see below). To start a game of Sabacc, choose one player to receive the dealer position for the first hand. In the rest of this document, “dealer” will refer to the player in the dealer position, and “non-player dealer” will refer to the provided physical dealer. Other players wishing to be dealt into a hand must first ante by placing 100 credits into the hand pot. Each player must also ante 1000 credits into the sabacc pot if it is ever empty. This includes the very first hand of the game, if a sabacc ante is not included in the fee to sit in on a game.

[Antes, bets, and penalties are all played by announcing your amount to all players and then /tip-ing the credits to the non-player dealer.]

Each player takes a turn in order, beginning with the player to the dealer's left. Each turn includes the phases listed below. Once a player has completed all the phases in their turn, it becomes the turn of the person on his or her left. After every hand, the player to the left of the dealer becomes the new dealer.

Turn Phases

Betting Phase: Each player is dealt two cards. The player to the left of the dealer begins play by with the option to bet. If he chooses to do so, the bet is placed in the hand pot. If a bet is placed, each player must match that bet if he or she is to remain in the hand.
Only the player whose turn it is may place a bet, but that bet may be matched or raised by any of the players on their turn. Before moving on to the next phase, any player may choose to fold (drop out of the hand). A player may only fold during the betting phase, and must pay 200 credits to the sabacc pot to do so (as a penalty). There is no set limit for bets and raises in standard Sabacc (but many games will have hand or pot limits announced before the game), and if no player before you has placed a bet, you make take the option of checking or betting zero credits.
[To make a bet, the current player must announce the amount of their bet to all players and /tip the announced credits to the non-player dealer, before the non-player dealer will move on the next phase. WARNING: Any bets made by /tip-ing out of turn will be considered tips to the non-player dealer]

Shifting Phase: After the betting phase is completed, if the current player placed the initial bet or raised the bet, the non-player dealer will roll a red-blue die. If the result is RED shifting occurs. In shifting, each player has one card, chosen randomly by the non-player dealer, discarded from his hand. All the cards which are discarded are put into the bottom of the deck, and the dealer gives each player a new card, in turn, which that player adds to his or her hand.
[In order to determine a random card to discard, the non-player dealer will keep track of the cards in a given players hand in RL and assign each card a number starting with 1 in each hand. The non-player dealer will roll a configurable dice with sides equal to the number of the cards the player has, and the number rolled will determine the card that will be discarded. The non-player dealer will tell the player privately which card is to be discarded, and then the player will trade that card to the non-player dealer. In the same trade, the non-player dealer will give the player their newly dealt card.]

Note: If a player folds on his or her own turn, the folding player is excluded from the rest of the phases. Drawing Phase: After the shifting phase, the player whose turn it is has the option to draw one card from the deck. If the player holds more than two cards, he or she may exchange one of the cards in his or her hand for a card drawn from the deck, or simply draw another card from the deck and add it to his or her hand (but not both).
[If the player is drawing a card from the deck, they must open a trade window with the non-player dealer with the card they wish to discard in the trade box, or an empty trade box if they are not discarding any cards. The non-player dealer will place the drawn card in their trade box. If the player simply wishes to discard the newly drawn card, they should cancel the trade with the non-player dealer.]
There is no limit to the number of cards that a player may hold in his or her hand, but he or she must always have at least two cards. Cards which are dropped from a player's hand during this phase are removed from play.

Winning a Hand

Since these rules do NOT include a neutralizing field to lock cards if they are placed face up, a hand is called when two conditions are met. Condition 1 requires that all the players except those who have already folded have played 1 turn/round or more. Condition 2 requires that play has returned to the player that originally made the largest bet in the current round of betting (standard poker betting).
Note: As in many card games, if all players except one fold on their turn, the remaining player wins the hand.
When a hand is called, the player with the highest absolute value of their card total, which is 23 or less wins the hand. The absolute value of a number is the positive value of that number. For a positive number, it is just the number. For a negative number it is its positive value. So, the absolute value of 5 is 5, and the absolute value of -5 is 5. The winning player wins the hand pot only.
If two or more players are tied, they must participate in a sudden demise. In a sudden demise, the non-player dealer deals each participating player one card from the top of the deck, which the players must add to their hands. The best modified hand takes the pot. If there is still a tie, the pot is split. If all hands bomb out during the sudden demise, the player who is closest to 23 wins the hand.
If any player has a total which is over 23, less than negative 23, or exactly zero when the hand is called, he or she has bombed out. In this circumstance, the bombed-out player must match the exact amount of credits which are currently in the hand pot, and pay it to the sabacc pot.
[At the end of a hand, each player remaining in the hand will give their cards back to the non-player dealer via trade. Once the non-player dealer has received all the hands from the players they will announce all the hands and the winner (Players are welcome to announce their hands or give out any information at the end of a hand, but the non-player dealer’s announcement serves as the official determination). Once the winner is announced the non-player dealer will tip the credits from any pot won to the winning player.]

Special Hands

To win the sabacc pot, a player must have one of two special hands. The first is when a player has a card value total of exactly 23 or exactly negative 23. This is called a Pure Sabacc, and is usually accompanied by an enthusiastic cry of "Sabacc!" when the cards are turned over.
The other sabacc pot winning hand is called an Idiot's Array. To achieve this, a player must have an Idiot face card, a two card of any suit, and a three card of any suit (a literal 023). An Idiot's Array beats a Pure Sabacc, but if two or more players have the same special hand in contention for the sabacc pot, a sudden demise is held as usual.

Rank of Cards:

Four Suits (Coins, Flasks, Sabers, and Staves) numbered 1-11
Four Ranked cards for each suit:
Commander: Value of 12
Mistress: Value: 13
Master: Value: 14
Ace: Value: 15
Face Cards:
Queen of Air and Darkness: Value of -2
Endurance: Value of -8
Balance: Value of -11
Demise: Value of -13
Moderation: Value of -14
The Evil One: Value of -15
The Star: Value of -17
The Idiot: Value of 0

[For our purposes, cards will be constructed of small single items crafted by the same artisan with unique serial numbers and will be named with the following information, suit and rank OR name of card, and the value in parenthesis {Examples: “3 of Swords (3)”, “Master of Coins (14)”, “Moderation (-14)”}. Preferably, suits should be easily distinguishable from named cards, and from each other suit based on the item’s artwork. The non-player dealer should also have available a sabacc deck in the physical world to avoid needing game mechanics for shuffling and dealing from a deck and to assist in keeping track of the players’ hands to avoid cheating. Thus the non-player dealer can use the physical sabacc deck to determine the cards given to players per the game rules, and simply pick the correct item from their inventory to trade with the appropriate player. The dealer will also need to keep track of the amounts in both the hand pot and the sabacc pot (a calculator and pad of paper available in the physical world may assist in this task).]