Uses the new trait system on some chems (#34893)

* Uses the new trait system on some chems
This commit is contained in:
XDTM
2018-01-29 16:44:40 +02:00
committed by vuonojenmustaturska
parent add799e571
commit d679d7bee1
4 changed files with 59 additions and 29 deletions
@@ -245,21 +245,31 @@
/datum/reagent/drug/bath_salts
name = "Bath Salts"
id = "bath_salts"
description = "Makes you nearly impervious to stuns and grants a stamina regeneration buff, but you will be a nearly uncontrollable tramp-bearded raving lunatic."
description = "Makes you impervious to stuns and grants a stamina regeneration buff, but you will be a nearly uncontrollable tramp-bearded raving lunatic."
reagent_state = LIQUID
color = "#FAFAFA"
overdose_threshold = 20
addiction_threshold = 10
taste_description = "salt" // because they're bathsalts?
/datum/reagent/drug/bath_salts/on_mob_add(mob/M)
..()
if(isliving(M))
var/mob/living/L = M
L.add_trait(TRAIT_STUNIMMUNE, id)
L.add_trait(TRAIT_SLEEPIMMUNE, id)
/datum/reagent/drug/bath_salts/on_mob_delete(mob/M)
if(isliving(M))
var/mob/living/L = M
L.remove_trait(TRAIT_STUNIMMUNE, id)
L.remove_trait(TRAIT_SLEEPIMMUNE, id)
..()
/datum/reagent/drug/bath_salts/on_mob_life(mob/living/M)
var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.")
if(prob(5))
to_chat(M, "<span class='notice'>[high_message]</span>")
M.AdjustStun(-60, 0)
M.AdjustKnockdown(-60, 0)
M.AdjustUnconscious(-60, 0)
M.adjustStaminaLoss(-5, 0)
M.adjustBrainLoss(0.5)
M.adjustToxLoss(0.1, 0)
@@ -333,7 +343,7 @@
/datum/reagent/drug/aranesp
name = "Aranesp"
id = "aranesp"
description = "Amps you up and gets you going, fixes all stamina damage you might have but can cause toxin and oxygen damage.."
description = "Amps you up and gets you going, fixes all stamina damage you might have but can cause toxin and oxygen damage."
reagent_state = LIQUID
color = "#78FFF0"
@@ -1205,6 +1205,22 @@
overdose_threshold = 20
addiction_threshold = 5
/datum/reagent/medicine/ketrazine/on_mob_add(mob/M)
..()
if(isliving(M))
var/mob/living/L = M
L.add_trait(TRAIT_SLEEPIMMUNE, id)
L.add_trait(TRAIT_IGNORESLOWDOWN, id)
L.add_trait(TRAIT_GOTTAGOFAST, id)
/datum/reagent/medicine/ketrazine/on_mob_delete(mob/M)
if(isliving(M))
var/mob/living/L = M
L.remove_trait(TRAIT_SLEEPIMMUNE, id)
L.remove_trait(TRAIT_IGNORESLOWDOWN, id)
L.remove_trait(TRAIT_GOTTAGOFAST, id)
..()
/datum/reagent/medicine/ketrazine/on_mob_life(mob/living/M)
M.adjustToxLoss(-3*REM, 0)
M.adjustBruteLoss(-5*REM, 0)