]> granicus.if.org Git - nethack/commitdiff
Rangers always succeed in disarming bear traps
authorPasi Kallinen <paxed@alt.org>
Mon, 18 Jul 2022 14:22:19 +0000 (17:22 +0300)
committerPasi Kallinen <paxed@alt.org>
Mon, 18 Jul 2022 14:22:19 +0000 (17:22 +0300)
doc/fixes3-7-0.txt
src/trap.c

index cbdcfd0d43ecf9bbba59568268e16c580fb674bb..c61c471a29d299275474f04f1ea01b6980373e59 100644 (file)
@@ -969,6 +969,7 @@ make taming via magic harp be consistent with scroll of taming and charm
        spell:  an angry shopkeeper becomes pacified (but never tamed)
 wielding a bec de corbin makes ravens generate peaceful
 moving with 'm' prefix allows hero to enter a known pit carefully
+rangers always succeed in disarming bear traps, unless impaired
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 9c7c12b4ef651be449b0c61b9034c54f8edefbef..524d9d4714ebcaaafda74bc53f779c4237de949f 100644 (file)
@@ -4554,6 +4554,8 @@ untrap_prob(
     /* Your own traps are better known than others. */
     if (ttmp->madeby_u)
         chance--;
+    if (Role_if(PM_RANGER) && ttmp->ttyp == BEAR_TRAP && chance <= 3)
+        return 0; /* always succeeds */
     if (Role_if(PM_ROGUE)) {
         if (rn2(2 * MAXULEV) < u.ulevel)
             chance--;