]> granicus.if.org Git - nethack/commitdiff
fix github issue #293 - raven vs raven
authorPatR <rankin@nethack.org>
Sat, 15 Feb 2020 21:55:51 +0000 (13:55 -0800)
committerPatR <rankin@nethack.org>
Sat, 15 Feb 2020 21:55:51 +0000 (13:55 -0800)
The saying /corvus oculum corvi non eruit/ (Latin) means "a crow
doesn't pluck out the eye of another crow" (roughly).  Something
along the lines of "like-minded people stick together".  Honor the
literal meaning by preventing a raven's blinding attack that gets
directed at another raven from being able to cause blindness.

Fixes #293

doc/fixes37.0
src/mondata.c

index 2288fd47a309ff314de19ab4ed14e162c3af0b15..72613ea5b87ab98e7ccb56f72f063db2b37237b8 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.100 $ $NHDT-Date: 1581732920 2020/02/15 02:15:20 $
+$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.101 $ $NHDT-Date: 1581803740 2020/02/15 21:55:40 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -56,6 +56,7 @@ digging through iron bars from an adjacent pit made a pit on top of the bars
 give feedback if controlled level teleport attempt fails because hero is
        already on the bottom level and player tries to go even deeper
 unseen pet that drowned didn't give "you have a sad feeling" message
+prevent ravens from blinding other ravens: /corvus oculum corvi non eruit/
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index ba5b27d0aaf8023947bcfec5873b7f4aeb6065d4..9f09f411bf713994215b738986a8e34c8875cf4c 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 mondata.c       $NHDT-Date: 1574648940 2019/11/25 02:29:00 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.76 $ */
+/* NetHack 3.6 mondata.c       $NHDT-Date: 1581803740 2020/02/15 21:55:40 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2011. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -199,6 +199,13 @@ struct obj *obj; /* aatyp == AT_WEAP, AT_SPIT */
     if (!haseyes(mdef->data))
         return FALSE;
 
+    /* /corvus oculum corvi non eruit/
+       a saying expressed in Latin rather than a zoological observation:
+       "a crow will not pluck out the eye of another crow"
+       so prevent ravens from blinding each other */
+    if (magr->data == &mons[PM_RAVEN] && mdef->data == &mons[PM_RAVEN])
+        return FALSE;
+
     switch (aatyp) {
     case AT_EXPL:
     case AT_BOOM: