Merge pull request #13669 from Arturlang/sacrifice_tweaks
Makes cult sacrifice not permakill people anymore.
This commit is contained in:
@@ -295,6 +295,8 @@
|
||||
++cultplayers
|
||||
else
|
||||
++alive
|
||||
if(!alive)
|
||||
return
|
||||
var/ratio = cultplayers/alive
|
||||
if(ratio > CULT_RISEN && !cult_risen)
|
||||
for(var/datum/mind/B in members)
|
||||
|
||||
@@ -82,7 +82,7 @@ Runes can either be invoked by one's self or with many different cultists. Each
|
||||
fail_invoke()
|
||||
|
||||
/obj/effect/rune/attack_animal(mob/living/simple_animal/M)
|
||||
if(istype(M, /mob/living/simple_animal/shade) || istype(M, /mob/living/simple_animal/hostile/construct))
|
||||
if(isshade(M) || istype(M, /mob/living/simple_animal/hostile/construct))
|
||||
if(construct_invoke || !iscultist(M)) //if you're not a cult construct we want the normal fail message
|
||||
attack_hand(M)
|
||||
else
|
||||
@@ -191,7 +191,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
/obj/effect/rune/convert/do_invoke_glow()
|
||||
return
|
||||
|
||||
/obj/effect/rune/convert/invoke(var/list/invokers)
|
||||
/obj/effect/rune/convert/invoke(list/invokers)
|
||||
if(rune_in_use)
|
||||
return
|
||||
var/list/myriad_targets = list()
|
||||
@@ -203,11 +203,16 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
fail_invoke()
|
||||
log_game("Offer rune failed - no eligible targets")
|
||||
return
|
||||
var/mob/living/L = pick(myriad_targets)
|
||||
if(HAS_TRAIT(L, TRAIT_SACRIFICED))
|
||||
fail_invoke()
|
||||
log_game("Offer rune failed - target has already been sacrificed")
|
||||
to_chat(invokers, "<span class='warning'>[L] has already been sacrificed!</span>")
|
||||
return
|
||||
rune_in_use = TRUE
|
||||
visible_message("<span class='warning'>[src] pulses blood red!</span>")
|
||||
var/oldcolor = color
|
||||
color = RUNE_COLOR_DARKRED
|
||||
var/mob/living/L = pick(myriad_targets)
|
||||
var/is_clock = is_servant_of_ratvar(L)
|
||||
|
||||
var/mob/living/F = invokers[1]
|
||||
@@ -264,7 +269,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
H.uncuff()
|
||||
H.stuttering = 0
|
||||
H.cultslurring = 0
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers)
|
||||
var/mob/living/first_invoker = invokers[1]
|
||||
@@ -308,12 +313,16 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
stone.invisibility = 0
|
||||
|
||||
if(sacrificial)
|
||||
ADD_TRAIT(sacrificial, TRAIT_SACRIFICED, "sacrificed")
|
||||
if(iscyborg(sacrificial))
|
||||
playsound(sacrificial, 'sound/magic/disable_tech.ogg', 100, 1)
|
||||
sacrificial.dust() //To prevent the MMI from remaining
|
||||
else
|
||||
playsound(sacrificial, 'sound/magic/disintegrate.ogg', 100, 1)
|
||||
sacrificial.gib()
|
||||
var/mob/living/silicon/robot/bot = sacrificial
|
||||
playsound(sacrificial, 'sound/magic/disable_tech.ogg', 100, TRUE)
|
||||
bot.deconstruct()
|
||||
|
||||
else if(ishuman(sacrificial))
|
||||
playsound(sacrificial, 'sound/magic/disintegrate.ogg', 100, TRUE)
|
||||
var/mob/living/carbon/human/H = sacrificial
|
||||
H.spew_organ(2, 6)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/rune/empower
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/item/soulstone/examine(mob/user)
|
||||
. = ..()
|
||||
if(usability || iscultist(user, TRUE) || iswizard(user) || isobserver(user))
|
||||
if(usability || iscultist(user) || iswizard(user) || isobserver(user))
|
||||
if (old_shard)
|
||||
. += "<span class='cult'>A soulstone, used to capture a soul, either from dead humans or from freed shades.</span>"
|
||||
else
|
||||
@@ -46,7 +46,7 @@
|
||||
. += "<span class='cult'>This shard is spent; it is now just a creepy rock.</span>"
|
||||
|
||||
/obj/item/soulstone/Destroy() //Stops the shade from being qdel'd immediately and their ghost being sent back to the arrival shuttle.
|
||||
for(var/mob/living/simple_animal/shade/A in src)
|
||||
for(var/mob/living/simple_animal/hostile/construct/shade/A in src)
|
||||
A.death()
|
||||
return ..()
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
to_chat(user, "<span class='userdanger'>Your body is wracked with debilitating pain!</span>")
|
||||
return
|
||||
if(spent)
|
||||
to_chat(user, "<span class='warning'>There is no power left in the shard.</span>")
|
||||
to_chat(user, "<span class='warning'>There is no power left in [src].</span>")
|
||||
return
|
||||
if(!ishuman(M))//If target is not a human.
|
||||
return ..()
|
||||
@@ -81,7 +81,7 @@
|
||||
release_shades(user)
|
||||
|
||||
/obj/item/soulstone/proc/release_shades(mob/user)
|
||||
for(var/mob/living/simple_animal/shade/A in src)
|
||||
for(var/mob/living/simple_animal/hostile/construct/shade/A in src)
|
||||
A.status_flags &= ~GODMODE
|
||||
A.forceMove(get_turf(user))
|
||||
A.mobility_flags = MOBILITY_FLAGS_DEFAULT
|
||||
@@ -103,12 +103,12 @@
|
||||
|
||||
/obj/structure/constructshell/examine(mob/user)
|
||||
. = ..()
|
||||
if(iscultist(user, TRUE) || iswizard(user) || user.stat == DEAD)
|
||||
. += "<span class='cult'>A construct shell, used to house bound souls from a soulstone.</span>"
|
||||
. += "<span class='cult'>Placing a soulstone with a soul into this shell allows you to produce your choice of the following:</span>"
|
||||
. += "<span class='cult'>An <b>Artificer</b>, which can produce <b>more shells and soulstones</b>, as well as fortifications.</span>"
|
||||
. += "<span class='cult'>A <b>Wraith</b>, which does high damage and can jaunt through walls, though it is quite fragile.</span>"
|
||||
. += "<span class='cult'>A <b>Juggernaut</b>, which is very hard to kill and can produce temporary walls, but is slow.</span>"
|
||||
if(iscultist(user) || iswizard(user) || user.stat == DEAD)
|
||||
. += {"<span class='cult'>A construct shell, used to house bound souls from a soulstone.\n
|
||||
Placing a soulstone with a soul into this shell allows you to produce your choice of the following:\n
|
||||
An <b>Artificer</b>, which can produce <b>more shells and soulstones</b>, as well as fortifications.\n
|
||||
A <b>Wraith</b>, which does high damage and can jaunt through walls, though it is quite fragile.\n
|
||||
A <b>Juggernaut</b>, which is very hard to kill and can produce temporary walls, but is slow.</span>"}
|
||||
|
||||
/obj/structure/constructshell/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/soulstone))
|
||||
@@ -145,14 +145,14 @@
|
||||
if("VICTIM")
|
||||
var/mob/living/carbon/human/T = target
|
||||
var/datum/antagonist/cult/C = user.mind.has_antag_datum(/datum/antagonist/cult,TRUE)
|
||||
if(C && C.cult_team?.is_sacrifice_target(T.mind))
|
||||
if(C?.cult_team.is_sacrifice_target(T.mind))
|
||||
if(iscultist(user))
|
||||
to_chat(user, "<span class='cult'><b>\"This soul is mine.</b></span> <span class='cultlarge'>SACRIFICE THEM!\"</span>")
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The soulstone seems to reject this soul.</span>")
|
||||
to_chat(user, "<span class='danger'>[src] seems to reject this soul.</span>")
|
||||
return FALSE
|
||||
if(contents.len)
|
||||
to_chat(user, "<span class='userdanger'>Capture failed!</span>: The soulstone is full! Free an existing soul to make room.")
|
||||
to_chat(user, "<span class='userdanger'>Capture failed!</span>: [src] is full! Free an existing soul to make room.")
|
||||
else
|
||||
if((!old_shard && T.stat != CONSCIOUS) || (old_shard && T.stat == DEAD))
|
||||
if(T.client == null)
|
||||
@@ -167,7 +167,7 @@
|
||||
to_chat(user, "<span class='userdanger'>Capture failed!</span>: Kill or maim the victim first!")
|
||||
|
||||
if("SHADE")
|
||||
var/mob/living/simple_animal/shade/T = target
|
||||
var/mob/living/simple_animal/hostile/construct/shade/T = target
|
||||
if(contents.len)
|
||||
to_chat(user, "<span class='userdanger'>Capture failed!</span>: The soulstone is full! Free an existing soul to make room.")
|
||||
else
|
||||
@@ -177,13 +177,13 @@
|
||||
T.health = T.maxHealth
|
||||
icon_state = "soulstone2"
|
||||
name = "soulstone: Shade of [T.real_name]"
|
||||
to_chat(T, "<span class='notice'>Your soul has been captured by the soulstone. Its arcane energies are reknitting your ethereal form.</span>")
|
||||
to_chat(T, "<span class='notice'>Your soul has been captured by [src]. Its arcane energies are reknitting your ethereal form.</span>")
|
||||
if(user != T)
|
||||
to_chat(user, "<span class='info'><b>Capture successful!</b>:</span> [T.real_name]'s soul has been captured and stored within the soulstone.")
|
||||
to_chat(user, "<span class='info'><b>Capture successful!</b>:</span> [T.real_name]'s soul has been captured and stored within [src].")
|
||||
|
||||
if("CONSTRUCT")
|
||||
var/obj/structure/constructshell/T = target
|
||||
var/mob/living/simple_animal/shade/A = locate() in src
|
||||
var/mob/living/simple_animal/hostile/construct/shade/A = locate() in src
|
||||
if(A)
|
||||
var/construct_class = alert(user, "Please choose which type of construct you wish to create.",,"Juggernaut","Wraith","Artificer")
|
||||
if(!T || !T.loc)
|
||||
@@ -199,8 +199,8 @@
|
||||
if(iscultist(user) || iswizard(user))
|
||||
makeNewConstruct(/mob/living/simple_animal/hostile/construct/builder, A, user, 0, T.loc)
|
||||
|
||||
else
|
||||
makeNewConstruct(/mob/living/simple_animal/hostile/construct/builder/noncult, A, user, 0, T.loc)
|
||||
else
|
||||
return
|
||||
for(var/datum/mind/B in SSticker.mode.cult)
|
||||
if(B == A.mind)
|
||||
SSticker.mode.cult -= A.mind
|
||||
@@ -208,19 +208,24 @@
|
||||
qdel(T)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='userdanger'>Creation failed!</span>: The soul stone is empty! Go kill someone!")
|
||||
to_chat(user, "<span class='userdanger'>Creation failed!</span>: [src] is empty! Go kill someone!")
|
||||
|
||||
|
||||
/proc/makeNewConstruct(mob/living/simple_animal/hostile/construct/ctype, mob/target, mob/stoner = null, cultoverride = 0, loc_override = null)
|
||||
if(QDELETED(target))
|
||||
return
|
||||
var/mob/living/simple_animal/hostile/construct/newstruct = new ctype((loc_override) ? (loc_override) : (get_turf(target)))
|
||||
if(stoner)
|
||||
newstruct.faction |= "[REF(stoner)]"
|
||||
newstruct.master = stoner
|
||||
var/datum/action/innate/seek_master/SM = new()
|
||||
SM.Grant(newstruct)
|
||||
target.transfer_ckey(newstruct)
|
||||
newstruct.key = target.key
|
||||
if(target.type == /mob/living/simple_animal/hostile/construct/shade) //Make sure we remember which body belonged to the shade
|
||||
var/mob/living/simple_animal/hostile/construct/shade/shade = target
|
||||
newstruct.original_mind = shade.original_mind
|
||||
var/obj/screen/alert/bloodsense/BS
|
||||
if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker && SSticker.mode)
|
||||
if(newstruct.mind && ((stoner && iscultist(stoner)) || cultoverride) && SSticker?.mode)
|
||||
SSticker.mode.add_cultist(newstruct.mind, 0)
|
||||
if(iscultist(stoner) || cultoverride)
|
||||
to_chat(newstruct, "<b>You are still bound to serve the cult[stoner ? " and [stoner]":""], follow [stoner ? stoner.p_their() : "their"] orders and help [stoner ? stoner.p_them() : "them"] complete [stoner ? stoner.p_their() : "their"] goals at all costs.</b>")
|
||||
@@ -234,19 +239,18 @@
|
||||
|
||||
|
||||
/obj/item/soulstone/proc/init_shade(mob/living/carbon/human/T, mob/user, vic = 0)
|
||||
new /obj/effect/decal/remains/human(T.loc) //Spawns a skeleton
|
||||
if(HAS_TRAIT_FROM(T, TRAIT_SACRIFICED, "sacrificed"))
|
||||
if(user)
|
||||
to_chat(user, "This body has already been harvested!")
|
||||
return
|
||||
ADD_TRAIT(T, TRAIT_SACRIFICED, "sacrificed")
|
||||
T.stop_sound_channel(CHANNEL_HEARTBEAT)
|
||||
T.invisibility = INVISIBILITY_ABSTRACT
|
||||
T.dust_animation()
|
||||
QDEL_IN(T, 5)
|
||||
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade(src)
|
||||
S.status_flags |= GODMODE //So they won't die inside the stone somehow
|
||||
S.mobility_flags = NONE //Can't move out of the soul stone
|
||||
var/mob/living/simple_animal/hostile/construct/shade/S = new /mob/living/simple_animal/hostile/construct/shade(src)
|
||||
S.name = "Shade of [T.real_name]"
|
||||
S.real_name = "Shade of [T.real_name]"
|
||||
T.transfer_ckey(S)
|
||||
S.original_mind = T.mind.current
|
||||
S.copy_languages(T, LANGUAGE_MIND)//Copies the old mobs languages into the new mob holder.
|
||||
S.copy_languages(user, LANGUAGE_MASTER)
|
||||
S.update_atom_languages()
|
||||
grant_all_languages(FALSE, FALSE, TRUE) //Grants omnitongue
|
||||
if(user)
|
||||
@@ -264,7 +268,7 @@
|
||||
to_chat(user, "<span class='info'><b>Capture successful!</b>:</span> [T.real_name]'s soul has been ripped from [T.p_their()] body and stored within the soul stone.")
|
||||
|
||||
|
||||
/obj/item/soulstone/proc/getCultGhost(mob/living/carbon/human/T, mob/U)
|
||||
/obj/item/soulstone/proc/getCultGhost(mob/living/carbon/human/T, mob/user)
|
||||
var/mob/dead/observer/chosen_ghost
|
||||
|
||||
for(var/mob/dead/observer/ghost in GLOB.player_list) //We put them back in their body
|
||||
@@ -279,13 +283,12 @@
|
||||
if(!T)
|
||||
return FALSE
|
||||
if(!chosen_ghost)
|
||||
to_chat(U, "<span class='danger'>There were no spirits willing to become a shade.</span>")
|
||||
to_chat(user, "<span class='danger'>There were no spirits willing to become a shade.</span>")
|
||||
return FALSE
|
||||
if(contents.len) //If they used the soulstone on someone else in the meantime
|
||||
return FALSE
|
||||
T.ckey = chosen_ghost.ckey
|
||||
for(var/obj/item/W in T)
|
||||
T.dropItemToGround(W)
|
||||
init_shade(T, U)
|
||||
qdel(T)
|
||||
init_shade(T, user)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user