diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm index 84ea0c48da88..bc4d57e177f4 100644 --- a/code/game/objects/items/singularityhammer.dm +++ b/code/game/objects/items/singularityhammer.dm @@ -107,7 +107,17 @@ /obj/item/twohanded/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) . = ..() if(isliving(hit_atom)) - shock(hit_atom) + var/mob/M = hit_atom + var/atom/A = M.anti_magic_check() + if(A) + if(isitem(A)) + M.visible_message(span_warning("[M]'s [A] glows brightly as it disrupts the Mjolnir's power!")) + visible_message(span_boldwarning("With a mighty thud, Mjolnier slams into the [src.loc], and its glow fades!
")) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1, extrarange = 30) + new /obj/structure/mjollnir(src.loc) + qdel(src) + else + shock(hit_atom) /obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "mjollnir[wielded]" diff --git a/code/game/objects/structures/mjollnir.dm b/code/game/objects/structures/mjollnir.dm new file mode 100644 index 000000000000..cd19d05de077 --- /dev/null +++ b/code/game/objects/structures/mjollnir.dm @@ -0,0 +1,24 @@ +/obj/structure/mjollnir + name = "Mjolnir" + desc = "This once powerful hammer feels cold to the touch, but a thrum of magic inside tells you its only a matter of time until someone awakens it again." + icon = 'icons/obj/wizard.dmi' + icon_state = "mjollnir-inert" + resistance_flags = INDESTRUCTIBLE + anchored = TRUE + density = FALSE + var/pull_time = 15 SECONDS + +/obj/structure/mjollnir/attack_hand(mob/living/user) + . = ..() + if(user.mind.assigned_role == ROLE_WIZARD || user.mind.special_role == ROLE_WIZARD) //check and see if the person tugging on the hammer is a wizard + to_chat(user, span_notice("You place your hands firmly around the handle of the hammer and begin to pull with all your might!")) + else + to_chat(user, span_notice("You place your hands firmly around the handle of the hammer but feel it resist the pull of a nonmagical host! This will take a while.")) + if(do_after(user, pull_time * (user.mind.assigned_role == ROLE_WIZARD || user.mind.special_role == ROLE_WIZARD ? 1 : 2), target = src)) //if it is a wizard, it takes normal time + to_chat(user, span_userdanger("You successfully free Mjolnir from the ground and can feel its power returning once more!")) //if it's crew, it takes twice as long + var/obj/item/twohanded/mjollnir/M = new /obj/item/twohanded/mjollnir + playsound(user, 'sound/magic/lightningbolt.ogg', 50, 1) //keep this at 50 for half volume it's so fucking loud + user.put_in_hands(M) //firmly grasp it + qdel(src) //byebye + else + to_chat(user, span_danger("You let go of the handle and the hammer sinks back into its resting position.")) //either you got bumped by an assistant, or you're the wizard and got shot trying to reclaim your hammer diff --git a/icons/obj/wizard.dmi b/icons/obj/wizard.dmi index 12bb4ab50aea..5fb6f7393f1b 100644 Binary files a/icons/obj/wizard.dmi and b/icons/obj/wizard.dmi differ diff --git a/yogstation.dme b/yogstation.dme index e24438c62a06..27c1b2a96c59 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -1169,6 +1169,7 @@ #include "code\game\objects\structures\memorial.dm" #include "code\game\objects\structures\mineral_doors.dm" #include "code\game\objects\structures\mirror.dm" +#include "code\game\objects\structures\mjollnir.dm" #include "code\game\objects\structures\mop_bucket.dm" #include "code\game\objects\structures\morgue.dm" #include "code\game\objects\structures\noticeboard.dm"