summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/delay.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-04-02 21:25:48 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-07 18:23:20 -0600
commit3d55e912dc5df60344645ce6a092257dd1948264 (patch)
tree26a2858be1bcbaaaf756a6a2ab87a83f6d1f14d8 /crawl-ref/source/delay.cc
parentba5a6485e52823b2a6082f18ee3487e280ad51a2 (diff)
downloadcrawl-ref-3d55e912dc5df60344645ce6a092257dd1948264.tar.gz
crawl-ref-3d55e912dc5df60344645ce6a092257dd1948264.zip
Gozag wrath: counter-bribe.
When you spot monsters, Gozag can incite them against you, granting them one of a handful of beneficial effects.
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r--crawl-ref/source/delay.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 58476dc009..bbdce6da99 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -27,8 +27,10 @@
#include "fprop.h"
#include "exclude.h"
#include "food.h"
+#include "godabil.h"
#include "godpassive.h"
#include "godprayer.h"
+#include "godwrath.h"
#include "invent.h"
#include "items.h"
#include "itemprop.h"
@@ -1661,6 +1663,18 @@ static inline bool _monster_warning(activity_interrupt_type ai,
if (zin_id)
update_monster_pane();
#endif
+ if (player_under_penance(GOD_GOZAG) && !mon->wont_attack())
+ {
+ int bribability = gozag_type_bribable(mon->type, true);
+ if (bribability
+ && x_chance_in_y(bribability, GOZAG_MAX_BRIBABILITY))
+ {
+ mprf(MSGCH_GOD, GOD_GOZAG, "Gozag incites %s against you.",
+ mon->name(DESC_THE).c_str());
+ gozag_incite(const_cast<monster *>(mon));
+ dec_penance(GOD_GOZAG, 1);
+ }
+ }
}
const_cast<monster* >(mon)->seen_context = SC_JUST_SEEN;
}