From f903462645b80653998fe987732752038be862d4 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sun, 17 Jan 2010 17:36:51 -0500 Subject: Allow toadstools on tiles Fedhas worshipers are standing on Mostly this is so that decomposition can work on corpses the player is standing on. Update the decomposition ability description accordingly. --- crawl-ref/source/effects.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index ee09fc5689..0e58c61316 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -4643,16 +4643,18 @@ int spawn_corpse_mushrooms(item_def &corpse, fringe.pop(); - actor * occupant = NULL; + monsters * monster = monster_at(current); + + bool player_occupant = you.pos() == current; // Is this square occupied by a non mushroom? - if ((occupant = actor_at(current)) - && occupant->mons_species() != MONS_TOADSTOOL) + if (monster && monster->mons_species() != MONS_TOADSTOOL + || player_occupant && you.religion != GOD_FEDHAS) { continue; } - if (!occupant) + if (!monster) { const int mushroom = create_monster( mgen_data(MONS_TOADSTOOL, @@ -4693,7 +4695,12 @@ int spawn_corpse_mushrooms(item_def &corpse, } placed_targets++; - if (you.see_cell(current)) + if (current == you.pos()) + { + mprf("A toadstool grows at your feet."); + current= env.mons[mushroom].pos(); + } + else if (you.see_cell(current)) seen_targets++; } else -- cgit v1.2.3-54-g00ecf