mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-11 17:35:05 +00:00
* pierce the heavens * starts doing projs * continue pierce * before armor * before sharpness redefine * rename sharp defines, before further implementation * finishing undoing atk_type back to sharpness * neatens up sharpness defines, FALSE -> SHARP_NONE * more piercing, removes brute damage bleed, bubblegum no longer wound * starts letting embeds get in on the fun * half with embed * work on dismembering * continued embed work * more moving bandaging to limbs * more dismemberment work * removing embed pierce stuff * tweaking bullets * more docs and work on dismemberment * spans, piercing, guns * dismemberment and scar fixes * bee changes * bullets embedding * more bullet and dismember work * dismemberment, surgery, piercing, formaldehyde, * pleases travis * pierce smite * nicer on blood * Auto stash before rebase of "tgstation/master" * more neatening * wounds only consider up to 35 damage, wounds on l6 and 762 * updates hulk * balance * defines * lower slug to 50 brute to accommodate wounds * adds differentiation for having flesh/bones/both in mobs * moves scar descs to json, renames organic_state * excises removed healing skill * fixes logs, inconsistencies, some balance changes * untab * slight compress * a * kills pointed global list * dmdoc * halfway through roh * finishes roh review * okay NOW i finished roh's reviews * roh roh roh your boat * gently down the stream * global lists * list ops, fix scanner for bone gel improvised fix * travis moment * sounds added and moved * pellet clouds can join the fun fully, slight gun balancing for wounds * doc moment * unconflicts myself * update hulk * Update code/_onclick/item_attack.dm Co-authored-by: Rohesie <rohesie@gmail.com> * crying ascii face * final rohview * oops * final final Co-authored-by: Rohesie <rohesie@gmail.com>
80 lines
2.5 KiB
Plaintext
80 lines
2.5 KiB
Plaintext
/obj/item/zombie_hand
|
|
name = "zombie claw"
|
|
desc = "A zombie's claw is its primary tool, capable of infecting \
|
|
humans, butchering all other living things to \
|
|
sustain the zombie, smashing open airlock doors and opening \
|
|
child-safe caps on bottles."
|
|
item_flags = ABSTRACT | DROPDEL
|
|
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
|
icon = 'icons/effects/blood.dmi'
|
|
icon_state = "bloodhand_left"
|
|
var/icon_left = "bloodhand_left"
|
|
var/icon_right = "bloodhand_right"
|
|
hitsound = 'sound/hallucinations/growl1.ogg'
|
|
force = 21 // Just enough to break airlocks with melee attacks
|
|
sharpness = SHARP_EDGED
|
|
wound_bonus = -30
|
|
bare_wound_bonus = 15
|
|
damtype = "brute"
|
|
|
|
/obj/item/zombie_hand/Initialize()
|
|
. = ..()
|
|
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
|
|
|
/obj/item/zombie_hand/equipped(mob/user, slot)
|
|
. = ..()
|
|
//these are intentionally inverted
|
|
var/i = user.get_held_index_of_item(src)
|
|
if(!(i % 2))
|
|
icon_state = icon_left
|
|
else
|
|
icon_state = icon_right
|
|
|
|
/obj/item/zombie_hand/afterattack(atom/target, mob/user, proximity_flag)
|
|
. = ..()
|
|
if(!proximity_flag)
|
|
return
|
|
else if(isliving(target))
|
|
if(ishuman(target))
|
|
try_to_zombie_infect(target)
|
|
else
|
|
check_feast(target, user)
|
|
|
|
/proc/try_to_zombie_infect(mob/living/carbon/human/target)
|
|
CHECK_DNA_AND_SPECIES(target)
|
|
|
|
if(NOZOMBIE in target.dna.species.species_traits)
|
|
// cannot infect any NOZOMBIE subspecies (such as high functioning
|
|
// zombies)
|
|
return
|
|
|
|
var/obj/item/organ/zombie_infection/infection
|
|
infection = target.getorganslot(ORGAN_SLOT_ZOMBIE)
|
|
if(!infection)
|
|
infection = new()
|
|
infection.Insert(target)
|
|
|
|
|
|
|
|
/obj/item/zombie_hand/suicide_act(mob/user)
|
|
user.visible_message("<span class='suicide'>[user] is ripping [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
|
if(isliving(user))
|
|
var/mob/living/L = user
|
|
var/obj/item/bodypart/O = L.get_bodypart(BODY_ZONE_HEAD)
|
|
if(O)
|
|
O.dismember()
|
|
return (BRUTELOSS)
|
|
|
|
/obj/item/zombie_hand/proc/check_feast(mob/living/target, mob/living/user)
|
|
if(target.stat == DEAD)
|
|
var/hp_gained = target.maxHealth
|
|
target.gib()
|
|
// zero as argument for no instant health update
|
|
user.adjustBruteLoss(-hp_gained, 0)
|
|
user.adjustToxLoss(-hp_gained, 0)
|
|
user.adjustFireLoss(-hp_gained, 0)
|
|
user.adjustCloneLoss(-hp_gained, 0)
|
|
user.updatehealth()
|
|
user.adjustOrganLoss(ORGAN_SLOT_BRAIN, -hp_gained) // Zom Bee gibbers "BRAAAAISNSs!1!"
|
|
user.set_nutrition(min(user.nutrition + hp_gained, NUTRITION_LEVEL_FULL))
|