Skip to content

Commit f30f6e1

Browse files
committed
Fix: remove forge quality from artifacts obtained via crowning.
Noticed this while playing as a caveman. I had a spear of superior quality, had it wielded when I prayed to my deity while standing on a co-aligned altar (lawful). Deity crowned me, transformed my spear into Giantslayer, and I noticed the forge quality was still present. Artifacts aren't supposed to have any level of forge quality other than 'normal' (meaning none).
1 parent 595e67e commit f30f6e1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -4347,4 +4347,5 @@ The following changes to date are:
43474347
always return
43484348
- Deer/Stag can make sounds (MS_SQEEK)
43494349
- Edit evilhack-changelog.md so no entries go past 72 characters per row
4350+
- Fix: remove forge quality from artifacts obtained via crowning
43504351

src/pray.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -1217,8 +1217,9 @@ gcrownu()
12171217
curse(obj);
12181218
else
12191219
bless(obj);
1220-
obj->oeroded = obj->oeroded2 = 0;
12211220
maybe_erodeproof(obj, 1);
1221+
obj->oeroded = obj->oeroded2 = 0;
1222+
obj->forged_qual = FQ_NORMAL;
12221223
obj->bknown = obj->rknown = 1; /* ok to skip set_bknown() */
12231224
if (obj->spe < 1)
12241225
obj->spe = 1;
@@ -2780,6 +2781,8 @@ dosacrifice()
27802781
} else {
27812782
if ((u.ualign.abuse * -1) < 30)
27822783
bless(otmp);
2784+
else
2785+
otmp->blessed = otmp->cursed = 0;
27832786
}
27842787
otmp->spe = enchantment;
27852788
maybe_erodeproof(otmp, 1);
@@ -2835,10 +2838,13 @@ dosacrifice()
28352838
} else {
28362839
if ((u.ualign.abuse * -1) < 30)
28372840
bless(otmp);
2841+
else
2842+
otmp->blessed = otmp->cursed = 0;
28382843
}
28392844
otmp->spe = enchantment;
28402845
maybe_erodeproof(otmp, 1);
28412846
otmp->oeroded = otmp->oeroded2 = 0;
2847+
otmp->forged_qual = FQ_NORMAL;
28422848
if (altaralign > A_CHAOTIC) /* lawful or neutral altar */
28432849
otmp->opoisoned = otmp->otainted = 0;
28442850
at_your_feet("An object");

0 commit comments

Comments
 (0)