From 31c082ccffd43da661fa0afb271e57a5649e1b55 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:52:33 +0100 Subject: [PATCH] [MIRROR] Buffs implanted mining organs [MDB IGNORE] (#18059) * Buffs implanted mining organs (#71863) ## About The Pull Request In [70546](https://github.com/tgstation/tgstation/pull/70546) I added some new implantable organs to mining creatures which didn't drop anything on death. I didn't really want these to make miners way better at station PvP so I gave them some pretty hefty downsides. I went too far and this meant nobody would ever implant one of them ever, which sort of negates the point of adding it. The implanted Brimdust Sac has now been redesigned. It no longer sets you on fire if activated on the station, nor does it explode if you catch fire. Instead, if you're in an unpressurised environment (like space or Lavaland) it will add one stack of the buff every 30 seconds automatically. The buff still does reduced damage on the station _and_ hurts you as much as it hurts anyone else. In addition, instead of catching fire, you will be slowed for four seconds. Additionally I cut the cooldown for both organs in half because there wasn't really any reason for it to be that long. ## Why It's Good For The Game ![image](https://user-images.githubusercontent.com/7483112/206711374-c7f35e54-4eca-48de-9c01-29ae299badda.png) Encourages miners to go interact with medbay in between delivering ore, while they're waiting for their shit to get posted. Now when someone indignantly posts "When was the last time there was a mining _buff_" in #coding-general you can link them to this PR. ## Changelog :cl: balance: Rush Gland and Brimdust Sac can be used more frequently when implanted. balance: An implanted Brimdust Sac will stack the buff on you automatically while on lavaland. Triggering the buff on the station will make you walk slower for a short duration. balance: Implanted Bimrdust Sacs no longer set you on fire, nor do they explode if you catch fire. /:cl: * Buffs implanted mining organs Co-authored-by: Jacquerel --- .../equipment/monster_organs/brimdust_sac.dm | 94 +++++++++++-------- .../equipment/monster_organs/monster_organ.dm | 1 - .../equipment/monster_organs/rush_gland.dm | 2 +- .../movespeed/modifiers/status_effects.dm | 3 + 4 files changed, 60 insertions(+), 40 deletions(-) diff --git a/code/modules/mining/equipment/monster_organs/brimdust_sac.dm b/code/modules/mining/equipment/monster_organs/brimdust_sac.dm index ae9cfbef130..dcacc4a6457 100644 --- a/code/modules/mining/equipment/monster_organs/brimdust_sac.dm +++ b/code/modules/mining/equipment/monster_organs/brimdust_sac.dm @@ -1,8 +1,15 @@ +/// Interval between passively gaining stacks on lavaland if organ is implanted +#define BRIMDUST_LIFE_APPLY_COOLDOWN (30 SECONDS) +/// Number of stacks to add over time +#define BRIMDUST_STACKS_ON_LIFE 1 +/// Number of stacks to add if you activate the item in hand +#define BRIMDUST_STACKS_ON_USE 3 + /** * Gives you three stacks of Brimdust Coating, when you get hit by anything it will make a short ranged explosion. - * If this happens on the station it also sets you on fire. + * If this happens on the station it does much less damage, and slows down the bearer. * If implanted, you can shake off a cloud of brimdust to give this buff to people around you.area - * I you have this inside you on the station and you catch fire it explodes. + * It will also automatically grant you one stack every 30 seconds if you are on lavaland. */ /obj/item/organ/internal/monster_core/brimdust_sac name = "brimdust sac" @@ -14,36 +21,26 @@ desc_inert = "A decayed brimdemon organ. There's nothing usable left inside it." user_status = /datum/status_effect/stacking/brimdust_coating actions_types = list(/datum/action/cooldown/monster_core_action/exhale_brimdust) + /// You will gain a stack of the buff every x seconds + COOLDOWN_DECLARE(brimdust_auto_apply_cooldown) /obj/item/organ/internal/monster_core/brimdust_sac/Initialize(mapload) . = ..() AddComponent(/datum/component/explodable, light_impact_range = 1) +/obj/item/organ/internal/monster_core/brimdust_sac/apply_to(mob/living/target, mob/user) + target.apply_status_effect(user_status, BRIMDUST_STACKS_ON_USE) + qdel(src) + +// Every x seconds, if on lavaland, add one stack /obj/item/organ/internal/monster_core/brimdust_sac/on_life(delta_time, times_fired) . = ..() - if(!owner.on_fire) + if(!COOLDOWN_FINISHED(src, brimdust_auto_apply_cooldown)) return - if(lavaland_equipment_pressure_check(get_turf(owner))) + if(!lavaland_equipment_pressure_check(get_turf(owner))) return - explode_organ() - -/// Your gunpowder organ blows up, uh oh -/obj/item/organ/internal/monster_core/brimdust_sac/proc/explode_organ() - owner.visible_message(span_boldwarning("[owner]'s chest bursts open as something inside ignites!")) - var/turf/origin_turf = get_turf(owner) - playsound(origin_turf, 'sound/effects/pop_expl.ogg', 100) - new /obj/effect/temp_visual/explosion/fast(origin_turf) - owner.Paralyze(5 SECONDS) - - for(var/mob/living/target in range(1, origin_turf)) - var/armor = target.run_armor_check(attack_flag = BOMB) - target.apply_damage(15, damagetype = BURN, blocked = armor, spread_damage = TRUE) - - owner.apply_damage(15, damagetype = BRUTE, def_zone = BODY_ZONE_CHEST) - var/obj/item/bodypart/chest/torso = owner.get_bodypart(BODY_ZONE_CHEST) - torso.force_wound_upwards(/datum/wound/burn/severe) - owner.emote("scream") - qdel(src) + COOLDOWN_START(src, brimdust_auto_apply_cooldown, BRIMDUST_LIFE_APPLY_COOLDOWN) + owner.apply_status_effect(user_status, BRIMDUST_STACKS_ON_LIFE) /// Make a cloud which applies brimdust to everyone nearby /obj/item/organ/internal/monster_core/brimdust_sac/on_triggered_internal() @@ -52,7 +49,7 @@ /// Smoke which applies brimdust to you, and is also bad for your lungs /obj/effect/particle_effect/fluid/smoke/bad/brimdust - lifetime = 5 SECONDS + lifetime = 8 SECONDS color = "#383838" /obj/effect/particle_effect/fluid/smoke/bad/brimdust/smoke_mob(mob/living/carbon/smoker) @@ -62,7 +59,7 @@ return FALSE if(smoker.smoke_delay) return FALSE - smoker.apply_status_effect(/datum/status_effect/stacking/brimdust_coating) + smoker.apply_status_effect(/datum/status_effect/stacking/brimdust_coating, BRIMDUST_STACKS_ON_LIFE) return ..() /** @@ -72,11 +69,12 @@ */ /datum/status_effect/stacking/brimdust_coating id = "brimdust_coating" - stacks = 3 + stacks = 0 max_stacks = 3 tick_interval = -1 consumed_on_threshold = FALSE alert_type = /atom/movable/screen/alert/status_effect/brimdust_coating + status_type = STATUS_EFFECT_REFRESH // Allows us to add one stack at a time by just applying the effect /// Damage to deal on explosion var/blast_damage = 40 /// Damage reduction when not in a mining pressure area @@ -108,6 +106,10 @@ desc = replacetext(desc, "%STACKS%", dust_amount_string) return ..() +/datum/status_effect/stacking/brimdust_coating/refresh(effect, stacks_to_add) + . = ..() + add_stacks(stacks_to_add) + /datum/status_effect/stacking/brimdust_coating/add_stacks(stacks_added) . = ..() if (stacks == 0) @@ -157,27 +159,43 @@ playsound(origin_turf, 'sound/effects/pop_expl.ogg', 50) new /obj/effect/temp_visual/explosion/fast(origin_turf) - var/under_pressure = !lavaland_equipment_pressure_check(origin_turf) var/damage_dealt = blast_damage - if(under_pressure) - damage_dealt *= pressure_modifier - var/list/possible_targets = range(1, origin_turf) - if(!under_pressure) + if(lavaland_equipment_pressure_check(origin_turf)) possible_targets -= owner + else + damage_dealt *= pressure_modifier + owner.apply_status_effect(/datum/status_effect/brimdust_concussion) + for(var/mob/living/target in possible_targets) var/armor = target.run_armor_check(attack_flag = BOMB) target.apply_damage(damage_dealt, damagetype = BURN, blocked = armor, spread_damage = TRUE) - if(under_pressure) - owner.adjust_fire_stacks(5) - owner.ignite_mob() add_stacks(-1) -/// Action used by the rush gland +/// Slowdown applied when you are detonated on the space station +/datum/status_effect/brimdust_concussion + id = "brimdust_concussion" + duration = 4 SECONDS + alert_type = null // Short lived enough not to matter + +/datum/status_effect/brimdust_concussion/on_apply() + . = ..() + owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/brimdust_concussion) + to_chat(owner, span_warning("You are knocked off balance by the explosion!")) + +/datum/status_effect/brimdust_concussion/on_remove() + . = ..() + owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/brimdust_concussion) + to_chat(owner, span_notice("You find your balance.")) + +/// Action used by the brimdust sac /datum/action/cooldown/monster_core_action/exhale_brimdust name = "Exhale Brimdust" - desc = "Cough out a cloud of explosive brimdust to coat those nearby. \ - This organ and the dust it produces are extremely flammable under atmospheric pressure." + desc = "Cough out a choking cloud of explosive brimdust to coat those nearby." button_icon_state = "brim_sac_stable" - cooldown_time = 3 MINUTES + cooldown_time = 90 SECONDS + +#undef BRIMDUST_LIFE_APPLY_COOLDOWN +#undef BRIMDUST_STACKS_ON_LIFE +#undef BRIMDUST_STACKS_ON_USE diff --git a/code/modules/mining/equipment/monster_organs/monster_organ.dm b/code/modules/mining/equipment/monster_organs/monster_organ.dm index 8ced22edc23..29e43d89b6e 100644 --- a/code/modules/mining/equipment/monster_organs/monster_organ.dm +++ b/code/modules/mining/equipment/monster_organs/monster_organ.dm @@ -199,7 +199,6 @@ check_flags = AB_CHECK_CONSCIOUS icon_icon = 'icons/obj/medical/organs/mining_organs.dmi' button_icon_state = "hivelord_core_2" - text_cooldown = FALSE //Looks really bad when you have minutes long cooldowns /datum/action/cooldown/monster_core_action/Activate(trigger_flags) . = ..() diff --git a/code/modules/mining/equipment/monster_organs/rush_gland.dm b/code/modules/mining/equipment/monster_organs/rush_gland.dm index 5bf26343311..4d2ce9ae529 100644 --- a/code/modules/mining/equipment/monster_organs/rush_gland.dm +++ b/code/modules/mining/equipment/monster_organs/rush_gland.dm @@ -93,6 +93,6 @@ desc = "Pump your rush gland to give yourself a boost of speed. \ Impacts with objects can be dangerous under atmospheric pressure." button_icon_state = "lobster_gland_stable" - cooldown_time = 3 MINUTES + cooldown_time = 90 SECONDS #undef HEALTH_DANGER_ZONE diff --git a/code/modules/movespeed/modifiers/status_effects.dm b/code/modules/movespeed/modifiers/status_effects.dm index e0af6797f74..a201a2363cd 100644 --- a/code/modules/movespeed/modifiers/status_effects.dm +++ b/code/modules/movespeed/modifiers/status_effects.dm @@ -25,3 +25,6 @@ /datum/movespeed_modifier/status_effect/lobster_rush multiplicative_slowdown = -0.5 blacklisted_movetypes = (FLYING|FLOATING) + +/datum/movespeed_modifier/status_effect/brimdust_concussion + multiplicative_slowdown = 1.5