Skip to content
Open
10 changes: 10 additions & 0 deletions code/__DEFINES/traits/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_PINPOINT_EYES "pinpoint_eyes"
#define TRAIT_CHEMICAL_NIGHTVISION "chemical_nightvision"
#define TRAIT_GOOD_CHEMICAL_NIGHTVISION "good_chemical_nightvision"
#define TRAIT_AGGROMETABOLISM "aggrometabolism"
#define TRAIT_BRUTEWEAK "brute_weakness"
#define TRAIT_BRUTEWEAKMAJOR "brute_weakness_major"
#define TRAIT_BURNWEAK "burn_weakness"
#define TRAIT_BURNWEAKMAJOR "burn_weakness_major"


///Trait for dryable items
#define TRAIT_DRYABLE "trait_dryable"
Expand Down Expand Up @@ -520,5 +526,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Climbable trait, given and taken by the climbable element when added or removed. Exists to be easily checked via HAS_TRAIT().
#define TRAIT_CLIMBABLE "trait_climbable"

#define TRAIT_VETDOC "trait_vetdoc"
#define TRAIT_FIELDMEDIC "trait_fieldmedic"

#define TRAIT_ARMOR_AVERSION "trait_armor_aversion"
/// Trait applied by element
#define ELEMENT_TRAIT(source) "element_trait_[source]"
8 changes: 7 additions & 1 deletion code/controllers/subsystem/processing/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
list("Bad Touch", "Friendly"), \
list("Self-Aware", "Congenital Analgesia"), \
list("(Language) Moth Pidgin", "(Language) Solarian International", "(Language) Teceti Unified Standard", "(Language) Kalixcian Common"), \
list("Health - Tough", "Health - Very Tough", "Health - Flimsy", "Health - Very Flimsy"),\
list("Fists of Iron" , "Fists of Steel"),\
list("Brute Weakness, Minor", "Brute Weakness, Major"),\
list("Burn Weakness, Minor", "Burn Weakness, Major"),\
list("Pain Tolerance - Weak", "Congenital Analgesia"), \
list("Fat-Fingered", "Gunslinger")\
)

species_blacklist = list("Blood Deficiency" = list(SPECIES_IPC, SPECIES_JELLYPERSON, SPECIES_PLASMAMAN, SPECIES_VAMPIRE))
species_blacklist = list("Blood Deficiency" = list(SPECIES_IPC, SPECIES_JELLYPERSON, SPECIES_PLASMAMAN, SPECIES_VAMPIRE), "Aggressive metabolism" = list(SPECIES_IPC, SPECIES_JELLYPERSON, SPECIES_PLASMAMAN, SPECIES_VAMPIRE))

for(var/client/client in GLOB.clients)
client?.prefs.check_quirk_compatibility()
Expand Down
5 changes: 5 additions & 0 deletions code/datums/traits/negative/aggrometabolism.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/datum/quirk/aggrometabolism
name = "Aggressive metabolism"
desc = "Your body has an extremely fast metabolism, for better or worse, leading to natural healing if you are well fed, but if you are starving, your body will start eating itself up"
value = -1
mob_traits = list(TRAIT_AGGROMETABOLISM)
7 changes: 7 additions & 0 deletions code/datums/traits/negative/chunkyfingers.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/datum/quirk/no_guns
name = "Fat-Fingered"
desc = "Due to the shape of your hands, width of your fingers or just not having fingers at all, you're unable to fire guns."
value = -3
mob_traits = list(TRAIT_CHUNKYFINGERS)
gain_text = span_notice("Your fingers feel... thick.")
lose_text = span_notice("Your fingers feel normal again.")
64 changes: 64 additions & 0 deletions code/datums/traits/negative/damagevul.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/datum/quirk/bruteweak
name = "Brute Weakness, Minor"
desc = "You're weaker to physical trauma than others, taking 10% extra brute damage"
mob_traits = list(TRAIT_BRUTEWEAK)
value = -2

/datum/quirk/bruteweak/add()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.brutemod += 0.1

/datum/quirk/bruteweak/remove()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.brutemod -= 0.1

/datum/quirk/bruteweakmajor
name = "Brute Weakness, Major"
desc = "You're much weaker to physical trauma than others, taking 20% extra brute damage"
mob_traits = list(TRAIT_BRUTEWEAKMAJOR)
value = -4

/datum/quirk/bruteweakmajor/add()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.brutemod += 0.2

/datum/quirk/bruteweakmajor/remove()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.brutemod -= 0.2


/datum/quirk/burnweak
name = "Burn Weakness, Minor"
desc = "You're weaker to burns than others, taking 10% extra burn damage"
mob_traits = list(TRAIT_BURNWEAK)
value = -2

/datum/quirk/burnweak/add()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.burnmod += 0.1

/datum/quirk/burnweak/remove()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.burnmod -= 0.1

/datum/quirk/burnweakmajor
name = "Burn Weakness, Major"
desc = "You're much weaker to burns than others, taking 20% extra burn damage"
mob_traits = list(TRAIT_BURNWEAKMAJOR)
value = -4

/datum/quirk/burnweakmajor/add()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.burnmod += 0.2

/datum/quirk/burnweakmajor/remove()
var/mob/living/carbon/human/H = quirk_holder
var/datum/species/species = H.dna.species
species.burnmod -= 0.2
35 changes: 35 additions & 0 deletions code/datums/traits/negative/flimsy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/datum/quirk/flimsy
name = "Health - Flimsy"
desc = "You have -10 health. What this actually means is that you need to take ten less points of damage before you go into crit. "
value = -2
gain_text = span_notice("You feel less durable.")
lose_text = span_danger("You feel less flimsy once more.")
medical_record_text = "Patient has lower capacity for injury."

/datum/quirk/lifegiver/add()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth -= 10
H.health -= 10

/datum/quirk/lifegiver/remove()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth += 10
H.health += 10

/datum/quirk/flimsyplus
name = "Health - Very Flimsy"
desc = "You have -20 health. What this actually means is that you need to take twenty less points of damage before you go into crit. "
value = -5
gain_text = span_notice("You feel very flimsy!.")
lose_text = span_danger("You don't feel as fragile as before.")
medical_record_text = "Patient has very low capacity for injury."

/datum/quirk/lifegiverplus/add()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth -= 20
H.health -= 20

/datum/quirk/lifegiverplus/remove()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth += 20
H.health += 20
10 changes: 10 additions & 0 deletions code/datums/traits/negative/painintolerance.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/datum/quirk/weakpaintolerance
name = "Pain Tolerance - Weak"
desc = "Your pain tolerance is really low. You go into crit 25 damage points earlier than you should"
gain_text = span_danger("You feel wimpy...")
lose_text = span_notice("You feel stronger.")
value = -5

/datum/quirk/weakpaintolerance/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
H.crit_threshold += 25
13 changes: 13 additions & 0 deletions code/datums/traits/negative/unarmored.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/datum/quirk/armor_aversion
name = "Armor Aversion"
desc = "Whenever due to bravery, personal preference, or simple a hatred towards being encumbered in a big metal coffin, you are refuse to wear armor that is better than tier 2 melee, bullet, laser, or energy."
value = -3
mob_traits = list(TRAIT_ARMOR_AVERSION)
gain_text = span_notice("You can't bring yourself to put on armor.")
lose_text = span_danger("Maybe not being so exposed isn't so bad...")

/datum/quirk/armor_aversion/add()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/clothing/currsuit = H.wear_suit
if(!H.can_equip(currsuit,ITEM_SLOT_OCLOTHING,TRUE))
H.dropItemToGround(currsuit,TRUE,TRUE,FALSE)
35 changes: 35 additions & 0 deletions code/datums/traits/positive/iron_fist.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/datum/quirk/iron_fist
name = "Fists of Iron"
desc = "You have fists of kung-fury! Increases unarmed damage."
value = 2
gain_text = span_notice("Your fists feel furious!")
lose_text = span_danger("Your fists feel calm again.")
medical_record_text = "Patient has claimed to have accidentally break pencils when holding them."

/datum/quirk/iron_fist/add()
var/mob/living/carbon/human/H = quirk_holder
H.dna.species.punchdamagelow += 5
H.dna.species.punchdamagehigh += 2

/datum/quirk/iron_fist/remove()
var/mob/living/carbon/human/H = quirk_holder
H.dna.species.punchdamagelow -= 5
H.dna.species.punchdamagehigh -= 2

/datum/quirk/steel_fist
name = "Fists of Steel"
desc = "You have MASSIVE fists of kung-fury! Even MORE increases unarmed damage."
value = 3
gain_text = span_notice("I trained in a barn")
lose_text = span_danger("I no longer remember my roots in Duranda")
medical_record_text = "Patient has accidentally destroyed the door handle to my office. A replacement is needed."

/datum/quirk/steel_fist/add()
var/mob/living/carbon/human/H = quirk_holder
H.dna.species.punchdamagelow += 10
H.dna.species.punchdamagehigh += 6

/datum/quirk/steel_fist/remove()
var/mob/living/carbon/human/H = quirk_holder
H.dna.species.punchdamagelow -= 10
H.dna.species.punchdamagehigh -= 6
35 changes: 35 additions & 0 deletions code/datums/traits/positive/tough.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/datum/quirk/lifegiver
name = "Health - Tough"
desc = "You have +10 health. What this actually means is that you need to take ten more points of damage before you go into crit. "
value = 3
gain_text = span_notice("You feel more durable.")
lose_text = span_danger("You feel flimsy once more.")
medical_record_text = "Patient has higher capacity for injury."

/datum/quirk/lifegiver/add()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth += 10
H.health += 10

/datum/quirk/lifegiver/remove()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth -= 10
H.health -= 10

/datum/quirk/lifegiverplus
name = "Health - Very Tough"
desc = "You have +20 health. What this actually means is that you need to take twenty more points of damage before you go into crit. "
value = 6
gain_text = span_notice("You feel very durable.")
lose_text = span_danger("You feel flimsy once more.")
medical_record_text = "Patient has very high capacity for injury."

/datum/quirk/lifegiverplus/add()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth += 20
H.health += 20

/datum/quirk/lifegiverplus/remove()
var/mob/living/carbon/human/H = quirk_holder
H.maxHealth -= 20
H.health -= 20
15 changes: 15 additions & 0 deletions code/datums/traits/positive/veteran_doctor.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/datum/quirk/vetdoc
name = "Veteran Doctor"
desc = "After years upon years of practice, you mastered the art of healing, and are able to do certain advanced surgeries without the guidance of an OR computer and it's upgrades, and are able to scavange for medical supplies from scraps."
value = 5
mob_traits = list(TRAIT_VETDOC)
gain_text = span_notice("Years upon years of medical practice is at your fingertips.")
lose_text = span_danger("You forget your medical experience.")

/datum/quirk/fieldmedic
name = "Field Medic"
desc = "Due to having to work in less than optimal circumstances in your past, you have quickly mastered the ways in which you can use ordinary things into tools for surgery and tending wounds. Gain a bonus to ghetto surgeries, and are able to scavange for medical supplies from scraps."
value = 3
mob_traits = list(TRAIT_FIELDMEDIC)
gain_text = span_notice("You really know how to poke wounds with a screwdriver.")
lose_text = span_danger("You lost your hankering to saw ribs with a hatchet.")
16 changes: 16 additions & 0 deletions code/game/objects/items/stacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -488,3 +488,19 @@
amount = 1
splint_type = /datum/bodypart_aid/splint/improvised_metal
merge_type = /obj/item/stack/medical/splint/improvised_metal

/obj/item/stack/medical/bruise_pack/fieldtend
name = "a bunch of scavanged medical supplies"
singular_name = "scavanged medical supplies"
desc = "A measure of haphazardly thrown together supplies to be used for medical purposes. Good for both burns and bruises."
icon_state = "brutepack"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
heal_brute = 5
heal_burn = 5
amount = 1
max_amount = 5
self_delay = 2 SECONDS
other_delay = 2 SECONDS
experience_given = 4
merge_type = /obj/item/stack/medical/bruise_pack/fieldtend
11 changes: 11 additions & 0 deletions code/modules/clothing/suits/armor_aversion.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/obj/item/clothing/suit/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
. = ..()
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(HAS_TRAIT(H, TRAIT_ARMOR_AVERSION))
if( armor.melee > 20 || \
armor.bullet > 20 || \
armor.laser > 20 || \
armor.energy > 20)
to_chat(M, span_danger("You can't wear this armour!"))
return FALSE
17 changes: 17 additions & 0 deletions code/modules/mob/fieldtend.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/mob/verb/fieldtend()
set name = "Field Tending Supplies"
set category = "IC"
set desc = "Retrive your scavanged field tending supplies"
if(HAS_TRAIT(src,TRAIT_VETDOC) || HAS_TRAIT(src, TRAIT_FIELDMEDIC))
if(isliving(src) && stat == CONSCIOUS)
var/mob/living/curruser = src
var/charges = floor(curruser.heal_reservoir)
if(charges > 0)
var/obj/item/stack/medical/bruise_pack/fieldtend/tendies = new(curruser) // Yum 🤤🤤🤤
curruser.put_in_hands(tendies)
curruser.heal_reservoir -= 1
to_chat(src, span_notice("You haphazardly fashion some odds and ends into a handful of makeshift field tend supplies."))
else
to_chat(src, span_warning("You have no scavanged medical supplies at the moment, wait a bit!"))
else
to_chat(src, "You aren't capable of field tending!")
52 changes: 31 additions & 21 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1358,28 +1358,38 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
return //hunger is for BABIES

// nutrition decrease and satiety
if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER))
// THEY HUNGER
var/hunger_rate = HUNGER_FACTOR
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
if(mood && mood.sanity > SANITY_DISTURBED)
hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75
// Whether we cap off our satiety or move it towards 0
if(H.satiety > MAX_SATIETY)
H.satiety = MAX_SATIETY
else if(H.satiety > 0)
H.satiety--
else if(H.satiety < -MAX_SATIETY)
H.satiety = -MAX_SATIETY
else if(H.satiety < 0)
H.satiety++
if(prob(round(-H.satiety/40)))
H.adjust_timed_status_effect(5 SECONDS, /datum/status_effect/jitter)
hunger_rate = 3 * HUNGER_FACTOR
hunger_rate *= H.physiology.hunger_mod
H.adjust_nutrition(-hunger_rate)

// nutrition decrease and satiety
if (H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER))
if(H.nutrition > 0)
// THEY HUNGER
var/hunger_rate = HUNGER_FACTOR
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
if(mood && mood.sanity > SANITY_DISTURBED)
hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75
// Whether we cap off our satiety or move it towards 0
if(H.satiety > MAX_SATIETY)
H.satiety = MAX_SATIETY
else if(H.satiety > 0)
H.satiety--
else if(H.satiety < -MAX_SATIETY)
H.satiety = -MAX_SATIETY
else if(H.satiety < 0)
H.satiety++
if(prob(round(-H.satiety/40)))
H.adjust_timed_status_effect(5 SECONDS, /datum/status_effect/jitter)
hunger_rate = 3 * HUNGER_FACTOR
hunger_rate *= H.physiology.hunger_mod
H.adjust_nutrition(-hunger_rate)
if(HAS_TRAIT(H,TRAIT_AGGROMETABOLISM))
var/healing = H.nutrition / 1000
H.adjust_nutrition(-(healing * 10))
H.adjustToxLoss(-healing, 0)
H.adjustBruteLoss(-healing, 0)
H.adjustFireLoss(-healing, 0)
if(H.nutrition < NUTRITION_LEVEL_STARVING && HAS_TRAIT(H,TRAIT_AGGROMETABOLISM))
H.adjustBruteLoss(0.5, 0)
H.adjustFireLoss(0.5, 0)

if (H.nutrition > NUTRITION_LEVEL_FULL)
if(H.overeatduration < 600) //capped so people don't take forever to unfat
Expand Down
Loading