-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathartifact.c
1922 lines (1548 loc) · 45.8 KB
/
artifact.c
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
/*
artifact.c - functions for dealing with artifacts
UltraRogue: The Ultimate Adventure in the Dungeons of Doom
Copyright (C) 1985, 1986, 1992, 1993, 1995 Herb Chong
All rights reserved.
See the file LICENSE.TXT for full copyright and licensing information.
*/
#include <stdlib.h>
#include <ctype.h>
#include "rogue.h"
/*
apply()
apply an artifact
*/
void
apply(void)
{
struct linked_list *item;
struct object *obj;
int which;
int chance;
if ((item = get_item("activate", ARTIFACT)) == NULL)
return;
obj = OBJPTR(item);
which = obj->o_which;
if (!(obj->ar_flags & ISACTIVE))
{
chance = rnd(100) - 10 * rnd(luck);
debug("Rolled %d.", chance);
if (chance < 5)
do_major();
else if (chance < 50)
do_minor(obj);
else
obj->ar_flags |= ISACTIVE;
}
if (obj->ar_flags & ISACTIVE)
{
switch (which)
{
case TR_PURSE: do_bag(obj);
break;
case TR_PHIAL: do_phial();
break;
case TR_AMULET: do_amulet();
break;
case TR_PALANTIR: do_palantir();
break;
case TR_CROWN: do_crown();
break;
case TR_SCEPTRE: do_sceptre();
break;
case TR_SILMARIL: do_silmaril();
break;
case TR_WAND: do_wand();
break;
default: nothing_message(ISCURSED);
return;
}
}
if (rnd(pstats.s_lvl) < 6)
do_minor(obj);
turn_on(player, POWEREAT);
}
/*
possessed(int artifact)
was the hero carrying a particular artifact
*/
int
possessed(int artifact)
{
return (picked_artifact >> artifact) & 1;
}
/*
is_carrying(int artifact)
is the hero carrying a particular artifact
*/
int
is_carrying(int artifact)
{
return (has_artifact >> artifact) & 1;
}
/*
make_artifact()
is it time to make a new artifact?
*/
int
make_artifact(void)
{
int i;
mpos = 0;
debug("Artifact possession and picked flags : %x %x.",
has_artifact, picked_artifact);
for(i = 0; i < maxartifact; i++)
{
if (!is_carrying(i) && arts[i].ar_level <= level)
return TRUE;
}
return FALSE;
}
/*
new_artifact(int which, struct object *cur)
make a specified artifact
*/
struct object *
new_artifact(int which, struct object *cur)
{
if (which >= maxartifact)
{
debug("Bad artifact %d. Random one created.", which);
which = rnd(maxartifact);
}
if (which < 0)
{
for (which = 0; which < maxartifact; which++)
if (!is_carrying(which) && arts[which].ar_level <= level)
break;
}
debug("Artifact number: %d.", which);
cur->o_hplus = cur->o_dplus = 0;
cur->o_damage = cur->o_hurldmg = "0d0";
cur->o_ac = 11;
cur->o_mark[0] = '\0';
cur->o_type = ARTIFACT;
cur->o_which = which;
cur->o_weight = arts[which].ar_weight;
cur->o_flags = 0;
cur->o_group = 0;
cur->o_count = 1;
cur->o_bag = NULL;
cur->ar_flags = 0;
return(cur);
}
/*
do_minor(struct object *tr)
side effects and minor malevolent effects of artifacts
*/
void
do_minor(struct object *tr)
{
int which;
long loss;
which = rnd(110);
debug("Rolled %d.", which);
switch (which)
{
case 0:
seemsg("You develop some acne on your face.");
break;
case 1:
if (on(player, CANSCENT))
{
msg("A sudden whiff of BO causes you to faint.");
no_command = STONETIME;
}
else if (off(player, ISUNSMELL))
msg("You begin to smell funny.");
break;
case 2:
seemsg("A wart grows on the end of your nose.");
break;
case 3:
hearmsg("Your hear strange noises in the distance.");
break;
case 4:
hearmsg("You hear shuffling in the distance.");
break;
case 5:
hearmsg("You hear clanking in the distance.");
break;
case 6:
hearmsg("You hear water dripping onto the floor.");
break;
case 7:
hearmsg("The dungeon goes strangely silent.");
break;
case 8:
msg("You suddenly feel very warm.");
break;
case 9:
msg("You feel very hot.");
break;
case 10:
msg("A blast of heat hits you.");
break;
case 11:
{
struct room *rp;
if (off(player, ISBLIND))
msg("A pillar of flame leaps up beside you.");
else
msg("You feel something very hot nearby.");
if (ntraps + 1 < 2 * MAXTRAPS &&
fallpos(hero, &traps[ntraps].tr_pos))
{
mvaddch(traps[ntraps].tr_pos.y, traps[ntraps].tr_pos.x,
FIRETRAP);
traps[ntraps].tr_type = FIRETRAP;
traps[ntraps].tr_flags = ISFOUND;
traps[ntraps].tr_show = FIRETRAP;
ntraps++;
if ((rp = roomin(hero)) != NULL)
{
rp->r_flags &= ~ISDARK;
light(&hero);
mvwaddch(cw, hero.y, hero.x, PLAYER);
}
}
}
break;
case 12:
msg("You feel a blast of hot air.");
break;
case 13:
msg("You feel very cold.");
break;
case 14:
msg("You break out in a cold sweat.");
break;
case 15:
if (off(player, ISBLIND) && cur_armor == NULL)
msg("You are covered with frost.");
else if (off(player, ISBLIND))
msg("Your armor is covered with frost.");
else if (cur_armor == NULL)
msg("Your body feels very cold and you begin to shiver.");
else
msg("Your armor feels very cold. You hear cracking ice.");
break;
case 16:
msg("A cold wind whistles through the dungeon.");
break;
case 17:
{
int change;
change = 18 - pstats.s_str;
chg_str(change, TRUE, FALSE);
chg_dext(-change, TRUE, FALSE);
if (change > 0)
msg("You feel stronger and clumsier now.");
else if (change < 0)
msg("You feel weaker and more dextrous now.");
else
nothing_message(ISCURSED);
}
break;
case 18:
msg("You begin to itch all over.");
break;
case 19:
msg("You begin to feel hot and itchy.");
break;
case 20:
msg("You feel a burning itch.");
chg_dext(-1, FALSE, TRUE);
if (off(player, HASITCH))
{
turn_on(player, HASITCH);
light_fuse(FUSE_UNITCH, 0, roll(4,6), AFTER);
}
else
lengthen_fuse(FUSE_UNITCH, roll(4,6));
break;
case 21:
if (off(player, ISBLIND))
msg("Your skin begins to flake and peel.");
else
msg("You feel an urge to scratch an itch.");
break;
case 22:
seemsg("Your hair begins to turn grey.");
break;
case 23:
seemsg("Your hair begins to turn white.");
break;
case 24:
seemsg("Some of your hair instantly turns white.");
break;
case 25:
seemsg("You are covered with long white hair.");
break;
case 26:
seemsg("You are covered with long red hair.");
break;
case 27:
msg("You grow a beard.");
break;
case 28:
msg("Your hair falls out.");
break;
case 29:
msg("You feel a burning down below.");
break;
case 30:
msg("Your toes fall off.");
break;
case 31:
msg("You grow some extra toes.");
break;
case 32:
msg("You grow some extra fingers.");
break;
case 33:
msg("You grow an extra thumb.");
break;
case 34:
msg("Your nose falls off.");
break;
case 35:
msg("Your nose gets bigger.");
break;
case 36:
msg("Your nose shrinks.");
break;
case 37:
msg("An eye grows on your forehead.");
break;
case 38:
seemsg("You see beady eyes watching from a distance.");
break;
case 39:
msg("The dungeon rumbles for a moment.");
break;
case 40:
seemsg("A flower grows on the floor next to you.");
break;
case 41:
msg("You are stunned by a psionic blast.");
if (on(player, ISHUH))
lengthen_fuse(FUSE_UNCONFUSE, rnd(40) + (HUHDURATION * 3));
else
{
light_fuse(FUSE_UNCONFUSE,0,rnd(40)+(HUHDURATION * 3), AFTER);
turn_on(player, ISHUH);
}
break;
case 42:
msg("You are confused by thousands of voices in your head.");
if (on(player, ISHUH))
lengthen_fuse(FUSE_UNCONFUSE, rnd(10) + (HUHDURATION * 2));
else
{
light_fuse(FUSE_UNCONFUSE,0,rnd(10)+(HUHDURATION * 2), AFTER);
turn_on(player, ISHUH);
}
break;
case 43:
hearmsg("You hear voices in the distance.");
break;
case 44:
msg("You feel a strange pull.");
teleport();
if (off(player, ISCLEAR))
{
if (on(player, ISHUH))
lengthen_fuse(FUSE_UNCONFUSE, rnd(8) + HUHDURATION);
else
{
light_fuse(FUSE_UNCONFUSE, 0, rnd(8) + HUHDURATION, AFTER);
turn_on(player, ISHUH);
}
}
break;
case 45:
msg("You feel less healthy now.");
pstats.s_const = max(pstats.s_const - 1, 3);
max_stats.s_const = max(max_stats.s_const - 1, 3);
break;
case 46:
msg("You feel weaker now.");
chg_str(-1, TRUE, FALSE);
break;
case 47:
msg("You feel less wise now.");
pstats.s_wisdom = max(pstats.s_wisdom - 1, 3);
max_stats.s_wisdom = max(max_stats.s_wisdom - 1, 3);
break;
case 48:
msg("You feel less dextrous now.");
chg_dext(-1, TRUE, FALSE);
break;
case 49:
msg("You feel less intelligent now.");
pstats.s_intel = max(pstats.s_intel - 1, 3);
max_stats.s_intel = max(max_stats.s_intel - 1, 3);
break;
case 50:
msg("A trap door opens underneath your feet.");
mpos = 0;
level++;
new_level(NORMLEV,0);
if (rnd(4) < 2)
{
addmsg("You are damaged by the fall");
if ((pstats.s_hpt -= roll(1, 6)) <= 0)
{
addmsg("! The fall killed you.");
endmsg();
death(D_FALL);
return;
}
}
addmsg("!");
endmsg();
if (off(player, ISCLEAR) && rnd(4) < 3)
{
if (on(player, ISHUH))
lengthen_fuse(FUSE_UNCONFUSE, rnd(8) + HUHDURATION);
else
light_fuse(FUSE_UNCONFUSE, 0, rnd(8) + HUHDURATION, AFTER);
turn_on(player, ISHUH);
}
else
msg("You feel dizzy for a moment, but it quickly passes.");
break;
case 51:
msg("A maze entrance opens underneath your feet.");
mpos = 0;
level++;
new_level(MAZELEV,0);
if (rnd(4) < 2)
{
addmsg("You are damaged by the fall");
if ((pstats.s_hpt -= roll(1, 6)) <= 0)
{
addmsg("! The fall killed you.");
endmsg();
death(D_FALL);
return;
}
}
addmsg("!");
endmsg();
if (off(player, ISCLEAR) && rnd(4) < 3)
{
if (on(player, ISHUH))
lengthen_fuse(FUSE_UNCONFUSE, rnd(8) + HUHDURATION);
else
light_fuse(FUSE_UNCONFUSE,0, rnd(8) + HUHDURATION, AFTER);
turn_on(player, ISHUH);
}
else
msg("You feel dizzy for a moment, but it quickly passes.");
break;
case 52:
hearmsg("You hear a wailing sound in the distance.");
aggravate();
break;
case 53:
read_scroll(&player, S_HOLD, ISCURSED);
break;
case 54:
msg("You can't move.");
no_command = 3 * HOLDTIME;
break;
case 55:
hearmsg("You hear a buzzing sound.");
aggravate();
break;
case 56:
msg("Your limbs stiffen.");
no_command = 3 * STONETIME;
break;
case 57:
msg("You feel a rock in your shoe hurting your foot.");
turn_on(player, STUMBLER);
break;
case 58:
msg("You get a hollow feeling in your stomach.");
food_left -= 500;
break;
case 59:
msg("Your purse feels lighter.");
loss = 50L + ulrnd(purse / 2L);
purse = (purse > loss) ? purse - loss : 0L;
break;
case 60:
msg("A pixie appears and grabs gold from your purse.");
loss = 50L + rnd(50);
purse = (purse > loss) ? purse - loss : 0L;
break;
case 61:
msg("You feel a tingling sensation all over.");
pstats.s_hpt -= ulrnd(pstats.s_hpt / 3L);
break;
case 62:
msg("You feel a pull downwards.");
break;
case 63:
msg("You feel a strange pull downwards.");
break;
case 64:
msg("You feel a peculiar pull downwards.");
break;
case 65:
msg("You have a strange urge to go down.");
break;
case 66:
msg("You feel a pull upwards.");
break;
case 67:
msg("You feel a strange pull upwards.");
break;
case 68:
msg("You have a strange feeling for a moment.");
break;
case 69:
msg("You float in the air for a moment.");
break;
case 70:
msg("You feel very heavy for a moment.");
break;
case 71:
msg("You feel a strange sense of loss.");
break;
case 72:
msg("You feel the earth spinning underneath your feet.");
break;
case 73:
msg("You feel in touch with a Universal Oneness.");
break;
case 74:
hearmsg("You hear voices in the distance.");
break;
case 75:
msg("A strange feeling of power comes over you.");
break;
case 76:
msg("You feel a strange sense of unease.");
break;
case 77:
msg("You feel Lady Luck is looking the other way.");
luck++;
break;
case 78:
msg("You feel your pack vibrate for a moment.");
break;
case 79:
msg("You feel someone is watching you.");
break;
case 80:
msg("You feel your hair standing on end.");
break;
case 81:
msg("Wait! The walls are moving!");
new_level(NORMLEV,0);
break;
case 82:
msg("Wait! Walls are appearing out of nowhere!");
new_level(MAZELEV,0);
break;
case 83:
blue_light(ISCURSED);
break;
case 84:
msg("Your mind goes blank for a moment.");
wclear(cw);
light(&hero);
status(TRUE);
break;
case 85:
if (on(player, ISDEAF))
{
msg("You feel your ears burn for a moment.");
lengthen_fuse(FUSE_HEAR, 2 * PHASEDURATION);
}
else
{
msg("You are suddenly surrounded by silence.");
turn_on(player, ISDEAF);
light_fuse(FUSE_HEAR, 0, 2 * PHASEDURATION, AFTER);
}
break;
case 86:
{
apply_to_bag(pack, 0, NULL, baf_curse, NULL);
if (off(player, ISUNSMELL))
msg("You smell a faint trace of burning sulfur.");
}
break;
case 87:
msg("You have contracted a parasitic infestation.");
infest_dam++;
turn_on(player, HASINFEST);
break;
case 88:
msg("You suddenly feel a chill run up and down your spine.");
turn_on(player, ISFLEE);
player.t_ischasing = FALSE;
player.t_chasee = &player;
break;
case 89:
if (cur_weapon != NULL)
msg("You feel your %s get very hot.",
inv_name(cur_weapon, LOWERCASE));
break;
case 90:
if (cur_weapon != NULL)
msg("Your %s glows white for an instant.",
inv_name(cur_weapon, LOWERCASE));
break;
case 91:
if (cur_armor != NULL)
msg("Your %s gets very hot.", inv_name(cur_armor, LOWERCASE));
break;
case 92:
if (cur_weapon != NULL)
msg("Your %s suddenly feels very cold.",
inv_name(cur_weapon, LOWERCASE));
break;
case 93:
if (cur_armor != NULL)
msg("Your armor is covered by an oily film.");
break;
case 94:
read_scroll(&player, S_CREATE, ISNORMAL);
break;
case 95:
lower_level(D_POTION);
break;
case 96:
{
int x, y;
for (x = -1; x <= 1; x++)
{
for (y = -1; y <= 1; y++)
{
if (x == 0 && y == 0)
continue;
delta.x = x;
delta.y = y;
do_zap(&player, WS_POLYMORPH, rnd(2)
? ISCURSED : ISNORMAL);
}
}
}
break;
case 97:
{
int x, y;
for (x = -1; x <= 1; x++)
{
for (y = -1; y <= 1; y++)
{
if (x == 0 && y == 0)
continue;
delta.x = x;
delta.y = y;
do_zap(&player, WS_INVIS, ISNORMAL);
}
}
}
break;
default:
tr->ar_flags &= ~ISACTIVE;
hearmsg("You hear a click coming from %s.",inv_name(tr,LOWERCASE));
break;
}
}
/*
do_major()
major malevolent effects
0. read_scroll(S_SELFTELEPORT, ISCURSED)
1. PERMBLIND for twice normal duration
2. new_level(THRONE);
3. turn_on(player, SUPEREAT);
4. lengthen(noslow, 20 + rnd(20));
5. lower_level(D_POTION) * roll(1,4)
6. change stats
7. FIRETRAP
8. armor crumbles
9. weapon crumbles
10. weapon crumbles
11. curse weapon
*/
void
do_major(void)
{
int which;
which = rnd(12);
debug("Rolled %d.", which);
switch (which)
{
case 0:
read_scroll(&player, S_SELFTELEP, ISCURSED);
break;
case 1:
quaff(&player, P_TRUESEE, ISCURSED);
quaff(&player, P_TRUESEE, ISCURSED);
break;
case 2:
new_level(THRONE,0);
break;
case 3: /* Turn off other body-affecting spells */
if (on(player, ISREGEN))
{
extinguish_fuse(FUSE_UNREGEN);
turn_off(player, ISREGEN);
unregen(NULL);
}
if (on(player, NOCOLD))
{
extinguish_fuse(FUSE_UNCOLD);
turn_off(player, NOCOLD);
uncold(NULL);
}
if (on(player, NOFIRE))
{
extinguish_fuse(FUSE_UNHOT);
turn_off(player, NOFIRE);
unhot(NULL);
}
if (on(player, SUPEREAT))
{
lengthen_fuse(FUSE_UNSUPEREAT, 2 * PHASEDURATION);
msg("Your body temperature rises still further.");
}
else
{
msg("You feel very warm all over.");
light_fuse(FUSE_UNSUPEREAT, 0, 2 * PHASEDURATION, AFTER);
turn_on(player, SUPEREAT);
}
break;
case 4:
msg("You feel yourself moving %sslower.",
on(player, ISSLOW) ? "even " : "");
if (on(player, ISSLOW))
lengthen_fuse(FUSE_NOSLOW, PHASEDURATION);
else
{
turn_on(player, ISSLOW);
player.t_turn = TRUE;
light_fuse(FUSE_NOSLOW, 0, PHASEDURATION, AFTER);
}
break;
case 5:
{
int i, n = roll(1, 4);
for (i = 1; i < n; i++)
lower_level(D_POTION);
}
break;
case 6:
if (rnd(2))
add_intelligence(TRUE);
if (rnd(2))
chg_dext(-1, TRUE, FALSE);
if (rnd(2))
chg_str(-1, TRUE, FALSE);
if (rnd(2))
add_wisdom(TRUE);
if (rnd(2))
add_const(TRUE);
break;
case 7:
{
struct room *rp;
if (ntraps + 1 >= MAXTRAPS)
{
msg("You feel a puff of hot air.");
return;
}
for (; ntraps < 2 * MAXTRAPS; ntraps++)
{
if (!fallpos(hero, &traps[ntraps].tr_pos))
break;
mvaddch(traps[ntraps].tr_pos.y, traps[ntraps].tr_pos.x,
FIRETRAP);
traps[ntraps].tr_type = FIRETRAP;
traps[ntraps].tr_flags |= ISFOUND;
traps[ntraps].tr_show = FIRETRAP;
if ((rp = roomin(hero)) != NULL)
rp->r_flags &= ~ISDARK;
}
}
break;
case 8:
{
object *obj;
if (cur_weapon == NULL)
{
msg("You feel your hands tingle a moment.");
pstats.s_dmg = "1d2";
return;
}
obj = apply_to_bag(pack, 0, NULL, bafcweapon, NULL);
if (obj->o_flags & ISMETAL)
msg("Your %s melts and disappears.",
inv_name(obj,LOWERCASE));
else
msg("Your %s crumbles in your hands.",
inv_name(obj, LOWERCASE));
obj->o_flags &= ~ISCURSED;
dropcheck(obj);
del_bag(pack, obj);
}
break;
case 9:
{
object *obj;
if (cur_armor == NULL)