mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Adds macros to help with common set_- and adjust_timed_status_effect uses (#69951)
* Adds helpers for status effect application
This commit is contained in:
@@ -701,7 +701,7 @@
|
||||
user.playsound_local(get_turf(src), slowbeat, 40, 0, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE)
|
||||
if(isliving(user))
|
||||
var/mob/living/living_user = user
|
||||
living_user.adjust_timed_status_effect(10 SECONDS, /datum/status_effect/jitter)
|
||||
living_user.adjust_jitter(10 SECONDS)
|
||||
addtimer(CALLBACK(src, .proc/drop_card, user), 10 SECONDS)
|
||||
. += span_notice("<i>There's more information below, you can look again to take a closer look...</i>")
|
||||
|
||||
|
||||
@@ -517,7 +517,7 @@
|
||||
span_userdanger("[user] touches [M] with [src]!"))
|
||||
M.adjustStaminaLoss(60)
|
||||
M.Knockdown(75)
|
||||
M.set_timed_status_effect(100 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
|
||||
M.set_jitter_if_lower(100 SECONDS)
|
||||
M.apply_status_effect(/datum/status_effect/convulsing)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, TRUE, -1)
|
||||
if(HAS_TRAIT(M,MOB_ORGANIC))
|
||||
@@ -563,7 +563,7 @@
|
||||
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
|
||||
log_combat(user, H, "overloaded the heart of", defib)
|
||||
H.Paralyze(100)
|
||||
H.set_timed_status_effect(200 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
|
||||
H.set_jitter_if_lower(200 SECONDS)
|
||||
do_success()
|
||||
return
|
||||
do_cancel()
|
||||
@@ -638,7 +638,7 @@
|
||||
H.grab_ghost()
|
||||
H.revive(full_heal = FALSE, admin_revive = FALSE)
|
||||
H.emote("gasp")
|
||||
H.set_timed_status_effect(200 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
|
||||
H.set_jitter_if_lower(200 SECONDS)
|
||||
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.add_mood_event("saved_life", /datum/mood_event/saved_life)
|
||||
log_combat(user, H, "revived", defib)
|
||||
|
||||
@@ -67,5 +67,5 @@
|
||||
else
|
||||
to_chat(target, span_hypnophrase("The light is so pretty..."))
|
||||
target.adjust_drowsyness(min(target.drowsyness + 10, 20))
|
||||
target.adjust_timed_status_effect(10 SECONDS, /datum/status_effect/confusion, max_duration = 20 SECONDS)
|
||||
target.adjust_timed_status_effect(20 SECONDS, /datum/status_effect/dizziness, max_duration = 40 SECONDS)
|
||||
target.adjust_confusion_up_to(10 SECONDS, 20 SECONDS)
|
||||
target.adjust_dizzy_up_to(20 SECONDS, 40 SECONDS)
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
SEND_SOUND(slapped, sound('sound/weapons/flash_ring.ogg'))
|
||||
shake_camera(slapped, 2, 2)
|
||||
slapped.Paralyze(2.5 SECONDS)
|
||||
slapped.adjust_timed_status_effect(7 SECONDS, /datum/status_effect/confusion)
|
||||
slapped.adjust_confusion(7 SECONDS)
|
||||
slapped.adjustStaminaLoss(40)
|
||||
else if(user.zone_selected == BODY_ZONE_HEAD || user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
|
||||
if(user == slapped)
|
||||
@@ -495,12 +495,12 @@
|
||||
if(1)
|
||||
other_msg = "stumbles slightly, turning a bright red!"
|
||||
self_msg = "You lose control of your limbs for a moment as your blood rushes to your face, turning it bright red!"
|
||||
living_target.adjust_timed_status_effect(rand(5 SECONDS, 10 SECONDS), /datum/status_effect/confusion)
|
||||
living_target.adjust_confusion(rand(5 SECONDS, 10 SECONDS))
|
||||
if(2)
|
||||
other_msg = "stammers softly for a moment before choking on something!"
|
||||
self_msg = "You feel your tongue disappear down your throat as you fight to remember how to make words!"
|
||||
addtimer(CALLBACK(living_target, /atom/movable.proc/say, pick("Uhhh...", "O-oh, uhm...", "I- uhhhhh??", "You too!!", "What?")), rand(0.5 SECONDS, 1.5 SECONDS))
|
||||
living_target.adjust_timed_status_effect(rand(10 SECONDS, 30 SECONDS), /datum/status_effect/speech/stutter)
|
||||
living_target.adjust_stutter(rand(10 SECONDS, 30 SECONDS))
|
||||
if(3)
|
||||
other_msg = "locks up with a stunned look on [living_target.p_their()] face, staring at [firer ? firer : "the ceiling"]!"
|
||||
self_msg = "Your brain completely fails to process what just happened, leaving you rooted in place staring at [firer ? "[firer]" : "the ceiling"] for what feels like an eternity!"
|
||||
|
||||
@@ -371,8 +371,8 @@
|
||||
return span_danger("The baton is still charging!")
|
||||
|
||||
/obj/item/melee/baton/telescopic/contractor_baton/additional_effects_non_cyborg(mob/living/target, mob/living/user)
|
||||
target.set_timed_status_effect(40 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
|
||||
target.adjust_timed_status_effect(40 SECONDS, /datum/status_effect/speech/stutter)
|
||||
target.set_jitter_if_lower(40 SECONDS)
|
||||
target.adjust_stutter(40 SECONDS)
|
||||
|
||||
/obj/item/melee/baton/security
|
||||
name = "stun baton"
|
||||
@@ -563,9 +563,9 @@
|
||||
* After a period of time, we then check to see what stun duration we give.
|
||||
*/
|
||||
/obj/item/melee/baton/security/additional_effects_non_cyborg(mob/living/target, mob/living/user)
|
||||
target.set_timed_status_effect(40 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
|
||||
target.set_timed_status_effect(10 SECONDS, /datum/status_effect/confusion, only_if_higher = TRUE)
|
||||
target.set_timed_status_effect(16 SECONDS, /datum/status_effect/speech/stutter, only_if_higher = TRUE)
|
||||
target.set_jitter_if_lower(40 SECONDS)
|
||||
target.set_confusion_if_lower(10 SECONDS)
|
||||
target.set_stutter_if_lower(16 SECONDS)
|
||||
|
||||
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
|
||||
addtimer(CALLBACK(src, .proc/apply_stun_effect_end, target), 2 SECONDS)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
user.do_attack_animation(attacked_mob)
|
||||
attacked_mob.Paralyze(100)
|
||||
attacked_mob.adjust_timed_status_effect(10 SECONDS, /datum/status_effect/speech/stutter)
|
||||
attacked_mob.adjust_stutter(10 SECONDS)
|
||||
|
||||
attacked_mob.visible_message(span_danger("[user] prods [attacked_mob] with [src]!"), \
|
||||
span_userdanger("[user] prods you with [src]!"))
|
||||
@@ -326,7 +326,7 @@
|
||||
for(var/mob/living/carbon/carbon in get_hearers_in_view(9, user))
|
||||
if(carbon.get_ear_protection())
|
||||
continue
|
||||
carbon.adjust_timed_status_effect(6 SECONDS, /datum/status_effect/confusion)
|
||||
carbon.adjust_confusion(6 SECONDS)
|
||||
|
||||
audible_message("<font color='red' size='7'>HUMAN HARM</font>")
|
||||
playsound(get_turf(src), 'sound/ai/harmalarm.ogg', 70, 3)
|
||||
@@ -341,14 +341,14 @@
|
||||
var/bang_effect = carbon.soundbang_act(2, 0, 0, 5)
|
||||
switch(bang_effect)
|
||||
if(1)
|
||||
carbon.adjust_timed_status_effect(5 SECONDS, /datum/status_effect/confusion)
|
||||
carbon.adjust_timed_status_effect(20 SECONDS, /datum/status_effect/speech/stutter)
|
||||
carbon.adjust_timed_status_effect(20 SECONDS, /datum/status_effect/jitter)
|
||||
carbon.adjust_confusion(5 SECONDS)
|
||||
carbon.adjust_stutter(20 SECONDS)
|
||||
carbon.adjust_jitter(20 SECONDS)
|
||||
if(2)
|
||||
carbon.Paralyze(40)
|
||||
carbon.adjust_timed_status_effect(10 SECONDS, /datum/status_effect/confusion)
|
||||
carbon.adjust_timed_status_effect(30 SECONDS, /datum/status_effect/speech/stutter)
|
||||
carbon.adjust_timed_status_effect(50 SECONDS, /datum/status_effect/jitter)
|
||||
carbon.adjust_confusion(10 SECONDS)
|
||||
carbon.adjust_stutter(30 SECONDS)
|
||||
carbon.adjust_jitter(50 SECONDS)
|
||||
playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3)
|
||||
COOLDOWN_START(src, alarm_cooldown, HARM_ALARM_NO_SAFETY_COOLDOWN)
|
||||
user.log_message("used an emagged Cyborg Harm Alarm", LOG_ATTACK)
|
||||
|
||||
Reference in New Issue
Block a user