]> granicus.if.org Git - nethack/commitdiff
lycanthropy tweaks
authorPatR <rankin@nethack.org>
Fri, 17 Jun 2016 00:11:25 +0000 (17:11 -0700)
committerPatR <rankin@nethack.org>
Fri, 17 Jun 2016 00:11:25 +0000 (17:11 -0700)
Make it be cannabalism for a were<foo> to eat a <foo> corpse.

Let werejackals summon foxes and coyotes in addition to jackals,
and werewolves summon wargs in addition to wolves and winter wolves.

doc/fixes36.1
src/eat.c
src/were.c

index 6cfc02584b5ff073d16c5b0ee12e36568bbc8011..456c8772cbe5932e43074f3625560ffdc42a77e7 100644 (file)
@@ -294,6 +294,7 @@ don't give "you cannot pass through the bars" when travel is testing possible
        paths in the vicinity of iron bars
 if blind and no gloves, using 'm<dir>' to move and then 'e' could be used to
        locate cockatrice corpse without fatal touching (by declining to eat)
+it's cannabilism for a were<foo> to eat a <foo> corpse
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
@@ -416,6 +417,7 @@ pressing d or D when cursor positioning targets doors and doorways
 pressing x or X when cursor positioning targets possibly unexplored location
        (potentially useful when using '_' [not mouse] to invoke travel)
 swallowers can't re-engulf hero immediately after spitting him/her out
+werejackals can summon foxes and coyotes; werewolves can summon wargs
 
 
 Platform- and/or Interface-Specific New Features
index 59a33053fd51c1385333898e978d394fd24c5f24..ffc787d8a73240124f9d5cf44573022b9e199bd7 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -619,7 +619,9 @@ boolean allowmsg;
            and also shouldn't eat current species when polymorphed
            (even if having the form of something which doesn't care
            about cannibalism--hero's innate traits aren't altered) */
-        && (your_race(fptr) || (Upolyd && same_race(youmonst.data, fptr)))) {
+        && (your_race(fptr)
+            || (Upolyd && same_race(youmonst.data, fptr))
+            || (u.ulycn >= LOW_PM && were_beastie(pm) == u.ulycn))) {
         if (allowmsg) {
             if (Upolyd && your_race(fptr))
                 You("have a bad feeling deep inside.");
index b9e58dd2b5b4ecc6109741c5d73930305d521b82..c8ee496503e5616244facb56eb12f98998474d48 100644 (file)
@@ -47,17 +47,17 @@ int pm;
 {
     switch (pm) {
     case PM_WEREWOLF:
-        return (PM_HUMAN_WEREWOLF);
+        return PM_HUMAN_WEREWOLF;
     case PM_HUMAN_WEREWOLF:
-        return (PM_WEREWOLF);
+        return PM_WEREWOLF;
     case PM_WEREJACKAL:
-        return (PM_HUMAN_WEREJACKAL);
+        return PM_HUMAN_WEREJACKAL;
     case PM_HUMAN_WEREJACKAL:
-        return (PM_WEREJACKAL);
+        return PM_WEREJACKAL;
     case PM_WERERAT:
-        return (PM_HUMAN_WERERAT);
+        return PM_HUMAN_WERERAT;
     case PM_HUMAN_WERERAT:
-        return (PM_WERERAT);
+        return PM_WERERAT;
     default:
         return NON_PM;
     }
@@ -121,7 +121,8 @@ register struct monst *mon;
 }
 
 /* were-creature (even you) summons a horde */
-int were_summon(ptr, yours, visible, genbuf)
+int
+were_summon(ptr, yours, visible, genbuf)
 struct permonst *ptr;
 boolean yours;
 int *visible; /* number of visible helpers created */
@@ -138,20 +139,20 @@ char *genbuf;
         switch (pm) {
         case PM_WERERAT:
         case PM_HUMAN_WERERAT:
-            typ =
-                rn2(3) ? PM_SEWER_RAT : rn2(3) ? PM_GIANT_RAT : PM_RABID_RAT;
+            typ = rn2(3) ? PM_SEWER_RAT
+                         : rn2(3) ? PM_GIANT_RAT : PM_RABID_RAT;
             if (genbuf)
                 Strcpy(genbuf, "rat");
             break;
         case PM_WEREJACKAL:
         case PM_HUMAN_WEREJACKAL:
-            typ = PM_JACKAL;
+            typ = rn2(7) ? PM_JACKAL : rn2(3) ? PM_COYOTE : PM_FOX;
             if (genbuf)
                 Strcpy(genbuf, "jackal");
             break;
         case PM_WEREWOLF:
         case PM_HUMAN_WEREWOLF:
-            typ = rn2(5) ? PM_WOLF : PM_WINTER_WOLF;
+            typ = rn2(5) ? PM_WOLF : rn2(2) ? PM_WARG : PM_WINTER_WOLF;
             if (genbuf)
                 Strcpy(genbuf, "wolf");
             break;
@@ -176,7 +177,7 @@ you_were()
     char qbuf[QBUFSZ];
     boolean controllable_poly = Polymorph_control && !(Stunned || Unaware);
 
-    if (Unchanging || (u.umonnum == u.ulycn))
+    if (Unchanging || u.umonnum == u.ulycn)
         return;
     if (controllable_poly) {
         /* `+4' => skip "were" prefix to get name of beast */