From 966516fb3f5a58524ccfba3decded6a9e0f2b201 Mon Sep 17 00:00:00 2001 From: Incoming Date: Fri, 10 Jun 2016 19:52:33 -0400 Subject: [PATCH] Adds the EASYDISMEMBER and EASYLIMBATTACHMENT specflags EASYDISMEMBER races have about double the chance to get dismembered when attacked with something that can dismember. EASYLIMBATTACHMENT allows races with the flag to just shove limbs found lying on the floor into empty limb slots to regain their use. However this DOESN'T heal the damaged limbs, so in most cases doing this will actually add damage to the mob. Comically, the limbs attached don't need to be the originals, so these races can go around ripping off other peoples limbs and then using them for themselves. Both these abilities are given to the the zombie and skeleton races, and constitute a significant nerf to lichs --- code/__DEFINES/flags.dm | 2 ++ code/modules/mob/living/carbon/human/species.dm | 3 ++- .../mob/living/carbon/human/species_types.dm | 4 ++-- code/modules/surgery/bodyparts/bodyparts.dm | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 0ef81b5fc3c..3308ee26022 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -68,6 +68,8 @@ #define NOHUNGER 17 #define NOCRITDAMAGE 18 #define NOZOMBIE 19 +#define EASYDISMEMBER 20 +#define EASYLIMBATTACHMENT 21 #define FLYING 65536 diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 5244a9bf310..1504d2c57e2 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1107,7 +1107,8 @@ return 0 //item force is zero //dismemberment - if(prob(I.get_dismemberment_chance(affecting))) + var/probability = I.get_dismemberment_chance(affecting) + if(prob(probability) || (EASYDISMEMBER in specflags && prob(2*probability))) if(affecting.dismember(I.damtype)) I.add_mob_blood(H) playsound(get_turf(H), I.get_dismember_sound(), 80, 1) diff --git a/code/modules/mob/living/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm index 6c88cf2a47d..baddaa7107a 100644 --- a/code/modules/mob/living/carbon/human/species_types.dm +++ b/code/modules/mob/living/carbon/human/species_types.dm @@ -420,7 +420,7 @@ blacklisted = 1 sexes = 0 meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton - specflags = list(NOBREATH,RESISTTEMP,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NOHUNGER) + specflags = list(NOBREATH,RESISTTEMP,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NOHUNGER,EASYDISMEMBER,EASYLIMBATTACHMENT) mutant_organs = list(/obj/item/organ/tongue/bone) /* @@ -435,7 +435,7 @@ sexes = 0 blacklisted = 1 meat = /obj/item/weapon/reagent_containers/food/snacks/meat/slab/human/mutant/zombie - specflags = list(NOBREATH,RESISTTEMP,NOBLOOD,RADIMMUNE,NOZOMBIE) + specflags = list(NOBREATH,RESISTTEMP,NOBLOOD,RADIMMUNE,NOZOMBIE,EASYDISMEMBER,EASYLIMBATTACHMENT) mutant_organs = list(/obj/item/organ/tongue/zombie) speedmod = 2 diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 1b08465d297..c9b3b050661 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -45,6 +45,21 @@ owner = null return ..() +/obj/item/bodypart/attack(mob/living/carbon/C, mob/user) + if(ishuman(C)) + var/mob/living/carbon/human/H = C + if(H.dna && H.dna.species && EASYLIMBATTACHMENT in H.dna.species.specflags) + if(!H.get_bodypart(body_zone)) + if(H == user) + H.visible_message("[H] jams [src] into \his empty socket!",\ + "You force [src] into your empty socket, and it locks into place!") + else + H.visible_message("[user] jams [src] into [H]'s empty socket!",\ + "[user] force [src] into your empty socket, and it locks into place!") + attach_limb(C) + return + ..() + /obj/item/bodypart/attackby(obj/item/W, mob/user, params) if(W.sharpness) add_fingerprint(user)