Theros' Pool Table

A multiple player pool table, with the ability to set a skill level for each player.

Author: Theros@Zone
Category: Games

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Theros' Pool Table

@create Pool Table
@lock Pool Table==me
@Desc Pool Table=%r%tA regulation sized table carved of the finest oak, the wood polished to a deep, rich shine. Brass accents and pearl inlay add an aura of refinement to this table. The deep green felt is lush and unmarred, and the balls are made of the finest ivory, the colors on them bright and arresting. A glass cabinet on the wall holds a few cues, finely carved as well. It is apparent that the owner of this table intensely enjoys the game, and takes it very seriously as well.%r
@Adesc Pool Table=@pemit %#=%r'pool help' for commands%r
&HELP Pool Table=$pool help:@pemit %#=%rCommands are as follows:%r%rbreak - start a new game%r%rshoot <number> - try to pocket <number>%r%rpool stats - stats on curent game%r%rTo set your GAME PLAYING and your INTELLIGENCE:%r%b%btype 'game <number>' and 'intelligence <number>'%r%b%b\\[where <number> is a value between 1 <lowest> and 5 <highest>\\]%r%rBE FAIR! Not everyone is a 'shark.'%r
&CREDITS Pool Table=Theros@Zone
&GAME Pool Table=$game *:&GAME-%# me=%0;@emit %N sets %p GAME_PLAYING skill to %0.
&SHOOT Pool Table=$shoot *:@switch [not([not([match([lattr(me/BALL-*)],BALL-%0)])])][gte([v(BALL-%0)],[sub([rand( 100)],[add([rand([mul([v(GAME-%#)],10)])],[rand([mul([v(INT-%#)],10)])])])])]= 0?,{@pemit %#=That ball is not on the table.},10,{@emit %N steps up to the table and takes careful aim...;@wait 5=@emit %N's shot is off target.},11,{&BALL-%0 me=;@emit %N steps up to the table and takes careful aim...;@wait 5=@emit %N expertly sinks the %0 ball.},1?,{@dolist [sort([lattr(me/BALL-*)])]=&## me=[switch([gt([v(##)],10)][lt([v(##)],90)][rand(2)],110,{[add([v(##)],[rand(1 0)])]},111,{[sub([v(##)],[rand(10)])]},{[v(##)]})]}
&BREAK Pool Table=$break:@wipe me/ball-*;&BALL-1 me=[add([rand(100)],1)];&BALL-2 me=[add([rand(100)],1)];&BALL-3 me=[add([rand(100)],1)];&BALL-4 me=[add([rand(100)],1)];&BALL-5 me=[add([rand(100)],1)];&BALL-6 me=[add([rand(100)],1)];&BALL-7 me=[add([rand(100)],1)];&BALL-8 me=[add([rand(100)],1)];&BALL-9 me=[add([rand(100)],1)];&BALL-10 me=[add([rand(100)],1)];&BALL-11 me=[add([rand(100)],1)];&BALL-12 me=[add([rand(100)],1)];&BALL-13 me=[add([rand(100)],1)];&BALL-14 me=[add([rand(100)],1)];&BALL-15 me=[add([rand(100)],1)];@emit %N breaks.
&INT Pool Table=$intelligence *:&INT-%# me=%0;@emit %N sets %p INTELLIGENCE to %0.
&STATS Pool Table=$pool stats:@pemit %#=%rCurrent Game <balls 1-7 solid, balls 9-15 striped>%r--------------------------------------------------%r[iter([lattr(me/BALL-*)],{%r[extract(##,2,1,-)]. [v(##)]%% Chance of Sinking})]%r%r<Above chances are before adjustment for skill of player.>%r%rYour GAME_PLAYING skill is currently set to [v(GAME-%#)].%rYour INTELLIGENCE is set to [v(INT-%#)].%r
@set Pool Table=!NO_COMMAND
@set Pool Table=COMMANDS