-+-+-+-+-+-+-+-+ START OF PART 9 -+-+-+-+-+-+-+-+ X ! main move processing loop X for move_count=1 to num_moves X jump_flag=0 X select action_cmd$(move_count) X`09 case "j" X`09`09a$= "WARNING: Re-activation of the Ionization reactor is "+& X`09`09`09"unpredictable." X call display(23,a$) X`09`09a$="PROCEED> (Y/N)"\call display(1,a$) X`09`09if a$="n" then X`09`09 action_move=action_move-1 X`09`09else X`09`09 a$= "IONIZATION CONTROL RODS REMOVED - ION GENERATION "+& X`09`09`09"RESUMING." X call display(23,a$) X`09`09 gosub 3300 X`09`09 if rnd>(.4+.4*s(pr::shiptype)::reliability/100) then X`09`09 a$= "REACTOR STABILITY ALERT: CAN'T ACHIEVE ION EQUIL"+& X`09`09`09"BRIUM." X call display(23,a$) X`09`09 if rnd>(.3+.4*s(pr::shiptype)::reliability/100) then X`09`09 a$= "SCRAMING! REACTOR STABILIZED - JUMP ABORTED." X`09 call display(23,a$) X`09`09 else X`09`09 a$= "SCRAM FAILURE! IONIZATION CHAMBER OVERLOAD!" X`09 call display(23,a$) X`09`09 a$= "BBOOOOMMMMMMM!!!!! You've been VAPORIZED." X`09 call display(23,a$)`09 X`09`09 sleep(1%) X`09`09 goto 8000 X`09`09 end if X`09`09 else X`09`09 a$= "RE-IONIZATION ACHEIVED" X`09 call display(23,a$) X`09`09 jump_flag=1 X`09`09 end if X`09`09end if X`09 case "?","help" X`09`09gosub help X`09 case "re" X`09`09gosub 3000 X case "ah" X`09`09gosub 3240 X case "ab" X gosub 3800 X if pr::on_ground=1 then return X end if X case "a" X`09 gosub 3231 X case "c" X gosub 2200 X case "t" X pr::direction=pr::direction*-1 X a$="You fire your maneouver rockets and swing through a " X a$=a$+"tight semicircle." X call display(23,a$) X case "o" X gosub 2800 X case "m" X gosub 3600 X case "r","f" X`09`09gosub 3500 X case "b" X gosub 1100 X case "d" X pr::dodge=1 X case "e" X gosub 3700 X case "s" X gosub 1000 X case "bo" X gosub 3900 X case "fl" X a$="Cargo hold flushed - All cargo except gold discarded." X call display(23,a$) X for k=1 to 9\pr::cargo(k)=0\next k\pr::totcargo=pr::cargo(10 V) X case "sa" X gosub sand_blaster X`09 case "cl" X`09`09if pr::equip(21)=0 then`20 X`09`09 call display(33,"Your ship is not fitted with a cloak.") X`09`09 action_combat = action_combat - 1 X`09`09else X`09`09 if pr::cloak = 1 then`20 X`09`09 pr::cloak = 0`20 X`09`09 else`20 X`09`09 pr::cloak = 1 X`09`09 end if X`09`09 gosub 1700 X`09`09end if X`09 case "ls" X`09`09if pr::equip(20)=0 then`20 X`09`09 call display(33,"Your ship is not fitted with a LSJ.") X`09`09 action_combat = action_combat - 1 X`09`09else X`09`09 if pr::lsj = 1 then`20 X`09`09 pr::lsj = 0 X`09`09 else`20 X`09`09 pr::lsj = 1 X`09`09 end if X`09`09 call display(23,a$) X`09`09 gosub 1700 X`09`09end if X`09 case "ec" X`09`09if pr::equip(19)=0 then X`09`09 call display(33,"Your ship is not fitted with ECM.") X`09`09 action_combat=action_combat-1`09`09 `20 X`09`09else X`09`09 if ecm_status%=1 then ecm_status%=0 else ecm_status%=1 end if X`09`09 gosub 1700 X`09`09end if X case else X call display(33,"Invalid command - Enter '?' for help") X end select X if jump_flag=1 then return end if X next move_count X if action_move+action_combat=0 then goto 3200 end if X gosub 3300 X if pr::rpos<0 then pr::rpos=0 end if X if g_option$(4)="OFF" and pr::rpos<>0 then goto 3200 end if X if near_important=0 or pr::rpos=0 then return end if X goto 3200 X X3231 ! ahead full X pr::rpos=pr::rpos-pr::speed*pr::direction X select pr::speed X case .75 X a$="C" X case 1 X a$="B" X case 1.25 X a$="A" X case 1.5 X a$="A ultra" X end select X a$="Your Delison class "+a$+" drive puts out maximum power." X call display(23,a$) X return X X3240 ! ahead slow X a$="Enter distance to advance> "\call display(1,a$)\a=val(a$) X if a=0 then return end if X if a/2000>pr::speed then`20 X`09call display(33,"Your drive can't go fast enough.") X goto 3240 X end if X if a<0 then 3240 end if X a=int(a/500)/4\pr::rpos=pr::rpos-a*pr::direction X a$="You advance "+str$(a*2000)+" km." X call display(23,a$) X if pr::rpos<0 then pr::rpos=0 end if X return X`20 X`20 X3300 ! --------------- Update Ships and Calculate Nearest ------------ X gosub 3650 `09! check for missile hit X nearest=50 X near_important=0 X d=50 X get #3%, key #0% eq name$(pr::planet), wait 60 X pr::energy=t(pr::shipnum)::senergy X if pr::cloak = 1 and pr::energy > CLOAK_COST then X pr::energy = pr::energy - CLOAK_COST X else`20 X if pr::cloak = 1 then X a$="Insufficient energy for Cloaking device - Deactivating." X call display(23,a$) X pr::cloak = 0 X end if X end if X if pr::lsj = 1 and pr::energy > LSJ_COST then X pr::energy = pr::energy - LSJ_COST X else`20 X if pr::lsj = 1 then X`09 a$="Insufficient energy for LSJ - Deactivating." X`09 call display(23,a$) X`09 pr::lsj = 0 X end if X end if X t(pr::shipnum)::special = pr::cloak X if ecm_status%=1 and pr::energy > ECM_COST then X pr::energy=pr::energy - ECM_COST X else if ecm_status%=1 then X`09 a$="Insufficient energy for ECM - switching to standby mode." X call display(23,a$) X ecm_status%=0 X end if X end if X for i=1 to noship X if t(i)::ship=-1 or i=pr::shipnum then iterate end if X if t(i)::spos>0 or t(i)::player<>0 then d=abs(t(i)::spos-pr::rpos) en Vd if X if d1) then X near_important=1 X end if X if t(i)::ship=10 and g_option$(3)="OFF" then near_important=1 end i Vf X if t(i)::ship<>1 and t(i)::ship<>10 and t(i)::ship<>-1 and & X`09`09t(i)::player<>2 then X near_important=1 X end if X end if X if t(i)::player=0 then X ! don't determine action for human players X if t(i)::others(2)=pr::shipnum and t(i)::ship<>14 then X if rnd>.7 then X a=t(i)::others(1) X t(i)::others(1)=t(i)::others(2) X t(i)::others(2)=a X end if X end if X me=0 X if t(i)::others(1)=pr::shipnum or t(i)::others(1)=0 then X ! if ship is responding to player or free - can change sintent X gosub 3100\me=1 X end if X ! note: me is set if ship is responding to current player X if me=1 then X if t(i)::sintent=6 and t(i)::spos>0 then gosub 3420 end if X if t(i)::sintent=7 then gosub 3380 end if X if t(i)::sintent=4 and t(i)::spos>0 then X t(i)::spos=t(i)::spos-s(t(i)::ship)::mdrive X if t(i)::spos<0 then t(i)::spos=0 end if X end if X if t(i)::sintent=5 then X t(i)::spos=t(i)::spos+s(t(i)::ship)::mdrive X end if X if t(i)::sintent=15 then X t(i)::sintent=7 X end if X if (t(i)::sintent=1 or t(i)::sintent=12) and d<3 then X gosub 3390 X end if X if t(i)::sintent=3 and d<3 then gosub attack_player end if X if t(i)::sintent=2 then gosub move_attack_player end if X if t(i)::sintent=8 and d<3 and t(i)::smissile > 0 then`20 X gosub 3440`20 X end if X end if ! end of me=1 cases X if me=0 and t(i)::others(1)=-1 then X t(i)::others(1)=t(i)::others(2) X if t(i)::others(2)=-1 then t(i)::others(1)=0 end if X end if X ! responsible for moving missiles that you fired at non-players X ! others(1) is target, others(2) is sender X ! sintent=11 for just fired, 10 for missile tracking active X if t(t(i)::others(1))::player=0 then X if t(i)::sintent=10 and t(i)::others(2)=pr::shipnum then X gosub 3480 X end if X if t(i)::sintent=11 and t(i)::others(2)=pr::shipnum then X t(i)::sintent=10 X end if X end if X ! also responsible for moving missiles targeted at oneself X if t(i)::others(1)=pr::shipnum then X if t(i)::sintent=10 then X gosub 3480 X end if X if t(i)::sintent=11 then X t(i)::sintent=10 X end if X end if X end if X next i X t(pr::shipnum)::senergy=pr::energy\t(pr::shipnum)::spos=pr::rpos X update #3%\free #3% X return X`20 Xmove_attack_player: X ! attack routine X if t(pr::shipnum)::special = 1 then ! player has cloak up X`09if rnd < (1 - 1/(1+d)) then ! if detect fails, move randomly X`09 t(i)::spos = t(i)::spos + int(3*rnd-1)*s(t(i)::ship)::mdrive X`09 if t(i)::spos < 0 then t(i)::spos = 0 end if X`09 return X`09end if X end if X if dpr::rpos then X t(i)::spos=t(i)::spos-s(t(i)::ship)::mdrive X else X if t(i)::spos 100) then X`09 for a1 = 1 to 15 X a$= "Commando launched from Starbase " + & X`09`09" ("+t(i)::username+") Range: "+str$(d*2000)+" km" X call display(23,a$) X X`09 l1 = next_ship X`09 if (l1>noship) then noship = noship+1 end if X`09 t(l1)::ship = 18 X t(l1)::spos=t(i)::spos X t(l1)::senergy=s(t(l1)::ship)::menergy X`09 t(l1)::smissile = s(t(l1)::ship)::mmissile X t(l1)::sintent=2 X t(l1)::others(1)=pr::shipnum X t(l1)::others(2)=0 X t(l1)::player=0 X t(l1)::username=left$(t(i)::username,2)+"C"+str$(a1) X`09 next a1 X`09 t(i)::smissile = t(i)::smissile - 15 X`09 else`20 X`09 if (t(i)::smissile > 0) then X`09 for mi_l = 1 to 10 X gosub 3440 X`09 next mi_l X`09 end if X`09 end if X end if X if t(i)::ship<>17 and t(i)::ship<>16 then X`09 if (t(i)::ship = 21 and rnd>.4 and t(i)::smissile> 0) then X a$= "Thargoid launched from Mothership " + & X`09`09" ("+t(i)::username+") Range: "+str$(d*2000)+" km" X call display(23,a$) X`09 l1 = next_ship X`09 if (l1>noship) then noship=noship+1 end if X`09 t(i)::smissile = t(i)::smissile -1`09! 1 less thargoid X t(l1)::ship=9 X t(l1)::spos=t(i)::spos X t(l1)::senergy=s(t(l1)::ship)::menergy X`09 t(l1)::smissile = s(t(l1)::ship)::mmissile X t(l1)::sintent=2 X t(l1)::others(1)=pr::shipnum X t(l1)::others(2)=i X t(l1)::player=0 X t(l1)::username=left$(t(i)::username,3)+"T" X`09 else`20 X if (t(i)::ship = 15 and t(i)::senergy< 150 and & X`09`09`09rnd > .7) then X`09 bomber = i X`09 gosub launch_ebomb X else X gosub attack_player X end if X end if X else ! death star or battle platform attack X if rnd>.6 and t(i)::smissile > 0 then X ! launch a Krait or Adder attack X a$= "Fighter launched from "+edit$(s(t(i)::ship)::sname,128%) + & X`09`09 " ("+t(i)::username+") Range: "+str$(d*2000)+" km" X call display(23,a$) X`09 l1 = next_ship X if (l1>noship) then noship=noship+1 end if X`09 t(i)::smissile = t(i)::smissile -1`09! 1 less ship to launch X t(l1)::ship=4 X if rnd>.5 then t(l1)::ship=7 end if X t(l1)::spos=t(i)::spos X t(l1)::senergy=s(t(l1)::ship)::menergy X t(l1)::smissile=s(t(l1)::ship)::mmissile X t(l1)::sintent=2 X t(l1)::others(1)=pr::shipnum X t(l1)::others(2)=i X t(l1)::player=0 X t(l1)::username=left$(t(i)::username,3)+"F" X else X if t(i)::ship=16 then X`09 if rnd>.4 then X`09 gosub attack_player X else X`09 if t(i)::smissile>0 then X`09`09 for mi_l =1 to 3 X`09 gosub 3440 X`09`09 next mi_l X`09 end if X end if X else X if t(i)::smissile>0 then X`09 for mi_l = 1 to 3 X gosub 3440 X`09 next mi_l X else X if rnd>.8 then X`09`09 bomber = i X`09 gosub launch_ebomb X end if X end if X end if X end if X end if X end if X return X Xlaunch_ebomb: X for ii=1 to noship X if t(ii)::ship=-1 or t(ii)::ship=20 or t(ii)::ship=17 then iterate end V if X if ii=bomber then iterate end if X if abs(t(ii)::spos-t(bomber)::spos)<4 then X`09if (t(ii)::player=0) then X a$ = edit$(s(t(ii)::ship)::sname,128%)+" VAPORIZED." X`09 call display(23,a$) X t(ii)::ship=-1 X t(ii)::senergy=-1 X t(ii)::sintent=-1 X else X`09 if (t(ii)::player=1) then X m$="%%eb" X sender$=t(bomber)::username X u$=t(ii)::username X isave=i X gosub send_message X i=isave X`09 end if X end if X end if X next ii X return X`20 Xattack_player: X ! ---------------------- attack ---------------------------- X condition$="RED"\call display(16,condition$) X a$="LASER ATTACK! Ship: "+edit$(s(t(i)::ship)::sname,128%)+" ("+ & X`09t(i)::username+") Range: "+str$(d*2000)+" Km" X call display(23,a$) +-+-+-+-+-+-+-+- END OF PART 9 +-+-+-+-+-+-+-+-