diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 111d2b7cd9c..23bb8861e63 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -469,6 +469,7 @@ flags = NODROP | DROPDEL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS armor = list(MELEE = 40, BULLET = 40, LASER = 40, ENERGY = 20, BOMB = 10, BIO = 4, RAD = 0, FIRE = 90, ACID = 90) + var/armor_durability = 600 flags_inv = HIDEJUMPSUIT cold_protection = 0 heat_protection = 0 @@ -479,61 +480,33 @@ if(ismob(loc)) loc.visible_message("[loc.name]\'s flesh turns black, quickly transforming into a hard, chitinous mass!", "We harden our flesh, creating a suit of armor!", "You hear organic matter ripping and tearing!") - -/obj/item/clothing/suit/armor/changeling/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage, attack_type) +/obj/item/clothing/suit/armor/changeling/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text, final_block_chance, damage) . = ..() - - if(!IS_HORIZONTAL(owner)) - return - - var/obj/item/I = hitby - - if(!isliving(I.loc)) - // Maybe it's on the ground? Maybe it's being used telekinetically? IDK - return - - // The user who's wielding the tool - var/mob/living/user = I.loc - - // snowflake checks my beloved - // this will become tooltype checks I swear - if(!istype(I, /obj/item/circular_saw) && !istype(I, /obj/item/twohanded/required/chainsaw) && !istype(I, /obj/item/twohanded/chainsaw)) - return - - user.visible_message( - "[user] starts to saw through [owner]'s [name].", - "You start to saw through [owner]'s [name].", - "You hear a loud grinding noise." - ) - - if(!do_after(user, 15 SECONDS, target = owner)) - user.visible_message( - "[user] fails to cut through [owner]'s [name].", - "You fail to cut through [owner]'s [name].", - "You hear the grinding stop." - ) - return FALSE - - // check again after the do_after to make sure they haven't gotten up - if(!IS_HORIZONTAL(owner)) - return FALSE - - user.visible_message( - "\The [name] turns to shreds as [user] cleaves through it!", - "\The [name] turns to shreds as you cleave through it!", - "You hear something fall as the grinding ends." - ) - - playsound(I, I.hitsound, 50) - // you've torn it up, get rid of it. - new /obj/effect/decal/cleanable/shreds(owner.loc) - // just unequip them since they qdel on drop - owner.unEquip(src, TRUE, TRUE) - if(istype(owner.head, /obj/item/clothing/head/helmet/changeling)) - owner.unEquip(owner.head, TRUE, TRUE) - - return TRUE - + if(istype(hitby, /obj/item/projectile/energy/charged_plasma)) + armor_durability -= 200 // the plasma pistol is designed to be a niche tool for blasting through shields, may as well let it cut away armor + else if(istype(hitby, /obj/item/projectile/plasma)) + armor_durability -= damage * 4 + else if(istype(hitby, /obj/item/projectile)) + var/obj/item/projectile/P = hitby + if(P.damage_type == BURN) + armor_durability -= damage * 2 + else + armor_durability -= damage + else + var/obj/item/I = hitby + if(istype(I, /obj/item/circular_saw)) + armor_durability -= 25 // saws used to cut away armor through an interaction, so let's keep them somewhat more effective + else if(I.damtype == BURN) + armor_durability -= damage * 2 + else + armor_durability -= damage + if(armor_durability <= 0) + visible_message("[owner]'s chitinous armor collapses in clumps onto the ground.") + new /obj/effect/decal/cleanable/shreds(owner.loc) + // just unequip them since they qdel on drop + owner.unEquip(src, TRUE, TRUE) + if(istype(owner.head, /obj/item/clothing/head/helmet/changeling)) + owner.unEquip(owner.head, TRUE, TRUE) /obj/item/clothing/head/helmet/changeling name = "chitinous mass"