From 5b0f43ade10ddce6f2e25c60acd534a7956e1804 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Wed, 29 Jul 2015 07:14:33 -0400 Subject: [PATCH] CRAWLING IN MY CRAWL! THESE WOUNDS THEY WILL NOT CRAWL Update based on --- code/game/gamemodes/antag_spawner.dm | 2 +- code/modules/events/slaughterevent.dm | 2 +- code/modules/mob/living/bloodcrawl.dm | 192 ++++++++++++++++ code/modules/mob/living/living_defines.dm | 3 + .../simple_animal/slaughter/slaughter.dm | 215 ++---------------- paradise.dme | 1 + 6 files changed, 215 insertions(+), 200 deletions(-) create mode 100644 code/modules/mob/living/bloodcrawl.dm diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index abb9afb08a9..404b00eee76 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -131,7 +131,7 @@ var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T) var/mob/living/simple_animal/slaughter/S = new /mob/living/simple_animal/slaughter/(holder) S.vialspawned = TRUE - S.phased = TRUE + S.holder = holder S.key = C.key if(S.mind) S.mind.assigned_role = "Slaughter Demon" diff --git a/code/modules/events/slaughterevent.dm b/code/modules/events/slaughterevent.dm index cc19fa80cff..5d0c5304be2 100644 --- a/code/modules/events/slaughterevent.dm +++ b/code/modules/events/slaughterevent.dm @@ -43,7 +43,7 @@ return find_slaughter() var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(pick(spawn_locs)) var/mob/living/simple_animal/slaughter/S = new /mob/living/simple_animal/slaughter/(holder) - S.phased = TRUE + S.holder = holder player_mind.transfer_to(S) player_mind.assigned_role = "Slaughter Demon" player_mind.special_role = "Slaughter Demon" diff --git a/code/modules/mob/living/bloodcrawl.dm b/code/modules/mob/living/bloodcrawl.dm new file mode 100644 index 00000000000..65b869e8c44 --- /dev/null +++ b/code/modules/mob/living/bloodcrawl.dm @@ -0,0 +1,192 @@ +//Travel through pools of blood. Slaughter Demon powers for everyone! + + +/mob/living/proc/phaseout(var/obj/effect/decal/cleanable/B) + var/mob/living/kidnapped = null + var/turf/mobloc = get_turf(src.loc) + var/turf/bloodloc = get_turf(B.loc) + if(Adjacent(bloodloc)) + src.notransform = TRUE + spawn(0) + src.visible_message("[src] sinks into [B].") + playsound(get_turf(src), 'sound/misc/enter_blood.ogg', 100, 1, -1) + var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter( mobloc ) + var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc ) + animation.name = "odd blood" + animation.density = 0 + animation.anchored = 1 + animation.icon = 'icons/mob/mob.dmi' + animation.icon_state = "jaunt" + animation.layer = 5 + animation.master = holder + animation.dir = src.dir + + src.ExtinguishMob() + if(src.buckled) + src.buckled.unbuckle() + if(src.pulling && src.bloodcrawl == 2) + if(istype(src.pulling, /mob/living/)) + var/mob/living/victim = src.pulling + if(victim.stat == CONSCIOUS) + src.visible_message("[victim] kicks free of \the [src] at the last second!") + else + victim.loc = holder///holder + src.visible_message("\The [src] drags [victim] into [B]!") + kidnapped = victim + flick("jaunt",animation) + src.loc = holder + src.holder = holder + + if(kidnapped) + src << "You begin to feast on [kidnapped]. You can not move while you are doing this." + src.visible_message("Loud eating sounds come from the blood...") + GibEat(kidnapped) + sleep(6) + if (animation) + qdel(animation) + playsound(get_turf(src),'sound/misc/Demon_consume.ogg', 100, 1) + sleep(30) + GibEat(kidnapped) + playsound(get_turf(src),'sound/misc/Demon_consume.ogg', 100, 1) + sleep(30) + GibEat(kidnapped) + playsound(get_turf(src),'sound/misc/Demon_consume.ogg', 100, 1) + sleep(30) + src << "You devour [kidnapped]. Your health is fully restored." + src.adjustBruteLoss(-1000) + kidnapped.ghostize() + qdel(kidnapped) + new /obj/effect/gibspawner/human(get_turf(src))///Somewhere a janitor weeps. + if (istype(src, /mob/living/simple_animal/slaughter)) //rason, do not want humans to get this + + var/mob/living/simple_animal/slaughter/demon = src + + demon.devoured++ + //src.kidnapped = null + if (demon.devoured == 5) + src.mind.current.verbs += /mob/living/simple_animal/slaughter/proc/goreThrow + src.mind.current.verbs += /mob/living/simple_animal/slaughter/proc/bloodSac + src << " You have consumed enough to be able to summon Excess Gore." + else + sleep(6) + if (animation) + qdel(animation) + src.notransform = 0 + +/mob/living/proc/phasein(var/obj/effect/decal/cleanable/B) + if(src.notransform) + src << "Finish eating first!" + else + var/atom/movable/overlay/animation = new /atom/movable/overlay( B.loc ) + animation.name = "odd blood" + animation.density = 0 + animation.anchored = 1 + animation.icon = 'icons/mob/mob.dmi' + animation.icon_state = "jauntup" //Paradise Port:I reversed the jaunt animation so it looks like its rising up + animation.layer = 5 + animation.master = B.loc + animation.dir = src.dir + flick("jauntup",animation) + src.loc = B.loc + src.client.eye = src + if (prob(25)) + var/list/voice = list('sound/hallucinations/behind_you1.ogg','sound/hallucinations/im_here1.ogg','sound/hallucinations/turn_around1.ogg','sound/hallucinations/i_see_you1.ogg') + playsound(get_turf(src), pick(voice),50, 1, -1) + src.visible_message("\The [src] rises out of \the [B]!") + playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1) + qdel(src.holder) + src.holder = null + sleep(6) + if(animation) + qdel(animation) + +/obj/effect/decal/cleanable/blood/CtrlClick(mob/living/user) + ..() + if(user.bloodcrawl) + if(user.holder) + user.phasein(src) + else + user.phaseout(src) + + + +/obj/effect/decal/cleanable/trail_holder/CtrlClick(mob/living/user) + ..() + if(user.bloodcrawl) + if(user.holder) + user.phasein(src) + else + user.phaseout(src) + + + +/turf/CtrlClick(var/mob/living/user) + ..() + if(user.bloodcrawl) + for(var/obj/effect/decal/cleanable/B in src.contents) + if(istype(B, /obj/effect/decal/cleanable/blood) || istype(B, /obj/effect/decal/cleanable/trail_holder)) + if(user.holder) + user.phasein(B) + break + else + user.phaseout(B) + break + +/obj/effect/dummy/slaughter //Can't use the wizard one, blocked by jaunt/slow + name = "odd blood" + icon = 'icons/effects/effects.dmi' + icon_state = "nothing" + var/canmove = 1 + density = 0 + anchored = 1 + //invisibility = INVISIBILITY_OBSERVER + +/obj/effect/dummy/slaughter/relaymove(var/mob/user, direction) + if (!src.canmove || !direction) return + var/turf/newLoc = get_step(src,direction) + loc = newLoc + src.canmove = 0 + spawn(1) + src.canmove = 1 + +/obj/effect/dummy/slaughter/ex_act(severity) + return 1 + +/obj/effect/dummy/slaughter/bullet_act(blah) + return + +/obj/effect/dummy/slaughter/singularity_act(blah) + return + + +/obj/item/weapon/guts + name = "guts" + desc = "Ewwwwwwwwwwww" + icon = 'icons/obj/surgery.dmi' + icon_state = "innards" + +//Gib helperfunc +/mob/living/proc/GibEat(var/napped) + + //at some point we may eat a robot..and its gonna throw out gibs.. + //don't question...When a demon drags you into a blood portal you have no idea whos gibs you are actually seeing + //...Or we can just blame bluespace. + var/atom/throwtarget = get_edge_target_turf(src.holder, get_dir(src.holder, get_step_away(src.holder, src.holder))) + + if(istype(napped,/mob/living/carbon/human)) + var/mob/living/carbon/human/victimType = napped + + var/obj/effect/decal/cleanable/blood/gibs/gore = new victimType.species.single_gib_type(get_turf(src)) + if(victimType.species.flesh_color) + gore.fleshcolor = victimType.species.flesh_color + if(victimType.species.blood_color) + gore.basecolor = victimType.species.blood_color + gore.update_icon() + spawn()//Wait for itt.... + gore.throw_at(get_edge_target_turf(throwtarget,pick(alldirs)),rand(10,20),10) + + else//in case we eat ian. + new /obj/effect/gibspawner/human(get_turf(src)) + + var/obj/tossGuts = new /obj/item/weapon/guts(get_turf(src.holder)) + tossGuts.throw_at(get_edge_target_turf(throwtarget,pick(alldirs)),rand(10,20),5) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index b25ec423316..4c35f62aecf 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -46,6 +46,9 @@ var/floating = 0 var/nightvision = 0 + var/bloodcrawl = 0 //0 No blood crawling, 1 blood crawling, 2 blood crawling+mob devour + var/holder = null //The holder for blood crawling + var/ventcrawler = 0 //0 No vent crawling, 1 vent crawling in the nude, 2 vent crawling always var/list/icon/pipes_shown = list() var/last_played_vent diff --git a/code/modules/mob/living/simple_animal/slaughter/slaughter.dm b/code/modules/mob/living/simple_animal/slaughter/slaughter.dm index 19b47b5db8e..d95d0255ef4 100644 --- a/code/modules/mob/living/simple_animal/slaughter/slaughter.dm +++ b/code/modules/mob/living/simple_animal/slaughter/slaughter.dm @@ -1,4 +1,6 @@ //////////////////The Monster +#define BLOODCRAWL 1 +#define BLOODCRAWL_EAT 2 /mob/living/simple_animal/slaughter name = "Slaughter Demon" @@ -37,13 +39,11 @@ melee_damage_upper = 30 see_in_dark = 8 see_invisible = SEE_INVISIBLE_MINIMUM + bloodcrawl = 2 var/devoured = 0 - var/phased = FALSE - var/holder = null - var/eating = FALSE - var/mob/living/kidnapped = null + var/list/nearby_mortals = list() var/cooldown = 0 var/gorecooldown = 0 @@ -90,168 +90,6 @@ return 0 ////////////////////The Powers -/mob/living/simple_animal/slaughter/proc/phaseout(var/obj/effect/decal/cleanable/B) - var/turf/mobloc = get_turf(src.loc) - var/turf/bloodloc = get_turf(B.loc) - if(Adjacent(bloodloc)) - src.notransform = TRUE - spawn(0) - src.visible_message("The [src] sinks into [B].") - playsound(get_turf(src), 'sound/misc/enter_blood.ogg', 100, 1, -1) - var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter( mobloc ) - var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc ) - animation.name = "odd blood" - animation.density = 0 - animation.anchored = 1 - animation.icon = 'icons/mob/mob.dmi' - animation.icon_state = "jaunt" - animation.layer = 5 - animation.master = holder - animation.dir = src.dir - src.ExtinguishMob() - if(src.buckled) - src.buckled.unbuckle() - if(src.pulling) - if(istype(src.pulling, /mob/living/)) - var/mob/living/victim = src.pulling - if(victim.stat == CONSCIOUS) - src.visible_message("[victim] kicks free of \the [src] at the last second!") - else - victim.loc = holder///holder - src.visible_message("\The [src] drags [victim] into [B]!") - src.kidnapped = victim - flick("jaunt",animation) - src.loc = holder - src.phased = TRUE - src.holder = holder - - if(src.kidnapped) - src << "You begin to feast on [kidnapped]. You can not move while you are doing this." - src.visible_message("Loud eating sounds come from the blood...") - src.eating = TRUE - sleep(6) - qdel(animation) - src.GibEat() - playsound(get_turf(src),'sound/misc/Demon_consume.ogg', 100, 1) - sleep(30) - src.GibEat() - playsound(get_turf(src),'sound/misc/Demon_consume.ogg', 100, 1) - sleep(30) - src.GibEat() - playsound(get_turf(src),'sound/misc/Demon_consume.ogg', 100, 1) - sleep(30) - src << "You devour [kidnapped]. Your health is fully restored." - src.adjustBruteLoss(-1000) - kidnapped.ghostize() - qdel(kidnapped) - src.devoured++ - //src << " [src.devoured] [src.kidnapped] [src.eating]"//Debug for tracking how many is devoured, use in objective? - src.kidnapped = null - src.eating = FALSE - src.pulling = FALSE - if (src.devoured == 5) - src.mind.current.verbs += /mob/living/simple_animal/slaughter/proc/goreThrow - src.mind.current.verbs += /mob/living/simple_animal/slaughter/proc/bloodSac - src << " You have consumed enough to be able to summon Excess Gore." - src.notransform = 0 - if(!(src.eating)) - new /obj/effect/gibspawner/human(get_turf(src))///Somewhere a janitor weeps.. - sleep(6) - if(animation) - qdel(animation) - -/mob/living/simple_animal/slaughter/proc/phasein(var/obj/effect/decal/cleanable/B) - var/atom/movable/overlay/animation = new /atom/movable/overlay( B.loc ) - animation.name = "odd blood" - animation.density = 0 - animation.anchored = 1 - animation.icon = 'icons/mob/mob.dmi' - animation.icon_state = "jauntup" //Paradise Port:I reversed the jaunt animation so it looks like its rising up - animation.layer = 5 - animation.master = B.loc - animation.dir = src.dir - if(src.eating) - src << "Finish eating first!" - else - flick("jauntup",animation) - src.client.eye = src - src.loc = B.loc - src.phased = FALSE - //Paradise port:The hallucination sounds removed from the demon as of a recent commit..i liked it though.. - if (prob(25)) - var/list/voice = list('sound/hallucinations/behind_you1.ogg','sound/hallucinations/im_here1.ogg','sound/hallucinations/turn_around1.ogg','sound/hallucinations/i_see_you1.ogg') - playsound(get_turf(src), pick(voice),50, 1, -1) - src.visible_message("\The [src] rises out of [B]!") - new /obj/effect/gibspawner/human(get_turf(src)) - playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1) - sleep(6) - if(src.holder) - qdel(src.holder) - if(animation) - qdel(animation) - -/obj/effect/decal/cleanable/blood/CtrlClick(var/mob/user) - ..() - if(istype(user, /mob/living/simple_animal/slaughter)) - var/mob/living/simple_animal/slaughter/S = user - if(S.phased) - S.phasein(src) - else - S.phaseout(src) - - -/obj/effect/decal/cleanable/trail_holder/CtrlClick(var/mob/user) - ..() - if(istype(user, /mob/living/simple_animal/slaughter)) - var/mob/living/simple_animal/slaughter/S = user - //5 second cooldown - if(S.phased) - S.phasein(src) - else - S.phaseout(src) - - - -/turf/CtrlClick(var/mob/user) - ..() - if(istype(user, /mob/living/simple_animal/slaughter)) - var/mob/living/simple_animal/slaughter/S = user - for(var/obj/effect/decal/cleanable/B in src.contents) - if((istype(B, /obj/effect/decal/cleanable/blood) || istype(B, /obj/effect/decal/cleanable/trail_holder))&& !istype(B,/obj/effect/decal/cleanable/blood/gibs/robot)) - if(S.phased) - S.phasein(B) - break - else - S.phaseout(B) - break - -/obj/effect/dummy/slaughter //Can't use the wizard one, blocked by jaunt/slow - name = "odd blood" - icon = 'icons/effects/effects.dmi' - icon_state = "nothing" - var/canmove = 1 - density = 0 - anchored = 1 - //invisibility = INVISIBILITY_OBSERVER - -/obj/effect/dummy/slaughter/relaymove(var/mob/user, direction) - if (!src.canmove || !direction) return - var/turf/newLoc = get_step(src,direction) - loc = newLoc - src.canmove = 0 - spawn(1) - src.canmove = 1 - -/obj/effect/dummy/slaughter/ex_act(severity) - return 1 - -/obj/effect/dummy/slaughter/bullet_act(blah) - return - -/obj/effect/dummy/slaughter/singularity_act(blah) - return - - //Paradise Port:I added this cuase..SPOOPY DEMON IN YOUR BRAIN @@ -310,7 +148,7 @@ set desc = "Launch blood at some poor unsuspecting person..." set category = "Daemon" - if (!(src.phased)) + if (!(src.notransform)) if (gorecooldown == 0 || world.time - gorecooldown > 600) var/obj/effect/decal/cleanable/blood/gibs/gore = new(src.loc) gore.throw_at(target,10,5,src) @@ -333,7 +171,7 @@ set name = "Blood Pustile" set desc = "Summon a blood filled that expels blood." set category = "Daemon" - if (src.phased) + if (src.notransform) if (gorecooldown == 0 || world.time - gorecooldown > 1200) new /obj/effect/bloodnode(src.holder) @@ -353,39 +191,20 @@ icon_state = "heart-on" origin_tech = "combat=5;biotech=8" -/obj/item/weapon/guts - name = "guts" - desc = "Ewwwwwwwwwwww" - icon = 'icons/obj/surgery.dmi' - icon_state = "innards" -//Event -//Gib helperfunc -/mob/living/simple_animal/slaughter/proc/GibEat() +/obj/item/weapon/demonheart/attack_self(mob/living/user) + visible_message("[user] feasts upon the [src].") + if(user.bloodcrawl == 0) + user << "You absorb some of the demon's power!" + user.bloodcrawl = 1 + else if(user.bloodcrawl == 1) + user << "You absorb some of the demon's power!" + user << "You feel diffr- CONSUME THEM! " + user.bloodcrawl = 2 + qdel(src) - //at some point we may eat a robot..and its gonna throw out gibs.. - //don't question...When a demon drags you into a blood portal you have no idea whos gibs you are actually seeing - //...Or we can just blame bluespace. - var/atom/throwtarget = get_edge_target_turf(src.holder, get_dir(src.holder, get_step_away(src.holder, src.holder))) - - if(istype(src.kidnapped,/mob/living/carbon/human)) - var/mob/living/carbon/human/victimType = src.kidnapped - - var/obj/effect/decal/cleanable/blood/gibs/gore = new victimType.species.single_gib_type(get_turf(src)) - if(victimType.species.flesh_color) - gore.fleshcolor = victimType.species.flesh_color - if(victimType.species.blood_color) - gore.basecolor = victimType.species.blood_color - gore.update_icon() - spawn()//Wait for itt.... - gore.throw_at(get_edge_target_turf(throwtarget,pick(alldirs)),rand(10,20),10) - - else//in case we eat ian. - new /obj/effect/gibspawner/human(get_turf(src)) - - var/obj/tossGuts = new /obj/item/weapon/guts (get_turf(src.holder)) - tossGuts.throw_at(get_edge_target_turf(throwtarget,pick(alldirs)),rand(10,20),5) +//Objectives and helpers. //Objective info, Based on Reverent mini Atang /datum/objective/slaughter diff --git a/paradise.dme b/paradise.dme index 590bdf15f23..4e0226eb9c1 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1260,6 +1260,7 @@ #include "code\modules\mob\dead\observer\observer.dm" #include "code\modules\mob\dead\observer\say.dm" #include "code\modules\mob\dead\observer\spells.dm" +#include "code\modules\mob\living\bloodcrawl.dm" #include "code\modules\mob\living\damage_procs.dm" #include "code\modules\mob\living\default_language.dm" #include "code\modules\mob\living\living.dm"