summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-20 05:14:03 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-20 05:14:03 +0000
commita7eaf9dc5ed07e066b9ec33eacc1fce15b817cff (patch)
tree39a0b6dbba7b6f816deaff3ffd412e534582e286 /crawl-ref/source/mon-util.cc
parent7ac9f20ef352f7de53a1ab7b68ec371b03857966 (diff)
downloadcrawl-ref-a7eaf9dc5ed07e066b9ec33eacc1fce15b817cff.tar.gz
crawl-ref-a7eaf9dc5ed07e066b9ec33eacc1fce15b817cff.zip
Make the genus of slime creatures and giant amoebas MONS_JELLY, instead of the
same as their species. Jelly-type and snail-type monster remove bloodstains from features they move over. Changes to mons_is_native_in_branch(): * Changed to use mons_genus() instead of mons_species() (where applicable). * Made orbs of fire and death cobs native to Zot. * Made all undead native to the Crypt (previously, nothing was native to the Crypt). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8616 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r--crawl-ref/source/mon-util.cc39
1 files changed, 31 insertions, 8 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 3e03b2cec2..d6e6a619f2 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -554,10 +554,10 @@ bool mons_is_native_in_branch(const monsters *monster,
switch (branch)
{
case BRANCH_ELVEN_HALLS:
- return (mons_species(monster->type) == MONS_ELF);
+ return (mons_genus(monster->type) == MONS_ELF);
case BRANCH_ORCISH_MINES:
- return (mons_species(monster->type) == MONS_ORC);
+ return (mons_genus(monster->type) == MONS_ORC);
case BRANCH_SHOALS:
return (mons_species(monster->type) == MONS_CYCLOPS
@@ -566,18 +566,23 @@ bool mons_is_native_in_branch(const monsters *monster,
|| monster->type == MONS_HARPY);
case BRANCH_SLIME_PITS:
- return (mons_species(monster->type) == MONS_JELLY);
+ return (mons_genus(monster->type) == MONS_JELLY);
case BRANCH_SNAKE_PIT:
- return (mons_species(monster->type) == MONS_NAGA
- || mons_species(monster->type) == MONS_SNAKE);
+ return (mons_genus(monster->type) == MONS_NAGA
+ || mons_genus(monster->type) == MONS_SNAKE);
case BRANCH_HALL_OF_ZOT:
- return (mons_species(monster->type) == MONS_DRACONIAN
- || monster->type == MONS_ORB_GUARDIAN);
+ return (mons_genus(monster->type) == MONS_DRACONIAN
+ || monster->type == MONS_ORB_GUARDIAN
+ || monster->type == MONS_ORB_OF_FIRE
+ || monster->type == MONS_DEATH_COB);
+
+ case BRANCH_CRYPT:
+ return (mons_holiness(monster) == MH_UNDEAD);
case BRANCH_TOMB:
- return (mons_species(monster->type) == MONS_MUMMY);
+ return (mons_genus(monster->type) == MONS_MUMMY);
case BRANCH_HIVE:
return (monster->type == MONS_KILLER_BEE_LARVA
@@ -7607,6 +7612,24 @@ void monsters::apply_location_effects(const coord_def &oldpos)
if (type == MONS_TRAPDOOR_SPIDER)
behaviour_event(this, ME_EVAL);
}
+
+ unsigned long &prop = env.map(pos()).property;
+
+ if (prop & FPROP_BLOODY)
+ {
+ monster_type genus = mons_genus(type);
+
+ if (genus == MONS_JELLY || genus == MONS_GIANT_SLUG)
+ {
+ prop &= ~FPROP_BLOODY;
+ if (see_grid(pos()) && !visible_to(&you))
+ {
+ std::string desc =
+ feature_description(pos(), false, DESC_NOCAP_THE, false);
+ mprf("The bloodstain on %s disappears!", desc.c_str());
+ }
+ }
+ }
}
bool monsters::move_to_pos(const coord_def &newpos)