Switch to edit mode.
Name(s): SP*lit1: if (!(gs = this:gs(player)))
2: return player:tell("Yo, you ain't playin!")
3: elseif (length(gs[5]) > 2)
4: return player:tell("Yo, you ain't gots two cards man!")
5: elseif (listassoc(this.splitters, player))
6: return player:Tell("Yo bud, you canna split a split hand. Says me.")
7: elseif (gs[5][1] % 13 != gs[5][2] % 13)
8: return player:Tell("The 16th commandment: Thou shalt only split upon a pair of identical cards.")
9: "elseif ((bet = gs[8]) > $md:money(player))"
10: return player:Tell("Foolish gambler! You've wasted all your money and can't afford to split!")
11: endif
12: "Da loser can split. Damn him, eh? And here I am sitting at $0, and he's splitting. Bahhhh!"
13: bet = gs[8]
14: this.splitters = {@this.splitters, {player, gs[5][2]}}
15: player:tell("You split your hand into two, each card with a ", this:m_string(bet), " bet.")
16: this.games[$list_utils:iassoc(player, this.games)][5] = {gs[5][1], this:give_card(player, 0)}
17: this:decrease_money(player, bet)
18: this:showg(1)
19: "Last modified by James (#6397) on Tue Mar 13 00:56:29 2007 EDT."