summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-20 18:17:34 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-20 18:17:34 -0700
commit2bba6d94b2dea89a950075c378956259b3a9aa7c (patch)
tree902345e80e30d58ede395336154379a84c6778c5
parent0fa8777fbf1ed1039d8f2cd1b2f84c93bd681ab9 (diff)
downloadcrawl-ref-2bba6d94b2dea89a950075c378956259b3a9aa7c.tar.gz
crawl-ref-2bba6d94b2dea89a950075c378956259b3a9aa7c.zip
beam.cc: Half of arena fungi are friendly
In arena mode, half of the fungi generated by giant spore explosions are friendly, chosen randomly (I just couldn't get the same thing to work with toadstools growing from corpses, for some reason)
-rw-r--r--crawl-ref/source/beam.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 0e6bb50475..afce32467e 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3044,8 +3044,12 @@ void bolt::affect_ground()
&& mons_class_can_pass(MONS_FUNGUS, env.grid(pos()))
&& !actor_at(pos()))
{
+ // Half the fungi in arena mode are friendly.
+ beh_type beh = (crawl_state.arena && coinflip()) ? BEH_FRIENDLY
+ : BEH_HOSTILE;
+
int rc = create_monster(mgen_data(MONS_FUNGUS,
- BEH_HOSTILE,
+ beh,
0,
0,
pos(),