Skip to content

Commit

Permalink
Fixes a pain oversight
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed Oct 30, 2023
1 parent 886df1d commit fc13050
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions maplestation_modules/code/datums/pain/pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@
shock_buildup = -200 // requires another 200 ticks / 400 seconds / ~6 minutes of pain to go into shock again
return

var/standard_effect_prob = (curr_pain * 0.05) - 0.75 // starts at 10
var/standard_effect_prob = (curr_pain * 0.05) - 0.75 // starts at 15, caps at 4.5
var/rare_effect_prob = (curr_pain * 0.04) - 1.5 // starts at 40
var/very_rare_effect_prob = (curr_pain * 0.03) - 2.25 // starts at 70

Expand Down Expand Up @@ -622,7 +622,7 @@
options.Add("cry", "scream")
do_pain_emote(pick(options), 5 SECONDS)

if(SPT_PROB(rare_effect_prob, seconds_per_tick) && !parent.IsKnockdown())
if(SPT_PROB(rare_effect_prob, seconds_per_tick) && parent.body_position != LYING_DOWN)
parent.Knockdown(2 SECONDS * pain_modifier)
parent.visible_message(span_warning("[parent] collapses from pain!"))

Expand Down
20 changes: 11 additions & 9 deletions maplestation_modules/code/datums/pain/pain_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,21 @@
owner.flash_pain_overlay(1)
feedback_phrases += list("aches", "feels sore", "stings slightly", "tingles", "twinges")
if(25 to 50)
owner.pain_emote()
owner.flash_pain_overlay(1)
feedback_phrases += list("hurts", "feels sore", "stings", "throbs", "pangs", "cramps", "feels wrong", "feels loose")
if(last_received_pain_type == BURN)
feedback_phrases += list("stings to the touch", "burns")
if(50 to 65)
owner.pain_emote()
if(SPT_PROB(4, seconds_per_tick))
owner.pain_emote()
owner.flash_pain_overlay(2)
feedback_phrases += list("really hurts", "is losing feeling", "throbs painfully", "is in agony", "anguishes", "feels broken", "feels terrible")
if(last_received_pain_type == BURN)
feedback_phrases += list("burns to the touch", "burns", "singes")
if(65 to INFINITY)
if(SPT_PROB(12, seconds_per_tick))
owner.pain_emote("scream")
if(SPT_PROB(8, seconds_per_tick))
var/bonus_emote = pick(PAIN_EMOTES)
owner.pain_emote(pick("groan", "scream", bonus_emote))
owner.flash_pain_overlay(2, 2 SECONDS)
feedback_phrases += list("is numb from the pain")

Expand Down Expand Up @@ -152,18 +153,19 @@
owner.flash_pain_overlay(1)
feedback_phrases += list("aches", "feels sore", "stings slightly", "tingles", "twinges")
if(40 to 75)
owner.pain_emote()
owner.flash_pain_overlay(1, 2 SECONDS)
feedback_phrases += list("hurts", "feels sore", "stings", "throbs", "pangs", "cramps", "feels tight")
side_feedback += list("Your side hurts", "Your side pangs", "Your ribs hurt", "Your ribs pang", "Your neck stiffs")
if(75 to 110)
owner.pain_emote()
if(SPT_PROB(8, seconds_per_tick))
owner.pain_emote()
owner.flash_pain_overlay(2, 2 SECONDS)
feedback_phrases += list("really hurts", "is losing feeling", "throbs painfully", "stings to the touch", "is in agony", "anguishes", "feels broken", "feels tight")
side_feedback += list("You feel a sharp pain in your side", "Your ribs feel broken")
if(110 to INFINITY)
var/bonus_emote = pick(PAIN_EMOTES)
owner.pain_emote(pick("groan", "scream", bonus_emote))
if(SPT_PROB(12, seconds_per_tick))
var/bonus_emote = pick(PAIN_EMOTES)
owner.pain_emote(pick("groan", "scream", bonus_emote))
owner.flash_pain_overlay(2, 3 SECONDS)
feedback_phrases += list("hurts madly", "is in agony", "is anguishing", "burns to the touch", "feels terrible", "feels constricted")
side_feedback += list("You feel your ribs jostle in your [plaintext_zone]")
Expand All @@ -190,7 +192,7 @@

if(amount >= 10)
// Large amounts of head pain causes minor brain damage
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, min(pain / 5, 10), 180)
owner.adjustOrganLoss(ORGAN_SLOT_BRAIN, min(pain / 5, 10), 50)

return TRUE

Expand Down

0 comments on commit fc13050

Please sign in to comment.