]> granicus.if.org Git - nethack/commitdiff
Spitting monsters try to stay away from melee range
authorPasi Kallinen <paxed@alt.org>
Sun, 18 Oct 2020 16:18:38 +0000 (19:18 +0300)
committerPasi Kallinen <paxed@alt.org>
Sun, 18 Oct 2020 16:18:38 +0000 (19:18 +0300)
doc/fixes37.0
src/monmove.c

index a9655feb1d31f193c0ba49ed0ce22d714e9ec221..87010a021bb43efd79abec959365eb327124438f 100644 (file)
@@ -134,7 +134,8 @@ male hero poly'd into nymph chooses charm vs seduce message based on being
        male rather than on all nymphs being female but charm message was
        using hardcoded pronouns She,her for target monster--wrong for male
        target and noticable if "<mon> finishes taking off his suit" is given
-hostile monsters with launcher and ammo try to stay away from melee range
+hostile monsters with a spit attack or launcher and ammo try to stay away
+       from melee range
 allow displacing peaceful creatures
 unicorn horns don't restore attribute loss anymore
 when a shop is changed from food to health food, change room type to match
index 8842f1b66d90511ea883c53042f4a150829d95cc..a16336ff0a37705967e59fb9d7cd3d2de211d039 100644 (file)
@@ -1015,10 +1015,11 @@ register int after;
                     > ((ygold = findgold(g.invent)) ? ygold->quan : 0L))))
             appr = -1;
 
-        /* hostile monsters with ranged thrown weapons try to stay away */
+        /* hostiles with ranged weapons or spit attack try to stay away */
         if (!mtmp->mpeaceful
             && (dist2(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) < 5*5)
-            && m_canseeu(mtmp) && m_has_launcher_and_ammo(mtmp))
+            && m_canseeu(mtmp) &&
+            (m_has_launcher_and_ammo(mtmp) || attacktype(mtmp->data, AT_SPIT)))
             appr = -1;
 
         if (!should_see && can_track(ptr)) {