From 9315f5c104be080a7611bd6c2894bb4c7c5d9d76 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Tue, 31 Jan 2023 23:14:45 -0500 Subject: [PATCH] Cult ghosts begin to die if they go too far from the summoner (#20196) * you are dead pls nerf * Update code/datums/status_effects/debuffs.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Get_dist_euclidian --------- Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> --- code/datums/status_effects/debuffs.dm | 13 ++++++++++++- code/game/gamemodes/cult/runes.dm | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 3b5ec35b7e4..bfa26243a99 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -23,14 +23,25 @@ owner.adjustFireLoss(0.1) owner.adjustToxLoss(0.2) -/datum/status_effect/cultghost //is a cult ghost and can't use manifest runes +/datum/status_effect/cultghost //is a cult ghost and can't use manifest runes, can see ghosts and dies if too far from summoner id = "cult_ghost" duration = -1 alert_type = null + var/damage = 7.5 + var/source_UID + +/datum/status_effect/cultghost/on_creation(mob/living/new_owner, mob/living/source) + . = ..() + source_UID = source.UID() /datum/status_effect/cultghost/tick() if(owner.reagents) owner.reagents.del_reagent("holywater") //can't be deconverted + var/mob/living/summoner = locateUID(source_UID) + if(get_dist_euclidian(summoner, owner) < 21) + return + owner.adjustBruteLoss(damage) + to_chat(owner, "You are too far away from the summoner!") /datum/status_effect/crusher_mark id = "crusher_mark" diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 7e02930aeec..35bee7c2839 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -917,7 +917,7 @@ structure_check() searches for nearby cultist structures required for the invoca new_human.gender = ghost_to_spawn.gender new_human.alpha = 150 //Makes them translucent new_human.equipOutfit(/datum/outfit/ghost_cultist) //give them armor - new_human.apply_status_effect(STATUS_EFFECT_SUMMONEDGHOST) //ghosts can't summon more ghosts, also lets you see actual ghosts + new_human.apply_status_effect(STATUS_EFFECT_SUMMONEDGHOST, user) //ghosts can't summon more ghosts, also lets you see actual ghosts for(var/obj/item/organ/external/current_organ in new_human.bodyparts) current_organ.limb_flags |= CANNOT_DISMEMBER //you can't chop of the limbs of a ghost, silly ghosts++