mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-12 08:43:26 +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:
@@ -35,7 +35,7 @@
|
||||
if (. >= 2)
|
||||
if(prob(1))
|
||||
owner.custom_pain("Your feel very dizzy for a moment!",0)
|
||||
owner.confused = max(owner.confused, 2)
|
||||
owner.Confuse(2)
|
||||
|
||||
/obj/item/organ/internal/brain/proc/replace_self_with(replace_path)
|
||||
var/mob/living/carbon/human/tmp_owner = owner
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(is_bruised())
|
||||
owner.eye_blurry = 20
|
||||
if(is_broken())
|
||||
owner.eye_blind = 20
|
||||
owner.Blind(20)
|
||||
|
||||
/obj/item/organ/internal/eyes/handle_germ_effects()
|
||||
. = ..() //Up should return an infection level as an integer
|
||||
|
||||
@@ -53,6 +53,6 @@
|
||||
if(prob(1))
|
||||
owner.custom_pain("There's a sharp pain in your upper-right abdomen!",1)
|
||||
if (. >= 2)
|
||||
if(prob(1) && owner.getToxLoss() < owner.maxHealth*0.3)
|
||||
if(prob(1) && owner.getToxLoss() < owner.getMaxHealth()*0.3)
|
||||
//owner << "" //Toxins provide their own messages for pain
|
||||
owner.adjustToxLoss(5) //Not realistic to PA but there are basically no 'real' liver infections
|
||||
|
||||
@@ -492,7 +492,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
//Burn damage can cause fluid loss due to blistering and cook-off
|
||||
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT))
|
||||
var/fluid_loss = 0.75 * (damage/(owner.maxHealth - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100)
|
||||
var/fluid_loss = 0.75 * (damage/(owner.getMaxHealth() - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100)
|
||||
owner.remove_blood(fluid_loss)
|
||||
|
||||
// first check whether we can widen an existing wound
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
if(is_bruised())
|
||||
owner.eye_blurry = 20
|
||||
if(is_broken())
|
||||
owner.eye_blind = 20
|
||||
owner.Blind(20)
|
||||
|
||||
/obj/item/organ/internal/liver
|
||||
name = "liver"
|
||||
|
||||
Reference in New Issue
Block a user