summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/effects.cc14
-rw-r--r--crawl-ref/source/effects.h1
-rw-r--r--crawl-ref/source/religion.cc4
-rw-r--r--crawl-ref/source/spells2.cc5
4 files changed, 16 insertions, 8 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index ed513fb2f6..7b515de2ec 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -4429,7 +4429,8 @@ void collect_radius_points(std::vector<std::vector<coord_def> > &radius_points,
// Place a partial ring of toadstools around the given corpse. Returns
// the number of mushrooms spawned. A return of 0 indicates no
// mushrooms were placed -> some sort of failure mode was reached.
-static int _mushroom_ring(item_def &corpse, int & seen_count)
+static int _mushroom_ring(item_def &corpse, int & seen_count,
+ beh_type toadstool_behavior)
{
// minimum number of mushrooms spawned on a given ring
unsigned min_spawn = 2;
@@ -4466,7 +4467,7 @@ static int _mushroom_ring(item_def &corpse, int & seen_count)
return (0);
mgen_data temp(MONS_TOADSTOOL,
- BEH_HOSTILE, 0, 0,
+ toadstool_behavior, 0, 0,
coord_def(),
MHITNOT,
MG_FORCE_PLACE,
@@ -4495,7 +4496,9 @@ static int _mushroom_ring(item_def &corpse, int & seen_count)
int spawn_corpse_mushrooms(item_def &corpse,
int target_count,
int & seen_targets,
+ beh_type toadstool_behavior,
bool distance_as_time)
+
{
seen_targets = 0;
if (target_count == 0)
@@ -4516,7 +4519,7 @@ int spawn_corpse_mushrooms(item_def &corpse,
int ring_seen;
// It's possible no reasonable ring can be found, in that case we'll
// give up and just place a toadstool on top of the corpse (probably).
- int res = _mushroom_ring(corpse, ring_seen);
+ int res = _mushroom_ring(corpse, ring_seen, toadstool_behavior);
if (res)
{
@@ -4557,7 +4560,7 @@ int spawn_corpse_mushrooms(item_def &corpse,
{
const int mushroom = create_monster(
mgen_data(MONS_TOADSTOOL,
- BEH_HOSTILE,
+ toadstool_behavior,
0,
0,
current,
@@ -4581,7 +4584,8 @@ int spawn_corpse_mushrooms(item_def &corpse,
int dist = static_cast<int>(sqrtf(offset.abs()) + 0.5);
- int time_left = random2(8) + dist * 8 + 1;
+ // Trying a longer base duration...
+ int time_left = random2(8) + dist * 8 + 8;
time_left *= 10;
diff --git a/crawl-ref/source/effects.h b/crawl-ref/source/effects.h
index 0dcf371f89..bc5f77c41e 100644
--- a/crawl-ref/source/effects.h
+++ b/crawl-ref/source/effects.h
@@ -55,6 +55,7 @@ bool mushroom_spawn_message(int seen_targets, int seen_corpses);
int spawn_corpse_mushrooms(item_def &corpse,
int target_count,
int & seen_targets,
+ beh_type toadstool_behavior = BEH_HOSTILE,
bool distance_as_time = false);
struct mgen_data;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index b74b4e15c3..44ac27d16c 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2925,7 +2925,9 @@ bool did_god_conduct(conduct_type thing_done, int level, bool known,
case GOD_FEAWN:
// double-check god because of fall-throughs from other gods
- if (you.religion == GOD_FEAWN && !feawn_protects(victim))
+ // Toadstools are an exception for this conduct
+ if (you.religion == GOD_FEAWN && (!feawn_protects(victim)
+ || victim->mons_species() == MONS_TOADSTOOL))
break;
// fall through
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 32fdaa6f20..bb0b547709 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1790,7 +1790,7 @@ int fungal_bloom()
{
const int mushroom = create_monster(
mgen_data(MONS_TOADSTOOL,
- BEH_HOSTILE,
+ BEH_FRIENDLY,
0,
0,
pos,
@@ -1829,7 +1829,8 @@ int fungal_bloom()
int target_count = 1 + binomial_generator(20, trial_prob);
int seen_per;
- spawn_corpse_mushrooms(*j, target_count, seen_per, true);
+ spawn_corpse_mushrooms(*j, target_count, seen_per,
+ BEH_FRIENDLY, true);
seen_mushrooms += seen_per;