mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Confusion will no longer continue to confuse after being cured (#52286)
* Confusion will no longer continue to confuse after being cured * Grammar comment fix * Move to status effect * Remove test per request * Make confusion a status effect, confusion curing now completely neuters the confusion * set_confusion changes, get_confusion * Fix confusion going down twice per tick * Change strength = to proc * Move procs to status_procs
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
if(2,3)
|
||||
owner.dizziness += 10
|
||||
if(4,5)
|
||||
owner.confused += 10
|
||||
owner.add_confusion(10)
|
||||
owner.blur_eyes(10)
|
||||
if(6 to 9)
|
||||
owner.slurring += 30
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
owner.blind_eyes(10)
|
||||
if(4)
|
||||
owner.dizziness += 10
|
||||
owner.confused += 10
|
||||
owner.add_confusion(10)
|
||||
owner.Jitter(10)
|
||||
owner.stuttering += 10
|
||||
|
||||
|
||||
@@ -190,12 +190,12 @@
|
||||
if(!high_stress)
|
||||
to_chat(owner, "<span class='warning'>You can't stop shaking...</span>")
|
||||
owner.dizziness += 20
|
||||
owner.confused += 20
|
||||
owner.add_confusion(20)
|
||||
owner.Jitter(20)
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You feel weak and scared! If only you weren't alone...</span>")
|
||||
owner.dizziness += 20
|
||||
owner.confused += 20
|
||||
owner.add_confusion(20)
|
||||
owner.Jitter(20)
|
||||
owner.adjustStaminaLoss(50)
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
user.visible_message("<span class='danger'>[user] slams head-first into [hit], suffering major cranial trauma!</span>", "<span class='userdanger'>You slam head-first into [hit], and the world explodes around you!</span>")
|
||||
user.adjustStaminaLoss(30)
|
||||
user.adjustBruteLoss(30)
|
||||
user.confused += 15
|
||||
user.add_confusion(15)
|
||||
if(prob(80))
|
||||
user.gain_trauma(/datum/brain_trauma/mild/concussion)
|
||||
user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9)
|
||||
@@ -401,7 +401,7 @@
|
||||
user.visible_message("<span class='danger'>[user] slams hard into [hit], knocking [user.p_them()] senseless!</span>", "<span class='userdanger'>You slam hard into [hit], knocking yourself senseless!</span>")
|
||||
user.adjustStaminaLoss(30)
|
||||
user.adjustBruteLoss(10)
|
||||
user.confused += 10
|
||||
user.add_confusion(10)
|
||||
user.Knockdown(30)
|
||||
shake_camera(user, 3, 4)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
/datum/component/wet_floor/proc/AfterSlip(mob/living/L)
|
||||
if(highest_strength == TURF_WET_LUBE)
|
||||
L.confused = max(L.confused, 8)
|
||||
L.set_confusion(max(L.get_confusion(), 8))
|
||||
|
||||
/datum/component/wet_floor/proc/update_flags()
|
||||
var/intensity
|
||||
|
||||
@@ -16,7 +16,6 @@ Bonus
|
||||
*/
|
||||
|
||||
/datum/symptom/confusion
|
||||
|
||||
name = "Confusion"
|
||||
desc = "The virus interferes with the proper function of the neural system, leading to bouts of confusion and erratic movement."
|
||||
stealth = 1
|
||||
@@ -45,6 +44,10 @@ Bonus
|
||||
if(A.properties["stealth"] >= 4)
|
||||
suppress_warning = TRUE
|
||||
|
||||
/datum/symptom/confusion/End(datum/disease/advance/A)
|
||||
A.affected_mob.set_confusion(0)
|
||||
return ..()
|
||||
|
||||
/datum/symptom/confusion/Activate(datum/disease/advance/A)
|
||||
if(!..())
|
||||
return
|
||||
@@ -55,8 +58,7 @@ Bonus
|
||||
to_chat(M, "<span class='warning'>[pick("Your head hurts.", "Your mind blanks for a moment.")]</span>")
|
||||
else
|
||||
to_chat(M, "<span class='userdanger'>You can't think straight!</span>")
|
||||
if(M.confused < 100)
|
||||
M.confused += (16 * power)
|
||||
M.add_confusion(16 * power)
|
||||
if(brain_damage)
|
||||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 3 * power, 80)
|
||||
M.updatehealth()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
M.dizziness = max(0, M.dizziness - 2)
|
||||
M.drowsyness = max(0, M.drowsyness - 2)
|
||||
M.slurring = max(0, M.slurring - 2)
|
||||
M.confused = max(0, M.confused - 2)
|
||||
M.set_confusion(max(0, M.get_confusion() - 2))
|
||||
if(purge_alcohol)
|
||||
M.reagents.remove_all_type(/datum/reagent/consumable/ethanol, 3)
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
to_chat(affected_mob, "<span class='notice'>You feel panicky.</span>")
|
||||
if(prob(2))
|
||||
to_chat(affected_mob, "<span class='danger'>You're overtaken with panic!</span>")
|
||||
affected_mob.confused += (rand(2,3))
|
||||
affected_mob.add_confusion(rand(2,3))
|
||||
if(4)
|
||||
if(prob(10))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel butterflies in your stomach.</span>")
|
||||
if(prob(5))
|
||||
affected_mob.visible_message("<span class='danger'>[affected_mob] stumbles around in a panic.</span>", \
|
||||
"<span class='userdanger'>You have a panic attack!</span>")
|
||||
affected_mob.confused += (rand(6,8))
|
||||
affected_mob.add_confusion(rand(6,8))
|
||||
affected_mob.jitteriness += (rand(6,8))
|
||||
if(prob(2))
|
||||
affected_mob.visible_message("<span class='danger'>[affected_mob] coughs up butterflies!</span>", \
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
to_chat(H, "<span class='warning'>You feel [pick("discomfort", "pressure", "a burning sensation", "pain")] in your chest.</span>")
|
||||
if(prob(2))
|
||||
to_chat(H, "<span class='warning'>You feel dizzy.</span>")
|
||||
H.confused += 6
|
||||
H.add_confusion(6)
|
||||
if(prob(3))
|
||||
to_chat(H, "<span class='warning'>You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")].</span>")
|
||||
if(3 to 4)
|
||||
@@ -48,7 +48,7 @@
|
||||
H.losebreath += 4
|
||||
if(prob(3))
|
||||
to_chat(H, "<span class='danger'>You feel very weak and dizzy...</span>")
|
||||
H.confused += 8
|
||||
H.add_confusion(8)
|
||||
H.adjustStaminaLoss(40)
|
||||
H.emote("cough")
|
||||
if(5)
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
if(3)
|
||||
if(prob(4))
|
||||
to_chat(affected_mob, "<span class='danger'>You feel a stabbing pain in your head.</span>")
|
||||
affected_mob.confused += 10
|
||||
affected_mob.add_confusion(10)
|
||||
if(4)
|
||||
if(prob(3))
|
||||
affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh."), forced = "jungle fever")
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
affected_mob.AdjustSleeping(100)
|
||||
if(prob(2))
|
||||
to_chat(affected_mob, "<span class='userdanger'>You feel your mind relax and your thoughts drift!</span>")
|
||||
affected_mob.confused = min(100, affected_mob.confused + 8)
|
||||
affected_mob.set_confusion(min(100, affected_mob.get_confusion() + 8))
|
||||
if(prob(10))
|
||||
affected_mob.vomit(20)
|
||||
if(prob(3))
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
H.Stun(20)
|
||||
H.blur_eyes(20)
|
||||
eyes?.applyOrganDamage(5)
|
||||
H.confused += 3
|
||||
H.add_confusion(3)
|
||||
for(var/mob/living/silicon/S in view(2,owner))
|
||||
to_chat(S, "<span class='userdanger'>Your sensors are disabled by a shower of blood!</span>")
|
||||
S.Paralyze(60)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(C.electrocute_act(15, user, 1, SHOCK_NOSTUN))//doesnt stun. never let this stun
|
||||
C.dropItemToGround(C.get_active_held_item())
|
||||
C.dropItemToGround(C.get_inactive_held_item())
|
||||
C.confused += 15
|
||||
C.add_confusion(15)
|
||||
C.visible_message("<span class='danger'>[user] electrocutes [target]!</span>","<span class='userdanger'>[user] electrocutes you!</span>")
|
||||
return ..()
|
||||
else
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
if(owner.can_hear())
|
||||
owner.dizziness = max(0, owner.dizziness - 2)
|
||||
owner.jitteriness = max(0, owner.jitteriness - 2)
|
||||
owner.confused = max(0, owner.confused - 1)
|
||||
owner.set_confusion(max(0, owner.get_confusion() - 1))
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "goodmusic", /datum/mood_event/goodmusic)
|
||||
|
||||
/obj/screen/alert/status_effect/regenerative_core
|
||||
|
||||
@@ -390,6 +390,22 @@
|
||||
I.take_damage(100)
|
||||
return ..()
|
||||
|
||||
/// A status effect used for specifying confusion on a living mob.
|
||||
/// Created automatically with /mob/living/set_confusion.
|
||||
/datum/status_effect/confusion
|
||||
id = "confusion"
|
||||
alert_type = null
|
||||
var/strength
|
||||
|
||||
/datum/status_effect/confusion/tick()
|
||||
strength -= 1
|
||||
if (strength <= 0)
|
||||
owner.remove_status_effect(STATUS_EFFECT_CONFUSION)
|
||||
return
|
||||
|
||||
/datum/status_effect/confusion/proc/set_strength(new_strength)
|
||||
strength = new_strength
|
||||
|
||||
/datum/status_effect/stacking/saw_bleed
|
||||
id = "saw_bleed"
|
||||
tick_interval = 6
|
||||
|
||||
Reference in New Issue
Block a user