From ad45c46f0d80c9a0e3a6acbfa4106983f9634d04 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 22 Nov 2024 06:37:42 +0300 Subject: [PATCH 01/13] init --- .../abilities/lurker/lurker_powers.dm | 28 ++++++++++--------- .../xenomorph/strains/castes/drone/healer.dm | 1 + .../strains/castes/lurker/vampire.dm | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 3c1d3a04543d..9a32d0067d1d 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -214,9 +214,10 @@ log_attack("[key_name(xeno)] attacked [key_name(target)] with Flurry") target.apply_armoured_damage(get_xeno_damage_slash(target, xeno.caste.melee_damage_upper), ARMOR_MELEE, BRUTE, rand_zone()) playsound(get_turf(target), 'sound/weapons/alien_claw_flesh4.ogg', 30, TRUE) - xeno.flick_heal_overlay(1 SECONDS, "#00B800") - xeno.gain_health(30) xeno.animation_attack_on(target) + if (!xeno.on_fire) + xeno.flick_heal_overlay(1 SECONDS, "#00B800") + xeno.gain_health(30) xeno.emote("roar") return ..() @@ -266,11 +267,7 @@ break if(iscarbon(hit_target) && !xeno.can_not_harm(hit_target) && hit_target.stat != DEAD) - if(targeted_atom == hit_target) //reward for a direct hit - to_chat(xeno, SPAN_XENOHIGHDANGER("We attack [hit_target], with our tail, piercing their body!")) - hit_target.apply_armoured_damage(15, ARMOR_MELEE, BRUTE, "chest") - else - to_chat(xeno, SPAN_XENODANGER("We attack [hit_target], slashing them with our tail!")) + to_chat(xeno, SPAN_XENODANGER("We slam [hit_target], throwing them back with our tail!")) else xeno.visible_message(SPAN_XENOWARNING("\The [xeno] swipes their tail through the air!"), SPAN_XENOWARNING("We swipe our tail through the air!")) apply_cooldown(cooldown_modifier = 0.2) @@ -290,10 +287,16 @@ hit_target.visible_message(SPAN_DANGER("[hit_target] slams into an obstacle!"), isxeno(hit_target) ? SPAN_XENODANGER("We slam into an obstacle!") : SPAN_HIGHDANGER("You slam into an obstacle!"), null, 4, CHAT_TYPE_TAKING_HIT) hit_target.apply_damage(MELEE_FORCE_TIER_2) + if (hit_target.mob_size < MOB_SIZE_BIG) + hit_target.KnockDown(1) + else + hit_target.Slow(1) + else if (hit_target.mob_size < MOB_SIZE_BIG) hit_target.KnockDown(0.5) else hit_target.Slow(0.5) + /// To reset the direction if they haven't moved since then in below callback. var/last_dir = xeno.dir @@ -304,8 +307,6 @@ var/new_dir = xeno.dir addtimer(CALLBACK(src, PROC_REF(reset_direction), xeno, last_dir, new_dir), 0.5 SECONDS) - hit_target.apply_armoured_damage(get_xeno_damage_slash(hit_target, xeno.caste.melee_damage_upper), ARMOR_MELEE, BRUTE, "chest") - hit_target.Slow(0.5) hit_target.last_damage_data = create_cause_data(xeno.caste_type, xeno) log_attack("[key_name(xeno)] attacked [key_name(hit_target)] with Tail Jab") @@ -374,10 +375,11 @@ xeno.animation_attack_on(target_carbon, pixel_offset = 16) target_carbon.apply_armoured_damage(60, ARMOR_MELEE, BRUTE, "head", 5) //DIE target_carbon.death(create_cause_data("headbite execution", xeno), FALSE) - xeno.gain_health(150) - xeno.xeno_jitter(1 SECONDS) - xeno.flick_heal_overlay(3 SECONDS, "#00B800") - xeno.emote("roar") + if (!xeno.on_fire) + xeno.gain_health(150) + xeno.xeno_jitter(1 SECONDS) + xeno.flick_heal_overlay(3 SECONDS, "#00B800") + xeno.emote("roar") log_attack("[key_name(xeno)] was executed by [key_name(target_carbon)] with a headbite!") apply_cooldown() return ..() diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm index 20006eaacbca..8468851a6284 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/drone/healer.dm @@ -262,6 +262,7 @@ if(target.health < 0) target.gain_health(abs(target.health)) // gets them out of crit first + target.ExtinguishMob() target.gain_health(xeno.health * transfer_mod) target.updatehealth() diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm index 820aa662c919..bb9d019e1f67 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm @@ -21,7 +21,7 @@ lurker.plasmapool_modifier = 0 lurker.health_modifier -= XENO_HEALTH_MOD_MED lurker.speed_modifier += XENO_SPEED_FASTMOD_TIER_1 - lurker.armor_modifier += XENO_ARMOR_MOD_LARGE + lurker.armor_modifier += XENO_ARMOR_MOD_MED lurker.damage_modifier -= XENO_DAMAGE_MOD_VERY_SMALL lurker.attack_speed_modifier -= 2 From 4d60a6fc80d9d9d93263d9817b8d052b1b5aa209 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 22 Nov 2024 09:18:24 +0300 Subject: [PATCH 02/13] flurry and rush changes --- .../xenomorph/abilities/general_abilities.dm | 1 + .../abilities/lurker/lurker_abilities.dm | 6 ++- .../abilities/lurker/lurker_powers.dm | 40 +++++++++++++++++-- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index 4d65b0303704..6095a44d07a7 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -221,6 +221,7 @@ var/throw_speed = SPEED_FAST // Throw speed var/tracks_target = TRUE // Does it track the target atom? + var/only_target_mobs = FALSE // Can only pounce at mobs var/list/pounce_callbacks = null // Specific callbacks to invoke when a pounce lands on an atom of a specific type // (note that if a collided atom does not match any of the key types, defaults to the appropriate X_launch_collision proc) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm index d4fb390f14f9..0fffe9d30f23 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm @@ -49,17 +49,19 @@ plasma_cost = 0 // Config options - distance = 4 + distance = 5 knockdown = FALSE freeze_self = FALSE + var/click_miss_cooldown = 15 + /datum/action/xeno_action/activable/flurry name = "Flurry" action_icon_state = "rav_spike" macro_path = /datum/action/xeno_action/verb/verb_flurry ability_primacy = XENO_PRIMARY_ACTION_2 action_type = XENO_ACTION_CLICK - xeno_cooldown = 3 SECONDS + xeno_cooldown = 4 SECONDS /datum/action/xeno_action/activable/tail_jab name = "Tail Jab" diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 9a32d0067d1d..008fc6efb44f 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -144,6 +144,37 @@ // VAMPIRE LURKER +/datum/action/xeno_action/activable/pounce/rush/use_ability(atom/target) + var/mob/living/carbon/xenomorph/xeno = owner + if(!action_cooldown_check()) + return + + if(!isturf(xeno.loc)) + to_chat(xeno, SPAN_XENOWARNING("We can't [action_text] from here!")) + return + + if(!xeno.check_state()) + return + + var/mob/living/carbon/carbon_target = target + if(get_dist(xeno, target) > distance) + to_chat(xeno, SPAN_XENOWARNING("This is too far, find a closer target.")) + return FALSE + if(!iscarbon(target) || carbon_target.stat == DEAD) + for(var/mob/living/carbon/carbon in get_turf(target)) + carbon_target = carbon + if(carbon_target.stat != DEAD) + break + if(!iscarbon(carbon_target)) + owner.visible_message(SPAN_XENOWARNING("[xeno]'s claws twitch."), SPAN_XENOWARNING("Our claws twitch as we lack the target to rush at. Wait a moment to try again.")) + apply_cooldown_override(click_miss_cooldown) + return FALSE + . = ..(carbon_target) + if(!.) + return + if(xeno.can_not_harm(carbon_target)) + xeno.emote("needshelp") + /datum/action/xeno_action/activable/pounce/rush/additional_effects(mob/living/living_target) //pounce effects var/mob/living/carbon/target = living_target var/mob/living/carbon/xenomorph/xeno = owner @@ -278,7 +309,10 @@ var/stab_direction stab_direction = turn(get_dir(xeno, targeted_atom), 180) - playsound(hit_target,'sound/weapons/alien_tail_attack.ogg', 50, TRUE) + if(prob(1)) + playsound(hit_target, 'sound/effects/comical_bonk.ogg', 50, TRUE) + else + playsound(hit_target, "punch", 50, TRUE) var/direction = Get_Compass_Dir(xeno, targeted_atom) //More precise than get_dir. @@ -287,12 +321,12 @@ hit_target.visible_message(SPAN_DANGER("[hit_target] slams into an obstacle!"), isxeno(hit_target) ? SPAN_XENODANGER("We slam into an obstacle!") : SPAN_HIGHDANGER("You slam into an obstacle!"), null, 4, CHAT_TYPE_TAKING_HIT) hit_target.apply_damage(MELEE_FORCE_TIER_2) - if (hit_target.mob_size < MOB_SIZE_BIG) + if(hit_target.mob_size < MOB_SIZE_BIG) hit_target.KnockDown(1) else hit_target.Slow(1) else - if (hit_target.mob_size < MOB_SIZE_BIG) + if(hit_target.mob_size < MOB_SIZE_BIG) hit_target.KnockDown(0.5) else hit_target.Slow(0.5) From 7d00bf7201a8c88022a3c6e44297400edd13f3d6 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 22 Nov 2024 09:31:06 +0300 Subject: [PATCH 03/13] fix --- .../living/carbon/xenomorph/abilities/lurker/lurker_powers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 008fc6efb44f..1ce9591187a1 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -165,7 +165,7 @@ carbon_target = carbon if(carbon_target.stat != DEAD) break - if(!iscarbon(carbon_target)) + if(!iscarbon(carbon_target) && carbon_target.stat != DEAD) owner.visible_message(SPAN_XENOWARNING("[xeno]'s claws twitch."), SPAN_XENOWARNING("Our claws twitch as we lack the target to rush at. Wait a moment to try again.")) apply_cooldown_override(click_miss_cooldown) return FALSE From 114ef8ce1d623a63e87bc334b918bdc212686f5f Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 22 Nov 2024 09:42:10 +0300 Subject: [PATCH 04/13] actual fix --- .../living/carbon/xenomorph/abilities/lurker/lurker_powers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 1ce9591187a1..6a2ff70c288a 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -165,7 +165,7 @@ carbon_target = carbon if(carbon_target.stat != DEAD) break - if(!iscarbon(carbon_target) && carbon_target.stat != DEAD) + if(!iscarbon(carbon_target) || carbon_target.stat == DEAD) owner.visible_message(SPAN_XENOWARNING("[xeno]'s claws twitch."), SPAN_XENOWARNING("Our claws twitch as we lack the target to rush at. Wait a moment to try again.")) apply_cooldown_override(click_miss_cooldown) return FALSE From efa907a1717a97032e5386d44bd8e2af2d0a6988 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 22 Nov 2024 14:06:35 +0300 Subject: [PATCH 05/13] oops --- .../mob/living/carbon/xenomorph/abilities/general_abilities.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index 6095a44d07a7..4d65b0303704 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -221,7 +221,6 @@ var/throw_speed = SPEED_FAST // Throw speed var/tracks_target = TRUE // Does it track the target atom? - var/only_target_mobs = FALSE // Can only pounce at mobs var/list/pounce_callbacks = null // Specific callbacks to invoke when a pounce lands on an atom of a specific type // (note that if a collided atom does not match any of the key types, defaults to the appropriate X_launch_collision proc) From 6e9834172a7471485ada15854f8e91cd28e772cb Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Sat, 23 Nov 2024 14:12:41 +0300 Subject: [PATCH 06/13] tail jab changes --- .../abilities/lurker/lurker_abilities.dm | 3 +-- .../abilities/lurker/lurker_powers.dm | 19 +++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm index 0fffe9d30f23..cb9215c81e06 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm @@ -53,8 +53,6 @@ knockdown = FALSE freeze_self = FALSE - var/click_miss_cooldown = 15 - /datum/action/xeno_action/activable/flurry name = "Flurry" action_icon_state = "rav_spike" @@ -70,6 +68,7 @@ ability_primacy = XENO_PRIMARY_ACTION_3 action_type = XENO_ACTION_CLICK xeno_cooldown = 7 SECONDS + charge_time = 1 SECONDS /datum/action/xeno_action/activable/headbite name = "Headbite" diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 6a2ff70c288a..dbf23881e820 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -167,7 +167,7 @@ break if(!iscarbon(carbon_target) || carbon_target.stat == DEAD) owner.visible_message(SPAN_XENOWARNING("[xeno]'s claws twitch."), SPAN_XENOWARNING("Our claws twitch as we lack the target to rush at. Wait a moment to try again.")) - apply_cooldown_override(click_miss_cooldown) + apply_cooldown(cooldown_modifier = 0.25) return FALSE . = ..(carbon_target) if(!.) @@ -298,7 +298,7 @@ break if(iscarbon(hit_target) && !xeno.can_not_harm(hit_target) && hit_target.stat != DEAD) - to_chat(xeno, SPAN_XENODANGER("We slam [hit_target], throwing them back with our tail!")) + to_chat(xeno, SPAN_XENODANGER("We attack [hit_target], slashing them with our tail!")) else xeno.visible_message(SPAN_XENOWARNING("\The [xeno] swipes their tail through the air!"), SPAN_XENOWARNING("We swipe our tail through the air!")) apply_cooldown(cooldown_modifier = 0.2) @@ -309,10 +309,7 @@ var/stab_direction stab_direction = turn(get_dir(xeno, targeted_atom), 180) - if(prob(1)) - playsound(hit_target, 'sound/effects/comical_bonk.ogg', 50, TRUE) - else - playsound(hit_target, "punch", 50, TRUE) + playsound(hit_target,'sound/weapons/alien_tail_attack.ogg', 50, TRUE) var/direction = Get_Compass_Dir(xeno, targeted_atom) //More precise than get_dir. @@ -321,12 +318,7 @@ hit_target.visible_message(SPAN_DANGER("[hit_target] slams into an obstacle!"), isxeno(hit_target) ? SPAN_XENODANGER("We slam into an obstacle!") : SPAN_HIGHDANGER("You slam into an obstacle!"), null, 4, CHAT_TYPE_TAKING_HIT) hit_target.apply_damage(MELEE_FORCE_TIER_2) - if(hit_target.mob_size < MOB_SIZE_BIG) - hit_target.KnockDown(1) - else - hit_target.Slow(1) - else - if(hit_target.mob_size < MOB_SIZE_BIG) + if (hit_target.mob_size < MOB_SIZE_BIG) hit_target.KnockDown(0.5) else hit_target.Slow(0.5) @@ -341,11 +333,14 @@ var/new_dir = xeno.dir addtimer(CALLBACK(src, PROC_REF(reset_direction), xeno, last_dir, new_dir), 0.5 SECONDS) + hit_target.apply_armoured_damage(get_xeno_damage_slash(hit_target, xeno.caste.melee_damage_upper), ARMOR_MELEE, BRUTE, "chest") + hit_target.Slow(0.5) hit_target.last_damage_data = create_cause_data(xeno.caste_type, xeno) log_attack("[key_name(xeno)] attacked [key_name(hit_target)] with Tail Jab") apply_cooldown() + xeno_attack_delay(xeno) return ..() /datum/action/xeno_action/activable/tail_jab/proc/reset_direction(mob/living/carbon/xenomorph/xeno, last_dir, new_dir) From 8b9da3a60a4262e85475c5a2089e6bb26665c1e3 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Sat, 23 Nov 2024 14:18:10 +0300 Subject: [PATCH 07/13] uh --- .../living/carbon/xenomorph/abilities/lurker/lurker_powers.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index dbf23881e820..5e38202d9412 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -268,6 +268,9 @@ if(distance > 2) return + if (world.time <= xeno.next_move) + return + var/list/turf/path = get_line(xeno, targeted_atom, include_start_atom = FALSE) for(var/turf/path_turf as anything in path) if(path_turf.density) From 130b42fa8fb16cce5e193b740e1bc890f53a3d87 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Sun, 24 Nov 2024 08:03:17 +0300 Subject: [PATCH 08/13] another approach --- .../xenomorph/abilities/lurker/lurker_powers.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 5e38202d9412..1f70ca71dc47 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -166,8 +166,7 @@ if(carbon_target.stat != DEAD) break if(!iscarbon(carbon_target) || carbon_target.stat == DEAD) - owner.visible_message(SPAN_XENOWARNING("[xeno]'s claws twitch."), SPAN_XENOWARNING("Our claws twitch as we lack the target to rush at. Wait a moment to try again.")) - apply_cooldown(cooldown_modifier = 0.25) + to_chat(xeno, SPAN_XENOWARNING("We need a target to rush at, hostile or not.")) return FALSE . = ..(carbon_target) if(!.) @@ -321,10 +320,11 @@ hit_target.visible_message(SPAN_DANGER("[hit_target] slams into an obstacle!"), isxeno(hit_target) ? SPAN_XENODANGER("We slam into an obstacle!") : SPAN_HIGHDANGER("You slam into an obstacle!"), null, 4, CHAT_TYPE_TAKING_HIT) hit_target.apply_damage(MELEE_FORCE_TIER_2) - if (hit_target.mob_size < MOB_SIZE_BIG) - hit_target.KnockDown(0.5) - else - hit_target.Slow(0.5) + + if (hit_target.mob_size < MOB_SIZE_BIG) + hit_target.KnockDown(0.5) + else + hit_target.Slow(0.5) /// To reset the direction if they haven't moved since then in below callback. var/last_dir = xeno.dir From 6cf857e8309cce75895c36d4bb60a871f6985023 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 17 Jan 2025 09:45:08 +0300 Subject: [PATCH 09/13] what do I type here? --- .../xenomorph/abilities/general_abilities.dm | 1 + .../xenomorph/abilities/general_powers.dm | 2 +- .../abilities/lurker/lurker_powers.dm | 34 ++++++++++++++++++- .../strains/castes/lurker/vampire.dm | 8 ++++- 4 files changed, 42 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index 4d65b0303704..6e08a2021a51 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -223,6 +223,7 @@ var/list/pounce_callbacks = null // Specific callbacks to invoke when a pounce lands on an atom of a specific type // (note that if a collided atom does not match any of the key types, defaults to the appropriate X_launch_collision proc) + var/list/pounce_end_callbacks = null // Callbacks to call when the pounce (throw) ends /datum/action/xeno_action/activable/pounce/New() . = ..() diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm index e8a2753cb628..666584eee9c0 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -435,7 +435,7 @@ pre_pounce_effects() X.pounce_distance = get_dist(X, A) - X.throw_atom(A, distance, throw_speed, X, launch_type = LOW_LAUNCH, pass_flags = pounce_pass_flags, collision_callbacks = pounce_callbacks) + X.throw_atom(A, distance, throw_speed, X, launch_type = LOW_LAUNCH, pass_flags = pounce_pass_flags, end_throw_callbacks = pounce_end_callbacks, collision_callbacks = pounce_callbacks) X.update_icons() additional_effects_always() diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 1f70ca71dc47..8bc28b26d12c 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -144,11 +144,18 @@ // VAMPIRE LURKER +/datum/action/xeno_action/activable/pounce/rush/New() + . = ..() + pounce_end_callbacks = list(CALLBACK(src, PROC_REF(on_end_rush))) + /datum/action/xeno_action/activable/pounce/rush/use_ability(atom/target) var/mob/living/carbon/xenomorph/xeno = owner if(!action_cooldown_check()) return + if(target == xeno) + return + if(!isturf(xeno.loc)) to_chat(xeno, SPAN_XENOWARNING("We can't [action_text] from here!")) return @@ -168,15 +175,24 @@ if(!iscarbon(carbon_target) || carbon_target.stat == DEAD) to_chat(xeno, SPAN_XENOWARNING("We need a target to rush at, hostile or not.")) return FALSE + + var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate + vamp.rush_target_ref = WEAKREF(carbon_target) + . = ..(carbon_target) + if(!.) + vamp.rush_target_ref = null return + if(xeno.can_not_harm(carbon_target)) xeno.emote("needshelp") -/datum/action/xeno_action/activable/pounce/rush/additional_effects(mob/living/living_target) //pounce effects +/datum/action/xeno_action/activable/pounce/rush/additional_effects(mob/living/living_target) //rush effects var/mob/living/carbon/target = living_target var/mob/living/carbon/xenomorph/xeno = owner + var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate + vamp.rush_target_ref = null target.sway_jitter(times = 2) xeno.animation_attack_on(target) xeno.flick_attack_overlay(target, "slash") //fake slash to prevent disarm abuse @@ -185,6 +201,22 @@ playsound(get_turf(target), 'sound/weapons/alien_claw_flesh3.ogg', 30, TRUE) shake_camera(target, 2, 1) +/datum/action/xeno_action/activable/pounce/rush/proc/on_end_rush() + var/mob/living/carbon/xenomorph/xeno = owner + var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate + if(!vamp.rush_target_ref) + return + + var/mob/living/target = vamp.rush_target_ref.resolve() + vamp.rush_target_ref = null + if(!target) + return + if(!xeno.check_state()) + return + if(target.stat == DEAD || xeno.can_not_harm(target) || !xeno.Adjacent(target)) + return + additional_effects(target) + /datum/action/xeno_action/activable/flurry/use_ability(atom/targeted_atom) //flurry ability var/mob/living/carbon/xenomorph/xeno = owner diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm index bb9d019e1f67..284be1d8f1be 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/lurker/vampire.dm @@ -16,12 +16,13 @@ /datum/action/xeno_action/activable/tail_jab, /datum/action/xeno_action/activable/headbite, ) + behavior_delegate_type = /datum/behavior_delegate/lurker_vampire /datum/xeno_strain/vampire/apply_strain(mob/living/carbon/xenomorph/lurker/lurker) lurker.plasmapool_modifier = 0 lurker.health_modifier -= XENO_HEALTH_MOD_MED lurker.speed_modifier += XENO_SPEED_FASTMOD_TIER_1 - lurker.armor_modifier += XENO_ARMOR_MOD_MED + lurker.armor_modifier += XENO_ARMOR_MOD_LARGE lurker.damage_modifier -= XENO_DAMAGE_MOD_VERY_SMALL lurker.attack_speed_modifier -= 2 @@ -30,3 +31,8 @@ lurker.execute_hud = TRUE lurker.recalculate_everything() + +/datum/behavior_delegate/lurker_vampire + name = "Lurker Vampire Behavior Delegate" + + var/datum/weakref/rush_target_ref = null //who are we targeting with the rush ability, used to strike them even if we didn't land exactly on top of them From 1b6448c24c4a5e3a533afe311c08f9b4ba07f4f3 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 17 Jan 2025 10:18:43 +0300 Subject: [PATCH 10/13] a --- .../carbon/xenomorph/abilities/lurker/lurker_powers.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 8bc28b26d12c..e3ea9424e45c 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -192,7 +192,7 @@ var/mob/living/carbon/target = living_target var/mob/living/carbon/xenomorph/xeno = owner var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate - vamp.rush_target_ref = null + QDEL(vamp.rush_target_ref) target.sway_jitter(times = 2) xeno.animation_attack_on(target) xeno.flick_attack_overlay(target, "slash") //fake slash to prevent disarm abuse @@ -204,11 +204,11 @@ /datum/action/xeno_action/activable/pounce/rush/proc/on_end_rush() var/mob/living/carbon/xenomorph/xeno = owner var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate - if(!vamp.rush_target_ref) + if(!vamp.rush_target_ref || QDELETED(vamp.rush_target_ref)) return var/mob/living/target = vamp.rush_target_ref.resolve() - vamp.rush_target_ref = null + QDEL(vamp.rush_target_ref) if(!target) return if(!xeno.check_state()) From d834290827bf4b393162eb534f005ff68cd38889 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 17 Jan 2025 10:20:24 +0300 Subject: [PATCH 11/13] b --- .../living/carbon/xenomorph/abilities/lurker/lurker_powers.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index e3ea9424e45c..307819c5b1bc 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -192,7 +192,7 @@ var/mob/living/carbon/target = living_target var/mob/living/carbon/xenomorph/xeno = owner var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate - QDEL(vamp.rush_target_ref) + qdel(vamp.rush_target_ref) target.sway_jitter(times = 2) xeno.animation_attack_on(target) xeno.flick_attack_overlay(target, "slash") //fake slash to prevent disarm abuse @@ -208,7 +208,7 @@ return var/mob/living/target = vamp.rush_target_ref.resolve() - QDEL(vamp.rush_target_ref) + qdel(vamp.rush_target_ref) if(!target) return if(!xeno.check_state()) From 727aa444f0e14427382b3ba6149c0206ea5e8690 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 17 Jan 2025 10:36:44 +0300 Subject: [PATCH 12/13] am i doing the right thing --- .../living/carbon/xenomorph/abilities/lurker/lurker_powers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 307819c5b1bc..4d001fb31598 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -182,7 +182,7 @@ . = ..(carbon_target) if(!.) - vamp.rush_target_ref = null + qdel(vamp.rush_target_ref) return if(xeno.can_not_harm(carbon_target)) From 78dfa03bb57c2b5a06268eeb906d739217d1f3dc Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 17 Jan 2025 11:33:53 +0300 Subject: [PATCH 13/13] f --- .../carbon/xenomorph/abilities/general_powers.dm | 4 ++++ .../xenomorph/abilities/lurker/lurker_powers.dm | 14 +++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm index 8533db3a08e7..6dca6af969a9 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm @@ -440,6 +440,7 @@ pre_pounce_effects() X.pounce_distance = get_dist(X, A) + var/list/pounce_end_callbacks = list(CALLBACK(src, PROC_REF(on_end_pounce))) X.throw_atom(A, distance, throw_speed, X, launch_type = LOW_LAUNCH, pass_flags = pounce_pass_flags, end_throw_callbacks = pounce_end_callbacks, collision_callbacks = pounce_callbacks) X.update_icons() @@ -448,6 +449,9 @@ return TRUE +/datum/action/xeno_action/activable/pounce/proc/on_end_pounce() + return + // Massive, customizable spray_acid /datum/action/xeno_action/activable/spray_acid/use_ability(atom/A) var/mob/living/carbon/xenomorph/X = owner diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm index 4d001fb31598..41d5908e0e15 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_powers.dm @@ -144,10 +144,6 @@ // VAMPIRE LURKER -/datum/action/xeno_action/activable/pounce/rush/New() - . = ..() - pounce_end_callbacks = list(CALLBACK(src, PROC_REF(on_end_rush))) - /datum/action/xeno_action/activable/pounce/rush/use_ability(atom/target) var/mob/living/carbon/xenomorph/xeno = owner if(!action_cooldown_check()) @@ -182,7 +178,7 @@ . = ..(carbon_target) if(!.) - qdel(vamp.rush_target_ref) + vamp.rush_target_ref = null return if(xeno.can_not_harm(carbon_target)) @@ -192,7 +188,7 @@ var/mob/living/carbon/target = living_target var/mob/living/carbon/xenomorph/xeno = owner var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate - qdel(vamp.rush_target_ref) + vamp.rush_target_ref = null target.sway_jitter(times = 2) xeno.animation_attack_on(target) xeno.flick_attack_overlay(target, "slash") //fake slash to prevent disarm abuse @@ -201,14 +197,14 @@ playsound(get_turf(target), 'sound/weapons/alien_claw_flesh3.ogg', 30, TRUE) shake_camera(target, 2, 1) -/datum/action/xeno_action/activable/pounce/rush/proc/on_end_rush() +/datum/action/xeno_action/activable/pounce/rush/on_end_pounce() var/mob/living/carbon/xenomorph/xeno = owner var/datum/behavior_delegate/lurker_vampire/vamp = xeno.behavior_delegate - if(!vamp.rush_target_ref || QDELETED(vamp.rush_target_ref)) + if(!vamp.rush_target_ref) return var/mob/living/target = vamp.rush_target_ref.resolve() - qdel(vamp.rush_target_ref) + vamp.rush_target_ref = null if(!target) return if(!xeno.check_state())