mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Adds Shadow demons (#19732)
* reshuffle * shared base type * moves this to the base type * the monster * event * FUCK * better sprites * refactors bloodcrawl, more nice sprites * review stuff * Apply suggestions from code review Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> * heart of darkness * pre TM tweaks * ARGH * hopefully fixes double hits * tweaks * derp * tweaks * TEMP RUNTIME REMOVE LATER * fixes * runtime fixes * cig runtime fix * review + another runtime fix * re adds sprite * removes runtime * oop I forgor * DRUNK CODING * SPRITES Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -197,6 +197,7 @@ GLOBAL_LIST_EMPTY(event_last_fired)
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Traders", /datum/event/traders, 85, is_one_shot = TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Terror Spiders", /datum/event/spider_terror, 20, list(ASSIGNMENT_SECURITY = 4), TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Slaughter Demon", /datum/event/spawn_slaughter, 10, is_one_shot = TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Shadow Demon", /datum/event/spawn_slaughter/shadow, 50, is_one_shot = TRUE)
|
||||
//new /datum/event_meta(EVENT_LEVEL_MAJOR, "Floor Cluwne", /datum/event/spawn_floor_cluwne, 15, is_one_shot = TRUE)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/datum/event/spawn_slaughter
|
||||
var/key_of_slaughter
|
||||
var/demon = /mob/living/simple_animal/slaughter/lesser
|
||||
var/mob/living/simple_animal/demon/demon = /mob/living/simple_animal/demon/slaughter/lesser
|
||||
|
||||
/datum/event/spawn_slaughter/proc/get_slaughter()
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a slaughter demon?", ROLE_DEMON, TRUE, source = /mob/living/simple_animal/slaughter)
|
||||
var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a [initial(demon.name)]?", ROLE_DEMON, TRUE, source = demon)
|
||||
if(!length(candidates))
|
||||
kill()
|
||||
return
|
||||
@@ -17,25 +17,41 @@
|
||||
|
||||
var/datum/mind/player_mind = new /datum/mind(key_of_slaughter)
|
||||
player_mind.active = TRUE
|
||||
var/list/spawn_locs = list()
|
||||
var/turf/spawn_loc = get_spawn_loc(player_mind.current)
|
||||
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(spawn_loc)
|
||||
var/mob/living/simple_animal/demon/S = new demon(holder)
|
||||
player_mind.transfer_to(S)
|
||||
player_mind.assigned_role = "Demon"
|
||||
player_mind.special_role = SPECIAL_ROLE_DEMON
|
||||
message_admins("[key_name_admin(S)] has been made into a [S.name] by an event.")
|
||||
log_game("[key_name_admin(S)] was spawned as a [S.name] by an event.")
|
||||
|
||||
/datum/event/spawn_slaughter/proc/get_spawn_loc(mob/player)
|
||||
RETURN_TYPE(/turf)
|
||||
var/list/spawn_centers = list()
|
||||
for(var/obj/effect/landmark/spawner/rev/L in GLOB.landmarks_list)
|
||||
spawn_locs += get_turf(L)
|
||||
if(!spawn_locs) //If we can't find a good place, just spawn the revenant at the player's location
|
||||
spawn_locs += get_turf(player_mind.current)
|
||||
if(!spawn_locs) //If we can't find THAT, then give up
|
||||
spawn_centers += get_turf(L)
|
||||
if(!spawn_centers) //If we can't find a good place, just spawn the revenant at the player's location
|
||||
spawn_centers += get_turf(player)
|
||||
if(!spawn_centers) //If we can't find THAT, then give up
|
||||
kill()
|
||||
return
|
||||
var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(pick(spawn_locs))
|
||||
var/mob/living/simple_animal/slaughter/S = new demon(holder)
|
||||
S.holder = holder
|
||||
player_mind.transfer_to(S)
|
||||
player_mind.assigned_role = "Slaughter Demon"
|
||||
player_mind.special_role = SPECIAL_ROLE_SLAUGHTER_DEMON
|
||||
message_admins("[key_name_admin(S)] has been made into a Slaughter Demon by an event.")
|
||||
log_game("[key_name_admin(S)] was spawned as a Slaughter Demon by an event.")
|
||||
return pick(spawn_centers)
|
||||
|
||||
|
||||
/datum/event/spawn_slaughter/start()
|
||||
INVOKE_ASYNC(src, PROC_REF(get_slaughter))
|
||||
|
||||
/datum/event/spawn_slaughter/greater
|
||||
demon = /mob/living/simple_animal/slaughter
|
||||
demon = /mob/living/simple_animal/demon/slaughter
|
||||
|
||||
/datum/event/spawn_slaughter/shadow
|
||||
demon = /mob/living/simple_animal/demon/shadow
|
||||
|
||||
/datum/event/spawn_slaughter/shadow/get_spawn_loc()
|
||||
var/turf/spawn_center = ..()
|
||||
for(var/turf/T in range(50, spawn_center))
|
||||
if(T.get_lumcount()) // if the turf is not pitch black
|
||||
continue
|
||||
return T // return the first turf that is dark nearby.
|
||||
kill()
|
||||
|
||||
Reference in New Issue
Block a user