Compucolor.org – Virtual Media

Listing of file='COALIT.BAS;01' on disk='vmedia/lunar_lander-sector.ccvf'

100 REM          COALITION - MAR 24,1980 
110 REM           WRITTEN BY DON MILLER
120 REM  COPYRIGHT (C) 1980 BY COMPUCOLOR CORPORATION 
130 CLEAR 500:PLOT 6,35,12,27,24,3,22,12,14
140 PRINT "*** COALITION ***":PLOT 15,3,64,0
150 FOR I= 0TO 2000:NEXT I
160 PLOT 6,2,12:DY= 1500:UU= 9:UV= 96:UW= 14
170 DIM P(11,5),V(11),M(2),T(2),C(11),F(2)
180 GOSUB 2020:GOTO 230
190 FOR II= 0TO DY:NEXT II:FOR II= 58TO 5STEP - 1:PLOT 3,127,II,UU,CO,UV:NEXT II:PLOT 6,UW:RETURN
200 DY= 100:GOSUB 190:DY= 1000:RETURN
210 PLOT 6,UW:IF P(11,5)= 2THEN UU= 22:PLOT 3,12,UU:RETURN
220 UU= 9:PLOT 3,12,UU:RETURN
230 PLOT 6,2
240 X= 1
250 FOR I= 1TO 11:V(I)= INT (60* RND (1)+ 40):P(I,2)= V(I):NEXT
260 M(1)= 5:M(2)= 5:N= 0
270 F(1)= 1:F(2)= 2:P2= .2:R2= .3
280 T(1)= V(1)+ V(3)+ V(5)+ V(7)+ V(9):T(2)= V(2)+ V(4)+ V(6)+ V(8)+ V(10)
290 IF ABS (T(1)- T(2))= ABS (V(11))THEN 250
300 IF T(1)+ T(2)> 900THEN 250
310 C(1)= 1:C(3)= 1:C(5)= 1:C(7)= 1:C(9)= 1:C(2)= 2:C(4)= 2:C(6)= 2:C(8)= 2:C(10)= 2
320 C(11)= 0
330 GOSUB 210:PRINT "        YOU ARE WORTH"V(11)" CREDITS        "
340 GOSUB 190
350 NX= 10:GOSUB 1680
360 REM
370 GOSUB 210:PLOT 6,1:INPUT "WHICH COALITION (1 OR 2) FOR YOU? ";Y
380 GOSUB 200
390 IF Y= 1THEN O= 2:GOTO 420
400 IF Y< > 2THEN 370
410 O= 1
420 GOSUB 210:PLOT 6,1:INPUT "AS THE CHAIRMAN (C), OR AS A MEMBER (M)? ";A$
430 GOSUB 200
440 IF LEFT$ (A$,1)= "C"THEN P(F(Y),4)= 0:P(11,4)= 1:F(Y)= 11:GOTO 460
450 IF LEFT$ (A$,1)< > "M"THEN GOSUB 190:GOTO 420
460 IF T(O)= T(Y)+ V(11)THEN V(11)= INT (60* RND (1)+ 40):P(I,2)= V(11):GOTO 460
470 T(Y)= T(Y)+ V(11):M(Y)= M(Y)+ 1
480 P(11,5)= Y:C(11)= Y
490 FOR I= 1TO 11:GOSUB 2970:NEXT
500 GOSUB 1670
510 REM
520 X= X+ 1
530 IF (X- 1)/ 20< > INT ((X- 1)/ 20)THEN 580
540 GOSUB 210:PRINT "YOU HAVE SURVIVED"X- 1" CONFRONTATIONS ":GOSUB 190
550 GOSUB 210:PLOT 6,70:PRINT "          YOU MAY NOW RETIRE            ":GOSUB 190
560 GOSUB 210:PLOT 6,1:INPUT "  OR DO YOU WANT TO CONTINUE (Y/N)? ";A$
570 IF LEFT$ (A$,1)< > "Y"THEN GOSUB 190:GOTO 1610
580 PLOT 6,6,3,28,17:PRINT RIGHT$ ((STR$ (X)),2)
590 IF T(Y)> T(O)THEN 630
600 GOSUB 210:PRINT " WHOOPS !! OTHER SIDE CONTROLS WEALTH ! ":GOSUB 190
610 R= R2:W= O:GOSUB 1880:IF J= 0THEN 1600
620 L= Y:P= P2:GOTO 740
630 GOSUB 210:PRINT " RIGHT !!! YOUR SIDE CONTROLS WEALTH  ! ":GOSUB 190
640 W= Y:L= O:GOSUB 1880:IF J= 0THEN 1600
650 IF F(Y)< > 11THEN R= R2:P= P2:GOTO 740
660 GOSUB 210:PLOT 6,1:INPUT "WHAT PAYMENT (10-40 %) FROM LOSERS? ";R
670 GOSUB 200
680 IF R< 10OR R> 40THEN 660
690 GOSUB 210:PLOT 6,1:INPUT "CHAIRMAN, WHAT BONUS FOR YOU (10-80 %)? ";P
700 GOSUB 200
710 IF P< 10OR P> 80THEN 690
720 R= R/ 100:P= P/ 100
730 REM
740 R1= INT (R* T(L)):B= INT (P* R1)
750 IF W= 2THEN 800
760 PLOT 6,3,3,47,13:PRINT "   ":PLOT 3,47,13:PRINT RIGHT$ ((STR$ (R1)),3)
770 PLOT 3,39,13:PRINT "   ":PLOT 3,39,13:PRINT RIGHT$ ((STR$ (B)),3)
780 PLOT 3,47,18:PRINT "   ":PLOT 3,39,18:PRINT "   "
790 GOTO 830
800 PLOT 6,3,3,47,18:PRINT "   ":PLOT 3,47,18:PRINT RIGHT$ ((STR$ (R1)),3)
810 PLOT 3,39,18:PRINT "   ":PLOT 3,39,18:PRINT RIGHT$ ((STR$ (B)),3)
820 PLOT 3,47,13:PRINT "   ":PLOT 3,39,13:PRINT "   "
830 IF M(W)= 1THEN B2= R1:B= 0:GOTO 880
840 B1= INT ((R1- B)/ M(W))
850 B3= B1:B2= INT (B/ (M(W)- 1))
860 FOR I= 1TO 11:IF C(I)= WTHEN V(I)= V(I)+ B3:P(I,2)= V(I)
870 NEXT I
880 I= F(W):V(I)= V(I)+ B:P(I,2)= V(I)
890 REM
900 IF M(L)= 1THEN I= F(L):V(I)= V(I)- R1:P(I,2)= V(I):GOTO 1190
910 B1= R1/ M(L):B1= INT (B1+ .5)
920 FOR I= 1TO 11:IF C(I)< > LTHEN 940
930 V(I)= V(I)- B1:P(I,2)= V(I)
940 NEXT I:V1= 0
950 FOR I= 1TO 11:IF C(I)< > LTHEN 1170
960 IF V(I)> 0THEN 1170
970 IF I= 11THEN 990
980 GOTO 1010
990 GOSUB 210:PLOT 6,70:PRINT "YOU HAVE LOST ALL WEALTH - LEAVE COUNCIL":GOSUB 190
1000 P(I,3)= 1:GOSUB 3030:GOTO 1600
1010 M(L)= M(L)- 1:C(I)= 0
1020 GOSUB 210:PRINT I" WILL LOSE ALL WEALTH - LEAVE COUNCIL":GOSUB 190
1030 P(I,3)= 1:GOSUB 3030
1040 C(I)= 0:P(I,5)= 0
1050 P(I,4)= 0
1060 IF V(I)= 0THEN 1170
1070 IF M(L)= 0THEN 1570
1080 V1= V1- V(I)
1090 P(I,2)= 0:V(I)= 0
1100 GOTO 1170
1110 IF V1< = 0THEN 1190
1120 FOR J= 1TO 11:IF C(J)< > LTHEN 1150
1130 V(J)= V(J)- INT ((V1/ M(L))+ .5)
1140 P(J,2)= V(J)
1150 NEXT J
1160 GOSUB 1670:V1= 0:GOTO 950
1170 NEXT I
1180 GOTO 1110
1190 GOSUB 1670
1200 IF M(1)> 0AND M(2)> 0THEN 1220
1210 GOTO 1580
1220 REM
1230 K= 0
1240 IF W= YTHEN 1390
1250 REM
1260 GOSUB 210:PLOT 6,1:INPUT "ENTER OPPOSITION # YOU WANT: ";J
1270 GOSUB 200
1280 IF J< 1OR J> 11THEN 1260
1290 IF C(J)= 0THEN GOSUB 210:PRINT "OUT OF COUNCIL - CHOOSE AGAIN":GOSUB 190:GOTO 1260
1300 IF C(J)= YTHEN GOSUB 210:PRINT "ALREADY IN COALITION-CHOOSE AGAIN":GOSUB 190:GOTO 1260
1310 GOSUB 210:PLOT 6,1:INPUT "WILL YOU MAKE HIM CHAIRMAN (Y/N)? ";A$
1320 GOSUB 200
1330 IF LEFT$ (A$,1)= "Y"THEN 1500
1340 IF T(W)- V(J)< T(L)+ V(J)THEN 1510
1350 GOSUB 210:PLOT 6,1:INPUT "HE'LL ONLY COME AS CHAIRMAN - OK (Y/N)? ";A$
1360 GOSUB 200
1370 IF LEFT$ (A$,1)= "Y"THEN 1500
1380 GOTO 1260
1390 REM
1400 GOSUB 1880:IF J= 0THEN 1600
1410 GOSUB 210:PRINT "OTHER SIDE WANTS"J" TO JOIN THEM      ":GOSUB 190
1420 IF K< > 0THEN 1500
1430 GOSUB 210:PLOT 6,1:PRINT "WILL YOU MAKE"J" CHAIRMAN TO KEEP HIM ";
1440 INPUT "? ";A$
1450 GOSUB 200
1460 IF LEFT$ (A$,1)= "Y"THEN 1480
1470 GOTO 1500
1480 IF K= 0THEN K= 1:P(J,4)= 1:P(F(W),4)= 0:F(W)= J:GOTO 1400
1490 REM
1500 P(F(L),4)= 0:P(J,4)= 1:F(L)= J
1510 I= J:GOSUB 2700
1520 IF F(W)= JTHEN GOSUB 1950
1530 IF J= 11THEN Y= L:O= W
1540 C(J)= L
1550 M(W)= M(W)- 1:T(W)= T(W)- V(J)
1560 M(L)= M(L)+ 1:T(L)= T(L)+ V(J)
1570 IF M(1)> 0AND M(2)> 0THEN 490
1580 REM
1590 GOSUB 210:PLOT 6,70:PRINT "ALL MEMBERS ARE IN ONE COALITION !":GOSUB 190
1600 GOSUB 210:PLOT 6,67:PRINT "             GAME'S OVER !             ":GOSUB 190
1610 GOSUB 210:PLOT 6,38+ 64:INPUT "     WOULD YOU LIKE TO PLAY AGAIN? ";A$
1620 IF LEFT$ (A$,1)= "Y"THEN 1640
1630 GOTO 2010
1640 REM
1650 FOR I= 1TO 11:GOSUB 3030:NEXT I:GOTO 180
1660 REM
1670 NX= 11
1680 PLOT 6,2:QA= I
1690 T(1)= 0:T(2)= 0
1700 FOR I= 1TO NX
1710 QQ= P(I,2)
1720 PLOT 3,I* 5+ 1,7
1730 IF P(I,5)< > 1THEN PLOT 6,CO:PRINT "```":PLOT 6,2:GOTO 1760
1740 PRINT "   ":PLOT 3,I* 5+ 1,7:PRINT RIGHT$ ((STR$ (QQ)),3)
1750 T(1)= P(I,2)+ T(1)
1760 NEXT I
1770 PLOT 3,14,13:PRINT "   ":PLOT 3,14,13:PRINT RIGHT$ ((STR$ (T(1))),3)
1780 FOR I= 1TO NX
1790 QQ= P(I,2)
1800 PLOT 3,I* 5+ 1,24
1810 IF P(I,5)< > 2THEN PLOT 6,CO:PRINT "```":PLOT 6,2:GOTO 1840
1820 PRINT "   ":PLOT 3,I* 5+ 1,24:PRINT RIGHT$ ((STR$ (QQ)),3)
1830 T(2)= P(I,2)+ T(2)
1840 NEXT I
1850 PLOT 3,14,18:PRINT "   ":PLOT 3,14,18:PRINT RIGHT$ ((STR$ (T(2))),3)
1860 I= QA:RETURN
1870 REM
1880 IF M(W)> 1THEN 1920
1890 GOSUB 210:PLOT 6,70:PRINT "WINNING COALITION HAS ONLY 1 MEMBER":GOSUB 190
1900 PLOT 6,70,3,12,22:PRINT "             GAME MUST END             "
1910 GOSUB 190:J= 0:RETURN
1920 N= INT (11* RND (1)+ 1)
1930 IF C(N)< > WOR F(W)= NTHEN 1920
1940 J= N:RETURN
1950 REM
1960 V1= 0:I1= 0:FOR I= 1TO 11
1970 IF C(I)< > WOR J= ITHEN 1990
1980 IF V(I)> V1THEN I1= I:V1= V(I)
1990 NEXT I:P(F(W),4)= 0:P(I1,4)= 1:F(W)= I1
2000 RETURN
2010 PLOT 6,2,27,11,15:LOAD "MENU":RUN :END
2020 REM
2030 GOSUB 2570
2040 SS= PEEK (33209):FOR II= 0TO SS:TT= RND (1):NEXT II
2050 PLOT 3,24,1:PRINT "C O A L I T I O N"
2060 PLOT 3,24,30:PRINT "C O A L I T I O N"
2070 PLOT 6,1,3,19,1:PRINT "# 1"
2080 PLOT 3,43,1:PRINT "# 1"
2090 PLOT 3,43,30:PRINT "# 2"
2100 PLOT 3,19,30:PRINT "# 2"
2110 PLOT 6,3,15
2120 PLOT 27,10:FOR X= 2TO 61STEP 59:PLOT 3,X,10:PRINT "SATURN COLONY":NEXT X
2130 PLOT 27,24
2140 GOSUB 2150:GOTO 2250
2150 QB= INT (4* RND (1)+ 1):CO= 25
2160 IF QB= 1THEN CO= 48
2170 IF QB= 2THEN CO= 42
2180 IF QB= 3THEN CO= 8
2190 PLOT 6,CO
2200 FOR YY= 6TO 25:PLOT 3,5,YY
2210 PRINT "``````````````````````````````````````````````````````"
2220 NEXT YY
2230 RETURN
2240 GOSUB 2570
2250 PLOT 6,7
2260 FOR Y= 11TO 20
2270 PLOT 3,12,Y:PRINT "                                        "
2280 NEXT Y
2290 REM
2300 PLOT 6,1
2310 PLOT 3,22,14:PRINT "CONFRONTATION"
2320 PLOT 6,6
2330 PLOT 3,26,17:PRINT "#  1"
2340 PLOT 6,3
2350 PLOT 3,13,15:PRINT "TOTAL                  CHAIRMAN  TOTAL"
2360 PLOT 3,13,16:PRINT "WEALTH                   BONUS  PAYMENT"
2370 PLOT 6,7
2380 PLOT 2,27,71,242,27,76,34,76,34,71,28,71,255
2390 PLOT 2,27,51,242,27,56,34,56,34,51,28,51,255
2400 PLOT 2,77,71,242,77,76,84,76,84,71,78,71,255
2410 PLOT 2,77,51,242,77,56,84,56,84,51,78,51,255
2420 PLOT 2,93,71,242,93,76,100,76,100,71,94,71,255
2430 PLOT 2,93,51,242,93,56,100,56,100,51,94,51,255
2440 GOSUB 2600
2450 GOSUB 3070
2460 P(1,4)= 1:P(2,4)= 1
2470 FOR I= 3TO 9STEP 2:P(I,5)= 1
2480 GOSUB 2970
2490 NEXT I
2500 I= 1:P(1,5)= 2:GOSUB 2970
2510 FOR I= 2TO 10STEP 2:P(I,5)= 2
2520 GOSUB 2970
2530 NEXT I
2540 I= 1:GOSUB 2700
2550 P(11,5)= 1
2560 RETURN
2570 PLOT 6,6
2580 PLOT 2,0,0,242,0,127,127,127,127,0,0,0,255
2590 RETURN
2600 A1$= "t``u"
2610 B1$= "````"
2620 C1$= "v``w"
2630 RETURN
2640 PLOT 6,P(I,1)
2650 PLOT 3,5* I,2+ DD:PRINT A$
2660 PLOT 3,5* I,3+ DD:PRINT B$
2670 PLOT 3,5* I,4+ DD:PRINT C$
2680 PLOT 6,CC+ BB,3,5* I+ 1,3+ DD:PRINT RIGHT$ ((STR$ (I)),2)
2690 RETURN
2700 SW= 0:PLOT 6,P(I,1)
2710 D1$= ">":D2$= "<":D3$= "+"
2720 YY= 5:IF P(I,5)= 2THEN YY= 26
2730 FOR X2= I* 5+ 1TO 59
2740 PLOT 3,X2,YY:PRINT D1$
2750 NEXT X2
2760 IF YY= 26THEN 2810
2770 FOR Y1= 5TO 26
2780 PLOT 3,59,Y1:PRINT D3$
2790 NEXT
2800 GOTO 2840
2810 FOR Y1= 26TO 5STEP - 1
2820 PLOT 3,59,Y1:PRINT D3$
2830 NEXT
2840 IF YY= 5THEN YY= 26:GOTO 2860
2850 YY= 5
2860 FOR X2= 59TO I* 5+ 1STEP - 1
2870 PLOT 3,X2,YY:PRINT D2$
2880 NEXT X2
2890 IF SW= 0THEN SW= 1:GOTO 2920
2900 PLOT 6,2
2910 RETURN
2920 GOSUB 3030
2930 IF P(I,5)= 1THEN P(I,5)= 2:GOTO 2950
2940 P(I,5)= 1
2950 GOSUB 2970
2960 PLOT 6,0:GOTO 2730
2970 A$= A1$:B$= B1$:C$= C1$:CC= 7:DD= 0:BB= 0
2980 IF P(I,5)= 2THEN DD= 25
2990 IF P(I,4)= 1THEN BB= 64
3000 IF P(I,3)= 1THEN 3060
3010 GOSUB 2640
3020 RETURN
3030 A2$= "    ":A$= A2$:B$= A2$:C$= A2$:CC= 0:BB= 0
3040 DD= 0:IF P(I,5)= 2THEN DD= 25
3050 GOSUB 2640
3060 RETURN
3070 FOR Z1= 1TO 11:FOR Z2= 2TO 5:P(Z1,Z2)= 0:NEXT Z2:NEXT Z1
3080 P(1,1)= 7:P(2,1)= 1:P(3,1)= 3:P(4,1)= 5:P(5,1)= 6:P(6,1)= 2:P(7,1)= 1:P(8,1)= 3
3090 P(9,1)= 5:P(10,1)= 7
3100 P(11,1)= 4
3110 RETURN