[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

@@ -1131,9 +1131,12 @@
M.update_icons()
//so they black out before warping
M.Paralyse(5)
if(isliving(M))
var/mob/living/L = M
L.Paralyse(10 SECONDS)
sleep(5)
if(!M) return
if(!M)
return
M.loc = prison_cell
if(istype(M, /mob/living/carbon/human))
@@ -1257,7 +1260,9 @@
I.plane = initial(I.plane)
I.dropped(M)
M.Paralyse(5)
if(isliving(M))
var/mob/living/L = M
L.Paralyse(10 SECONDS)
sleep(5)
M.loc = pick(GLOB.tdome1)
spawn(50)
@@ -1287,7 +1292,9 @@
I.plane = initial(I.plane)
I.dropped(M)
M.Paralyse(5)
if(isliving(M))
var/mob/living/L = M
L.Paralyse(10 SECONDS)
sleep(5)
M.loc = pick(GLOB.tdome2)
spawn(50)
@@ -1309,7 +1316,9 @@
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
return
M.Paralyse(5)
if(isliving(M))
var/mob/living/L = M
L.Paralyse(10 SECONDS)
sleep(5)
M.loc = pick(GLOB.tdomeadmin)
spawn(50)
@@ -1343,7 +1352,9 @@
var/mob/living/carbon/human/observer = M
observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), slot_w_uniform)
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(observer), slot_shoes)
M.Paralyse(5)
if(isliving(M))
var/mob/living/L = M
L.Paralyse(10 SECONDS)
sleep(5)
M.loc = pick(GLOB.tdomeobserve)
spawn(50)
@@ -1436,7 +1447,9 @@
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
return
M.Paralyse(5)
if(isliving(M))
var/mob/living/L = M
L.Paralyse(10 SECONDS)
sleep(5)
M.loc = pick(GLOB.aroomwarp)
spawn(50)
@@ -1771,9 +1784,8 @@
M.gib()
else
M.adjustBruteLoss(min(99,(M.health - 1)))
M.Stun(20)
M.Weaken(20)
M.Stuttering(20)
M.Weaken(40 SECONDS)
M.Stuttering(40 SECONDS)
else if(href_list["CentcommReply"])
if(!check_rights(R_ADMIN))
@@ -2011,7 +2023,7 @@
M.electrocute_act(5, "Lightning Bolt", flags = SHOCK_NOGLOVES)
playsound(get_turf(M), 'sound/magic/lightningshock.ogg', 50, 1, -1)
M.adjustFireLoss(75)
M.Weaken(5)
M.Weaken(10 SECONDS)
to_chat(M, "<span class='userdanger'>The gods have punished you for your sins!</span>")
logmsg = "a lightning bolt."
if("Fire Death")
@@ -2038,7 +2050,7 @@
organ.insert(H)
logmsg = "a honk tumor."
if("Hallucinate")
H.Hallucinate(1000)
H.Hallucinate(1000 SECONDS)
logmsg = "hallucinations."
if("Cold")
H.reagents.add_reagent("frostoil", 40)
@@ -2821,7 +2833,7 @@
//don't warp them if they aren't ready or are already there
continue
H.Paralyse(5)
H.Paralyse(10 SECONDS)
if(H.wear_id)
var/obj/item/card/id/id = H.get_idcard()
for(var/A in id.access)

View File

@@ -43,8 +43,8 @@ GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
anchored = TRUE
canmove = FALSE
admin_prev_sleeping = sleeping
AdjustSleeping(20000)
admin_prev_sleeping = AmountSleeping()
PermaSleeping()
frozen = AO
else
@@ -56,7 +56,7 @@ GLOBAL_LIST_EMPTY(frozen_atom_list) // A list of admin-frozen atoms.
anchored = FALSE
canmove = TRUE
frozen = null
SetSleeping(admin_prev_sleeping)
SetSleeping(admin_prev_sleeping, TRUE)
admin_prev_sleeping = null
to_chat(src, "<b><font color= red>You have been [frozen ? "frozen" : "unfrozen"] by [admin]</b></font>")

View File

@@ -31,7 +31,9 @@
for(var/obj/item/W in M)
M.unEquip(W)
//teleport person to cell
M.Paralyse(5)
if(isliving(M))
var/mob/living/L = M
L.Paralyse(10 SECONDS)
sleep(5) //so they black out before warping
M.loc = pick(GLOB.prisonwarp)
if(istype(M, /mob/living/carbon/human))

View File

@@ -464,10 +464,10 @@
M.reagents.add_reagent("omnizine", 20)
to_chat(M, "<span class='warning'>You feel strange...</span>")
M.Paralyse(30 SECONDS_TO_LIFE_CYCLES)
M.EyeBlind(35 SECONDS_TO_LIFE_CYCLES)
M.EyeBlurry(35 SECONDS_TO_LIFE_CYCLES)
M.AdjustConfused(35 SECONDS_TO_LIFE_CYCLES)
M.Paralyse(30 SECONDS)
M.EyeBlind(35 SECONDS)
M.EyeBlurry(35 SECONDS)
M.AdjustConfused(35 SECONDS)
sleep(6 SECONDS)
to_chat(M, "<span class='warning'>That portal did something to you...</span>")
@@ -530,10 +530,10 @@
// Return them a bit confused.
M.visible_message("<span class='notice'>[M] vanishes...</span>")
M.forceMove(closet)
M.Paralyse(3 SECONDS_TO_LIFE_CYCLES)
M.EyeBlurry(5 SECONDS_TO_LIFE_CYCLES)
M.AdjustConfused(5 SECONDS_TO_LIFE_CYCLES)
M.Dizzy(35)
M.Paralyse(3 SECONDS)
M.EyeBlurry(5 SECONDS)
M.AdjustConfused(5 SECONDS)
M.Dizzy(70 SECONDS)
do_sparks(4, FALSE, destination)
// Newscaster story

View File

@@ -3,7 +3,7 @@
desc = "A compact, specialised baton issued to Syndicate contractors. Applies light electrical shocks to targets."
// Overrides
affect_silicon = TRUE
stun_time = 1
stun_time = 2 SECONDS
cooldown = 2.5 SECONDS
force_off = 5
force_on = 15
@@ -16,9 +16,9 @@
/// Stamina damage to deal on stun.
var/stamina_damage = 70
/// Jitter to deal on stun.
var/jitter_amount = 5 SECONDS_TO_JITTER
var/jitter_amount = 5 SECONDS
/// Stutter to deal on stun.
var/stutter_amount = 10 SECONDS_TO_LIFE_CYCLES
var/stutter_amount = 10 SECONDS
/obj/item/melee/classic_baton/telescopic/contractor/stun(mob/living/target, mob/living/user)
. = ..()

View File

@@ -71,7 +71,7 @@
H.mind.add_antag_datum(new /datum/antagonist/mindslave/thrall(user.mind, greet_text))
if(jobban_isbanned(H, ROLE_VAMPIRE))
SSticker.mode.replace_jobbanned_player(H, SPECIAL_ROLE_VAMPIRE_THRALL)
H.Stun(2)
H.Stun(4 SECONDS)
user.create_log(CONVERSION_LOG, "vampire enthralled", H)
H.create_log(CONVERSION_LOG, "was vampire enthralled", user)

View File

@@ -113,12 +113,12 @@
continue
new /obj/effect/temp_visual/blood_tendril(blood_turf)
addtimer(CALLBACK(src, .proc/apply_slowdown, T, area_of_affect, 3, user), 0.5 SECONDS)
addtimer(CALLBACK(src, .proc/apply_slowdown, T, area_of_affect, 6 SECONDS, user), 0.5 SECONDS)
/obj/effect/proc_holder/spell/vampire/blood_tendrils/proc/apply_slowdown(turf/T, distance, slowed_amount, mob/user)
for(var/mob/living/L in range(distance, T))
if(L.affects_vampire(user))
L.AdjustSlowed(slowed_amount)
L.Slowed(slowed_amount)
L.visible_message("<span class='warning'>[L] gets ensared in blood tendrils, restricting [L.p_their()] movement!</span>")
new /obj/effect/temp_visual/blood_tendril/long(get_turf(L))
@@ -234,8 +234,8 @@
H.adjustBruteLoss(2)
owner.heal_overall_damage(8, 2, TRUE)
owner.adjustStaminaLoss(-15)
owner.AdjustStunned(-1)
owner.AdjustWeakened(-1)
owner.AdjustStunned(-2 SECONDS)
owner.AdjustWeakened(-2 SECONDS)
if(drain_amount == 10)
to_chat(H, "<span class='warning'>You feel your life force draining!</b></span>")

View File

@@ -72,7 +72,7 @@
if(!C.affects_vampire()) // no parameter here so holy always protects
return
C.extinguish_light()
C.EyeBlind(10)
C.EyeBlind(20 SECONDS)
STOP_PROCESSING(SSobj, src) // won't wither away once you are trapped
..()
if(!iscarbon(loc)) // if it fails to latch onto someone for whatever reason, delete itself, we don't want unarmed ones lying around.
@@ -83,8 +83,9 @@
/obj/item/restraints/legcuffs/beartrap/shadow_snare/attack_tk(mob/user)
if(iscarbon(user))
var/mob/living/carbon/C = user
to_chat(user, "<span class='userdanger'>The snare sends a psychic backlash!</span>")
user.EyeBlind(10)
C.EyeBlind(20 SECONDS)
/obj/item/restraints/legcuffs/beartrap/shadow_snare/process()
var/turf/T = get_turf(src)

View File

@@ -185,22 +185,22 @@
continue
var/deviation
if(user.weakened || user.resting)
if(user.IsWeakened() || user.resting)
deviation = DEVIATION_PARTIAL
else
deviation = calculate_deviation(target, user)
if(deviation == DEVIATION_FULL)
target.AdjustConfused(3)
target.AdjustConfused(6 SECONDS)
target.adjustStaminaLoss(40)
else if(deviation == DEVIATION_PARTIAL)
target.Weaken(1)
target.AdjustConfused(3)
target.Weaken(2 SECONDS)
target.AdjustConfused(6 SECONDS)
target.adjustStaminaLoss(40)
else
target.adjustStaminaLoss(120)
target.Weaken(6)
target.AdjustSilence(3)
target.Weaken(12 SECONDS)
target.AdjustSilence(6 SECONDS)
target.flash_eyes(1, TRUE, TRUE)
to_chat(target, "<span class='warning'>You are blinded by [user]'s glare.</span>")
add_attack_logs(user, target, "(Vampire) Glared at")
@@ -302,7 +302,7 @@
H.adjustBrainLoss(60)
else
visible_message("<span class='warning'>[H] looks to be stunned by the energy!</span>")
H.Weaken(20)
H.Weaken(40 SECONDS)
return
for(var/obj/item/implant/mindshield/L in H)
if(L && L.implanted)
@@ -319,7 +319,7 @@
add_attack_logs(M, H, "Vampire-sired")
H.mind.make_vampire()
H.revive()
H.Weaken(20)
H.Weaken(40 SECONDS)
/obj/effect/proc_holder/spell/turf_teleport/shadow_step
name = "Shadow Step (30)"

View File

@@ -53,11 +53,11 @@
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
H.Weaken(6 SECONDS)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
H.Stun(3)
H.Stun(6 SECONDS)
if(affecting)
affecting.receive_damage(1, 0)
else if(ismouse(target))

View File

@@ -402,8 +402,9 @@
occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature)*current_heat_capacity/(current_heat_capacity + air_contents.heat_capacity())
occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise
if(occupant.bodytemperature < T0C)
occupant.Sleeping(max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency))
occupant.Paralyse(max(5/efficiency, (1/occupant.bodytemperature)*3000/efficiency))
var/stun_time = (max(5 / efficiency, (1 / occupant.bodytemperature) * 2000/efficiency)) STATUS_EFFECT_CONSTANT
occupant.Sleeping(stun_time)
occupant.Paralyse(stun_time)
if(air_contents.oxygen > 2)
if(occupant.getOxyLoss())
occupant.adjustOxyLoss(-6)
@@ -469,7 +470,7 @@
return
M.stop_pulling()
M.forceMove(src)
if(M.health > -100 && (M.health < 0 || M.sleeping))
if(M.health > -100 && (M.health < 0 || M.IsSleeping()))
to_chat(M, "<span class='boldnotice'>You feel a cold liquid surround you. Your skin starts to freeze up.</span>")
occupant = M
// M.metabslow = 1

View File

@@ -52,12 +52,12 @@
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
var/obj/item/organ/internal/eyes/eyes = H.get_organ_slot("eyes")
if(!H.eye_blind && eyes)
if(!H.AmountBlinded() && eyes)
if(H.glasses == src)
to_chat(H, "<span class='danger'>[src] overloads and blinds you!</span>")
H.flash_eyes(visual = TRUE)
H.EyeBlind(3)
H.EyeBlurry(5)
H.EyeBlind(6 SECONDS)
H.EyeBlurry(10 SECONDS)
eyes.receive_damage(5)
/obj/item/clothing/glasses/meson

View File

@@ -85,7 +85,7 @@
name = "stun gloves"
desc = "Horrendous and awful. It smells like cancer. The fact it has wires attached to it is incidental."
var/obj/item/stock_parts/cell/cell = null
var/stun_strength = 5
var/stun_strength = 10 SECONDS
var/stun_cost = 2000
/obj/item/clothing/gloves/color/yellow/stun/get_cell()
@@ -116,9 +116,8 @@
H.do_attack_animation(C)
visible_message("<span class='danger'>[C] has been touched with [src] by [H]!</span>")
add_attack_logs(H, C, "Touched with stun gloves")
C.Stun(stun_strength)
C.Weaken(stun_strength)
C.apply_effect(STUTTER, stun_strength)
C.Stuttering(stun_strength)
else
to_chat(H, "<span class='notice'>Not enough charge!</span>")
return TRUE

View File

@@ -176,15 +176,15 @@
/obj/item/clothing/mask/muzzle/safety/shock/proc/process_activation(obj/D, normal = 1, special = 1)
visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
var/mob/M = can_shock(loc)
if(M)
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
do_sparks(3, 1, M)
var/mob/living/L = can_shock(loc)
if(!L)
return
to_chat(L, "<span class='danger'>You feel a sharp shock!</span>")
do_sparks(3, 1, L)
M.Weaken(5)
M.Stuttering(1)
M.Jitter(20)
return
L.Weaken(10 SECONDS)
L.Stuttering(2 SECONDS)
L.Jitter(40 SECONDS)
/obj/item/clothing/mask/muzzle/safety/shock/hear_talk(mob/living/M as mob, list/message_pieces)

View File

@@ -124,14 +124,14 @@
if(slot == slot_shoes)
return TRUE
/obj/item/clothing/shoes/clown_shoes/slippers/ui_action_click(mob/user, action)
/obj/item/clothing/shoes/clown_shoes/slippers/ui_action_click(mob/living/user, action)
if(recharging_time > world.time)
to_chat(user, "<span class='warning'>The boot's internal propulsion needs to recharge still!</span>")
return
var/prev_dir = user.dir
var/prev_pass_flags = user.pass_flags
user.pass_flags |= PASSMOB
user.Weaken(2)
user.Weaken(4 SECONDS)
user.dir = prev_dir
playsound(src, 'sound/effects/stealthoff.ogg', 50, TRUE, 1)
recharging_time = world.time + recharging_rate

View File

@@ -429,7 +429,7 @@
if(dist_from_user == 0)
if(isliving(AM))
var/mob/living/M = AM
M.Weaken(3)
M.Weaken(6 SECONDS)
to_chat(M, "<span class='userdanger'>You're slammed into the floor by [owner]'s reactive armor!</span>")
add_attack_logs(owner, M, "[M] was thrown by [owner]'s [src]", ATKLOG_ALMOSTALL)
else

View File

@@ -651,7 +651,7 @@
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
if(H.head == src)
H.Slur(3) //always slur
H.Slur(6 SECONDS) //always slur
/obj/item/clothing/head/beret/fluff/linda //Epic_Charger: Linda Clark
name = "Green beret"

View File

@@ -99,7 +99,8 @@
head_attack_message = " on the head"
//Weaken the target for the duration that we calculated and divide it by 5.
if(armor_duration)
target.apply_effect(min(armor_duration, 10) , WEAKEN) // Never weaken more than a flash!
var/stun_time = (min(armor_duration, 10)) STATUS_EFFECT_CONSTANT
target.Weaken(stun_time)
//Display an attack message.
if(target != user)

View File

@@ -39,11 +39,11 @@
occupant = null
return ..()
/obj/machinery/gibber/suicide_act(mob/user)
/obj/machinery/gibber/suicide_act(mob/living/user)
if(occupant || locked)
return FALSE
user.visible_message("<span class='danger'>[user] climbs into [src] and turns it on!</b></span>")
user.Stun(10)
user.Stun(20 SECONDS)
user.forceMove(src)
occupant = user
update_icon()

View File

@@ -60,7 +60,7 @@
user.changeNext_move(CLICK_CD_MELEE)
C.apply_damage(5, BURN, "head") //5 fire damage, 15 brute damage, and weakening because your head was just in a hot oven with the door bashing into your neck!
C.apply_damage(15, BRUTE, "head")
C.Weaken(2)
C.Weaken(4 SECONDS)
add_attack_logs(user, G.affecting, "Smashed with [src]")
qdel(G) //Removes the grip to prevent rapid bashes. With the weaken, you PROBABLY can't run unless they are slow to grab you again...
return 0

View File

@@ -8,9 +8,9 @@
/// Chance to trip when crossing.
var/trip_chance = 100
/// Stun to add when crossed.
var/stun = 4 SECONDS_TO_LIFE_CYCLES
var/stun = 4 SECONDS
/// Weaken to add when crossed.
var/weaken = 4 SECONDS_TO_LIFE_CYCLES
var/weaken = 4 SECONDS
/obj/effect/hallucination/tripper/CanPass(atom/movable/mover, turf/T)
. = TRUE
@@ -18,7 +18,6 @@
var/mob/living/M = mover
if(M.lying || !prob(trip_chance))
return
M.Stun(stun)
M.Weaken(weaken)
on_crossed()

View File

@@ -73,7 +73,7 @@
return
step_towards(target, get_turf(src))
target.Weaken(4 SECONDS_TO_LIFE_CYCLES)
target.Weaken(4 SECONDS)
target.visible_message("<span class='warning'>[target] flails [target.p_their()] [I.name] as if striking something, only to trip!</span>",
"<span class='userdanger'>[src] vanishes as you strike it with [I], causing you to stumble forward!</span>")
qdel(src)
@@ -381,7 +381,7 @@
/obj/effect/hallucination/xeno_pouncer/throw_impact(A)
if(A == target)
forceMove(get_turf(target))
target.Weaken(5)
target.Weaken(10 SECONDS)
target.visible_message("<span class='danger'>[target] recoils backwards and falls flat!</span>",
"<span class='userdanger'>[name] pounces on you!</span>")

View File

@@ -103,7 +103,7 @@
to_chat(user, "<span class='warning'>You try to move your [temp.name], but cannot!</span>")
return
user.Weaken(4 SECONDS_TO_LIFE_CYCLES)
user.Weaken(4 SECONDS)
user.visible_message("<span class='warning'>[user] does a grabbing motion towards [get_turf(src)] but [user.p_they()] stumble[user.p_s()] - nothing is there!</span>",
"<span class='userdanger'>[src] vanishes as you try grabbing it, causing you to stumble!</span>")
qdel(src)
@@ -216,8 +216,8 @@
hallucination_icon_state = "smooth"
hallucination_override = TRUE
hallucination_layer = HIGH_TURF_LAYER
stun = 8 SECONDS_TO_LIFE_CYCLES
weaken = 8 SECONDS_TO_LIFE_CYCLES
stun = 8 SECONDS
weaken = 8 SECONDS
/obj/effect/hallucination/tripper/chasm/on_crossed()
target.visible_message("<span class='warning'>[target] trips over nothing and flails on [get_turf(target)] as if they were falling!</span>",

View File

@@ -1,14 +1,3 @@
#define HALLUCINATE_COOLDOWN_MIN 20 SECONDS
#define HALLUCINATE_COOLDOWN_MAX 50 SECONDS
/// This is multiplied with [/mob/var/hallucination] to determine the final cooldown. A higher hallucination value means shorter cooldown.
#define HALLUCINATE_COOLDOWN_FACTOR 0.03
/// Percentage defining the chance at which an hallucination may spawn past the cooldown.
#define HALLUCINATE_CHANCE 80
// Severity weights, should sum up to 100!
#define HALLUCINATE_MINOR_WEIGHT 60
#define HALLUCINATE_MODERATE_WEIGHT 30
#define HALLUCINATE_MAJOR_WEIGHT 10
GLOBAL_LIST_INIT(hallucinations, list(
HALLUCINATE_MINOR = list(
/obj/effect/hallucination/bolts = 10,
@@ -40,41 +29,6 @@ GLOBAL_LIST_INIT(hallucinations, list(
)
))
/**
* Called as part of [/mob/living/proc/handle_status_effects] to handle hallucinations.
*/
/mob/living/carbon/proc/handle_hallucinations()
if(!hallucination || next_hallucination > world.time)
return
next_hallucination = world.time + rand(HALLUCINATE_COOLDOWN_MIN, HALLUCINATE_COOLDOWN_MAX) / (hallucination * HALLUCINATE_COOLDOWN_FACTOR)
if(!prob(HALLUCINATE_CHANCE))
return
// Pick a severity
var/severity = HALLUCINATE_MINOR
switch(rand(100))
if(0 to HALLUCINATE_MINOR_WEIGHT)
severity = HALLUCINATE_MINOR
if((HALLUCINATE_MINOR_WEIGHT + 1) to (HALLUCINATE_MINOR_WEIGHT + HALLUCINATE_MODERATE_WEIGHT))
severity = HALLUCINATE_MODERATE
if((HALLUCINATE_MINOR_WEIGHT + HALLUCINATE_MODERATE_WEIGHT + 1) to 100)
severity = HALLUCINATE_MAJOR
hallucinate(pickweight(GLOB.hallucinations[severity]))
/**
* Spawns an hallucination for the mob.
*
* Arguments:
* * H - The type path of the hallucination to spawn.
*/
/mob/living/carbon/proc/hallucinate(obj/effect/hallucination/H)
ASSERT(ispath(H))
if(ckey)
add_attack_logs(null, src, "Received hallucination [H]", ATKLOG_ALL)
return new H(get_turf(src), src)
/**
* # Hallucination
*
@@ -188,11 +142,3 @@ GLOBAL_LIST_INIT(hallucinations, list(
target?.playsound_local(source, snd, volume, vary, frequency)
return
addtimer(CALLBACK(target, /mob/.proc/playsound_local, source, snd, volume, vary, frequency), time)
#undef HALLUCINATE_COOLDOWN_MIN
#undef HALLUCINATE_COOLDOWN_MAX
#undef HALLUCINATE_COOLDOWN_FACTOR
#undef HALLUCINATE_CHANCE
#undef HALLUCINATE_MINOR_WEIGHT
#undef HALLUCINATE_MODERATE_WEIGHT
#undef HALLUCINATE_MAJOR_WEIGHT

View File

@@ -127,7 +127,7 @@
desc = "A synthetic banana peel."
/obj/item/grown/bananapeel/specialpeel/ComponentInitialize()
AddComponent(/datum/component/slippery, src, 2, 2, 100, 0, FALSE)
AddComponent(/datum/component/slippery, src, 4 SECONDS, 100, 0, FALSE)
/obj/item/grown/bananapeel/specialpeel/after_slip(mob/living/carbon/human/H)
. = ..()

View File

@@ -99,7 +99,7 @@
/obj/item/grown/nettle/death/pickup(mob/living/carbon/user)
if(..())
if(prob(50))
user.Weaken(5)
user.Weaken(10 SECONDS)
to_chat(user, "<span class='userdanger'>You are stunned by the Deathnettle when you try picking it up!</span>")
/obj/item/grown/nettle/death/attack(mob/living/carbon/M, mob/user)
@@ -108,8 +108,10 @@
to_chat(M, "<span class='danger'>You are stunned by the powerful acid of the Deathnettle!</span>")
add_attack_logs(user, M, "Hit with [src]")
M.AdjustEyeBlurry(force/7)
M.AdjustEyeBlurry((force / 7) STATUS_EFFECT_CONSTANT)
if(prob(20))
M.Paralyse(force / 6)
M.Weaken(force / 15)
var/paralyze_time = (force * 10 / 3) SECONDS
var/stun_time = (force / 7.5) SECONDS
M.Paralyse(paralyze_time)
M.Weaken(stun_time)
M.drop_item()

View File

@@ -211,14 +211,14 @@
if(istype(G) && ispath(G.trash, /obj/item/grown))
return
var/stun_len = G.seed.potency * rate * 0.8
var/stun_len = G.seed.potency * rate * 1.6 SECONDS
if(!istype(G, /obj/item/grown/bananapeel) && (!G.reagents || !G.reagents.has_reagent("lube")))
stun_len /= 3
stun_len = min(stun_len, 7) // No fun allowed
stun_len = min(stun_len, 14 SECONDS)// No fun allowed
G.AddComponent(/datum/component/slippery, G, stun_len, stun_len, 100, 0, FALSE)
G.AddComponent(/datum/component/slippery, G, stun_len, 100, 0, FALSE)
/datum/plant_gene/trait/cell_charge
// Cell recharging trait. Charges all mob's power cells to (potency*rate)% mark when eaten.

View File

@@ -17,8 +17,7 @@
/datum/martial_art/adminfu/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
MARTIAL_ARTS_ACT_CHECK
A.do_attack_animation(D)
D.Weaken(25)
D.Stun(25)
D.Stun(50 SECONDS)
return TRUE
/datum/martial_art/adminfu/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)

View File

@@ -38,8 +38,7 @@
if((D.stat != DEAD) && prob(knockout_prob))
D.visible_message("<span class='danger'>[A] has knocked [D] out with a haymaker!</span>", \
"<span class='userdanger'>[A] has knocked [D] out with a haymaker!</span>")
D.apply_effect(10,WEAKEN,armor_block)
D.Weaken(5)
D.Weaken(10 SECONDS)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
D.forcesay(GLOB.hit_appends)
@@ -97,8 +96,7 @@
if((D.stat != DEAD) && prob(knockout_prob))
D.visible_message("<span class='danger'>[A] has knocked [D] out with a haymaker!</span>", \
"<span class='userdanger'>[A] has knocked [D] out with a haymaker!</span>")
D.apply_effect(10,WEAKEN,armor_block)
D.Paralyse(5)
D.Paralyse(10 SECONDS)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
D.forcesay(GLOB.hit_appends)

View File

@@ -18,7 +18,7 @@
target.visible_message("<span class='warning'>[user] kicks [target]'s head, knocking [target.p_them()] out!</span>", \
"<span class='userdanger'>[user] kicks your head, knocking you out!</span>")
playsound(get_turf(user), 'sound/weapons/genhit1.ogg', 50, 1, -1)
target.SetSleeping(15)
target.SetSleeping(30 SECONDS)
target.adjustBrainLoss(15)
add_attack_logs(user, target, "Knocked out with martial-art [src] : Kick", ATKLOG_ALL)
. = MARTIAL_COMBO_DONE

View File

@@ -14,7 +14,7 @@
target.visible_message("<span class='warning'>[user] locks [target] into a restraining position!</span>", \
"<span class='userdanger'>[user] locks you into a restraining position!</span>")
target.adjustStaminaLoss(20)
target.Stun(5)
target.Stun(10 SECONDS)
CQC.restraining = TRUE
addtimer(CALLBACK(CQC, /datum/martial_art/cqc/.proc/drop_restraining), 50, TIMER_UNIQUE)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Restrain", ATKLOG_ALL)

View File

@@ -10,7 +10,7 @@
"<span class='userdanger'>[user] slams you into the ground!</span>")
playsound(get_turf(user), 'sound/weapons/slam.ogg', 50, 1, -1)
target.apply_damage(10, BRUTE)
target.Weaken(6)
target.Weaken(12 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Slam", ATKLOG_ALL)
return MARTIAL_COMBO_DONE
return MARTIAL_COMBO_FAIL

View File

@@ -16,7 +16,7 @@
"<span class='userdanger'>[user] leg sweeps you!</span>")
playsound(get_turf(user), 'sound/effects/hit_kick.ogg', 50, 1, -1)
target.apply_damage(5, BRUTE)
target.Weaken(2)
target.Weaken(4 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Leg Sweep", ATKLOG_ALL)
user.mind.martial_art.in_stance = FALSE
return MARTIAL_COMBO_DONE_CLEAR_COMBOS

View File

@@ -7,7 +7,7 @@
target.visible_message("<span class='warning'>[user] pounds [target] on the chest!</span>", \
"<span class='userdanger'>[user] slams your chest! You can't breathe!</span>")
playsound(get_turf(user), 'sound/effects/hit_punch.ogg', 50, 1, -1)
target.AdjustLoseBreath(5)
target.AdjustLoseBreath(10 SECONDS)
target.adjustOxyLoss(10)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Lung Punch", ATKLOG_ALL)
user.mind.martial_art.in_stance = FALSE

View File

@@ -8,7 +8,7 @@
"<span class='userdanger'>[user] karate chops your neck, rendering you unable to speak for a short time!</span>")
playsound(get_turf(user), 'sound/effects/hit_punch.ogg', 50, 1, -1)
target.apply_damage(5, BRUTE, BODY_ZONE_HEAD)
target.AdjustSilence(10)
target.AdjustSilence(20 SECONDS)
add_attack_logs(user, target, "Melee attacked with martial-art [src] : Neck Chop", ATKLOG_ALL)
user.mind.martial_art.in_stance = FALSE
return MARTIAL_COMBO_DONE_CLEAR_COMBOS

View File

@@ -4,7 +4,7 @@
explaination_text = "Hits the opponent with invisible nunchucks."
/datum/martial_combo/mimejutsu/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
if(!target.stat && !target.stunned && !target.IsWeakened())
if(!target.stat && !target.IsStunned() && !target.IsWeakened())
var/damage = rand(5, 8) + user.dna.species.punchdamagelow
if(!damage)
playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)

View File

@@ -4,7 +4,7 @@
explaination_text = "Use mime energy to throw someone back."
/datum/martial_combo/mimejutsu/silent_palm/perform_combo(mob/living/carbon/human/user, mob/living/target, datum/martial_art/MA)
if(!target.stat && !target.stunned && !target.IsWeakened())
if(!target.stat && !target.IsStunned() && !target.IsWeakened())
target.visible_message("<span class='danger'>[user] has barely touched [target] with [user.p_their()] palm!</span>", \
"<span class='userdanger'>[user] hovers [user.p_their()] palm over your face!</span>")

View File

@@ -8,7 +8,7 @@
playsound(get_turf(target), 'sound/effects/hit_kick.ogg', 50, TRUE, -1)
if(!target.IsWeakened() && !target.resting && !target.stat)
target.apply_damage(10, BRUTE, BODY_ZONE_HEAD)
target.Weaken(2)
target.Weaken(4 SECONDS)
target.visible_message("<span class='warning'>[user] kicks [target] in the head, sending them face first into the floor!</span>",
"<span class='userdanger'>You are kicked in the head by [user], sending you crashing to the floor!</span>")
else

View File

@@ -51,7 +51,7 @@
"<span class='userdanger'>[A] leg sweeps you!</span>")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
D.apply_damage(10, BRUTE)
D.Weaken(3)
D.Weaken(6 SECONDS)
add_attack_logs(A, D, "Melee attacked with martial-art [src] : Leg sweep", ATKLOG_ALL)
return TRUE
@@ -61,7 +61,7 @@
if(restraining && istype(G) && G.affecting == D)
D.visible_message("<span class='danger'>[A] puts [D] into a chokehold!</span>", \
"<span class='userdanger'>[A] puts you into a chokehold!</span>")
D.SetSleeping(20)
D.SetSleeping(40 SECONDS)
restraining = FALSE
if(G.state < GRAB_NECK)
G.state = GRAB_NECK
@@ -79,7 +79,7 @@
playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1)
if(D.unEquip(I) && !(QDELETED(I) || (I.flags & ABSTRACT)))
A.put_in_hands(I)
D.Jitter(2)
D.Jitter(4 SECONDS)
D.apply_damage(5, BRUTE)
else
D.visible_message("<span class='danger'>[A] attempted to disarm [D]!</span>", "<span class='userdanger'>[A] attempted to disarm [D]!</span>")

View File

@@ -128,7 +128,7 @@
if((D.stat != DEAD) && damage >= A.dna.species.punchstunthreshold)
D.visible_message("<span class='danger'>[A] has weakened [D]!!</span>", \
"<span class='userdanger'>[A] has weakened [D]!</span>")
D.apply_effect(4, WEAKEN, armor_block)
D.apply_effect(8 SECONDS, WEAKEN, armor_block)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
D.forcesay(GLOB.hit_appends)
@@ -333,7 +333,7 @@
add_fingerprint(user)
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
user.Weaken(3)
user.Weaken(6 SECONDS)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, "head")
@@ -372,13 +372,13 @@
if(prob(10))
H.visible_message("<span class='warning'>[H] collapses!</span>", \
"<span class='userdanger'>Your legs give out!</span>")
H.Weaken(4)
if(H.staminaloss && !H.sleeping)
H.Weaken(8 SECONDS)
if(H.staminaloss && !H.IsSleeping())
var/total_health = (H.health - H.staminaloss)
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
H.visible_message("<span class='warning'>[user] delivers a heavy hit to [H]'s head, knocking [H.p_them()] out cold!</span>", \
"<span class='userdanger'>[user] knocks you unconscious!</span>")
H.SetSleeping(30)
H.SetSleeping(60 SECONDS)
H.adjustBrainLoss(25)
return
else

View File

@@ -27,7 +27,7 @@
D.forceMove(A.loc)
var/armor_block = D.run_armor_check(null, MELEE)
D.apply_damage(30, BRUTE, null, armor_block)
D.apply_effect(6, WEAKEN, armor_block)
D.apply_effect(12 SECONDS, WEAKEN, armor_block)
add_attack_logs(A, D, "Melee attacked with [src] (SUPLEX)")
A.SpinAnimation(10,1)
@@ -35,7 +35,7 @@
D.SpinAnimation(10,1)
spawn(3)
armor_block = A.run_armor_check(null, MELEE)
A.apply_effect(4, WEAKEN, armor_block)
A.apply_effect(8 SECONDS, WEAKEN, armor_block)
return
/datum/martial_art/wrestling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)

View File

@@ -85,7 +85,7 @@
playsound(M,'sound/weapons/resonator_blast.ogg', 50, 1)
if(iscarbon(M))
var/mob/living/carbon/L = M
L.Weaken(6)
L.Weaken(12 SECONDS)
if(ishuman(L))
shake_camera(L, 20, 1)
addtimer(CALLBACK(L, /mob/living/carbon.proc/vomit), 20)

View File

@@ -76,7 +76,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
var/mutable_appearance/balloon3
if(isliving(A))
var/mob/living/M = A
M.Weaken(16) // Keep them from moving during the duration of the extraction
M.Weaken(32 SECONDS) // Keep them from moving during the duration of the extraction
M.buckled = 0 // Unbuckle them to prevent anchoring problems
else
A.anchored = TRUE
@@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
if(ishuman(A))
var/mob/living/carbon/human/L = A
L.SetParalysis(0)
L.drowsyness = 0
L.SetDrowsy(0)
L.SetSleeping(0)
sleep(30)
var/list/flooring_near_beacon = list()

View File

@@ -380,7 +380,7 @@
armour_penetration = 100
damage_type = BRUTE
hitsound = 'sound/effects/splat.ogg'
weaken = 3
weaken = 6 SECONDS
/obj/item/projectile/hook/fire(setAngle)
if(firer)

View File

@@ -117,9 +117,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
if(C.glasses && C.glasses.flags_cover & GLASSESCOVERSEYES)
visible_message("<span class='danger'>[C]'s glasses block the sand!</span>")
return
C.EyeBlurry(6)
C.EyeBlurry(12 SECONDS)
C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage
C.AdjustConfused(5)
C.AdjustConfused(10 SECONDS)
to_chat(C, "<span class='userdanger'>[src] gets into your eyes! The pain, it burns!</span>")
qdel(src)

View File

@@ -70,7 +70,7 @@
italics = TRUE
sound_vol *= 0.5
if(sleeping || stat == UNCONSCIOUS)
if(stat == UNCONSCIOUS)
hear_sleep(multilingual_to_message(message_pieces))
return 0
@@ -118,7 +118,7 @@
if(!client)
return
if(sleeping || stat == UNCONSCIOUS) //If unconscious or sleeping
if(stat == UNCONSCIOUS) //If unconscious or sleeping
hear_sleep(multilingual_to_message(message_pieces))
return
@@ -179,7 +179,7 @@
to_chat(src, heard)
/mob/proc/hear_holopad_talk(list/message_pieces, verb = "says", mob/speaker = null, obj/effect/overlay/holo_pad_hologram/H)
if(sleeping || stat == UNCONSCIOUS)
if(stat == UNCONSCIOUS)
hear_sleep(multilingual_to_message(message_pieces))
return

View File

@@ -12,11 +12,11 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if(INTENT_HELP)
AdjustSleeping(-5)
AdjustSleeping(-10 SECONDS)
StopResting()
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
AdjustParalysis(-6 SECONDS)
AdjustStunned(-6 SECONDS)
AdjustWeakened(-6 SECONDS)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
if(INTENT_GRAB)

View File

@@ -82,19 +82,19 @@
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.apply_effect(5, WEAKEN, H.run_armor_check(null, MELEE))
H.apply_effect(10 SECONDS, WEAKEN, H.run_armor_check(null, MELEE))
else
L.Weaken(5)
L.Weaken(10 SECONDS)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
else
Weaken(2, 1, 1)
Weaken(4 SECONDS, TRUE)
toggle_leap(0)
pounce_cooldown = world.time + pounce_cooldown_time
else if(A.density && !A.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
Weaken(2, 1, 1)
Weaken(4 SECONDS, TRUE)
if(leaping)
leaping = 0

View File

@@ -119,7 +119,7 @@
message = "<B>\The [src]</B> jumps!"
m_type = 1
if("collapse")
Paralyse(2)
Paralyse(4 SECONDS)
message = "<B>\The [src]</B> collapses!"
m_type = 2
if("flip")

View File

@@ -60,7 +60,7 @@
if(3.0)
b_loss += 30
if(prob(50) && !shielded)
Paralyse(1)
Paralyse(2 SECONDS)
AdjustEarDamage(15, 60)
take_overall_damage(b_loss, f_loss)

View File

@@ -7,7 +7,7 @@
adjustBruteLoss(15)
var/hitverb = "punched"
if(mob_size < MOB_SIZE_LARGE)
Paralyse(1)
Paralyse(2 SECONDS)
spawn(0)
step_away(src, user, 15)
sleep(1)
@@ -27,7 +27,7 @@
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
Paralyse(2)
Paralyse(4 SECONDS)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
@@ -40,7 +40,7 @@
if(INTENT_DISARM)
if(!lying)
if(prob(5))//Very small chance to push an alien down.
Paralyse(2)
Paralyse(4 SECONDS)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
add_attack_logs(M, src, "Pushed over")
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \

View File

@@ -11,7 +11,7 @@
act = lowertext(act)
switch(act)
if("me")
if(silent)
if(HAS_TRAIT(src, TRAIT_MUTE))
return
if(src.client)
if(check_mute(client.ckey, MUTE_IC))
@@ -106,7 +106,7 @@
message = "<B>[src]</B> hisses softly."
m_type = 1
if("collapse")
Paralyse(2)
Paralyse(4 SECONDS)
message = text("<B>[]</B> collapses!", src)
m_type = 2
if("help")

View File

@@ -57,7 +57,7 @@
if(3.0)
b_loss += 30
if(prob(50))
Paralyse(1)
Paralyse(2 SECONDS)
AdjustEarDamage(15, 60)
adjustBruteLoss(b_loss)

View File

@@ -7,7 +7,7 @@
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if((stat != DEAD) && (damage > 4.9))
Paralyse(rand(5,10))
Paralyse(rand(10 SECONDS, 20 SECONDS))
adjustBruteLoss(damage)
updatehealth()
@@ -25,7 +25,7 @@
..(user, TRUE)
adjustBruteLoss(5 + rand(1, 9))
spawn(0)
Paralyse(1)
Paralyse(2 SECONDS)
step_away(src, user, 15)
sleep(3)
step_away(src, user, 15)

View File

@@ -16,7 +16,7 @@
death()
return
if(paralysis || sleeping || getOxyLoss() > 50 || (health <= HEALTH_THRESHOLD_CRIT && check_death_method()))
if(IsParalyzed() || IsSleeping() || getOxyLoss() > 50 || (health <= HEALTH_THRESHOLD_CRIT && check_death_method()))
if(stat == CONSCIOUS)
KnockOut()
create_debug_log("fell unconscious, trigger reason: [reason]")

View File

@@ -16,7 +16,7 @@
icon_state = "larva[state]_cuff"
else if(stat == UNCONSCIOUS || lying || resting)
icon_state = "larva[state]_sleep"
else if(stunned)
else if(IsStunned())
icon_state = "larva[state]_stun"
else
icon_state = "larva[state]"

View File

@@ -151,7 +151,7 @@
src.loc = target
target.equip_to_slot_if_possible(src, slot_wear_mask, FALSE, TRUE)
if(!sterile)
M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
M.Paralyse(MAX_IMPREGNATION_TIME * 10 / 6) //something like 25 ticks = 20 seconds with the default settings
GoIdle() //so it doesn't jump the people that tear it off

View File

@@ -99,13 +99,13 @@
to_chat(src, "<span class='warning'>The muzzle prevents you from vomiting!</span>")
return FALSE
if(stun)
Stun(4)
Stun(8 SECONDS)
if(nutrition < 100 && !blood)
if(message)
visible_message("<span class='warning'>[src] dry heaves!</span>", \
"<span class='userdanger'>You try to throw up, but there's nothing your stomach!</span>")
if(stun)
Weaken(10)
Weaken(20 SECONDS)
else
if(message)
visible_message("<span class='danger'>[src] throws up!</span>", \
@@ -168,19 +168,18 @@
//Stun
var/should_stun = (!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)
if(should_stun)
Stun(2)
Stun(4 SECONDS)
//Jitter and other fluff.
AdjustJitter(1000)
do_jitter_animation(jitteriness)
AdjustStuttering(2)
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 20)
AdjustJitter(2000 SECONDS)
AdjustStuttering(4 SECONDS)
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.
/mob/living/carbon/proc/secondary_shock(should_stun)
AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
AdjustJitter(-2000 SECONDS, bound_lower = 20 SECONDS) //Still jittery, but vastly less
if(should_stun)
Weaken(3)
Weaken(6 SECONDS)
/mob/living/carbon/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
@@ -231,12 +230,12 @@
var/mob/living/carbon/human/H = src
if(H.w_uniform)
H.w_uniform.add_fingerprint(M)
AdjustSleeping(-5)
if(sleeping == 0)
AdjustSleeping(-10 SECONDS)
if(!AmountSleeping())
StopResting()
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
AdjustParalysis(-6 SECONDS)
AdjustStunned(-6 SECONDS)
AdjustWeakened(-6 SECONDS)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(!player_logged)
M.visible_message( \
@@ -390,8 +389,8 @@
E.receive_damage(rand(12, 16) + extra_damage, 1)
if(E.damage > E.min_bruised_damage)
AdjustEyeBlind(damage)
AdjustEyeBlurry(damage * rand(3, 6))
AdjustEyeBlind(damage STATUS_EFFECT_CONSTANT)
AdjustEyeBlurry(damage * rand(6 SECONDS, 12 SECONDS))
if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2)
if(!E.is_robotic())
@@ -571,7 +570,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
if(isliving(hit_atom))
var/mob/living/L = hit_atom
L.adjustBruteLoss(60)
L.Weaken(3)
L.Weaken(6 SECONDS)
shake_camera(L, 4, 3)
hit_something = TRUE
if(isturf(hit_atom))
@@ -593,7 +592,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
hurt = FALSE*/
if(hit_atom.density && isturf(hit_atom))
if(hurt)
Weaken(1)
Weaken(2 SECONDS)
take_organ_damage(10)
if(iscarbon(hit_atom) && hit_atom != src)
var/mob/living/carbon/victim = hit_atom
@@ -602,8 +601,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
if(hurt)
victim.take_organ_damage(10)
take_organ_damage(10)
victim.Weaken(1)
Weaken(1)
victim.Weaken(2 SECONDS)
Weaken(2 SECONDS)
visible_message("<span class='danger'>[src] crashes into [victim], knocking them both over!</span>", "<span class='userdanger'>You violently crash into [victim]!</span>")
playsound(src, 'sound/weapons/punch1.ogg', 50, 1)
@@ -862,7 +861,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
/mob/living/carbon/resist_fire()
fire_stacks -= 5
Weaken(3, TRUE, 1) //We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy.
Weaken(3, TRUE) //We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy.
update_canmove()
spin(32, 2)
visible_message("<span class='danger'>[src] rolls on the floor, trying to put [p_them()]self out!</span>",
@@ -1040,7 +1039,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
W.plane = initial(W.plane)
/mob/living/carbon/proc/slip(description, stun, weaken, tilesSlipped, walkSafely, slipAny, slipVerb = "slip")
/mob/living/carbon/proc/slip(description, weaken, tilesSlipped, walkSafely, slipAny, slipVerb = "slip")
if(flying || buckled || (walkSafely && m_intent == MOVE_INTENT_WALK))
return FALSE
@@ -1063,7 +1062,6 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -3)
// Something something don't run with scissors
moving_diagonally = 0 //If this was part of diagonal move slipping will stop it.
Stun(stun)
Weaken(weaken)
return TRUE

View File

@@ -60,11 +60,10 @@
visible_message("<span class='danger'>[M] has shocked [src]!</span>", "<span class='userdanger'>[M] has shocked you!</span>")
do_sparks(5, TRUE, src)
var/power = M.powerlevel + rand(0,3)
var/power = (M.powerlevel + rand(0,3)) STATUS_EFFECT_CONSTANT
Stun(power)
if(stuttering < power)
stuttering = power
if (prob(stunprob) && M.powerlevel >= 8)
Stuttering(power)
if(prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth("slime attack")
return 1

View File

@@ -27,7 +27,4 @@
var/dreaming = 0 //How many dream images we have left to send
var/nightmare = 0
/// The world.time after which the mob can hallucinate again.
var/next_hallucination = 0
blood_volume = BLOOD_VOLUME_NORMAL

View File

@@ -449,7 +449,7 @@
message = "<B>[src]</B> attempts a flip and crashes to the floor!"
SpinAnimation(5,1)
sleep(3)
Weaken(2)
Weaken(4 SECONDS)
else
message = "<B>[src]</B> does a flip!"
SpinAnimation(5,1)
@@ -459,8 +459,8 @@
if(prob(5))
spin(32, 1)
to_chat(src, "<span class='warning'>You spin too much!</span>")
Dizzy(12)
Confused(12)
Dizzy(24 SECONDS)
Confused(24 SECONDS)
else
spin(20, 1)
@@ -500,9 +500,9 @@
if("faint", "faints")
message = "<B>[src]</B> faints."
if(sleeping)
if(IsSleeping())
return //Can't faint while asleep
AdjustSleeping(2)
AdjustSleeping(4 SECONDS)
m_type = 1
if("cough", "coughs")
@@ -842,7 +842,7 @@
m_type = 1
if("collapse", "collapses")
Paralyse(2)
Paralyse(4 SECONDS)
message = "<B>[src]</B> collapses!"
m_type = 2
if(miming)

View File

@@ -109,12 +109,12 @@
msg += "<span class='warning'>[p_they(TRUE)] [p_are()] [bicon(handcuffed)] handcuffed!</span>\n"
//Jitters
switch(jitteriness)
if(300 to INFINITY)
switch(AmountJitter())
if(600 SECONDS to INFINITY)
msg += "<span class='warning'><B>[p_they(TRUE)] [p_are()] convulsing violently!</B></span>\n"
if(200 to 300)
if(400 SECONDS to 600 SECONDS)
msg += "<span class='warning'>[p_they(TRUE)] [p_are()] extremely jittery.</span>\n"
if(100 to 200)
if(200 SECONDS to 400 SECONDS)
msg += "<span class='warning'>[p_they(TRUE)] [p_are()] twitching ever so slightly.</span>\n"

View File

@@ -248,7 +248,7 @@
burn_loss = brute_loss //Damage gets reduced from 120 to up to 60 combined brute+burn
if(check_ear_prot() < HEARING_PROTECTION_TOTAL)
AdjustEarDamage(30, 120)
Weaken(20 SECONDS_TO_LIFE_CYCLES - (bomb_armor * 1.6 / 10) SECONDS_TO_LIFE_CYCLES) //Between ~4 and ~20 seconds of knockdown depending on bomb armor
Weaken(20 SECONDS - (bomb_armor * 1.6 / 10) SECONDS) //Between ~4 and ~20 seconds of knockdown depending on bomb armor
if(EXPLODE_LIGHT)
brute_loss = 30
@@ -256,7 +256,7 @@
brute_loss = 15 * (2 - round(bomb_armor * 0.01, 0.05)) //Reduced from 30 to up to 15
if(check_ear_prot() < HEARING_PROTECTION_TOTAL)
AdjustEarDamage(15, 60)
Weaken(16 SECONDS_TO_LIFE_CYCLES - (bomb_armor * 1.6 / 10) SECONDS_TO_LIFE_CYCLES) //Between no knockdown to ~16 seconds depending on bomb armor
Weaken(16 SECONDS - (bomb_armor * 1.6 / 10) SECONDS) //Between no knockdown to ~16 seconds depending on bomb armor
valid_limbs = list("l_hand", "l_foot", "r_hand", "r_foot")
limb_loss_chance = 25
@@ -1635,7 +1635,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
if(H.health <= HEALTH_THRESHOLD_CRIT)
H.adjustOxyLoss(-15 * cpr_modifier)
H.SetLoseBreath(0)
H.AdjustParalysis(-1)
H.AdjustParalysis(-2 SECONDS)
H.updatehealth("cpr")
visible_message("<span class='danger'>[src] performs CPR on [H.name]!</span>", "<span class='notice'>You perform CPR on [H.name].</span>")

View File

@@ -489,8 +489,8 @@ emp_act
if(prob(I.force))
visible_message("<span class='combat danger'>[src] has been knocked down!</span>", \
"<span class='combat userdanger'>[src] has been knocked down!</span>")
apply_effect(5, WEAKEN, armor)
AdjustConfused(15)
apply_effect(10 SECONDS, WEAKEN, armor)
AdjustConfused(30 SECONDS)
if(prob(I.force + ((100 - health)/2)) && src != user && I.damtype == BRUTE)
SSticker.mode.remove_revolutionary(mind)
@@ -510,7 +510,7 @@ emp_act
if(stat == CONSCIOUS && I.force && prob(I.force + 10))
visible_message("<span class='combat danger'>[src] has been knocked down!</span>", \
"<span class='combat userdanger'>[src] has been knocked down!</span>")
apply_effect(5, WEAKEN, armor)
apply_effect(10 SECONDS, WEAKEN, armor)
if(bloody)
if(wear_suit)
@@ -642,7 +642,7 @@ emp_act
else
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
apply_effect(5, WEAKEN, run_armor_check(affecting, MELEE))
apply_effect(10 SECONDS, WEAKEN, run_armor_check(affecting, MELEE))
add_attack_logs(M, src, "Alien tackled")
visible_message("<span class='danger'>[M] has tackled down [src]!</span>")
@@ -693,9 +693,9 @@ emp_act
switch(M.damtype)
if("brute")
if(M.force > 35) // durand and other heavy mechas
Paralyse(1)
Paralyse(2 SECONDS)
else if(M.force > 20 && !IsWeakened()) // lightweight mechas like gygax
Weaken(2)
Weaken(4 SECONDS)
update |= affecting.receive_damage(dmg, 0)
playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
if("fire")

View File

@@ -68,7 +68,7 @@
if(!HAS_TRAIT(src, TRAIT_NOPAIN))
emote("scream")
custom_emote(1, "collapses!")
Weaken(5) //can't emote while weakened, apparently.
Weaken(10 SECONDS) //can't emote while weakened, apparently.
/mob/living/carbon/human/proc/handle_grasp()

View File

@@ -97,25 +97,7 @@
SetEyeBlurry(0)
else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
EyeBlind(2)
EyeBlurry(2)
else
//blindness
if(HAS_TRAIT(src, TRAIT_BLIND)) // Disabled-blind, doesn't get better on its own
else if(eye_blind) // Blindness, heals slowly over time
AdjustEyeBlind(-1)
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold) && eye_blurry) //resting your eyes with a blindfold heals blurry eyes faster
AdjustEyeBlurry(-3)
//blurry sight
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
EyeBlurry(2)
if(eye_blurry) // Blurry eyes heal slowly
AdjustEyeBlurry(-1)
EyeBlind(4 SECONDS)
if(getBrainLoss() >= 60 && stat != DEAD)
if(prob(3))
@@ -560,7 +542,7 @@
if(satiety < 0)
satiety++
if(prob(round(-satiety/40)))
Jitter(5)
Jitter(10 SECONDS)
hunger_rate = 3 * hunger_drain
hunger_rate *= physiology.hunger_mod
adjust_nutrition(-hunger_rate)
@@ -603,67 +585,6 @@
handle_trace_chems()
/mob/living/carbon/human/handle_drunk()
var/slur_start = 30 //12u ethanol, 30u whiskey FOR HUMANS
var/confused_start = 40
var/brawl_start = 30
var/blur_start = 75
var/vomit_start = 60
var/pass_out = 90
var/spark_start = 50 //40u synthanol
var/collapse_start = 75
var/braindamage_start = 120
var/alcohol_strength = drunk
var/sober_str = !HAS_TRAIT(src, TRAIT_ALCOHOL_TOLERANCE) ? 1 : 2
alcohol_strength /= sober_str
var/obj/item/organ/internal/liver/L
if(!ismachineperson(src))
L = get_int_organ(/obj/item/organ/internal/liver)
if(L)
alcohol_strength *= L.alcohol_intensity
else
alcohol_strength *= 5
if(alcohol_strength >= slur_start) //slurring
Slur(drunk)
if(mind)
if(alcohol_strength >= brawl_start) //the drunken martial art
if(!istype(mind.martial_art, /datum/martial_art/drunk_brawling))
var/datum/martial_art/drunk_brawling/F = new
F.teach(src, TRUE)
else if(alcohol_strength < brawl_start) //removing the art
if(istype(mind.martial_art, /datum/martial_art/drunk_brawling))
mind.martial_art.remove(src)
if(alcohol_strength >= confused_start && prob(33)) //confused walking
if(!confused)
Confused(1)
AdjustConfused(3 / sober_str)
if(alcohol_strength >= blur_start) //blurry eyes
EyeBlurry(10 / sober_str)
if(!ismachineperson(src)) //stuff only for non-synthetics
if(alcohol_strength >= vomit_start) //vomiting
if(prob(8))
fakevomit()
if(alcohol_strength >= pass_out)
Paralyse(5 / sober_str)
Drowsy(30 / sober_str)
if(L)
L.receive_damage(0.1, 1)
adjustToxLoss(0.1)
else //stuff only for synthetics
if(alcohol_strength >= spark_start && prob(25))
do_sparks(3, 1, src)
if(alcohol_strength >= collapse_start && prob(10))
emote("collapse")
do_sparks(3, 1, src)
if(alcohol_strength >= braindamage_start && prob(10))
adjustBrainLoss(1)
if(!has_booze())
AdjustDrunk(-0.5)
/mob/living/carbon/human/proc/has_booze() //checks if the human has ethanol or its subtypes inside
for(var/A in reagents.reagent_list)
var/datum/reagent/R = A
@@ -682,8 +603,8 @@
return
if(getBrainLoss() >= 100) // braindeath
AdjustLoseBreath(10, bound_lower = 0, bound_upper = 25)
Weaken(30)
AdjustLoseBreath(20 SECONDS, bound_lower = 0, bound_upper = 50 SECONDS)
Weaken(60 SECONDS)
if(!check_death_method())
if(health <= HEALTH_THRESHOLD_DEAD)
@@ -695,12 +616,12 @@
if(health <= HEALTH_THRESHOLD_CRIT)
if(prob(5))
emote(pick("faint", "collapse", "cry", "moan", "gasp", "shudder", "shiver"))
AdjustStuttering(5, bound_lower = 0, bound_upper = 5)
SetStuttering(10 SECONDS)
EyeBlurry(5)
if(prob(7))
AdjustConfused(2)
AdjustConfused(4 SECONDS)
if(prob(5))
Paralyse(2)
Paralyse(4 SECONDS)
switch(health)
if(-INFINITY to -100)
adjustOxyLoss(1)
@@ -711,12 +632,12 @@
if(prob(health * -0.2))
var/datum/disease/D = new /datum/disease/critical/heart_failure
ForceContractDisease(D)
Paralyse(5)
Paralyse(10 SECONDS)
if(-99 to -80)
adjustOxyLoss(1)
if(prob(4))
to_chat(src, "<span class='userdanger'>Your chest hurts...</span>")
Paralyse(2)
Paralyse(4 SECONDS)
var/datum/disease/D = new /datum/disease/critical/heart_failure
ForceContractDisease(D)
if(-79 to -50)
@@ -729,9 +650,9 @@
ForceContractDisease(D)
if(prob(6))
to_chat(src, "<span class='userdanger'>You feel [pick("horrible pain", "awful", "like shit", "absolutely awful", "like death", "like you are dying", "nothing", "warm", "sweaty", "tingly", "really, really bad", "horrible")]!</span>")
Weaken(3)
Weaken(6 SECONDS)
if(prob(3))
Paralyse(2)
Paralyse(4 SECONDS)
if(-49 to 0)
adjustOxyLoss(1)
if(prob(3))
@@ -739,7 +660,7 @@
ForceContractDisease(D)
if(prob(5))
to_chat(src, "<span class='userdanger'>You feel [pick("terrible", "awful", "like shit", "sick", "numb", "cold", "sweaty", "tingly", "horrible")]!</span>")
Weaken(3)
Weaken(6 SECONDS)
/mob/living/carbon/human/update_health_hud()
if(!client)
@@ -863,7 +784,7 @@
var/temp = PULSE_NORM
if(blood_volume <= BLOOD_VOLUME_BAD)//how much blood do we have
temp = PULSE_THREADY //not enough :(
temp = PULSE_THREADY //not enough :( ) fuck you bracket colouriser
if(HAS_TRAIT(src, TRAIT_FAKEDEATH))
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
@@ -1009,8 +930,8 @@
adjustBrainLoss(3)
else if(prob(10))
adjustBrainLoss(1)
Weaken(5)
AdjustLoseBreath(20, bound_lower = 0, bound_upper = 25)
Weaken(10 SECONDS)
AdjustLoseBreath(40 SECONDS, bound_lower = 0, bound_upper = 50 SECONDS)
adjustOxyLoss(20)

View File

@@ -100,7 +100,7 @@
var/obj/item/organ/internal/L = get_organ_slot("lungs")
if((breathes && !L) || breathes && L && (L.status & ORGAN_DEAD))
return FALSE
if(getOxyLoss() > 10 || losebreath >= 4)
if(getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS)
emote("gasp")
return FALSE
if(mind)
@@ -142,7 +142,7 @@
if(S.speaking && S.speaking.flags & NO_STUTTER)
continue
if(silent || HAS_TRAIT(src, TRAIT_MUTE))
if(HAS_TRAIT(src, TRAIT_MUTE))
S.message = ""
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))

View File

@@ -416,7 +416,9 @@
return TRUE
/datum/species/proc/spec_stun(mob/living/carbon/human/H, amount)
. = stun_mod * H.physiology.stun_mod * amount
. = amount
if(!H.frozen) //admin freeze has no breaks
. = stun_mod * H.physiology.stun_mod * amount
/datum/species/proc/spec_electrocute_act(mob/living/carbon/human/H, shock_damage, source, siemens_coeff = 1, flags = NONE)
return
@@ -505,7 +507,7 @@
if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold)
target.visible_message("<span class='danger'>[user] has weakened [target]!</span>", \
"<span class='userdanger'>[user] has weakened [target]!</span>")
target.apply_effect(4, WEAKEN, armor_block)
target.apply_effect(8 SECONDS, WEAKEN, armor_block)
target.forcesay(GLOB.hit_appends)
else if(target.lying)
target.forcesay(GLOB.hit_appends)
@@ -525,7 +527,7 @@
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_selected))
var/randn = rand(1, 100)
if(randn <= 25)
target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, MELEE))
target.apply_effect(4 SECONDS, WEAKEN, target.run_armor_check(affecting, MELEE))
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>")
add_attack_logs(user, target, "Pushed over", ATKLOG_ALL)

View File

@@ -116,7 +116,7 @@
if(/obj/item/projectile/energy/floramut)
if(prob(15))
H.rad_act(rand(30, 80))
H.Weaken(5)
H.Weaken(10 SECONDS)
H.visible_message("<span class='warning'>[H] writhes in pain as [H.p_their()] vacuoles boil.</span>", "<span class='userdanger'>You writhe in pain as your vacuoles boil!</span>", "<span class='italics'>You hear the crunching of leaves.</span>")
if(prob(80))
randmutb(H)

View File

@@ -183,7 +183,7 @@
for(var/mob/living/carbon/human/H in contents)
H.adjustBruteLoss(COCOON_HARM_AMOUNT)
H.adjustFireLoss(COCOON_HARM_AMOUNT)
H.AdjustWeakened(5)
H.AdjustWeakened(10 SECONDS)
for(var/mob/living/carbon/human/H in contents)
H.remove_status_effect(STATUS_EFFECT_COCOONED)

View File

@@ -151,8 +151,8 @@
var/chosen_limb = missing_limbs[limb_select]
H.visible_message("<span class='notice'>[H] begins to hold still and concentrate on [H.p_their()] missing [limb_select]...</span>", "<span class='notice'>You begin to focus on regrowing your missing [limb_select]... (This will take [round(SLIMEPERSON_REGROWTHDELAY/10)] seconds, and you must hold still.)</span>")
if(do_after(H, SLIMEPERSON_REGROWTHDELAY, FALSE, H, extra_checks = list(CALLBACK(H, /mob.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
if(H.incapacitated(ignore_lying = TRUE, extra_checks = list(CALLBACK(H, /mob.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
if(do_after(H, SLIMEPERSON_REGROWTHDELAY, FALSE, H, extra_checks = list(CALLBACK(H, /mob/living.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
if(H.incapacitated(ignore_lying = TRUE, extra_checks = list(CALLBACK(H, /mob/living.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
to_chat(H, "<span class='warning'>You cannot regenerate missing limbs in your current state.</span>")
return

View File

@@ -96,7 +96,7 @@
add_attack_logs(user, C, "tail whipped")
if(user.restrained())
if(prob(50))
user.Weaken(5)
user.Weaken(10 SECONDS)
user.visible_message("<span class='danger'>[user] loses [user.p_their()] balance!</span>", "<span class='danger'>You lose your balance!</span>")
return
if(user.getStaminaLoss() >= 60) //Bit higher as you don't need to start, just would need to keep going with the tail lash.

View File

@@ -1,15 +0,0 @@
/mob/living/carbon/human/SetStunned(amount, updating = 1, force = 0)
amount = dna.species.spec_stun(src, amount)
return ..()
/mob/living/carbon/human/SetWeakened(amount, updating = 1, force = 0)
amount = dna.species.spec_stun(src, amount)
return ..()
/mob/living/carbon/human/SetParalysis(amount, updating = 1, force = 0)
amount = dna.species.spec_stun(src, amount)
return ..()
/mob/living/carbon/human/SetSleeping(amount, updating = 1, no_alert = FALSE)
amount = dna.species.spec_stun(src, amount)
return ..()

View File

@@ -63,11 +63,10 @@
var/datum/gas_mixture/breath
if(health <= HEALTH_THRESHOLD_CRIT && check_death_method())
AdjustLoseBreath(1)
AdjustLoseBreath(2 SECONDS)
//Suffocate
if(losebreath > 0)
AdjustLoseBreath(-1)
if(AmountLoseBreath())
if(prob(75))
emote("gasp")
if(istype(loc, /obj/))
@@ -153,7 +152,7 @@
if(!co2overloadtime)
co2overloadtime = world.time
else if(world.time - co2overloadtime > 120)
Paralyse(3)
Paralyse(6 SECONDS)
adjustOxyLoss(3)
if(world.time - co2overloadtime > 300)
adjustOxyLoss(8)
@@ -174,9 +173,9 @@
//TRACE GASES
if(breath.sleeping_agent)
if(SA_partialpressure > SA_para_min)
Paralyse(3)
Paralyse(6 SECONDS)
if(SA_partialpressure > SA_sleep_min)
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
AdjustSleeping(4 SECONDS, bound_lower = 0, bound_upper = 20 SECONDS)
else if(SA_partialpressure > 0.01)
if(prob(20))
emote(pick("giggle","laugh"))
@@ -253,7 +252,7 @@
M.adjustBruteLoss(5)
adjust_nutrition(10)
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
//this updates all special effects: only stamina for now
/mob/living/carbon/handle_status_effects()
..()
if(stam_regen_start_time <= world.time)
@@ -263,91 +262,9 @@
setStaminaLoss(0, FALSE)
update_health_hud()
var/restingpwr = 1 + 4 * resting
//Dizziness
if(dizziness)
var/client/C = client
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/temp
var/saved_dizz = dizziness
if(C)
var/oldsrc = src
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70 // This shit is annoying at high strength
src = null
spawn(0)
if(C)
temp = amplitude * sin(0.008 * saved_dizz * world.time)
pixel_x_diff += temp
C.pixel_x += temp
temp = amplitude * cos(0.008 * saved_dizz * world.time)
pixel_y_diff += temp
C.pixel_y += temp
sleep(3)
if(C)
temp = amplitude * sin(0.008 * saved_dizz * world.time)
pixel_x_diff += temp
C.pixel_x += temp
temp = amplitude * cos(0.008 * saved_dizz * world.time)
pixel_y_diff += temp
C.pixel_y += temp
sleep(3)
if(C)
C.pixel_x -= pixel_x_diff
C.pixel_y -= pixel_y_diff
src = oldsrc
AdjustDizzy(-restingpwr)
if(drowsyness)
AdjustDrowsy(-restingpwr)
EyeBlurry(2)
if(prob(5))
AdjustSleeping(1)
Paralyse(5)
//Jitteryness
if(jitteriness)
do_jitter_animation(jitteriness)
AdjustJitter(-restingpwr)
if(hallucination)
handle_hallucinations()
AdjustHallucinate(-2)
// Keep SSD people asleep
if(player_logged)
Sleeping(2)
/mob/living/carbon/handle_sleeping()
if(..())
if(mind?.has_antag_datum(/datum/antagonist/vampire))
if(istype(loc, /obj/structure/closet/coffin))
adjustBruteLoss(-1, FALSE)
adjustFireLoss(-1, FALSE)
adjustToxLoss(-1)
handle_dreams()
adjustStaminaLoss(-10)
var/comfort = 1
if(istype(buckled, /obj/structure/bed))
var/obj/structure/bed/bed = buckled
comfort+= bed.comfort
for(var/obj/item/bedsheet/bedsheet in range(loc,0))
if(bedsheet.loc != loc) //bedsheets in your backpack/neck don't give you comfort
continue
comfort+= bedsheet.comfort
break //Only count the first bedsheet
if(drunk)
comfort += 1 //Aren't naps SO much better when drunk?
AdjustDrunk(-0.2*comfort) //reduce drunkenness while sleeping.
if(comfort > 1 && prob(3))//You don't heal if you're just sleeping on the floor without a blanket.
adjustBruteLoss(-1 * comfort, FALSE)
adjustFireLoss(-1 * comfort)
if(prob(10) && health && health_hud_override != HEALTH_HUD_OVERRIDE_CRIT)
emote("snore")
return sleeping
Sleeping(4 SECONDS)
/mob/living/carbon/update_health_hud(shown_health_amount)
if(!client)

View File

@@ -194,7 +194,7 @@
to_chat(user, "<span class='notice'>You begin the recruitment of [target].</span>")
user.visible_message("<span class='danger'>[user] leans over towards [target], whispering excitedly as [user.p_they()] give[user.p_s()] a speech.</span>")
to_chat(target, "<span class='danger'>You feel yourself agreeing with [user], and a surge of loyalty begins building.</span>")
target.Weaken(12)
target.Weaken(24 SECONDS)
sleep(20)
if(ismindshielded(target))
to_chat(user, "<span class='notice'>[target.p_they(TRUE)] are enslaved by Nanotrasen. You feel [target.p_their()] interest in your cause wane and disappear.</span>")

View File

@@ -6,7 +6,7 @@
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
if(paralysis || sleeping || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT && check_death_method())
if(IsParalyzed() || IsSleeping() || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT && check_death_method())
if(stat == CONSCIOUS)
KnockOut()
create_debug_log("fell unconscious, trigger reason: [reason]")

View File

@@ -97,8 +97,7 @@
if(DROWSY)
Drowsy(effect * blocked)
if(JITTER)
if(status_flags & CANSTUN)
Jitter(effect * blocked)
Jitter(effect * blocked)
updatehealth("apply effect")
return TRUE

View File

@@ -103,6 +103,6 @@
/mob/living/proc/delayed_gib()
visible_message("<span class='danger'><b>[src]</b> starts convulsing violently!</span>", "You feel as if your body is tearing itself apart!")
Weaken(15)
do_jitter_animation(1000, -1)
addtimer(CALLBACK(src, .proc/gib), rand(20, 100))
Weaken(30 SECONDS)
do_jitter_animation(1000, -1) // jitter until they are gibbed
addtimer(CALLBACK(src, .proc/gib), rand(2 SECONDS, 10 SECONDS))

View File

@@ -117,52 +117,17 @@
if(incapacitated())
stop_pulling()
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
//this updates all special effects: mainly stamina
/mob/living/proc/handle_status_effects() // We check for the status effect in this proc as opposed to the procs below to avoid excessive proc call overhead
if(stunned)
AdjustStunned(-1, updating = 1, force = 1)
if(weakened)
AdjustWeakened(-1, updating = 1, force = 1)
if(stuttering)
stuttering = max(stuttering - 1, 0)
if(silent)
AdjustSilence(-1)
if(druggy)
AdjustDruggy(-1)
if(slurring)
AdjustSlur(-1)
if(paralysis)
AdjustParalysis(-1, updating = 1, force = 1)
if(sleeping)
handle_sleeping()
if(slowed)
AdjustSlowed(-1)
if(drunk)
handle_drunk()
if(cultslurring)
AdjustCultSlur(-1)
if(confused)
AdjustConfused(-1)
return
/mob/living/proc/update_damage_hud()
return
/mob/living/proc/handle_sleeping()
AdjustSleeping(-1)
return sleeping
/mob/living/proc/handle_drunk()
AdjustDrunk(-1)
return drunk
/mob/living/proc/handle_disabilities()
//Eyes
if(HAS_TRAIT(src, TRAIT_BLIND) || stat) //blindness from disability or unconsciousness doesn't get better on its own
EyeBlind(1)
else if(eye_blind) //blindness, heals slowly over time
AdjustEyeBlind(-1)
else if(eye_blurry) //blurry eyes heal slowly
AdjustEyeBlurry(-1)
EyeBlind(2 SECONDS)
// Gives a mob the vision of being dead
/mob/living/proc/grant_death_vision()

View File

@@ -445,13 +445,15 @@
setBrainLoss(0)
setStaminaLoss(0)
SetSleeping(0)
SetParalysis(0, 1, 1)
SetStunned(0, 1, 1)
SetWeakened(0, 1, 1)
SetParalysis(0, TRUE)
SetStunned(0, TRUE)
SetWeakened(0, TRUE)
SetSlowed(0)
SetImmobilized(0)
SetLoseBreath(0)
SetDizzy(0)
SetJitter(0)
SetStuttering(0)
SetConfused(0)
SetDrowsy(0)
radiation = 0
@@ -511,14 +513,13 @@
return
/mob/living/proc/remove_CC(should_update_canmove = TRUE)
SetWeakened(0, FALSE)
SetStunned(0, FALSE)
SetParalysis(0, FALSE)
SetSleeping(0, FALSE)
SetWeakened(0)
SetStunned(0)
SetParalysis(0)
SetImmobilized(0)
SetSleeping(0)
setStaminaLoss(0)
SetSlowed(0)
if(should_update_canmove)
update_canmove()
/mob/living/proc/UpdateDamageIcon()
return
@@ -726,7 +727,7 @@
/mob/living/proc/Exhaust()
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
Weaken(5)
Weaken(10 SECONDS)
/mob/living/proc/get_visible_name()
return name
@@ -916,8 +917,9 @@
if(isturf(loc))
var/turf/T = loc
. += T.slowdown
if(slowed)
. += 10
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(S)
. += S.slowdown_value
if(forced_look)
. += 3
if(ignorewalk)
@@ -925,7 +927,7 @@
else
switch(m_intent)
if(MOVE_INTENT_RUN)
if(drowsyness > 0)
if(get_drowsiness() > 0)
. += 6
. += GLOB.configuration.movement.base_run_speed
if(MOVE_INTENT_WALK)
@@ -1027,14 +1029,6 @@
GLOB.dead_mob_list += src
. = ..()
switch(var_name)
if("weakened")
SetWeakened(var_value)
if("stunned")
SetStunned(var_value)
if("paralysis")
SetParalysis(var_value)
if("sleeping")
SetSleeping(var_value)
if("maxHealth")
updatehealth()
if("resize")

View File

@@ -138,7 +138,7 @@
step_away(src,M,15)
switch(M.damtype)
if("brute")
Paralyse(1)
Paralyse(2 SECONDS)
take_overall_damage(rand(M.force/2, M.force))
playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
if("fire")

View File

@@ -8,6 +8,6 @@
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
//This causes instant sleep and tags a player as SSD. See life.dm for furthering SSD.
if(mind.active)
Sleeping(2)
Sleeping(4 SECONDS)
player_logged = 1
last_logout = world.time

View File

@@ -71,21 +71,21 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key)
S.message = "[uppertext(S.message)]!!!"
verb = pick("yells", "roars", "hollers")
if(slurring)
if(AmountSluring())
if(robot)
S.message = slur(S.message, list("@", "!", "#", "$", "%", "&", "?"))
else
S.message = slur(S.message)
verb = "slurs"
if(stuttering)
if(AmountStuttering())
if(robot)
S.message = robostutter(S.message)
else
S.message = stutter(S.message)
verb = "stammers"
if(cultslurring)
if(AmountCultSlurring())
S.message = cultslur(S.message)
verb = "slurs"

View File

@@ -37,9 +37,6 @@
else
adjustOxyLoss(-1)
if(stunned)
AdjustStunned(-1, updating = 1, force = 1)
var/area/my_area = get_area(src)
if(!lacks_power())

View File

@@ -230,7 +230,7 @@
set category = "pAI Commands"
set name = "Unfold Chassis"
if(stat || sleeping || paralysis || IsWeakened())
if(stat || IsSleeping() || IsParalyzed() || IsWeakened())
return
if(loc != card)
@@ -265,7 +265,7 @@
set category = "pAI Commands"
set name = "Collapse Chassis"
if(stat || sleeping || paralysis || IsWeakened())
if(stat || IsSleeping() || IsParalyzed() || IsWeakened())
return
if(loc == card)

View File

@@ -49,12 +49,12 @@
if(!gripped_item && proximity && target && ishuman(target))
H = target
if(H.lying)
H.AdjustSleeping(-5)
if(H.sleeping == 0)
H.AdjustSleeping(-10 SECONDS)
if(!H.IsSleeping())
H.StopResting()
H.AdjustParalysis(-3)
H.AdjustStunned(-3)
H.AdjustWeakened(-3)
H.AdjustParalysis(-6 SECONDS)
H.AdjustStunned(-6 SECONDS)
H.AdjustWeakened(-6 SECONDS)
playsound(user.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
user.visible_message( \
"<span class='notice'>[user] shakes [H] trying to wake [H.p_them()] up!</span>",\

View File

@@ -133,10 +133,10 @@
weaponlock_time = 120
/mob/living/silicon/robot/update_canmove(delay_action_updates = 0)
if(paralysis || stunned || IsWeakened() || buckled || lockcharge || stat)
canmove = 0
if(IsParalyzed() || IsStunned() || IsWeakened() || buckled || lockcharge || stat)
canmove = FALSE
else
canmove = 1
canmove = TRUE
update_transform()
if(!delay_action_updates)
update_action_buttons_icon()

View File

@@ -987,7 +987,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
/mob/living/silicon/robot/update_icons()
overlays.Cut()
if(stat != DEAD && !(paralysis || stunned || IsWeakened() || low_power_mode)) //Not dead, not stunned.
if(stat != DEAD && !(IsParalyzed() || IsStunned() || IsWeakened() || low_power_mode)) //Not dead, not stunned.
if(custom_panel in custom_eye_names)
overlays += "eyes-[custom_panel]"
else

View File

@@ -1,6 +1,6 @@
// No args for restraints because robots don't have those
/mob/living/silicon/robot/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_lying = FALSE)
if(stat || lockcharge || IsWeakened() || stunned || paralysis || !is_component_functioning("actuator"))
if(stat || lockcharge || IsWeakened() || IsStunned() || IsParalyzed() || !is_component_functioning("actuator"))
return TRUE
/mob/living/silicon/robot/has_vision(information_only = FALSE)
@@ -14,7 +14,7 @@
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
if(!is_component_functioning("actuator") || !is_component_functioning("power cell") || paralysis || sleeping || resting || stunned || IsWeakened() || getOxyLoss() > maxHealth * 0.5)
if(!is_component_functioning("actuator") || !is_component_functioning("power cell") || IsParalyzed() || IsSleeping() || resting || IsStunned() || IsWeakened() || getOxyLoss() > maxHealth * 0.5)
if(stat == CONSCIOUS)
KnockOut()
update_headlamp()
@@ -38,31 +38,6 @@
diag_hud_set_health()
update_health_hud()
/mob/living/silicon/robot/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!stunned)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANSTUN || force)
stunned = max(amount, 0)
if(updating)
update_stat()
else
return STATUS_UPDATE_NONE
/mob/living/silicon/robot/SetWeakened(amount, updating = 1, force = 0)
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!weakened)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANWEAKEN || force)
weakened = max(amount, 0)
if(updating)
update_stat()
else
return STATUS_UPDATE_NONE
/mob/living/silicon/robot/update_revive(updating = TRUE)
. = ..(updating)
if(.)

View File

@@ -170,12 +170,12 @@
/mob/living/silicon/emp_act(severity)
..()
switch(severity)
if(1)
if(EMP_HEAVY)
take_organ_damage(20)
Stun(8)
if(2)
Stun(16 SECONDS)
if(EMP_LIGHT)
take_organ_damage(10)
Stun(3)
Stun(6 SECONDS)
flash_eyes(affect_silicon = 1)
to_chat(src, "<span class='danger'>*BZZZT*</span>")
to_chat(src, "<span class='warning'>Warning: Electromagnetic pulse detected.</span>")
@@ -228,7 +228,6 @@
/mob/living/silicon/apply_effect(effect = 0, effecttype = STUN, blocked = 0)
return FALSE //The only effect that can hit them atm is flashes and they still directly edit so this works for now
/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai)
if(!istype(bot) || !istype(ai))
return 0

View File

@@ -286,7 +286,7 @@
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
if(!Adjacent(target) || !isturf(target.loc) || target.weakened < 2)
if(!Adjacent(target) || !isturf(target.loc) || target.AmountWeakened() < 4 SECONDS)
back_to_hunt()
return
@@ -313,7 +313,7 @@
back_to_idle()
return
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.weakened < 2)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountWeakened() < 4 SECONDS)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else
@@ -547,7 +547,7 @@
return
if(iscarbon(A))
var/mob/living/carbon/C = A
if(!C.stunned || arrest_type)
if(!C.IsStunned() || arrest_type)
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
@@ -573,9 +573,8 @@
spawn(2)
icon_state = "[lasercolor]ed209[on]"
var/threat = C.assess_threat(src)
C.SetStuttering(5)
C.Stun(5)
C.Weaken(5)
C.SetStuttering(10 SECONDS)
C.Weaken(10 SECONDS)
add_attack_logs(src, C, "stunned")
if(declare_arrests)
var/area/location = get_area(src)

View File

@@ -17,7 +17,7 @@
var/stun_chance = 50
var/spam_flag = 0
var/frustration_number = 15
/mob/living/simple_animal/bot/secbot/griefsky/toy //A toy version of general griefsky!
name = "Genewul Giftskee"
desc = "An adorable looking secbot with four toy swords taped to its arms"
@@ -47,13 +47,13 @@
/mob/living/simple_animal/bot/secbot/griefsky/emag_act(mob/user)
..()
light_color = LIGHT_COLOR_PURE_RED //if you see a red one. RUN!!
/mob/living/simple_animal/bot/secbot/griefsky/Crossed(atom/movable/AM, oldloc)
..()
if(ismob(AM) && AM == target)
var/mob/living/carbon/C = AM
visible_message("[src] flails his swords and pushes [C] out of it's way!" )
C.Weaken(2)
C.Weaken(4 SECONDS)
/mob/living/simple_animal/bot/secbot/griefsky/New()
..()
@@ -90,8 +90,8 @@
var/threat = C.assess_threat(src)
if(ishuman(C))
C.apply_damage(dmg, BRUTE)
if(prob(stun_chance))
C.Weaken(5)
if(prob(stun_chance))
C.Weaken(10 SECONDS)
if(dmg)
add_attack_logs(src, C, "sliced")
if(declare_arrests)
@@ -136,9 +136,9 @@
frustration++
else
frustration = 0
else
else
back_to_idle()
speak("You fool")
speak("You fool")
else
back_to_idle()
@@ -212,7 +212,7 @@
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1, 0)
else
..()
/mob/living/simple_animal/bot/secbot/griefsky/proc/special_retaliate_after_attack(mob/user) //allows special actions to take place after being attacked.
return
@@ -221,7 +221,7 @@
return
if(prob(block_chance_melee))
visible_message("[src] deflects [user]'s attack with his energy swords!")
playsound(loc, 'sound/weapons/blade1.ogg', 50, TRUE, -1)
playsound(loc, 'sound/weapons/blade1.ogg', 50, TRUE, -1)
return TRUE
/mob/living/simple_animal/bot/secbot/griefsky/attack_hand(mob/living/carbon/human/H)

View File

@@ -132,7 +132,7 @@
if(emagged <= 1)
honk_attack(A)
else
if(!C.stunned || arrest_type) //originaly was paralisysed in tg ported as stun
if(!C.IsStunned() || arrest_type)
stun_attack(A)
..()
else if(!spam_flag) //honking at the ground
@@ -178,11 +178,10 @@
var/mob/living/carbon/human/H = C
if(H.check_ear_prot() >= HEARING_PROTECTION_MAJOR)
return
C.stuttering = 20 //stammer
C.SetStuttering(40 SECONDS) //stammer
C.AdjustEarDamage(0, 5) //far less damage than the H.O.N.K.
C.Jitter(50)
C.Weaken(5)
C.Stun(5) // Paralysis from tg ported as stun
C.Jitter(100 SECONDS)
C.Weaken(10 SECONDS)
if(client) //prevent spam from players..
spam_flag = TRUE
if(emagged <= 1) //HONK once, then leave
@@ -195,8 +194,8 @@
C.visible_message("<span class='danger'>[src] has honked [C]!</span>",\
"<span class='userdanger'>[src] has honked you!</span>")
else
C.stuttering = 20
C.Stun(10)
C.Stuttering(40 SECONDS)
C.Stun(20 SECONDS)
addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntime)
@@ -321,7 +320,7 @@
"[C] trips over [src] and falls!", \
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]</span>")
C.Weaken(5)
C.Weaken(10 SECONDS)
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 1, -1)
if(!client)
speak("Honk!")

View File

@@ -301,19 +301,6 @@
if(mode == BOT_HEALING)
return
if(stunned)
icon_state = "medibota"
stunned--
oldpatient = patient
patient = null
mode = BOT_IDLE
if(stunned <= 0)
update_icon()
stunned = 0
return
if(frustration > 8)
oldpatient = patient
soft_reset()
@@ -554,11 +541,6 @@
return 1
return 0
/mob/living/simple_animal/bot/medbot/bullet_act(obj/item/projectile/Proj)
if(Proj.flag == "taser")
stunned = min(stunned+10,20)
..()
/mob/living/simple_animal/bot/medbot/explode()
on = 0
visible_message("<span class='userdanger'>[src] blows apart!</span>")

View File

@@ -673,17 +673,16 @@
// called when bot bumps into anything
/mob/living/simple_animal/bot/mulebot/Bump(atom/obs)
if(wires.is_cut(WIRE_MOB_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs
var/mob/M = obs
if(ismob(M))
if(istype(M,/mob/living/silicon/robot))
visible_message("<span class='danger'>[src] bumps into [M]!</span>")
var/mob/living/L = obs
if(ismob(L))
if(istype(L,/mob/living/silicon/robot))
visible_message("<span class='danger'>[src] bumps into [L]!</span>")
else
if(!paicard)
add_attack_logs(src, M, "Knocked down")
visible_message("<span class='danger'>[src] knocks over [M]!</span>")
M.stop_pulling()
M.Stun(8)
M.Weaken(5)
add_attack_logs(src, L, "Knocked down")
visible_message("<span class='danger'>[src] knocks over [L]!</span>")
L.stop_pulling()
L.Weaken(16 SECONDS)
return ..()
/mob/living/simple_animal/bot/mulebot/proc/RunOver(mob/living/carbon/human/H)

View File

@@ -219,7 +219,7 @@
return
if(iscarbon(A))
var/mob/living/carbon/C = A
if(!C.stunned || arrest_type)
if(!C.IsStunned() || arrest_type)
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
@@ -261,9 +261,8 @@
var/threat = C.assess_threat(src)
if(ishuman(C) && harmbaton) // Bots with harmbaton enabled become shitcurity. - Dave
C.apply_damage(10, BRUTE)
C.SetStuttering(5)
C.Stun(5)
C.Weaken(5)
C.SetStuttering(10 SECONDS)
C.Weaken(10 SECONDS)
add_attack_logs(src, C, "stunned")
if(declare_arrests)
var/area/location = get_area(src)
@@ -334,7 +333,7 @@
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
if( !Adjacent(target) || !isturf(target.loc) || target.weakened < 2 )
if( !Adjacent(target) || !isturf(target.loc) || target.AmountWeakened() < 4 SECONDS)
back_to_hunt()
return
@@ -361,7 +360,7 @@
back_to_idle()
return
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.weakened < 2)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountWeakened() < 4 SECONDS)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else //Try arresting again if the target escapes.
@@ -461,7 +460,7 @@
"[C] trips over [src] and falls!", \
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]</span>")
C.Weaken(2)
C.Weaken(4 SECONDS)
return
..()

View File

@@ -289,10 +289,6 @@
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
/mob/living/simple_animal/hostile/construct/behemoth/Life(seconds, times_fired)
weakened = 0
return ..()
/////////////////////////////Harvester/////////////////////////

View File

@@ -162,7 +162,7 @@
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
Weaken(30)
Weaken(60 SECONDS)
icon_state = icon_dead
spawn(rand(20,50))
if(!stat && M)

View File

@@ -48,7 +48,7 @@
var/mob/living/L = .
if(istype(L))
if(prob(15))
L.Stun(1)
L.Stun(2 SECONDS)
L.visible_message("<span class='danger'>\the [src] scares \the [L]!</span>")

View File

@@ -38,6 +38,6 @@
if(. && iscarbon(target))
var/mob/living/carbon/C = target
if(prob(12))
C.Weaken(3)
C.Weaken(6 SECONDS)
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
"<span class='userdanger'>\The [src] knocks you down!</span>")

Some files were not shown because too many files have changed in this diff Show More