summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-06 18:23:48 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-07 18:23:34 -0600
commitd9529c446b22593d4ba3fdc82fc51f949f58925d (patch)
tree89d1c30e8f00d880cf1168454457f59ce61347ed /crawl-ref/source/mon-act.cc
parent6698dc1909e990d05ad67b4b0a8bfdda72702ca2 (diff)
downloadcrawl-ref-d9529c446b22593d4ba3fdc82fc51f949f58925d.tar.gz
crawl-ref-d9529c446b22593d4ba3fdc82fc51f949f58925d.zip
Replace Gozag's gold lust with gold distraction (dpeg).
For every fresh pile of gold in LOS of a monster when they're acting, they have a 5% chance of doing nothing that turn.
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r--crawl-ref/source/mon-act.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index f6a0f1e100..e78f6f2330 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -2065,6 +2065,19 @@ void handle_monster_move(monster* mons)
return;
}
+ const int gold = gozag_gold_in_los(mons);
+ if (gold > 0)
+ {
+ for (int i = 0; i < gold; i++)
+ if (one_chance_in(20))
+ {
+ simple_monster_message(mons,
+ " is distracted by the nearby gold.");
+ mons->speed_increment -= non_move_energy;
+ return;
+ }
+ }
+
if (crawl_state.disables[DIS_MON_ACT] && _unfriendly_or_insane(mons))
{
mons->speed_increment -= non_move_energy;