summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-06-03 10:21:41 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-06-03 10:21:41 -0600
commit536c3b657dc8efcc82d8eeb254ccdcf325eee2ac (patch)
tree5578a85cd255717aa34b26beace832cba2fc35c3 /crawl-ref/source/mon-act.cc
parentd03812fd80e1da99a0dd9005cdacc874c1a47764 (diff)
downloadcrawl-ref-536c3b657dc8efcc82d8eeb254ccdcf325eee2ac.tar.gz
crawl-ref-536c3b657dc8efcc82d8eeb254ccdcf325eee2ac.zip
Adjustments to Gozag's gold distraction (dpeg).
Monsters are now distracted for 1-5 turns on a 3% chance per pile of gold in LOS.
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r--crawl-ref/source/mon-act.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index f0b1ed437c..8e86a0e08b 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -2066,15 +2066,26 @@ void handle_monster_move(monster* mons)
return;
}
+ if (mons->has_ench(ENCH_GOLD_LUST))
+ {
+ mons->speed_increment -= non_move_energy;
+ return;
+ }
+
const int gold = gozag_gold_in_los(mons);
if (!mons->asleep()
&& !mons_is_avatar(mons->type)
&& !mons->wont_attack() && gold > 0)
{
- if (bernoulli(gold, 1/20.0))
+ if (bernoulli(gold, 3.0/100.0))
{
simple_monster_message(mons,
" is distracted by the nearby gold.");
+ mons->add_ench(
+ mon_enchant(ENCH_GOLD_LUST, 1, NULL,
+ random_range(1, 5) * BASELINE_DELAY));
+ mons->foe = MHITNOT;
+ mons->target = mons->pos();
mons->speed_increment -= non_move_energy;
return;
}