From 3bab83f6a10aec08ec904633bef46f1ef3d2a70a Mon Sep 17 00:00:00 2001 From: Waselon Date: Thu, 12 Sep 2024 07:41:30 +0300 Subject: [PATCH 1/5] link --- code/__DEFINES/mobs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 68016e0737b..945db0cb10f 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -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 6 #define GORGER_PSYCHIC_LINK_REDIRECT 0.5 //in % #define GORGER_PSYCHIC_LINK_MIN_HEALTH 0.2 //in % #define GORGER_CARNAGE_HEAL 0.2 From 2c5e8e34e9c5ab36b1148fe834a95e9027757eec Mon Sep 17 00:00:00 2001 From: Waselon Date: Thu, 12 Sep 2024 07:41:40 +0300 Subject: [PATCH 2/5] . --- code/datums/status_effects/xeno_buffs.dm | 18 +++++++++++++++--- .../castes/gorger/abilities_gorger.dm | 2 -- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/code/datums/status_effects/xeno_buffs.dm b/code/datums/status_effects/xeno_buffs.dm index 6dd83f2e636..ae606786970 100644 --- a/code/datums/status_effects/xeno_buffs.dm +++ b/code/datums/status_effects/xeno_buffs.dm @@ -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 @@ -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 @@ -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) + link_toggle(FALSE) to_chat(target_mob, span_xenonotice("[owner] has unlinked from you.")) SEND_SIGNAL(src, COMSIG_XENO_PSYCHIC_LINK_REMOVED) @@ -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) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm index 9bfba85b2a0..a257ff1afc0 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm @@ -339,8 +339,6 @@ /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)) - return fail_activate() - if(HAS_TRAIT(owner, TRAIT_PSY_LINKED)) to_chat(owner, span_notice("Cancelled link to [target].")) cancel_psychic_link() return From b24ec281bedb03ce38d1c5575a003f5e83738e8c Mon Sep 17 00:00:00 2001 From: Waselon Date: Thu, 12 Sep 2024 19:17:41 +0300 Subject: [PATCH 3/5] . --- code/__DEFINES/mobs.dm | 2 +- .../carbon/xenomorph/castes/gorger/abilities_gorger.dm | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 945db0cb10f..9fc78e46343 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -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 6 +#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 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm index a257ff1afc0..8871411b33c 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm @@ -339,8 +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)) - 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() return var/mob/living/carbon/xenomorph/owner_xeno = owner From 88c0a84b9798dd1e5a29d67ed46386409a1d96e4 Mon Sep 17 00:00:00 2001 From: Waselon Date: Fri, 13 Sep 2024 22:02:53 +0300 Subject: [PATCH 4/5] . --- .../living/carbon/xenomorph/castes/gorger/abilities_gorger.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm index 8871411b33c..6fc2f3c29a7 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm @@ -339,6 +339,7 @@ /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)) + balloon_alert(owner, "removing 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() From 723c61308d26da3cb5083d87e3c5f0bceea14029 Mon Sep 17 00:00:00 2001 From: Waselon Date: Fri, 13 Sep 2024 22:04:28 +0300 Subject: [PATCH 5/5] . --- .../living/carbon/xenomorph/castes/gorger/abilities_gorger.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm index 6fc2f3c29a7..a7a30e4927a 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/gorger/abilities_gorger.dm @@ -339,7 +339,7 @@ /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)) - balloon_alert(owner, "removing link...") + owner.balloon_alert(owner, "removing 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()