summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-04 12:06:43 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-04 12:06:43 -0600
commit7660cd4286c71f2d607930320e1fb93301ec54d6 (patch)
tree235db5a8068322f3f858b04cd3d56c64b83c8cd8 /crawl-ref
parentb912a934aeb468161597059b85c7b67c6def8621 (diff)
downloadcrawl-ref-7660cd4286c71f2d607930320e1fb93301ec54d6.tar.gz
crawl-ref-7660cd4286c71f2d607930320e1fb93301ec54d6.zip
Fix inconsistencies in checks for monsters' being slime creatures.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/mon-abil.cc6
-rw-r--r--crawl-ref/source/mon-util.cc6
-rw-r--r--crawl-ref/source/monster.cc2
3 files changed, 7 insertions, 7 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 7b59a35691..3defd6aed2 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -362,7 +362,7 @@ static bool _slime_merge(monsters *thing)
monsters *other_thing = monster_at(target);
if (!merge_target
&& other_thing
- && other_thing->mons_species() == MONS_SLIME_CREATURE
+ && other_thing->type == MONS_SLIME_CREATURE
&& other_thing->attitude == thing->attitude
&& other_thing->is_summoned() == thing->is_summoned()
&& !mons_is_shapeshifter(other_thing)
@@ -426,7 +426,7 @@ bool slime_split_merge(monsters *thing)
// No merging/splitting shapeshifters.
if (!thing
|| mons_is_shapeshifter(thing)
- || thing->mons_species() != MONS_SLIME_CREATURE)
+ || thing->type != MONS_SLIME_CREATURE)
{
return (false);
}
@@ -752,7 +752,7 @@ bool mon_special_ability(monsters *monster, bolt & beem)
if ((!mons_near(monster)
|| monster->asleep()
|| monster->submerged())
- && monster->mons_species() != MONS_SLIME_CREATURE)
+ && monster->type != MONS_SLIME_CREATURE)
{
return (false);
}
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 0cf2f20930..fdf8bac529 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1075,7 +1075,7 @@ mon_attack_def mons_attack_spec(const monsters *mon, int attk_number)
}
// Slime creature attacks are multiplied by the number merged.
- if (mon->mons_species() == MONS_SLIME_CREATURE)
+ if (mon->type == MONS_SLIME_CREATURE)
attk.damage *= mon->number;
return (zombified ? downscale_zombie_attack(mon, attk) : attk);
@@ -1317,7 +1317,7 @@ int exper_value(const monsters *monster)
// Hacks to make merged slime creatures not worth so much exp. We
// will calculate the experience we would get for 1 blob, and then
// just multiply it so that exp is linear with blobs merged. -cao
- if (monster->mons_species() == MONS_SLIME_CREATURE && monster->number)
+ if (monster->type == MONS_SLIME_CREATURE && monster->number)
maxhp /= monster->number;
// These are some values we care about.
@@ -1435,7 +1435,7 @@ int exper_value(const monsters *monster)
// Slime creature exp hack part 2: Scale exp back up by the number
// of blobs merged. -cao
- if (monster->mons_species() == MONS_SLIME_CREATURE)
+ if (monster->type == MONS_SLIME_CREATURE)
x_val *= monster->number;
// Reductions for big values. - bwr
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 66c38c3277..376e660b81 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2128,7 +2128,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
break;
}
- if (mon.mons_species() == MONS_SLIME_CREATURE && desc != DESC_DBNAME)
+ if (mon.type == MONS_SLIME_CREATURE && desc != DESC_DBNAME)
{
ASSERT(mon.number <= 5);
const char* cardinals[] = {"buggy ", "", "large ", "very large ",