diff options
author | Charles Otto <ottochar@gmail.com> | 2010-01-17 17:36:51 -0500 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2010-01-17 17:36:51 -0500 |
commit | f903462645b80653998fe987732752038be862d4 (patch) | |
tree | 9131a4fec9252e1f2eb872874948bfb9cb9c8cac /crawl-ref/source/effects.cc | |
parent | 13ba95e8a77fc50cf9fe1e7438a13a17c349d390 (diff) | |
download | crawl-ref-f903462645b80653998fe987732752038be862d4.tar.gz crawl-ref-f903462645b80653998fe987732752038be862d4.zip |
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.
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 17 |
1 files changed, 12 insertions, 5 deletions
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 |