Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slasher updates #5263

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,31 @@


/datum/action/cooldown/slasher/envelope_darkness/Activate(atom/target)
var/offset = GET_Z_PLANE_OFFSET(owner.z)
var/render = OFFSET_RENDER_TARGET(O_LIGHTING_VISUAL_RENDER_TARGET, offset)
owner.add_filter("envelope", 1, alpha_mask_filter(render, flags = MASK_INVERSE))
RegisterSignal(owner, COMSIG_MOB_AFTER_APPLY_DAMAGE, PROC_REF(break_envelope))
RegisterSignal(owner, COMSIG_ATOM_PRE_BULLET_ACT, PROC_REF(bullet_impact))
RegisterSignal(owner, COMSIG_ATOM_PRE_BULLET_ACT, PROC_REF(break_envelope))
START_PROCESSING(SSfastprocess, src)

/datum/action/cooldown/slasher/envelope_darkness/process()
var/turf/below_turf = get_turf(owner)
var/turf_light_level = below_turf.get_lumcount()
// Convert light level to alpha inversely (darker = more visible)
owner.alpha = clamp(200 * (1 - turf_light_level), 0, 200)



/datum/action/cooldown/slasher/envelope_darkness/Remove(mob/living/remove_from)
. = ..()
UnregisterSignal(owner, COMSIG_MOB_AFTER_APPLY_DAMAGE)
UnregisterSignal(owner, COMSIG_ATOM_PRE_BULLET_ACT)
owner.remove_filter("envelope")
owner.alpha = 255
STOP_PROCESSING(SSfastprocess, src)

/datum/action/cooldown/slasher/envelope_darkness/proc/break_envelope(datum/source, damage, damagetype)
/datum/action/cooldown/slasher/envelope_darkness/proc/break_envelope(datum/source, damage_amount, damagetype)
SIGNAL_HANDLER
if(damage_amount < 50)
return
UnregisterSignal(owner, COMSIG_MOB_AFTER_APPLY_DAMAGE)
UnregisterSignal(owner, COMSIG_ATOM_PRE_BULLET_ACT)
if(damage < 5)
return

var/mob/living/owner_mob = owner
for(var/i = 1 to 4)
owner_mob.blood_particles(2, max_deviation = rand(-120, 120), min_pixel_z = rand(-4, 12), max_pixel_z = rand(-4, 12))
Expand All @@ -33,7 +39,11 @@
var/datum/antagonist/slasher/slasher = owner_mob.mind?.has_antag_datum(/datum/antagonist/slasher)

slasher?.reduce_fear_area(15, 4)
owner.remove_filter("envelope")
owner_mob.alpha = 255
STOP_PROCESSING(SSfastprocess, src)

unset_click_ability(owner_mob, refund_cooldown = FALSE)


/datum/action/cooldown/slasher/envelope_darkness/proc/bullet_impact(mob/living/carbon/human/source, obj/projectile/hitting_projectile, def_zone)
SIGNAL_HANDLER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
/datum/action/cooldown/slasher/stalk_target/Activate(atom/target)
. = ..()
var/list/possible_targets = list()
for(var/datum/mind/possible_target as anything in get_crewmember_minds())
for(var/mob/possible_target as anything in GLOB.mob_list) //this needs to be in get_crewmembers_minds() but thats impossible to test
//if(possible_target == owner.mind)
//continue
if(!ishuman(possible_target.current))
if(!ishuman(possible_target))
continue
if(possible_target.current.stat == DEAD)
if(possible_target.stat == DEAD)
continue
possible_targets += possible_target.current
possible_targets += possible_target//.current

var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher)
if(slasherdatum && slasherdatum.stalked_human)
Expand All @@ -33,3 +33,10 @@
slasherdatum.stalked_human = living_target
owner_human.team_monitor.add_to_tracking_network(living_target.tracking_beacon)
owner_human.team_monitor.show_hud(owner_human)
to_chat(owner, span_notice("Your new target is [living_target]."))






Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
var/fear_amount = (15 - get_dist(owner, human))
slasherdatum.increase_fear(human, fear_amount)
addtimer(CALLBACK(src, PROC_REF(remove_overlay), human), 5 SECONDS)
var/list/apc_list = list()
for(var/obj/machinery/power/apc/apc in view(7, owner))
if(is_station_level(apc.z))
apc_list += apc
var/obj/machinery/power/apc/chosen_apc = pick(apc_list)
chosen_apc.overload_lighting()

/datum/action/cooldown/slasher/terror/proc/remove_overlay(mob/living/carbon/human/remover)
remover.clear_fullscreen("terror", 10)
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
var/list/tracked = list()
///this is our list of seers
var/list/seers = list()
///this is the time counter for stalking
var/time_counter = 0

/datum/antagonist/slasher/apply_innate_effects(mob/living/mob_override)
. = ..()
Expand Down Expand Up @@ -130,8 +132,8 @@
mobs_with_fullscreens -= held_ref

if(stalked_human)
for(var/mob/living/carbon/human in view(7, source))
if(stalked_human != human)
for(var/mob/living/mob in view(7, source))
if(stalked_human != mob)
continue
if(stalked_human.stat == DEAD)
failed_stalking()
Expand All @@ -144,6 +146,19 @@
if(linked_machette)
linked_machette.force += 2.5
linked_machette.throwforce += 2.5
stalked_human.soul_sucked = TRUE
if(HAS_TRAIT(stalked_human, TRAIT_USES_SKINTONES))
stalked_human.skin_tone = "albino"
stalked_human.dna.update_ui_block(DNA_SKIN_TONE_BLOCK)
else
var/datum/color_palette/generic_colors/located = stalked_human.dna.color_palettes[/datum/color_palette/generic_colors]
located.mutant_color = "#FFFFFF"
to_chat(stalked_human, span_warning("YOU FEEL COLD, AS IF YOUR SOUL HAS BEEN RIPPED FROM YOUR BODY."))
stalked_human.apply_damage(100, damagetype = BRUTE, spread_damage = TRUE)
stalked_human.set_jitter_if_lower(10 SECONDS)
stalked_human.emote("scream")
stalked_human.say("AAAAAAHHHH!!!", forced = "soulsucked")
souls_sucked++
stalked_human = null

/datum/antagonist/slasher/proc/failed_stalking()
Expand Down
Loading