From bf6b4b21ccc66c8e458ee433add5741ec90e5d87 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 16 Apr 2008 15:04:59 +0000 Subject: Fix 1933066: Ghosts not being poison resistant. Fix part of 1940994: Identify scrolls now get properly identified if applied on an unID'd item right away, so that if you get more rounds it isn't offered to you *again*. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4257 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mon-util.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/mon-util.cc') diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 3f2f71c123..76718e6c67 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -292,13 +292,16 @@ const mon_resist_def &get_mons_class_resists(int mc) mon_resist_def get_mons_resists(const monsters *mon) { + mon_resist_def resists; if (mon->type == MONS_PLAYER_GHOST || mon->type == MONS_PANDEMONIUM_DEMON) - return (mon->ghost->resists); + resists = (mon->ghost->resists); + else + resists = mon_resist_def(); + + resists |= get_mons_class_resists(mon->type); - mon_resist_def resists = get_mons_class_resists(mon->type); - if ((mons_genus(mon->type) == MONS_DRACONIAN && - mon->type != MONS_DRACONIAN) || - mon->type == MONS_TIAMAT) + if (mons_genus(mon->type) == MONS_DRACONIAN && mon->type != MONS_DRACONIAN + || mon->type == MONS_TIAMAT) { monster_type draco_species = draco_subspecies(mon); if (draco_species != mon->type) -- cgit v1.2.3-54-g00ecf