From 9ec3d93babac3520595d327abd339aa79f501dd4 Mon Sep 17 00:00:00 2001 From: Rune Knight <30399783+Runian@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:32:47 -0700 Subject: [PATCH] Xeno Fruit Effects on Death & New Power Fruit Death Effect (#16681) --- code/__DEFINES/conflict.dm | 1 + .../objects/effects/effect_system/smoke.dm | 13 ++++ .../mob/living/carbon/carbon_defense.dm | 10 +++- code/modules/xenomorph/xenoplant.dm | 59 +++++++++++-------- 4 files changed, 59 insertions(+), 24 deletions(-) diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm index 931513db334ef..df144c3007344 100644 --- a/code/__DEFINES/conflict.dm +++ b/code/__DEFINES/conflict.dm @@ -190,6 +190,7 @@ #define SMOKE_SATRAPINE (1<<20) //nerve agent that purges painkillers and causes increasing pain #define SMOKE_XENO_TOXIC (1<<21) //deals damage to anyone inside it and inflicts the intoxicated debuff, dealing damage over time #define SMOKE_PURGER (1<<22) // This smoke removes any smoke has this in its effects_cycle, that removes certain types of smokes. +#define SMOKE_XENO_PYROGEN (1<<23) // Smoke that acts like SMOKE_BLISTERING for non-xenos and applies pyrogen's melting fire status effect when entering. //Incapacitated #define INCAPACITATED_IGNORE_RESTRAINED (1<<0) diff --git a/code/game/objects/effects/effect_system/smoke.dm b/code/game/objects/effects/effect_system/smoke.dm index 28be22a23b17e..730ffc68e2a11 100644 --- a/code/game/objects/effects/effect_system/smoke.dm +++ b/code/game/objects/effects/effect_system/smoke.dm @@ -416,6 +416,14 @@ color = "#f1ddcf" //A pinkish for now. smoke_traits = SMOKE_XENO|SMOKE_XENO_OZELOMELYN|SMOKE_GASP|SMOKE_COUGH|SMOKE_HUGGER_PACIFY + +/// Smoke that constantly makes pyrogen fire. +/obj/effect/particle_effect/smoke/xeno/pyrogen_fire + alpha = 120 + opacity = FALSE + color = "#cff1ee" // Blueish. + smoke_traits = SMOKE_XENO|SMOKE_XENO_PYROGEN|SMOKE_GASP|SMOKE_COUGH|SMOKE_HUGGER_PACIFY + ///////////////////////////////////////////// // Smoke spreads ///////////////////////////////////////////// @@ -492,6 +500,11 @@ /datum/effect_system/smoke_spread/xeno/ozelomelyn smoke_type = /obj/effect/particle_effect/smoke/xeno/ozelomelyn + +/datum/effect_system/smoke_spread/xeno/pyrogen_fire + smoke_type = /obj/effect/particle_effect/smoke/xeno/pyrogen_fire + + ///////////////////////////////////////////// // Chem smoke ///////////////////////////////////////////// diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 8f49d806f6b2c..0a6acbcbd9705 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -23,7 +23,7 @@ adjustDrowsyness(6) if(drowsyness >= 18) Sleeping(10 SECONDS) - if(CHECK_BITFIELD(S.smoke_traits, SMOKE_BLISTERING)) + if(CHECK_BITFIELD(S.smoke_traits, SMOKE_BLISTERING) || CHECK_BITFIELD(S.smoke_traits, SMOKE_XENO_PYROGEN)) adjustFireLoss(12) blur_eyes(2) if(CHECK_BITFIELD(S.smoke_traits, SMOKE_PLASMALOSS)) @@ -87,3 +87,11 @@ reagents.add_reagent(/datum/reagent/toxin/xeno_ozelomelyn, round(GAS_INHALE_REAGENT_TRANSFER_AMOUNT * 0.6 * S.strength * bio_protection, 0.1)) if(prob(10 * S.strength * bio_protection)) to_chat(src, span_danger("Your veins and skin itch where the gas touches them!")) + if(CHECK_BITFIELD(S.smoke_traits, SMOKE_XENO_PYROGEN)) + var/datum/status_effect/stacking/melting_fire/debuff = src.has_status_effect(STATUS_EFFECT_MELTING_FIRE) + if(debuff) + debuff.add_stacks(PYROGEN_TORNADO_MELTING_FIRE_STACKS) + else + src.apply_status_effect(STATUS_EFFECT_MELTING_FIRE, PYROGEN_MELTING_FIRE_EFFECT_STACK * S.strength) + if(prob(10 * S.strength)) + to_chat(src, span_danger("Your skin burns with blue fire!")) diff --git a/code/modules/xenomorph/xenoplant.dm b/code/modules/xenomorph/xenoplant.dm index 62710144838c3..60ab0b0372fe3 100644 --- a/code/modules/xenomorph/xenoplant.dm +++ b/code/modules/xenomorph/xenoplant.dm @@ -53,7 +53,7 @@ if(xeno_attacker.a_intent == INTENT_HARM && isxenodrone(xeno_attacker)) balloon_alert(xeno_attacker, "Uprooted the plant") xeno_attacker.do_attack_animation(src) - deconstruct(FALSE) + deconstruct(TRUE) return FALSE if(can_interact(xeno_attacker)) return on_use(xeno_attacker) @@ -69,16 +69,20 @@ ///Maximum amount of health recovered, depends on the xeno's max health var/healing_amount_max_health_scaling = 0.5 +/obj/structure/xeno/plant/heal_fruit/deconstruct(disassembled = TRUE, mob/living/blame_mob) + if(!disassembled && mature) + var/datum/effect_system/smoke_spread/xeno/acid/opaque/plant_explosion = new(get_turf(src)) + plant_explosion.set_up(3,src) + plant_explosion.start() + visible_message(span_danger("[src] bursts, releasing toxic gas!")) + return ..() + /obj/structure/xeno/plant/heal_fruit/on_use(mob/user) balloon_alert(user, "Consuming...") if(!do_after(user, 2 SECONDS, IGNORE_HELD_ITEM, src)) return FALSE if(!isxeno(user)) - var/datum/effect_system/smoke_spread/xeno/acid/opaque/plant_explosion = new(get_turf(src)) - plant_explosion.set_up(3,src) - plant_explosion.start() - visible_message(span_danger("[src] bursts, releasing toxic gas!")) - qdel(src) + deconstruct(FALSE) return TRUE var/mob/living/carbon/xenomorph/X = user @@ -98,25 +102,28 @@ ///How much total sunder should we remove var/sunder_removal = 30 +/obj/structure/xeno/plant/armor_fruit/deconstruct(disassembled = TRUE, mob/living/blame_mob) + if(!disassembled && mature) + for (var/mob/living/carbon/human/nearby_human AS in cheap_get_humans_near(src, 1)) + var/turf/far_away_lands = get_turf(nearby_human) + for(var/x in 1 to 20) + var/turf/next_turf = get_step(far_away_lands, REVERSE_DIR(nearby_human.dir)) + if(!next_turf) + break + far_away_lands = next_turf + + nearby_human.throw_at(far_away_lands, 20, spin = TRUE) + to_chat(nearby_human, span_warning("[src] bursts, releasing a strong gust of pressurised gas!")) + nearby_human.adjust_stagger(3 SECONDS) + nearby_human.apply_damage(30, BRUTE, "chest", BOMB) + return ..() + /obj/structure/xeno/plant/armor_fruit/on_use(mob/user) balloon_alert(user, "Consuming...") if(!do_after(user, 2 SECONDS, IGNORE_HELD_ITEM, src)) return FALSE if(!isxeno(user)) - var/turf/far_away_lands = get_turf(user) - for(var/x in 1 to 20) - var/turf/next_turf = get_step(far_away_lands, REVERSE_DIR(user.dir)) - if(!next_turf) - break - far_away_lands = next_turf - - user.throw_at(far_away_lands, 20, spin = TRUE) - to_chat(user, span_warning("[src] bursts, releasing a strong gust of pressurised gas!")) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - H.adjust_stagger(3 SECONDS) - H.apply_damage(30, BRUTE, "chest", BOMB) - qdel(src) + deconstruct(FALSE) return TRUE balloon_alert(user, "Armor restored") @@ -136,6 +143,14 @@ ///How long should the buff last var/duration = 1 MINUTES +/obj/structure/xeno/plant/plasma_fruit/deconstruct(disassembled = TRUE, mob/living/blame_mob) + if(!disassembled && mature) + var/datum/effect_system/smoke_spread/xeno/pyrogen_fire/plant_explosion = new(get_turf(src)) + plant_explosion.set_up(4, src) + plant_explosion.start() + visible_message(span_warning("[src] bursts, releasing blue hot gas!")) + return ..() + /obj/structure/xeno/plant/plasma_fruit/can_interact(mob/user) . = ..() if(!.) @@ -152,9 +167,7 @@ if(!do_after(user, 2 SECONDS, IGNORE_HELD_ITEM, src)) return FALSE if(!isxeno(user)) - visible_message(span_warning("[src] releases a sticky substance before spontaneously bursting into flames!")) - flame_radius(3, get_turf(src), colour = "green") - qdel(src) + deconstruct(FALSE) return TRUE var/mob/living/carbon/xenomorph/X = user