diff options
author | Charles Otto <ottochar@gmail.com> | 2009-11-11 23:32:33 -0500 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-11-11 23:57:28 -0500 |
commit | 4cf89bf43fe0847385567b94f0a61a16003561fb (patch) | |
tree | 0592151dd59949eabc8c3223ddaac6cac809d6d1 /crawl-ref/source/monster.cc | |
parent | 37ba8b3ae6c9c7f6b39e372c4dd8f305f69923be (diff) | |
download | crawl-ref-4cf89bf43fe0847385567b94f0a61a16003561fb.tar.gz crawl-ref-4cf89bf43fe0847385567b94f0a61a16003561fb.zip |
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
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r-- | crawl-ref/source/monster.cc | 17 |
1 files changed, 15 insertions, 2 deletions
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: |