View/Edit #6161:d*ouble

Switch to edit mode.

Name(s): d*ouble
1:  if (!(gs = this:gs(player)))
2:    return player:Tell("But you're not palying!")
3:  elseif (length(gs[5]) > 2)
4:    return player:tell("You can only double when you have two cards.")
5:  elseif ((bet = gs[8]) > this:money(player))
6:    return player:Tell("Sorry, you do not have enough money to double.")
7:  elseif (gs[7])
8:    return player:tell("You've already stood.")
9:  else
10:   this.games[gs in this.games][7] = 1
11:   bet = this:gs(player)[8] * 2.0
12:   this:decrease_money(player, this:gs(player)[8])
13:   this:mod(player, 10, 1)
14:   this.dealer_income = this.dealer_income + bet
15:   player:Tell("You double down. (Bet is now ", this:m_string(bet), ")")
16:   this.games[this:gs(player) in this.games][8] = bet
17:   card = this:give_carD(player, 0)
18:   total = this:tv((gs = this:gs(player))[5])
19:   player:tell("You are dealt a ", this.cards[card], " for a total of ", total, ".")
20:   if (this:check_bust(player))
21:     return
22:   endif
23:   this:do_stand()
24: endif
25: "Last modified by James (#6397) on Thu Mar 15 01:06:17 2007 EDT."

Verb arguments: none none none
Verb perms: Readable NOT-Debug
Verb owned by: James (#6397)

You are not logged in.

[home | help | who | search | setup | code]