Skip to content

Commit

Permalink
And codestyle.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeberdir committed Nov 7, 2024
1 parent 296e88c commit f47d825
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions code/game/objects/items/weapons/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,20 @@
icon_state = "mjollnir[HAS_TRAIT(src, TRAIT_WIELDED)]"


/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
for(var/atom/X as anything in (orange(5, pull) - wielder))
X.singularity_hammer_act(pull)
/obj/item/twohanded/singularityhammer/afterattack(atom/A, mob/user, proximity, params)
if(!proximity || charged < 5 || !HAS_TRAIT(src, TRAIT_WIELDED))
return

charged = 0
playsound(user, 'sound/weapons/marauder.ogg', 50, TRUE)

if(isliving(A))
var/mob/living/victim = A
victim.take_organ_damage(20)

var/turf/target = get_turf(A)
for(var/atom/pulled_thing as anything in (orange(5, target) - user))
pulled_thing.singularity_hammer_act(target)


/atom/proc/singularity_hammer_act(turf/pull)
Expand Down Expand Up @@ -697,19 +708,6 @@
..()


/obj/item/twohanded/singularityhammer/afterattack(atom/A, mob/user, proximity, params)
if(!proximity)
return
if(HAS_TRAIT(src, TRAIT_WIELDED))
if(charged == 5)
charged = 0
if(isliving(A))
var/mob/living/Z = A
Z.take_organ_damage(20, 0)
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
var/turf/target = get_turf(A)
vortex(target, user)

/obj/item/twohanded/mjollnir
name = "Mjolnir"
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
Expand Down

0 comments on commit f47d825

Please sign in to comment.