mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
[PTBF] Adds a new hallucination, Blind Rushers! (#27717)
* adds the hallucination * makes sure the hallucination looks at the player correctly * spellin fix * oh yeah this is much better- wait why are there only two of you now * A bunch of Gatcha's and DGamer's reviews * remove is_text stuff because it's not needed at all * latest reviews + hallucination list reviews * Update code/modules/hallucinations/effects/blind_rush_hallucination.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Taurtura <141481662+Taurtura@users.noreply.github.com> * Update code/modules/hallucinations/effects/blind_rush_hallucination.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Taurtura <141481662+Taurtura@users.noreply.github.com> * adds last hallucination to list * Update code/modules/hallucinations/effects/blind_rush_hallucination.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Taurtura <141481662+Taurtura@users.noreply.github.com> --------- Signed-off-by: Taurtura <141481662+Taurtura@users.noreply.github.com> Signed-off-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* # Hallucination - Blind Rush
|
||||
*
|
||||
* Makes target blind and causes them to see semi-transparent humanoids running at them.
|
||||
*/
|
||||
/datum/hallucination_manager/blind_rush
|
||||
initial_hallucination = /obj/effect/hallucination/no_delete/blind_rusher
|
||||
trigger_time = 3.4 SECONDS //total length of the hallucination is a little more than ten seconds
|
||||
|
||||
/datum/hallucination_manager/blind_rush/get_spawn_location()
|
||||
var/list/turfs = orange(13, owner.loc)
|
||||
return pick(turfs)
|
||||
|
||||
/datum/hallucination_manager/blind_rush/on_spawn()
|
||||
owner.playsound_local(get_turf(src), 'sound/spookoween/ghost_whisper.ogg', 30, TRUE)
|
||||
owner.become_blind("hallucination")
|
||||
to_chat(owner, "<span class='whisper'>Who turned off the light?</span>", MESSAGE_TYPE_INFO)
|
||||
|
||||
/datum/hallucination_manager/blind_rush/on_trigger()
|
||||
var/turf/spawn_location = get_spawn_location() //we need a new spawn location incase the player moved
|
||||
hallucination_list += new /obj/effect/hallucination/no_delete/blind_rusher(spawn_location, owner)
|
||||
to_chat(owner, "<span class='danger'>They're here.</span>", MESSAGE_TYPE_INFO)
|
||||
trigger_timer = addtimer(CALLBACK(src, PROC_REF(on_second_trigger)), trigger_time, TIMER_DELETE_ME)
|
||||
|
||||
/datum/hallucination_manager/blind_rush/proc/on_second_trigger()
|
||||
var/turf/spawn_location = get_spawn_location()
|
||||
hallucination_list += new /obj/effect/hallucination/no_delete/blind_rusher(spawn_location, owner)
|
||||
owner.Confused(9 SECONDS)
|
||||
owner.Jitter(9 SECONDS)
|
||||
to_chat(owner, "<span class='userdanger'>Run!</span>", MESSAGE_TYPE_INFO)
|
||||
trigger_timer = addtimer(CALLBACK(src, PROC_REF(on_last_trigger)), trigger_time, TIMER_DELETE_ME)
|
||||
|
||||
/datum/hallucination_manager/blind_rush/proc/on_last_trigger()
|
||||
owner.emote("collapse")
|
||||
owner.cure_blind("hallucination")
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/hallucination/no_delete/blind_rusher
|
||||
name = "Unknown"
|
||||
alpha = 100
|
||||
hallucination_plane = 25 //to make sure we render the hallucination above the blindness layer.
|
||||
hallucination_layer = 25
|
||||
hallucination_icon = 'icons/mob/simple_human.dmi'
|
||||
hallucination_icon_state = ("faceless")
|
||||
hallucination_override = TRUE
|
||||
var/min_distance = 0
|
||||
var/rush_time = 2 DECISECONDS
|
||||
var/rush_timer = null
|
||||
|
||||
/obj/effect/hallucination/no_delete/blind_rusher/Initialize(mapload, mob/living/carbon/target)
|
||||
rush_timer = addtimer(CALLBACK(src, PROC_REF(rush)), rush_time, TIMER_LOOP | TIMER_STOPPABLE)
|
||||
if(prob(50))
|
||||
hallucination_icon = 'icons/mob/simple_human.dmi'
|
||||
hallucination_icon_state = pick("clown", "skeleton_warden", "skeleton_warden_alt")
|
||||
return ..()
|
||||
|
||||
/obj/effect/hallucination/no_delete/blind_rusher/Destroy()
|
||||
deltimer(rush_timer)
|
||||
return ..()
|
||||
|
||||
/obj/effect/hallucination/no_delete/blind_rusher/proc/rush()
|
||||
if(get_dist(src, target) > min_distance)
|
||||
var/direction = get_dir(src, target) //making sure the hallucination is facing the player correctly.
|
||||
forceMove(get_step(src, direction)) //forceMove to go through walls and other dense turfs.
|
||||
dir = direction
|
||||
else
|
||||
target.playsound_local(get_turf(src), 'sound/misc/demon_attack1.ogg', 25, TRUE)
|
||||
qdel(src)
|
||||
@@ -32,6 +32,7 @@ GLOBAL_LIST_INIT(hallucinations, list(
|
||||
/obj/effect/hallucination/fake_grenade/spawner = 10,
|
||||
/obj/effect/hallucination/terror_infestation = 10,
|
||||
/obj/effect/hallucination/loose_energy_ball = 10,
|
||||
/datum/hallucination_manager/blind_rush = 1,
|
||||
/datum/hallucination_manager/xeno_pounce = 10,
|
||||
/datum/hallucination_manager/waves = 2,
|
||||
/obj/effect/hallucination/blob = 10,
|
||||
@@ -56,6 +57,8 @@ GLOBAL_LIST_INIT(hallucinations, list(
|
||||
var/hallucination_override = FALSE
|
||||
/// Hallucination layer.
|
||||
var/hallucination_layer = MOB_LAYER
|
||||
///Hallucination plane.
|
||||
var/hallucination_plane = AREA_PLANE
|
||||
/// The mob that sees this hallucination.
|
||||
var/mob/living/carbon/target = null
|
||||
/// Lazy list of images created as part of the hallucination. Cleared on destruction.
|
||||
@@ -73,6 +76,7 @@ GLOBAL_LIST_INIT(hallucinations, list(
|
||||
var/image/I = image(hallucination_icon, hallucination_override ? src : get_turf(src), hallucination_icon_state)
|
||||
I.override = hallucination_override
|
||||
I.layer = hallucination_layer
|
||||
I.plane = hallucination_plane
|
||||
add_icon(I)
|
||||
// Lifetime
|
||||
if(islist(duration))
|
||||
|
||||
Reference in New Issue
Block a user