Shuffling up the deck...\n<<silently>>\n<<set $P1Life = 20>>\n<<set $P1Loot = 0>>\n<<set $P1AceCount = 0>>\n<<set $P1C1 = 0>>\n<<set $P1C2 = 0>>\n<<set $P1C3 = 0>>\n<<set $P1C4 = 0>>\n<<set $P1C5 = 0>>\n<<set $P1Val = 0>>\n<<set $E1HitOn = 16>>\n<<set $BustOver = 21>>\n<<set $MinAnte = 0>>\n<<set $E1AceCount = 0>>\n<<set $E1C1 = 0>>\n<<set $E1C2 = 0>>\n<<set $E1C3 = 0>>\n<<set $E1C4 = 0>>\n<<set $E1C5 = 0>>\n<<set $E1Val = 0>>\n<<endsilently>>\n\n[[Continue|InitialDeal]]
<<silently>>\n<<set $TempCard to either("AH","2H","3H","4H","5H","6H","7H","8H","9H","10H","JH","QH","KH","AS","2S","3S","4S","5S","6S","7S","8S","9S","10S","JS","QS","KS","AC","2C","3C","4C","5C","6C","7C","8C","9C","10C","JC","QC","KC","AD","2D","3D","4D","5D","6D","7D","8D","9D","10D","JD","QD","KD")>>\n<<endsilently>>
Dealer shows: <<$E1C1>>\nDealer's at: <<$E1Val>>\n\n<<silently>>\n\n<<if $P1C3 is 0>> P1 Getting 3rd Card\n\n<<CreateCard>>\n<<set $P1C3 to $TempCard>>\n<<ValCalc>>\n<<$P1Val += $TVal>>\n<<$P1AceCount += $TAceCount>>\n\n<<set $TVal to $P1Val>>\n<<set $TAceCount to $P1AceCount>>\n<<CheckBust>>\n<<set $P1Bust to $TBust>>\n<<set $P1Val to $TVal>>\n<<set $P1AceCount to $TAceCount>>\n\n<<else if $P1C4 is 0>> P1 Getting 4th Card\n\n<<CreateCard>>\n<<set $P1C4 to $TempCard>>\n<<ValCalc>>\n<<$P1Val += $TVal>>\n<<$P1AceCount += $TAceCount>>\n\n<<set $TVal to $P1Val>>\n<<set $TAceCount to $P1AceCount>>\n<<CheckBust>>\n<<set $P1Bust to $TBust>>\n<<set $P1Val to $TVal>>\n<<set $P1AceCount to $TAceCount>>\n\n<<else if $P1C5 is 0>> P1 Getting 5th Card\n\n<<CreateCard>>\n<<set $P1C5 to $TempCard>>\n<<ValCalc>>\n<<$P1Val += $TVal>>\n<<$P1AceCount += $TAceCount>>\n\n<<set $TVal to $P1Val>>\n<<set $TAceCount to $P1AceCount>>\n<<CheckBust>>\n<<set $P1Bust to $TBust>>\n<<set $P1Val to $TVal>>\n<<set $P1AceCount to $TAceCount>>\n\n<<else>>\n<<set $TVal to $P1Val>>\n<<set $TAceCount to $P1AceCount>>\n<<CheckBust>>\n<<set $P1Bust to $TBust>>\n<<set $P1Val to $TVal>>\n<<set $P1AceCount to $TAceCount>>\n\n<<endif>>\n\n<<endsilently>>\nYou show: <<$P1C1>>, <<$P1C2>>, <<$P1C3>><<if $P1C4 neq 0>>, <<$P1C4>><<endif>><<if $P1C5 neq 0>>, <<$P1C5>><<endif>>\nYou are at: <<$P1Val>>\n\n<<if $P1Bust neq "yes">>\n[[Hit|P1Hit]]\n[[Stay|DealerTurn]]\n<<else>>\nYou busted!\n[[Continue|DealerTurn]]\n<<endif>>
<<silently>>\n<<if $TVal > $BustOver and $TAceCount is 0>>\n<<set $TBust to "yes">>\n<<else if $TAceCount neq 0 and $TVal > $BustOver>>\n<<$TVal -= 10>>\n<<$TAceCount -= 1>>\n<<CheckBust>>\n<<else>>\n<<set $TBust to "no">><<endif>>\n<<endsilently>>
<<silently>>\n<<set $TAceCount = 0>>\n<<$TVal = 0>>\n<<if $TempCard is "2H" or $TempCard is "2S" or $TempCard is "2C" or $TempCard is "2D">>\n<<$TVal += 2>>\n<<else if $TempCard is "3H" or $TempCard is "3S" or $TempCard is "3C" or $TempCard is "3D">>\n<<$TVal += 3>>\n<<else if $TempCard is "4H" or $TempCard is "4S" or $TempCard is "4C" or $TempCard is "4D">>\n<<$TVal += 4>>\n<<else if $TempCard is "5H" or $TempCard is "5S" or $TempCard is "5C" or $TempCard is "5D">>\n<<$TVal += 5>>\n<<else if $TempCard is "6H" or $TempCard is "6S" or $TempCard is "6C" or $TempCard is "6D">>\n<<$TVal += 6>>\n<<else if $TempCard is "7H" or $TempCard is "7S" or $TempCard is "7C" or $TempCard is "7D">>\n<<$TVal += 7>>\n<<else if $TempCard is "8H" or $TempCard is "8S" or $TempCard is "8C" or $TempCard is "8D">>\n<<$TVal += 8>>\n<<else if $TempCard is "9H" or $TempCard is "9S" or $TempCard is "9C" or $TempCard is "9D">>\n<<$TVal += 9>>\n<<else if $TempCard is "10H" or $TempCard is "10S" or $TempCard is "10C" or $TempCard is "10D" or $TempCard is "JH" or $TempCard is "JS" or $TempCard is "JC" or $TempCard is "JD" or $TempCard is "QH" or $TempCard is "QS" or $TempCard is "QC" or $TempCard is "QD" or $TempCard is "KH" or $TempCard is "KS" or $TempCard is "KC" or $TempCard is "KD">>\n<<$TVal += 10>>\n<<else if ($TempCard is "AH" or $TempCard is "AS" or $TempCard is "AC" or $TempCard is "AD") and ($TVal + 11) > $BustOver>>\n<<$TVal += 1>>\n<<else if $TempCard is "AH" or $TempCard is "AS" or $TempCard is "AC" or $TempCard is "AD">>\n<<$TVal += 11>><<$TAceCount += 1>>\n<<else>>\n<<endif>>\n<<endsilently>>
<<silently>>\n<<CreateCard>> Dealer gets his card\n<<set $E1C1 = $TempCard>>\n<<ValCalc>>\n<<set $E1Val += $TVal>>\n<<set $E1AceCount += $TAceCount>>\n<<set $TAceCount = 0>>\n\n<<CreateCard>> P1 Gets first card\n<<set $P1C1 = $TempCard>>\n<<ValCalc>>\n<<set $P1Val += $TVal>>\n<<set $P1AceCount += $TAceCount>>\n\n<<CreateCard>> P1 Gets second card\n<<set $P1C2 = $TempCard>>\n<<ValCalc>>\n<<set $P1Val += $TVal>>\n<<set $P1AceCount += $TAceCount>>\n\n<<set $TVal to $P1Val>> Aces housekeeping\n<<set $TAceCount to $P1AceCount>>\n<<CheckBust>>\n<<set $P1Bust to $TBust>>\n<<set $P1Val to $TVal>>\n<<set $P1AceCount to $TAceCount>>\n\n\n<<endsilently>>\nDealer shows: <<$E1C1>>\nDealer's at: <<$E1Val>>\n\nYou have: <<$P1C1>>, <<$P1C2>>\nYou are at <<$P1Val>>\n\n[[Hit|P1Hit]]\n[[Stay|DealerTurn]]
<<silently>>\n<<if $E1Val <= $E1HitOn>>\n<<if $E1C2 is 0>>\n\n<<CreateCard>>\n<<set $E1C2 to $TempCard>>\n<<ValCalc>>\n<<$E1Val += $TVal>>\n\n<<set $TVal to $E1Val>>\n<<set $TAceCount to $E1AceCount>>\n<<CheckBust>>\n<<set $E1Bust to $TBust>>\n<<set $E1Val to $TVal>><<set $E1AceCount to $TAceCount>>\n\n<<else if $E1C3 is 0>>\n\n<<CreateCard>>\n<<set $E1C3 to $TempCard>>\n<<ValCalc>>\n<<$E1Val += $TVal>>\n\n<<set $TVal to $E1Val>>\n<<set $TAceCount to $E1AceCount>>\n<<CheckBust>>\n<<set $E1Bust to $TBust>>\n<<set $E1Val to $TVal>><<set $E1AceCount to $TAceCount>>\n\n<<else if $E1C4 is 0>>\n\n<<CreateCard>>\n<<set $E1C4 to $TempCard>>\n<<ValCalc>>\n<<$E1Val += $TVal>>\n\n<<set $TVal to $E1Val>>\n<<set $TAceCount to $E1AceCount>>\n<<CheckBust>>\n<<set $E1Bust to $TBust>>\n<<set $E1Val to $TVal>><<set $E1AceCount to $TAceCount>>\n\n<<else if $E1C5 is 0>>\n\n<<CreateCard>>\n<<set $E1C5 to $TempCard>>\n<<ValCalc>>\n<<$E1Val += $TVal>>\n\n<<set $TVal to $E1Val>>\n<<set $TAceCount to $E1AceCount>>\n<<CheckBust>>\n<<set $E1Bust to $TBust>>\n<<set $E1Val to $TVal>><<set $E1AceCount to $TAceCount>>\n\n<<else>>\n\n<<endif>><<endif>>\n<<endsilently>>\nDealer plays and shows: <<$E1C1>>, <<$E1C2>><<if $E1C3 neq 0>>, <<$E1C3>><<endif>><<if $E1C4 neq 0>>, <<$E1C4>><<endif>><<if $E1C5 neq 0>>, <<$E1C5>><<endif>>\nDealer's at: <<$E1Val>><<silently>>\n\n\n\n\n<<endsilently>>\n\nYou show: <<$P1C1>>, <<$P1C2>><<if $P1C3 neq 0>>, <<$P1C3>><<endif>><<if $P1C4 neq 0>>, <<$P1C4>><<endif>><<if $P1C5 neq 0>>, <<$P1C5>><<endif>>\nYou are at: <<$P1Val>>\n\n<<if $E1Bust neq "yes" and $E1Val <= $E1HitOn>>\n[[Continue|DealerTurn]]\n<<endif>>\n<<if $E1Bust is "yes">>\nDealer busted!\n[[Continue|WhoWins]]\n<<else if $E1Val > $E1HitOn>>\nDealer stays.\n[[Continue|WhoWins]]<<endif>>
Welcome to my simple version of BlackJack!\n\n[[Continue|Shuffle]]
<<if ($P1Val > $E1Val and $P1Bust neq "yes") or ($P1C5 neq 0 and $P1Bust neq "yes") or ($P1Bust neq "yes" and $E1Bust is "yes")>>\nPlayer 1 defeated the dealer!\n\n[[Continue|Shuffle]]\n<<else if $P1Val is $E1Val>>\nPush!\n\n[[Continue|Shuffle]]\n<<else>>\nThe Dealer won!\n\n[[Continue|Shuffle]]\n<<endif>>\n
Krymsonkyng
Blackjack