diff --git a/code/modules/mob/living/simple_animal/revenant/revenant.dm b/code/modules/mob/living/simple_animal/revenant/revenant.dm index 29e528f7f68..07b181ca4dc 100644 --- a/code/modules/mob/living/simple_animal/revenant/revenant.dm +++ b/code/modules/mob/living/simple_animal/revenant/revenant.dm @@ -101,11 +101,11 @@ update_spooky_icon() /mob/living/simple_animal/revenant/proc/update_spooky_icon() - if(unreveal_time) + if(revealed) if(draining) icon_state = "revenant_draining" return - if(unstun_time) + if(notransform) icon_state = "revenant_stun" return icon_state = "revenant_revealed" @@ -183,7 +183,7 @@ reveal(46) stun(46) target.visible_message("[target] suddenly rises slightly into the air, their skin turning an ashy gray.") - target.Beam(src,icon_state="drain_life",icon='icons/effects/effects.dmi',time=44) + Beam(target,icon_state="drain_life",icon='icons/effects/effects.dmi',time=44) if(do_after(src, 50, 15, 0, target)) //As one cannot prove the existance of ghosts, ghosts cannot prove the existance of the target they were draining. change_essence_amount(essence_drained, 0, target) if(essence_drained <= 90 && target.stat != DEAD) @@ -261,6 +261,7 @@ AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/defile(null)) AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/overload(null)) AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction(null)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/revenant/blight(null)) /mob/living/simple_animal/revenant/death() diff --git a/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm b/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm index 2b6fe4ff833..d0d58fd61a9 100644 --- a/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm +++ b/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm @@ -17,7 +17,7 @@ if(!msg) charge_counter = charge_max return - usr << "You transmit to [M]: [msg]" + user << "You transmit to [M]: [msg]" M << "An alien voice resonates from all around... [msg]" @@ -40,6 +40,10 @@ name = "[initial(name)] ([cast_amount]E)" /obj/effect/proc_holder/spell/aoe_turf/revenant/can_cast(mob/living/simple_animal/revenant/user = usr) + if(!istype(user)) //Badmins, no. Badmins, don't do it. + if(charge_counter < charge_max) + return 0 + return 1 if(user.inhibited) return 0 if(charge_counter < charge_max) @@ -52,6 +56,12 @@ return 1 /obj/effect/proc_holder/spell/aoe_turf/revenant/proc/attempt_cast(mob/living/simple_animal/revenant/user = usr) + if(!istype(user)) //If you're not a revenant, it works. Please, please, please don't give this to a non-revenant. + name = "[initial(name)]" + if(locked) + panel = "Revenant Abilities" + locked = 0 + return 1 if(locked) if(!user.castcheck(-unlock_amount)) charge_counter = charge_max @@ -78,7 +88,7 @@ charge_max = 200 range = 5 stun = 30 - cast_amount = 45 + cast_amount = 40 var/shock_range = 2 var/shock_damage = 18 action_icon_state = "overload_lights" @@ -102,8 +112,8 @@ flick("[L.base_state]2", L) for(var/mob/living/carbon/human/M in view(shock_range, L)) if(M == user) - return - M.Beam(L,icon_state="purple_lightning",icon='icons/effects/effects.dmi',time=5) + continue + L.Beam(M,icon_state="purple_lightning",icon='icons/effects/effects.dmi',time=5) M.electrocute_act(shock_damage, "[L.name]", safety=1) var/datum/effect_system/spark_spread/z = new /datum/effect_system/spark_spread z.set_up(4, 0, M) @@ -116,12 +126,10 @@ desc = "Twists and corrupts the nearby area as well as dispelling holy auras on floors." charge_max = 150 range = 3 + stun = 10 unlock_amount = 75 - cast_amount = 40 + cast_amount = 30 action_icon_state = "defile" - var/stamdamage= 25 - var/toxdamage = 5 - var/confusion = 50 /obj/effect/proc_holder/spell/aoe_turf/revenant/defile/cast(list/targets, mob/living/simple_animal/revenant/user = usr) if(attempt_cast(user)) @@ -130,24 +138,32 @@ if(T.flags & NOJAUNT) T.flags -= NOJAUNT new/obj/effect/overlay/temp/revenant(T) - for(var/mob/living/carbon/human/human in T.contents) - human << "You suddenly feel [pick("sick and tired", "tired and confused", "nauseated", "dizzy")]." - human.adjustStaminaLoss(stamdamage) - human.adjustToxLoss(toxdamage) - human.confused += confusion - new/obj/effect/overlay/temp/revenant(human.loc) + if(istype(T, /turf/simulated/floor) && !istype(T, /turf/simulated/floor/plating) && prob(15)) + var/turf/simulated/floor/floor = T + if(floor.intact) + floor.builtin_tile.loc = floor + floor.broken = 0 + floor.burnt = 0 + floor.make_plating(1) if(!istype(T, /turf/simulated/wall/shuttle) && !istype(T, /turf/simulated/wall/rust) && !istype(T, /turf/simulated/wall/r_wall) && istype(T, /turf/simulated/wall) && prob(15)) new/obj/effect/overlay/temp/revenant(T) T.ChangeTurf(/turf/simulated/wall/rust) if(!istype(T, /turf/simulated/wall/r_wall/rust) && istype(T, /turf/simulated/wall/r_wall) && prob(15)) new/obj/effect/overlay/temp/revenant(T) T.ChangeTurf(/turf/simulated/wall/r_wall/rust) + for(var/obj/structure/closet/closet in T.contents) + closet.open() + for(var/obj/structure/bodycontainer/corpseholder in T.contents) + if(corpseholder.connected.loc == corpseholder) + corpseholder.open() + for(var/obj/machinery/dna_scannernew/dna in T.contents) + dna.open_machine() for(var/obj/structure/window/window in T.contents) window.hit(rand(50,90)) if(window && window.fulltile) new/obj/effect/overlay/temp/revenant/cracks(window.loc) for(var/obj/machinery/light/light in T.contents) - light.flicker(30) //spooky + light.flicker(20) //spooky //Malfunction: Makes bad stuff happen to robots and machines. /obj/effect/proc_holder/spell/aoe_turf/revenant/malfunction @@ -155,6 +171,7 @@ desc = "Corrupts and damages nearby machines and mechanical objects." charge_max = 200 range = 4 + cast_amount = 45 unlock_amount = 150 action_icon_state = "malfunction" @@ -170,7 +187,9 @@ bot.open = 1 bot.Emag(null) for(var/mob/living/carbon/human/human in T.contents) - human << "You feel [pick("your sense of direction flicker out", "a stabbing pain in your head", "your mind fill with static")]." + if(human == user) + continue + human << "You feel [pick("your sense of direction flicker out", "a stabbing pain in your head", "your mind fill with static")]." new/obj/effect/overlay/temp/revenant(human.loc) human.emp_act(1) for(var/obj/thing in T.contents) @@ -187,4 +206,65 @@ playsound(S, 'sound/machines/warning-buzzer.ogg', 50, 1) new/obj/effect/overlay/temp/revenant(S.loc) S.spark_system.start() - S.emp_act(1) \ No newline at end of file + S.emp_act(1) + +//Blight: Infects nearby humans and in general messes living stuff up. +/obj/effect/proc_holder/spell/aoe_turf/revenant/blight + name = "Blight" + desc = "Causes nearby living things to waste away." + charge_max = 200 + range = 3 + cast_amount = 50 + unlock_amount = 200 + action_icon_state = "blight" + +/obj/effect/proc_holder/spell/aoe_turf/revenant/blight/cast(list/targets, mob/living/simple_animal/revenant/user = usr) + if(attempt_cast(user)) + for(var/turf/T in targets) + spawn(0) + for(var/mob/living/mob in T.contents) + if(mob == user) + continue + new/obj/effect/overlay/temp/revenant(mob.loc) + if(iscarbon(mob)) + if(ishuman(mob)) + var/mob/living/carbon/human/H = mob + if(H.dna && H.dna.species) + H.dna.species.handle_mutant_bodyparts(H,"#1d2953") + H.dna.species.handle_hair(H,"#1d2953") + H.dna.species.update_color(H,"#1d2953") + spawn(20) + if(H && H.dna && H.dna.species) + H.dna.species.handle_mutant_bodyparts(H) + H.dna.species.handle_hair(H) + H.dna.species.update_color(H) + var/blightfound = 0 + for(var/datum/disease/revblight/blight in H.viruses) + blightfound = 1 + if(blight.stage < 5) + blight.stage++ + if(!blightfound) + H.AddDisease(new /datum/disease/revblight) + H << "You feel [pick("suddenly sick", "a surge of nausea", "like your skin is wrong")]." + else + if(mob.reagents) + mob.reagents.add_reagent("plasma", 5) + else + mob.adjustToxLoss(5) + for(var/obj/effect/spacevine/vine in T.contents) //Fucking with botanists, the ability. + vine.color = "#823abb" + new/obj/effect/overlay/temp/revenant(vine.loc) + spawn(20) + if(vine) + qdel(vine) + for(var/obj/effect/glowshroom/shroom in T.contents) + shroom.color = "#823abb" + new/obj/effect/overlay/temp/revenant(shroom.loc) + spawn(20) + if(shroom) + qdel(shroom) + for(var/obj/machinery/hydroponics/tray in T.contents) + new/obj/effect/overlay/temp/revenant(tray.loc) + tray.pestlevel = rand(8, 10) + tray.weedlevel = rand(8, 10) + tray.toxic = rand(45, 55) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/revenant/revenant_blight.dm b/code/modules/mob/living/simple_animal/revenant/revenant_blight.dm new file mode 100644 index 00000000000..a74e9b714f2 --- /dev/null +++ b/code/modules/mob/living/simple_animal/revenant/revenant_blight.dm @@ -0,0 +1,60 @@ +/datum/disease/revblight + name = "Unnatural Wasting" + max_stages = 5 + stage_prob = 10 + spread_flags = NON_CONTAGIOUS + cure_text = "Holy water or extensive rest." + spread_text = "A burst of unholy energy" + cures = list("holywater") + cure_chance = 50 //higher chance to cure, because revenants are assholes + agent = "Unholy Forces" + viable_mobtypes = list(/mob/living/carbon/human) + disease_flags = CURABLE + permeability_mod = 1 + severity = BIOHAZARD + var/stagedamage = 0 //Highest stage reached. + +/datum/disease/revblight/stage_act() + if(affected_mob.lying && prob(stage*2)) + affected_mob << "You feel better." + cure() + return + if(prob(stage*3)) + affected_mob << "You suddenly feel [pick("sick and tired", "disoriented", "tired and confused", "nauseated", "faint", "dizzy")]..." + affected_mob.confused += 10 + affected_mob.adjustStaminaLoss(10) + new/obj/effect/overlay/temp/revenant(affected_mob.loc) + if(stagedamage < stage) + stagedamage++ + affected_mob.adjustToxLoss(stage*3) //should, normally, do about 45 toxin damage. + new/obj/effect/overlay/temp/revenant(affected_mob.loc) + ..() //So we don't increase a stage before applying the stage damage. + switch(stage) + if(2) + if(prob(45)) + affected_mob.adjustStaminaLoss(4) + if(prob(5)) + affected_mob.emote("pale") + if(3) + if(prob(10)) + affected_mob.emote(pick("pale","shiver")) + if(4) + if(prob(15)) + affected_mob.emote(pick("pale","shiver","cries")) + if(5) + affected_mob << "You feel like [pick("nothing's worth it anymore", "nobody ever needed your help", "nothing you did mattered", "everything you tried to do was worthless")]." + affected_mob.adjustStaminaLoss(45) + new/obj/effect/overlay/temp/revenant(affected_mob.loc) + if(affected_mob.dna && affected_mob.dna.species) + affected_mob.dna.species.handle_mutant_bodyparts(affected_mob,"#1d2953") + affected_mob.dna.species.handle_hair(affected_mob,"#1d2953") + affected_mob.dna.species.update_color(affected_mob,"#1d2953") + spawn(100) + if(affected_mob && affected_mob.dna && affected_mob.dna.species) + affected_mob.dna.species.handle_mutant_bodyparts(affected_mob) + affected_mob.dna.species.handle_hair(affected_mob) + affected_mob.dna.species.update_color(affected_mob) + affected_mob.visible_message("[affected_mob] looks terrifyingly gaunt...", "Your skin suddenly looks wrong and awful...") + cure() + else + return \ No newline at end of file diff --git a/icons/mob/actions.dmi b/icons/mob/actions.dmi index 08410947b16..a9b3d0fefe7 100644 Binary files a/icons/mob/actions.dmi and b/icons/mob/actions.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 848c9d635a3..d21a9b4294e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1321,6 +1321,7 @@ #include "code\modules\mob\living\simple_animal\morph\morph.dm" #include "code\modules\mob\living\simple_animal\revenant\revenant.dm" #include "code\modules\mob\living\simple_animal\revenant\revenant_abilities.dm" +#include "code\modules\mob\living\simple_animal\revenant\revenant_blight.dm" #include "code\modules\mob\living\simple_animal\revenant\revenant_spawn_event.dm" #include "code\modules\mob\living\simple_animal\slaughter\slaughter.dm" #include "code\modules\mob\living\simple_animal\slaughter\slaughterevent.dm"