diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 15:04:59 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 15:04:59 +0000 |
commit | bf6b4b21ccc66c8e458ee433add5741ec90e5d87 (patch) | |
tree | 08e3eb61ddf3126d1fcb71dac02a7c7096837eea /crawl-ref/source/mon-util.cc | |
parent | 1f328a8c326b0a2ff99dbf776b17b7375cb8061b (diff) | |
download | crawl-ref-bf6b4b21ccc66c8e458ee433add5741ec90e5d87.tar.gz crawl-ref-bf6b4b21ccc66c8e458ee433add5741ec90e5d87.zip |
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
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 13 |
1 files changed, 8 insertions, 5 deletions
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) |