From 0ab86fbe99eed07a1ea9393c09f36a920aa9ac60 Mon Sep 17 00:00:00 2001 From: n3ophyt3 Date: Thu, 2 Jun 2011 00:59:26 +0000 Subject: [PATCH] Nar-sie is now a more vengeful eldritch being. When summoned into our world, he first rewards his loyal cultists by chasing down and eating them first, then turns his attention to any remaining humans. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1652 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/power/singularity/singularity.dm | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 307ca4641b3..97fc9da5323 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -446,6 +446,8 @@ var/global/list/uneatable = list( process() eat() + if(!target || prob(5)) + pickcultist() move() if(prob(25)) mezzer() @@ -470,4 +472,41 @@ var/global/list/uneatable = list( return ex_act() //No throwing bombs at it either. --NEO - return \ No newline at end of file + return + + proc/pickcultist() //Narsie rewards his cultists with being devoured first, then picks a ghost to follow. --NEO + var/list/cultists = list() + for(var/datum/mind/cult_nh_mind in ticker.mode.cult) + if(!cult_nh_mind.current) + continue + if(cult_nh_mind.current.stat) + continue + cultists += cult_nh_mind.current + if(cultists.len) + acquire(pick(cultists)) + return + //If there was living cultists, it picks one to follow. + for(var/mob/living/carbon/human/food in world) + if(food.stat) + continue + cultists += food + if(cultists.len) + acquire(pick(cultists)) + return + //no living cultists, pick a living human instead. + for(var/mob/dead/observer/ghost in world) + if(!ghost.client) + continue + cultists += ghost + if(cultists.len) + acquire(pick(cultists)) + return + //no living humans, follow a ghost instead. + + proc/acquire(var/mob/food) + target << "\blue NAR-SIE HAS LOST INTEREST IN YOU" + target = food + if(ishuman(target)) + target << "\red NAR-SIE HUNGERS FOR YOUR SOUL" + else + target << "\red NAR-SIE HAS CHOSEN YOU TO LEAD HIM TO HIS NEXT MEAL"