]> granicus.if.org Git - nethack/commitdiff
Make Ogresmasher grant 25 constitution
authorPasi Kallinen <paxed@alt.org>
Mon, 14 Nov 2016 18:22:33 +0000 (20:22 +0200)
committerPasi Kallinen <paxed@alt.org>
Mon, 14 Nov 2016 18:22:33 +0000 (20:22 +0200)
doc/fixes36.1
src/attrib.c
src/cmd.c
src/wield.c

index 34cdffc71571ca756bb7853ecb30dffa00ad355f..a20c06e8a88b11376a01c25c6d29bf041b9ca309 100644 (file)
@@ -354,6 +354,7 @@ put throne room gold in the chest
 wielding Trollsbane prevents trolls from reviving
 wielding Demonbane prevents demons summoning friends
 wielding Dragonbane confers reflection
+wielding Ogresmasher grants 25 constitution
 Elbereth must now be on a square by itself to function
 Elbereth now erodes based on attacks by the player, not monsters scared
 novels are made of paper, not gold
index 5c80c5ed23f3efdbd0bf8c14ac3db0f2df92d5cd..bdb1ff1f10cffced87c27a63e1a77c609deaa9ac 100644 (file)
@@ -1002,6 +1002,9 @@ int x;
             && (youmonst.data->mlet == S_NYMPH || u.umonnum == PM_SUCCUBUS
                 || u.umonnum == PM_INCUBUS))
             return (schar) 18;
+    } else if (x == A_CON) {
+        if (uwep && uwep->oartifact == ART_OGRESMASHER)
+            return (schar) 25;
     } else if (x == A_INT || x == A_WIS) {
         /* yes, this may raise int/wis if player is sufficiently
          * stupid.  there are lower levels of cognition than "dunce".
@@ -1047,6 +1050,9 @@ int attrindx;
         /* lower limit for Str can also be 25 */
         if (uarmg && uarmg->otyp == GAUNTLETS_OF_POWER)
             lolimit = hilimit;
+    } else if (attrindx == A_CON) {
+        if (uwep && uwep->oartifact == ART_OGRESMASHER)
+            lolimit = hilimit;
     }
     /* this exception is hypothetical; the only other worn item affecting
        Int or Wis is another helmet so can't be in use at the same time */
index 35ffe9c1f1561067bc24d243b1e1c3e41f1aa0b0..317405b45825cfc65e1a919591b5db9f1de127b3 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1638,6 +1638,8 @@ int mode, final, attrindx;
         break;
     case A_CON:
         attrname = "constitution";
+        if (uwep && uwep->oartifact == ART_OGRESMASHER && uwep->cursed)
+            hide_innate_value = TRUE;
         break;
     case A_INT:
         attrname = "intelligence";
index 929d45c82b2cd0cbdec8a90eaf9ad28ebaf1326e..4df6c36156f6625883392b5fb94299589492a320 100644 (file)
@@ -96,6 +96,9 @@ register struct obj *obj;
         if (!Blind)
             pline("%s shining.", Tobjnam(olduwep, "stop"));
     }
+    if (uwep == obj && ((uwep && uwep->oartifact == ART_OGRESMASHER)
+                        || olduwep && olduwep->oartifact == ART_OGRESMASHER))
+        context.botl = 1;
     /* Note: Explicitly wielding a pick-axe will not give a "bashing"
      * message.  Wielding one via 'a'pplying it will.
      * 3.2.2:  Wielding arbitrary objects will give bashing message too.