summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-25 05:51:12 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-25 05:51:12 +0000
commit9f5555209ea63a352cb14aae686cee5d257e5a8c (patch)
treeef530d599f1c7374640d1a76635c036ae040c33e /crawl-ref/source/monstuff.cc
parent211a8e9872b8ca97af6b608a81459939d4c4f5fa (diff)
downloadcrawl-ref-9f5555209ea63a352cb14aae686cee5d257e5a8c.tar.gz
crawl-ref-9f5555209ea63a352cb14aae686cee5d257e5a8c.zip
Polymorph checks. Make coloured draconians rarer from poly, rule out special
monsters like statues and the royal jelly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@702 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 2474d35160..8fb825aab2 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -913,6 +913,15 @@ static bool valid_morph( struct monsters *monster, int new_mclass )
// morph targets are _always_ "base" classes, not derived ones.
new_mclass = mons_species(new_mclass);
+ // [ds] Non-base draconians are much more trouble than their HD
+ // suggests.
+ if (mons_genus(new_mclass) == MONS_DRACONIAN
+ && new_mclass != MONS_DRACONIAN
+ && !one_chance_in(4))
+ {
+ return (false);
+ }
+
/* various inappropriate polymorph targets */
if (mons_class_holiness( new_mclass ) != mons_holiness( monster )
|| mons_class_flag( new_mclass, M_NO_EXP_GAIN ) // not helpless
@@ -920,11 +929,13 @@ static bool valid_morph( struct monsters *monster, int new_mclass )
|| new_mclass == MONS_PROGRAM_BUG
|| new_mclass == MONS_SHAPESHIFTER
|| new_mclass == MONS_GLOWING_SHAPESHIFTER
-
// 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
+ || new_mclass == MONS_ROYAL_JELLY
+ || new_mclass == MONS_ORANGE_STATUE
+ || new_mclass == MONS_SILVER_STATUE
|| (new_mclass >= MONS_GERYON && new_mclass <= MONS_ERESHKIGAL))
{
return (false);