diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-11 20:03:20 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-04-11 20:03:20 +0000 |
commit | e80122a2ce9321aaa14f1c80321525fb580182dd (patch) | |
tree | b6e9fc250f364719ad25bdbedbff70a3443b64a7 /crawl-ref/source/delay.cc | |
parent | 294794073634d4aa598858ba8f577b95f606356d (diff) | |
download | crawl-ref-e80122a2ce9321aaa14f1c80321525fb580182dd.tar.gz crawl-ref-e80122a2ce9321aaa14f1c80321525fb580182dd.zip |
* Fix 2744875 (mutation screen assert).
* Rename KeymapContext KC_* -> KMC_* to avoid overlap with
kill_category KC_*.
* Increase odds for chaos brands mimicking brands that hurt the defender.
* Tweak chaos_affects_attacker().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9595 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 5af430ddd0..f0ec367717 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -547,6 +547,15 @@ void stop_butcher_delay() stop_delay(); } +void maybe_clear_weapon_swap() +{ + if (transformation_can_wield(static_cast<transformation_type>( + you.attribute[ATTR_TRANSFORMATION]))) + { + you.attribute[ATTR_WEAPON_SWAP_INTERRUPTED] = 0; + } +} + void handle_interrupted_swap(bool swap_if_safe, bool force_unsafe, bool transform) { @@ -1968,8 +1977,8 @@ bool interrupt_activity( activity_interrupt_type ai, if (_should_stop_activity(item, ai, at)) { - // no monster will attack you inside a sanctuary, - // so presence of monsters won't matter + // No monster will attack you inside a sanctuary, + // so presence of monsters won't matter. if (is_sanctuary(you.pos())) return (false); @@ -1997,9 +2006,8 @@ bool interrupt_activity( activity_interrupt_type ai, { if (is_run_delay( you.delay_queue[j].type )) { - was_monst = - _monster_warning(ai, at, you.delay_queue[j].type) - || was_monst; + was_monst = was_monst || + _monster_warning(ai, at, you.delay_queue[j].type); stop_delay(ai == AI_TELEPORT); if (was_monst) |