Here's the basic layout of the BlackJack game, this is simply a BASIC layout. Once I get this working, I'll make the TF tutorial. But for now...:
Blackjack!
Instructions: The basics of Blackjack are to beat the dealer without going over 21. You are dealt two cards and afterwards may draw as many cards as you wish. But, if you break 21 the dealer automatically wins. The card values are as follows: 2 through 10 equals their respective values. J, Q, and K equal 10. A equals 1 or 11 depending on your hand. If your hand is greater then 11 then an A equals 1. You can bet 5, 10, or 25 SP per game and if you win you will receive double the amount you bet. In the event of a tie, nobody wins and you are refunded your bet amount.
Game:
Welcome to the Blackjack table. Play a round with me sir?
Require Instructions? (if yes show instructions, above)
How many Silver Points would you like to bet? (5,10,25) {check amount vs current SP}
if bet_amount > cur_SP then "Dealer: What are you trying to pull? You don't have enough SP" else:
(set d_check to false)
(bet_amount= bet)
game_start:
Dealer: I will first deal you two cards.
Dealer: Your first card.
You have a(n) (give card value)
Dealer: Your second card.
You have a(n) (give card value)
Dealer: I will draw my cards.
Your total is: (give total value)
Dealer: Draw or Stay? {if Draw then goto Draw, else goto Stay}
Draw:
Dealer: Here is your card.
You have a(n) (give card value)
if d_check=false then {goto dealer_check}
Your total is: (give total value) {if total > 21 then goto break}
Dealer: Draw or Stay? {if Draw then goto Draw, else goto Stay}
Stay:
if d_check=false then {goto dealer_check}
Dealer: Please show me your hand. {goto game_check}
dealer_check:
{if dealertotal =< 16 then "Dealer: I will draw another card."}
{if dealertotal => 17 then "Dealer: I will play with this hand."} & set d_check=true (so he only says this # of times needed)
{goto dealer_check} loop thru this again until dealer has a good hand
break:
{if total > 21 then "You have (total), you broke 21. Dealer wins this round."} goto end_game
goto end_game
game_check:
if dealertotal > 21 then: "Dealer: I have (dealertotal), which means I broke 21. You win this round." goto win_game
if dealertotal = total then: "Dealer: I have (dealertotal), you have (total). We both tie." goto tie_game
if dealertotal > total then: "Dealer: I have (dealertotal), you have (total). I win this round." goto lost_game
if total > dealertotal then: "Dealer: You have (total), I have (dealertotal). You win this round." goto win_game
tie_game:
"You got back your (bet_amount) Silver Points."
goto end_game
win_game:
"You win (bet_amount * 2) Silver Points!"
goto end_game
lost_game:
"You lost (bet_amount) Silver Points!"
goto end_game
end_game:
reset all card, totals, and d_check values
Do you want to continue? (if no, exit script)
{check bet_amount vs SP}
goto game_start
There you have it. Also, I am using a Grey Cat for the Dealer Sprite
. Once I get this figured out, I am going to attempt to make Poker(Texas Holdem style)! The suits would be: hearts(heart), swords(spade), scythes(clubs), rings(diamonds). However, this requires keeping track of an and randomizing an entire deck and having the user selectable option of going against the Dealer and up to two NPCs (more ppl, the bigger the SP pot); which means that each player would have to be able have 2 cards with suits and some card checking scripts to see if its worth folding, raising, or bluffing. Also, I would need some way to make a mini text window that displays your cards and that on the table(otherwise the textbox would be full of decisions, and it would be hard to see what cards you have and especially those on the table. I seriously doubt this is possible(not the card checking but a deck with suits and numbers attached). If anyone can help me on this drop me a email or post here in this forum.