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

Нерф линка Горжера #296

Merged
merged 8 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ GLOBAL_LIST_INIT(xenoupgradetiers, list(XENO_UPGRADE_BASETYPE, XENO_UPGRADE_INVA
#define GORGER_REJUVENATE_HEAL 0.05 //in %
#define GORGER_REJUVENATE_THRESHOLD 0.10 //in %
#define GORGER_PSYCHIC_LINK_CHANNEL 10 SECONDS
#define GORGER_PSYCHIC_LINK_RANGE 15
#define GORGER_PSYCHIC_LINK_RANGE 7
#define GORGER_PSYCHIC_LINK_REDIRECT 0.5 //in %
#define GORGER_PSYCHIC_LINK_MIN_HEALTH 0.2 //in %
#define GORGER_CARNAGE_HEAL 0.2
Expand Down
18 changes: 15 additions & 3 deletions code/datums/status_effects/xeno_buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,9 @@
// ***************************************
// *********** Psychic Link
// ***************************************
/obj/effect/ebeam/psychic_link
name = "psychic link"

/datum/status_effect/xeno_psychic_link
id = "xeno_psychic_link"
tick_interval = 2 SECONDS
Expand All @@ -414,6 +417,8 @@
var/minimum_health
///If the target xeno was within range
var/was_within_range = FALSE
/// The beam used to represent the link between linked xenos.
var/datum/beam/current_beam

/datum/status_effect/xeno_psychic_link/on_creation(mob/living/new_owner, set_duration, mob/living/carbon/target_mob, link_range, redirect_mod, minimum_health, scaling = FALSE)
owner = new_owner
Expand All @@ -439,11 +444,9 @@

/datum/status_effect/xeno_psychic_link/on_remove()
. = ..()
UnregisterSignal(target_mob, list(COMSIG_XENOMORPH_BRUTE_DAMAGE, COMSIG_XENOMORPH_BURN_DAMAGE))
REMOVE_TRAIT(target_mob, TRAIT_PSY_LINKED, TRAIT_STATUS_EFFECT(id))
REMOVE_TRAIT(owner, TRAIT_PSY_LINKED, TRAIT_STATUS_EFFECT(id))
owner.remove_filter(id)
target_mob.remove_filter(id)
Helg2 marked this conversation as resolved.
Show resolved Hide resolved
link_toggle(FALSE)
to_chat(target_mob, span_xenonotice("[owner] has unlinked from you."))
SEND_SIGNAL(src, COMSIG_XENO_PSYCHIC_LINK_REMOVED)

Expand All @@ -469,11 +472,20 @@
RegisterSignal(target_mob, COMSIG_XENOMORPH_BRUTE_DAMAGE, PROC_REF(handle_brute_damage))
owner.add_filter(id, 2, outline_filter(2, PSYCHIC_LINK_COLOR))
target_mob.add_filter(id, 2, outline_filter(2, PSYCHIC_LINK_COLOR))
toggle_beam(TRUE)
return
UnregisterSignal(target_mob, COMSIG_XENOMORPH_BURN_DAMAGE)
UnregisterSignal(target_mob, COMSIG_XENOMORPH_BRUTE_DAMAGE)
owner.remove_filter(id)
target_mob.remove_filter(id)
toggle_beam(FALSE)

/// Toggles the effect beam on or off.
/datum/status_effect/xeno_psychic_link/proc/toggle_beam(toggle)
if(!toggle)
QDEL_NULL(current_beam)
return
current_beam = owner.beam(target_mob, icon_state= "blood_light", beam_type = /obj/effect/ebeam/psychic_link)

///Transfers mitigated burn damage
/datum/status_effect/xeno_psychic_link/proc/handle_burn_damage(datum/source, amount, list/amount_mod)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,9 @@
/datum/action/ability/activable/xeno/psychic_link/proc/apply_psychic_link(atom/target)
link_cleanup()
if(HAS_TRAIT(owner, TRAIT_PSY_LINKED) || HAS_TRAIT(target, TRAIT_PSY_LINKED))
Helg2 marked this conversation as resolved.
Show resolved Hide resolved
return fail_activate()
if(HAS_TRAIT(owner, TRAIT_PSY_LINKED))
to_chat(owner, span_notice("Cancelled link to [target]."))
cancel_psychic_link()
if(do_after(owner, 1 SECONDS, NONE, target, BUSY_ICON_FRIENDLY, BUSY_ICON_FRIENDLY))
to_chat(owner, span_notice("Cancelled link to [target]."))
cancel_psychic_link()
Helg2 marked this conversation as resolved.
Show resolved Hide resolved
return

var/mob/living/carbon/xenomorph/owner_xeno = owner
Expand Down
Loading