summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 17:30:17 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-18 17:30:17 +0000
commite685572907ec57837b784fe71a4c4c1bebca672d (patch)
treec853e608350fabf18ffc7996396c65e50a5e8e21 /crawl-ref/source/monstuff.cc
parent55808ceb59ce83cd48561b825d0fc841afd5dc84 (diff)
downloadcrawl-ref-e685572907ec57837b784fe71a4c4c1bebca672d.tar.gz
crawl-ref-e685572907ec57837b784fe71a4c4c1bebca672d.zip
Fix polymorphing of (very) ugly things: When polymorphed, they now
mutate into (very) ugly things of a different color. Also, shapeshifters can no longer take their forms, and they can no longer be made shapeshifters themselves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10718 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 358b1da0c2..0a592798c2 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2077,7 +2077,7 @@ void alert_nearby_monsters(void)
}
}
-static bool _valid_morph( monsters *monster, int new_mclass )
+static bool _valid_morph(monsters *monster, int new_mclass)
{
const dungeon_feature_type current_tile = grd(monster->pos());
@@ -2095,10 +2095,10 @@ static bool _valid_morph( monsters *monster, int new_mclass )
}
// Various inappropriate polymorph targets.
- if (mons_class_holiness( new_mclass ) != mons_holiness( monster )
- || mons_class_flag( new_mclass, M_UNIQUE) // no uniques
- || mons_class_flag( new_mclass, M_NO_EXP_GAIN ) // not helpless
- || new_mclass == mons_species( monster->type ) // must be different
+ if (mons_class_holiness(new_mclass) != mons_holiness(monster)
+ || mons_class_flag(new_mclass, M_UNIQUE) // no uniques
+ || mons_class_flag(new_mclass, M_NO_EXP_GAIN) // not helpless
+ || new_mclass == mons_species(monster->type) // must be different
|| new_mclass == MONS_PROGRAM_BUG
// These require manual setting of mons.base_monster to indicate
@@ -2106,10 +2106,10 @@ static bool _valid_morph( monsters *monster, int new_mclass )
// which we currently aren't smart enough to handle.
|| mons_class_is_zombified(new_mclass)
- // These shouldn't happen anyways (demons unaffected + holiness check),
- // but if we ever do have polydemon, these will be needed:
- || new_mclass == MONS_PLAYER_GHOST
- || new_mclass == MONS_PANDEMONIUM_DEMON
+ // These require manual setting of the ghost demon struct to
+ // indicate their characteristics, which we currently aren't
+ // smart enough to handle.
+ || mons_is_ghost_demon(new_mclass)
// Only for use by game testers or in the arena.
|| new_mclass == MONS_TEST_SPAWNER