mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
Converts jittering to status effect, striking yet another mob level status value (#66852)
Converts jittering to status effect, striking yet another mob level status value
This commit is contained in:
@@ -137,7 +137,7 @@
|
||||
owner.emote("scream")
|
||||
owner.Paralyze(100)
|
||||
|
||||
owner.jitteriness += 30
|
||||
owner.adjust_timed_status_effect(1 MINUTES, /datum/status_effect/jitter)
|
||||
owner.adjust_timed_status_effect(30 SECONDS, /datum/status_effect/confusion)
|
||||
owner.adjust_timed_status_effect(1 MINUTES, /datum/status_effect/speech/stutter)
|
||||
|
||||
|
||||
@@ -385,15 +385,14 @@
|
||||
if(should_stun)
|
||||
Paralyze(40)
|
||||
//Jitter and other fluff.
|
||||
jitteriness += 1000
|
||||
do_jitter_animation(jitteriness)
|
||||
do_jitter_animation(300)
|
||||
adjust_timed_status_effect(20 SECONDS, /datum/status_effect/jitter)
|
||||
adjust_timed_status_effect(4 SECONDS, /datum/status_effect/speech/stutter)
|
||||
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 20)
|
||||
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 2 SECONDS)
|
||||
return shock_damage
|
||||
|
||||
///Called slightly after electrocute act to reduce jittering and apply a secondary stun.
|
||||
///Called slightly after electrocute act to apply a secondary stun.
|
||||
/mob/living/carbon/proc/secondary_shock(should_stun)
|
||||
jitteriness = max(jitteriness - 990, 10)
|
||||
if(should_stun)
|
||||
Paralyze(60)
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ GLOBAL_LIST_EMPTY(dead_players_during_shift)
|
||||
|
||||
. = ..()
|
||||
|
||||
jitteriness = 0
|
||||
if(client && !suiciding && !(client in GLOB.dead_players_during_shift))
|
||||
GLOB.dead_players_during_shift += client
|
||||
GLOB.deaths_during_shift++
|
||||
|
||||
@@ -100,15 +100,6 @@
|
||||
if (length(status_examines))
|
||||
. += status_examines
|
||||
|
||||
//Jitters
|
||||
switch(jitteriness)
|
||||
if(300 to INFINITY)
|
||||
. += span_warning("<B>[t_He] [t_is] convulsing violently!</B>")
|
||||
if(200 to 300)
|
||||
. += span_warning("[t_He] [t_is] extremely jittery.")
|
||||
if(100 to 200)
|
||||
. += span_warning("[t_He] [t_is] twitching ever so slightly.")
|
||||
|
||||
var/appears_dead = FALSE
|
||||
var/just_sleeping = FALSE
|
||||
|
||||
|
||||
@@ -1017,7 +1017,7 @@
|
||||
H.show_message(span_narsiesmall("You cringe with pain as your body rings around you!"), MSG_AUDIBLE)
|
||||
H.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
|
||||
H.soundbang_act(2, 0, 100, 1)
|
||||
H.jitteriness += 7
|
||||
H.adjust_timed_status_effect(14 SECONDS, /datum/status_effect/jitter)
|
||||
var/distance = max(0,get_dist(get_turf(H),get_turf(M)))
|
||||
switch(distance)
|
||||
if(0 to 1)
|
||||
@@ -1025,13 +1025,13 @@
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 100, TRUE)
|
||||
M.soundbang_act(1, 0, 30, 3)
|
||||
M.adjust_timed_status_effect(10 SECONDS, /datum/status_effect/confusion)
|
||||
M.jitteriness += 4
|
||||
M.adjust_timed_status_effect(8 SECONDS, /datum/status_effect/jitter)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
|
||||
if(2 to 3)
|
||||
M.show_message(span_cult("GONG!"), MSG_AUDIBLE)
|
||||
M.playsound_local(H, 'sound/effects/gong.ogg', 75, TRUE)
|
||||
M.soundbang_act(1, 0, 15, 2)
|
||||
M.jitteriness += 3
|
||||
M.adjust_timed_status_effect(6 SECONDS, /datum/status_effect/jitter)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "gonged", /datum/mood_event/loud_gong)
|
||||
else
|
||||
M.show_message(span_warning("GONG!"), MSG_AUDIBLE)
|
||||
|
||||
@@ -434,14 +434,6 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
if(DT_PROB(2.5, delta_time))
|
||||
AdjustSleeping(10 SECONDS)
|
||||
|
||||
//Jitteriness
|
||||
if(jitteriness)
|
||||
do_jitter_animation(jitteriness)
|
||||
jitteriness = max(jitteriness - (restingpwr * delta_time), 0)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "jittery", /datum/mood_event/jittery)
|
||||
else
|
||||
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "jittery")
|
||||
|
||||
if(silent)
|
||||
silent = max(silent - (0.5 * delta_time), 0)
|
||||
|
||||
|
||||
@@ -108,9 +108,6 @@
|
||||
blur_eyes(effect * hit_percent)
|
||||
if(EFFECT_DROWSY)
|
||||
adjust_drowsyness(effect * hit_percent)
|
||||
if(EFFECT_JITTER)
|
||||
if((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE))
|
||||
jitteriness = max(jitteriness,(effect * hit_percent))
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
@@ -129,7 +126,7 @@
|
||||
drowsy = 0,
|
||||
blocked = 0, // This one's not an effect, don't be confused - it's block chance
|
||||
stamina = 0, // This one's a damage type, and not an effect
|
||||
jitter = 0,
|
||||
jitter = 0 SECONDS,
|
||||
paralyze = 0,
|
||||
immobilize = 0,
|
||||
)
|
||||
@@ -151,12 +148,12 @@
|
||||
apply_effect(eyeblur, EFFECT_EYE_BLUR, blocked)
|
||||
if(drowsy)
|
||||
apply_effect(drowsy, EFFECT_DROWSY, blocked)
|
||||
if(jitter)
|
||||
apply_effect(jitter, EFFECT_JITTER, blocked)
|
||||
|
||||
if(stamina)
|
||||
apply_damage(stamina, STAMINA, null, blocked)
|
||||
|
||||
if(jitter && (status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE))
|
||||
adjust_timed_status_effect(jitter, /datum/status_effect/jitter)
|
||||
if(slur)
|
||||
adjust_timed_status_effect(slur, /datum/status_effect/speech/slurring/drunk)
|
||||
if(stutter)
|
||||
|
||||
@@ -840,7 +840,6 @@
|
||||
heal_overall_damage(INFINITY, INFINITY, INFINITY, null, TRUE) //heal brute and burn dmg on both organic and robotic limbs, and update health right away.
|
||||
extinguish_mob()
|
||||
set_drowsyness(0)
|
||||
jitteriness = 0
|
||||
stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_POST_FULLY_HEAL, admin_revive)
|
||||
|
||||
@@ -1110,13 +1109,6 @@
|
||||
else if(!src.mob_negates_gravity())
|
||||
step_towards(src,S)
|
||||
|
||||
/mob/living/proc/do_jitter_animation(jitteriness)
|
||||
var/amplitude = min(4, (jitteriness/100) + 1)
|
||||
var/pixel_x_diff = rand(-amplitude, amplitude)
|
||||
var/pixel_y_diff = rand(-amplitude/3, amplitude/3)
|
||||
animate(src, pixel_x = pixel_x_diff, pixel_y = pixel_y_diff , time = 2, loop = 6, flags = ANIMATION_RELATIVE|ANIMATION_PARALLEL)
|
||||
animate(pixel_x = -pixel_x_diff , pixel_y = -pixel_y_diff , time = 2, flags = ANIMATION_RELATIVE)
|
||||
|
||||
/mob/living/proc/get_temperature(datum/gas_mixture/environment)
|
||||
var/loc_temp = environment ? environment.temperature : T0C
|
||||
if(isobj(loc))
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
var/obj/item/organ/ears/target_ears = current_target.getorganslot(ORGAN_SLOT_EARS)
|
||||
if(target_ears && !HAS_TRAIT_FROM(current_target, TRAIT_DEAF, CLOTHING_TRAIT))
|
||||
target_ears.adjustEarDamage(0, 5) //far less damage than the H.O.N.K.
|
||||
current_target.Jitter(5 SECONDS)
|
||||
current_target.set_timed_status_effect(100 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE)
|
||||
current_target.Paralyze(6 SECONDS)
|
||||
if(client) //prevent spam from players
|
||||
limiting_spam = TRUE
|
||||
|
||||
@@ -108,8 +108,6 @@
|
||||
var/old_bodytemperature = 0
|
||||
/// Drowsyness level of the mob
|
||||
var/drowsyness = 0//Carbon
|
||||
/// Jitteryness level of the mob
|
||||
var/jitteriness = 0//Carbon
|
||||
/// Hunger level of the mob
|
||||
var/nutrition = NUTRITION_LEVEL_START_MIN // randomised in Initialize
|
||||
/// Satiation level of the mob
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
|
||||
//Here are the procs used to modify status effects of a mob.
|
||||
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, drowsyness, ear damage,
|
||||
// eye damage, eye_blind, eye_blurry, druggy, TRAIT_BLIND trait, and TRAIT_NEARSIGHT trait.
|
||||
|
||||
///Set the jitter of a mob
|
||||
/mob/proc/Jitter(amount)
|
||||
jitteriness = max(jitteriness,amount,0)
|
||||
|
||||
/**
|
||||
* Set drowsyness of a mob to passed value
|
||||
|
||||
Reference in New Issue
Block a user