]> granicus.if.org Git - nethack/commitdiff
Tame simians with bananas
authorPasi Kallinen <paxed@alt.org>
Mon, 20 Jun 2016 09:56:55 +0000 (12:56 +0300)
committerPasi Kallinen <paxed@alt.org>
Mon, 20 Jun 2016 09:56:58 +0000 (12:56 +0300)
Bananas are quite rare, and none of the simians are very strong,
so this won't be in any way overpowered - just a bit of flavor.

I think this was originally Derek's change from Sporkhack, but
similar ones have been done in the community multiple times
in the past.

include/mondata.h

index 7f62258a5881369267e3f33e35bbb296b18fdc78..45a7e05c59c49379434990b51e290c7578e51c2c 100644 (file)
      || ((ptr)->mlet == S_PUDDING && (ptr) != &mons[PM_BLACK_PUDDING]))
 
 #define befriend_with_obj(ptr, obj) \
-    ((obj)->oclass == FOOD_CLASS && is_domestic(ptr))
+    ((obj)->oclass == FOOD_CLASS && is_domestic(ptr)                    \
+     || ((obj)->otyp == BANANA &&                                       \
+         ((ptr) == &mons[PM_MONKEY]                                     \
+          || (ptr) == &mons[PM_APE]                                     \
+          || (ptr) == &mons[PM_CARNIVOROUS_APE])))
 
 #endif /* MONDATA_H */