diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-10 22:26:57 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-05-10 22:27:33 -0600 |
commit | 9ddeec1304bd9ceb6d1b57c49a052231b69db7e6 (patch) | |
tree | 42c92524281958158773d4950050de47aa7973da /crawl-ref/source/effects.cc | |
parent | 2f7339749739817cef38de6ae27b00fba938a1f3 (diff) | |
download | crawl-ref-9ddeec1304bd9ceb6d1b57c49a052231b69db7e6.tar.gz crawl-ref-9ddeec1304bd9ceb6d1b57c49a052231b69db7e6.zip |
Don't timeout Gozag bribes over time.
If you're hanging around in a branch, monster generation will eventually
exhaust the bribe, of course.
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 69f207e49f..fac837c58f 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2275,22 +2275,6 @@ static void _evolve(int time_delta) } } -static void _bribe_timeout(int time_delta) -{ - if (!you_worship(GOD_GOZAG)) - return; - - int reduction = time_delta / BASELINE_DELAY; - - for (int i = 0; i < NUM_BRANCHES; i++) - { - if (branch_bribe[i] <= 0) - continue; - - gozag_deduct_bribe(static_cast<branch_type>(i), reduction); - } -} - // Get around C++ dividing integers towards 0. static int _div(int num, int denom) { @@ -2322,7 +2306,9 @@ static struct timed_effect timed_effects[] = { TIMER_ABYSS_SPEED, _abyss_speed, 100, 300, false }, { TIMER_JIYVA, _jiyva_effects, 100, 300, false }, { TIMER_EVOLUTION, _evolve, 5000, 15000, false }, - { TIMER_BRIBE_TIMEOUT, _bribe_timeout, 100, 300, false }, +#if TAG_MAJOR_VERSION == 34 + { TIMER_BRIBE_TIMEOUT, NULL, 0, 0, false }, +#endif }; // Do various time related actions... @@ -2358,6 +2344,13 @@ void handle_time() if (crawl_state.game_is_arena() && !timed_effects[i].arena) continue; + if (!timed_effects[i].trigger) + { + if (you.next_timer_effect[i] < INT_MAX) + you.next_timer_effect[i] = INT_MAX; + continue; + } + if (you.elapsed_time >= you.next_timer_effect[i]) { int time_delta = you.elapsed_time - you.last_timer_effect[i]; |