From e0df350579633cd83ad5d397a71f29c099cd111b Mon Sep 17 00:00:00 2001 From: necromanceranne Date: Tue, 10 Mar 2020 23:21:59 +1100 Subject: [PATCH] PD now isn't a HoS taser x3 and has reasonable damage, stimulants actually combat the taser effect instead of you just being completely fucked by the HoS even through adrenals. --- code/__DEFINES/traits.dm | 1 + code/datums/status_effects/debuffs.dm | 9 ++++++++- code/modules/projectiles/projectile/energy/stun.dm | 2 +- .../reagents/chemistry/reagents/drug_reagents.dm | 2 ++ .../reagents/chemistry/reagents/medicine_reagents.dm | 10 ++++++++++ .../code/modules/projectiles/guns/pumpenergy.dm | 9 ++++++--- 6 files changed, 28 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 373945d951..b6ac54cbc5 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -83,6 +83,7 @@ #define TRAIT_DISFIGURED "disfigured" #define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy. #define TRAIT_STUNIMMUNE "stun_immunity" +#define TRAIT_TASED_RESISTANCE "tased_resistance" //prevents you from suffering most of the effects of being tased #define TRAIT_SLEEPIMMUNE "sleep_immunity" #define TRAIT_PUSHIMMUNE "push_immunity" #define TRAIT_SHOCKIMMUNE "shock_immunity" diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index d04cf3939f..8937304178 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -128,6 +128,7 @@ /datum/status_effect/electrode id = "tased" + alert_type = null var/slowdown = 1.5 var/slowdown_priority = 50 //to make sure the stronger effect overrides var/affect_crawl = FALSE @@ -155,7 +156,11 @@ /datum/status_effect/electrode/tick() var/diff = world.time - last_tick if(owner) - owner.adjustStaminaLoss(max(0, stamdmg_per_ds * diff)) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing. + var/mob/living/carbon/C = owner + if(HAS_TRAIT(C, TRAIT_TASED_RESISTANCE)) + qdel(src) + else + C.adjustStaminaLoss(max(0, stamdmg_per_ds * diff)) //if you really want to try to stamcrit someone with a taser alone, you can, but it'll take time and good timing. last_tick = world.time /datum/status_effect/electrode/nextmove_modifier() //why is this a proc. its no big deal since this doesnt get called often at all but literally w h y @@ -172,6 +177,8 @@ . = ..() if(iscarbon(owner)) var/mob/living/carbon/C = owner + if(HAS_TRAIT(C, TRAIT_TASED_RESISTANCE)) + return if(C.combatmode) C.toggle_combat_mode(TRUE) diff --git a/code/modules/projectiles/projectile/energy/stun.dm b/code/modules/projectiles/projectile/energy/stun.dm index 3bb1b3794e..6ae6564671 100644 --- a/code/modules/projectiles/projectile/energy/stun.dm +++ b/code/modules/projectiles/projectile/energy/stun.dm @@ -27,7 +27,7 @@ C.IgniteMob() if(C.dna && C.dna.check_mutation(HULK)) C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk") - else if(tase_duration && (C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE)) + else if(tase_duration && (C.status_flags & CANKNOCKDOWN) && !HAS_TRAIT(C, TRAIT_STUNIMMUNE) && !HAS_TRAIT(C, TRAIT_TASED_RESISTANCE)) C.apply_status_effect(strong_tase? STATUS_EFFECT_TASED : STATUS_EFFECT_TASED_WEAK, tase_duration) addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5) diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 04e7c0a74e..0b634ba2d8 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -171,9 +171,11 @@ /datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L) ..() L.ignore_slowdown(type) + ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type) /datum/reagent/drug/methamphetamine/on_mob_end_metabolize(mob/living/L) L.unignore_slowdown(type) + REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type) ..() /datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 4b2c1447c5..f03156a0e9 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -992,9 +992,11 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) /datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L) ..() L.add_movespeed_modifier(type, update=TRUE, priority=100, multiplicative_slowdown=-0.5, blacklisted_movetypes=(FLYING|FLOATING)) + ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type) /datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/L) L.remove_movespeed_modifier(type) + REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type) ..() /datum/reagent/medicine/stimulants/on_mob_life(mob/living/carbon/M) @@ -1299,6 +1301,14 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) color = "#918e53" overdose_threshold = 30 +/datum/reagent/medicine/changelingadrenaline/on_mob_metabolize(mob/living/L) + ..() + ADD_TRAIT(L, TRAIT_TASED_RESISTANCE, type) + +/datum/reagent/medicine/changelingadrenaline/on_mob_end_metabolize(mob/living/L) + REMOVE_TRAIT(L, TRAIT_TASED_RESISTANCE, type) + ..() + /datum/reagent/medicine/changelingadrenaline/on_mob_life(mob/living/carbon/M as mob) M.AdjustUnconscious(-20, 0) M.AdjustAllImmobility(-20, 0) diff --git a/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm b/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm index f7c0b343c3..0850a95c47 100644 --- a/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm +++ b/modular_citadel/code/modules/projectiles/guns/pumpenergy.dm @@ -185,10 +185,13 @@ name = "electron blast" icon_state = "stunjectile" color = null - nodamage = 1 + nodamage = TRUE knockdown = 100 - stamina = 5 + knockdown_stamoverride = 0 + knockdown_stam_max = 0 + stamina = 18 stutter = 5 jitter = 20 hitsound = 'sound/weapons/taserhit.ogg' - range = 7 + range = 3 + strong_tase = FALSE