diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-04-02 12:42:40 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-07 18:23:20 -0600 |
commit | b9ac4c953e9d5fae3bc23dde3f999218d396f804 (patch) | |
tree | 8548ca2b3ea15399b239c2fa493c6cd1c9908019 /crawl-ref/source/dactions.cc | |
parent | 35db536519c705528e4f8bf41851e58502ceb4f5 (diff) | |
download | crawl-ref-b9ac4c953e9d5fae3bc23dde3f999218d396f804.tar.gz crawl-ref-b9ac4c953e9d5fae3bc23dde3f999218d396f804.zip |
Gozag: prelimiary implementation of Bribe Branch.
Spend 3000 gold for a chance of temporarily turning some of the
inhabitants of a branch good neutral, or possibly even friendly. Bribes
are only effective against newly generated monsters (i.e. on level
creation or monsters that spawn afterwards); the fund times out over
time and more quickly with the number of enemies affected, upon which
neutral enemies turn hostile again; friendly followers will continue to
follow the player subject to occasional follow-up payments.
Diffstat (limited to 'crawl-ref/source/dactions.cc')
-rw-r--r-- | crawl-ref/source/dactions.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc index 21035a6763..cd28a1df64 100644 --- a/crawl-ref/source/dactions.cc +++ b/crawl-ref/source/dactions.cc @@ -62,6 +62,7 @@ static const char *daction_names[] = "end spirit howl", #endif "gold to top of piles", + "bribe timeout", }; #endif @@ -122,6 +123,10 @@ bool mons_matches_daction(const monster* mon, daction_type act) && (mon->props.exists("kirke_band") || mon->props.exists(ORIG_MONSTER_KEY)); + case DACT_BRIBE_TIMEOUT: + return mon->has_ench(ENCH_BRIBED) + || !you_worship(GOD_GOZAG) && mon->has_ench(ENCH_PERMA_BRIBED); + default: return false; } @@ -226,6 +231,12 @@ void apply_daction_to_mons(monster* mon, daction_type act, bool local, _daction_hog_to_human(mon, in_transit); break; + case DACT_BRIBE_TIMEOUT: + mon->del_ench(ENCH_BRIBED); + if (!you_worship(GOD_GOZAG)) + mon->del_ench(ENCH_PERMA_BRIBED); + break; + // The other dactions do not affect monsters directly. default: break; @@ -253,6 +264,7 @@ static void _apply_daction(daction_type act) case DACT_HOLY_PETS_GO_NEUTRAL: case DACT_PIKEL_SLAVES: case DACT_KIRKE_HOGS: + case DACT_BRIBE_TIMEOUT: for (monster_iterator mi; mi; ++mi) { if (mons_matches_daction(*mi, act)) |