[Ready] Refactors stuns and status effects. (#17579)

* Fixes reviver runtime

* Confusion status effect

* Dizzy status effect

* Drowsiness status effect

* decaying -> transient

* Drunkenness status effect

* why use timer when SSfastprocessing work good

* stuns (mostly)

* weaken and immobalise

* stun/weaken times

* update_flags redundancies.

* Slowed()

* Silence + fixes transient decay

* Jittery

* sleeping

* Paralyze -> weaken

* Cult sluring

* paralyse

* Stammer

* slurring + projectile cleanups

* losebreath

* Hallucination

* forgor this

* eyeblurry

* eye blind

* Druggy

* affected didn't like my spacing

* review pass

* second review pass

* some cleanups

* documentation and signal framework

* confusion fix

* Fixes spec_stun

* rejuv fix

* removes a TODO

* conflicted myself

* fixes

* self review

* review

* removes TODOs

* adminfreeze

* TM fixes

* hallucination fix + others

* tones down alchol and runtime fixes

* confusion overlay suggestion

* more fixes

* runtime fix

* losebreath fix

* clamp => directional bounded sum

* steel review

* oops

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* reduces the dizziness cycle rate

* borg hotfix

* sanctified decursening

Co-authored-by: mochi <1496804+dearmochi@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Charlie
2022-05-24 16:35:26 +01:00
committed by GitHub
parent b32fb92770
commit 0f7a8707ef
311 changed files with 2268 additions and 2155 deletions

View File

@@ -289,11 +289,11 @@
var/mob/living/carbon/human/C = target
user.visible_message("<span class='danger'> [user] sprays [src] into the face of [target]!</span>")
if(C.client)
C.EyeBlurry(3)
C.EyeBlind(1)
C.EyeBlurry(6 SECONDS)
C.EyeBlind(2 SECONDS)
if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS.
C.Confused(3)
C.Weaken(3)
C.Confused(6 SECONDS)
C.Weaken(6 SECONDS)
C.lip_style = "spray_face"
C.lip_color = colour
C.update_body()

View File

@@ -23,7 +23,7 @@
/obj/item/flash/proc/clown_check(mob/user)
if(user && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
flash_carbon(user, user, 15, 0)
flash_carbon(user, user, 30 SECONDS, 0)
return 0
return 1
@@ -86,14 +86,14 @@
return TRUE
/obj/item/flash/proc/flash_carbon(mob/living/carbon/M, mob/user = null, power = 5, targeted = 1)
/obj/item/flash/proc/flash_carbon(mob/living/carbon/M, mob/user = null, power = 10 SECONDS, targeted = 1)
if(user)
add_attack_logs(user, M, "Flashed with [src]")
if(targeted)
if(M.flash_eyes(1, 1))
M.AdjustConfused(power)
terrible_conversion_proc(M, user)
M.Stun(1)
M.Stun(2 SECONDS)
visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
to_chat(user, "<span class='danger'>You blind [M] with the flash!</span>")
to_chat(M, "<span class='userdanger'>[user] blinds you with the flash!</span>")
@@ -110,7 +110,7 @@
if(!try_use_flash(user))
return 0
if(iscarbon(M))
flash_carbon(M, user, 5, 1)
flash_carbon(M, user, 10 SECONDS, 1)
if(overcharged)
M.adjust_fire_stacks(6)
M.IgniteMob()
@@ -119,7 +119,7 @@
else if(issilicon(M))
add_attack_logs(user, M, "Flashed with [src]")
if(M.flash_eyes(affect_silicon = 1))
M.Weaken(rand(4, 6))
M.Weaken(rand(8 SECONDS, 12 SECONDS))
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with [src]!</span>", "<span class='danger'>You overload [M]'s sensors with [src]!</span>")
return 1
user.visible_message("<span class='disarm'>[user] fails to blind [M] with [src]!</span>", "<span class='warning'>You fail to blind [M] with [src]!</span>")
@@ -130,14 +130,14 @@
return 0
user.visible_message("<span class='disarm'>[user]'s [src] emits a blinding light!</span>", "<span class='danger'>Your [src] emits a blinding light!</span>")
for(var/mob/living/carbon/M in oviewers(3, null))
flash_carbon(M, user, 3, 0)
flash_carbon(M, user, 6 SECONDS, 0)
/obj/item/flash/emp_act(severity)
if(!try_use_flash())
return 0
for(var/mob/living/carbon/M in viewers(3, null))
flash_carbon(M, null, 10, 0)
flash_carbon(M, null, 20 SECONDS, 0)
burn_out()
..()

View File

@@ -63,10 +63,9 @@
else
to_chat(user, "<span class='danger'>[H] doesn't respond!</span>")
H.AdjustParalysis(3)
H.AdjustStunned(5)
H.AdjustWeakened(5)
H.AdjustStuttering(10)
H.AdjustParalysis(6 SECONDS)
H.AdjustWeakened(10 SECONDS)
H.AdjustStuttering(20 SECONDS)
to_chat(H, "<span class='danger'>You feel a powerful jolt!</span>")
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)

View File

@@ -118,7 +118,7 @@
//20% chance to actually hit the sensors
if(prob(effectchance * diode.rating))
S.flash_eyes(affect_silicon = 1)
S.Weaken(rand(5,10))
S.Weaken(rand(10 SECONDS, 20 SECONDS))
to_chat(S, "<span class='warning'>Your sensors were overloaded by a laser!</span>")
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"

View File

@@ -57,8 +57,8 @@
if(!signal || signal.encryption != code)
return
if(ismob(loc) && on)
var/mob/M = loc
if(isliving(loc) && on)
var/mob/living/M = loc
var/turf/T = M.loc
if(istype(T, /turf))
if(!M.moved_recently && M.last_move)
@@ -70,7 +70,7 @@
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
do_sparks(3, 1, M)
M.Weaken(5)
M.Weaken(10 SECONDS)
if(master)
master.receive_signal()

View File

@@ -543,7 +543,7 @@ REAGENT SCANNER
materials = list(MAT_METAL=30, MAT_GLASS=20)
/obj/item/slime_scanner/attack(mob/living/M, mob/living/user)
if(user.incapacitated() || user.eye_blind)
if(user.incapacitated() || user.AmountBlinded())
return
if(!isslime(M))
to_chat(user, "<span class='warning'>This device can only scan slimes!</span>")
@@ -749,7 +749,7 @@ REAGENT SCANNER
extra_font = (target.getBrainLoss() < 1 ?"<font color='blue'>" : "<font color='red'>")
dat += "[extra_font]\tApprox. Brain Damage %: [target.getBrainLoss()]<br>"
dat += "Paralysis Summary %: [target.paralysis] ([round(target.paralysis / 4)] seconds left!)<br>"
dat += "Paralysis Summary %: [target.IsParalyzed()] ([round(target.AmountParalyzed() / 10)] seconds left!)<br>"
dat += "Body Temperature: [target.bodytemperature-T0C]&deg;C ([target.bodytemperature*1.8-459.67]&deg;F)<br>"
dat += "<hr>"

View File

@@ -108,7 +108,7 @@
if(mytape && recording)
var/ending = copytext(msg, length(msg))
mytape.timestamp += mytape.used_capacity
if(M.stuttering)
if(M.AmountStuttering())
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [M.name] stammers, \"[msg]\""
return
if(M.getBrainLoss() >= 60)

View File

@@ -40,7 +40,7 @@
spawn((wavelength+(intensity*4))*10)
if(M)
if(intensity >= 5)
M.apply_effect(round(intensity/1.5), PARALYZE)
M.Paralyse(intensity * 40/3)
M.rad_act(intensity * 10)
else
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
@@ -292,8 +292,7 @@
/obj/item/teleporter/proc/telefrag(turf/fragging_location, mob/user)
for(var/mob/living/M in fragging_location)//Hit everything in the turf
M.apply_damage(20, BRUTE)
M.Stun(3)
M.Weaken(3)
M.Weaken(6 SECONDS)
to_chat(M, "<span_class='warning'>[user] teleports into you, knocking you to the floor with the bluespace wave!</span>")
/obj/item/paper/teleporter

View File

@@ -110,7 +110,7 @@
master.emote("scream")
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
flags &= ~NODROP
master.Weaken(3)
master.Weaken(6 SECONDS)
master.adjustBruteLoss(1000)
playsound(master, 'sound/effects/splat.ogg', 100, FALSE)
else

View File

@@ -21,9 +21,8 @@
return
user.do_attack_animation(M)
M.Weaken(5)
M.apply_effect(STUTTER, 5)
M.Stun(5)
M.Weaken(10 SECONDS)
M.apply_effect(STUTTER, 10 SECONDS)
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
"<span class='userdanger'>[user] has prodded you with [src]!</span>")

View File

@@ -336,10 +336,9 @@
popup.open()
/obj/item/robot_parts/robot_suit/Topic(href, href_list)
if(usr.lying || usr.stat || usr.stunned || !Adjacent(usr))
return
var/mob/living/living_user = usr
if(living_user.lying || living_user.stat || living_user.IsStunned() || !Adjacent(living_user))
return
var/obj/item/item_in_hand = living_user.get_active_hand()
if(!istype(item_in_hand, /obj/item/multitool))
to_chat(living_user, "<span class='warning'>You need a multitool!</span>")

View File

@@ -80,13 +80,13 @@
origin_tech = "materials=1;engineering=1;biotech=3"
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
/obj/item/wrench/medical/suicide_act(mob/user)
/obj/item/wrench/medical/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
// TODO Make them glow with the power of the M E D I C A L W R E N C H
// during their ascension
// Stun stops them from wandering off
user.Stun(5)
user.Stun(10 SECONDS)
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
// Let the sound effect finish playing

View File

@@ -16,11 +16,11 @@
// Settings
/// Whether the baton can stun silicon mobs
var/affect_silicon = FALSE
/// The stun time (in life cycles) for non-silicons
var/stun_time = 6 SECONDS_TO_LIFE_CYCLES
/// The stun time (in life cycles) for silicons
var/stun_time_silicon = 10 SECONDS_TO_LIFE_CYCLES
/// Cooldown in deciseconds between two knockdowns
/// The stun time (in seconds) for non-silicons
var/stun_time = 6 SECONDS
/// The stun time (in seconds) for silicons
var/stun_time_silicon = 10 SECONDS
/// Cooldown in seconds between two knockdowns
var/cooldown = 4 SECONDS
/// Sound to play when knocking someone down
var/stun_sound = 'sound/effects/woodhit.ogg'
@@ -38,7 +38,7 @@
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
user.visible_message("<span class='danger'>[user] accidentally clubs [user.p_them()]self with [src]!</span>", \
"<span class='userdanger'>You accidentally club yourself with [src]!</span>")
user.Weaken(force * 3)
user.Weaken(stun_time)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(force * 2, BRUTE, "head")

View File

@@ -214,7 +214,7 @@
qdel(captured)
qdel(src)
else
captured.Paralyse(4)
captured.Paralyse(8 SECONDS)
if(captured.loc != src)
captured.forceMove(src)
update_icon()

View File

@@ -374,7 +374,7 @@
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
H.adjustStaminaLoss(50)
H.Weaken(5)
H.Weaken(10 SECONDS)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
if(!H.undergoing_cardiac_arrest() && (prob(10) || (defib.combat && defib.heart_attack) || prob(10) && (defib.combat))) // If the victim is not having a heart attack, and a 10% chance passes, or the defib has heart attack variable to TRUE while being a combat defib, or if another 10% chance passes with combat being TRUE
@@ -471,7 +471,7 @@
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
H.update_revive()
H.KnockOut()
H.Paralyse(5)
H.Paralyse(10 SECONDS)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
@@ -540,7 +540,7 @@
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
H.adjustStaminaLoss(50)
H.Weaken(5)
H.Weaken(10 SECONDS)
if(!H.undergoing_cardiac_arrest() && prob(10)) // Your heart explodes.
H.set_heartattack(TRUE)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
@@ -595,7 +595,7 @@
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.Paralyse(10 SECONDS)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))

View File

@@ -203,7 +203,7 @@
if(7)
//Throw
T.visible_message("<span class='userdanger'>Unseen forces throw [user]!</span>")
user.Stun(6)
user.Stun(12 SECONDS)
user.adjustBruteLoss(50)
var/throw_dir = GLOB.cardinal
var/atom/throw_target = get_edge_target_turf(user, throw_dir)

View File

@@ -89,12 +89,12 @@
if(G && istype(G))
if(improvised) // Improvised garrotes start you off with a passive grab, but keep you stunned like an agressive grab.
M.Stun(1)
M.Stun(2 SECONDS)
else
G.state = GRAB_NECK
G.hud.icon_state = "kill"
G.hud.name = "kill"
M.AdjustSilence(1)
M.AdjustSilence(2 SECONDS)
garrote_time = world.time + 10
START_PROCESSING(SSobj, src)
@@ -153,15 +153,15 @@
return
if(G.state < GRAB_NECK) // Only possible with improvised garrotes, essentially this will stun people as if they were aggressively grabbed. Allows for resisting out if you're quick, but not running away.
strangling.Stun(3)
strangling.Stun(6 SECONDS)
if(improvised)
strangling.stuttering = max(strangling.stuttering, 3)
strangling.Stuttering(6 SECONDS)
strangling.apply_damage(2, OXY, "head")
return
strangling.Silence(3) // Non-improvised effects
strangling.Silence(6 SECONDS) // Non-improvised effects
strangling.apply_damage(4, OXY, "head")

View File

@@ -33,7 +33,7 @@
. = ..()
// The reason this AddComponent is here and not in ComponentInitialize() is because if it's put there, it will be ran before the parent New proc for /grown types.
// And then be overriden by the generic component placed onto it by the `/datum/plant_gene/trait/slip`.
AddComponent(/datum/component/slippery, src, 0, 7, 100, 4, FALSE)
AddComponent(/datum/component/slippery, src, 14 SECONDS, 100, 4, FALSE)
/obj/item/grown/bananapeel/traitorpeel/after_slip(mob/living/carbon/human/H)
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")

View File

@@ -47,22 +47,19 @@
M.show_message("<span class='warning'>BANG</span>", 2)
var/distance = max(1, get_dist(source_turf, get_turf(M)))
var/stun_amount = max(10 / distance, 3)
var/stun_amount = max(20 SECONDS / distance, 6 SECONDS)
// Flash
if(flash)
if(M.flash_eyes(affect_silicon = TRUE))
M.Stun(stun_amount)
M.Weaken(stun_amount)
// Bang
var/ear_safety = M.check_ear_prot()
if(bang)
if(!distance || A.loc == M || A.loc == M.loc) // Holding on person or being exactly where lies is significantly more dangerous and voids protection
M.Stun(10)
M.Weaken(10)
M.Weaken(20 SECONDS)
if(!ear_safety)
M.Stun(stun_amount)
M.Weaken(stun_amount)
M.AdjustEarDamage(5, 15)
if(iscarbon(M))

View File

@@ -48,7 +48,7 @@
if(!user.mind || !user.mind.isholy)
user.adjustBruteLoss(force)
user.adjustFireLoss(sanctify_force)
user.Weaken(5)
user.Weaken(10 SECONDS)
user.unEquip(src, 1)
user.visible_message("<span class='warning'>[src] slips out of the grip of [user] as they try to pick it up, bouncing upwards and smacking [user.p_them()] in the face!</span>", \
"<span class='warning'>[src] slips out of your grip as you pick it up, bouncing upwards and smacking you in the face!</span>")
@@ -515,7 +515,7 @@
if(src == holder.l_hand || src == holder.r_hand)
for(var/mob/living/carbon/human/H in range(5, loc))
if(H.mind.assigned_role == "Clown")
H.Silence(10)
H.Silence(20 SECONDS)
animate_fade_grayscale(H,20)
if(prob(10))
to_chat(H, "<span class='userdanger'>Being in the presence of [holder]'s [src] is interfering with your honk!</span>")

View File

@@ -65,7 +65,7 @@
sleep(delay/4)
if(imp_in && imp_in.stat)
imp_in.visible_message("<span class = 'warning'>[imp_in] doubles over in pain!</span>")
imp_in.Weaken(7)
imp_in.Weaken(14 SECONDS)
playsound(loc, 'sound/items/timer.ogg', 30, 0)
sleep(delay/4)
playsound(loc, 'sound/items/timer.ogg', 30, 0)

View File

@@ -16,7 +16,7 @@
for(var/obj/item/grab/G in C_imp_in.grabbed_by)
var/mob/living/carbon/M = G.assailant
C_imp_in.visible_message("<span class='warning'>[C_imp_in] suddenly shocks [M] from their wrists and slips out of their grab!</span>")
M.Stun(1) //Drops the grab
M.Stun(2 SECONDS) //Drops the grab
M.apply_damage(2, BURN, "r_hand", M.run_armor_check("r_hand", "energy"))
M.apply_damage(2, BURN, "l_hand", M.run_armor_check("l_hand", "energy"))
C_imp_in.SetStunned(0) //This only triggers if they are grabbed, to have them break out of the grab, without the large stun time.

View File

@@ -158,6 +158,7 @@
gender = NEUTER
origin_tech = "engineering=3;combat=1"
hitsound = 'sound/effects/snap.ogg'
///the duration of the stun in seconds
var/weaken = 0
/obj/item/restraints/legcuffs/bola/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
@@ -186,7 +187,7 @@
item_state = "bola_r"
breakouttime = 70
origin_tech = "engineering=4;combat=3"
weaken = 1
weaken = 2 SECONDS
/obj/item/restraints/legcuffs/bola/energy //For Security
name = "energy bola"

View File

@@ -5,7 +5,7 @@
if(target.check_block())
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
"<span class='userdanger'>You block the attack!</span>")
user.Stun(2)
user.Stun(4 SECONDS)
return TRUE
/obj/item/melee/chainofcommand

View File

@@ -69,7 +69,7 @@
if(do_after(user, 50 * toolspeed, target = H))
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
user.visible_message("<span class='danger'>[user] abruptly stops cutting [M]'s hair and slices [M.p_their()] throat!</span>", "<span class='danger'>You stop cutting [M]'s hair and slice [M.p_their()] throat!</span>") //Just a little off the top.
H.AdjustLoseBreath(10) //30 Oxy damage over time
H.AdjustLoseBreath(20 SECONDS) //30 Oxy damage over time
H.apply_damage(18, BRUTE, "head", sharp =1, used_weapon = "scissors")
var/turf/location = get_turf(src)
H.add_splatter_floor(location)

View File

@@ -14,7 +14,7 @@
var/cleanspeed = 50 //slower than mop
/obj/item/soap/ComponentInitialize()
AddComponent(/datum/component/slippery, src, 4, 2, 100, 0, FALSE)
AddComponent(/datum/component/slippery, src, 8 SECONDS, 100, 0, FALSE)
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
if(!proximity) return

View File

@@ -121,7 +121,7 @@
if(H.get_item_by_slot(slot_head) == src)
if(H.internal)
return
H.AdjustLoseBreath(1)
H.AdjustLoseBreath(2 SECONDS)
else
storage_slots = 7
STOP_PROCESSING(SSobj, src)
@@ -403,7 +403,7 @@
if(ishuman(M))
if(prob(10))
M.Weaken(2)
M.Weaken(4 SECONDS)
/obj/item/storage/bag/tray/proc/rebuild_overlays()
overlays.Cut()

View File

@@ -86,7 +86,7 @@
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "<span class='warning'>[src] slips out of your hand and hits your head.</span>")
user.take_organ_damage(10)
user.Paralyse(20)
user.Paralyse(40 SECONDS)
return
if(M.stat != DEAD && ishuman(M))

View File

@@ -12,7 +12,7 @@
attack_verb = list("beaten")
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 0, RAD = 0, FIRE = 80, ACID = 80)
/// How many life ticks does the stun last for
var/stunforce = 7
var/stunforce = 14 SECONDS
/// Is the baton currently turned on
var/turned_on = FALSE
/// How much power does it cost to stun someone
@@ -194,7 +194,6 @@
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK, 33)
L.Stun(stunforce)
L.Weaken(stunforce)
L.Stuttering(stunforce)
@@ -213,7 +212,7 @@
if(cell)
deductcharge(1000 / severity)
/obj/item/melee/baton/wash(mob/user, atom/source)
/obj/item/melee/baton/wash(mob/living/user, atom/source)
if(turned_on && cell?.charge)
flick("baton_active", source)
user.Stun(stunforce)
@@ -235,7 +234,7 @@
item_state = "prod"
force = 3
throwforce = 5
stunforce = 5
stunforce = 10 SECONDS
hitcost = 2000
throw_hit_chance = 10
slot_flags = SLOT_BACK

View File

@@ -252,11 +252,12 @@
. = ..()
if(wielded && charge == max_charge)
if(isliving(M))
var/mob/living/target = M
charge = 0
playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1)
user.visible_message("<span class='danger'>[user] slams the charged axe into [M.name] with all [user.p_their()] might!</span>")
do_sparks(1, 1, src)
M.Weaken(4)
target.Weaken(8 SECONDS)
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
M.throw_at(throw_target, 5, 1)
@@ -615,7 +616,7 @@
icon_state = "chainsaw0"
..()
/obj/item/twohanded/chainsaw/attack(mob/target, mob/living/user)
/obj/item/twohanded/chainsaw/attack(mob/living/target, mob/living/user)
if(wielded)
playsound(loc, 'sound/weapons/chainsaw.ogg', 100, 1, -1) //incredibly loud; you ain't goin' for stealth with this thing. Credit to Lonemonk of Freesound for this sound.
if(isrobot(target))
@@ -624,7 +625,7 @@
if(!isliving(target))
return
else
target.Weaken(4)
target.Weaken(8 SECONDS)
..()
return
else
@@ -695,7 +696,7 @@
var/obj/item/clothing/shoes/magboots/M = H.shoes
if(M.magpulse)
continue
H.Weaken(2)
H.Weaken(4 SECONDS)
step_towards(H, pull)
step_towards(H, pull)
step_towards(H, pull)
@@ -736,21 +737,20 @@
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/twohanded/mjollnir/attack(mob/M, mob/user)
/obj/item/twohanded/mjollnir/attack(mob/living/M, mob/user)
..()
if(wielded)
//if(charged == 5)
//charged = 0
playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(isliving(M))
M.Stun(3)
shock(M)
M.Stun(6 SECONDS)
shock(M)
/obj/item/twohanded/mjollnir/throw_impact(atom/target)
. = ..()
if(isliving(target))
var/mob/living/L = target
L.Stun(3)
L.Stun(6 SECONDS)
shock(L)
/obj/item/twohanded/mjollnir/update_icon() //Currently only here to fuck with the on-mob icons.