mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-24 00:21:52 +00:00
* Split weapons_and_items.dmi icons into their own categories * update modular * I hate the dme * random ass define removal fix * missing icons fix --------- Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
88 lines
3.4 KiB
Plaintext
88 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 = 'icons/obj/weapons/hand.dmi'
|
|
icon_state = "zapper"
|
|
inhand_icon_state = "zapper"
|