From: <gi...@cr...> - 2025-07-14 20:40:10
|
via 90afa8895f949b052c87b5a2574869fd94d62c6c (commit) from 3f269bfe755b530276f8f3e0dd00cc7cab9f2c66 (commit) ----------------------------------------------------------------------- commit 90afa8895f949b052c87b5a2574869fd94d62c6c Author: DracoOmega <dra...@gm...> Date: Mon Jul 14 18:09:07 2025 -0230 Fix monsters sometimes not waking from spell damage (Planckenstein) Accidentally broken by 77f475f ----------------------------------------------------------------------- Summary of changes: crawl-ref/source/beam.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 463335b16f..ec29c6fd55 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -5181,9 +5181,12 @@ void bolt::monster_post_hit(monster* mon, int dmg) // Don't annoy friendlies or good neutrals if the player's beam // did no damage. Hostiles will still take umbrage. - if ((dmg > 0 || !mon->wont_attack()) && !BLAME_KILL(thrower)) + if (dmg > 0 || !mon->wont_attack() || !YOU_KILL(thrower)) { - behaviour_event(mon, ME_ANNOY, agent()); + const actor* to_blame = agent(); + if (thrower == KILL_YOU_CONF) + to_blame = actor_by_mid(source_id); + behaviour_event(mon, ME_ANNOY, to_blame); // behaviour_event can make a monster leave the level or vanish. if (!mon->alive()) -- Dungeon Crawl Stone Soup |