paper skin, glass bones

This commit is contained in:
Timothy Teakettle
2022-05-29 20:04:49 +01:00
parent 1764af1319
commit 411a5c63ee
3 changed files with 29 additions and 0 deletions
+2
View File
@@ -233,6 +233,8 @@
#define TRAIT_TRASHCAN "trashcan"
///Used for fireman carry to have mobe not be dropped when passing by a prone individual.
#define TRAIT_BEING_CARRIED "being_carried"
#define TRAIT_GLASS_BONES "glass_bones"
#define TRAIT_PAPER_SKIN "paper_skin"
// mobility flag traits
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)
+18
View File
@@ -425,3 +425,21 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
gain_text = "<span class='notice'>You can't smell anything!</span>"
lose_text = "<span class='notice'>You can smell again!</span>"
medical_record_text = "Patient suffers from anosmia and is incapable of smelling gases or particulates."
/datum/quirk/paper_skin
name = "Paper Skin"
desc = "Your flesh is weaker, resulting in receiving cuts more easily."
value = -1
mob_trait = TRAIT_PAPER_SKIN
gain_text = "<span class='notice'>Your flesh feels weak!</span>"
lose_text = "<span class='notice'>Your flesh feels more durable!</span>"
medical_record_text = "Patient suffers from weak flesh, resulting in them receiving cuts far more easily."
/datum/quirk/glass_bones
name = "Glass Bones"
desc = "Your bones are far more brittle, and more vulnerable to breakage."
value = -1
mob_trait = TRAIT_GLASS_BONES
gain_text = "<span class='notice'>Your bones feels weak!</span>"
lose_text = "<span class='notice'>Your bones feels more durable!</span>"
medical_record_text = "Patient suffers from brittle bones, resulting in them receiving breakages far more easily."
@@ -228,6 +228,8 @@
var/mangled_state = get_mangled_state()
var/bio_state = owner.get_biological_state()
var/easy_dismember = HAS_TRAIT(owner, TRAIT_EASYDISMEMBER) // if we have easydismember, we don't reduce damage when redirecting damage to different types (slashing weapons on mangled/skinless limbs attack at 100% instead of 50%)
var/glass_bones = HAS_TRAIT(owner, TRAIT_GLASS_BONES)
var/paper_skin = HAS_TRAIT(owner, TRAIT_PAPER_SKIN)
if(wounding_type == WOUND_BLUNT)
if(sharpness == SHARP_EDGED)
@@ -242,9 +244,11 @@
if(wounding_type == WOUND_SLASH)
wounding_type = WOUND_BLUNT
wounding_dmg *= (easy_dismember ? 1 : 0.5)
wounding_dmg *= (glass_bones ? 1.5 : 1)
else if(wounding_type == WOUND_PIERCE)
wounding_type = WOUND_BLUNT
wounding_dmg *= (easy_dismember ? 1 : 0.75)
wounding_dmg *= (glass_bones ? 1.5 : 1)
if((mangled_state & BODYPART_MANGLED_BONE) && try_dismember(wounding_type, wounding_dmg, wound_bonus, bare_wound_bonus))
return
// if we're flesh only, all blunt attacks become weakened slashes in terms of wound damage
@@ -252,12 +256,17 @@
if(wounding_type == WOUND_BLUNT)
wounding_type = WOUND_SLASH
wounding_dmg *= (easy_dismember ? 1 : 0.5)
wounding_dmg *= (paper_skin ? 1.5 : 1)
if((mangled_state & BODYPART_MANGLED_FLESH) && try_dismember(wounding_type, wounding_dmg, wound_bonus, bare_wound_bonus))
return
// standard humanoids
if(BIO_FLESH_BONE)
// if we've already mangled the skin (critical slash or piercing wound), then the bone is exposed, and we can damage it with sharp weapons at a reduced rate
// So a big sharp weapon is still all you need to destroy a limb
if(wounding_type == WOUND_SLASH || wounding_type == WOUND_PIERCE)
wounding_dmg *= (paper_skin ? 1.5 : 1)
else
wounding_dmg *= (glass_bones ? 1.5 : 1)
if(mangled_state == BODYPART_MANGLED_FLESH && sharpness)
playsound(src, "sound/effects/wounds/crackandbleed.ogg", 100)
if(wounding_type == WOUND_SLASH && !easy_dismember)