133215Sbostic /*
2*60815Sbostic * Copyright (c) 1980, 1993
3*60815Sbostic * The Regents of the University of California. All rights reserved.
433215Sbostic *
542583Sbostic * %sccs.include.redist.c%
633215Sbostic */
733215Sbostic
833215Sbostic #ifndef lint
9*60815Sbostic static char sccsid[] = "@(#)spec.c 8.1 (Berkeley) 05/31/93";
1033215Sbostic #endif /* not lint */
1133215Sbostic
1233215Sbostic # include "monop.ext"
1333215Sbostic
1433215Sbostic static char *perc[] = {
1533215Sbostic "10%", "ten percent", "%", "$200", "200", 0
1633215Sbostic };
1733215Sbostic
inc_tax()1833215Sbostic inc_tax() { /* collect income tax */
1933215Sbostic
2033215Sbostic reg int worth, com_num;
2133215Sbostic
2233215Sbostic com_num = getinp("Do you wish to lose 10%% of your total worth or $200? ", perc);
2333215Sbostic worth = cur_p->money + prop_worth(cur_p);
2433215Sbostic printf("You were worth $%d", worth);
2533215Sbostic worth /= 10;
2633215Sbostic if (com_num > 2) {
2733215Sbostic if (worth < 200)
2833215Sbostic printf(". Good try, but not quite.\n");
2933215Sbostic else if (worth > 200)
3033215Sbostic lucky(".\nGood guess. ");
3133215Sbostic cur_p->money -= 200;
3233215Sbostic }
3333215Sbostic else {
3433215Sbostic printf(", so you pay $%d", worth);
3533215Sbostic if (worth > 200)
3633215Sbostic printf(" OUCH!!!!.\n");
3733215Sbostic else if (worth < 200)
3833215Sbostic lucky("\nGood guess. ");
3933215Sbostic cur_p->money -= worth;
4033215Sbostic }
4133215Sbostic if (worth == 200)
4233215Sbostic lucky("\nIt makes no difference! ");
4333215Sbostic }
goto_jail()4433215Sbostic goto_jail() { /* move player to jail */
4533215Sbostic
4633215Sbostic cur_p->loc = JAIL;
4733215Sbostic }
lux_tax()4833215Sbostic lux_tax() { /* landing on luxury tax */
4933215Sbostic
5033215Sbostic printf("You lose $75\n");
5133215Sbostic cur_p->money -= 75;
5233215Sbostic }
cc()5333215Sbostic cc() { /* draw community chest card */
5433215Sbostic
5533215Sbostic get_card(&CC_D);
5633215Sbostic }
chance()5733215Sbostic chance() { /* draw chance card */
5833215Sbostic
5933215Sbostic get_card(&CH_D);
6033215Sbostic }
61