fix: prevent RegenMP with -cast
authoradvil <rawlins@gmail.com>
Mon, 26 Apr 2021 22:01:28 +0000 (18:01 -0400)
committeradvil <rawlins@gmail.com>
Mon, 26 Apr 2021 22:02:10 +0000 (18:02 -0400)
Inspired by:
https://www.reddit.com/r/dcss/comments/myz00g/my_candidate_for_the_most_useless_artifact_ever/

This combo is amusing but also pointless enough that I think it is worth
filtering out, similar to antimagic + MP.

crawl-ref/source/artefact.cc

index adea134..51c3b96 100644 (file)
@@ -574,11 +574,14 @@ static bool _artp_can_go_on_item(artefact_prop_type prop, const item_def &item,
         case ARTP_ANGRY:
         case ARTP_NOISE:
             return item_class == OBJ_WEAPONS && !is_range_weapon(item);
-        // only on items that can't be quickly swapped
-        case ARTP_REGENERATION:
         case ARTP_PREVENT_SPELLCASTING:
+            if (item.is_type(OBJ_JEWELLERY, AMU_MANA_REGENERATION))
+                return false;
+            // fallthrough
+        case ARTP_REGENERATION:
         case ARTP_HARM:
         case ARTP_INVISIBLE:
+            // only on items that can't be quickly swapped
             return non_swappable;
         // prevent on armour (since it's swapped infrequently) and rings (since
         // 2 slots reduces the pressure to swap)