summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-11-02 21:20:08 -0500
committerCharles Otto <ottochar@gmail.com>2009-11-02 22:06:00 -0500
commit9397dc1a7fae542bc4978529ca3a0b2b009075b6 (patch)
tree93f13789422eeff4209a5452d685b3c66f87c5b3 /crawl-ref/source/effects.cc
parent7da5fd2d9763721f49de5cd759f8f6b80d3d5e45 (diff)
downloadcrawl-ref-9397dc1a7fae542bc4978529ca3a0b2b009075b6.tar.gz
crawl-ref-9397dc1a7fae542bc4978529ca3a0b2b009075b6.zip
Some tweaks to decomposition
Make toadstools created via decomposition friendly, exempt toadstools from the allies dying conduct. Increase decomposition toadstool base duration.
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc14
1 files changed, 9 insertions, 5 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;