Skip to content

Commit

Permalink
Xeno Fruit Effects on Death & New Power Fruit Death Effect (#16681)
Browse files Browse the repository at this point in the history
  • Loading branch information
Runian authored Oct 22, 2024
1 parent 1eba1da commit 9ec3d93
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 24 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
/////////////////////////////////////////////
Expand Down Expand Up @@ -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
/////////////////////////////////////////////
Expand Down
10 changes: 9 additions & 1 deletion code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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!"))
59 changes: 36 additions & 23 deletions code/modules/xenomorph/xenoplant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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")
Expand All @@ -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(!.)
Expand All @@ -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
Expand Down

0 comments on commit 9ec3d93

Please sign in to comment.