From 68be85c58ab17da437b3eeaee9acc974531a2aaa Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Wed, 23 Nov 2022 10:08:55 -0800 Subject: [PATCH] [MIRROR] Adds chromosome effects to Cryokinesis, Shocktouch, Chameleon, and Webbing mutations. (#17688) * Adds chromosome effects to Cryokinesis, Shocktouch, Chameleon, and Webbing mutations. (#71118) Cryokinesis instability up by 10 (from 20 to 30) Cryokinesis base cooldown up by 1 second (from 15 to 16) now accepts energetic chromosomes (8 seconds when applied) Shock touch instability up by 5 (from 30 to 35) now accepts both energetic and power chromosomes Shock touch cooldown up by 2 (from 10 to 12) (cooldown of 6 when energetic is applied) If a power chromosome is applied Shock touch does a weak 7500 power (I`ve seen it hit from 5-7 damage) tesla shock with range of 7 when used on a viable target (extra damage does not apply to target, no you cant use it on yourself, no you cant use it on someone that is shock immune, yes you have to put yourself in harms way to apply the tesla shock.) (The vars for the tesla shock can be edited by admins for events/abuse) Chameleon now accepts power chromosomes to fully stealth about 3 seconds faster. Webbing now accepts energetic chromosomes * ty snakebitten Co-authored-by: moocowswag <62126254+moocowswag@users.noreply.github.com> --- code/datums/mutations/chameleon.dm | 7 ++++-- code/datums/mutations/cold.dm | 5 +++-- code/datums/mutations/touch.dm | 35 ++++++++++++++++++++++++++++-- code/datums/mutations/webbing.dm | 13 +++++++++++ 4 files changed, 54 insertions(+), 6 deletions(-) diff --git a/code/datums/mutations/chameleon.dm b/code/datums/mutations/chameleon.dm index 25f2bb5535e..83f2c0fa0f8 100644 --- a/code/datums/mutations/chameleon.dm +++ b/code/datums/mutations/chameleon.dm @@ -6,13 +6,16 @@ difficulty = 16 text_gain_indication = "You feel one with your surroundings." text_lose_indication = "You feel oddly exposed." + instability = 25 + power_coeff = 1 /datum/mutation/human/chameleon/on_acquiring(mob/living/carbon/human/owner) if(..()) return /// SKYRAT EDIT BEGIN - if(HAS_TRAIT(owner,TRAIT_CHAMELEON_SKIN)) + if(HAS_TRAIT(owner, TRAIT_CHAMELEON_SKIN)) return + ADD_TRAIT(owner, TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION) /// SKYRAT EDIT END owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(on_move)) @@ -21,7 +24,7 @@ /datum/mutation/human/chameleon/on_life(delta_time, times_fired) /// SKYRAT EDIT BEGIN if(HAS_TRAIT(owner, TRAIT_CHAMELEON_SKIN)) - owner.alpha = max(owner.alpha - (12.5 * delta_time), 0) + owner.alpha = max(owner.alpha - (12.5 * (GET_MUTATION_POWER(src)) * delta_time), 0) /// SKYRAT EDIT END /** diff --git a/code/datums/mutations/cold.dm b/code/datums/mutations/cold.dm index a49dfa26160..7c891b3f211 100644 --- a/code/datums/mutations/cold.dm +++ b/code/datums/mutations/cold.dm @@ -24,16 +24,17 @@ desc = "Draws negative energy from the sub-zero void to freeze surrounding temperatures at subject's will." quality = POSITIVE //upsides and downsides text_gain_indication = "Your hand feels cold." - instability = 20 + instability = 30 difficulty = 12 synchronizer_coeff = 1 + energy_coeff = 1 power_path = /datum/action/cooldown/spell/pointed/projectile/cryo /datum/action/cooldown/spell/pointed/projectile/cryo name = "Cryobeam" desc = "This power fires a frozen bolt at a target." button_icon_state = "icebeam0" - cooldown_time = 15 SECONDS + cooldown_time = 16 SECONDS spell_requirements = NONE antimagic_flags = NONE diff --git a/code/datums/mutations/touch.dm b/code/datums/mutations/touch.dm index 2da327c87ff..0964492d1ca 100644 --- a/code/datums/mutations/touch.dm +++ b/code/datums/mutations/touch.dm @@ -7,18 +7,43 @@ text_gain_indication = "You feel power flow through your hands." text_lose_indication = "The energy in your hands subsides." power_path = /datum/action/cooldown/spell/touch/shock - instability = 30 + instability = 35 + energy_coeff = 1 + power_coeff = 1 + +/datum/mutation/human/shock/modify() + . = ..() + var/datum/action/cooldown/spell/touch/shock/to_modify =. + + if(!istype(to_modify)) // null or invalid + return + + if(GET_MUTATION_POWER(src) <= 1) + to_modify.chain = initial(to_modify.chain) + return + + to_modify.chain = TRUE /datum/action/cooldown/spell/touch/shock name = "Shock Touch" desc = "Channel electricity to your hand to shock people with." button_icon_state = "zap" sound = 'sound/weapons/zapbang.ogg' - cooldown_time = 10 SECONDS + cooldown_time = 12 SECONDS invocation_type = INVOCATION_NONE spell_requirements = NONE antimagic_flags = NONE + //Vars for zaps made when power chromosome is applied, ripped and toned down from reactive tesla armor code. + ///This var decides if the spell should chain, dictated by presence of power chromosome + var/chain = FALSE + ///Affects damage, should do about 1 per limb + var/zap_power = 7500 + ///Range of tesla shock bounces + var/zap_range = 7 + ///flags that dictate what the tesla shock can interact with, Can only damage mobs, Cannot damage machines or generate energy + var/zap_flags = ZAP_MOB_DAMAGE + hand_path = /obj/item/melee/touch_attack/shock draw_message = span_notice("You channel electricity into your hand.") drop_message = span_notice("You let the electricity from your hand dissipate.") @@ -34,6 +59,9 @@ span_danger("[caster] electrocutes [victim]!"), span_userdanger("[caster] electrocutes you!"), ) + if(chain) + tesla_zap(victim, zap_range, zap_power, zap_flags) + carbon_victim.visible_message(span_danger("An arc of electricity explodes out of [victim]!")) return TRUE else if(isliving(victim)) @@ -43,6 +71,9 @@ span_danger("[caster] electrocutes [victim]!"), span_userdanger("[caster] electrocutes you!"), ) + if(chain) + tesla_zap(victim, zap_range, zap_power, zap_flags) + living_victim.visible_message(span_danger("An arc of electricity explodes out of [victim]!")) return TRUE to_chat(caster, span_warning("The electricity doesn't seem to affect [victim]...")) diff --git a/code/datums/mutations/webbing.dm b/code/datums/mutations/webbing.dm index 2d696938e6c..fb152772db1 100644 --- a/code/datums/mutations/webbing.dm +++ b/code/datums/mutations/webbing.dm @@ -6,6 +6,19 @@ text_gain_indication = "Your skin feels webby." instability = 15 power_path = /datum/action/cooldown/spell/lay_genetic_web + energy_coeff = 1 + +/datum/mutation/human/webbing/modify() + . = ..() + var/datum/action/cooldown/spell/lay_genetic_web/to_modify =. + + if(!istype(to_modify)) // null or invalid + return + + if(GET_MUTATION_ENERGY(src) == 1) //energetic chromosome outputs a value less than 1 when present, 1 by default + to_modify.webbing_time = initial(to_modify.webbing_time) + return + to_modify.webbing_time = 2 SECONDS /datum/mutation/human/webbing/on_acquiring(mob/living/carbon/human/owner) if(..())