summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dactions.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-08 10:18:26 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-08 10:20:59 -0600
commitc9c7238cd9612724b8542e65dc3186bf2ed35f84 (patch)
tree081802cced5ccdcb71851c710d530b61b9d8d5e1 /crawl-ref/source/dactions.cc
parent8f6a687fee50d397ae178bdaefef174ee656688f (diff)
downloadcrawl-ref-c9c7238cd9612724b8542e65dc3186bf2ed35f84.tar.gz
crawl-ref-c9c7238cd9612724b8542e65dc3186bf2ed35f84.zip
Extend bribes to all previously-unseen monsters.
Most players intuitively expect it to behave this way and are surprised when it isn't. You obviously can't bribe monsters in your LOS or that are chasing you, so Bribe Branch retains its strategic nature.
Diffstat (limited to 'crawl-ref/source/dactions.cc')
-rw-r--r--crawl-ref/source/dactions.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc
index 97ebda5936..cb9d1f7bd6 100644
--- a/crawl-ref/source/dactions.cc
+++ b/crawl-ref/source/dactions.cc
@@ -8,6 +8,7 @@
#include "dactions.h"
#include "act-iter.h"
+#include "attitude-change.h"
#include "coordit.h"
#include "decks.h"
#include "dungeon.h"
@@ -133,6 +134,9 @@ bool mons_matches_daction(const monster* mon, daction_type act)
&& (mon->has_ench(ENCH_PERMA_BRIBED)
|| mon->props.exists(GOZAG_PERMABRIBE_KEY));
+ case DACT_SET_BRIBES:
+ return !testbits(mon->flags, MF_WAS_IN_VIEW);
+
default:
return false;
}
@@ -249,6 +253,9 @@ void apply_daction_to_mons(monster* mon, daction_type act, bool local,
}
break;
+ case DACT_SET_BRIBES:
+ gozag_set_bribe(mon);
+
// The other dactions do not affect monsters directly.
default:
break;
@@ -277,6 +284,7 @@ static void _apply_daction(daction_type act)
case DACT_PIKEL_SLAVES:
case DACT_KIRKE_HOGS:
case DACT_BRIBE_TIMEOUT:
+ case DACT_SET_BRIBES:
for (monster_iterator mi; mi; ++mi)
{
if (mons_matches_daction(*mi, act))