'$DYNAMIC 'current library; DIRESTUF.QLB DEFINT A-Z DECLARE SUB setmodex () DECLARE SUB copypage (BYVAL page1, BYVAL page2) DECLARE SUB setvispage (BYVAL page) DECLARE SUB drawsprite (pic(), pal(), BYVAL po, BYVAL x, BYVAL y, BYVAL page) DECLARE SUB loadsprite (pic(), BYVAL x, BYVAL y, BYVAL w, BYVAL h, BYVAL page) DECLARE SUB stosprite (pic(), BYVAL x, BYVAL y, BYVAL page) DECLARE SUB fadeto (palbuff(), BYVAL red, BYVAL green, BYVAL blue) DECLARE SUB fadetopal (pal(), palbuff()) DECLARE SUB setpal (pal()) DECLARE SUB clearpage (BYVAL page) 'DECLARE SUB loadpage (buf(), fil$, BYVAL p) DECLARE SUB setdiskpages (buf(), BYVAL h, BYVAL l) DECLARE SUB loadpage (fil$, BYVAL i, BYVAL p) DECLARE SUB storepage (fil$, BYVAL i, BYVAL p) DECLARE SUB setkeys () DECLARE SUB setfont (f()) DECLARE SUB printstr (s$, BYVAL x, BYVAL y, BYVAL p) DECLARE SUB textcolor (BYVAL f, BYVAL b) DECLARE SUB setitup (fil$, buff(), tmp(), BYVAL p) DECLARE FUNCTION resetdsp () DECLARE SUB playsnd (BYVAL n, BYVAL f) DECLARE SUB closefile () DECLARE SUB setwait (A(), BYVAL t) DECLARE SUB dowait () DECLARE SUB setpicstuf (buf(), BYVAL b, BYVAL p) DECLARE SUB loadset (fil$, BYVAL i, BYVAL l) DECLARE SUB storeset (fil$, BYVAL i, BYVAL l) DECLARE FUNCTION Keyseg () DECLARE FUNCTION keyoff () DECLARE FUNCTION keyval (BYVAL A) DECLARE FUNCTION getkey () TYPE Regtype ax AS INTEGER bx AS INTEGER cx AS INTEGER dx AS INTEGER bp AS INTEGER si AS INTEGER di AS INTEGER flags AS INTEGER ds AS INTEGER es AS INTEGER END TYPE DIM SHARED regs AS Regtype regs.ax = &H3509: CALL interruptx(&H21, regs, regs) off9 = regs.bx: seg9 = regs.es DIM time(1), fade(1536), font(1024), pagebuf(8000), placer(450), bobpal(1584), voc(16383), vbuff(16383), hiscore!(40) DIM spit(60), sx(60), sy(60), svel(60), stage(60), sd(60), sctr(120), whospit(60) RANDOMIZE TIMER CALL setmodex setitup "noise.cbv" + CHR$(0), voc(), vbuff(), 2 dsp = resetdsp setdiskpages pagebuf(), 200, 0 arena = 1: vpage = 1: dpage = 0: col = 1: spits = 60: snext = 1: floors = 9: max = 6: delay = 45: rate! = -90.8858: nsets = 4: xdelay! = .05: porc$(0) = "Computer": porc$(1) = "Human": name$(0) = "AUTO-BATTLE" setvispage vpage loadpage "bob.mxs" + CHR$(0), 0, 3 DIM mainpal(767) setpal mainpal() DEF SEG = VARSEG(mainpal(0)): BLOAD "palette.sto", VARPTR(mainpal(0)) DEF SEG = VARSEG(font(0)): BLOAD "bobtext.fnt", VARPTR(font(0)): setfont font(): textcolor 15, 0 DEF SEG = VARSEG(bobpal(0)): BLOAD "bob.pal", VARPTR(bobpal(0)) DEF SEG = VARSEG(hiscore!(0)): BLOAD "spit.hi", VARPTR(hiscore!(0)) GOSUB switchon begin: GOSUB getstats loadpage "intro.map" + CHR$(0), 0, 2 copypage 2, dpage copypage dpage, vpage fadetopal mainpal(), fade() showhp = 0: me = 1: allmode = 0: alive = max: winner = 0: runner = 0: dash = 0: csr = 1: zog$ = " " FOR i = 1 TO max: pic(i) = -1: x(i) = 320: y(i) = 170: NEXT i playsnd ((max * nsets) + 2), rate! DEMO# = TIMER setkeys DO: setkeys IF keyval(1) > 1 OR ((keyval(57) > 1 OR keyval(28) > 1) AND csr = max + 2) THEN GOSUB shutoff: fadeto fade(), 0, 0, 0: SCREEN 13: closefile: SYSTEM IF dash = 0 THEN dash = 1: pic(runner) = -1: runner = runner + 1: IF runner > max THEN runner = 1 pic(runner) = 0 END IF IF dash = 1 THEN me = runner: GOSUB tryleft: IF x(runner) < 150 THEN dash = 2 IF dash = 2 THEN me = runner: GOSUB tryright: IF x(runner) > 320 THEN dash = 0 IF (keyval(57) > 1 OR keyval(28) > 1) AND csr = 1 THEN me = csr: fadeto fade(), INT(RND * 63), INT(RND * 63), INT(RND * 63): overh(me) = 124: overh#(me) = TIMER: GOTO spitgame IF (keyval(57) > 1 OR keyval(28) > 1) AND csr = max + 1 THEN me = 0: fadeto fade(), INT(RND * 63), INT(RND * 63), INT(RND * 63): overh(me) = 124: overh#(me) = TIMER: GOTO spitgame IF TIMER - DEMO# > 60 THEN me = 0: fadeto fade(), INT(RND * 63), INT(RND * 63), INT(RND * 63): overh(me) = 124: overh#(me) = TIMER: GOTO spitgame IF keyval(72) > 1 THEN csr = csr - 1: DEMO# = TIMER: IF csr < 1 THEN csr = max + 2 IF keyval(80) > 1 THEN csr = csr + 1: DEMO# = TIMER: IF csr > max + 2 THEN csr = 1 FOR i = 1 TO max + 2 IF i = csr THEN textcolor 10, 2 printstr name$(i) + LEFT$(zog$, 9 - LEN(name$(i))), 120, 40 + (i * 8), dpage textcolor 15, 0 NEXT i IF csr <= max THEN textcolor 10, 0 printstr "HiSCORE", 16, 42 + csr * 4, dpage printstr "is not", 16, 50 + csr * 4, dpage printstr "recorded", 16, 58 + csr * 4, dpage printstr "in demo", 16, 66 + csr * 4, dpage textcolor 3, 0 GOSUB showstats textcolor 15, 0 END IF printstr "HiSCORE", 16, 138, dpage 'printstr STR$(INT(hiscore!(9))), 8, 148, dpage 'printstr porc$(hiscore!(19)), 16, 158, dpage 'printstr name$(hiscore!(18)), 16, 168, dpage 'printstr name$(runner), x(runner) - (LEN(name$(runner)) * 8), 186, dpage printstr "JUST A DEMO!", 160 - LEN("JUST A DEMO!") * 4, 10, dpage flash = flash XOR 1 IF csr > 1 AND csr < 7 THEN textcolor 4 + flash * 10, 0: printstr "Hero Unavailable!", 160 - LEN("Hero Unavailable!") * 4, 18, dpage: textcolor 15, 0 GOSUB drawall copypage dpage, vpage: copypage 2, dpage LOOP showstats: printstr CHR$(14) + STR$(speed(csr)), 242, 35 + (csr * 2), dpage printstr CHR$(15) + STR$(lift(csr)), 242, 45 + (csr * 2), dpage printstr CHR$(16) + STR$(harm(csr)), 242, 55 + (csr * 2), dpage printstr CHR$(17) + STR$(hp(csr)), 242, 65 + (csr * 2), dpage printstr CHR$(12) + STR$(jbonus(csr)), 242, 75 + (csr * 2), dpage printstr CHR$(18) + STR$(meterm!(csr)), 242, 85 + (csr * 2), dpage printstr CHR$(13) + " X" + STR$(spray(csr) + 1), 242, 95 + (csr * 2), dpage RETURN spitgame: loadpage "level1.map" + CHR$(0), arena - 1, 2 IF arena = 1 THEN RESTORE arena1 FOR i = 0 TO floors READ fx(i), fy(i), fw(i) ' printstr "<", fx(i) - (fw(i) * .5), fy(i) + 7, 2 ' printstr ">", fx(i) + (fw(i) * .5) - 8, fy(i) + 7, 2 NEXT i copypage 2, dpage copypage dpage, vpage fadetopal mainpal(), fade() FOR i = 1 TO max: pic(i) = 0: x(i) = INT(RND * 320): y(i) = INT(RND * 150) + 20: fplant(i) = 0: NEXT i setkeys DO setkeys tt# = TIMER IF keyval(15) > 0 AND keyval(87) > 1 THEN overh(me) = 0: me = me - 1: IF me < 1 THEN me = max WHILE hp(me) < 1: me = me - 1: IF me < 1 THEN me = max WEND overh(me) = 124: overh#(me) = TIMER END IF IF keyval(15) > 0 AND keyval(88) > 1 THEN overh(me) = 0: me = me + 1: IF me > max THEN me = 1 WHILE hp(me) < 1: me = me + 1: IF me > max THEN me = 1 WEND overh(me) = 124: overh#(me) = TIMER END IF IF keyval(57) > 0 AND TIMER - spit#(me) > reload!(me) AND gospit(me) = 0 AND fplant(me) = 1 THEN gospit(me) = spitspeed(me): spit#(me) = TIMER: power(me) = 0: letgo(me) = 0 IF keyval(1) > 1 THEN winner = 0: GOTO done IF keyval(88) > 1 THEN showhp = showhp XOR 1 IF hp(me) < 1 AND me > 0 THEN fadeto fade(), 60, 0, 0: winner = 0: GOTO done IF keyval(72) > 0 AND fplant(me) = 1 AND gospit(me) = 0 THEN jump(me) = lift(me): drop(me) = 0: fplant(me) = 0 IF keyval(75) > 0 AND keyval(77) = 0 THEN GOSUB tryleft: fplant(me) = 0 IF keyval(77) > 0 AND keyval(75) = 0 THEN GOSUB tryright: fplant(me) = 0 IF duck(me) > 0 THEN pic(me) = duck(me) - 1: duck(me) = 0 IF keyval(80) > 0 AND fplant(me) = 1 THEN duck(me) = pic(me) + 1: pic(me) = 3 IF keyval(54) > 0 AND keyval(42) > 0 AND keyval(0) = 55 THEN w = getkey: IF w = 8 THEN GOSUB cheat FOR i = 1 TO max IF hp(i) < 1 AND pic(i) > -1 THEN pic(i) = 3: pal(i) = pal(i) XOR 255 NEXT i FOR i = 1 TO max: IF hp(i) < 1 THEN GOTO doomed GOSUB auto IF gospit(i) > 0 THEN GOSUB hock IF jump(i) > 0 THEN GOSUB jumper IF jump(i) = 0 THEN GOSUB plumet IF hitime(i) > 0 THEN pic(i) = 6: hitime(i) = hitime(i) - 1: IF hitime(i) = 0 THEN pic(i) = 0 FOR j = 1 TO max: IF hp(j) < 1 AND pic(j) >= 0 THEN GOSUB take NEXT j targ = 0 doomed: NEXT i GOSUB spitmove GOSUB drawall textcolor 240, 0 printstr name$(me), 1, 1, dpage 'printstr STR$(INT(score!(me))), 140, 8, dpage textcolor 240, 0 GOSUB meter IF TIMER - win# > 5 AND winner > 0 THEN GOSUB victory: GOTO done IF keyval(28) > 1 THEN w = getkey 'SWAP vpage, dpage: setvispage vpage: copypage 2, dpage copypage dpage, vpage: copypage 2, dpage WHILE TIMER - tt# < xdelay!: WEND LOOP done: fadeto fade(), 0, 0, 0 FOR i = 1 TO 60: spit(i) = 0: NEXT GOTO begin victory: playsnd ((max * 3) + winner), rate! t# = TIMER: WHILE TIMER - t# < nsize!(winner): WEND playsnd ((max * nsets) + 1), rate! t# = TIMER: WHILE TIMER - t# < 3: WEND IF score!(winner) > hiscore!(winner) AND cheat(winner) = 0 THEN hiscore!(winner) = score!(winner) hiscore!(winner + 10) = 0: IF me = winner THEN hiscore!(winner + 10) = 1 END IF IF score!(winner) > hiscore!(9) AND cheat(winner) = 0 THEN hiscore!(9) = score!(winner) hiscore!(19) = 0: IF me = winner THEN hiscore!(19) = 1 hiscore!(18) = winner END IF DEF SEG = VARSEG(hiscore!(0)): BSAVE "spit.hi", VARPTR(hiscore!(0)), 80 RETURN auto: IF i = me OR hp(i) < 1 THEN RETURN distx = 320: flee(i) = 0 FOR o = 1 TO max IF ABS(x(o) - x(i)) < distx AND i <> o AND hp(o) > 0 THEN distx = (x(o) - x(i)): targ = o IF jump(i) = 0 AND dofall(i) <> 0 THEN oldtarg(i) = targ targ = oldtarg(i) NEXT o FOR o = 1 TO 60 IF ABS(sx(o) - x(i)) < ABS(distx) AND i <> whospit(o) AND spit(o) > 0 AND y(i) >= sy(o) THEN distx = (sx(o) - x(i)): flee(i) = o NEXT o mtemp = me: me = i IF (jump(i) > 0 OR dofall(i) = 0) AND ABS(ABS(distx) - fave(i)) < speed(i) * 3 THEN fave(i) = fave(i) + speed(i) * 3 IF flee(i) > 0 AND y(i) = y(whospit(flee(i))) AND fplant(i) = 1 AND gospit(i) > 0 THEN buildup#(i) = TIMER - (fave!(i) * 2): fplant(i) = 0: sitstil#(i) = TIMER IF flee(i) > 0 AND y(i) = y(whospit(flee(i))) AND fplant(i) = 1 AND gospit(i) = 0 THEN jump(i) = lift(i): drop(i) = 0: fplant(i) = 0: sitstil#(i) = TIMER IF flee(i) > 0 AND d(i) = (0 XOR rl(i)) THEN GOSUB tryleft: fplant(me) = 0: sitstil#(i) = TIMER: GOTO finis IF flee(i) > 0 AND d(i) = (1 XOR rl(i)) THEN GOSUB tryright: fplant(me) = 0: sitstil#(i) = TIMER: GOTO finis IF y(targ) < y(i) AND jump(targ) = 0 AND dofall(targ) > 0 AND fplant(me) = 1 AND gospit(me) = 0 AND RND * 100 < 50 THEN jump(me) = lift(me): drop(me) = 0: fplant(me) = 0: donil!(i) = RND * 8: sitstil#(i) = TIMER: fave(i) = favecent(i) + INT(RND * _ favecent(i)) - (favecent(i) / 2) IF ABS(distx) < fave(i) - (RND * (fave(i) * .5)) AND TIMER - spit#(me) > reload!(me) AND gospit(me) = 0 AND fplant(me) = 1 THEN gospit(me) = spitspeed(me): spit#(me) = TIMER: power(me) = 0: letgo(me) = 0: buildup#(i) = TIMER + (RND * (fave!(i) * .5) + (fave!(i) * .25)): sitstil#(i) = TIMER: fave(i) = favecent(i) + INT(RND * favecent(i)) - (favecent(i) / 2) END IF IF TIMER - sitstil#(i) > donil!(i) AND fplant(me) = 1 AND gospit(me) = 0 AND RND * 100 < 10 THEN jump(me) = lift(me): drop(me) = 0: fplant(me) = 0: donil!(i) = RND * 5: sitstil#(i) = TIMER: fave(i) = favecent(i) + INT(RND * favecent(i)) - (favecent( _ i) / 2) IF d(i) = 0 AND TIMER - sitstil#(i) > donil!(i) THEN GOSUB tryleft: fplant(i) = 0: GOTO finis IF d(i) = 1 AND TIMER - sitstil#(i) > donil!(i) THEN GOSUB tryright: fplant(i) = 0: GOTO finis IF duck(me) > 0 THEN pic(me) = duck(me) - 1: duck(me) = 0 IF duck(me) = 0 AND ABS(distx) < 30 AND y(targ) - y(i) < -80 AND INT(RND * 100) < 10 THEN ducking(i) = INT(RND * 8) IF ducking(i) > 0 THEN duck(me) = pic(me) + 1: pic(me) = 3: ducking(i) = ducking(i) - 1 d(i) = 0: IF x(targ) > x(i) THEN d(i) = 1 IF distx < 0 AND ABS(distx) > fave(i) THEN GOSUB tryleft: fplant(i) = 0: sitstil#(i) = TIMER IF distx > 0 AND ABS(distx) > fave(i) THEN GOSUB tryright: fplant(i) = 0: sitstil#(i) = TIMER IF distx < 0 AND ABS(distx) + (speed(i) * 1) < fave(i) THEN GOSUB tryright: d(i) = 0: fplant(i) = 0: sitstil#(i) = TIMER IF distx > 0 AND ABS(distx) + (speed(i) * 1) < fave(i) THEN GOSUB tryleft: d(i) = 1: fplant(i) = 0: sitstil#(i) = TIMER finis: me = mtemp RETURN drawall: FOR i = 1 TO max IF showhp = 1 THEN printstr name$(i) + STR$(hp(i)), 0, 20 + i * 10, dpage ty = 0: tx = 0 temp1& = ((i - 1) * 6300) tx& = temp1& + (pic(i) * 900) + (d(i) * 450) WHILE tx& > 319: ty = ty + 1: tx& = tx& - 320: WEND: tx = tx& IF pic(i) >= 0 THEN loadsprite placer(), tx, ty, 30, 30, 3 IF pic(i) >= 0 THEN drawsprite placer(), bobpal(), pal(i) * 16, x(i) - 15, y(i) - 15, dpage IF TIMER - overh#(i) < 3 AND ABS(x(i) - 160) < 155 THEN printstr CHR$(overh(i)), x(i) - 4, y(i) - 20, dpage NEXT i FOR i = 1 TO 60 IF spit(i) = 1 THEN loadsprite placer(), (stage(i) * 50) + (sd(i) * 200), 148, 10, 10, 3 IF spit(i) = 1 THEN drawsprite placer(), bobpal(), 0, sx(i) - 5, sy(i) - 5, dpage NEXT i RETURN meter: IF TIMER - spit#(me) > reload!(me) THEN textcolor col, 0: col = col XOR 8 printstr "SPIT", 1, 9, dpage FOR i = 1 TO power(me) textcolor 65 + (i * .5), 0 printstr ")", 30 + (2 * i), 9, dpage NEXT i textcolor 60, 0 FOR i = 0 TO INT((hp(me) - 1) / 10) IF i = INT(hp(me) / 10) THEN textcolor 50 + (hp(me) - (INT(hp(me) / 10) * 10)), 0 printstr "X", 6 * i + 140, 1, dpage NEXT i textcolor 15, 0 RETURN take: IF ABS(x(j) - x(i)) < 25 AND ABS(y(j) - y(i)) < 25 AND TIMER - doom#(j) > 2 THEN pic(j) = -1 A = INT(RND * 8) IF A = 0 THEN spray(i) = 2 IF A = 1 THEN jbonus(i) = jbonus(i) + 2: lbs(i) = lbs(i) - 2: IF lbs(i) < 1 THEN lbs(i) = 1 IF A = 2 THEN reload!(i) = 0 IF A = 3 AND speed(i) < 11 THEN speed(i) = speed(i) + 2: IF jbonus(i) > 0 THEN jbonus(i) = jbonus(i) - 1 IF A = 4 AND lift(i) < 21 THEN lift(i) = lift(i) + 1 IF A = 5 THEN harm(i) = harm(i) + 5 IF A = 6 THEN hp(i) = hp(i) + 15 IF A = 7 AND meterm!(i) > 0 THEN meterm!(i) = meterm!(i) - .08 overh(i) = 11 + A: overh#(i) = TIMER score!(i) = score!(i) + 400 + INT(RND * 100) END IF RETURN hock: fplant(i) = 0 pic(i) = 4 IF TIMER < buildup#(i) + (fave!(i)) AND targ > 0 AND TIMER - pow#(i) > meterm!(i) AND letgo(i) = 0 THEN pow#(i) = TIMER: power(i) = power(i) + 1: IF power(i) > 20 THEN power(i) = 20: score!(i) = score!(i) + 50: letgo(i) = 1 IF TIMER < buildup#(i) + (fave!(i)) AND targ > 0 THEN spit#(i) = TIMER: RETURN IF keyval(57) > 0 AND targ = 0 AND TIMER - pow#(i) > meterm!(i) AND letgo(i) = 0 THEN pow#(i) = TIMER: power(i) = power(i) + 1: IF power(i) > 20 THEN power(i) = 20: letgo(i) = 1 IF keyval(57) > 0 AND targ = 0 THEN spit#(i) = TIMER: RETURN letgo(i) = 1 IF gospit(i) <= INT(spitspeed(i) * .5) THEN pic(i) = 5 IF gospit(i) = INT(spitspeed(i) * .5) THEN GOSUB spittle gospit(i) = gospit(i) - 1 IF gospit(i) = 0 THEN pic(i) = 1 RETURN spittle: IF scount >= 60 THEN RETURN FOR o = 0 TO spray(i) scount = scount + 1: score!(i) = score!(i) + 1 spit(snext) = 1: stage(snext) = 0 playsnd i, rate! IF d(i) = 0 THEN sx(snext) = x(i) - 16 - (o + 1): svel(snext) = ((INT(power(i) * .5) - (o * 1)) * sbonus!(i)) * -1: IF svel(snext) > -1 THEN svel(snext) = -1 IF d(i) = 1 THEN sx(snext) = x(i) + 16 - (o + 1): svel(snext) = (INT(power(i) * .5) - (o * 1)) * sbonus!(i): IF svel(snext) < 1 THEN svel(snext) = 1 sy(snext) = y(i) + spithi(i): sd(snext) = d(i): whospit(snext) = i WHILE spit(snext) = 1 snext = snext + 1: IF snext = 60 THEN snext = 1 WEND NEXT o power(i) = 0 RETURN spitmove: FOR i = 1 TO 60 IF spit(i) = 1 THEN IF stage(i) = 3 THEN sctr(i) = sctr(i) + 1: IF sctr(i) > 4 THEN spit(i) = 0: scount = scount - 1 IF stage(i) < 3 THEN sx(i) = sx(i) + svel(i) IF sx(i) > 330 THEN sx(i) = -10 IF sx(i) < -10 THEN sx(i) = 330 IF svel(i) > 1 AND stage(i) = 2 THEN sctr(i + 60) = sctr(i + 60) + 1: IF sctr(i + 60) > 2 THEN svel(i) = svel(i) - 1: sctr(i + 60) = 0 IF svel(i) < -1 AND stage(i) = 2 THEN sctr(i + 60) = sctr(i + 60) + 1: IF sctr(i + 60) > 2 THEN svel(i) = svel(i) + 1: sctr(i + 60) = 0 IF stage(i) < 3 THEN sy(i) = sy(i) + stage(i) FOR j = 1 TO max IF ABS(sx(i) - x(j)) < 13 AND ABS(sy(i) - (y(j) + (10 * SGN(duck(j))))) < 13 - (5 * SGN(duck(j))) AND j <> whospit(i) AND hp(j) > 0 THEN playsnd j + max, rate! spit(i) = 0: scount = scount - 1: hitime(j) = 5: hp(j) = hp(j) - harm(whospit(i)): duck(j) = 0: score!(whospit(i)) = score!(whospit(i)) + 40 + INT(RND * 20) IF hp(j) < 1 THEN doom#(j) = TIMER: score!(whospit(i)) = score!(whospit(i)) + 500 + INT(RND * 70): playsnd ((max * 2) + j), rate!: GOSUB whowon mtemp = me: me = j: dtemp = d(j): stemp = speed(me): speed(j) = kback(mtemp) IF sd(i) = 0 THEN GOSUB tryleft IF sd(i) = 1 THEN GOSUB tryright speed(j) = stemp: me = mtemp: d(j) = dtemp END IF NEXT j IF stage(i) < 2 THEN sctr(i) = sctr(i) + 1: IF sctr(i) > 4 THEN sctr(i) = 0: stage(i) = stage(i) + 1 IF sy(i) > 183 THEN sy(i) = 183: stage(i) = 3: sctr(i) = 0 END IF NEXT RETURN whowon: alive = alive - 1 IF alive = 1 THEN FOR ii = 1 TO max IF hp(ii) > 0 THEN winner = ii NEXT ii win# = TIMER END IF RETURN plumet: FOR o = 1 TO max IF y(i) < y(o) AND ABS((y(o) + (10 * SGN(duck(o)))) - y(i)) < 25 - (5 * SGN(duck(o))) AND ABS(x(o) - x(i)) < 26 AND pic(o) >= 0 THEN drop(i) = 0: jump(i) = lift(i) + 2: hitime(o) = 3: pic(i) = 3: duck(o) = 0: playsnd o + max, rate! NEXT o dofall(i) = 0 FOR o = 0 TO floors IF ABS(y(i) - fy(o)) <= drop(i) AND ABS(x(i) - fx(o)) < fw(o) * .5 AND dofall(i) = 0 THEN dofall(i) = o + 1 NEXT o IF dofall(i) = 0 THEN y(i) = y(i) + drop(i) IF drop(i) <= lbs(i) THEN drop(i) = drop(i) + 1 END IF IF dofall(i) > 0 THEN drop(i) = 0: fplant(i) = 1: y(i) = fy(dofall(i) - 1): IF pic(i) = 2 THEN pic(i) = 1 RETURN jumper: IF y(i) < -40 + jump(i) THEN jump(i) = 0: RETURN y(i) = y(i) - INT(jump(i) / 2): jump(i) = jump(i) - 1: IF jump(i) = 0 THEN gospit(i) = 0 pic(i) = 2 RETURN tryright: IF duck(me) > 0 OR gospit(me) > 0 THEN RETURN d(me) = 1: far2go = speed(me) + jbonus(me) * SGN(jump(me)) cant = 0: FOR o = 1 TO max IF ABS(x(o) - x(me)) <= 16 + far2go AND x(o) > x(me) AND ABS(y(o) - y(me)) < 26 AND pic(o) >= 0 AND hp(o) > 0 THEN cant = 1 NEXT o IF cant = 0 THEN x(me) = x(me) + far2go IF x(me) > 330 THEN x(me) = -10 tik(me) = tik(me) + 1: IF tik(me) > feet(me) THEN tik(me) = 0: IF pic(me) < 2 THEN pic(me) = pic(me) XOR 1 RETURN tryleft: IF duck(me) > 0 OR gospit(me) > 0 THEN RETURN d(me) = 0: far2go = speed(me) + jbonus(me) * SGN(jump(me)) cant = 0: FOR o = 1 TO max IF ABS(x(o) - x(me)) <= 16 + far2go AND x(o) < x(me) AND ABS(y(o) - y(me)) < 26 AND pic(o) >= 0 AND hp(o) > 0 THEN cant = 1 NEXT o IF cant = 0 THEN x(me) = x(me) - far2go IF x(me) < -10 THEN x(me) = 330 tik(me) = tik(me) + 1: IF tik(me) > feet(me) THEN tik(me) = 0: IF pic(me) < 2 THEN pic(me) = pic(me) XOR 1 RETURN cheat: speed(me) = 6: lift(me) = 18: lbs(me) = 18: reload!(me) = 0: harm(me) = 10: spray(me) = 4: jbonus(me) = 4: hp(me) = 100: kback(me) = 15: meterm!(me) = .01 overh(me) = 38: overh#(me) = TIMER: cheater(me) = 1 RETURN getstats: RESTORE stats FOR i = 1 TO max: READ name$(i), x(i), y(i), pic(i), d(i), pal(i), speed(i), feet(i), lift(i), lbs(i), reload!(i), spitspeed(i), harm(i), spithi(i), spray(i), fplant(i), jbonus(i), hp(i), rl(i), fave(i), favecent(i), fave!(i), donil!(i), kback(i), _ meterm!(i), nsize!(i), score!(i), cheater(i), sbonus!(i) duck(i) = 0: jump(i) = 0: gospit(i) = 0: hitime(i) = 0 NEXT i name$(max + 1) = "AUTO-WAR" name$(max + 2) = "EXIT" RETURN stats: DATA B€‚ƒ„…†‡,300,170,0,0,0,4,2,14,5,.45,6,4,-2,0,0,0,100,0,50,50,1.1,3,8,.12,1.6,0,0,1 DATA Plip,200,120,0,0,1,2,3,15,6,.8,4,5,3,0,0,-1,105,0,30,35,.2,3,8,.12,1.1,0,0,1 DATA Bowzerˆ‰,50,50,0,1,2,2,1,12,3,1,9,6,3,0,0,4,100,0,80,80,2,3,10,.11,1.4,0,0,1.25 DATA Cherokee,30,170,0,1,3,5,2,13,7,1.5,5,7,-3,0,0,-1,80,0,30,60,1,2.4,10,.1,1.1,0,0,1 DATA Bliblet,170,90,0,0,4,2,1,13,5,1.9,6,4,-6,1,0,0,95,0,50,50,1.5,5,5,.14,1.1,0,0,1 DATA Sir Chef,170,90,0,0,5,4,1,13,6,1.6,6,6,1,0,0,0,90,0,50,50,1.4,5,5,.1,1.1,0,0,2 arena1: DATA 160,160,380 DATA 167,44,90 DATA 167,124,134 DATA 78,86,84 DATA 260,86,84 DATA 160,170,380 DATA 160,170,380 DATA 160,170,380 DATA 160,170,380 DATA 160,170,380 switchon: regs.ax = &H2509: regs.ds = Keyseg: regs.dx = keyoff CALL interruptx(&H21, regs, regs) RETURN shutoff: regs.ax = &H2509: regs.ds = seg9: regs.dx = off9 CALL interruptx(&H21, regs, regs) RETURN