From 4cf89bf43fe0847385567b94f0a61a16003561fb Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Wed, 11 Nov 2009 23:32:33 -0500 Subject: Change the ballistomycete activation mechanic Give ballistomycetes a counter, when it's at zero they have the slow spawn rate (are considered inactive), when it's greater than zero they have the fast spawn rate. Killing a ballisto gives +1 to any others on the level, a ballisto spawning a spore subtracts 1 from its own counter --- crawl-ref/source/monster.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/monster.cc') 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: -- cgit v1.2.3-54-g00ecf