Skip to content

Commit

Permalink
Vomit no longer stuns (ParadiseSS13#21952)
Browse files Browse the repository at this point in the history
* vomit no longer stun

* KnockOut on blood vomit

* review tweaks

* TRUE FALSE

* oops

* stun into should_confuse, 0 into FALSE, 1 into TRUE

* god damnit
  • Loading branch information
HMBGERDO authored Aug 28, 2023
1 parent 0ff7e61 commit ab04ec8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion code/datums/diseases/advance/symptoms/vomit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ Bonus
level = 4

/datum/symptom/vomit/projectile/Vomit(mob/living/carbon/M)
M.vomit(6,0,1,5,1)
M.vomit(6,0,FALSE,5,1)
4 changes: 2 additions & 2 deletions code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@
return
if(teleports < 6)
to_chat(M, "<span class='warning'>You feel a bit sick!</span>")
M.vomit(lost_nutrition = 15, blood = 0, stun = 0, distance = 0, message = 1)
M.vomit(lost_nutrition = 15, blood = 0, should_confuse = FALSE, distance = 0, message = 1)
M.Weaken(2 SECONDS)
else
to_chat(M, "<span class='danger'>You feel really sick!</span>")
M.adjustBruteLoss(rand(0, teleports * 2))
M.vomit(lost_nutrition = 30, blood = 0, stun = 0, distance = 0, message = 1)
M.vomit(lost_nutrition = 30, blood = 0, should_confuse = FALSE, distance = 0, message = 1)
M.Weaken(6 SECONDS)

/datum/status_effect/pacifism
Expand Down
18 changes: 11 additions & 7 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,25 @@
return FALSE


/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1)
/mob/living/carbon/proc/vomit(lost_nutrition = 10, blood = 0, should_confuse = TRUE, distance = 0, message = 1)
. = TRUE

if(stat == DEAD || ismachineperson(src)) // Dead people and IPCs do not vomit particulates
return FALSE

if(stun)
Stun(8 SECONDS)
if(should_confuse)
if(blood)
KnockDown(10 SECONDS)
AdjustConfused(8 SECONDS)
Slowed(8 SECONDS, 1)

if(!blood && nutrition < 100) // Nutrition vomiting while already starving
if(message)
visible_message("<span class='warning'>[src] dry heaves!</span>", \
"<span class='userdanger'>You try to throw up, but there's nothing in your stomach!</span>")
if(stun)
Weaken(20 SECONDS)
if(should_confuse)
KnockDown(20 SECONDS)
AdjustConfused(20 SECONDS)
return

if(message)
Expand All @@ -122,13 +126,13 @@
if(blood)
if(T)
add_splatter_floor(T)
if(stun)
if(should_confuse)
adjustBruteLoss(3)
else
if(T)
T.add_vomit_floor()
adjust_nutrition(-lost_nutrition)
if(stun)
if(should_confuse)
adjustToxLoss(-3)

T = get_step(T, dir)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@
if(getToxLoss() >= 45 && nutrition > 20)
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
vomit(20, 0, 1, 0, 1)
vomit(20, 0, TRUE, 0, 1)
adjustToxLoss(-3)
lastpuke = 0

Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/reagents/drugs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
if(prob(20))
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.vomit(lost_nutrition = 0, blood = TRUE, stun = FALSE)
H.vomit(lost_nutrition = 0, blood = TRUE, should_confuse = FALSE)
M.KnockDown(1 SECONDS)
else
update_flags |= M.adjustStaminaLoss(10, FALSE)
Expand Down Expand Up @@ -586,7 +586,7 @@
var/mob/living/carbon/human/H = M
H.physiology.stun_mod /= tenacity
H.physiology.stamina_mod /= tenacity
H.vomit(blood = TRUE, stun = FALSE) // just a visual, very gritty. don't do drugs kids
H.vomit(blood = TRUE, should_confuse = FALSE) // just a visual, very gritty. don't do drugs kids
H.LoseBreath(10 SECONDS) // procs 5 times, mostly a visual thing. damage could stack to cause a slowdown.
H.Confused(10 SECONDS)

Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/chemistry/reagents/medicine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,15 @@
if(volume < 20)
if(prob(10))
to_chat(H, "<span class='warning>You cough up some congealed blood.</span>")
H.vomit(blood = TRUE, stun = FALSE) //mostly visual
H.vomit(blood = TRUE, should_confuse = FALSE) //mostly visual
else if(prob(10))
var/overdose_message = pick("Your vision is tinted red for a moment.", "You can hear your heart beating.")
to_chat(H, "<span class='warning'>[overdose_message]</span>")
else
if(prob(10))
to_chat(H, "<span class='danger'>You choke on congealed blood!</span>")
H.AdjustLoseBreath(2 SECONDS)
H.vomit(blood = TRUE, stun = FALSE)
H.vomit(blood = TRUE, should_confuse = FALSE)
else if(prob(10))
var/overdose_message = pick("You're seeing red!", "Your heartbeat thunders in your ears!", "Your veins writhe under your skin!")
to_chat(H, "<span class='danger'>[overdose_message]</span>")
Expand Down

0 comments on commit ab04ec8

Please sign in to comment.