Merge pull request #11396 from Ghommie/Ghommie-cit613
Ports "Switches out the three billion args of electrocute act for flags"
This commit is contained in:
@@ -206,7 +206,7 @@
|
||||
#define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living)
|
||||
#define COMSIG_LIVING_IGNITED "living_ignite" //from base of mob/living/IgniteMob() (/mob/living)
|
||||
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living)
|
||||
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage)
|
||||
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage, source, siemens_coeff, flags)
|
||||
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
|
||||
#define COMSIG_LIVING_REVIVE "living_revive" //from base of mob/living/revive() (full_heal, admin_revive)
|
||||
#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login" //sent when a mob/login() finishes: (client)
|
||||
|
||||
@@ -210,6 +210,17 @@
|
||||
|
||||
#define MAX_CHICKENS 50
|
||||
|
||||
///Flags used by the flags parameter of electrocute act.
|
||||
|
||||
///Makes it so that the shock doesn't take gloves into account.
|
||||
#define SHOCK_NOGLOVES (1 << 0)
|
||||
///Used when the shock is from a tesla bolt.
|
||||
#define SHOCK_TESLA (1 << 1)
|
||||
///Used when an illusion shocks something. Makes the shock deal stamina damage and not trigger certain secondary effects.
|
||||
#define SHOCK_ILLUSION (1 << 2)
|
||||
///The shock doesn't stun.
|
||||
#define SHOCK_NOSTUN (1 << 3)
|
||||
|
||||
|
||||
#define INCORPOREAL_MOVE_BASIC 1
|
||||
#define INCORPOREAL_MOVE_SHADOW 2 // leaves a trail of shadows
|
||||
|
||||
@@ -138,13 +138,13 @@
|
||||
name = "flux wave anomaly"
|
||||
icon_state = "electricity2"
|
||||
density = TRUE
|
||||
var/canshock = 0
|
||||
var/canshock = FALSE
|
||||
var/shockdamage = 20
|
||||
var/explosive = TRUE
|
||||
|
||||
/obj/effect/anomaly/flux/anomalyEffect()
|
||||
..()
|
||||
canshock = 1
|
||||
canshock = TRUE
|
||||
for(var/mob/living/M in range(0, src))
|
||||
mobShock(M)
|
||||
|
||||
@@ -159,18 +159,8 @@
|
||||
|
||||
/obj/effect/anomaly/flux/proc/mobShock(mob/living/M)
|
||||
if(canshock && istype(M))
|
||||
canshock = 0 //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
if(iscarbon(M))
|
||||
if(ishuman(M))
|
||||
M.electrocute_act(shockdamage, "[name]", safety=1)
|
||||
return
|
||||
M.electrocute_act(shockdamage, "[name]")
|
||||
return
|
||||
else
|
||||
M.adjustFireLoss(shockdamage)
|
||||
M.visible_message("<span class='danger'>[M] was shocked by \the [name]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>")
|
||||
canshock = FALSE //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
M.electrocute_act(shockdamage, "[name]", flags = SHOCK_NOGLOVES)
|
||||
|
||||
/obj/effect/anomaly/flux/detonate()
|
||||
if(explosive)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
if(scooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M)||ismonkey(M))
|
||||
M.electrocute_act(5, "[user]", safety = 1)
|
||||
M.electrocute_act(5, "[user]", flags = SHOCK_NOGLOVES)
|
||||
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
else
|
||||
|
||||
@@ -244,7 +244,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, tesla_shock = 1)
|
||||
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
|
||||
|
||||
/obj/proc/reset_shocked()
|
||||
obj_flags &= ~BEING_SHOCKED
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
if(!shockcd)
|
||||
if(ismob(user))
|
||||
var/mob/living/M = user
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
M.electrocute_act(15,"Energy Barrier", flags = SHOCK_NOGLOVES)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
@@ -201,6 +201,6 @@
|
||||
return
|
||||
|
||||
var/mob/living/M = AM
|
||||
M.electrocute_act(15,"Energy Barrier", safety=1)
|
||||
M.electrocute_act(15,"Energy Barrier", flags = SHOCK_NOGLOVES)
|
||||
shockcd = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cooldown), 5)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
icon_state = "trap-shock"
|
||||
|
||||
/obj/structure/trap/stun/trap_effect(mob/living/L)
|
||||
L.electrocute_act(30, src, safety=1) // electrocute act does a message.
|
||||
L.electrocute_act(30, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
|
||||
L.DefaultCombatKnockdown(100)
|
||||
|
||||
/obj/structure/trap/fire
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
/obj/structure/trap/cult/trap_effect(mob/living/L)
|
||||
to_chat(L, "<span class='danger'><B>With a crack, the hostile constructs come out of hiding, stunning you!</B></span>")
|
||||
L.electrocute_act(10, src, safety = TRUE) // electrocute act does a message.
|
||||
L.electrocute_act(10, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
|
||||
L.DefaultCombatKnockdown(20)
|
||||
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
||||
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
/mob/living/simple_animal/hostile/clockwork/ratvar_act()
|
||||
fully_heal(TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
/mob/living/simple_animal/hostile/clockwork/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
return 0 //ouch, my metal-unlikely-to-be-damaged-by-electricity-body
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/examine(mob/user)
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
continue
|
||||
L.Beam(M,icon_state="purple_lightning",time=5)
|
||||
if(!M.anti_magic_check(FALSE, TRUE))
|
||||
M.electrocute_act(shock_damage, L, safety=TRUE)
|
||||
M.electrocute_act(shock_damage, L, flags = SHOCK_NOGLOVES)
|
||||
do_sparks(4, FALSE, M)
|
||||
playsound(M, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
|
||||
|
||||
@@ -492,8 +492,8 @@
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
do_teleport(target, F, 0, channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
|
||||
if(!tesla_shock)
|
||||
/mob/living/simple_animal/hostile/swarmer/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
if(!(flags & SHOCK_TESLA))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -584,7 +584,7 @@
|
||||
var/mob/living/L = AM
|
||||
if(!istype(L, /mob/living/simple_animal/hostile/swarmer))
|
||||
playsound(loc,'sound/effects/snap.ogg',50, 1, -1)
|
||||
L.electrocute_act(0, src, 1, 1, 1)
|
||||
L.electrocute_act(0, src, 1, flags = SHOCK_NOGLOVES|SHOCK_ILLUSION)
|
||||
if(iscyborg(L))
|
||||
L.DefaultCombatKnockdown(100)
|
||||
qdel(src)
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
teleport_now.Remove(user)
|
||||
if(user.wear_suit == src)
|
||||
if(hard_landing)
|
||||
user.electrocute_act(35, src, safety = 1)
|
||||
user.electrocute_act(35, src, flags = SHOCK_NOGLOVES)
|
||||
user.DefaultCombatKnockdown(200)
|
||||
if(!silent)
|
||||
to_chat(user, "\nroot@ChronosuitMK4# chronowalk4 --stop\n")
|
||||
|
||||
@@ -250,14 +250,14 @@
|
||||
/datum/plant_gene/trait/cell_charge/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C)
|
||||
var/power = G.seed.potency*rate
|
||||
if(prob(power))
|
||||
C.electrocute_act(round(power), G, 1, 1)
|
||||
C.electrocute_act(round(power), G, 1, SHOCK_NOGLOVES)
|
||||
|
||||
/datum/plant_gene/trait/cell_charge/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
var/power = G.seed.potency*rate
|
||||
if(prob(power))
|
||||
C.electrocute_act(round(power), G, 1, 1)
|
||||
C.electrocute_act(round(power), G, 1, SHOCK_NOGLOVES)
|
||||
|
||||
/datum/plant_gene/trait/cell_charge/on_consume(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
|
||||
if(!G.reagents.total_volume)
|
||||
|
||||
@@ -238,19 +238,19 @@
|
||||
var/obj/item/organ/O = X
|
||||
O.emp_act(severity)
|
||||
|
||||
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(tesla_shock && (flags_1 & TESLA_IGNORE_1))
|
||||
/mob/living/carbon/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
if((flags & SHOCK_TESLA) && (flags_1 & TESLA_IGNORE_1))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
|
||||
return FALSE
|
||||
shock_damage *= siemens_coeff
|
||||
if(dna && dna.species)
|
||||
shock_damage *= dna.species.siemens_coeff
|
||||
if(shock_damage<1 && !override)
|
||||
if(shock_damage < 1)
|
||||
return 0
|
||||
if(reagents.has_reagent(/datum/reagent/teslium))
|
||||
shock_damage *= 1.5 //If the mob has teslium in their body, shocks are 50% more damaging!
|
||||
if(illusion)
|
||||
if((flags & SHOCK_ILLUSION))
|
||||
adjustStaminaLoss(shock_damage)
|
||||
else
|
||||
take_overall_damage(0,shock_damage)
|
||||
@@ -262,16 +262,13 @@
|
||||
jitteriness += 1000 //High numbers for violent convulsions
|
||||
do_jitter_animation(jitteriness)
|
||||
stuttering += 2
|
||||
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
|
||||
if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && (flags & SHOCK_NOSTUN))
|
||||
Stun(40)
|
||||
spawn(20)
|
||||
jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less
|
||||
if((!tesla_shock || (tesla_shock && siemens_coeff > 0.5)) && stun)
|
||||
if((!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && (flags & SHOCK_NOSTUN))
|
||||
DefaultCombatKnockdown(60)
|
||||
if(override)
|
||||
return override
|
||||
else
|
||||
return shock_damage
|
||||
return shock_damage
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if(on_fire)
|
||||
|
||||
@@ -397,8 +397,8 @@
|
||||
|
||||
|
||||
//Added a safety check in case you want to shock a human mob directly through electrocute_act.
|
||||
/mob/living/carbon/human/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(tesla_shock)
|
||||
/mob/living/carbon/human/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
if(flags & SHOCK_TESLA)
|
||||
var/total_coeff = 1
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
@@ -413,20 +413,20 @@
|
||||
siemens_coeff = total_coeff
|
||||
if(flags_1 & TESLA_IGNORE_1)
|
||||
siemens_coeff = 0
|
||||
else if(!safety)
|
||||
else if(!(flags & SHOCK_NOGLOVES))
|
||||
var/gloves_siemens_coeff = 1
|
||||
if(gloves)
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
gloves_siemens_coeff = G.siemens_coefficient
|
||||
siemens_coeff = gloves_siemens_coeff
|
||||
if(undergoing_cardiac_arrest() && !illusion)
|
||||
if(undergoing_cardiac_arrest() && !(flags & SHOCK_ILLUSION))
|
||||
if(shock_damage * siemens_coeff >= 1 && prob(25))
|
||||
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
|
||||
heart.beating = TRUE
|
||||
if(stat == CONSCIOUS)
|
||||
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
siemens_coeff *= physiology.siemens_coeff
|
||||
. = ..(shock_damage,source,siemens_coeff,safety,override,tesla_shock, illusion, stun)
|
||||
. = ..()
|
||||
if(.)
|
||||
electrocution_animation(40)
|
||||
|
||||
|
||||
@@ -427,14 +427,14 @@
|
||||
take_bodypart_damage(acidpwr * min(1, acid_volume * 0.1))
|
||||
return 1
|
||||
|
||||
/mob/living/proc/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage)
|
||||
if(tesla_shock && (flags_1 & TESLA_IGNORE_1))
|
||||
/mob/living/proc/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage, source, siemens_coeff, flags)
|
||||
if((flags & SHOCK_TESLA) && (flags_1 & TESLA_IGNORE_1))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
|
||||
return FALSE
|
||||
if(shock_damage > 0)
|
||||
if(!illusion)
|
||||
if(!(flags & SHOCK_ILLUSION))
|
||||
adjustFireLoss(shock_damage)
|
||||
visible_message(
|
||||
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
|
||||
|
||||
@@ -85,11 +85,11 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
/mob/living/silicon/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
if(buckled_mobs)
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
unbuckle_mob(M)
|
||||
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion, stun) //Hard metal shell conducts!
|
||||
M.electrocute_act(shock_damage/100, source, siemens_coeff, flags) //Hard metal shell conducts!
|
||||
return 0 //So borgs they don't die trying to fix wiring
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
/mob/living/simple_animal/hostile/construct/narsie_act()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
// Why would bees pay attention to drones?
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/drone/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
/mob/living/simple_animal/drone/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
|
||||
return 0 //So they don't die trying to fix wiring
|
||||
|
||||
/mob/living/simple_animal/drone/can_see_reagents()
|
||||
|
||||
@@ -275,7 +275,7 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa
|
||||
else
|
||||
var/mob/living/L = target
|
||||
L.attack_animal(src)
|
||||
L.electrocute_act(10, src, safety = TRUE) //safety = TRUE means we don't check gloves... Ok?
|
||||
L.electrocute_act(10, src, flags = SHOCK_NOGLOVES)
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -807,7 +807,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
. = zapdir
|
||||
|
||||
if(target_mob)
|
||||
target_mob.electrocute_act(rand(5,10), "Supermatter Discharge Bolt", 1, stun = 0)
|
||||
target_mob.electrocute_act(rand(5,10), "Supermatter Discharge Bolt", 1, SHOCK_NOSTUN)
|
||||
if(prob(15))
|
||||
supermatter_zap(target_mob, 5, power / 2)
|
||||
supermatter_zap(target_mob, 5, power / 2)
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
|
||||
else if(closest_mob)
|
||||
var/shock_damage = (tesla_flags & TESLA_MOB_DAMAGE)? (min(round(power/600), 90) + rand(-5, 5)) : 0
|
||||
closest_mob.electrocute_act(shock_damage, source, 1, tesla_shock = 1, stun = (tesla_flags & TESLA_MOB_STUN))
|
||||
closest_mob.electrocute_act(shock_damage, source, 1, SHOCK_TESLA | ((tesla_flags & TESLA_MOB_STUN) ? NONE : SHOCK_NOSTUN))
|
||||
if(issilicon(closest_mob))
|
||||
var/mob/living/silicon/S = closest_mob
|
||||
if((tesla_flags & TESLA_MOB_STUN) && (tesla_flags & TESLA_MOB_DAMAGE))
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
shock_timer++
|
||||
if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
|
||||
shock_timer = 0
|
||||
M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you
|
||||
M.electrocute_act(rand(5,20), "Teslium in their body", 1, SHOCK_NOGLOVES) //Override because it's caused from INSIDE of you
|
||||
playsound(M, "sparks", 50, 1)
|
||||
..()
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
rogue_types = list(/datum/nanite_program/toxic)
|
||||
|
||||
/datum/nanite_program/shocking/on_trigger(comm_message)
|
||||
host_mob.electrocute_act(rand(5,10), "shock nanites", TRUE, TRUE)
|
||||
host_mob.electrocute_act(rand(5,10), "shock nanites", 1, SHOCK_NOGLOVES)
|
||||
|
||||
/datum/nanite_program/stun
|
||||
name = "Neural Shock"
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, 1, -1)
|
||||
current.visible_message("<span class='warning'>[current] absorbs the spell, remaining unharmed!</span>", "<span class='userdanger'>You absorb the spell, remaining unharmed!</span>")
|
||||
if(bounces < 1)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt", flags = SHOCK_NOGLOVES)
|
||||
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, 1, -1)
|
||||
else
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
|
||||
current.electrocute_act(bolt_energy,"Lightning Bolt", flags = SHOCK_NOGLOVES)
|
||||
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, 1, -1)
|
||||
var/list/possible_targets = new
|
||||
for(var/mob/living/M in view_or_range(range,target,"view"))
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
if(isliving(hit_atom))
|
||||
var/mob/living/M = hit_atom
|
||||
if(!M.anti_magic_check())
|
||||
M.electrocute_act(80, src, illusion = 1)
|
||||
M.electrocute_act(80, src, SHOCK_ILLUSION)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/spellpacket/lightningbolt/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
|
||||
H.emote("scream")
|
||||
H.electrocute_act(25, (tool), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.electrocute_act(25, (tool), 1, SHOCK_ILLUSION)
|
||||
H.adjustFireLoss(10)
|
||||
H.emote("flip")
|
||||
H.Jitter(100)
|
||||
@@ -50,7 +50,7 @@
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(BR.organ_flags & ORGAN_FAILING)
|
||||
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, -5)
|
||||
H.electrocute_act(0, (tool), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.electrocute_act(0, (tool), 1, SHOCK_ILLUSION)
|
||||
//If we're using a defib, let the defib handle the revive.
|
||||
if(istype(tool, /obj/item/twohanded/shockpaddles))
|
||||
return
|
||||
@@ -70,7 +70,7 @@
|
||||
display_results(user, target, "<span class='warning'>You screw up, sending a current through their body!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>",
|
||||
"<span class='warning'>[user] screws up, causing [H] to flop around violently as they're zapped!</span>")
|
||||
H.electrocute_act(25, (tool), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
H.electrocute_act(25, (tool), 1, SHOCK_ILLUSION)
|
||||
H.adjustFireLoss(10)
|
||||
H.emote("flip")
|
||||
H.adjustOrganLoss(ORGAN_SLOT_HEART, 10)
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
var/datum/component/nanites/N = C.GetComponent(/datum/component/nanites)
|
||||
if(prob(5))
|
||||
to_chat(C, "<span class='warning'>The residual voltage from the nanites causes you to seize up!</b></span>")
|
||||
C.electrocute_act(10, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
C.electrocute_act(10, (get_turf(C)), 1, SHOCK_ILLUSION)
|
||||
if(prob(10))
|
||||
var/atom/T = C
|
||||
T.emp_act(EMP_HEAVY)
|
||||
@@ -218,7 +218,7 @@ datum/reagent/fermi/nanite_b_gone/reaction_obj(obj/O, reac_volume)
|
||||
/datum/reagent/fermi/nanite_b_goneTox/on_mob_life(mob/living/carbon/C)//Damages the taker if their purity is low. Extended use of impure chemicals will make the original die. (thus can't be spammed unless you've very good)
|
||||
if(prob(15))
|
||||
to_chat(C, "<span class='warning'>The residual voltage in your system causes you to seize up!</b></span>")
|
||||
C.electrocute_act(10, (get_turf(C)), 1, FALSE, FALSE, FALSE, TRUE)
|
||||
C.electrocute_act(10, (get_turf(C)), 1, SHOCK_ILLUSION)
|
||||
if(prob(50))
|
||||
var/atom/T = C
|
||||
T.emp_act(EMP_HEAVY)
|
||||
|
||||
Reference in New Issue
Block a user