summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/mon-abil.cc3
-rw-r--r--crawl-ref/source/mon-info.cc3
-rw-r--r--crawl-ref/source/monster.cc17
-rw-r--r--crawl-ref/source/monstuff.cc6
4 files changed, 23 insertions, 6 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 3c93b540a2..5ed1f0435b 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -1439,8 +1439,7 @@ void mon_nearby_ability(monsters *monster)
// square they move off of.
void ballisto_on_move(monsters * monster, const coord_def & position)
{
- if (monster->type == MONS_GIANT_SPORE
- && monster->behaviour == BEH_WANDER)
+ if (monster->type == MONS_GIANT_SPORE)
{
// The number field is used as a cooldown timer for this behavior.
if (monster->number <= 0)
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index 55d47f1387..12f64499dc 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -115,6 +115,9 @@ bool monster_info::less_than(const monster_info& m1,
if (m1type == MONS_SLIME_CREATURE)
return (m1.m_mon->number > m2.m_mon->number);
+ if (m1type == MONS_BALLISTOMYCETE)
+ return ((m1.m_mon->number > 0) > (m2.m_mon->number > 0));
+
if (zombified)
{
// Because of the type checks above, if one of the two is zombified, so
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 77c9753884..b3fda3a9d7 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2156,7 +2156,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc,
if (mon.type == MONS_BALLISTOMYCETE && desc != DESC_DBNAME)
{
- result += mon.colour == LIGHTRED ? "Active " : "";
+ result += mon.number ? "active " : "";
}
// Done here to cover cases of undead versions of hydras.
@@ -5014,6 +5014,19 @@ void monsters::apply_enchantment(const mon_enchant &me)
if (observe_cell(adjacent) && observe_cell(pos()))
mpr("A nearby fungus spawns a giant spore.");
+
+ // Decrease the count and maybe become inactive
+ // again
+ if(this->number)
+ {
+ this->number--;
+ if(this->number == 0)
+ {
+ this->colour = MAGENTA;
+ if(you.can_see(this))
+ mprf("A nearby ballistomycete calms down.");
+ }
+ }
}
break;
}
@@ -6044,7 +6057,7 @@ int mon_enchant::calc_duration(const monsters *mons,
case ENCH_SPORE_PRODUCTION:
// The duration of the spore production timer depends on the color
// of the fungus
- cturn = mons->colour == LIGHTRED ? 150 : 1500;
+ cturn = mons->number ? 150 : 1500;
break;
case ENCH_ABJ:
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 1334751541..ae91249f6b 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1445,13 +1445,15 @@ static void _activate_ballistomycetes( monsters * monster)
&& env.mons[i].alive()
&& env.mons[i].type == MONS_BALLISTOMYCETE)
{
- if(env.mons[i].colour != LIGHTRED)
+ env.mons[i].number++;
+ // 0 -> 1 means the ballisto moves onto the faster spawn
+ // timer and changes color
+ if(env.mons[i].number == 1)
{
env.mons[i].colour = LIGHTRED;
// Reset the spore production timer.
env.mons[i].del_ench(ENCH_SPORE_PRODUCTION, false);
env.mons[i].add_ench(ENCH_SPORE_PRODUCTION);
-
activated_others = true;
if(you.can_see(&env.mons[i]))
seen_others++;