summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 8dfbb0aafe..676c72386a 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -3847,8 +3847,9 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk)
void melee_attack::mons_perform_attack_rounds()
{
- const int nrounds = atk->has_hydra_multi_attack()? atk->number : 4;
- const coord_def pos = defender->pos();
+ const int nrounds = atk->has_hydra_multi_attack() ? atk->number : 4;
+ const coord_def pos = defender->pos();
+ const bool was_delayed = you_are_delayed();
// Melee combat, tell attacker to wield its melee weapon.
atk->wield_melee_weapon();
@@ -3977,7 +3978,7 @@ void melee_attack::mons_perform_attack_rounds()
defender->hurt(attacker, damage_done + special_damage);
if (!defender->alive() || attacker == defender)
- return;
+ break;
special_damage = 0;
special_damage_message.clear();
@@ -3997,6 +3998,13 @@ void melee_attack::mons_perform_attack_rounds()
set_ident_flags( *weap, ISFLAG_KNOW_CURSE );
}
}
+
+ // Inivislbe monster might have interrupted butchering.
+ if (was_delayed && defender->atype() == ACT_PLAYER && perceived_attack
+ && !attacker_visible)
+ {
+ handle_interrupted_swap(false, true);
+ }
}
bool melee_attack::mons_perform_attack()