-
Notifications
You must be signed in to change notification settings - Fork 0
/
xspasim
4924 lines (4652 loc) · 357 KB
/
xspasim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
OPERATING SYSTEM = NOS 2.8.7 871/871. 04/12/13. PRINTED = 22/12/22. 19.31.18.
UJN = JOE FAMILY = CYBER JOB ORIGIN = SYSTEM.
CREATING JSN = ADDE USER NAME = PRINTS SERVICE CLASS = SYSTEM.
JJJJJJJJJJJJ OOOOOO O EEEEEEEEEEEE
JJJJJJJJJJJJ OOOOOOOOO EEEEEEEEEEEE
JJ OO OO EE
JJ OO O OO EE
JJ OO O OO EE
JJ OO O OO EE
JJ OO O OO EE
JJ OO O OO EEEEEEEE
JJ OO O OO EEEEEEEE
JJ OO O OO EE
JJ OO O OO EE
JJ OO O OO EE
JJ OO O OO EE
JJ JJ OOO OO EE
JJJJJJJ OOOOOOOOO EEEEEEEEEEEE
JJJJJ O OOOOOO EEEEEEEEEEEE
MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM
WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMW
MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM
WMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMW
MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWM
cccccccc yy yy bbbbbbbbb iiiiiiiiii ssssssss ffffffffff iiiiiiiiii ll eeeeeeeeee
cccccccccc yy yy bbbbbbbbbb iiiiiiiiii ssssssssss ffffffffff iiiiiiiiii ll eeeeeeeeee
cc c yy yy bb bb ii ss s ff ii ll ee
cc yyyy bb bb ii ss ff ii ll ee
cc yy bbbbbbbbb ii sssssssss fffff ii ll eeeee
cc yy bbbbbbbbb ii sssssssss fffff ii ll eeeee
cc yy bb bb ii ss ff ii ll ee
cc c yy bb bb ii s ss ff ii ll ee
cccccccccc yy bbbbbbbbbb iiiiiiiiii ssssssssss ff iiiiiiiiii llllllllll eeeeeeeeee
cccccccc yy bbbbbbbbb iiiiiiiiii ssssssss ff iiiiiiiiii llllllllll eeeeeeeeee
xx xx ssssssss ppppppppp aaaaaaaa ssssssss iiiiiiiiii mm mm
xx xx ssssssssss pppppppppp aaaaaaaaaa ssssssssss iiiiiiiiii mmmm mmmm
xx xx ss s pp pp aa aa ss s ii mm mmmm mm
xxxx ss pp pp aa aa ss ii mm mm mm
xx sssssssss pppppppppp aa aa sssssssss ii mm mm mm
xxxx sssssssss ppppppppp aaaaaaaaaa sssssssss ii mm mm
xx xx ss pp aaaaaaaaaa ss ii mm mm
xx xx s ss pp aa aa s ss ii mm mm
xx xx ssssssssss pp aa aa ssssssssss iiiiiiiiii mm mm
xx xx ssssssss pp aa aa ssssssss iiiiiiiiii mm mm
jjjjjjjj oooooooo eeeeeeeeee
jjjjjjjj oooooooooo eeeeeeeeee
jj oo ooo ee
jj oo o oo ee
jj oo o oo eeeee
jj oo o oo eeeee
jj jj oo o oo ee
jj jj ooo oo ee
jjjjjjj oooooooooo eeeeeeeeee
jjjjj oooooooo eeeeeeeeee
ssssssss
ssssssssss
ss s
ss
sssssssss
sssssssss
ss
s ss
ssssssssss
ssssssss
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 1
***** mail to *************************.
*.
*.
*.
****************************************
-------------------------------------------------------------------- part= 1, block=b --------------------------- mail to
not condensed space left = 308
1 ********
2 *list symbols,term
3 *list common,duh,2240,x
4 *list charset
5 *list info
6 ********
-------------------------------------------------------------------- part= 1, block=c --------------------------- comments
not condensed space left = 313
7 *list symbols
8 *
9 *list parts
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 2
-------------------------------------------------------------------- part= 1, block=d --------------------------- defines
space left = 114
11 storage 6
12 define ship
13 pls=10000,basz=50,spsz=2,tpsz=1
14 sno=n1,type=n2,isave=n3,c=n4,pd=v5
15 thta=v6,ro=v7,ox=v8,oy=v9,oz=v10
16 vpx=v11,vpy=v12,vpz=v13,cx=v14,cy=v15,cz=v16
17 tx=v17,ty=v18,tz=v19,odam=v20
18 magdir=n21
19 finro=v22
20 dist=v23,vdist=v24,rs3=v25,k=v26
21 vf=n27,dirflg=n28
22 segment,warp1=n29,20
23 warp(i)=warp1(i+1)
24 r(i)=v(i+30)
25 segment,accel1=n33,2,s
26 accel(i)=accel1(i+1)
27 goal=n34,cth=v35,sth=v36,sro=v37,cro=v38
28 x1=v39,y1=v40,z1=v41
29 i5=n42,i6=n43,pnt=n44
30 fthta=v46,vr=v47,i1=n48,i2=n49,i3=n50
31 i4=n51,ppow=v52
32 gx=v53,gy=v54,gz=v55,lasd=v56,tswit=n57
33 x=v58,y=v59,z=v60
34 stats(i)=n(60+i) $$ deghosting only
35 segment,flags=n61,1
36 *1=data on/off,2=phasor on/off,3=ally yes/no
37 shodata = flags(1)
38 phasor = flags(2)
39 allied = flags(3)
40 conbase = flags(4)
41 contorp = flags(5)
42 * flags(6) unused
43 magwarp = flags(7)
44 exist(i)=flags(8+i)
45 segment,ops=n61,2,s
46 op=ops(30)
47 prx(i)=v(i+62)
48 pry(i)=v(i+62+24)
49 prz(i)=v(i+62+48)
50 x00=256,y00=336
51 ctht(i)=v(i+134)
52 stht(i)=v(i+138)
53 crot(i)=v(i+142)
54 srot(i)=v(i+146)
55 crs=n150
56 menam = n149
57 wr=v149,wx1=v150
58 tnl=45
59 knl=60
60 rnl=60
61 anl=60
62 xoc(i)=vc(i+1) $$ ship/base/torp coords
63 yoc(i)=vc(i+73) $$all 72
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 3
64 zoc(i)=vc(i+145)
65 snt(i)=vc(i+217) $$ trigs of .&.o all 24
t r
66 cst(i)=vc(i+217+24)
67 snr(i)=vc(i+217+48)
68 csr(i)=vc(i+217+72)
69 ae(i)=vc(i+313) $$ ship/base ae 72
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 4
-------------------------------------------------------------------- part= 1, block=e --------------------------- define
space left = 93
71 mat(i)=vc(i+385) $$ " mat 48
72 dam(i)=vc(i+385+48) $$ " damage 48
73 skil(i)=vc(i+385+96) $$ " skill 48
74 fld(i)=vc(i+385+96+48) $$ " fields 48
75 nam(i)=nc(i+529+48) $$ signon 24
76 pnam(i)=nc(2\i+529+72) $$ pseudonym 48
/
77 stat(i)=nc(i+649) $$ station 24
78 hlp(i)=nc(i+649+24) $$ help pointer 24
79 tdis(i)=vc(i+721) $$ torp lim 24
80 pox(i)=vc(i+721+24) $$ planet coords 5
81 poy(i)=vc(i+721+5+24) $$ 5
82 poz(i)=vc(i+721+10+24) $$ 5
83 tam=n100,hour=n101,work=n102
84 psol(i)=vc(i+721+15+24) $$ " st. of livin 4
85 pae(i)=vc(i+721+15+28) $$ " ae. 4
86 pmat(i)=vc(i+721+15+32) $$ " mat 5
87 ppop(i)=vc(i+721+20+32) $$ " pop 4
88 pskil(i)=vc(i+721+24+32) $$ " skil 5
89 ts=vc782,ks=vc(782+tnl),rs=vc(782+tnl+knl)
90 as=vc(782+tnl+knl+rnl),sl=782+tnl+knl+rnl+anl
91 pbl=72,tpl=12
92 tb=vc(sl),kb=vc(sl+pbl),rb=vc(sl+pbl\2)
/
93 ab=vc(sl+pbl\3),tl=sl+pbl\5+tpl
/ /
94 pl=vc(sl+pbl\4)
/
95 tp=vc(sl+pbl\5)
/
96 mess(i)=nc(i\6+tl+2) $$ all mess.
/
97 id(i)=nc(i+1423)
98 nextb=nc(1429)
99 segment,w=nc(1430),1
100 warn(i,j)=w(i\24+1+j),wb(i)=w(i+96)
/
101 segment,all=nc1432,1
102 time(i)=vc(i+1440)
103 ally(i,j)=all(i\6+j+1)
/
104 revolt(i)=nc(i+1450)
105 bstat=nc1499
106 conden=vc1500
107 asin(i)=arctan(i/sqrt(1-i\i))
/
108 atan(i,j)=arctan(i/j)-.(j<0)+2.(j_0)(i<0)
p p >
109 rads(i,j)=(xoc(i)-xoc(j))&2+(yoc(i)-yoc(j))&2+(zoc(i)-zoc(j))&2
110 min(i,j)=-((i<j)\i+(j_i)\j)
/ < /
111 max(i,j)=(i+j+abs(i-j))/2 $$note, no < or > ops
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 5
113 common spasim,duh,1932,checkpt
114 comload nc1,1,1500
115 initial common,ranplan
116 initial lesson,offback
117 okword
118 gorigin x00,y00
119 bounds -255,-176,255,173
120 scalex 5
121 scaley 3.5
122 name menam
123 do check
-------------------------------------------------------------------- part= 1, block=f --------------------------- init
space left = 14
sint
124 unit sint
125 data spanote
126 zero n1,150
127 do check
128 add1 nc1444
129 findall .,xoc(0),24,i1,0
p
130 calc i1-24-i1
<
131 at 1219
132 writec i1^^Nobody here but you^
vv v
133 1 player present^
v
134 <s,i1> players present
( )
135 writec i1-usersin+1^^^?<z,i1-usersin+1> of these are in help sequence
vvv ( )
136 at 2919
137 write NEXT to enter "spasim"
138 DATA to enter "spasimnote"
139 calc sno--1
<
140 break
141 findall .,xoc(0),24,i1,0
p
142 do ghostit
143 pause 4,keys=next,data,term
144 jump hiagain
signon
145 unit signon
146 finish
147 data signon
148 back signon
149 help shelp
150 branch sno,1sk,x
151 xoc(sno)-.
<p
152 sno--1
<
153 finish
154 1sk
155 jump conden>clock,wait,x
156 at 3225
157 write HELP Available
158 do shoteam
159 at 910
160 write What team (1-4)?
161 arrow where+1
162 long 1
163 match type,1,2,3,4
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 6
164 judge type,ignore,x
165 break
166 find .,xoc(type\6),6,sno
p /
167 branch sno,x,1room
168 write No room on that team.
169 judge noquit
170 1room sno-type\6+sno
< /
171 xoc(sno)-0
<
172 finish wrapup
173 endarrow
174 inhibit erase
175 jump initv
initv
176 unit initv
177 back signon
178 at (type\800+1510+(type>1)1575)+97
/
179 write Name:
180 inhibit term,blanks
181 arrow where
182 long 20
183 storea i1,20
184 ok
185 find i1,pnam(0),48,i3
186 branch i3,1sk,x
187 block pnam(i3/2),i5,2
188 judge i6=i2,no,x
189 1sk
190 endarrow
191 block i1,pnam(sno),2
192 *name menam
193 calc nam(sno)-menam
<
194 tswit-type\6
< /
195 stat(sno)-station
<
196 ae(sno)-ae(sno+24)-10&8
< <
197 ae(sno+48)-0
<
198 fld(sno)-fld(sno+24)-10&7
< <
199 mat(sno)-mat(sno+24)-0
< <
200 dam(sno)-odam-100
< <
201 dam(sno+24)-10000
<
202 time(type)-clock
<
203 dist-10
<
204 vr-dist/sqrt(25+dist&2)
<
205 dirflg-exist(0)-exist(1)-1
< < <
206 warp(0)-warp(1)-accel(0)-accel(1)-accel(2)-0
< < < < <
207 ro-finro-90.
< < o
208 pd-skil(sno)-skil(sno+24)-1
< < <
209 ctht(1)-crot(1)-1
< <
210 stht(1)-srot(1)-0
< <
211 do mycoord
212 erase abort
213 jump pray
mycoord
214 unit mycoord
215 doto 1n,i1--1,1
<
216 randu wx1,10&5\2
/
217 calc wx1-(wx1-10&5)
<
218 calcc i1,xoc(sno)-xoc(sno+24)-wx1+pox(type),yoc(sno)-yoc(sno+24)-wx1+poy(type),zoc(sno)-zoc(sno+24)-wx1+poz(type)
< < < < < <
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 7
219 1n
220 x-xoc(sno)
<
221 y-yoc(sno)
<
222 z-zoc(sno)
<
223 goal--(type+1)
<
224 magdir-1
<
check
225 unit check
226 name menam
227 group crs
228 calc op-menam='bowery'$and$crs='iowa'
<
229 op-op+(menam='steve'$and$crs='cornell')
<
230 op-op+(menam='t little'$and$crs='research')
<
231 op-op+((menam='armstrong'$or$menam='dave')$and$crs='pcp')
<
232 op-op+(menam='dave fulle'$and$crs='uimc')
<
-------------------------------------------------------------------- part= 1, block=g --------------------------- resonance
space left = 62
233 *
pray
234 unit pray
235 0pray
236 branch conden>clock,1wait,x
237 branch tactive-300,x,1nob
238 backgnd
239 1nob
240 back pray
241 data1 coord
242 dataop console
243 lab1 pinfo
244 help1 deton
245 help shelp
246 do move
247 do vf,x,setup
248 do screen
249 do teams
250 do planets
251 do matt
252 do shodata,x,console,x
253 calc wb(sno)-0
<
254 doto 1,i1-0,23
<
255 calc hlp(i1)-hlp(i1)-(hlp(i1)<0)
<
256 1
257 isave-conbase\24+contorp\48
< / /
258 i2-isave/24
<
259 wr-(./2)/(r(i2)+1)
< p
260 phasor-0
<
261 1ag
262 *foregnd
263 at 2353
264 write .
>
265 inhibit erase
266 pause 10,keys=all
267 branch key=timeup$or$key=next,0pray,x
268 keytype c,x,w,d,a,e,c,z,q,m,M,A,O,T,E,I,U,t,h,g,p,l,r,D,P,f,i,s,S,C,j,B,v,W,-,-,+
<
269 branch c,1ag,x
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 8
270 writec c,,+.^-.^-.^+.^-.-.^-.+.^
rv rv tv tv t rv t rv
271 * 0 1 2 3 4 5
272 +.+.^+.-.^magnify^Message^
t rv t rv v v
273 * 6 7 8 9
274 Absolute^Onboard^set.^set.o^system^
v v tv r v v
275 * 10 11 12 13 14
276 unset^transport^
v v
277 * 15 16
278 help^goal^KILL^load^
v v v v
279 * 17 18 19 20
280 repair^Data^photonset^fieldset^intrateam^SHOOT^
v v v v v v
281 * 21 22 23 24 25 26
282 setphasor^Cursor^jump^bullseye^distance^
v v v v v
283 * 27 28 29 30 31
284 Mag. With<a,(magwarp$diff$1)\'out'> Warp^
( / ) v
285 * 32
286 decelerate,cruise,accelerate
287 * 33 34 35
288 branch c-1,x,1rm,1tm,1tp,1rm,1tm,x,1tp,1s
289 1rp finro-finro+wr
<
290 branch c=6,1tp,0pray
291 1rm finro-finro-wr
<
292 branch c=4,1tm,0pray
293 1tp fthta-fthta+wr
<
294 branch c=7,1rm,0pray
295 1tm fthta-fthta-wr
<
296 branch c=5,1rp,0pray
297 1s branch c-8,0pray,x,x,x,0onbord,x,x,x,x,x,x,x,x,x,x,0view,x,x,x,x,x,x,x,x,x,0mw,0ac
298 help1
299 do c-8,x,mag,allmess,abso,x,sethta,setro,sys,unset,trans,shelp,setgoal,phot,load,rep,x,photset,setf,mess,
300 shoot,setphas,cursor,jump,bullseye,range,x
301 endarrow
302 branch 0pray
303 0view shodata-shodata$diff$1
<
304 branch 0pray
305 0onbord vf-0
<
306 branch 0pray
307 0mw magwarp-magwarp$diff$1
<
308 branch 0pray
309 0ac accel(i2)-c-34
<
310 branch 0pray
311 1wait
312 jump wait
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 9
-------------------------------------------------------------------- part= 2, block=a --------------------------- bsubs
space left = 26
wait
314 unit wait
315 jump station=bstat,backoff,x
316 calcs sno,hlp(sno)-,-3
<
317 jumpout spahelp,wait
shoteam
318 unit shoteam
319 doto 2,i1-0,3
<
320 at i1\800+1510+(i1>1)1575
/
321 write <s,i1+1>.
( )
322 at where
323 writec i1,,Aggstroms,Fouriers,Diffractions,Lasers
324 write ?
325 doto 1,i2-0,5
<
326 branch xoc(i2+i1\6)-.,x,1,x
/ p
327 write ?*<a,pnam(i2+i1\6),20>
( / )
328 branch sno,1,x
329 writec warn(type,i1\6+i2)-1,, *
/
330 1
331 2
coord
332 unit coord
333 erase abort
334 at 3120
335 write -STOP- to quit listing
336 data coord
337 data1 tswitc
338 at 125
339 writec tswit/6-1,Aggstroms,Fouriers,Diffractions,Lasers
340 writec ally(type,tswit/6)-1, (Nonallied), (Allied)
341 draw 0,495;511,495
342 at 201
343 doto 1,i1-tswit,tswit+5
<
344 branch key-stop,x,1ar,x
345 branch xoc(i1)=.,1,x
p
346 write ? <a,pnam(i1),20> = <a,nam(i1)><at,350,wherey>base# <s,i1-tswit+1>
( ) ( )( ) ( )
347 writec warn(type,tswit+i1)-1,, ***
348 at 0,wherey-16
349 showt xoc(i1)-x,9
350 showt yoc(i1)-y,9
351 showt zoc(i1)-z,9
352 branch dam(i1+24),1des,x
353 showt xoc(i1+24)-x,16
354 showt yoc(i1+24)-y,9
355 showt zoc(i1+24)-z,9
356 1des
357 write ? repair <t,dam(i1),3.2>
( )
358 writec dam(i1+24), DESTROYED,repair <t,dam(i1+24)/100,3.2>
( )
359 write ?
360 branch tswit-type\6,1nt,x,1nt
/
361 write fuel <t,ae(i1),15>
( )
362 writec dam(i1+24),,fuel <t,ae(i1+24),15>
( )
363 1nt
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 10
364 write ?
365 draw 0,wherey+8;511,wherey+8
366 1
367 at where+97
368 writec tswit/6-1,\abc?\def\,\ghi?\jkl\,\mno\?\pqr\,\\\stu?\vwx
369
370 1ar
371 mode rewrite
372 at 3112
373 write -BACK-, -DATA-, -DATA1- and -NEXT- are active
374 pause keys=funct
375 branch key-next,1ar,x,1ar
376 calc tswit--(tswit+6)\(tswit/18)
< / =
377 jump coord
tswitc
378 unit tswitc
379 data tswitc
380 data1 whazzat
381 do shoteam
382 at 1010
383 write What team would you like to see?
384 arrow where+1
385 long 1
386 match i1,1,2,3,4
387 judge i1,ignore,x
388 endarrow
389 calc tswit-i1\6
< /
390 jump coord
ranplan
391 unit ranplan
392 doto 1check,i1-0,23
<
393 goto hlp(i1)<0,q,x
394 1check
395 doto 00,i1-0,23
<
396 xoc(i1)-.
<p
397 00
398 doto 1,i1-0,3
<
399 ppop(i1)-10&7
<
400 psol(i1)-.3
<
401 pskil(i1)-.3
<
402 pae(i1)-(pmat(i1)-10&1&0)/100
< <
403 revolt(i1)-clock
<
404 ally(i1,i1)-1
<
405 doto 2,i2--1,1
<
406 randu wx1,10&6\4
/
407 calc wx1-(wx1-10&6\2)
< /
408 calcc i2,pox(i1)-wx1,poy(i1)-wx1,poz(i1)-wx1
< < <
409 2
410 1
411 calc pox(4)-pox(1)\1000
< /
412 poy(4)-poy(2)\1000
< /
413 poz(4)-poz(3)\1000
< /
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 11
-------------------------------------------------------------------- part= 2, block=b --------------------------- move/setup
space left = 65
move
415 unit move
416 calc isave-conbase\24+contorp\48
< / /
417 i2-isave/24
<
418 do (wx1-dam(sno)+fld(sno)+dam(sno+24)+fld(sno+24))-lasd,flash,x
<
419 calc lasd-wx1
<
420 branch ae(sno+isave)-1,1nof,x
421 calcs abs(finro-ro)<wr,ro-finro,,
<
422 calcs abs(fthta-thta)<wr,thta-fthta,,
<
423 calc ro-ro+wr\sign(finro-ro)
< /
424 thta-thta+wr\sign(fthta-thta)
< /
425 1nof finro-360.frac(finro/360.)
< o o
426 fthta-360.frac(fthta/360.)
< o o
427 ro-360.frac(ro/360.)
< o o
428 thta-360.frac(thta/360.)
< o o
429 sro-srot(i2)-sin(90.-ro)
< < o
430 sth-stht(i2)-sin(thta)
< <
431 cro-crot(i2)-cos(90.-ro)
< < o
432 cth-ctht(i2)-cos(thta)
< <
433 branch isave-1,x,1ns
434 snr(sno)-sro
<
435 snt(sno)-sth
<
436 csr(sno)-cro
<
437 cst(sno)-cth
<
438 1ns
movmore
439 entry movmore
440 calc i2--1
<
441 doto 1m,i1-0,48,24
<
442 i2-i2+1
<
443 calcs i2-1,tz-1,10,.1
<
444 calcs i2-1,ty-2,10,1
<
445 branch ae(sno+i1)<0$and$exist(i2),x,1ok
446 do movdest
447 1ok branch exist(i2)-1,1m,x
448 branch i1-48,x,1tps
449 randu wx1
450 branch dam(sno+i1)-dam(sno+i1)-wx1\r(i2)/10000000,x,1tps
< /
451 do movdest
452 branch 1m
453 1tps
454 warp(i2)-max(warp(i2)+accel(i2),0)
<
455 r(i2)-10**(warp(i2)/ty)
<
456 dist-dist\(magwarp$diff$1)+sqrt(r(i2))\magwarp
< / /
457 ae(sno+i1)-ae(sno+i1)-(tz\10000)\abs(accel(i2))
< / /
458 1ae branch ae(sno+i1),x,1mv
459 do movdest
460 branch 1m
461 1mv
462 xoc(sno+i1)-xoc(sno+i1)+crot(i2)\ctht(i2)\r(i2)
< / /
463 yoc(sno+i1)-yoc(sno+i1)+crot(i2)\stht(i2)\r(i2)
< / /
464 zoc(sno+i1)-zoc(sno+i1)+srot(i2)\r(i2)
< /
465 1m
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 12
466 x-xoc(sno+isave)
<
467 y-yoc(sno+isave)
<
468 z-zoc(sno+isave)
<
469 1var
470 do x-.,x,destme,x
p
471 calcs vf,dirflg-1,1+2((ro<0$and$ro>-180.)$or$ro>180.),1
< o o
setup1
472 unit setup1
473 calc cx-vpx-ox
<
474 cy-vpy-oy
<
475 cz-vpz-oz
<
476 vdist-sqrt(cx\cx+cy\cy+cz\cz)
< / / /
477 cx-cx/vdist
<
478 cy-cy/vdist
<
479 cz-cz/vdist
<
480 rs3-1/sqrt(1-cz\cz)
< /
481 vpx-ox+dist\cx
< /
482 vpy-oy+dist\cy
< /
483 vpz-oz+dist\cz
< /
setup
484 unit setup
485 zero v9,12
486 block x,ox,3
487 calc vpx-vpy-vpz-0
< < <
488 wx1-magdir\5\cro
< / /
489 vpz-magdir\5\sro+oz
< / /
490 vpx-wx1\cth+ox
< /
491 vpy-wx1\sth+oy
< /
492 do setup1
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 13
-------------------------------------------------------------------- part= 2, block=c --------------------------- setplots
space left = 45
screen
494 unit screen
495 erase abort
496 draw 511,160;1,160;1,510;511,510;511,160
497 branch vf,1sk,x
498 at x00-3,y00-8
499 write +
500 writec phasor,,,
501 <at,x00-12,y00>\WYZ?\UXV
( )
502 1sk
503 window 0,160;510,510
movdest
504 unit movdest
505 calc ae(sno+i1)--1
<
506 i3-isave
<
507 isave-i1
<
508 do destme
509 calc isave-i3
<
teams
510 unit teams
511 doto 1,i1-0,18,6
<
512 allied-ally(type,i1/6)
<
513 doto 2,i2-0,5
<
514 i3-0
<
515 *i3=0.ship =24.base =48.torp
= = =
516 1again tx-(x1-xoc(isave-i1+i2+i3))-ox
< < <
517 branch x1=.$and$i3=0,2,x
p
518 branch x1-.,x,1obj,x
p
519 ty-(y1-yoc(isave))-oy
< <
520 tz-(z1-zoc(isave))-oz
< <
521 branch (wx1-(tx\tx+ty\ty+tz\tz))-1,1obj,x
< / / /
522 wx1-sqrt(wx1)
<
523 branch i3=24,x,1bs
524 wb(i1+i2)-abs(wb(i1+i2)$or$(not(allied)$and$wx1<20000))
<
525 1bs wr-(cx\tx+cy\ty+cz\tz)/wx1
< / / /
526 branch wr_vr,1obj,x
<
527 branch ae(isave),1expl,x
528 branch phasor$and$wr>0$and$not(allied),x,0p
529 branch ((1-wr\wr)\wx1\wx1)_(pd-basz(i3=24))&2,x,0p
/ / / <
530 at 2320
531 write HIT^ ^
532 branch i3-48,x,1td
533 i6-ppow/(log(abs(wx1)+1)+pd'&1.7'!)
<
534 branch fld(isave)-i6,x,x,1stf
535 calc dam(isave)-dam(isave)+(fld(isave)-i6)/10&5
<
536 fld(isave)-0
<
537 at 2301
538 write Shields Down?Shields Down
539 branch 0sft
540 1stf i5-100(fld(isave)-i6)/fld(isave)
<
541 i5-100-i5
<
542 fld(isave)-fld(isave)-i6
<
543 randu i6,10\i5
/
lesson xspasim at 7:31 pm on thursday, december 22, 2022 page 14
544 calc dam(isave)-dam(isave)-i5/10
<
545 0sft
546 branch dam(isave),x,0p
547 dam(isave)--1
<
548 1td
549 do flashdes
550 branch 1obj
551 1expl
552 ae(isave)-(clock-fld(isave))<5
<
553 do explode
554 calc xoc(isave)-xoc(isave)\(-ae(isave))-not(ae(isave)).
< / p
555 branch 1obj
556 0h
557 at 2301
558 write power=<z,i6> unit hit on shields
( )
559 at 2301
560 write <m,e>power=<z,i6> unit hit on shields
( ) ( )
561 0p
562 branch i3-24,x,1b
563 i4-(-(i1=0)15-(i1=6)20-(i1=12)20-(i1=18)20)
<
564 pnt--((i1=0)varloc(ts)+(i1=6)varloc(ks)+(i1=12)varloc(rs)+(i1=18)varloc(as))
<
565 branch 1go
566 1b branch (i3=48),1t,x
567 i4-24
<
568 pnt--((i1=0)varloc(tb)+(i1=6)varloc(kb)+(i1=12)varloc(rb)+(i1=18)varloc(ab))
<
569 branch 1go
570 1t
571 i4-4 $$number of points on a torp
<
572 pnt-varloc(tp)
<
573 1go
574 do create
575 1obj branch i3-48,x,2
576 i3-24+i3
<