]> granicus.if.org Git - nethack/commitdiff
stone-to-flesh vs Heart of Ahriman (trunk only)
authornethack.rankin <nethack.rankin>
Sat, 28 Aug 2010 00:15:39 +0000 (00:15 +0000)
committernethack.rankin <nethack.rankin>
Sat, 28 Aug 2010 00:15:39 +0000 (00:15 +0000)
     From the newsgroup:  a player accidentally cast the stone-to-flesh
spell at himself (I don't recall whether he chose wrong spell or wrong
direction, or tried to cancel and game used last remembered direction)
and the barbarian quest artifact he was carring turned into a meatball.
Artifacts already have a high chance (95%) to resist being polymorphed
but that doesn't apply for the stone-to-flesh transformation.  This
gives stone artifacts a high chance (98%) to resist being turned into
flesh.  Non-artifacts also get a small chance (2%) to resist as well.

doc/fixes35.0
src/zap.c

index 1387e900e630ee594e906004ada5aafb5fb51c6d..0ae4957a8cfc55116f0bef4d98514a78438d0109 100644 (file)
@@ -337,6 +337,7 @@ shouldn't have been able write scrolls by guessing type name when they're
        only partly known via name assignment
 scrolls given names can be written by assigned name as well as by description
 fix writing feedback "the spellbook warps strangely, then turns parchment"
+make stone artifacts usually resist stone-to-flesh
 
 
 Platform- and/or Interface-Specific Fixes
index 6a2a06f84386bc41f57ce339c9e9e6ff7bf8bfa2..5e20e6c706cad0c81403ce8271f545952412f459 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -1565,6 +1565,8 @@ struct obj *obj;
 
     if (objects[obj->otyp].oc_material != MINERAL &&
            objects[obj->otyp].oc_material != GEMSTONE) return 0;
+    /* Heart of Ahriman usually resists; ordinary items rarely do */
+    if (obj_resists(obj, 2, 98)) return 0;
 
     (void) get_obj_location(obj, &oox, &ooy, 0);
     /* add more if stone objects are added.. */