diff options
author | Charles Otto <ottochar@gmail.com> | 2009-11-12 20:30:12 -0500 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-11-12 20:30:12 -0500 |
commit | 8075717d132ff61257a8836ce7854f71f1eb05f8 (patch) | |
tree | 115643864aa9b4c5c8ace4cdd3864d9f31a80997 /crawl-ref/source/beam.cc | |
parent | 4cf89bf43fe0847385567b94f0a61a16003561fb (diff) | |
download | crawl-ref-8075717d132ff61257a8836ce7854f71f1eb05f8.tar.gz crawl-ref-8075717d132ff61257a8836ce7854f71f1eb05f8.zip |
Change ballistomycete spore mechanics again
New status: if a ballistomycete or giant spore dies any ballistos on
the level get +1 to a counter. Ballistos with a count higher than zero
get spore production on a short (~150 turn) timer. When a spore is
spawned (by a ballisto) the count of all ballistos on the level is
decreased by 1.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 8a10cc4531..27600e0a31 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -2538,6 +2538,11 @@ int mons_adjust_flavoured(monsters *monster, bolt &pbolt, int hurted, } break; + case BEAM_SPORE: + if (monster->type == MONS_BALLISTOMYCETE) + hurted = 0; + break; + default: break; } @@ -3092,9 +3097,30 @@ void bolt::affect_ground() && mons_class_can_pass(MONS_BALLISTOMYCETE, env.grid(pos())) && !actor_at(pos())) { + beh_type beh; // Half the fungi in arena mode are friendly. - beh_type beh = (crawl_state.arena && coinflip()) ? BEH_FRIENDLY - : BEH_HOSTILE; + if(crawl_state.arena) + { + beh = coinflip() ? BEH_FRIENDLY : BEH_HOSTILE; + } + else + { + switch(this->attitude) + { + case ATT_NEUTRAL: + beh = BEH_NEUTRAL; + break; + + case ATT_FRIENDLY: + case ATT_GOOD_NEUTRAL: + beh = BEH_GOOD_NEUTRAL; + break; + + default: + beh = BEH_HOSTILE; + break; + } + } int rc = create_monster(mgen_data(MONS_BALLISTOMYCETE, beh, |