Add shields of shock resistance and of drain resistance

These both appear as "wooden shield" when unidentified; so does the
small shield.
This commit is contained in:
Alex Smith
2026-03-18 22:16:22 +00:00
parent ea023677c7
commit 5d3a1e684b
6 changed files with 60 additions and 9 deletions

View File

@@ -706,10 +706,12 @@ Shield_on(void)
{
/* no shield currently requires special handling when put on, but we
keep this uncommented in case somebody adds a new one which does
[reflection is handled by setting u.uprops[REFLECTION].extrinsic
[the magical shields are handled by setting u.uprops[*].extrinsic
in setworn() called by armor_or_accessory_on() before Shield_on()] */
switch (uarms->otyp) {
case SMALL_SHIELD:
case SHIELD_OF_DRAIN_RESISTANCE:
case SHIELD_OF_SHOCK_RESISTANCE:
case ELVEN_SHIELD:
case URUK_HAI_SHIELD:
case ORCISH_SHIELD:
@@ -736,6 +738,8 @@ Shield_off(void)
keep this uncommented in case somebody adds a new one which does */
switch (uarms->otyp) {
case SMALL_SHIELD:
case SHIELD_OF_DRAIN_RESISTANCE:
case SHIELD_OF_SHOCK_RESISTANCE:
case ELVEN_SHIELD:
case URUK_HAI_SHIELD:
case ORCISH_SHIELD:

View File

@@ -603,8 +603,10 @@ knows_class(char sym)
*/
for (ct = svb.bases[(uchar) sym]; ct < svb.bases[(uchar) sym + 1]; ct++) {
/* not flagged as magic but shouldn't be pre-discovered */
if (ct == CORNUTHAUM || ct == DUNCE_CAP)
/* not flagged as magic but shouldn't be pre-discovered
(small shields look the same as two types of magical shield;
cornuthaum / dunce cap look the same as each other) */
if (ct == CORNUTHAUM || ct == DUNCE_CAP || ct == SMALL_SHIELD)
continue;
if (sym == WEAPON_CLASS) {
odummy.otyp = ct; /* update 'o' */