-
Notifications
You must be signed in to change notification settings - Fork 1
/
monsstat.cpp
2743 lines (2249 loc) · 57 KB
/
monsstat.cpp
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
#include "colours.h"
#include <string.h>
#define MLAVA0 220
#define MLAVA1 221
#define MLAVA2 222
#define MLAVA3 223
#define MLAVA4 224
#define MLAVA5 225
#define MWATER0 230
#define MWATER1 231
#define MWATER2 232
#define MWATER3 233
#define MWATER4 234
#define MWATER5 235
/*#define
#define
#define
#define*/
int mondamage(int mc, int rt);
void mon_init(char gmon_use [400], char mcolour [400]);
int mon_resist_mag(char mc, char mhd);
int mons_zombie_size(int mclass);
int mondamage(int mc, int rt)
{
switch(mc)
{
case 0: // giant ant
switch(rt)
{
case 0: return 8;
default: return 0;
}
break;
case 1: // giant bat
switch(rt)
{
case 0: return 1;
default: return 0;
}
break;
case 2: // centaur
switch(rt)
{
case 0: return 10;
default: return 0;
}
break;
case 3: // devil
switch(rt)
{
case 0: return 18;
default: return 0;
}
break;
case 4: // ettin?
switch(rt)
{
case 0: return 18;
case 1: return 12;
default: return 0;
}
break;
case 5: // fungus
switch(rt)
{
//case 0: return 8;
default: return 0;
}
break;
case 6: // goblin
switch(rt)
{
case 0: return 4;
default: return 0;
}
break;
case 7: // hound
switch(rt)
{
case 0: return 6;
default: return 0;
}
break;
case 8: // imp
switch(rt)
{
case 0: return 4;
default: return 0;
}
break;
case 9: // jackal?
switch(rt)
{
case 0: return 3;
default: return 0;
}
break;
case 10: // killer bee
switch(rt)
{
case 0: return 10;
default: return 0;
}
break;
case 11: // killer bee larva?
switch(rt)
{
case 0: return 3;
default: return 0;
}
break;
case 12: // manticore?
switch(rt)
{
case 0: return 14;
case 1: return 8;
case 2: return 8;
default: return 0;
}
break;
case 13: // necrophage
switch(rt)
{
case 0: return 8;
default: return 0;
}
case 14: // orc
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 15: // phantom
switch(rt)
{
case 0: return 10;
default: return 0;
}
case 16: // quasit
switch(rt)
{
case 0: return 3;
case 1: return 2;
case 2: return 2;
default: return 0;
}
case 17: // rat
switch(rt)
{
case 0: return 3;
default: return 0;
}
case 18: // scorpion
switch(rt)
{
case 0: return 10;
default: return 0;
}
case 19: // tunneling worm
switch(rt)
{
case 0: return 50;
default: return 0;
}
case 20: // ugly thing
switch(rt)
{
case 0: return 12;
default: return 0;
}
case 21: // v?
switch(rt)
{
case 0: return 30;
default: return 0;
}
case 22: // worm
switch(rt)
{
case 0: return 12;
default: return 0;
}
case 23: // x?
switch(rt)
{
case 0: return 3;
default: return 0;
}
case 24: // yellow wasp
switch(rt)
{
case 0: return 13;
default: return 0;
}
case 25: // zombie?????
switch(rt)
{
case 0: return 10; // This is adjusted in mons_attack
default: return 0;
}
case 26: // Angel
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 27: // giant beetle
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 28: // Cyclops
switch(rt)
{
case 0: return 35;
default: return 0;
}
case 29: // Dragon
switch(rt)
{
case 0: return 15;
case 1: return 10;
case 2: return 10;
default: return 0;
}
case 30: // two-headed Ogre
switch(rt)
{
case 0: return 20;
case 1: return 15;
default: return 0;
}
case 31: // Fiend
switch(rt)
{
case 0: return 40;
case 1: return 30;
case 2: return 30;
default: return 0;
}
/*
case 32: // E?
switch(rt)
{
case 0: return 3;
default: return 0;
}
*/
case 32: // Giant spore
switch(rt)
{
case 0: return 1;
default: return 0;
}
case 33: // Hobgoblin
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 34: // Ice beast
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 35: // Jelly
switch(rt)
{
case 0: return 8; //20;
default: return 0;
}
case 36: // Kobold
switch(rt)
{
case 0: return 4;
default: return 0;
}
case 37: // Lich
switch(rt)
{
case 0: return 15;
default: return 0;
}
case 38: // Mummy
switch(rt)
{
case 0: return 10;
default: return 0;
}
case 39: // Naga
switch(rt)
{
case 0: return 15;
default: return 0;
}
case 40: // Ogre
switch(rt)
{
case 0: return 15;
default: return 0;
}
case 41: // Plant?
switch(rt)
{
case 0: return 0;
default: return 0;
}
case 42: // Queen bee
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 43: // Rakshasa
switch(rt)
{
case 0: return 15;
default: return 0;
}
case 44: // Snake
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 45: // Troll
switch(rt)
{
case 0: return 15;
case 1: return 10;
case 2: return 10;
default: return 0;
}
case 46: // U?
switch(rt)
{
case 0: return 3;
default: return 0;
}
case 47: // Vampire?
switch(rt)
{
case 0: return 22;
default: return 0;
}
case 48: // Wraith
switch(rt)
{
case 0: return 19;
default: return 0;
}
case 49: // Abomination
switch(rt)
{
case 0: return 40;
default: return 0;
}
case 50: // Yak
switch(rt)
{
case 0: return 18;
default: return 0;
}
case 51: // Zombie?
switch(rt)
{
case 0: return 23; // This is adjusted in mons_attack
default: return 0;
}
case 52: // orc warrior
switch(rt)
{
case 0: return 10;
default: return 0;
}
case 53: // kobold demologist
switch(rt)
{
case 0: return 4;
default: return 0;
}
case 54: // orc wizard
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 55: // orc knight
switch(rt)
{
case 0: return 14;
default: return 0;
}
case 57: // wyvern
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 58: // Kobold lord
switch(rt)
{
case 0: return 7;
default: return 0;
}
case 59: // giant eyeball
return 0;
case 60: // wight
switch(rt)
{
case 0: return 10;
default: return 0;
}
case 61: // oklob plant
switch(rt)
{
// case 0: return 30;
default: return 0;
}
//return 0;
case 62: // giant Spider
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 63: // Shadow
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 64: // hungry ghost
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 65: // eye of draining
case 66: // butterfly
return 0;
case 67: // wandering muchroom
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 68: // Efreet
switch(rt)
{
case 0: return 12;
default: return 0;
}
case 69: // brain worm
return 0;
case 70: // giant orange brain
switch(rt)
{
// case 0: return 13;
default: return 0;
}
case 71: // Boulder Beetle
switch(rt)
{
case 0: return 35;
default: return 0;
}
case 72: // Flying skull
switch(rt)
{
case 0: return 7;
default: return 0;
}
case 73: // hell hon\und
switch(rt)
{
case 0: return 13;
default: return 0;
}
case 74: // minotaur
switch(rt)
{
case 0: return 35;
default: return 0;
}
case 75: // ice dragon
switch(rt)
{
case 0: return 12;
case 1: return 12;
case 2: return 12;
default: return 0;
}
case 76: // Slime thing
switch(rt)
{
case 0: return 17;
default: return 0;
}
case 77: // Blue Wraith
switch(rt)
{
case 0: return 19;
default: return 0;
}
case 78: // fake R
return 0;
case 79: // great orb of eyes
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 80: // burning devil
switch(rt)
{
case 0: return 10;
default: return 0;
}
case 81: // rotting devil
switch(rt)
{
case 0: return 8;
default: return 0;
}
case 82: // yellow devil
switch(rt)
{
case 0: return 8;
case 1: return 8;
default: return 0;
}
case 83: // grey devil
switch(rt)
{
case 0: return 20;
default: return 0;
}
case 84: // shadow devil
switch(rt)
{
case 0: return 15;
default: return 0;
}
case 85: // hairy devil
switch(rt)
{
case 0: return 9;
case 1: return 9;
default: return 0;
}
case 86: // ice devil
switch(rt)
{
case 0: return 16;
default: return 0;
}
case 87: // blue devil
switch(rt)
{
case 0: return 21;
default: return 0;
}
case 100: // giant mite
switch(rt)
{
case 0: return 5;
default: return 0;
}
case 101: // steam Dragon
switch(rt)
{
case 0: return 8;
// case 1: return 4;
// case 2: return 4;
default: return 0;
}
case 102: // very ugly thing
switch(rt)
{
case 0: return 17;
default: return 0;
}
case 103: // orc sorceror
switch(rt)
{
case 0: return 7;
default: return 0;
}
case 104: // hippogriff
switch(rt)
{
case 0: return 10;
case 1: return 8;
case 2: return 8;
default: return 0;
}
case 105: // griffon
switch(rt)
{
case 0: return 18;
case 1: return 10;
case 2: return 10;
default: return 0;
}
case 106: // hydra
switch(rt)
{
case 0: return 10; // !
default: return 0;
}
case MLAVA0: // lava worm
switch(rt)
{
case 0: return 10;
default: return 0;
}
case MLAVA1: // lava fish
switch(rt)
{
case 0: return 7;
default: return 0;
}
case MLAVA2: // lava snake
switch(rt)
{
case 0: return 5;
default: return 0;
}
case MWATER0: // giant fish
switch(rt)
{
case 0: return 5;
default: return 0;
}
case MWATER1: // giant goldfish
switch(rt)
{
case 0: return 15;
default: return 0;
}
case MWATER2: // electric eel
switch(rt)
{
// case 0: return 5;
default: return 0;
}
case MWATER3: // jellyfish
switch(rt)
{
case 0: return 1;
case 1: return 1;
// case 2: return 1;
default: return 0;
}
default: return 0;
} // end of switch
return 0;
} // end of char mondamage
int mon_resist_mag(int mc, char mhd)
{
switch(mc)
{
case 31: return 200; // fiend
//case 54: return 30; // orc wizard
case 47: return 50; // vampire
case 48: return 40; // wraith
case 60: return 30; // wight
case 43: return 100; // rakshasa
case 37: return 100; // Lich
case 19:
case 56: return 5000; // tunneling worm & tail
case 21: return 5000; // fire vortex
case 8: return 50; // imp
case 3: return 60; // devil
case 16: return 50; // quasit
case 70: return 80; // giant orange brain
case 65: return 5000; // eye of draining
case 25:
case 51: return 5000; // zombies? After all, magres is only used for mind enchantments
case 83: return 150; // grey devil
case 79: return 5000; // GooE
default: return (mhd * 3);
} // end switch
}
void mon_init(char gmon_use [400], char mcolour [400])
{
//strcpy(gmon_name [0], "giant ant");
mcolour [0] = 8;
//gmon_att [0] [0] = 8;
gmon_use [0] = 0;
//strcpy(gmon_name [1], "giant bat");
mcolour [1] = 8;
//gmon_att [1] [0] = 1;
gmon_use [1] = 0;
gmon_use [1] = 0;
//strcpy(gmon_name [2], "centaur");
mcolour [2] = BROWN;
//gmon_att [2] [0] = 6;
gmon_use [2] = 3;
//strcpy(gmon_name [3], "devil");
mcolour [3] = 4;
//gmon_att [3] [0] = 16;
gmon_use [3] = 1;
//strcpy(gmon_name [4], "ettin");
mcolour [4] = 6;
//gmon_att [4] [0] = 18;
//gmon_att [4] [1] = 18;
gmon_use [4] = 1;
//strcpy(gmon_name [5], "fungus");
mcolour [5] = 7;
//gmon_att [5] [0] = 0;
gmon_use [5] = 0;
//strcpy(gmon_name [6], "goblin");
mcolour [6] = 7;
//gmon_att [6] [0] = 4;
////gmon_att [6] [1] = 6;
////gmon_att [6] [2] = 6;
gmon_use [6] = 3;
//strcpy(gmon_name [7], "hound");
mcolour [7] = 6;
//gmon_att [7] [0] = 10;
gmon_use [7] = 0;
//strcpy(gmon_name [8], "imp");
mcolour [8] = RED;
//gmon_att [8] [0] = 4;
gmon_use [8] = 1;
//strcpy(gmon_name [9], "jackal");
mcolour [9] = 14;
//gmon_att [9] [0] = 5;
gmon_use [9] = 0;
//strcpy(gmon_name [10], "killer bee");
mcolour [10] = 14;
//gmon_att [10] [0] = 8;
gmon_use [10] = 0;
//strcpy(gmon_name [11], "killer bee larva");
mcolour [11] = 7;
//gmon_att [11] [0] = 3;
gmon_use [11] = 0;
//strcpy(gmon_name [12], "manticore");
mcolour [12] = 6;
//gmon_att [12] [0] = 10;
//gmon_att [12] [1] = 8;
//gmon_att [12] [2] = 8;
gmon_use [12] = 1;
//strcpy(gmon_name [13], "necrophage"); // don't know about this one.
mcolour [13] = DARKGRAY;
//gmon_att [13] [0] = 10;
gmon_use [13] = 1;
//strcpy(gmon_name [14], "orc");
mcolour [14] = 12;
//gmon_att [14] [0] = 5;
gmon_use [14] = 1;
gmon_use [14] = 3;
//strcpy(gmon_name [15], "phantom");
mcolour [15] = BLUE;
//gmon_att [15] [0] = 5;
gmon_use [15] = 1;
//strcpy(gmon_name [16], "quasit");
mcolour [16] = 7;
//gmon_att [16] [0] = 3;
//gmon_att [16] [1] = 2;
//gmon_att [16] [2] = 2;
gmon_use [16] = 0;
//strcpy(gmon_name [17], "rat");
mcolour [17] = 6;
//gmon_att [17] [0] = 3;
gmon_use [17] = 0;
//strcpy(gmon_name [18], "scorpion");
mcolour [18] = DARKGRAY;
//gmon_att [18] [0] = 6;
gmon_use [18] = 0;
//strcpy(gmon_name [19], "tunneling worm");
mcolour [19] = 12;
//gmon_att [19] [0] = 25;
gmon_use [19] = 0;
//strcpy(gmon_name [20], "ugly thing
mcolour [20] = BROWN;
//gmon_att [20] [0] = 15;
gmon_use [20] = 1;
//strcpy(gmon_name [21], "vortex");
mcolour [21] = RED;
//gmon_att [21] [0] = 3;
gmon_use [21] = 0;
//strcpy(gmon_name [22], "worm");
mcolour [22] = LIGHTRED;
//gmon_att [22] [0] = 10;
gmon_use [22] = 0;
//strcpy(gmon_name [23], "xax");
mcolour [23] = 13;
//gmon_att [23] [0] = 5;
gmon_use [23] = 0;
//strcpy(gmon_name [24], "yellow wasp");
mcolour [24] = 14;
//gmon_att [24] [0] = 0;
gmon_use [24] = 0;
//strcpy(gmon_name [25], "small zombie");
mcolour [25] = 6;
//gmon_att [25] [0] = 15;
gmon_use [25] = 1;
//strcpy(gmon_name [26], "angel");
mcolour [26] = WHITE;
//gmon_att [26] [0] = 15;
gmon_use [26] = 3;
//strcpy(gmon_name [27], "giant beetle");
mcolour [27] = 8;
//gmon_att [27] [0] = 25;
gmon_use [27] = 0;
//strcpy(gmon_name [28], "cyclops");
mcolour [28] = 6;
//gmon_att [28] [0] = 35;
gmon_use [28] = 1;
//strcpy(gmon_name [29], "dragon");
mcolour [29] = GREEN;
//gmon_att [29] [0] = 15;
//gmon_att [29] [1] = 7;
//gmon_att [29] [2] = 7;
gmon_use [29] = 1;
//strcpy(gmon_name [30], "two-headed Ogre");
mcolour [30] = LIGHTRED;
gmon_use [30] = 1;
//strcpy(gmon_name [31], "pit fiend");
mcolour [31] = RED;
//gmon_att [31] [0] = 40;
//gmon_att [31] [1] = 30;
//gmon_att [31] [2] = 30;
gmon_use [31] = 1;