Switch to edit mode.
Name(s): do_stand1: caller != this && raise(E_PERM)
2: if (!(gs = this:gs(player)))
3: return player:tell("But you're not playing!")
4: endif
5: this.games[this:gs(player) in this.games][7] = 1
6: bet = gs[8]
7: total = this:tv(gs[5])
8: player:tell("You stand on ", total, ".")
9: this:suspend(1)
10: dtotal = this:tv(gs[4])
11: this:showg()
12: this:suspend(1)
13: while (dtotal < 17)
14: this:suspend(1)
15: dcard = this:give_carD(player, 1)
16: dtotal = this:tv(this:gs(player)[4])
17: player:tell("The dealer draws a ", this.cards[dcard], " (Total: ", dtotal, ")")
18: if (dtotal == 21)
19: this:mod(player, 15, 1)
20: elseif (dtotal > 21)
21: return this:check_bust(player)
22: " $md:even(player);"
23: endif
24: endwhile
25: player:tell("The dealer stands.")
26: this:suspend(1)
27: this:check_winner()
28: "$md:even(player);"
29: "Last modified by James (#6397) on Thu Mar 15 01:00:52 2007 EDT."