Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion code/game/objects/items/singularityhammer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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("<span class='big bold'>With a mighty thud, Mjolnier slams into the [src.loc], and its glow fades!</span><br>"))
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]"
Expand Down
24 changes: 24 additions & 0 deletions code/game/objects/structures/mjollnir.dm
Original file line number Diff line number Diff line change
@@ -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
Binary file modified icons/obj/wizard.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions yogstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down