diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 30c79798b2f..ea95f62af57 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -335,7 +335,7 @@ include_user = 1 var/blind_smoke_acquired var/screech_acquired - var/drainLifeAcquired + var/nullChargeAcquired var/reviveThrallAcquired action_icon_state = "collective_mind" @@ -370,10 +370,11 @@ It will create a choking cloud that will blind any non-thralls who enter.") target.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke(null)) - if(thralls >= CEILING(7 * ticker.mode.thrall_ratio, 1) && !drainLifeAcquired) - drainLifeAcquired = 1 - to_chat(target, "The power of your thralls has granted you the Drain Life ability. You can now drain the health of nearby humans to heal yourself.") - target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife(null)) + if(thralls >= CEILING(7 * ticker.mode.thrall_ratio, 1) && !nullChargeAcquired) + nullChargeAcquired = 1 + to_chat(user, "The power of your thralls has granted you the Null Charge ability. This ability will drain an APC's contents to the void, preventing it from recharging \ + or sending power until repaired.") + target.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/null_charge(null)) if(thralls >= CEILING(9 * ticker.mode.thrall_ratio, 1) && !reviveThrallAcquired) reviveThrallAcquired = 1 @@ -491,45 +492,57 @@ for(var/obj/structure/window/W in T.contents) W.take_damage(rand(80, 100)) -/obj/effect/proc_holder/spell/aoe_turf/drainLife - name = "Drain Life" - desc = "Damages nearby humans, draining their life and healing your own wounds." +/obj/effect/proc_holder/spell/aoe_turf/null_charge + name = "Null Charge" + desc = "Empties an APC, preventing it from recharging until fixed." panel = "Shadowling Abilities" - range = 3 - charge_max = 100 - clothes_req = 0 - var/targetsDrained - var/list/nearbyTargets - action_icon_state = "drain_life" + charge_max = 600 + clothes_req = FALSE + action_icon_state = "null_charge" -/obj/effect/proc_holder/spell/aoe_turf/drainLife/cast(list/targets, mob/user = usr) +/obj/effect/proc_holder/spell/aoe_turf/null_charge/cast(mob/user = usr) if(!shadowling_check(user)) charge_counter = charge_max return - var/mob/living/carbon/human/U = usr - targetsDrained = 0 - nearbyTargets = list() - for(var/turf/T in targets) - for(var/mob/living/carbon/M in T.contents) - if(M == src) - continue - targetsDrained++ - nearbyTargets.Add(M) - if(!targetsDrained) + + var/list/local_objs = view(1, user) + var/obj/machinery/power/apc/target_apc + for(var/object in local_objs) + if(istype(object, /obj/machinery/power/apc)) + target_apc = object + break + + if(!target_apc) + to_chat(user, "You must stand next to an APC to drain it!") charge_counter = charge_max - to_chat(U, "There were no nearby humans for you to drain.") return - for(var/mob/living/carbon/M in nearbyTargets) - U.heal_organ_damage(10, 10) - U.adjustToxLoss(-10) - U.adjustOxyLoss(-10) - U.adjustStaminaLoss(-20) - U.AdjustWeakened(-1) - U.AdjustStunned(-1) - M.adjustOxyLoss(20) - M.adjustStaminaLoss(20) - to_chat(M, "You feel a wave of exhaustion and a curious draining sensation directed towards [U]!") - to_chat(U, "You draw life from those around you to heal your wounds.") + + if(target_apc.cell?.charge == 0) + to_chat(user, "APC must have a power to drain!") + charge_counter = charge_max + return + + target_apc.operating = 0 + target_apc.update() + target_apc.update_icon() + target_apc.visible_message("The [target_apc] flickers and begins to grow dark.") + + to_chat(user, "You dim the APC's screen and carefully begin siphoning its power into the void.") + if(!do_after(user, 200, target=target_apc)) + //Whoops! The APC's powers back on + to_chat(user, "Your concentration breaks and the APC suddenly repowers!") + target_apc.operating = 1 + target_apc.update() + target_apc.update_icon() + target_apc.visible_message("The [target_apc] begins glowing brightly!") + else + //We did it! + to_chat(user, "You sent the APC's power to the void while overloading all it's lights!") + target_apc.cell?.charge = 0 //Sent to the shadow realm + target_apc.chargemode = 0 //Won't recharge either until an someone hits the button + target_apc.charging = 0 + target_apc.null_charge() + target_apc.update_icon() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 1f7af8e4204..b396849351c 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1352,6 +1352,11 @@ L.broken(0, 1) stoplag() +/obj/machinery/power/apc/proc/null_charge() + for(var/obj/machinery/light/L in area) + L.broken(0, 1) + stoplag() + /obj/machinery/power/apc/proc/setsubsystem(val) if(cell && cell.charge > 0) return (val==1) ? 0 : val diff --git a/icons/mob/actions/actions.dmi b/icons/mob/actions/actions.dmi index d21323c80b1..b4d8a34a6e0 100644 Binary files a/icons/mob/actions/actions.dmi and b/icons/mob/actions/actions.dmi differ