diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-04-03 18:56:41 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-07 18:23:21 -0600 |
commit | f8b0735557a13d44ac4a0262a1d30e7382c0e5a1 (patch) | |
tree | 210cbdee664eb475739278c7a5cc3fbe10f76c09 /crawl-ref/source/dactions.cc | |
parent | d071c1d24a6a3db2cb890ac8fceaedd34e612dff (diff) | |
download | crawl-ref-f8b0735557a13d44ac4a0262a1d30e7382c0e5a1.tar.gz crawl-ref-f8b0735557a13d44ac4a0262a1d30e7382c0e5a1.zip |
Gozag: abandon called shops on excommunication.
This needs to be communicated somehow, but only if the player has
actually used the ability; this might happen pending some changes to
track Gozag ability use.
Diffstat (limited to 'crawl-ref/source/dactions.cc')
-rw-r--r-- | crawl-ref/source/dactions.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc index cd28a1df64..ee032b0b3b 100644 --- a/crawl-ref/source/dactions.cc +++ b/crawl-ref/source/dactions.cc @@ -14,6 +14,7 @@ #include "env.h" #include "items.h" #include "libutil.h" +#include "mapmark.h" #include "mon-behv.h" #include "mon-death.h" #include "mon-stuff.h" @@ -63,6 +64,7 @@ static const char *daction_names[] = #endif "gold to top of piles", "bribe timeout", + "remove Gozag shops", }; #endif @@ -310,6 +312,24 @@ static void _apply_daction(daction_type act) } } break; + case DACT_REMOVE_GOZAG_SHOPS: + { + vector<map_marker *> markers = env.markers.get_all(MAT_FEATURE); + for (unsigned int i = 0; i < markers.size(); i++) + { + map_feature_marker *feat = + dynamic_cast<map_feature_marker *>(markers[i]); + ASSERT(feat); + if (feat->feat == DNGN_ABANDONED_SHOP) + { + // TODO: clear shop data out? + grd(feat->pos) = DNGN_ABANDONED_SHOP; + view_update_at(feat->pos); + env.markers.remove(feat); + } + } + break; + } #if TAG_MAJOR_VERSION == 34 case DACT_END_SPIRIT_HOWL: case DACT_HOLY_NEW_ATTEMPT: |