From 70a1e4b78a0dfd6a2b145340d002c4046e73755e Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 8 Oct 2008 06:31:48 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7187 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mon-util.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 464abb8643..5c70b00cb2 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -576,7 +576,7 @@ corpse_effect_type mons_corpse_effect(int mc) monster_type mons_species(int mc) { const monsterentry *me = get_monster_data(mc); - return (me? me->species : MONS_PROGRAM_BUG); + return (me ? me->species : MONS_PROGRAM_BUG); } monster_type mons_genus(int mc) @@ -3357,8 +3357,9 @@ item_def *monsters::weapon(int which_attack) bool monsters::can_throw_rocks() const { - return (type == MONS_STONE_GIANT || type == MONS_CYCLOPS - || type == MONS_OGRE || type == MONS_POLYPHEMUS); + return (type == MONS_STONE_GIANT + || ::mons_species(this->type) == MONS_CYCLOPS + || ::mons_species(this->type) == MONS_OGRE); } bool monsters::has_spell_of_type(unsigned disciplines) const -- cgit v1.2.3-54-g00ecf