From 03e185a56631a8740221e128d57cbbccd34380b0 Mon Sep 17 00:00:00 2001 From: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Date: Fri, 1 May 2026 17:32:18 -0400 Subject: [PATCH] Mjolnir successfully attacks only if it successfully attacks (#95921) ## About The Pull Request When you call parent but don't care if the parent succeeded: ## Why It's Good For The Game fixes #95887 --- .../antagonists/wizard/equipment/wizard_hammer.dm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/modules/antagonists/wizard/equipment/wizard_hammer.dm b/code/modules/antagonists/wizard/equipment/wizard_hammer.dm index 110fcfd214f..c5877735f31 100644 --- a/code/modules/antagonists/wizard/equipment/wizard_hammer.dm +++ b/code/modules/antagonists/wizard/equipment/wizard_hammer.dm @@ -113,16 +113,15 @@ var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src))) target.throw_at(throw_target, 200, 4) -/obj/item/mjollnir/attack(mob/living/target_mob, mob/user) - ..() - if(QDELETED(target_mob)) +/obj/item/mjollnir/afterattack(atom/target, mob/user) + if(QDELETED(target)) return - if(HAS_TRAIT(user, TRAIT_PACIFISM)) - return - if(HAS_TRAIT(src, TRAIT_WIELDED)) - yeet_shock(target_mob) + if(HAS_TRAIT(src, TRAIT_WIELDED) && isliving(target)) + yeet_shock(target) /obj/item/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) . = ..() + if(.) + return if(!QDELETED(hit_atom) && isliving(hit_atom)) yeet_shock(hit_atom)