summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2013-05-27 21:40:17 -0500
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2013-05-27 21:40:17 -0500
commita14c9fcc0703bbf5dfd2fd289d3912ed2fa334d2 (patch)
tree1d3d4be94650f8e0e9921d42fb969f2446d647d8 /crawl-ref/source/arena.cc
parentfcb3a05d0ddf6df54ffc1f10e0089e4e6db67104 (diff)
downloadcrawl-ref-a14c9fcc0703bbf5dfd2fd289d3912ed2fa334d2.tar.gz
crawl-ref-a14c9fcc0703bbf5dfd2fd289d3912ed2fa334d2.zip
Clean up tentacle/tentacle segment handling somewhat.
mons_is_tentacle() now returns true only for actual tentacles, which makes mons_is_tentacle_end() redundant. mons_is_tentacle_or_tentacle_segment() does what mons_is_tentacle() used to do, and is used properly on both sides of Mislead. Handling of child tentacles (everything other than eldritch ones) is now handled more generically, in case more types of them are added.
Diffstat (limited to 'crawl-ref/source/arena.cc')
-rw-r--r--crawl-ref/source/arena.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc
index 1769624e37..658687e2a8 100644
--- a/crawl-ref/source/arena.cc
+++ b/crawl-ref/source/arena.cc
@@ -538,7 +538,7 @@ namespace arena
for (monster_iterator mons; mons; ++mons)
{
- if (mons_is_tentacle(mons->type))
+ if (mons_is_tentacle_or_tentacle_segment(mons->type))
continue;
if (mons->attitude == ATT_FRIENDLY)
faction_a.active_members++;
@@ -1050,7 +1050,7 @@ monster_type arena_pick_random_monster(const level_id &place)
bool arena_veto_random_monster(monster_type type)
{
- if (mons_is_tentacle(type))
+ if (mons_is_tentacle_or_tentacle_segment(type))
return true;
if (!arena::allow_immobile && mons_class_is_stationary(type))
return true;
@@ -1091,8 +1091,8 @@ bool arena_veto_place_monster(const mgen_data &mg, bool first_band_member,
// is placed via splitting.
void arena_placed_monster(monster* mons)
{
- if (mons_is_tentacle(mons->type))
- ; // we don't count tentacles, even free-standing
+ if (mons_is_tentacle_or_tentacle_segment(mons->type))
+ ; // we don't count tentacles or tentacle segments, even free-standing
else if (mons->attitude == ATT_FRIENDLY)
{
arena::faction_a.active_members++;
@@ -1191,7 +1191,7 @@ void arena_split_monster(monster* split_from, monster* split_to)
void arena_monster_died(monster* mons, killer_type killer,
int killer_index, bool silent, int corpse)
{
- if (mons_is_tentacle(mons->type))
+ if (mons_is_tentacle_or_tentacle_segment(mons->type))
; // part of a monster, or a spell
else if (mons->attitude == ATT_FRIENDLY)
arena::faction_a.active_members--;