more issue #1362 - carrying Mitre of Holiness

Protect carried items as well as hero when carrying the Mitre of
Holiness.  Already handled when wearing that artifact.

This might make it be too strong.  At the time that it was given
the carrued attribute, there was no such thing as carried items
providing any protection to other carried items.
This commit is contained in:
PatR
2025-03-09 14:28:50 -07:00
parent 3b15e4fff2
commit 0a180c52ef

View File

@@ -5614,12 +5614,16 @@ u_adtyp_resistance_obj(int dmgtyp)
if (!prop)
return 0;
/* Items that give an extrinsic resistance give 99% protection to
your items */
if ((u.uprops[prop].extrinsic & (W_ARMOR | W_ACCESSORY | W_WEP)) != 0)
/* FIXME? these percentages (99 and 90) seem too high... */
/* items that give an extrinsic resistance when worn or wielded or
carried give 99% protection to your items */
if ((u.uprops[prop].extrinsic & (W_ARMOR | W_ACCESSORY | W_WEP | W_ART))
!= 0L)
return 99;
/* Dwarvish cloaks give a 90% protection to items against heat and cold */
/* worn dwarvish cloaks give 90% protection against heat and cold to
carried items */
if (uarmc && uarmc->otyp == DWARVISH_CLOAK
&& (dmgtyp == AD_COLD || dmgtyp == AD_FIRE))
return 90;