mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-06-22 06:35:12 +01:00
21b4095dfd
Upstream 04/17/2026 fixes https://github.com/Bubberstation/Bubberstation/issues/5549 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com> Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com> Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com> Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com> Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com> Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com> Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com> Co-authored-by: loganuk <fakeemail123@aol.com> Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com> Co-authored-by: Isratosh <Isratosh@hotmail.com> Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com> Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com> Co-authored-by: Alexander V. <volas@ya.ru> Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com> Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com> Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com> Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com> Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com> Co-authored-by: Josh <josh.adam.powell@gmail.com> Co-authored-by: Josh Powell <josh.powell@softwire.com> Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com> Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com> Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com> Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
93 lines
3.4 KiB
Plaintext
93 lines
3.4 KiB
Plaintext
/obj/item/mutant_hand/zombie
|
|
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."
|
|
|
|
hitsound = 'sound/effects/hallucinations/growl1.ogg'
|
|
force = 21 // Just enough to break airlocks with melee attacks
|
|
wound_bonus = -30
|
|
exposed_wound_bonus = 15
|
|
sharpness = SHARP_EDGED
|
|
/// Chance of infection on hit
|
|
var/infect_chance = 100
|
|
|
|
/obj/item/mutant_hand/zombie/afterattack(atom/target, mob/user, list/modifiers, list/attack_modifiers)
|
|
if(QDELETED(target))
|
|
return
|
|
if(ishuman(target))
|
|
try_to_zombie_infect(target, user, user.zone_selected, infect_chance)
|
|
else if(isliving(target))
|
|
check_feast(target, user)
|
|
|
|
/obj/item/mutant_hand/zombie/weak
|
|
force = 16
|
|
demolition_mod = 1.33
|
|
exposed_wound_bonus = 10
|
|
infect_chance = 50
|
|
|
|
/proc/try_to_zombie_infect(mob/living/carbon/human/target, mob/living/user, def_zone = BODY_ZONE_CHEST, base_chance = 100)
|
|
CHECK_DNA_AND_SPECIES(target)
|
|
if(!prob(base_chance))
|
|
return
|
|
|
|
// Can't zombify with no head
|
|
if(!target.get_bodypart(BODY_ZONE_HEAD))
|
|
return
|
|
|
|
if(HAS_TRAIT(target, TRAIT_NO_ZOMBIFY))
|
|
// cannot infect any TRAIT_NO_ZOMBIFY human
|
|
return
|
|
|
|
// spaceacillin has a 75% chance to block infection
|
|
if(HAS_TRAIT(target, TRAIT_VIRUS_RESISTANCE) && !HAS_TRAIT(target, TRAIT_IMMUNODEFICIENCY) && prob(75))
|
|
return
|
|
|
|
var/obj/item/bodypart/actual_limb = target.get_bodypart(def_zone)
|
|
|
|
// What you hitting bro?
|
|
if(!actual_limb)
|
|
return
|
|
|
|
var/limb_damage = actual_limb.get_damage()
|
|
var/limb_armor = max(0, target.getarmor(actual_limb, BIO) - 25)
|
|
|
|
// This is a pretty jank way to do this, but in short:
|
|
// if they have thick material on that bodypart it will always need at least 25 previous limb damage to trigger an infection.
|
|
// and if their bio armor isn't thick it's a bit weaker.
|
|
for(var/obj/item/clothing/iter_clothing in target.get_clothing_on_part(actual_limb))
|
|
if(iter_clothing.clothing_flags & THICKMATERIAL)
|
|
limb_armor += 25
|
|
|
|
if(limb_armor > limb_damage)
|
|
return
|
|
|
|
var/obj/item/organ/zombie_infection/infection
|
|
infection = target.get_organ_slot(ORGAN_SLOT_ZOMBIE)
|
|
if(!infection)
|
|
infection = new()
|
|
infection.Insert(target)
|
|
to_chat(user, span_alien("You see [target] twitch for a moment as [target.p_their()] head is covered in \a [infection] - [target.p_Theyve()] been infected."))
|
|
|
|
/obj/item/mutant_hand/zombie/suicide_act(mob/living/user)
|
|
user.visible_message(span_suicide("[user] is ripping [user.p_their()] brains out! It looks like [user.p_theyre()] trying to commit suicide!"))
|
|
var/obj/item/bodypart/head = user.get_bodypart(BODY_ZONE_HEAD)
|
|
if(head)
|
|
head.dismember()
|
|
return BRUTELOSS
|
|
|
|
/obj/item/mutant_hand/zombie/proc/check_feast(mob/living/target, mob/living/user)
|
|
if(target.stat == DEAD)
|
|
var/hp_gained = target.maxHealth
|
|
target.investigate_log("has been devoured by a zombie.", INVESTIGATE_DEATHS)
|
|
target.gib(DROP_ALL_REMAINS)
|
|
var/need_mob_update
|
|
need_mob_update = user.adjust_brute_loss(-hp_gained, updating_health = FALSE)
|
|
need_mob_update += user.adjust_tox_loss(-hp_gained, updating_health = FALSE)
|
|
need_mob_update += user.adjust_fire_loss(-hp_gained, updating_health = FALSE)
|
|
need_mob_update += user.adjust_organ_loss(ORGAN_SLOT_BRAIN, -hp_gained) // Zom Bee gibbers "BRAAAAISNSs!1!"
|
|
user.set_nutrition(min(user.nutrition + hp_gained, NUTRITION_LEVEL_FULL))
|
|
if(need_mob_update)
|
|
user.updatehealth()
|