diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-04-05 17:55:46 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-07 18:23:22 -0600 |
commit | 4ee74b775d0df24ae970870f51aab3ca2f884081 (patch) | |
tree | def4d5fbf389c06a6259a8696a7ec86b186bb811 /crawl-ref/source/mon-place.cc | |
parent | 370b73db21adefc530e03f585cd63096bbf607ed (diff) | |
download | crawl-ref-4ee74b775d0df24ae970870f51aab3ca2f884081.tar.gz crawl-ref-4ee74b775d0df24ae970870f51aab3ca2f884081.zip |
Gozag: Don't let bribes take effect until the player spots the monster.
Prevents abuses like clearing out the Orc:$ end entirely offscreen; also
gives the opportunity for some nice dialogue.
Diffstat (limited to 'crawl-ref/source/mon-place.cc')
-rw-r--r-- | crawl-ref/source/mon-place.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc index 9517874b28..3d6a404dd6 100644 --- a/crawl-ref/source/mon-place.cc +++ b/crawl-ref/source/mon-place.cc @@ -1812,17 +1812,21 @@ static monster* _place_monster_aux(const mgen_data &mg, const monster *leader, if (minion) { const monster* sum = mg.summoner->as_monster(); - if (sum && sum->has_ench(ENCH_PERMA_BRIBED)) + if (sum + && (sum->has_ench(ENCH_PERMA_BRIBED) + || sum->props.exists(GOZAG_PERMABRIBE_KEY))) { gozag_deduct_bribe(br, 2*cost); - mon->add_ench(ENCH_PERMA_BRIBED); + mon->props[GOZAG_PERMABRIBE_KEY].get_bool() = true; } - else if (sum && sum->has_ench(ENCH_BRIBED)) + else if (sum + && (sum->has_ench(ENCH_BRIBED) + || sum->props.exists(GOZAG_BRIBE_KEY))) { gozag_deduct_bribe(br, cost); // Don't continue if we exhausted our funds. if (branch_bribe[br] > 0) - mon->add_ench(ENCH_BRIBED); + mon->props[GOZAG_BRIBE_KEY].get_bool() = true; } } else @@ -1831,14 +1835,14 @@ static monster* _place_monster_aux(const mgen_data &mg, const monster *leader, if (branch_bribe[br] > 2*cost && one_chance_in(3)) { gozag_deduct_bribe(br, 2*cost); - mon->add_ench(ENCH_PERMA_BRIBED); + mon->props[GOZAG_PERMABRIBE_KEY].get_bool() = true; } else { gozag_deduct_bribe(br, cost); // Don't continue if we exhausted our funds. if (branch_bribe[br] > 0) - mon->add_ench(ENCH_BRIBED); + mon->props[GOZAG_BRIBE_KEY].get_bool() = true; } } } |