-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfn2.cpp
4313 lines (3377 loc) · 112 KB
/
fn2.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 <curses.h>
//#include <alloc.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>// Only for debugging!
#include "colours.h"
#include "port.h"
#include "fn3.h"
#include "builder2.h"
//#include "newname.h"
//#include <process.h>
#define MNST 200
#define ITEMS 500
char id [4] [30]; // should this be static?
int random2(unsigned int rmax);
char store_message [78] [78];
char store_count = 0;
//#include <alloc.h>
char is_a_vowel(unsigned char let);
char retvow(char sed);
char retbit(char sed);
char reduce(unsigned char reducee);
char *retcons(char seeds);
char *make_name(unsigned char var1, unsigned char var2, unsigned char var3, char ncase);
char spell_value(char spell);
void spell_name(char spell, char spln [60]);
char spellbook_contents(unsigned char plus, unsigned char type);
void spellbook_template(int sbook_type, int func_pass [10]);
char *make_name(unsigned char var1, unsigned char var2, unsigned char var3, char ncase)
//(char item_clas, char item_typ, unsigned char item_da, char it_plus, unsigned int it_quant, char ident_lev)
//int main(void)
{
//char *glag;
char name [30] = "";// = "333333333";
char tmp_quant [5];
unsigned char numb [15];
char len;
char i = 0;
char nexty = 0;
char j = 0;
char igo = 0;
int ix = 0;
//char outp [30];
//strcpy(outp, " ");
//randomize();
//beginn : char var1 = getch();
//char var2 = getch();
//char var3 = getch();
//beginn : //char var1 = random(26);
//char var2 = random(26);
//char var3 = random(26);
//glag = (char *)malloc(30);
char glag [30];
/*
if (!glag)
{
cprintf("Not enough memory to allocate buffer!");
exit(0);
}*/
strcpy(glag, "");
numb [0] = var1 * var2;
numb [1] = var1 * var3;
numb [2] = var2 * var3;
numb [3] = var1 * var2 * var3;
numb [4] = var1 + var2;
numb [5] = var2 + var3;
numb [6] = var1 * var2 + var3;
numb [7] = var1 * var3 + var2;
numb [8] = var2 * var3 + var1 ;
numb [9] = var1 * var2 * var3 - var1;
numb [10] = var1 + var2 + var2;
numb [11] = var2 + var3 * var1;
numb [12] = var1 * var2 * var3;
numb [13] = var1 * var3 * var1;
numb [14] = var2 * var3 * var3;
//numb [15] = var1 * var2 * var3;
//numb [16] = var1 + var2;
//numb [17] = var2 + var3;
for (i = 0; i < 15; i ++)
{
while(numb [i] >= 25)
{
numb [i] -= 25;
}
} // end of for i
j = numb [6];
//len = (numb[9] + numb [10] + numb [5] + numb [3]) / 6;
len = reduce(numb [reduce(numb [11]) / 2]);
while (len < 5 && j < 10) //len += 5;
{
len += reduce(numb [j] + 1) + 1;
j++;
}
while (len > 14)
{
len -= 8;
}
//len = 8;
//if (len > 18) len -= 10;
nexty = retbit(numb [4]);
char k = 0;
j = 0;
for (i = 0; i < len; i ++)
{
j ++;
if (j >= 15)
{
j = 0;
k++;
if (k > 9) break;
}
if (nexty == 1 | (i > 0 && is_a_vowel(name [i]) == 0))
{
name [i] = retvow(numb [j]);
if ((i == 0 | i == len - 1) && name [i] == 32)
{
i--;
continue;
}
} else
{
if (numb [i / 2] <= 1 && i > 3 && is_a_vowel(name [i]) == 1) goto two_letter;
else
name [i] = numb [j];//retcons(numb [j]);
//strcpy(name, retcons(numb [j]));
// name [i] = numb [j];
// strcat(name, "XX");
hello : igo ++;
}
if ((nexty == 0 && is_a_vowel(name [i]) == 1) | (nexty == 1 && is_a_vowel(name [i]) == 0))
{
if (nexty == 1 && i > 0 && is_a_vowel(name [i - 1]) == 0) i --;
i--;
//j++;
//k++;
// break;
continue;
}
if (is_a_vowel(name [i]) == 0)//nexty == 0)
{
//if (retbit(numb [1]) | retbit(numb [3]) | retbit(numb [5]) | retbit(numb [7]) | retbit(numb [10])) nexty = 1;
//if (retbit(numb [j]) | retbit(numb [i]))
nexty = 1;
} else nexty = 0;
ix++;
}
/*
for (i = 0; i < len; i++)
{
if (name [i] > 96) name [i] -= 97;
}
*/
switch(ncase)
{
case 2:
for (i = 0; i < len + 1; i ++)
{
if (i > 3 && name [i] == 0 && name [i + 1] == 0)
{
name [i] = 0;
if (name [i - 1] == 32) name [i - 1] = 0;
break;
}
//break;
if (name [i] != 32 && name [i] < 30)
name [i] += 65; //97;
if (name [i] > 96) name [i] -= 32;
//if (name [i] < 65 | name [i] > 90) name [i] = 85;
}
//name [i + 1] = 0;
break;
case 0:
for (i = 0; i < len; i ++)
{
if (name [i] != 32 && name [i] < 30)
name [i] += 97;
}
break;
case 1:
name [i] += 65;
for (i = 1; i < len; i ++)
{
if (name [i] != 32 && name [i] < 30)
name [i] += 97; //97;
}
break;
}
//clrscr();
strcpy(glag, name);
//strncpy(outp, name, len);
//outp [len] = '\0';
//cprintf(outp);
//cprintf(name);
//cprintf("\n\r");
//i = getch();
//goto beginn;
/*
if (ncase == 2)
{
for (i = 0; i < 30; i ++)
{
if
}
}
*/
//free(glag);
return glag;
two_letter : //goto hello;
//strcat(name, "xx");
//goto hello;
if (nexty == 1) goto hello;
if (!is_a_vowel(name [i - 1])) goto hello;
i ++;
switch(i * (retbit(j) + 1))
{
case 0: strcat(name, "sh"); break;
case 1: strcat(name, "ch"); break;
case 2: strcat(name, "tz"); break;
case 3: strcat(name, "ts"); break;
case 4: strcat(name, "cs"); break;
case 5: strcat(name, "cz"); break;
case 6: strcat(name, "xt"); break;
case 7: strcat(name, "xk"); break;
case 8: strcat(name, "kl"); break;
case 9: strcat(name, "cl"); break;
case 10: strcat(name, "fr"); break;
case 11: strcat(name, "sh"); break;
case 12: strcat(name, "ch"); break;
case 13: strcat(name, "gh"); break;
case 14: strcat(name, "pr"); break;
case 15: strcat(name, "tr"); break;
case 16: strcat(name, "mn"); break;
case 17: strcat(name, "ph"); break;
case 18: strcat(name, "pn"); break;
case 19: strcat(name, "cv"); break;
case 20: strcat(name, "zx"); break;
case 21: strcat(name, "xz"); break;
case 23: strcat(name, "dd"); break;
case 24: strcat(name, "tt"); break;
case 25: strcat(name, "ll"); break;
//case 26: strcat(name, "sh"); break;
//case 12: strcat(name, "sh"); break;
//case 13: strcat(name, "sh"); break;
default:
//strcat(name, "xx");
i--;
//name [i - 1] -= 97;
goto hello;
//break;
}
//name [i] -= 97;
//name [i - 1] -= 97;
ix += 2;
goto hello;
//return 0;
} // end of make_name
char reduce(unsigned char reducee)
{
while(reducee >= 26)
{
reducee -= 26;
}
return reducee;
} // end of char reduce
char is_a_vowel(unsigned char let)
{
//if (let == 'a' | let == 'e' | let == 'i' | let == 'o' | let == 'u')
if (let == 0 | let == 4 | let == 8 | let == 14 | let == 20 | let == 24 | let == 32)
{
return 1;
} else return 0;
} // end of char reduce
/*
char *retcons(char seeds)
{
char two [2] = "";
//char *two;
//two = (char *)malloc(2);
//if (!two) cprintf("Not enough memory to allocate buffer!");
//strcpy(two, "");
//char two [2] = "";
//strcpy(two, "");
two [0] = reduce(seeds);
//free(two);
return two;
}
*/
char retvow(char sed)
{
//if (sed >= 20) return 24;
//if (sed >= 18) return 32;
while(sed > 6)
{
sed -= 6;
}
switch(sed)
{
case 0: return 0;
case 1: return 4;
case 2: return 8;
case 3: return 14;
case 4: return 20;
case 5: return 24;
case 6: return 32;
}
return 0;
}
char retbit(char sed)
{
/*while(sed > 1)
{
sed -= 2;
}*/
if (sed % 2 == 0) return 0;
return 1;
}
//Make all scrolls of a certain type in one dungeon be labelled same - have a random number which is put into item_plus for all scrolls.
void save_id(char identy [4] [30])
{
char ix = 0;
char jx = 0;
for (ix = 0; ix < 4; ix ++)
{
for (jx = 0; jx < 30; jx ++)
{
identy [ix] [jx] = id [ix] [jx];
}
}
}
// wands, scrolls, rings, potions
//static int inflin;
//static int binflin;
void initial(void)
{
char i = 0;
char j = 0;
//inflin = 0;
//binflin = 0;
for (i = 0; i < 4; i ++)
{
for (j = 0; j < 30; j ++)
{
id [i] [j] = 0;
}
}
} // end of void initial
/*
char incrline(void)
{
inflin++;
return inflin;
}
void zeroinf(void)
{
inflin = 0;
}
*/
void set_id(char cla, char ty, char setting)
{
if (cla > 99)
{
cla -= 100;
id [cla] [ty] = setting;
return;
}
switch(cla)
{
case 3: id [0] [ty] = setting; break;
case 6: id [1] [ty] = setting; break;
case 7: id [2] [ty] = setting; break;
case 8: id [3] [ty] = setting; break;
// if it's none of these, will just return
}
} // end of void set_id
char get_id(char cla, char ty)
{
if (cla > 99)
{
cla -= 100;
return id [cla] [ty];
}
switch(cla)
{
case 3: return id [0] [ty];
case 6: return id [1] [ty];
case 7: return id [2] [ty];
case 8: return id [3] [ty];
// if it's none of these, will just return
}
return 0;
} // end of char get_id
char message(char inf [78] [78], int inf_lines, char scrloc)
{
int over_check = 0;// stops the printing of too many lines.
char jg = 0;
char inf_screens = 0;
int i = 0;
//static char store_message [78] [78];
window(2, 18, 78, 25);
//clrscr();
if (inf_lines == 0) return;
//inf_screens = inf_lines / 8 + 1;
textcolor(7);
if (scrloc == 8)
{
more();
clrscr();
scrloc = 1;
}
gotoxy(1, scrloc);
cprintf(inf [0]);
strcpy(store_message [store_count], inf [0]);
store_count ++;
if (store_count > 23) store_count = 0;
strcpy(store_message [store_count], "------------------------------------------------------------------------------");
//for (i = 0; i < 79; i ++)
//{
// store_message [store_count] [i] = 196;
//}
/*
for (me_c = 0; me_c < inf_screens; me_c++)
{
if (inf_lines - me_c * 8 > 8) over_check = 8;
else over_check = inf_lines - me_c * 8;
for (jg = 0; jg < over_check; jg++)
{
gotoxy(1, jg + 1);
cprintf(inf [jg + me_c * 8]);
textcolor(7); textbackground(0);
}
if (inf_screens > me_c + 1 && inf_lines - (me_c + 1) * 8 != 0)// && inf_screens != 1)
{
gotoxy(1 , 8);
more();
clrscr();
}
//if (me_c = 5)
} // end of me_c loop.
*/
inf_screens = 0;
//inf_lines = 0;
return scrloc;
} // end of message function
void replay_messages(void)
{
// char st_pass [60];
int i;
char buffer[4800];
window(1, 1, 80, 25);
gettext(1, 1, 80, 25, buffer);
clrscr();
gotoxy(1,1);
for (i = 0; i < 24; i ++)
{
cprintf(store_message [i]);
cprintf("\n\r");
}
getch();
putty : puttext(1, 1, 80, 25, buffer);
return;
}
/*
void message(char inf [78] [78], int inf_lines)
{
int over_check = 0;// stops the printing of too many lines.
int me_c; // loop variable - after all, lots of functions call this one.
//char ig = 0;
char jg = 0;
char inf_screens = 0;
//char n_lines = inflin;
window(2, 16, 78, 24);
clrscr();
//inf_lines--;
if (inf_lines == 0) return;
inf_screens = inf_lines / 8 + 1;
textcolor (7);
for (me_c = 0; me_c < inf_screens; me_c++)
{
if (inf_lines - me_c * 8 > 8) over_check = 8;
else over_check = inf_lines - me_c * 8;
for (jg = 0; jg < over_check; jg++)
{
gotoxy(1, jg + 1);
//if (inf [jg + me_c * 8] [0] == 95) // reversing
//{
// textcolor(0); textbackground(7);
// inf [jg + me_c * 8] [0] = 32;
//}
cprintf(inf [jg + me_c * 8]);
textcolor(7); textbackground(0);
}
if (inf_screens > me_c + 1 && inf_lines - (me_c + 1) * 8 != 0)// && inf_screens != 1)
{
gotoxy(1 , 8);
more();
clrscr();
}
//if (me_c = 5)
} // end of me_c loop.
//binflin = inflin;
inf_screens = 0;
inf_lines = 0;
//line_no++;
// if (line_no >9)
// {
// clrscr();
// line_no = 9;
// }
//if (keyin == 59) more();
//char *fdg;
//fdg = 'h';
//return fdg;
} // end of message function
*/
char item_name_2(char item_clas, char item_typ, unsigned char item_da, unsigned char it_plus, unsigned int it_quant, char ident_lev, char glog [60])
{
//char *glog;
//char gmon_name [60] = "";
char tmp_quant [5];
//glog = (char *)malloc(60);
//if (!glog) cprintf("Not enough memory to allocate buffer!");
strcpy(glog, "");
// Put in cursed??
// Look at: item_plus is unsigned, so what happens when a -ve weapon is
// uncursed?
switch(item_clas)
{
case 0: // weapons
if (ident_lev > 0)
{
if (it_plus >= 130)
{
strcat(glog, "cursed ");
}
}
if (ident_lev > 2)
{
/*
int hogh = it_plus - 50;
int tohit = 0;
int todam = 0;
if (hogh > 80)
{
hogh -= 100;
itoa(hogh, tmp_quant, 10);
strcat(glog, tmp_quant);
} else
{
//hogh -= 100;
tohit = hogh / 10;
todam = hogh % 10;
if (tohit == todam)
{
itoa(tohit, tmp_quant, 10);
strcat(glog, "+");
strcat(glog, tmp_quant);
strcat(glog, " ");
} else
{
itoa(tohit, tmp_quant, 10);
strcat(glog, "+");
strcat(glog, tmp_quant);
strcat(glog, "/");
strcat(glog, "+");
itoa(todam, tmp_quant, 10);
strcat(glog, tmp_quant);
strcat(glog, " ");
}
} // end of else
*/
if (it_plus >= 50 && (it_plus <= 130 | it_plus >= 150)) strcat(glog, "+");
itoa(it_plus - 50, tmp_quant, 10);
if (it_plus > 130) itoa((it_plus - 150), tmp_quant, 10);
strcat(glog, tmp_quant);
strcat(glog, " ");
// if (item_da >= 50 && (item_da <= 130 | item_da >= 150)) strcat(glog, "+");
// itoa(item_da - 50, tmp_quant, 10);
// if (it_plus > 130) itoa((it_plus - 150), tmp_quant, 10);
// itoa(item_da, tmp_quant, 10);
// strcat(glog, tmp_quant);
// strcat(glog, " ");
}
if (item_da > 180)
{
if (ident_lev > 0)
{
switch(item_da - 180)
{
case 1: strcat(glog , "Singing Sword"); break;
case 2: strcat(glog , "Wrath of Trog"); break;
case 3: strcat(glog , "Scythe of Curses"); break;
case 4: strcat(glog , "Mace of Variability"); break;
case 5: strcat(glog , "Glaive of Prune"); break;
case 6: strcat(glog , "S"); break;
case 7: strcat(glog , ""); break;
case 8: strcat(glog , ""); break;
case 9: strcat(glog , ""); break;
}
break;
} // end if ident_lev
switch(item_da - 180)
{
case 1: strcat(glog , "golden long sword"); break;
case 2: strcat(glog , "bloodstained battleaxe"); break;
case 3: strcat(glog , "warped scythe"); break;
case 4: strcat(glog , "shimmering mace"); break;
case 5: strcat(glog , "purple glaive"); break;
case 6: strcat(glog , ""); break;
case 7: strcat(glog , ""); break;
case 8: strcat(glog , ""); break;
case 9: strcat(glog , ""); break;
}
break;
} // end uniques
//if (ident_lev <= 2 | item_da % 30 == 0)
if (item_da % 30 == 0)
{
switch(item_da / 30)
{
case 1:
if (item_typ == 0 | (item_typ <= 18 && item_typ >= 13))
strcat(glog, ""); else
strcat(glog, "shiny "); break;
case 2: strcat(glog, "ancient "); break;
case 3: strcat(glog, "glowing "); break;
case 4: strcat(glog, "ornate "); break;
case 5: strcat(glog, "runed "); break;
// case 6: strcat(glog, ""); break;
} // end switch
} // end if
switch(item_typ)
{
case 0: strcat(glog , "club"); break;
case 1: strcat(glog , "mace"); break;
case 2: strcat(glog , "flail"); break;
case 3: strcat(glog , "dagger"); break;
case 4: strcat(glog , "spiked mace"); break;
case 5: strcat(glog , "short sword"); break;
case 6: strcat(glog , "long sword"); break;
case 7: strcat(glog , "great sword"); break;
case 8: strcat(glog , "scimitar"); break;
case 9: strcat(glog , "hand axe"); break;
case 10: strcat(glog , "battleaxe"); break;
case 11: strcat(glog , "spear"); break;
case 12: strcat(glog , "halberd"); break;
case 13: strcat(glog , "sling"); break;
case 14: strcat(glog , "bow"); break;
case 15: strcat(glog , "crossbow"); break;
case 16: strcat(glog , "hand crossbow"); break;
case 17: strcat(glog , "glaive"); break;
case 18: strcat(glog , "quarterstaff"); break;
case 19: strcat(glog , "scythe"); break;
case 20: strcat(glog , "giant club"); break;
case 21: strcat(glog , "giant spiked club"); break;
}
if (ident_lev > 1)
{
switch(item_da % 30)
{
case 0: break;
case 1: strcat(glog, " of flaming"); break;
case 2: strcat(glog, " of freezing"); break;
case 3: strcat(glog, " of holy wrath"); break;
case 4: strcat(glog, " of electrocution"); break;
case 5: strcat(glog, " of orc slaying"); break;
case 6: strcat(glog, " of venom"); break;
case 7: strcat(glog, " of protection"); break;
case 8: strcat(glog, " of draining"); break;
}
}
// Hellbrand; zap to reduce plus by 1 and cast hellfire?
break;
case 1: // ammunition
if (ident_lev > 0)
{
unsigned char gokh = it_plus;
//it_plus -= 50;
if (gokh >= 50 && (gokh <= 130 | gokh >= 150)) strcat(glog, "+");
itoa(gokh - 50, tmp_quant, 10);
if (gokh > 130) itoa((gokh - 150), tmp_quant, 10);
strcat(glog, tmp_quant);
strcat(glog, " ");
}
switch(item_typ)
{
case 0: strcat(glog , "stone"); break;
case 1: strcat(glog , "arrow"); break;
case 2: strcat(glog , "bolt"); break;
case 3: strcat(glog , "dart"); break;
case 4: strcat(glog , "eggplant"); break;
case 5: strcat(glog , "large rock"); break;
case 6: strcat(glog , ""); break;
case 7: strcat(glog , ""); break;
case 8: strcat(glog , ""); break;
case 9: strcat(glog , ""); break;
case 10: strcat(glog , ""); break;
case 12: strcat(glog , ""); break;
case 13: strcat(glog , ""); break;
case 14: strcat(glog , ""); break;
case 15: strcat(glog , ""); break;
case 16: strcat(glog , ""); break;
} break;
//break;
case 2: // armour
if (ident_lev > 0)
{
if (it_plus >= 130)
{
strcat(glog, "cursed ");
}
}
if (ident_lev > 2)
{
if (it_plus >= 50 && (it_plus <= 130 | it_plus >= 150)) strcat(glog, "+");
itoa(it_plus - 50, tmp_quant, 10);
if (it_plus > 130) itoa((it_plus - 150), tmp_quant, 10);
strcat(glog, tmp_quant);
//itoa(it_plus, tmp_quant, 10);
//strcat(glog, tmp_quant);
strcat(glog, " ");
}
if (item_typ == 11 | item_typ == 12) strcat(glog, "pair of ");
if (ident_lev < 2 | item_da % 30 == 0)
{
if (item_typ != 10)
{
switch(item_da / 30)
{
case 1:
if (item_typ == 0 | item_typ == 9 | item_typ == 11 | item_typ == 12)