Attached Files |
yred-holy-word.patch [^] (1,285 bytes) 2014-01-18 03:01 [Show Content] [Hide Content]From 281c0514902e5e0527dd67fa350856a65329d8ca Mon Sep 17 00:00:00 2001
From: Sage <SageBasilMint@gmail.com>
Date: Sat, 18 Jan 2014 01:50:15 +0000
Subject: [PATCH] Prevent Yred servants from becoming hostile for reading ?HW.
...Provided that you didn't know the scroll beforehand. Hostility on
unidentified ?HW encourages sending your mob away whenever you want
to read-ID, which is sort of silly.
---
crawl-ref/source/effects.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 55b274b..e4da38a 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -166,7 +166,11 @@ void holy_word_monsters(coord_def where, int pow, holy_word_source_type source,
// Currently, holy word annoys the monsters it affects
// because it can kill them, and because hostile
// monsters don't use it.
- if (attacker != NULL)
+ if (attacker != NULL
+ && (attacker != &you
+ || attacker == &you
+ && source == HOLY_WORD_SCROLL
+ && item_type_known(OBJ_SCROLLS, SCR_HOLY_WORD)))
behaviour_event(mons, ME_ANNOY, attacker);
if (mons->speed_increment >= 25)
--
1.7.9.5
|