Mac vs. PC Combat Referee

A simple two-player battle system where dice are rolled and damage is inflicted. The basis of the conflict is the Mac vs. PC debate.

Author: neko@GlobalMUSH
Category: Combat
Features: color substitutions.
Compatibility: TinyMUX.

Instructions

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

MUSHCode for Mac vs. PC Combat Referee

@create Mac vs PC Combat Referee
@lock Mac vs PC Combat Referee==me
@Desc Mac vs PC Combat Referee=Do you hate Macintoshes? Does your best friend hate PC's? Now you can settle your differences once and for all in the Combat Arena! Look at the refferee if you want to play. Beware, tho; there are dire concequences for losing!%rTo start a battle with you as a mac lover, type %crmac vs <opponent>%cn%rTo start a battle with you as a pc lover, type %crpc vs <opponent>%cn%rAn epic battle will take place, with an equally epic ending/punishment for losing. You have been warned.%rHave a nice day!%rMgmt (:B
&MAC-PC-CMD Mac vs PC Combat Referee=$mac vs *:@switch first(num(%0))=#-1,{@pemit %#=I don't see that here.},{@emit %n challenges [name(num(%0))] the pc user to battle!;@tr me/battle-code=%n,[name(num(%0))]}
&PC-MAC-CMD Mac vs PC Combat Referee=$pc vs *:@switch first(num(%0))=#-1,{@pemit %#=I don't see that here.},{@emit %n challenges [name(num(%0))] the pc user to battle!;@tr me/battle-code=%n,[name(num(%0))]}
&BATTLE-CODE Mac vs PC Combat Referee=think [setq(0,100)][setq(1,100)][setq(2,0)];@emit Status: [ljust(%cr%0: %q0%%,20)][ljust(%cb%1: %q1%%,20)];@tr me/battle-loop=%0,%1
&BATTLE-LOOP Mac vs PC Combat Referee=think [setq(2,inc(%q2))][setq(3,die(4,12))][setq(4,die(4,12))][setq(0,sub(%q0,%q4))][setq(1,sub(%q1,%q3))];@emit %cr%0%cn attacks %cb%1%cn for %cg%q3%cn points of damage!%r%cb%1%cn attacks %cr%0%cn for %cg%q4%cn points of damage!%rStatus (round %q2): [ljust(%cr%0: [repeat(O,div(%q0,10))][switch(lt(%q0,0),0,mid(%b...ooo***,mod(%q0,10),1))],20)][ljust(%cb%1: [repeat(O,div(%q1,10))][switch(lt(%q1,0),0,mid(%b...ooo***,mod(%q1,10),1))],20)];@switch [or(lt(%q0,1),lt(%q1,1))]=0,{@wait 5=@tr me/battle-loop=%0,%1}
@set Mac vs PC Combat Referee=COMMANDS