mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-17 01:52:38 +01:00
Adds Modifier System, Changes Some Ling Stuff
Adds a fairly simple system that allows adjusting various numbers like max health, incoming damage, outgoing melee damage, etc. The nice part is that changing certain variables this way (like max health) is a lot safer than manually setting the max health var directly. Changes a lot of short lines of code to point towards a variable's getter or setter helper instead of reading the var directly so the modifiers can work. Endoarmor, delayed toxin sting, Enfeebling sting, and recursive adrenaline overdose now use the modifier system. Enfeebling sting now only lasts two minutes, from five minutes, however it now also reduces the victim's melee damage by 25%/50%, and increases the damage they suffer by 10%/35%, for normal and recursive respectively. Delayed Toxin Sting's effects are now felt all at once instead of over the course of a few minutes.
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
if(dose * strength_mod >= strength * 2) // Slurring
|
||||
M.slurring = max(M.slurring, 30)
|
||||
if(dose * strength_mod >= strength * 3) // Confusion - walking in random directions
|
||||
M.confused = max(M.confused, 20)
|
||||
M.Confuse(20)
|
||||
if(dose * strength_mod >= strength * 4) // Blurry vision
|
||||
M.eye_blurry = max(M.eye_blurry, 10)
|
||||
if(dose * strength_mod >= strength * 5) // Drowsyness - periodically falling asleep
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
else if(eyes_covered)
|
||||
M << "<span class='warning'>Your [safe_thing] protect you from most of the pepperspray!</span>"
|
||||
M.eye_blurry = max(M.eye_blurry, effective_strength * 3)
|
||||
M.eye_blind = max(M.eye_blind, effective_strength)
|
||||
M.Blind(effective_strength)
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
return
|
||||
@@ -387,7 +387,7 @@
|
||||
else // Oh dear :D
|
||||
M << "<span class='warning'>You're sprayed directly in the eyes with pepperspray!</span>"
|
||||
M.eye_blurry = max(M.eye_blurry, effective_strength * 5)
|
||||
M.eye_blind = max(M.eye_blind, effective_strength * 2)
|
||||
M.Blind(effective_strength * 2)
|
||||
M.Stun(5)
|
||||
M.Weaken(5)
|
||||
return
|
||||
@@ -1166,7 +1166,7 @@
|
||||
if(M.dizziness)
|
||||
M.dizziness = max(0, M.dizziness - 15)
|
||||
if(M.confused)
|
||||
M.confused = max(0, M.confused - 5)
|
||||
M.Confuse(-5)
|
||||
|
||||
/datum/reagent/drink/dry_ramen
|
||||
name = "Dry Ramen"
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
/datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.add_chemical_effect(CE_PAINKILLER, 200)
|
||||
M.eye_blurry += 10
|
||||
M.confused += 5
|
||||
M.Confuse(5)
|
||||
|
||||
/datum/reagent/oxycodone/overdose(var/mob/living/carbon/M, var/alien)
|
||||
..()
|
||||
@@ -319,7 +319,7 @@
|
||||
|
||||
/datum/reagent/imidazoline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.eye_blurry = max(M.eye_blurry - 5, 0)
|
||||
M.eye_blind = max(M.eye_blind - 5, 0)
|
||||
M.AdjustBlinded(-5)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
|
||||
@@ -349,7 +349,7 @@
|
||||
continue
|
||||
if(I.damage > 0) //Peridaxon heals only non-robotic organs
|
||||
I.damage = max(I.damage - removed, 0)
|
||||
H.confused += 5
|
||||
H.Confuse(5)
|
||||
if(I.damage <= 5 && I.organ_tag == O_EYES)
|
||||
H.eye_blurry += 10 //Eyes need to reset, or something
|
||||
H.sdisabilities &= ~BLIND
|
||||
@@ -441,7 +441,7 @@
|
||||
M.dizziness = 0
|
||||
M.drowsyness = 0
|
||||
M.stuttering = 0
|
||||
M.confused = 0
|
||||
M.SetConfused(0)
|
||||
if(M.ingested)
|
||||
for(var/datum/reagent/R in M.ingested.reagent_list)
|
||||
if(istype(R, /datum/reagent/ethanol))
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
M.disabilities = 0
|
||||
M.sdisabilities = 0
|
||||
M.eye_blurry = 0
|
||||
M.eye_blind = 0
|
||||
M.SetBlinded(0)
|
||||
M.SetWeakened(0)
|
||||
M.SetStunned(0)
|
||||
M.SetParalysis(0)
|
||||
@@ -141,7 +141,7 @@
|
||||
M.dizziness = 0
|
||||
M.drowsyness = 0
|
||||
M.stuttering = 0
|
||||
M.confused = 0
|
||||
M.SetConfused(0)
|
||||
M.sleeping = 0
|
||||
M.jitteriness = 0
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
effective_dose *= 2
|
||||
|
||||
if(effective_dose == metabolism)
|
||||
M.confused += 2
|
||||
M.Confuse(2)
|
||||
M.drowsyness += 2
|
||||
else if(effective_dose < 2 * threshold)
|
||||
M.Weaken(30)
|
||||
@@ -490,7 +490,7 @@
|
||||
if(alien == IS_SKRELL)
|
||||
drug_strength = drug_strength * 0.8
|
||||
M.make_dizzy(drug_strength)
|
||||
M.confused = max(M.confused, drug_strength * 5)
|
||||
M.Confuse(drug_strength * 5)
|
||||
|
||||
/datum/reagent/impedrezene
|
||||
name = "Impedrezene"
|
||||
|
||||
Reference in New Issue
Block a user