diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm
index 2bfd0bf7d6..53861563fd 100644
--- a/code/game/gamemodes/changeling/powers/shriek.dm
+++ b/code/game/gamemodes/changeling/powers/shriek.dm
@@ -95,11 +95,15 @@
changeling.chem_charges -= 20
- var/range_heavy = 2
- var/range_light = 5
+ var/range_heavy = 1
+ var/range_med = 2
+ var/range_light = 4
+ var/range_long = 6
if(src.mind.changeling.recursive_enhancement)
range_heavy = range_heavy * 2
+ range_med = range_med * 2
range_light = range_light * 2
+ range_long = range_long * 2
src << "We are extra loud."
src.mind.changeling.recursive_enhancement = 0
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index ccf449a4dc..61f177eae5 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -231,7 +231,7 @@ var/list/sacrificed = list()
if(T)
T.hotspot_expose(700,125)
var/rune = src // detaching the proc - in theory
- empulse(U, (range_red - 2), range_red)
+ empulse(U, (range_red - 3), (range_red - 2), (range_red - 1), range_red)
qdel(rune)
return
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 0bed5bcf42..bd056f7c69 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -254,7 +254,7 @@
..()
// Best case scenario: Comparable to a low-yield EMP grenade.
// Worst case scenario: Comparable to a standard yield EMP grenade.
- empulse(src, rand(2, 4), rand(4, 10))
+ empulse(src, rand(1, 3), rand(2, 4), rand(3, 7), rand(5, 10))
//Station buster Tunguska
/obj/effect/meteor/tunguska
diff --git a/code/game/gamemodes/technomancer/instability.dm b/code/game/gamemodes/technomancer/instability.dm
index 4b04330b5b..fa9985b1b6 100644
--- a/code/game/gamemodes/technomancer/instability.dm
+++ b/code/game/gamemodes/technomancer/instability.dm
@@ -126,7 +126,7 @@
safe_blink(src, range = 6)
src << "You're teleported against your will!"
if(4)
- emp_act(2)
+ emp_act(3)
if(51 to 100) //Severe
rng = rand(0,3)
diff --git a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm
index 7c11bc000a..259aca4b57 100644
--- a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm
+++ b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm
@@ -23,7 +23,7 @@
..()
/obj/item/weapon/spell/spawner/pulsar/on_throw_cast(atom/hit_atom, mob/user)
- empulse(hit_atom, 1, 1, log=1)
+ empulse(hit_atom, 1, 1, 1, 1, log=1)
/obj/effect/temporary_effect/pulsar
name = "pulsar"
@@ -44,7 +44,7 @@
/obj/effect/temporary_effect/pulsar/proc/pulse_loop()
while(pulses_remaining)
sleep(2 SECONDS)
- empulse(src, heavy_range = 1, light_range = 2, log = 1)
+ empulse(src, 1, 1, 2, 2, log = 1)
pulses_remaining--
qdel(src)
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 0a568b4ade..408e3184d4 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -66,7 +66,11 @@
if(1)
num_of_prizes = rand(1,4)
if(2)
+ num_of_prizes = rand(1,3)
+ if(3)
num_of_prizes = rand(0,2)
+ if(4)
+ num_of_prizes = rand(0,1)
for(num_of_prizes; num_of_prizes > 0; num_of_prizes--)
empprize = pickweight(prizes)
new empprize(src.loc)
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index a378f0ff35..595712afd3 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -441,7 +441,7 @@ var/list/turret_icons
else
take_damage(initial(health) * 8) //should instakill most turrets
if(3)
- take_damage(initial(health) * 8 / 3)
+ take_damage(initial(health) * 8 / 3) //Level 4 is too weak to bother turrets
/obj/machinery/porta_turret/proc/die() //called when the turret dies, ie, health <= 0
health = 0
diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm
index e9dbd93edf..a6da9bfa00 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/game/mecha/mecha_control_console.dm
@@ -105,7 +105,7 @@
proc/shock()
var/obj/mecha/M = in_mecha()
if(M)
- M.emp_act(2)
+ M.emp_act(4)
qdel(src)
proc/get_mecha_log()
diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm
index c1df6b5454..3b1a3b54f5 100644
--- a/code/game/objects/empulse.dm
+++ b/code/game/objects/empulse.dm
@@ -4,17 +4,17 @@
// #define EMPDEBUG 10
-proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
+proc/empulse(turf/epicenter, first_range, second_range, third_range, fourth_range, log=0)
if(!epicenter) return
if(!istype(epicenter, /turf))
epicenter = get_turf(epicenter.loc)
if(log)
- message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
- log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
+ message_admins("EMP with size ([first_range], [second_range], [third_range], [fourth_range]) in area [epicenter.loc.name] ")
+ log_game("EMP with size ([first_range], [second_range], [third_range], [fourth_range]) in area [epicenter.loc.name] ")
- if(heavy_range > 1)
+ if(first_range > 1)
var/obj/effect/overlay/pulse = PoolOrNew(/obj/effect/overlay, epicenter)
pulse.icon = 'icons/effects/effects.dmi'
pulse.icon_state = "emppulse"
@@ -23,28 +23,50 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
spawn(20)
qdel(pulse)
- if(heavy_range > light_range)
- light_range = heavy_range
+ if(first_range > second_range)
+ second_range = first_range
+ if(second_range > third_range)
+ third_range = second_range
+ if(third_range > fourth_range)
+ fourth_range = third_range
- for(var/mob/M in range(heavy_range, epicenter))
+ for(var/mob/M in range(first_range, epicenter))
M << 'sound/effects/EMPulse.ogg'
- for(var/atom/T in range(light_range, epicenter))
+ for(var/atom/T in range(fourth_range, epicenter))
#ifdef EMPDEBUG
var/time = world.timeofday
#endif
var/distance = get_dist(epicenter, T)
if(distance < 0)
distance = 0
- if(distance < heavy_range)
+ //Worst effects, really hurts
+ if(distance < first_range)
T.emp_act(1)
- else if(distance == heavy_range)
+ else if(distance == first_range)
if(prob(50))
T.emp_act(1)
else
T.emp_act(2)
- else if(distance <= light_range)
+ //Slightly less painful
+ else if(distance <= second_range)
T.emp_act(2)
+ else if(distance == second_range)
+ if(prob(50))
+ T.emp_act(2)
+ else
+ T.emp_act(3)
+ //Even less slightly less painful
+ else if(distance <= third_range)
+ T.emp_act(3)
+ else if(distance == third_range)
+ if(prob(50))
+ T.emp_act(2)
+ else
+ T.emp_act(3)
+ //This should be more or less harmless
+ else if(distance <= fourth_range)
+ T.emp_act(4)
#ifdef EMPDEBUG
if((world.timeofday - time) >= EMPDEBUG)
log_and_message_admins("EMPDEBUG: [T.name] - [T.type] - took [world.timeofday - time]ds to process emp_act()!")
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index e72b4ba484..ef37af91c2 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -998,7 +998,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
M.apply_damage( rand(30,60) , BURN)
message += "You feel a searing heat! Your [P] is burning!"
if(i>=20 && i<=25) //EMP
- empulse(P.loc, 3, 6, 1)
+ empulse(P.loc, 1, 2, 4, 6, 1)
message += "Your [P] emits a wave of electromagnetic energy!"
if(i>=25 && i<=40) //Smoke
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem
diff --git a/code/game/objects/items/weapons/grenades/emgrenade.dm b/code/game/objects/items/weapons/grenades/emgrenade.dm
index dd1d6a55b0..8f4cd48e2c 100644
--- a/code/game/objects/items/weapons/grenades/emgrenade.dm
+++ b/code/game/objects/items/weapons/grenades/emgrenade.dm
@@ -3,12 +3,14 @@
icon_state = "emp"
item_state = "empgrenade"
origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 3)
- var/emp_heavy = 4
- var/emp_light = 10
+ var/emp_heavy = 2
+ var/emp_med = 4
+ var/emp_light = 7
+ var/emp_long = 10
prime()
..()
- if(empulse(src, emp_heavy, emp_light))
+ if(empulse(src, emp_heavy, emp_med, emp_light, emp_long))
qdel(src)
return
@@ -18,4 +20,6 @@
icon_state = "lyemp"
origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 3)
emp_heavy = 1
- emp_light = 4
\ No newline at end of file
+ emp_med = 2
+ emp_light = 3
+ emp_long = 4
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 4407e29c72..c3ddb4fb39 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -101,6 +101,10 @@ Implant Specifics:
"}
meltdown()
if(2)
delay = rand(5*60*10,15*60*10) //from 5 to 15 minutes of free time
+ if(3)
+ delay = rand(2*60*10,5*60*10) //from 2 to 5 minutes of free time
+ if(4)
+ delay = rand(0.5*60*10,1*60*10) //from .5 to 1 minutes of free time
spawn(delay)
malfunction--
@@ -227,10 +231,22 @@ Implant Specifics:
"}
return
malfunction = MALFUNCTION_TEMPORARY
switch (severity)
- if (2.0) //Weak EMP will make implant tear limbs off.
+ if (4) //Weak EMP will make implant tear limbs off.
+ if (prob(25))
+ small_boom()
+ if (3) //Weak EMP will make implant tear limbs off.
if (prob(50))
small_boom()
- if (1.0) //strong EMP will melt implant either making it go off, or disarming it
+ if (2) //strong EMP will melt implant either making it go off, or disarming it
+ if (prob(70))
+ if (prob(75))
+ small_boom()
+ else
+ if (prob(13))
+ activate() //chance of bye bye
+ else
+ meltdown() //chance of implant disarming
+ if (1) //strong EMP will melt implant either making it go off, or disarming it
if (prob(70))
if (prob(50))
small_boom()
@@ -320,7 +336,13 @@ the implant may become unstable and either pre-maturely inject the subject or si
if(prob(60))
activate(20)
if(2)
- if(prob(30))
+ if(prob(40))
+ activate(20)
+ if(3)
+ if(prob(40))
+ activate(5)
+ if(4)
+ if(prob(20))
activate(5)
spawn(20)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index d94535918f..6566f5da3e 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -637,14 +637,18 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
if(heavy == null) return
+ var/med = input("Range of medium pulse.", text("Input")) as num|null
+ if(med == null) return
var/light = input("Range of light pulse.", text("Input")) as num|null
if(light == null) return
+ var/long = input("Range of long pulse.", text("Input")) as num|null
+ if(long == null) return
- if (heavy || light)
+ if (heavy || med || light || long)
- empulse(O, heavy, light)
- log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
- message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[light]) at ([O.x],[O.y],[O.z])", 1)
+ empulse(O, heavy, med, light, long)
+ log_admin("[key_name(usr)] created an EM Pulse ([heavy],[med],[light],[long]) at ([O.x],[O.y],[O.z])")
+ message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[med],[light],[long]) at ([O.x],[O.y],[O.z])", 1)
feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 39f437f93a..3783a5c208 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -199,10 +199,7 @@
/obj/item/clothing/gloves/emp_act(severity)
if(cell)
- //why is this not part of the powercell code?
- cell.charge -= 1000 / severity
- if (cell.charge < 0)
- cell.charge = 0
+ cell.emp_act(severity)
..()
// Called just before an attack_hand(), in mob/UnarmedAttack()
diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm
index 8060e328ee..e74d6dab90 100644
--- a/code/modules/mob/living/carbon/brain/MMI.dm
+++ b/code/modules/mob/living/carbon/brain/MMI.dm
@@ -164,7 +164,9 @@
if(2)
brainmob.emp_damage += rand(10,20)
if(3)
- brainmob.emp_damage += rand(0,10)
+ brainmob.emp_damage += rand(5,10)
+ if(4)
+ brainmob.emp_damage += rand(0,5)
..()
/obj/item/device/mmi/digital
@@ -216,7 +218,9 @@
if(2)
src.brainmob.emp_damage += rand(10,20)
if(3)
- src.brainmob.emp_damage += rand(0,10)
+ src.brainmob.emp_damage += rand(5,10)
+ if(4)
+ src.brainmob.emp_damage += rand(0,5)
..()
/obj/item/device/mmi/digital/transfer_identity(var/mob/living/carbon/H)
diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm
index 057c24bdcc..9452337eeb 100644
--- a/code/modules/mob/living/carbon/brain/posibrain.dm
+++ b/code/modules/mob/living/carbon/brain/posibrain.dm
@@ -112,7 +112,9 @@
if(2)
src.brainmob.emp_damage += rand(10,20)
if(3)
- src.brainmob.emp_damage += rand(0,10)
+ src.brainmob.emp_damage += rand(5,10)
+ if(4)
+ src.brainmob.emp_damage += rand(0,5)
..()
/obj/item/device/mmi/digital/posibrain/New()
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index f84021b26a..738e996967 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -65,7 +65,13 @@
src.take_organ_damage(0,20,emp=1)
confused = (min(confused + 5, 30))
if(2)
+ src.take_organ_damage(0,15,emp=1)
+ confused = (min(confused + 4, 30))
+ if(3)
src.take_organ_damage(0,10,emp=1)
+ confused = (min(confused + 3, 30))
+ if(4)
+ src.take_organ_damage(0,5,emp=1)
confused = (min(confused + 2, 30))
flash_eyes(affect_silicon = 1)
src << "*BZZZT*"
diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm
index fd6957aad4..30a80b6599 100644
--- a/code/modules/organs/organ.dm
+++ b/code/modules/organs/organ.dm
@@ -281,9 +281,13 @@ var/list/organ_cache = list()
return
switch (severity)
if (1)
- take_damage(5)
+ take_damage(rand(6,12))
if (2)
- take_damage(2)
+ take_damage(rand(4,8))
+ if (3)
+ take_damage(rand(3,6))
+ if (4)
+ take_damage(rand(1,4))
/obj/item/organ/proc/removed(var/mob/living/user)
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 7f755a4dff..b746f1be6f 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -102,11 +102,19 @@
/obj/item/organ/external/emp_act(severity)
if(!(robotic >= ORGAN_ROBOT))
return
+ var/burn_damage = 0
switch (severity)
if (1)
- take_damage(8)
+ burn_damage += rand(8, 13)
if (2)
- take_damage(4)
+ burn_damage += rand(6, 9)
+ if(3)
+ burn_damage += rand(4, 7)
+ if(4)
+ burn_damage += rand(1, 5)
+
+ if(burn_damage)
+ take_damage(0, burn_damage)
/obj/item/organ/external/attack_self(var/mob/living/user)
if(!contents.len)
@@ -243,12 +251,12 @@
return (vital || (robotic >= ORGAN_ROBOT) || brute_dam + burn_dam + additional_damage < max_damage)
/obj/item/organ/external/take_damage(brute, burn, sharp, edge, used_weapon = null, list/forbidden_limbs = list())
+ brute = round(brute * brute_mod, 0.1)
+ burn = round(burn * burn_mod, 0.1)
+
if((brute <= 0) && (burn <= 0))
return 0
- brute *= brute_mod
- burn *= burn_mod
-
// High brute damage or sharp objects may damage internal organs
if(internal_organs && (brute_dam >= max_damage || (((sharp && brute >= 5) || brute >= 10) && prob(5))))
// Damage an internal organ
diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm
index 8c7af58346..c1defc1c75 100644
--- a/code/modules/power/antimatter/control.dm
+++ b/code/modules/power/antimatter/control.dm
@@ -97,6 +97,12 @@
if(2)
if(active) toggle_power()
stability -= rand(10,20)
+ if(3)
+ if(active) toggle_power()
+ stability -= rand(8,15)
+ if(4)
+ if(active) toggle_power()
+ stability -= rand(5,10)
..()
return 0
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 184a1731f5..72fbccaa57 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1193,22 +1193,27 @@ obj/machinery/power/apc/proc/autoset(var/cur_state, var/on)
/obj/machinery/power/apc/ex_act(severity)
switch(severity)
- if(1.0)
+ if(1)
//set_broken() //now qdel() do what we need
if (cell)
- cell.ex_act(1.0) // more lags woohoo
+ cell.ex_act(1) // more lags woohoo
qdel(src)
return
- if(2.0)
+ if(2)
+ if (prob(75))
+ set_broken()
+ if (cell && prob(50))
+ cell.ex_act(2)
+ if(3)
if (prob(50))
set_broken()
if (cell && prob(50))
- cell.ex_act(2.0)
- if(3.0)
+ cell.ex_act(3)
+ if(4)
if (prob(25))
set_broken()
- if (cell && prob(25))
- cell.ex_act(3.0)
+ if (cell && prob(50))
+ cell.ex_act(3)
return
/obj/machinery/power/apc/disconnect_terminal()
diff --git a/code/modules/power/batteryrack.dm b/code/modules/power/batteryrack.dm
index 203227e613..56e2a485ca 100644
--- a/code/modules/power/batteryrack.dm
+++ b/code/modules/power/batteryrack.dm
@@ -165,7 +165,7 @@
return
if (overcharge_percent >= 140)
if (prob(1))
- empulse(src.loc, 3, 8, 1)
+ empulse(src.loc, 2, 3, 6, 8, 1)
if ((2.4e6+1) to 3.6e6)
if (overcharge_percent >= 115)
if (prob(7))
@@ -174,7 +174,7 @@
return
if (overcharge_percent >= 130)
if (prob(1))
- empulse(src.loc, 3, 8, 1)
+ empulse(src.loc, 2, 3, 6, 8, 1)
if (overcharge_percent >= 150)
if (prob(1))
explosion(src.loc, 0, 1, 3, 5)
@@ -186,7 +186,7 @@
return
if (overcharge_percent >= 125)
if (prob(2))
- empulse(src.loc, 4, 10, 1)
+ empulse(src.loc, 2, 4, 7, 10, 1)
if (overcharge_percent >= 140)
if (prob(1))
explosion(src.loc, 1, 3, 5, 8)
diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm
index 01e394cf91..f900f6fcf4 100644
--- a/code/modules/power/port_gen.dm
+++ b/code/modules/power/port_gen.dm
@@ -62,9 +62,12 @@
stat &= BROKEN
if(prob(75)) explode()
if(2)
- if(prob(25)) stat &= BROKEN
+ if(prob(50)) stat &= BROKEN
if(prob(10)) explode()
if(3)
+ if(prob(25)) stat &= BROKEN
+ duration = 300
+ if(4)
if(prob(10)) stat &= BROKEN
duration = 300
diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm
index ecdfc0841e..7e0941ce75 100644
--- a/code/modules/power/singularity/singularity.dm
+++ b/code/modules/power/singularity/singularity.dm
@@ -441,9 +441,9 @@
/obj/singularity/proc/emp_area()
if(current_size != 11)
- empulse(src, 8, 10)
+ empulse(src, 4, 6, 8, 10)
else
- empulse(src, 12, 16)
+ empulse(src, 12, 14, 16, 18)
/obj/singularity/proc/smwave()
for(var/mob/living/M in view(10, src.loc))
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index f943d57dd1..61d5374cad 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -393,10 +393,14 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
- if(prob(50))
+ if(prob(25))
emp_act(1)
- else
+ else if(prob(25))
emp_act(2)
+ else if(prob(25))
+ emp_act(3)
+ else
+ emp_act(4)
if(prob(5)) //smoke only
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
smoke.set_up(3, 0, src.loc)
diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm
index 2f0fe9419d..c71f0e35e7 100644
--- a/code/modules/power/smes_construction.dm
+++ b/code/modules/power/smes_construction.dm
@@ -212,7 +212,7 @@
h_user.adjustFireLoss(rand(10,25))
h_user.Paralyse(5)
spawn(0)
- empulse(src.loc, 2, 4)
+ empulse(src.loc, 1, 2, 3, 4)
charge = 0
if (36 to 60)
@@ -229,7 +229,7 @@
h_user.adjustFireLoss(rand(35,75))
h_user.Paralyse(12)
spawn(0)
- empulse(src.loc, 8, 16)
+ empulse(src.loc, 6, 8, 12, 16)
charge = 0
apcs_overload(1, 10)
src.ping("Caution. Output regulators malfunction. Uncontrolled discharge detected.")
diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm
index 2ca770dff5..ae55edeb00 100644
--- a/code/modules/projectiles/ammunition/boxes.dm
+++ b/code/modules/projectiles/ammunition/boxes.dm
@@ -26,6 +26,10 @@
name = "speedloader (.38 rubber)"
ammo_type = /obj/item/ammo_casing/c38r
+/obj/item/ammo_magazine/c38/emp
+ name = "ammunition box (.38 haywire)"
+ ammo_type = /obj/item/ammo_casing/c38/emp
+
///////// .45 /////////
/obj/item/ammo_magazine/c45m
@@ -57,6 +61,10 @@
name = "magazine (.45 AP)"
ammo_type = /obj/item/ammo_casing/c45ap
+/obj/item/ammo_magazine/box/emp/c45
+ name = "ammunition box (.45 haywire)"
+ ammo_type = /obj/item/ammo_casing/c45/emp
+
/obj/item/ammo_magazine/c45uzi
name = "stick magazine (.45)"
icon_state = "uzi45"
@@ -272,6 +280,10 @@
max_ammo = 9
multiple_sprites = 1
+/obj/item/ammo_magazine/box/emp/a10mm
+ name = "ammunition box (10mm haywire)"
+ ammo_type = /obj/item/ammo_casing/a10mm/emp
+
///////// 5.56mm /////////
/obj/item/ammo_magazine/a556
diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm
index 2fca9a3ffd..ace4cb1fb8 100644
--- a/code/modules/projectiles/ammunition/bullets.dm
+++ b/code/modules/projectiles/ammunition/bullets.dm
@@ -24,6 +24,13 @@
icon_state = "r-casing"
projectile_type = /obj/item/projectile/bullet/pistol/rubber
+/obj/item/ammo_casing/c38/emp
+ name = ".38 haywire round"
+ desc = "A .38 bullet casing fitted with a single-use ion pulse generator."
+ icon_state = "empcasing"
+ projectile_type = /obj/item/projectile/ion/small
+ matter = list(DEFAULT_WALL_MATERIAL = 130, "uranium" = 100)
+
/obj/item/ammo_casing/c9mm
desc = "A 9mm bullet casing."
caliber = "9mm"
@@ -87,11 +94,24 @@
icon_state = "r-casing"
projectile_type = /obj/item/projectile/energy/flash
+/obj/item/ammo_casing/c45/emp
+ name = ".45 haywire round"
+ desc = "A .45 bullet casing fitted with a single-use ion pulse generator."
+ projectile_type = /obj/item/projectile/ion/small
+ icon_state = "empcasing"
+ matter = list(DEFAULT_WALL_MATERIAL = 130, "uranium" = 100)
+
/obj/item/ammo_casing/a10mm
desc = "A 10mm bullet casing."
caliber = "10mm"
projectile_type = /obj/item/projectile/bullet/pistol/medium
+/obj/item/ammo_casing/a10mm/emp
+ name = "10mm haywire round"
+ desc = "A 10mm bullet casing fitted with a single-use ion pulse generator."
+ projectile_type = /obj/item/projectile/ion/small
+ icon_state = "empcasing"
+ matter = list(DEFAULT_WALL_MATERIAL = 130, "uranium" = 100)
/obj/item/ammo_casing/shotgun
name = "shotgun slug"
@@ -150,13 +170,13 @@
projectile_type = /obj/item/projectile/energy/flash/flare
matter = list(DEFAULT_WALL_MATERIAL = 90, "glass" = 90)
-
/obj/item/ammo_casing/shotgun/emp
name = "ion shell"
desc = "An advanced shotgun round that creates a small EMP when it strikes a target."
icon_state = "empshell"
- projectile_type = /obj/item/projectile/bullet/shotgun/ion
- matter = list(DEFAULT_WALL_MATERIAL = 360, "glass" = 720)
+ projectile_type = /obj/item/projectile/ion
+// projectile_type = /obj/item/projectile/bullet/shotgun/ion
+ matter = list(DEFAULT_WALL_MATERIAL = 360, "uranium" = 240)
/obj/item/ammo_casing/a762
desc = "A 7.62mm bullet casing."
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index 4443775df5..faafd2e8c9 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -12,14 +12,18 @@
projectile_type = /obj/item/projectile/ion
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
- ..(max(severity, 2)) //so it doesn't EMP itself, I guess
+ ..(max(severity, 4)) //so it doesn't EMP itself, I guess
-/obj/item/weapon/gun/energy/ionrifle/update_icon()
- ..()
- if(power_supply.charge < charge_cost)
- item_state = "ionrifle0"
- else
- item_state = initial(item_state)
+/obj/item/weapon/gun/energy/ionrifle/pistol
+ name = "ion pistol"
+ desc = "The NT Mk63 EW Pan is a man portable anti-armor weapon designed to disable mechanical threats, produced by NT. This model sacrifices capacity for portability.."
+ icon_state = "ionpistol"
+ item_state = null
+ w_class = ITEMSIZE_NORMAL
+ force = 5
+ slot_flags = SLOT_BELT
+ charge_cost = 480
+ projectile_type = /obj/item/projectile/ion
/obj/item/weapon/gun/energy/decloner
name = "biological demolecularisor"
diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm
index 7de8e7b877..1e95f4a213 100644
--- a/code/modules/projectiles/guns/projectile/revolver.dm
+++ b/code/modules/projectiles/guns/projectile/revolver.dm
@@ -76,6 +76,10 @@
fire_sound = 'sound/weapons/Gunshot_light.ogg'
ammo_type = /obj/item/ammo_casing/c38
+/obj/item/weapon/gun/projectile/revolver/deckard/emp
+ ammo_type = /obj/item/ammo_casing/c38/emp
+
+
/obj/item/weapon/gun/projectile/revolver/deckard/update_icon()
..()
if(loaded.len)
diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm
index 29d130612f..f87f726bf3 100644
--- a/code/modules/projectiles/projectile/bullets.dm
+++ b/code/modules/projectiles/projectile/bullets.dm
@@ -172,7 +172,8 @@
range_step = 1
spread_step = 10
-//EMP shotgun 'slug', it's basically a beanbag that pops a tiny emp when it hits.
+
+//EMP shotgun 'slug', it's basically a beanbag that pops a tiny emp when it hits. //Not currently used
/obj/item/projectile/bullet/shotgun/ion
name = "ion slug"
damage = 15
@@ -182,9 +183,10 @@
/obj/item/projectile/bullet/shotgun/ion/on_hit(var/atom/target, var/blocked = 0)
..()
- empulse(target, 0, 0) //Only affects what it hits
+ empulse(target, 0, 0, 0, 0) //Only affects what it hits
return 1
+
/* "Rifle" rounds */
/obj/item/projectile/bullet/rifle
diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm
index 8aba3c0928..b507afc316 100644
--- a/code/modules/projectiles/projectile/special.dm
+++ b/code/modules/projectiles/projectile/special.dm
@@ -8,12 +8,16 @@
light_range = 2
light_power = 0.5
light_color = "#55AAFF"
+ var/pulse_range = 1
on_hit(var/atom/target, var/blocked = 0)
- empulse(target, 1, 1)
+ empulse(target, pulse_range, pulse_range, pulse_range, pulse_range)
return 1
+/obj/item/projectile/ion/small
+ pulse_range = 0
+
/obj/item/projectile/bullet/gyro
name ="explosive bolt"
icon_state= "bolter"
diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm
index 4d7d13e5b3..1c5e2bfead 100644
--- a/code/modules/reagents/Chemistry-Recipes.dm
+++ b/code/modules/reagents/Chemistry-Recipes.dm
@@ -652,7 +652,7 @@
var/location = get_turf(holder.my_atom)
// 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes.
// 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades.
- empulse(location, round(created_volume / 24), round(created_volume / 14), 1)
+ empulse(location, round(created_volume / 24), round(created_volume / 20), round(created_volume / 18), round(created_volume / 14), 1)
holder.clear_reagents()
return
diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm
index 9e8a752122..3690a1f2ba 100644
--- a/code/modules/shieldgen/emergency_shield.dm
+++ b/code/modules/shieldgen/emergency_shield.dm
@@ -84,8 +84,14 @@
if(1)
qdel(src)
if(2)
+ if(prob(75))
+ qdel(src)
+ if(3)
if(prob(50))
qdel(src)
+ if(4)
+ if(prob(25))
+ qdel(src)
/obj/machinery/shield/hitby(AM as mob|obj)
@@ -264,7 +270,7 @@
else
user << "The device must first be secured to the floor."
return
-
+
/obj/machinery/shieldgen/emag_act(var/remaining_charges, var/mob/user)
if(!malfunction)
malfunction = 1
diff --git a/code/modules/spells/aoe_turf/disable_tech.dm b/code/modules/spells/aoe_turf/disable_tech.dm
index 5192ecb664..9acbf95369 100644
--- a/code/modules/spells/aoe_turf/disable_tech.dm
+++ b/code/modules/spells/aoe_turf/disable_tech.dm
@@ -11,13 +11,15 @@
cooldown_min = 200 //50 deciseconds reduction per rank
- var/emp_heavy = 6
- var/emp_light = 10
+ var/emp_heavy = 3
+ var/emp_med = 5
+ var/emp_light = 8
+ var/emp_long = 10
hud_state = "wiz_tech"
/spell/aoe_turf/disable_tech/cast(list/targets)
for(var/turf/target in targets)
- empulse(get_turf(target), emp_heavy, emp_light)
+ empulse(get_turf(target), emp_heavy, emp_med, emp_light, emp_long)
return
\ No newline at end of file
diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm
index 34923745a4..a28f03e8fe 100644
--- a/code/modules/spells/spellbook.dm
+++ b/code/modules/spells/spellbook.dm
@@ -432,4 +432,4 @@
/obj/item/weapon/spellbook/oneuse/charge/recoil(mob/user as mob)
..()
user <<"[src] suddenly feels very warm!"
- empulse(src, 1, 1)
+ empulse(src, 1, 1, 1, 1)
diff --git a/code/modules/xenoarcheaology/effects/emp.dm b/code/modules/xenoarcheaology/effects/emp.dm
index d6d402efe4..fd30420b57 100644
--- a/code/modules/xenoarcheaology/effects/emp.dm
+++ b/code/modules/xenoarcheaology/effects/emp.dm
@@ -9,5 +9,5 @@
/datum/artifact_effect/emp/DoEffectPulse()
if(holder)
var/turf/T = get_turf(holder)
- empulse(T, effectrange/2, effectrange)
+ empulse(T, effectrange/4, effectrange/3, effectrange/2, effectrange)
return 1
diff --git a/html/changelogs/Anewbe - EMP.yml b/html/changelogs/Anewbe - EMP.yml
new file mode 100644
index 0000000000..10e64aaee2
--- /dev/null
+++ b/html/changelogs/Anewbe - EMP.yml
@@ -0,0 +1,38 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+#################################
+
+# Your name.
+author: Anewbe
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - rscadd: "Added an ion pistol, has five shots."
+ - rscadd: "Added Bay's Haywire rounds."
+ - tweak: "EMP now works on four levels, instead of two."
\ No newline at end of file
diff --git a/icons/mob/items/lefthand_guns.dmi b/icons/mob/items/lefthand_guns.dmi
index 140f573f69..ff49dc5577 100644
Binary files a/icons/mob/items/lefthand_guns.dmi and b/icons/mob/items/lefthand_guns.dmi differ
diff --git a/icons/mob/items/righthand_guns.dmi b/icons/mob/items/righthand_guns.dmi
index 192798733f..44521ed36e 100644
Binary files a/icons/mob/items/righthand_guns.dmi and b/icons/mob/items/righthand_guns.dmi differ
diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi
index a129056404..a1f1fb20eb 100644
Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ
diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi
index 09fb9b6b7a..c1410bfcd4 100644
Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ