From 669ddb401cdb86fe8356ed17e63c531bd5bd705e Mon Sep 17 00:00:00 2001 From: ATH1909 <42606352+ATH1909@users.noreply.github.com> Date: Mon, 21 Oct 2019 05:33:27 -0500 Subject: [PATCH] bolts of resurrection kill the undead (#47170) * Update magic.dm * Update magic.dm * Update wand.dm * Update wand.dm * Update magic.dm * booleanization * bonus booleanization --- code/modules/projectiles/guns/magic/wand.dm | 29 +++++++++++----- code/modules/projectiles/projectile/magic.dm | 36 +++++++++++++------- 2 files changed, 45 insertions(+), 20 deletions(-) diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 41e42430d93..f20caee2232 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -67,11 +67,20 @@ /obj/item/gun/magic/wand/death/zap_self(mob/living/user) ..() - to_chat(user, "You irradiate yourself with pure energy! \ + charges-- + if(user.anti_magic_check()) + user.visible_message("[src] has no effect on [user]!") + return + if(isliving(user)) + var/mob/living/L = user + if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead + user.revive(full_heal = TRUE) + to_chat(user, "You feel great!") + return + to_chat(user, "You irradiate yourself with pure negative energy! \ [pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\ ") - user.adjustOxyLoss(500) - charges-- + user.death(0) /obj/item/gun/magic/wand/death/debug desc = "In some obscure circles, this is known as the 'cloning tester's friend'." @@ -99,11 +108,15 @@ if(user.anti_magic_check()) user.visible_message("[src] has no effect on [user]!") return - user.revive(full_heal = 1) - if(iscarbon(user)) - var/mob/living/carbon/C = user - C.regenerate_limbs() - C.regenerate_organs() + if(isliving(user)) + var/mob/living/L = user + if(L.mob_biotypes & MOB_UNDEAD) //positive energy harms the undead + to_chat(user, "You irradiate yourself with pure positive energy! \ + [pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\ + ") + user.death(0) + return + user.revive(full_heal = TRUE) to_chat(user, "You feel great!") /obj/item/gun/magic/wand/resurrection/debug //for testing diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 8bc0e407e36..a376b857e48 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -18,7 +18,20 @@ if(M.anti_magic_check()) M.visible_message("[src] vanishes on contact with [target]!") return BULLET_ACT_BLOCK - M.death(0) + if(isliving(M)) + var/mob/living/L = M + if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead + if(L.hellbound && L.stat == DEAD) + return BULLET_ACT_BLOCK + if(L.revive(full_heal = TRUE)) + L.grab_ghost(force = TRUE) // even suicides + to_chat(L, "You rise with a start, you're undead!!!") + else if(L.stat != DEAD) + to_chat(L, "You feel great!") + else + L.death(0) + else + M.death(0) /obj/projectile/magic/resurrection name = "bolt of resurrection" @@ -30,20 +43,19 @@ /obj/projectile/magic/resurrection/on_hit(mob/living/carbon/target) . = ..() if(isliving(target)) - if(target.hellbound) - return BULLET_ACT_BLOCK if(target.anti_magic_check()) target.visible_message("[src] vanishes on contact with [target]!") return BULLET_ACT_BLOCK - if(iscarbon(target)) - var/mob/living/carbon/C = target - C.regenerate_limbs() - C.regenerate_organs() - if(target.revive(full_heal = 1)) - target.grab_ghost(force = TRUE) // even suicides - to_chat(target, "You rise with a start, you're alive!!!") - else if(target.stat != DEAD) - to_chat(target, "You feel great!") + if(target.mob_biotypes & MOB_UNDEAD) //positive energy harms the undead + target.death(0) + else + if(target.hellbound && target.stat == DEAD) + return BULLET_ACT_BLOCK + if(target.revive(full_heal = TRUE)) + target.grab_ghost(force = TRUE) // even suicides + to_chat(target, "You rise with a start, you're alive!!!") + else if(target.stat != DEAD) + to_chat(target, "You feel great!") /obj/projectile/magic/teleport name = "bolt of teleportation"