[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
+1 -1
View File
@@ -129,7 +129,7 @@
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
if(boing && isliving(A) && !A.stat)
A.Weaken(2)
A.Weaken(4 SECONDS)
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
A.throw_at(target, 5, 1)
boing = FALSE
@@ -100,7 +100,7 @@
if(iscarbon(AM))
var/mob/living/carbon/M = AM
if(M.slip("foam", 5, 2))
if(M.slip("foam", 10 SECONDS))
if(reagents)
for(var/reagent_id in reagents.reagent_list)
var/amount = M.reagents.get_reagent_amount(reagent_id)
@@ -34,10 +34,10 @@
for(var/mob/M in viewers(5, location))
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
for(var/mob/M in viewers(1, location))
for(var/mob/living/L in viewers(1, location))
if(prob(50 * amount))
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
M.Weaken(rand(1,5))
to_chat(L, "<span class='warning'>The explosion knocks you down.</span>")
L.Weaken(rand(2 SECONDS, 10 SECONDS))
return
else
var/devastation = -1
@@ -202,7 +202,7 @@
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
if(..())
M.drop_item()
M.Sleeping(max(M.sleeping,10))
M.Sleeping(20 SECONDS)
M.emote("cough")
return 1
+1 -1
View File
@@ -47,7 +47,7 @@
/obj/effect/mine/stun
name = "stun mine"
var/stun_time = 8
var/stun_time = 16 SECONDS
/obj/effect/mine/stun/mineEffect(mob/living/victim)
if(isliving(victim))
+4 -4
View File
@@ -601,9 +601,9 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
if(M.stat != DEAD)
to_chat(M, "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>")
M.drop_item()
M.AdjustEyeBlurry(10)
M.Paralyse(1)
M.Weaken(2)
M.AdjustEyeBlurry(20 SECONDS)
M.Paralyse(2 SECONDS)
M.Weaken(4 SECONDS)
if(eyes.damage >= eyes.min_broken_damage)
if(M.stat != 2)
to_chat(M, "<span class='danger'>You go blind!</span>")
@@ -612,7 +612,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
H.UpdateDamageIcon()
else
M.take_organ_damage(7)
M.AdjustEyeBlurry(rand(3,4))
M.AdjustEyeBlurry(rand(6 SECONDS, 8 SECONDS))
return
/obj/item/singularity_pull(S, current_size)
+4 -4
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()
+7 -7
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()
..()
@@ -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)
@@ -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>"
@@ -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()
+2 -2
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>"
@@ -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)
@@ -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
+1 -1
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
+2 -3
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>")
+2 -3
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>")
+2 -2
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
+6 -6
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")
@@ -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()
+4 -4
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))))
+1 -1
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)
+5 -5
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")
@@ -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>")
@@ -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))
@@ -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>")
@@ -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)
@@ -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.
+2 -1
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"
@@ -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
+1 -1
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)
+1 -1
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
@@ -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()
@@ -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))
+3 -4
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
+9 -9
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.
+5 -5
View File
@@ -4,7 +4,7 @@
max_integrity = 300
face_while_pulling = TRUE
var/climbable
var/mob/climber
var/mob/living/climber
var/broken = FALSE
/obj/structure/New()
@@ -94,7 +94,7 @@
if(M.lying) return //No spamming this on people.
M.Weaken(5)
M.Weaken(10 SECONDS)
to_chat(M, "<span class='warning'>You topple as \the [src] moves under you!</span>")
if(prob(25))
@@ -132,15 +132,15 @@
H.UpdateDamageIcon()
return
/obj/structure/proc/can_touch(mob/user)
if(!user)
/obj/structure/proc/can_touch(mob/living/user)
if(!istype(user))
return 0
if(!Adjacent(user))
return 0
if(user.restrained() || user.buckled)
to_chat(user, "<span class='notice'>You need your hands and legs free for this.</span>")
return 0
if(user.stat || user.paralysis || user.sleeping || user.lying || user.IsWeakened())
if(user.stat || user.IsParalyzed() || user.IsSleeping() || user.lying || user.IsWeakened())
return 0
if(issilicon(user))
to_chat(user, "<span class='notice'>You need hands for this.</span>")
@@ -230,13 +230,13 @@
update_icon()
return
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
..()
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.IsWeakened() || user.stunned || user.paralysis || user.lying)
if(user.restrained() || user.stat || user.IsWeakened() || user.IsStunned() || user.IsParalyzed() || user.lying)
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
return
@@ -134,7 +134,7 @@
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
unbuckle_mob(M, force = TRUE)
M.emote("scream")
M.AdjustWeakened(10)
M.AdjustWeakened(20 SECONDS)
/obj/structure/kitchenspike/post_unbuckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset(0)
+4 -4
View File
@@ -202,12 +202,12 @@
return
return
/obj/structure/m_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
/obj/structure/m_tray/MouseDrop_T(atom/movable/O, mob/living/user)
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.stunned)
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
return
O.forceMove(loc)
if(user != O)
@@ -425,12 +425,12 @@
return
return
/obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
/obj/structure/c_tray/MouseDrop_T(atom/movable/O, mob/living/user)
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if(!ismob(user) || user.stat || user.lying || user.stunned)
if(!ismob(user) || user.stat || user.lying || user.IsStunned())
return
O.forceMove(loc)
if(user != O)
@@ -248,9 +248,8 @@
var/mob/living/buckled_mob = m
unbuckle_mob(buckled_mob)
buckled_mob.throw_at(A, 3, propelled)
buckled_mob.apply_effect(6, STUN, 0)
buckled_mob.apply_effect(6, WEAKEN, 0)
buckled_mob.apply_effect(6, STUTTER, 0)
buckled_mob.Weaken(12 SECONDS)
buckled_mob.Stuttering(12 SECONDS)
buckled_mob.take_organ_damage(10)
playsound(loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
buckled_mob.visible_message("<span class='danger'>[buckled_mob] crashed into [A]!</span>")
@@ -431,9 +430,8 @@
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.health < C.maxHealth*0.5)
C.apply_effect(6, STUN, 0)
C.apply_effect(6, WEAKEN, 0)
C.apply_effect(6, STUTTER, 0)
C.Weaken(12 SECONDS)
C.Stuttering(12 SECONDS)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
smash(user)
@@ -445,7 +443,7 @@
m.loc = get_turf(src)
qdel(src)
var/mob/living/T = M
T.Weaken(5)
T.Weaken(10 SECONDS)
return
..()
@@ -85,15 +85,13 @@
occupant.throw_at(A, 3, propelled)
occupant.apply_effect(6, STUN, 0)
occupant.apply_effect(6, WEAKEN, 0)
occupant.apply_effect(6, STUTTER, 0)
occupant.Weaken(12 SECONDS)
occupant.Stuttering(12 SECONDS)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
victim.apply_effect(6, STUN, 0)
victim.apply_effect(6, WEAKEN, 0)
victim.apply_effect(6, STUTTER, 0)
victim.Weaken(12 SECONDS)
victim.Stuttering(12 SECONDS)
victim.take_organ_damage(10)
occupant.visible_message("<span class='danger'>[occupant] crashed into \the [A]!</span>")
+4 -4
View File
@@ -93,7 +93,7 @@
/obj/structure/table/attack_hand(mob/living/user)
..()
if(climber)
climber.Weaken(2)
climber.Weaken(4 SECONDS)
climber.visible_message("<span class='warning'>[climber.name] has been knocked off the table", "You've been knocked off the table", "You hear [climber.name] get knocked off the table</span>")
else if(Adjacent(user) && user.pulling && user.pulling.pass_flags & PASSTABLE)
user.Move_Pulled(src)
@@ -141,7 +141,7 @@
/**
* Determines whether a projectile crossing our turf should be stopped.
* Return FALSE to stop the projectile.
*
*
* Arguments:
* * P - The projectile trying to cross.
* * from - Where the projectile is located.
@@ -199,7 +199,7 @@
to_chat(user, "<span class='warning'>You cannot do this there is \a [blocking_object] in the way!</span>")
return FALSE
G.affecting.forceMove(get_turf(src))
G.affecting.Weaken(2)
G.affecting.Weaken(4 SECONDS)
item_placed(G.affecting)
G.affecting.visible_message("<span class='danger'>[G.assailant] pushes [G.affecting] onto [src].</span>", \
"<span class='userdanger'>[G.assailant] pushes [G.affecting] onto [src].</span>")
@@ -438,7 +438,7 @@
debris -= AM
if(istype(AM, /obj/item/shard))
AM.throw_impact(L)
L.Weaken(5)
L.Weaken(10 SECONDS)
qdel(src)
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
@@ -68,20 +68,20 @@
return
for(var/atom/movable/AM in pod)
pod.eject(AM)
if(ismob(AM))
var/mob/M = AM
M.Weaken(5)
if(isliving(AM))
var/mob/living/L = AM
L.Weaken(10 SECONDS)
/obj/structure/transit_tube/station/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/grab) && hatch_state == TRANSIT_TUBE_OPEN)
var/obj/item/grab/G = W
if(ismob(G.affecting) && G.state >= GRAB_AGGRESSIVE)
var/mob/GM = G.affecting
var/mob/living/GM = G.affecting
for(var/obj/structure/transit_tube_pod/pod in loc)
pod.visible_message("<span class='warning'>[user] starts putting [GM] into [pod]!</span>")
if(do_after(user, 30, target = GM) && GM && G && G.affecting == GM)
GM.Weaken(5)
GM.Weaken(10 SECONDS)
Bumped(GM)
qdel(G)
break
+1 -1
View File
@@ -496,7 +496,7 @@
H.lip_style = null //Washes off lipstick
H.lip_color = initial(H.lip_color)
H.regenerate_icons()
user.AdjustDrowsy(-rand(2,3)) //Washing your face wakes you up if you're falling asleep
H.AdjustDrowsy(-rand(4 SECONDS, 6 SECONDS)) //Washing your face wakes you up if you're falling asleep
else
user.clean_blood()
+3 -3
View File
@@ -194,17 +194,17 @@
if(2)
M.visible_message("<span class='danger'>[user] bashes [M] against \the [src]!</span>")
if(prob(50))
M.Weaken(1)
M.Weaken(2 SECONDS)
M.apply_damage(10)
take_damage(25)
if(3)
M.visible_message("<span class='danger'><big>[user] crushes [M] against \the [src]!</big></span>")
M.Weaken(5)
M.Weaken(10 SECONDS)
M.apply_damage(20)
take_damage(50)
if(4)
visible_message("<span class='danger'><big>[user] smashes [M] against \the [src]!</big></span>")
M.Weaken(5)
M.Weaken(10 SECONDS)
M.apply_damage(30)
take_damage(75)
else