mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-16 20:52:33 +00:00
* 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>
87 lines
3.4 KiB
Plaintext
87 lines
3.4 KiB
Plaintext
/datum/mutation/human/shock
|
|
name = "Shock Touch"
|
|
desc = "The affected can channel excess electricity through their hands without shocking themselves, allowing them to shock others."
|
|
quality = POSITIVE
|
|
locked = TRUE
|
|
difficulty = 16
|
|
text_gain_indication = "<span class='notice'>You feel power flow through your hands.</span>"
|
|
text_lose_indication = "<span class='notice'>The energy in your hands subsides.</span>"
|
|
power_path = /datum/action/cooldown/spell/touch/shock
|
|
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 = 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.")
|
|
|
|
/datum/action/cooldown/spell/touch/shock/cast_on_hand_hit(obj/item/melee/touch_attack/hand, atom/victim, mob/living/carbon/caster)
|
|
if(iscarbon(victim))
|
|
var/mob/living/carbon/carbon_victim = victim
|
|
if(carbon_victim.electrocute_act(15, caster, 1, SHOCK_NOGLOVES | SHOCK_NOSTUN))//doesnt stun. never let this stun
|
|
carbon_victim.dropItemToGround(carbon_victim.get_active_held_item())
|
|
carbon_victim.dropItemToGround(carbon_victim.get_inactive_held_item())
|
|
carbon_victim.adjust_confusion(15 SECONDS)
|
|
carbon_victim.visible_message(
|
|
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))
|
|
var/mob/living/living_victim = victim
|
|
if(living_victim.electrocute_act(15, caster, 1, SHOCK_NOSTUN))
|
|
living_victim.visible_message(
|
|
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]..."))
|
|
return TRUE
|
|
|
|
/obj/item/melee/touch_attack/shock
|
|
name = "\improper shock touch"
|
|
desc = "This is kind of like when you rub your feet on a shag rug so you can zap your friends, only a lot less safe."
|
|
icon_state = "zapper"
|
|
inhand_icon_state = "zapper"
|