Skip to content

Commit 4a11e79

Browse files
committed
Don't penalize a priest's alignment if they try to use a bladed artifact weapon.
Now that priests can receive slashing/piercing artifact weapons again, make it so they don't take a hit to their alignment if they try and use it. Right now this covers all artifacts, not just gifted ones. The to-hit penalty is still in effect.
1 parent ad2d578 commit 4a11e79

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

doc/evilhack-changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -3988,4 +3988,6 @@ The following changes to date are:
39883988
- Add healing spellbook descriptions to the in-game encyclopedia
39893989
- Revert commit 0f42eff (priest altar sacrifice artifact restrictions)
39903990
- Add clerical spellbook descriptions to the in-game encyclopedia
3991+
- Don't penalize a priest's alignment if they try to use a bladed
3992+
artifact weapon
39913993

src/uhitm.c

+17-7
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,13 @@ int *attk_count, *role_roll_penalty;
393393
chance to hit, inferior ones not so much */
394394
if (uwep) {
395395
if (uwep->forged_qual == FQ_EXCEPTIONAL
396-
|| (u.twoweap
397-
&& uswapwep->forged_qual == FQ_EXCEPTIONAL)) {
396+
|| (u.twoweap
397+
&& uswapwep->forged_qual == FQ_EXCEPTIONAL)) {
398398
tmp += 1;
399399
}
400400
if (uwep->forged_qual == FQ_INFERIOR
401-
|| (u.twoweap
402-
&& uswapwep->forged_qual == FQ_INFERIOR)) {
401+
|| (u.twoweap
402+
&& uswapwep->forged_qual == FQ_INFERIOR)) {
403403
tmp -= 2;
404404
}
405405
}
@@ -580,9 +580,19 @@ register struct monst *mtmp;
580580
is_slash(uwep) ? "edged" : "piercing", ansimpleoname(uwep));
581581
exercise(A_WIS, FALSE);
582582
if (!rn2(10)) {
583-
Your("behavior has displeased %s.",
584-
align_gname(u.ualign.type));
585-
adjalign(-1);
583+
if (!uwep->oartifact) {
584+
/* priests can receive bladed weapons via altar
585+
sacrifice. don't punish them if they try to
586+
use them.
587+
588+
TODO: create a bitfield in struct artifact to
589+
flag artifacts that are actually gifted, so we
590+
can check against that instead of making all
591+
artifacts ok to try and use */
592+
Your("behavior has displeased %s.",
593+
align_gname(u.ualign.type));
594+
adjalign(-1);
595+
}
586596
}
587597
}
588598

src/weapon.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,16 @@ botl_hitbonus()
250250
if (!uwep && Role_if(PM_DRUID)
251251
&& all_druid_forms(monsndx(youmonst.data)))
252252
tmp += (u.ulevel / 3) + 5;
253+
253254
if (uwep) {
254255
if (uwep->forged_qual == FQ_EXCEPTIONAL
255-
|| (u.twoweap
256-
&& uswapwep->forged_qual == FQ_EXCEPTIONAL)) {
256+
|| (u.twoweap
257+
&& uswapwep->forged_qual == FQ_EXCEPTIONAL)) {
257258
tmp += 1;
258259
}
259260
if (uwep->forged_qual == FQ_INFERIOR
260-
|| (u.twoweap
261-
&& uswapwep->forged_qual == FQ_INFERIOR)) {
261+
|| (u.twoweap
262+
&& uswapwep->forged_qual == FQ_INFERIOR)) {
262263
tmp -= 2;
263264
}
264265
}
@@ -2197,7 +2198,7 @@ struct obj *weapon;
21972198
&& (uwep->oclass == WEAPON_CLASS || is_weptool(uwep))
21982199
&& (is_pierce(uwep) || is_slash(uwep) || is_ammo(uwep))) {
21992200
/* feedback handled in attack() */
2200-
bonus = -30;
2201+
bonus = -40;
22012202
}
22022203
return bonus;
22032204
}

0 commit comments

Comments
 (0)