Ashwalker Update (#15466)

* Ashwalker Update

* Update generic_positive_events.dm

* Update ashwalker.dm

* fixing newlines

* Update code/modules/antagonists/_common/antag_datum.dm

Co-authored-by: Putnam3145 <putnam3145@gmail.com>

* literally 1984

* unlimiting spawns

* Create antag_datum.dm.bak

* Revert "Create antag_datum.dm.bak"

This reverts commit d91e1f4c4d9c86bc4a275ef19f45e8927dd93cae.

Co-authored-by: Putnam3145 <putnam3145@gmail.com>
This commit is contained in:
Sakura
2022-02-03 22:34:15 -05:00
committed by GitHub
parent 72ca4b6a8e
commit 08b38a7e70
10 changed files with 208 additions and 10 deletions
@@ -98,7 +98,7 @@ GLOBAL_LIST_EMPTY(antagonists)
/datum/antagonist/proc/on_body_transfer(mob/living/old_body, mob/living/new_body)
SHOULD_CALL_PARENT(TRUE)
remove_innate_effects(old_body)
if(!soft_antag && old_body.stat != DEAD && !LAZYLEN(old_body.mind?.antag_datums))
if(!soft_antag && old_body && old_body.stat != DEAD && !length(old_body.mind?.antag_datums))
old_body.remove_from_current_living_antags()
apply_innate_effects(new_body)
if(!soft_antag && new_body.stat != DEAD)
@@ -0,0 +1,40 @@
/datum/team/ashwalkers
name = "Ashwalkers"
show_roundend_report = FALSE
var/list/players_spawned = new
/datum/antagonist/ashwalker
name = "\improper Ash Walker"
job_rank = ROLE_LAVALAND
show_in_antagpanel = FALSE
show_to_ghosts = TRUE
antagpanel_category = "Ash Walkers"
var/datum/team/ashwalkers/ashie_team
/datum/antagonist/ashwalker/create_team(datum/team/team)
if(team)
ashie_team = team
objectives |= ashie_team.objectives
else
ashie_team = new
/datum/antagonist/ashwalker/get_team()
return ashie_team
/datum/antagonist/ashwalker/on_body_transfer(mob/living/old_body, mob/living/new_body)
. = ..()
RegisterSignal(new_body, COMSIG_MOB_EXAMINATE, .proc/on_examinate)
/datum/antagonist/ashwalker/on_gain()
. = ..()
RegisterSignal(owner.current, COMSIG_MOB_EXAMINATE, .proc/on_examinate)
/datum/antagonist/ashwalker/on_removal()
. = ..()
UnregisterSignal(owner.current, COMSIG_MOB_EXAMINATE)
/datum/antagonist/ashwalker/proc/on_examinate(datum/source, atom/A)
SIGNAL_HANDLER
if(istype(A, /obj/structure/headpike))
SEND_SIGNAL(owner.current, COMSIG_ADD_MOOD_EVENT, "headspear", /datum/mood_event/sacrifice_good)
+6
View File
@@ -33,6 +33,10 @@
var/ghost_usable = TRUE
var/skip_reentry_check = FALSE //Skips the ghost role blacklist time for people who ghost/suicide/cryo
///override this to add special spawn conditions to a ghost role
/obj/effect/mob_spawn/proc/allow_spawn(mob/user, silent = FALSE)
return TRUE
//ATTACK GHOST IGNORING PARENT RETURN VALUE
/obj/effect/mob_spawn/attack_ghost(mob/user, latejoinercalling)
if(!SSticker.HasRoundStarted() || !loc || !ghost_usable)
@@ -43,6 +47,8 @@
if(jobban_isbanned(user, banType))
to_chat(user, "<span class='warning'>You are jobanned!</span>")
return
if(!allow_spawn(user, silent = FALSE))
return
if(QDELETED(src) || QDELETED(user))
return
if(isobserver(user))
@@ -308,10 +308,15 @@
adjustHealth(unsuitable_atmos_damage)
/mob/living/simple_animal/gib(no_brain, no_organs, no_bodyparts, datum/explosion/was_explosion)
if(butcher_results)
if(butcher_results || guaranteed_butcher_results)
var/list/butcher = list()
if(butcher_results)
butcher += butcher_results
if(guaranteed_butcher_results)
butcher += guaranteed_butcher_results
var/atom/Tsec = drop_location()
for(var/path in butcher_results)
for(var/i in 1 to butcher_results[path])
for(var/path in butcher)
for(var/i in 1 to butcher[path])
new path(Tsec)
..()
@@ -12,14 +12,29 @@
max_integrity = 200
var/faction = list("ashwalker")
var/meat_counter = 6
var/datum/team/ashwalkers/ashies
var/datum/linked_objective
/obj/structure/lavaland/ash_walker/Initialize()
/obj/structure/lavaland/ash_walker/Initialize(mapload)
.=..()
ashies = new /datum/team/ashwalkers()
var/datum/objective/protect_object/objective = new
objective.set_target(src)
linked_objective = objective
ashies.objectives += objective
START_PROCESSING(SSprocessing, src)
/obj/structure/lavaland/ash_walker/Destroy()
ashies.objectives -= linked_objective
ashies = null
QDEL_NULL(linked_objective)
STOP_PROCESSING(SSprocessing, src)
return ..()
/obj/structure/lavaland/ash_walker/deconstruct(disassembled)
new /obj/item/assembly/signaler/anomaly (get_step(loc, pick(GLOB.alldirs)))
new /obj/effect/collapse(loc)
return ..()
/obj/structure/lavaland/ash_walker/process()
consume()
@@ -28,20 +43,64 @@
/obj/structure/lavaland/ash_walker/proc/consume()
for(var/mob/living/H in view(src, 1)) //Only for corpse right next to/on same tile
if(H.stat)
visible_message("<span class='warning'>Serrated tendrils eagerly pull [H] to [src], tearing the body apart as its blood seeps over the eggs.</span>")
playsound(get_turf(src),'sound/magic/demon_consume.ogg', 100, 1)
for(var/obj/item/W in H)
if(!H.dropItemToGround(W))
qdel(W)
if(issilicon(H)) //no advantage to sacrificing borgs...
H.gib()
visible_message(span_notice("Serrated tendrils eagerly pull [H] apart, but find nothing of interest."))
return
if(H.mind?.has_antag_datum(/datum/antagonist/ashwalker) && (H.key || H.get_ghost(FALSE, TRUE))) //special interactions for dead lava lizards with ghosts attached
visible_message(span_warning("Serrated tendrils carefully pull [H] to [src], absorbing the body and creating it anew."))
var/datum/mind/deadmind
if(H.key)
deadmind = H
else
deadmind = H.get_ghost(FALSE, TRUE)
to_chat(deadmind, "Your body has been returned to the nest. You are being remade anew, and will awaken shortly. </br><b>Your memories will remain intact in your new body, as your soul is being salvaged</b>")
SEND_SOUND(deadmind, sound('sound/magic/enter_blood.ogg',volume=100))
addtimer(CALLBACK(src, .proc/remake_walker, H.mind, H.real_name), 20 SECONDS)
new /obj/effect/gibspawner/generic(get_turf(H))
qdel(H)
return
if(ismegafauna(H))
meat_counter += 20
else
meat_counter++
visible_message(span_warning("Serrated tendrils eagerly pull [H] to [src], tearing the body apart as its blood seeps over the eggs."))
playsound(get_turf(src),'sound/magic/demon_consume.ogg', 100, TRUE)
var/deliverykey = H.fingerprintslast //key of whoever brought the body
var/mob/living/deliverymob = get_mob_by_key(deliverykey) //mob of said key
//there is a 40% chance that the Lava Lizard unlocks their respawn with each sacrifice
if(deliverymob && (deliverymob.mind?.has_antag_datum(/datum/antagonist/ashwalker)) && (deliverykey in ashies.players_spawned) && (prob(40)))
to_chat(deliverymob, span_warning("<b>The Necropolis is pleased with your sacrifice. You feel confident your existence after death is secure.</b>"))
ashies.players_spawned -= deliverykey
H.gib()
obj_integrity = min(obj_integrity + max_integrity*0.05,max_integrity)//restores 5% hp of tendril
for(var/mob/living/L in view(src, 5))
if(L.mind?.has_antag_datum(/datum/antagonist/ashwalker))
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "headspear", /datum/mood_event/sacrifice_good)
else
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "headspear", /datum/mood_event/sacrifice_bad)
/obj/structure/lavaland/ash_walker/proc/remake_walker(datum/mind/oldmind, oldname)
var/mob/living/carbon/human/M = new /mob/living/carbon/human(get_step(loc, pick(GLOB.alldirs)))
M.set_species(/datum/species/lizard/ashwalker)
M.real_name = oldname
M.underwear = "Nude"
M.undershirt = "Nude"
M.socks = "Nude"
M.update_body()
M.remove_language(/datum/language/common)
oldmind.transfer_to(M)
M.mind.grab_ghost()
to_chat(M, "<b>You have been pulled back from beyond the grave, with a new body and renewed purpose. Glory to the Necropolis!</b>")
playsound(get_turf(M),'sound/magic/exit_blood.ogg', 100, TRUE)
/obj/structure/lavaland/ash_walker/proc/spawn_mob()
if(meat_counter >= ASH_WALKER_SPAWN_THRESHOLD)
new /obj/effect/mob_spawn/human/ash_walker(get_step(loc, pick(GLOB.alldirs)))
new /obj/effect/mob_spawn/human/ash_walker(get_step(loc, pick(GLOB.alldirs)), ashies)
visible_message("<span class='danger'>One of the eggs swells to an unnatural size and tumbles free. It's ready to hatch!</span>")
meat_counter -= ASH_WALKER_SPAWN_THRESHOLD