-
Notifications
You must be signed in to change notification settings - Fork 1
/
Merp_specify_players.bas
1287 lines (1287 loc) · 48.7 KB
/
Merp_specify_players.bas
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
1 CLOCK=0
2 PRINT "Press a key to start"
3 IF INKEY$<>"" THEN RANDOMIZE (CLOCK):CLS:GOTO 10
4 CLOCK = CLOCK+1
5 IF CLOCK >32000 THEN CLS:GOTO 1
6 GOTO 3
10 REM Character setup
15 TOTALPLAY=9
20 MMC=80:HPC=228:DBC=50:SHC=0:OB1C=65:OBT1C=91:OB2C=65:OBT2C=91
21 FORM=1
22 DIM ALLNAM$(TOTALPLAY): DIM PLAYLIST(TOTALPLAY)
23 RESTORE 9900
24 FOR Z = 1 TO TOTALPLAY: READ D$: ALLNAM$(Z) = D$: NEXT Z
25 FOR Z = 1 TO TOTALPLAY
26 CLS: PRINT "Input players for this session, or 0 to exit"
27 FOR Y = 1 TO TOTALPLAY: REM Loop through all possible players and print
28 SELECT$ = ""
29 FOR X = 1 TO Z: REM Loop through all selected players and check against this player
30 IF PLAYLIST(X) = Y THEN SELECT$ = " (Selected)"
31 NEXT X
32 PRINT Y; ". ";ALLNAM$(Y);" ";SELECT$
33 NEXT Y
34 INPUT "Select player"; I
35 FOR Y = 1 TO (Z-1)
36 IF PLAYLIST(Y) = I THEN PRINT "Character has already been input. Hit Enter to try again": INPUT I: GOTO 26
37 NEXT Y
38 IF I < 0 OR I > TOTALPLAY THEN PRINT "Out of range. Hit Enter to try again": INPUT I: GOTO 26
39 IF I = 0 AND Z = 1 THEN PRINT "Must input one player. Hit Enter to try again": INPUT I: GOTO 26
40 IF I = 0 THEN Z = Z - 1: GOTO 50
41 PLAYLIST (Z) = I
45 NEXT Z
46 Z = Z - 1
50 CHARACNO = Z: PLAYNO = Z
60 TOTALLVL = 0: RESTORE 9905: REM Calculate average level
61 FOR Z = 1 TO TOTALPLAY: READ D: TOTALLVL = TOTALLVL + D: NEXT Z
62 AVGLVL = (TOTALLVL / TOTALPLAY)
105 DIM EP (PLAYNO,10)
106 DIM CEXP(30,PLAYNO)
107 DIM TOTEXP(PLAYNO)
109 DIM KLL(25,10):DIM KP(PLAYNO)
110 DIM NAM$(25)
111 DIM LVL (25):DIM SIZE(25)
112 DIM AT (25)
113 DIM DB (25)
114 DIM SH (25)
116 DIM OB1 (25)
117 DIM OBT1 (25)
118 DIM OB2 (25)
119 DIM OBT2 (25)
120 DIM MM (25)
121 DIM HITS (30): DIM HLEFT(PLAYNO)
122 DIM INIT (30): DIM INITB (PLAYNO)
123 DIM COMB (30):DIM CORR(30)
124 DIM TAR(10):DIM RMOD(10):DIM HASTE(30)
125 DIM DAM(25)
126 DIM OB(25):DIM ATT(25)
127 DIM HRD(25):DIM SIAT(PLAYNO)
128 DIM STUN(25):DIM SIA(11)
129 DIM SUB(25):DIM MUL(11)
130 DIM INJ$(25):DIM OOC(25)
131 DIM CRITICAL (2,8): DIM CRIT$(2): DIM KILLED(25)
134 REM Loop through the list of player IDs specified. For each, use this as an index into the character info database to extract the information for each character.
135 FOR Z = 1 TO PLAYNO: REM Index that we are filling in
140 P = PLAYLIST(Z): REM: Index that we are reading from
145 RESTORE 9900: REM Character name
146 FOR Y = 1 TO P: READ D$: NEXT Y
147 NAM$(Z) = D$
150 RESTORE 9905: REM Character level
151 FOR Y = 1 TO P: READ D: NEXT Y
152 LVL(Z) = D
155 RESTORE 9910: REM Character armour type
156 FOR Y = 1 TO P: READ D: NEXT Y
157 AT(Z) = D
160 RESTORE 9915: REM Character DB
161 FOR Y = 1 TO P: READ D: NEXT Y
162 DB(Z) = D
165 RESTORE 9920: REM Character hits
166 FOR Y = 1 TO P: READ D: NEXT Y
167 HITS(Z) = D
168 HLEFT(Z) = D
170 RESTORE 9925: REM Character shield bonus
171 FOR Y = 1 TO P: READ D: NEXT Y
172 SH(Z) = D
175 RESTORE 9935: REM Character primary OB
176 FOR Y = 1 TO P: READ D: NEXT Y
177 OB1(Z) = D
180 RESTORE 9940: REM Character primary weapon type
181 FOR Y = 1 TO P: READ D: NEXT Y
182 OBT1(Z) = D
185 RESTORE 9945: REM Character missile weapon
186 FOR Y = 1 TO P: READ D: NEXT Y
187 OB2(Z) = D
190 RESTORE 9950: REM Character missile weapon type
191 FOR Y = 1 TO P: READ D: NEXT Y
192 OBT2(Z) = D
195 RESTORE 9955: REM Character MM bonus
196 FOR Y = 1 TO P: READ D: NEXT Y
197 MM(Z) = D
200 RESTORE 9960: REM Character XP
201 FOR Y = 1 TO P: READ D: NEXT Y
202 TOTEXP(Z) = D
205 RESTORE 9965: REM Character initiative bonus
206 FOR Y = 1 TO P: READ D: NEXT Y
207 INITB(Z) = D
210 SIZE(Z) = 1
215 NEXT Z
220 CHARAC = PLAYNO + 1
225 LASTSAVED = 0
300 INPUT "Load backup position (default N)";I$
310 IF I$ = "y" OR I$ = "Y" THEN CHAIN "backup",100, ALL
489 IF ERM=1 THEN GOTO 11895
500 RANDOMIZE TIMER:REM Tactical Menu
505 CLS:PRINT ,,"Tactical Menu"
510 PRINT,,"Choose an action"
515 PRINT "1. Melee Combat (including traps)"
516 PRINT "2. Missile Combat"
520 PRINT "3. Input new character"
525 PRINT "4. Delete character"
530 PRINT "5. Damage Record Sheet"
531 PRINT "6. End of round"
532 PRINT "7. Moving maneuvers"
533 PRINT "8. Base Spell attacks"
534 PRINT "9. Bolt/Ball attacks"
535 PRINT "10. Static maneuvers"
536 PRINT "11. Beornas shape-changing"
537 PRINT "12. Strategic menu"
538 PRINT "13. Experience points"
539 PRINT "14. Resistance rolls"
540 PRINT "15. Criticals"
541 PRINT "16. Save position"
542 PRINT "17. Load position"
550 INPUT I
551 ON I GOTO 580,590,4005,4100,5000,5500,6000,7000,8000,6500,6850,6900,10000,4300,9000,10100,10200
570 GOTO 550
580 CHAIN "combat",1000,ALL
590 CHAIN "combat",1500,ALL
4000 CHAIN "characal",4000,ALL
4005 CHAIN "characal",4005,ALL
4100 CHAIN "characal",4100,ALL
4300 REM Resistance Rolls
4305 CLS:FOR Z=1 TO 30:IF NAM$(Z)="" THEN GOTO 4320
4310 PRINT Z,NAM$(Z)
4315 NEXT Z
4320 INPUT "Who is resisting the effect";I
4325 D=I
4330 DEFLVL=LVL(I)
4340 INPUT "What is the attack level";I:ATTLVL=I
4345 RMOD=0
4350 INPUT "Is target willing";I$:IF I$="y" THEN RMOD=-50
4360 INPUT "Any modifiers (positive favours target";I:RMOD=RMOD+I
4370 GOTO 7615
4400 GOTO 4500
4405 FOR Z=1 TO CHARACNO
4410 IF KLL(Z)=0 THEN GOTO 4415
4411 NEXT Z
4415 X=Z
4416 V=1
4420 FOR Z=1 TO X-1
4421 Y=KLL(Z):FOR J=1 TO CHARACNO:SCRI=KD(J):IF SCRI=0 THEN NEXT J
4422 FOR J=1 TO CHARACNO:KP(Y)=KP(Y)-CEXP(SCRI,J):IF KD(J)=KD(Y) AND J<>Y THEN V=V+1
4423 NEXT J
4424 IF KP(Y)<50 THEN KP(Y)=50
4425 PRINT Y;NAM$(Y)" was awarded ";INT(KP(Y)/V);" experience points"
4430 EP(Y,3)=EP(Y,3)+INT(KP(Y)/(X-1))
4431 EP(Y,8)=EP(Y,8)+INT(KP(Y)/(X-1))
4435 NEXT Z
4440 FOR Z=1 TO CHARACNO
4445 CEXP(SCRI,Z)=0
4449 NEXT Z
4450 W=0:SCRI=0
4455 PRINT "Press a key to continue"
4456 IF INKEY$="" THEN GOTO 4456
4460 RETURN
4500 REM Kill points
4505 FOR Z=1 TO CHARAC-1
4510 IF KLL(Z,1)<>0 THEN GOTO 4515
4511 NEXT Z
4515 A=1
4520 IF KLL(Z,A)=0 THEN GOTO 4526
4525 A=A+1:GOTO 4520
4526 A=A-1
4530 FOR X=1 TO A
4535 K=KLL(Z,X):IF K>CHARACNO THEN GOTO 4560
4540 FOR J=1 TO CHARACNO:KP(K)=KP(K)-CEXP(Z,J):NEXT J
4545 IF KP(K)<50 THEN KP(K)=50
4550 PRINT K; NAM$(K)" was awarded ";INT (KP(K)/A);" experience points"
4555 EP(K,3)=EP(K,3)+INT (KP(K)/(A))
4560 NEXT X
4561 FOR Y=1 TO CHARACNO
4562 CEXP(Z,Y)=0
4563 NEXT Y
4570 Z=Z+1:IF Z>CHARAC THEN GOTO 4575
4575 FOR Z=1 TO CHARAC:FOR X=1 TO PLAYNO
4576 KLL(Z,X)=0:NEXT X:NEXT Z
4580 PRINT "Press a key to continue"
4581 W=0
4585 IF INKEY$="" THEN GOTO 4585
4590 RETURN
5000 CHAIN "damrecrd",5000,ALL
5500 CHAIN "endround",5500,ALL
5510 ENDROUND = 1: GOTO 5550
5520 GOTO 500
5549 STOP
5550 REM Make backup at end of round or moving to strategic menu
5560 CHAIN "backup", 10, ALL
5570 IF ENDROUND = 1 THEN GOTO 500 ELSE GOTO 6920
5800 LOCATE 24,1:INPUT "Press enter to return to menu";I
5801 CLS:GOTO 500
6000 REM Moving Maneuvers
6005 CLS: FOR Z=1 TO 30
6006 IF NAM$(Z)="" THEN GOTO 6015
6010 PRINT Z,NAM$(Z)
6011 IF STUN(Z)>0 THEN LOCATE Z,35:PRINT "Stunned"
6012 IF OOC(Z)=1 THEN LOCATE Z,45:PRINT "Out of action"
6013 IF OOC(Z)=2 THEN LOCATE Z,45:PRINT "Unconscious/dead"
6014 NEXT Z
6015 INPUT "Who is performing the maneuver";I
6016 M=I
6020 IF OOC(I)=2 THEN PRINT NAM$(I);" may not perform maneuvers":GOTO 6300
6021 MD=0
6025 IF STUN(M)>0 THEN MD=-50
6030 PRINT "Does ";NAM$(M);" have one limb out?":INPUT I$:IF I$="y" THEN MD=MD-30
6031 PRINT "Is ";NAM$(M);" down?":INPUT I$:IF I$="y" THEN MD=MD-70
6035 PART=0
6040 INPUT "Can the maneuver be partially completed";I$:IF I$="y" THEN PART=1
6050 CLS
6055 PRINT "Enter difficulty of maneuver"
6056 PRINT "Routine - 1"
6057 PRINT "Easy - 2"
6058 PRINT "Light - 3"
6059 PRINT "Medium - 4"
6060 PRINT "Hard - 5"
6061 PRINT "Very hard - 6"
6062 PRINT "Extremely hard - 7"
6063 PRINT "Sheer folly - 8"
6064 PRINT "Absurd - 9"
6065 INPUT DIFF:IF DIFF<>INT (DIFF) OR DIFF>9 THEN GOTO 6065
6070 INPUT "Any other modifiers (positive increases chance of success)";I:MD=MD+I
6071 INPUT "What is skill bonus";I:MD=MD+I
6072 INPUT "What is roll";I:IF I<>0 THEN ROLL=I:GOTO 6074
6073 GOSUB 9810
6074 ROLL=ROLL+MD
6075 ON DIFF GOTO 6080,6085,6090,6095,6100,6105,6110,6115,6120
6080 CHAIN "mmaneuvr",20005,ALL
6085 CHAIN "mmaneuvr",20010,ALL
6090 CHAIN "mmaneuvr",20015,ALL
6095 CHAIN "mmaneuvr",20020,ALL
6100 CHAIN "mmaneuvr",20025,ALL
6105 CHAIN "mmaneuvr",20030,ALL
6110 CHAIN "mmaneuvr",20035,ALL
6115 CHAIN "mmaneuvr",20040,ALL
6120 CHAIN "mmaneuvr",20045,ALL
6150 IF PART=1 THEN GOTO 6200
6160 IF SCORE>=100 THEN GOTO 6170
6165 IF SCORE>(RND*100) THEN SCORE=100
6170 IF SCORE>100 THEN GOTO 6180
6175 IF SCORE=100 THEN GOTO 6177
6176 PRINT "The maneuver was not completed":GOTO 6410
6177 PRINT "The maneuver was completed":GOTO 12500
6178 GOTO 6410
6180 PRINT "The maneuver was completed, with ";SCORE-100;"% activity remaining":GOTO 12510
6185 GOTO 6410
6200 PRINT "The maneuver was ";SCORE;"% completed":IF SCORE>=100 THEN GOTO 12520
6410 RANDOMIZE TIMER
6420 PRINT "Press a key to return"
6425 IF INKEY$="" THEN GOTO 6425
6430 IF TWEAP=1 THEN TWEAP=0:GOTO 2510
6431 IF OBMAN=1 THEN OBMAN=0:OBMOD=SCORE/100:GOTO 2078
6432 IF ERM=1 THEN GOTO 11895
6435 CLS:GOTO 500
6500 REM Static maneuvers
6501 CLS
6505 FOR Z=1 TO 30
6506 IF NAM$(Z)="" THEN GOTO 6520
6510 PRINT Z,NAM$(Z)
6511 IF STUN(Z)>0 THEN LOCATE Z,35:PRINT "Stunned"
6512 IF OOC(Z)=1 THEN LOCATE Z,45:PRINT "Out of action"
6513 IF OOC(Z)=2 THEN LOCATE Z,45:PRINT "Unconscious/dead"
6515 NEXT Z
6520 X=1
6525 INPUT "Who is performing the maneuver";I
6526 IF I=0 THEN GOTO 6540
6530 IF OOC(Z)=1 THEN INPUT "Can he do this maneuver in his current state";I$:IF I$="y" THEN GOTO 6535
6532 IF OOC(Z)=2 THEN PRINT NAM$(Z);" is unconscious and may not perform a maneuver":GOTO 6525
6535 COMB(X)=I:X=X+1:GOTO 6525
6540 CLS
6545 PRINT "Enter the type of maneuver"
6550 PRINT "General - 1"
6551 PRINT "Interaction and Influence - 2"
6552 PRINT "Disarming Traps/Picking Locks - 3"
6553 PRINT "Reading Runes/Using Items - 4"
6554 PRINT "Perception/Tracking - 5"
6555 PRINT "Pursuit - 6"
6560 INPUT I:IF I<>INT (I) OR I>6 OR I<1 THEN GOTO 6560
6561 TYPE=I
6565 X=1
6569 IF TYPE=4 THEN GOTO 6600
6570 PRINT "Select difficulty for this maneuver"
6572 PRINT "Routine - 1"
6574 PRINT "Easy - 2"
6576 PRINT "Light - 3"
6578 PRINT "Medium - 4"
6580 PRINT "Hard - 5"
6582 PRINT "Very Hard - 6"
6584 PRINT "Extremely Hard - 7"
6586 PRINT "Sheer Folly - 8"
6588 PRINT "Absurd - 9"
6590 INPUT I:IF I<>INT (I) OR I<1 OR I>9 THEN GOTO 6590
6591 DIFF=I
6592 RESTORE 6599
6593 READ I:READ DF:IF DIFF>I THEN GOTO 6593
6599 DATA 1,30,2,20,3,10,4,0,5,-10,6,-20,7,-30,8,-50,9,-70
6600 A=COMB(X):M=COMB(X)
6601 MD=MD+DF
6602 PRINT NAM$(A);" will attempt the maneuver"
6604 IF STUN(A)>0 THEN MD=MD-50
6605 ON TYPE GOTO 6610,6640,6670,6700,6730,6760
6610 INPUT "What is the relevant skill bonus";I:MD=MD+I
6620 CHAIN "smaneuvr",20005,ALL
6640 INPUT "Is audience personally loyal or devoted to the character";I$:IF I$="y" THEN MD=MD+50
6645 INPUT "Is audience under hire to the character";I$:IF I$="y" THEN MD=MD+20
6650 INPUT "What is the skill bonus for influence and interaction";I:MD=MD+I
6660 CHAIN "smaneuvr",20010,ALL
6670 INPUT "What is the skill bonus for picking locks/disarming traps";I:MD=MD+I
6680 CHAIN "smaneuvr",20015,ALL
6700 INPUT "What is the spell level (if applicable)";I:MD=MD-I
6705 INPUT "Is the spell realm different from the character's";I$:IF I$="y" THEN MD=MD-30
6710 INPUT "Does the character know what the spell or ability is";I$:IF I$="y" THEN MD=MD+20
6711 IF I$="n" THEN MD=MD-10
6715 INPUT "Can the character cast the spell intrinsically";I$:IF I$="y" THEN MD=MD+30
6720 INPUT "What is the skill bonus for reading runes/using items";I:MD=MD+I
6725 CHAIN "smaneuvr",20020,ALL
6730 INPUT "Is the character specifically looking for this information";I$:IF I$="y" THEN MD=MD+20
6735 INPUT "What is the skill bonus for perception/tracking";I:MD=MD+I
6740 CHAIN "smaneuvr",20025,ALL
6760 INPUT "Is the pursued group aware of the pursuit";I$:IF I$="n" THEN GOTO 6770
6765 INPUT "What is the tracking bonus of one character in pursuing group";I:MD=MD+I
6766 INPUT "What is the tracking bonus of one character in pursued group";I:MD=MD-I:GOTO 6775
6770 INPUT "What is the tracking bonus of one character in pursuing group";I:MD=MD+I+40
6780 CHAIN "smaneuvr",20030,ALL
6800 RANDOMIZE TIMER:CLS
6805 PRINT NAM$(A);" had the following maneuver result"
6810 PRINT M$
6811 MD=0
6812 IF SUC=1 THEN GOTO 12530
6815 PRINT:PRINT "Press a key to continue"
6816 IF INKEY$="" THEN GOTO 6816
6820 X=X+1
6821 IF COMB(X)<>0 THEN GOTO 6600
6822 FOR Z=1 TO 25
6823 COMB(Z)=0
6824 NEXT Z
6830 GOTO 500
6850 CHAIN "beornas",6850,ALL
6900 FOR Z=1 TO 25
6901 IF HRD(Z)>0 THEN GOTO 6940
6902 NEXT Z
6910 ENDROUND = 0: GOTO 5550
6920 CHAIN "merpstra",100,ALL
6940 CLS:PRINT Z;NAM$(Z);" is still bleeding. You may not go to the strategic menu."
6941 PRINT "To use the strategic menu, stop the bleeding or delete the character"
6942 PRINT
6945 PRINT "Press a key to return to the Tactical menu"
6946 IF INKEY$="" THEN GOTO 6946
6947 GOTO 500
7000 REM Base Spell attacks
7001 ITEM=0
7005 CLS:PRINT "Base Spell attacks"
7010 FOR Z=1 TO 30:IF NAM$(Z)="" THEN GOTO 7050
7020 PRINT Z,NAM$(Z)
7025 IF OOC(Z)=1 THEN LOCATE Z+1,45:PRINT "Out of combat"
7026 IF OOC(Z)=1 THEN LOCATE Z+1,45:PRINT "Unconscious/dead"
7027 IF STUN(Z)>0 THEN LOCATE Z+1,35:PRINT "Stunned"
7030 NEXT Z
7050 PRINT "Enter the character casting spell (if the spell is cast from an item, type";Z;")"
7051 INPUT I
7055 IF NAM$(I)="" AND I<>Z THEN GOTO 7050
7056 IF STUN(I)=1 OR OOC(I)>0 THEN INPUT "Is the spell subconscious?";I$:IF I$="y" THEN GOTO 7060
7057 IF STUN (I)>0 OR OOC(I)=2 THEN PRINT NAM$(I);" may not cast.":GOTO 5800
7058 IF OOC(I)=1 THEN MOD=-30
7059 IF I=Z THEN ITEM=1
7060 ATTLVL=LVL(I):S=I
7065 INPUT "If there is a single target for this spell, input now"; I: IF I<>0 THEN NUMDEFENDERS = 1: TAR(1) = I: GOTO 7075
7070 FOR I = 1 TO 10
7071 INPUT "Enter target, or zero to end loop"; TARGET: IF TARGET = 0 THEN GOTO 7075
7072 TAR(I) = TARGET: NUMDEFENDERS = NUMDEFENDERS + 1: NEXT I
7075 REM Attack Roll
7076 PREP = 2
7077 IF ITEM = 0 THEN INPUT "How many rounds preparation (instantaneous = 2)"; PREP
7078 IF PREP>4 THEN PREP = 4
7080 TOTALMOD = 0: RESTORE 7155
7085 READ ROUNDS: READ PREPMOD: IF ROUNDS = PREP THEN TOTALMOD = TOTALMOD + PREPMOD: GOTO 7090
7086 GOTO 7085
7090 PRINT "Preparation modifier "; PREPMOD
7095 INPUT "What is attacker's Base Spell bonus"; I: TOTALMOD = TOTALMOD + I
7100 INPUT "What is spell level"; I: TOTALMOD = TOTALMOD - I: LVL = I
7101 IF ITEM = 1 THEN LVL = I
7102 IF I>LVL(S) THEN TOTALMOD = TOTALMOD - (2 * (I - LVL(S)))
7110 INPUT "What is spell realm - 1 = Essence, 2 = Channeling, 3 = Mentalism"; I: REALM = I
7115 INPUT "What is Risk Factor"; I: RISK = I
7120 PRINT "Total modifier for attacker is "; TOTALMOD
7125 INPUT "What is attack roll (zero to roll randomly)"; I
7130 IF I = 0 THEN I = INT ((RND * 100) + .5)
7135 ROLL = I
7136 IF ROLL < 1 THEN ROLL = 1
7137 IF ROLL > 100 THEN ROLL = 100
7145 PRINT "Spell casting roll is "; ROLL
7150 DATA 0,30,10,10,50,0,100,-10,300,-20,10000,-30
7155 DATA 0,-30,1,-15,2,0,3,10,4,20
7160 DEFENDERCOUNT = 1
7165 RMOD = 0: TARG = TAR(DEFENDERCOUNT): IF NAM$(TARG) = "" THEN TARG = 0: D = 0: DEFLVL = 0: PRINT "Unnamed target": GOTO 7200
7170 D = TARG: DEFLVL = LVL (D): PRINT: PRINT "Determine modifiers for ";NAM$(D)
7172 RMOD = 0
7175 INPUT "What is spell range"; RANGE
7176 RESTORE 7150
7177 READ I: READ J: IF RANGE > I AND J > -30 THEN GOTO 7177
7178 RMOD = RMOD + J
7180 INPUT "Does target have cover - 1=part, 2=full";I
7184 RMOD = RMOD - (10 * I)
7185 IF I=0 THEN INPUT "Is target static";I$:IF I$="y" THEN RMOD = RMOD + 10
7190 INPUT "Any other modifiers (positive benefits caster)";I: RMOD = RMOD + I
7200 IF TARG = 0 THEN MTYPE = 3: GOTO 7250
7205 IF REALM=1 AND AT(D)>12 THEN MTYPE=1:GOTO 7250
7210 IF REALM=1 AND AT(D)>4 THEN MTYPE=2:GOTO 7250
7215 IF REALM=1 THEN MTYPE=3:GOTO 7250
7220 IF REALM=2 AND AT(D)>12 THEN MTYPE=1:GOTO 7250
7225 IF REALM=2 AND SH(D)>0 THEN INPUT "Does target have metal shield";I$
7230 IF REALM=2 AND I$="y" THEN MTYPE=2:GOTO 7250
7235 IF REALM=2 AND I$<>="y" THEN MTYPE=3:GOTO 7250
7240 IF REALM=3 THEN INPUT "Does target have metal helm (1) or leather helm (2)";I
7245 IF I=1 THEN MTYPE=1:GOTO 7250
7246 IF I=2 THEN MTYPE=2:GOTO 7250
7247 MTYPE=3:GOTO 7250
7250 PRINT "Total modifier to roll attacking this target is "; TOTALMOD + RMOD
7251 BASEROLL = ROLL
7255 IF ROLL <= 2 OR ROLL>= 96 THEN GOTO 7265
7260 ROLL = ROLL + TOTALMOD + RMOD
7262 IF ROLL < 3 THEN ROLL = 3
7263 IF ROLL > 95 THEN ROLL = 95
7265 PRINT "Modified attack roll is "; ROLL
7270 ON REALM GOTO 7400,7430,7460
7300 IF D <> 0 THEN RMOD(DEFENDERCOUNT) = RMOD
7301 ROLL = BASEROLL
7305 IF DEFENDERCOUNT < NUMDEFENDERS THEN DEFENDERCOUNT = DEFENDERCOUNT + 1: GOTO 7165
7310 INPUT "Is resistance roll possible/necessary";I$:IF I$="n" THEN GOTO 7675
7315 GOTO 7600
7400 ON MTYPE GOTO 7405,7410,7415
7405 CHAIN "bspell",20000,ALL
7410 CHAIN "bspell",20040,ALL
7415 CHAIN "bspell",20060,ALL
7430 ON MTYPE GOTO 7435,7445,7455
7435 CHAIN "bspell",20200,ALL
7445 CHAIN "bspell",20220,ALL
7455 CHAIN "bspell",20240,ALL
7460 ON MTYPE GOTO 7465,7475,7485
7465 CHAIN "bspell",20260,ALL
7475 CHAIN "bspell",20270,ALL
7485 CHAIN "bspell",20280,ALL
7500 RANDOMIZE TIMER:REM Spell failures
7505 PRINT:PRINT "The spell failed"
7510 PRINT "Input the spell type - "
7511 PRINT "Attack spell (Elemental) - 1"
7512 PRINT "Attack spell (Force) - 2"
7513 PRINT "Non-attack spell (Information) - 3"
7514 PRINT "Non-attack spell (Other) - 4"
7515 INPUT I:IF I=0 OR I>4 THEN GOTO 7515
7520 TYPE=INT (I)
7521 INPUT "Input roll";I
7522 ROLL=I
7523 IF ROLL=0 THEN GOSUB 9800
7524 IF ROLL>300 THEN ROLL=300
7525 ON TYPE GOTO 7540,7545,7550,7555
7540 CHAIN "spfail",20005,ALL
7545 CHAIN "spfail",20006,ALL
7550 CHAIN "spfail",20007,ALL
7555 CHAIN "spfail",20008,ALL
7560 RANDOMIZE TIMER:PRINT "Press a key to continue"
7565 IF INKEY$="" THEN GOTO 7565
7570 GOTO 500
7600 DEFENDERCOUNT = 1: SUCCESS = 0:REM Resistance rolls
7601 RANDOMIZE TIMER: TARG = TAR(DEFENDERCOUNT): D = TARG: RMOD = RMOD(DEFENDERCOUNT)
7602 PRINT: PRINT "Resistance roll for "; NAM$(D)
7603 PRINT "Base resistance roll modifier is "; RMOD
7605 INPUT "Is target willing";I$:IF I$="y" THEN RMOD=RMOD - 50
7610 INPUT "Any other modifiers (beneficial to target)";I:RMOD=RMOD+I
7615 INPUT "Target's resistance bonus";I:RMOD=RMOD+I
7617 PRINT "Total resistance modifier is "; RMOD
7620 INPUT "Resistance roll";ROLL
7625 IF ROLL = 0 THEN GOSUB 9810: PRINT "Roll was "; ROLL
7630 ROLL = ROLL + RMOD: PRINT "Modified roll was "; ROLL
7640 DIFF=ATTLVL-DEFLVL
7645 RNEED=50
7650 IF ATTLVL>15 THEN RNEED=RNEED+ATTLVL-15:ATTLVL=15
7651 IF DEFLVL>15 THEN RNEED=RNEED-DEFLVL+15:DEFLVL=15
7652 IF ATTLVL>10 THEN RNEED=RNEED+2*(ATTLVL-10):ATTLVL=10
7653 IF DEFLVL>10 THEN RNEED=RNEED-2*(DEFLVL-10):DEFLVL=10
7654 IF ATTLVL>5 THEN RNEED=RNEED+3*(ATTLVL-5):ATTLVL=5
7655 IF DEFLVL>5 THEN RNEED=RNEED-3*(DEFLVL-5):DEFLVL=5
7656 RNEED=RNEED+5*(ATTLVL-DEFLVL)
7657 PRINT "Require "; RNEED;" to resist spell"
7660 IF ROLL>=RNEED THEN PRINT D;NAM$(D);" resisted the spell":GOTO 7680
7670 PRINT D;NAM$(D);" failed to resist the spell, by ";RNEED-ROLL:IF ITEM=0 THEN SUCCESS = 1
7671 GOTO 7680
7675 PRINT "The spell was cast successfully":SUCCESS = 1
7680 IF DEFENDERCOUNT < NUMDEFENDERS THEN DEFENDERCOUNT = DEFENDERCOUNT + 1: GOTO 7601
7690 IF SUCCESS = 1 THEN GOTO 12610
7700 RANDOMIZE TIMER:I=INT((RND*100)+.5):RISK=RISK+I
7701 IF S>CHARACNO THEN GOTO 7720
7705 PRINT "Risk Factor roll was ";I;". Modified roll was ";RISK
7710 IF RISK>=100 THEN GOTO 7750
7720 PRINT "Press a key to return to the menu"
7730 IF INKEY$<>"" THEN GOTO 500
7740 GOTO 7730
7750 PRINT "The spell was detected by evil powers"
7760 PRINT "Input the code for area cast in - "
7761 PRINT "Haven 1"
7762 PRINT "Civilized/Urban 2"
7763 PRINT "Civilized/Rural 3"
7764 PRINT "Border/Urban 4"
7765 PRINT "Border/Rural 5"
7766 PRINT "Wilds 6"
7767 PRINT "Shadow-lands 7"
7768 PRINT "Shadow-Holds 8"
7770 INPUT I:AREA=I
7771 IF I=0 OR I>8 THEN GOTO 7770
7775 GOSUB 9800
7780 ON I GOTO 7800,7810,7820,7830,7840,7850,7860,7870
7800 CHAIN "risk",20005,ALL
7810 CHAIN "risk",20006,ALL
7820 CHAIN "risk",20007,ALL
7830 CHAIN "risk",20008,ALL
7840 CHAIN "risk",20009,ALL
7850 CHAIN "risk",20010,ALL
7860 CHAIN "risk",20011,ALL
7870 CHAIN "risk",20012,ALL
7900 RANDOMIZE TIMER:PRINT "Press a key to return to the menu"
7905 IF INKEY$<>"" THEN GOTO 500
7910 GOTO 7905
8000 REM Bolt and Ball attacks
8001 CLS:INPUT "Do you want a bolt (1) or a ball (2) attack";I
8005 IF I=1 THEN GOTO 8010
8006 IF I=2 THEN GOTO 8600
8007 GOTO 8001
8010 REM Bolt attacks
8011 GOSUB 8100
8015 PRINT "Select type of bolt"
8016 PRINT "Fire Bolt -1"
8017 PRINT "Ice Bolt -2"
8018 PRINT "Lightning Bolt -3"
8019 PRINT "Shock Bolt -4"
8020 PRINT "Water Bolt -5"
8021 PRINT "Plasma Bolt -6"
8022 PRINT "Nether Bolt -7"
8023 PRINT "Other -8"
8025 INPUT I:IF I=0 OR I>8 THEN GOTO 8025
8026 IF S<=CHARACNO AND S<>0 THEN INPUT "What is the spell level";LVL
8027 RISK=40
8030 ON I GOTO 8035,8040,8045,8050,8055,8060,8065,8067
8035 TYPE=1:CRITT1=1:CRITT2=0:CRITT3=0
8036 GOTO 8075
8040 TYPE=2:CRITT1=4:CRITT2=2:CRITT3=0
8041 GOTO 8075
8045 TYPE=3:CRITT1=3:CRITT2=4:CRITT3=1
8046 GOTO 8075
8050 TYPE=4:CRITT1=3:CRITT2=0:CRITT3=0
8051 GOTO 8075
8055 TYPE=5:CRITT1=4:CRITT2=0:CRITT3=0
8056 GOTO 8075
8060 TYPE=6:CRITT1=7:CRITT2=2:CRITT3=3
8061 GOTO 8075
8065 TYPE=7:CRITT1=5:CRITT2=8:CRITT3=0
8066 GOTO 8075
8067 INPUT "What attack table should be used";I:TYPE=I
8068 PRINT "What is the first critical type"
8069 PRINT "Heat (1); Cold (2); Electricity (3); Impact (4); Disruption (5); Acid (6); Plasma (7); Stress (8); Other (9)"
8070 INPUT CRITT1
8071 INPUT "What is the second critical type (if needed)";CRITT2
8072 INPUT "What is the third critical type (if needed)";CRITT3
8075 INPUT "What is attacker's Directed Spell bonus";I:MD=I
8076 SH=0:IF TYPE=4 THEN RISK=30
8077 INPUT "Does defender have a shield facing caster";I$
8078 IF I$="y" THEN SH=SH(D)-10
8079 IF SH<0 THEN SH=0
8080 MD=MD-SH
8085 INPUT "Does defender have partial cover (1) or full cover (2)";I
8086 IF I>0 THEN MD=MD-(30*I):GOTO 8150
8090 INPUT "Is defender static (prone/surprised)";I$
8091 IF I$="y" THEN MD=MD+30:GOTO 8150
8095 INPUT "Defender's Agility bonus";I
8096 MD=MD-I:GOTO 8150
8100 CLS:FOR Z=1 TO 30
8101 IF NAM$(Z)="" THEN GOTO 8110
8102 PRINT Z,NAM$(Z)
8103 IF OOC(Z)=1 THEN LOCATE Z,45:PRINT "Out of action"
8104 IF OOC(Z)=2 THEN LOCATE Z,45:PRINT "Unconscious/dead"
8105 IF STUN(Z)>0 THEN LOCATE Z,35:PRINT "Stunned"
8106 NEXT Z
8107 INPUT "Who is the attacker (if none, press Enter)";I
8110 INPUT "Who is the attacker";I
8111 IF OOC(Z)>0 OR STUN (Z)>0 THEN PRINT NAM$(I);" may not attack":INPUT I:GOTO 500
8115 S=I
8120 INPUT "Who is the target";I
8125 D=I
8130 RETURN
8150 IF ITEM = 0 THEN INPUT "How many rounds preparation (instantaneous = 2)";I: PREP = I
8151 RESTORE 7155: IF PREP > 4 THEN PREP = 4
8152 READ I: READ J: IF PREP > I THEN GOTO 8152
8153 MD=MD+J
8155 INPUT "What is spell range"; I: RANGE = I
8156 RESTORE 8170
8160 READ I:READ J:IF RANGE>I THEN GOTO 8160
8165 MD=MD+J
8166 INPUT "Any other bonuses (positive favours attacker)";I:MD=MD+I
8170 DATA 10,35,50,0,100,-25,200,-40,300,-55,400,-75
8180 INPUT "What is roll";I:IF I=100 THEN I=1000
8181 IF I<>0 THEN GOTO 8183
8182 I=INT ((RND*100)+.5):PRINT "Roll was ";I:IF I=100 THEN I=1000
8183 IF I<2 OR I=1000 THEN GOTO 8195
8184 IF I>95 THEN I=I+INT ((RND*100)+.5)
8185 IF I>150 THEN I=150
8190 I=I+MD
8195 ROLL=I-SUB(S):AT=AT(D)
8196 ON TYPE GOTO 8200,8230,8260,8290,8320,8350,8380,8410,8440
8200 ON AT GOTO 8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215,8216,8217,8218,8219,8220
8201 CHAIN "firebt",20010,ALL
8202 CHAIN "firebt",20011,ALL
8203 CHAIN "firebt",20012,ALL
8204 CHAIN "firebt",20013,ALL
8205 CHAIN "firebt",20014,ALL
8206 CHAIN "firebt",20015,ALL
8207 CHAIN "firebt",20016,ALL
8208 CHAIN "firebt",20017,ALL
8209 CHAIN "firebt",20018,ALL
8210 CHAIN "firebt",20019,ALL
8211 CHAIN "firebt",20020,ALL
8212 CHAIN "firebt",20021,ALL
8213 CHAIN "firebt",20022,ALL
8214 CHAIN "firebt",20023,ALL
8215 CHAIN "firebt",20024,ALL
8216 CHAIN "firebt",20025,ALL
8217 CHAIN "firebt",20026,ALL
8218 CHAIN "firebt",20027,ALL
8219 CHAIN "firebt",20028,ALL
8220 CHAIN "firebt",20029,ALL
8230 ON AT GOTO 8231,8232,8233,8234,8235,8236,8237,8238,8239,8240,8241,8242,8243,8244,8245,8246,8247,8248,8249,8250
8231 CHAIN "icebt",20010,ALL
8232 CHAIN "icebt",20011,ALL
8233 CHAIN "icebt",20012,ALL
8234 CHAIN "icebt",20013,ALL
8235 CHAIN "icebt",20014,ALL
8236 CHAIN "icebt",20015,ALL
8237 CHAIN "icebt",20016,ALL
8238 CHAIN "icebt",20017,ALL
8239 CHAIN "icebt",20018,ALL
8240 CHAIN "icebt",20019,ALL
8241 CHAIN "icebt",20020,ALL
8242 CHAIN "icebt",20021,ALL
8243 CHAIN "icebt",20022,ALL
8244 CHAIN "icebt",20023,ALL
8245 CHAIN "icebt",20024,ALL
8246 CHAIN "icebt",20025,ALL
8247 CHAIN "icebt",20026,ALL
8248 CHAIN "icebt",20027,ALL
8249 CHAIN "icebt",20028,ALL
8250 CHAIN "icebt",20029,ALL
8260 ON AT GOTO 8261,8262,8263,8264,8265,8266,8267,8268,8269,8270,8271,8272,8273,8274,8275,8276,8277,8278,8279,8280
8261 CHAIN "ligbt",20010,ALL
8262 CHAIN "ligbt",20011,ALL
8263 CHAIN "ligbt",20012,ALL
8264 CHAIN "ligbt",20013,ALL
8265 CHAIN "ligbt",20014,ALL
8266 CHAIN "ligbt",20015,ALL
8267 CHAIN "ligbt",20016,ALL
8268 CHAIN "ligbt",20017,ALL
8269 CHAIN "ligbt",20018,ALL
8270 CHAIN "ligbt",20019,ALL
8271 CHAIN "ligbt",20020,ALL
8272 CHAIN "ligbt",20021,ALL
8273 CHAIN "ligbt",20022,ALL
8274 CHAIN "ligbt",20023,ALL
8275 CHAIN "ligbt",20024,ALL
8276 CHAIN "ligbt",20025,ALL
8277 CHAIN "ligbt",20026,ALL
8278 CHAIN "ligbt",20027,ALL
8279 CHAIN "ligbt",20028,ALL
8280 CHAIN "ligbt",20029,ALL
8290 ON AT GOTO 8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,8304,8305,8306,8307,8308,8309,8310
8291 CHAIN "shobt",20010,ALL
8292 CHAIN "shobt",20011,ALL
8293 CHAIN "shobt",20012,ALL
8294 CHAIN "shobt",20013,ALL
8295 CHAIN "shobt",20014,ALL
8296 CHAIN "shobt",20015,ALL
8297 CHAIN "shobt",20016,ALL
8298 CHAIN "shobt",20017,ALL
8299 CHAIN "shobt",20018,ALL
8300 CHAIN "shobt",20019,ALL
8301 CHAIN "shobt",20020,ALL
8302 CHAIN "shobt",20021,ALL
8303 CHAIN "shobt",20022,ALL
8304 CHAIN "shobt",20023,ALL
8305 CHAIN "shobt",20024,ALL
8306 CHAIN "shobt",20025,ALL
8307 CHAIN "shobt",20026,ALL
8308 CHAIN "shobt",20027,ALL
8309 CHAIN "shobt",20028,ALL
8310 CHAIN "shobt",20029,ALL
8320 ON AT GOTO 8321,8322,8323,8324,8325,8326,8327,8328,8329,8330,8331,8332,8333,8334,8335,8336,8337,8338,8339,8340
8321 CHAIN "watbt",20010,ALL
8322 CHAIN "watbt",20011,ALL
8323 CHAIN "watbt",20012,ALL
8324 CHAIN "watbt",20013,ALL
8325 CHAIN "watbt",20014,ALL
8326 CHAIN "watbt",20015,ALL
8327 CHAIN "watbt",20016,ALL
8328 CHAIN "watbt",20017,ALL
8329 CHAIN "watbt",20018,ALL
8330 CHAIN "watbt",20019,ALL
8331 CHAIN "watbt",20020,ALL
8332 CHAIN "watbt",20021,ALL
8333 CHAIN "watbt",20022,ALL
8334 CHAIN "watbt",20023,ALL
8335 CHAIN "watbt",20024,ALL
8336 CHAIN "watbt",20025,ALL
8337 CHAIN "watbt",20026,ALL
8338 CHAIN "watbt",20027,ALL
8339 CHAIN "watbt",20028,ALL
8340 CHAIN "watbt",20029,ALL
8350 ON AT GOTO 8351,8352,8353,8354,8355,8356,8357,8358,8359,8360,8361,8362,8363,8364,8365,8366,8367,8368,8369,8370
8351 CHAIN "plabt",20010,ALL
8352 CHAIN "plabt",20011,ALL
8353 CHAIN "plabt",20012,ALL
8354 CHAIN "plabt",20013,ALL
8355 CHAIN "plabt",20014,ALL
8356 CHAIN "plabt",20015,ALL
8357 CHAIN "plabt",20016,ALL
8358 CHAIN "plabt",20017,ALL
8359 CHAIN "plabt",20018,ALL
8360 CHAIN "plabt",20019,ALL
8361 CHAIN "plabt",20020,ALL
8362 CHAIN "plabt",20021,ALL
8363 CHAIN "plabt",20022,ALL
8364 CHAIN "plabt",20023,ALL
8365 CHAIN "plabt",20024,ALL
8366 CHAIN "plabt",20025,ALL
8367 CHAIN "plabt",20026,ALL
8368 CHAIN "plabt",20027,ALL
8369 CHAIN "plabt",20028,ALL
8370 CHAIN "plabt",20029,ALL
8380 ON AT GOTO 8381,8382,8383,8384,8385,8386,8387,8388,8389,8390,8391,8392,8393,8394,8395,8396,8397,8398,8399,8400
8381 CHAIN "netbt",20010,ALL
8382 CHAIN "netbt",20011,ALL
8383 CHAIN "netbt",20012,ALL
8384 CHAIN "netbt",20013,ALL
8385 CHAIN "netbt",20014,ALL
8386 CHAIN "netbt",20015,ALL
8387 CHAIN "netbt",20016,ALL
8388 CHAIN "netbt",20017,ALL
8389 CHAIN "netbt",20018,ALL
8390 CHAIN "netbt",20019,ALL
8391 CHAIN "netbt",20020,ALL
8392 CHAIN "netbt",20021,ALL
8393 CHAIN "netbt",20022,ALL
8394 CHAIN "netbt",20023,ALL
8395 CHAIN "netbt",20024,ALL
8396 CHAIN "netbt",20025,ALL
8397 CHAIN "netbt",20026,ALL
8398 CHAIN "netbt",20027,ALL
8399 CHAIN "netbt",20028,ALL
8400 CHAIN "netbt",20029,ALL
8500 RANDOMIZE TIMER:CRIT=CRIT1:CRITT=CRITT1:CRITL=CRIT1+CRIT2+CRIT3:IF CRIT=0 THEN GOTO 8560
8501 INPUT "Is attack slaying";I$:IF I$="y" THEN ST=2:GOTO 8900
8502 IF SIZE (D)>1 THEN GOTO 8920
8503 INPUT "Critical roll";I:IF I<>0 THEN GOTO 8505
8504 I=INT ((RND*100)+.5): PRINT "Critical roll was ";I
8505 ROLL=I
8506 ON CRITT GOTO 8507,8508,8509,8510,8511,8512,8513,8514,8515
8507 CHAIN "heatcr",20000,ALL
8508 CHAIN "coldcr",20000,ALL
8509 CHAIN "eleccr",20000,ALL
8510 CHAIN "impacr",20000,ALL
8511 CHAIN "disrcr",20000,ALL
8512 CHAIN "acidcr",20000,ALL
8513 CHAIN "plascr",20000,ALL
8514 CHAIN "strecr",20000,ALL
8515 INPUT "How many hits";I:CHIT=I
8516 INPUT "How many hits per round";I:CHRD=I
8517 INPUT "How many rounds stunned";I:CSTUN=I
8518 INPUT "What subtraction from bonuses";I:CSUB=I
8519 INPUT "Is defender out of action (1) or unconscious/dead (2)";I:IF I<=2 THEN OOC=I
8530 IF Z$<>"" AND CRIT2>0 THEN Y$=Z$
8531 IF CRIT2>0 AND OOC>COOC THEN COOC=OOC
8532 IF CRIT2>0 THEN Y$=Z$:Z$=C$:HITS=HITS+CHIT:HRD=HRD+CHRD:STUN=STUN+CSTUN:SUB=SUB+CSUB:PARR=PARR+CPARR:NOPA=NOPA+CNOPA:PLUS=PLUS+CPLUS:CRIT1=CRIT2:CRITT1=CRITT2:CRIT2=CRIT3:CRITT2=CRITT3:CRIT3=0:CRITT3=0:CRIT=CRIT1:CRITT=CRITT1:GOTO 8500
8533 IF OOC>COOC THEN COOC=OOC
8534 HITS=HITS+CHIT:HRD=HRD+CHRD:STUN=STUN+CSTUN:SUB=SUB+CSUB:PARR=PARR+CPARR:NOPA=NOPA+CNOPA:PLUS=PLUS+CPLUS:OOC=COOC
8536 CLS:PRINT "Elemental attack result":PRINT D;NAM$(D);" took the following critical strike":GOSUB 11100
8537 IF Y$<>"" THEN PRINT Y$
8538 IF Z$<>"" THEN PRINT Z$
8539 PRINT C$
8540 PRINT "The following results also occurred"
8541 PRINT HITS;" hits":DAM (D)=DAM(D)+HITS
8542 IF HRD>0 THEN PRINT HRD;" hits per round":HRD(D)=HRD(D)+HRD
8543 IF STUN>0 THEN PRINT STUN;" rounds stunned":STUN(D)=STUN(D)+STUN
8544 IF SUB>0 THEN PRINT SUB;" subtracted from bonuses":SUB(D)=SUB(D)+SUB
8545 IF PARR>0 THEN PRINT NAM$(D);" must parry for the next ";PARR;" rounds"
8546 IF NOPA>0 THEN PRINT NAM$(D);" may not parry for the next ";NOPA;" rounds"
8547 IF PLUS>0 THEN PRINT NAM$(A);" has a bonus of ";PLUS;" to their next attack"
8548 IF DAM(D)>HITS(D) THEN OOC=2
8549 IF OOC>OOC(D) THEN OOC(D)=OOC
8550 IF OOC(D)=1 THEN PRINT D;NAM$(D);" is out of combat"
8551 IF OOC(D)=2 THEN PRINT D;NAM$(D);" is unconscious/dead":INJ$(D)=INJ$(D)+" Unconscious/dead"
8552 IF OOC(D)=2 AND OOC=2 THEN GOTO 12320
8555 GOTO 8570
8560 IF S<=CHARACNO AND TARG<=1 AND S<>0 THEN GOTO 12630
8561 CLS:PRINT "Elemental attack result"
8562 PRINT D;NAM$(D);" took ";HITS;" hits":DAM(D)=DAM(D)+HITS
8563 IF DAM(D)>HITS(D) AND OOC(D)<2 THEN OOC(D)=2:PRINT D;NAM$(D);" is unconscious/dead":GOSUB 12300
8570 IF D<=CHARACNO THEN GOTO 12920
8571 IF D<=CHARACNO THEN GOSUB 12820
8572 IF S<=CHARACNO AND S<>0 THEN A=S:GOTO 12720
8580 Z$="":Y$="":C$="":CHIT=0:HITS=0:CHRD=0:HRD=0:CSTUN=0:STUN=0:CSUB=0:SUB=0:CPARR=0:PARR=0:CNOPA=0:NOPA=0:CPLUS=0:PLUS=0:OOC=0:COOC=0:CRIT1=0
8581 TARG=TARG+1:IF TARG<NOTARG THEN GOTO 8590
8582 TARG=0:NOTARG=0
8583 IF S<=CHARACNO AND S<>0 THEN GOTO 12620
8584 GOTO 7700
8590 D=TARG(TARG)
8591 RANDOMIZE TIMER:PRINT "Press a key to continue"
8592 IF INKEY$="" THEN GOTO 8592
8593 CLS:PRINT "Attacking ";NAM$(D):GOTO 8700
8600 CLS:FOR Z=1 TO 30
8605 IF NAM$(Z)="" THEN GOTO 8620
8610 PRINT Z,NAM$(Z)
8612 IF STUN (Z)>0 THEN LOCATE Z,35:PRINT "Stunned"
8613 IF OOC(Z)=1 THEN LOCATE Z,45:PRINT "Out of action"
8614 IF OOC(Z)=2 THEN LOCATE Z,45:PRINT "Unconscious/dead"
8615 NEXT Z
8616 RISK=50
8620 INPUT "Who is the caster (if none, press Enter)";I:S=I
8621 IF STUN (A)>0 OR OOC(A)=2 THEN PRINT NAM$(A);" may not attack":GOTO 8620
8624 X=1
8625 INPUT "Who is in the area of effect";I:IF I=0 THEN GOTO 8635
8626 TARG(X)=I
8630 X=X+1:GOTO 8625
8635 INPUT "Who is in the centre of the area of effect";I:C=I
8640 NOTARG=X
8641 TARG=1:D=TARG(1)
8645 RISK = 0:INPUT "Enter spell risk factor";I: RISK=I
8650 CLS:PRINT "Input type of ball attack"
8651 PRINT "Fire ball - 1"
8652 PRINT "Cold ball - 2"
8653 PRINT "Nether ball - 3"
8654 PRINT "Plasma ball - 4"
8655 PRINT "Other - 5"
8656 INPUT I
8657 IF S<=CHARACNO THEN INPUT "What is the spell level";LVL
8660 ON I GOTO 8662,8664,8666,8668,8670
8662 TYPE=1:CRITT1=1:CRITT2=0:CRITT3=0:GOTO 8675
8664 TYPE=2:CRITT1=2:CRITT2=0:CRITT3=0:GOTO 8675
8666 TYPE=3:CRITT1=5:CRITT2=8:CRITT3=0:GOTO 8675
8668 TYPE=4:CRITT1=7:CRITT2=2:CRITT3=0:GOTO 8675
8670 INPUT "Which attack table to use";TYPE
8671 PRINT "What is the first critical type":PRINT"Heat (1); Cold (2); Electricity (3); Impact (4); Disruption (5); Acid (6); Plasma (7); Stress (8); Other (9)"
8672 INPUT CRITT1
8673 INPUT "What is the second critical type (if needed)";CRITT2
8674 INPUT "What is the third critical type (if needed)";CRITT3
8675 TARG=1
8680 INPUT "What is caster's Base Spell bonus";I:MD=I
8685 INPUT "What is spell range";I:RANGE=I
8686 RESTORE 8170
8687 READ I:READ J:IF RANGE>I THEN GOTO 8687
8690 MD=MD+J
8691 INPUT "How many rounds preparation (instantaneous = 2)";PREP
8692 RESTORE 7155
8693 READ I: READ J: IF PREP>I THEN GOTO 8693
8695 MD = MD + J
8696 GOSUB 8730
8699 PRINT "Attacking ";NAM$(D)
8700 INPUT "Does defender have a shield facing caster";I$
8701 IF I$="y" THEN SH=SH(D)-10
8702 IF SH<0 THEN SH=0
8705 MD=MD-SH
8710 INPUT "Does defender have partial cover (1) or full cover (2)";I
8711 IF I>0 THEN MD=MD-(30*I):GOTO 8725
8715 INPUT "Is defender static (prone/surprised)";I$
8716 IF I$="y" THEN MD=MD+30:GOTO 8725
8720 INPUT "Defender's Agility bonus";I
8721 MD=MD-I
8725 INPUT "Any other bonuses (positive favours attacker)";I:MD=MD+I
8726 GOTO 8735
8730 INPUT "What is roll";I
8731 IF I<>0 THEN GOTO 8733
8732 I=INT ((RND*100)+.5): PRINT "Roll was ";I
8733 ATTACKROLL = I: RETURN
8735 I = ATTACKROLL
8740 IF I<4 OR I>95 THEN ROLL=I:GOTO 8745
8741 I=I+MD:IF D=C THEN I=I+20
8742 ROLL=I-SUB(S)
8743 IF ROLL<5 THEN ROLL=5
8744 IF ROLL>95 THEN ROLL=95
8745 AT=AT(D): PRINT "Modified roll was ";ROLL
8746 MD=0
8748 ON TYPE GOTO 8750,8780,8810,8840,8870
8750 ON AT GOTO 8751,8752,8753,8754,8755,8756,8757,8758,8759,8760,8761,8762,8763,8764,8765,8766,8767,8768,8769,8770
8751 CHAIN "fireba",20010,ALL
8752 CHAIN "fireba",20011,ALL
8753 CHAIN "fireba",20012,ALL
8754 CHAIN "fireba",20013,ALL
8755 CHAIN "fireba",20014,ALL
8756 CHAIN "fireba",20015,ALL
8757 CHAIN "fireba",20016,ALL
8758 CHAIN "fireba",20017,ALL
8759 CHAIN "fireba",20018,ALL
8760 CHAIN "fireba",20019,ALL
8761 CHAIN "fireba",20020,ALL
8762 CHAIN "fireba",20021,ALL
8763 CHAIN "fireba",20022,ALL
8764 CHAIN "fireba",20023,ALL
8765 CHAIN "fireba",20024,ALL
8766 CHAIN "fireba",20025,ALL
8767 CHAIN "fireba",20026,ALL
8768 CHAIN "fireba",20027,ALL
8769 CHAIN "fireba",20028,ALL
8770 CHAIN "fireba",20029,ALL
8780 ON AT GOTO 8781,8782,8783,8784,8785,8786,8787,8788,8789,8790,8791,8792,8793,8794,8795,8796,8797,8798,8799,8800
8781 CHAIN "coldba",20010,ALL
8782 CHAIN "coldba",20011,ALL
8783 CHAIN "coldba",20012,ALL
8784 CHAIN "coldba",20013,ALL
8785 CHAIN "coldba",20014,ALL
8786 CHAIN "coldba",20015,ALL
8787 CHAIN "coldba",20016,ALL
8788 CHAIN "coldba",20017,ALL
8789 CHAIN "coldba",20018,ALL
8790 CHAIN "coldba",20019,ALL
8791 CHAIN "coldba",20020,ALL
8792 CHAIN "coldba",20021,ALL
8793 CHAIN "coldba",20022,ALL
8794 CHAIN "coldba",20023,ALL
8795 CHAIN "coldba",20024,ALL
8796 CHAIN "coldba",20025,ALL
8797 CHAIN "coldba",20026,ALL
8798 CHAIN "coldba",20027,ALL
8799 CHAIN "coldba",20028,ALL
8800 CHAIN "coldba",20029,ALL
8810 ON AT GOTO 8811,8812,8813,8814,8815,8816,8817,8818,8819,8820,8821,8822,8823,8824,8825,8826,8827,8828,8829,8830
8811 CHAIN "nethba",20010,ALL
8812 CHAIN "nethba",20011,ALL
8813 CHAIN "nethba",20012,ALL
8814 CHAIN "nethba",20013,ALL
8815 CHAIN "nethba",20014,ALL
8816 CHAIN "nethba",20015,ALL
8817 CHAIN "nethba",20016,ALL
8818 CHAIN "nethba",20017,ALL
8819 CHAIN "nethba",20018,ALL
8820 CHAIN "nethba",20019,ALL
8821 CHAIN "nethba",20020,ALL
8822 CHAIN "nethba",20021,ALL
8823 CHAIN "nethba",20022,ALL
8824 CHAIN "nethba",20023,ALL
8825 CHAIN "nethba",20024,ALL
8826 CHAIN "nethba",20025,ALL
8827 CHAIN "nethba",20026,ALL
8828 CHAIN "nethba",20027,ALL
8829 CHAIN "nethba",20028,ALL
8830 CHAIN "nethba",20029,ALL
8840 ON AT GOTO 8841,8842,8843,8844,8845,8846,8847,8848,8849,8850,8851,8852,8853,8854,8855,8856,8857,8858,8859,8860
8841 CHAIN "plasba",20010,ALL
8842 CHAIN "plasba",20011,ALL
8843 CHAIN "plasba",20012,ALL
8844 CHAIN "plasba",20013,ALL
8845 CHAIN "plasba",20014,ALL
8846 CHAIN "plasba",20015,ALL
8847 CHAIN "plasba",20016,ALL
8848 CHAIN "plasba",20017,ALL
8849 CHAIN "plasba",20018,ALL
8850 CHAIN "plasba",20019,ALL
8851 CHAIN "plasba",20020,ALL
8852 CHAIN "plasba",20021,ALL
8853 CHAIN "plasba",20022,ALL
8854 CHAIN "plasba",20023,ALL
8855 CHAIN "plasba",20024,ALL
8856 CHAIN "plasba",20025,ALL
8857 CHAIN "plasba",20026,ALL
8858 CHAIN "plasba",20027,ALL
8859 CHAIN "plasba",20028,ALL
8860 CHAIN "plasba",20029,ALL
8870 INPUT "How many hits were delivered";HITS
8871 INPUT "What was the critical severity";CRIT
8872 IF CRIT>7 THEN CRIT3=CRIT-7
8873 IF CRIT>5 THEN CRIT2=CRIT-5
8874 CRIT1=CRIT:IF CRIT1>5 THEN CRIT1=5
8875 GOTO 8500
8900 SLAY=0:SL=1:IF SIZE(Z)=3 THEN SL=2
8901 INPUT "What is critical roll (open-ended high)";I:IF I<>0 THEN ROLL=I:GOTO 8905
8902 GOSUB 9800
8905 CROLL=ROLL
8909 ON SL GOTO 8910,8912
8910 CHAIN "slaycr",20000,ALL
8912 CHAIN "slaycr",20010,ALL
8920 CRIT=CRIT-(SIZE(D)-1)