From ae7eb485807ab30a52186f45401a87a3a8162ce4 Mon Sep 17 00:00:00 2001 From: InsaneRed Date: Tue, 4 Jun 2024 19:32:27 +0300 Subject: [PATCH 1/4] slam code --- .../abilities/lurker/lurker_powers.dm | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 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 51f23f22a09f..4c472ca411bd 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 @@ -282,9 +282,19 @@ stab_direction = turn(get_dir(xeno, targeted_atom), 180) playsound(hit_target,'sound/weapons/alien_tail_attack.ogg', 50, TRUE) - if(hit_target.mob_size < MOB_SIZE_BIG) - step_away(hit_target, xeno) + var/direction = Get_Compass_Dir(xeno, targeted_atom) //More precise than get_dir. + if(!direction) //Same tile. + return + if(!step(hit_target, direction)) + playsound(hit_target.loc, "punch", 25, 1) + 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.apply_effect(0.5, WEAKEN) + else + hit_target.apply_effects(0.5, SLOW) /// To reset the direction if they haven't moved since then in below callback. var/last_dir = xeno.dir @@ -296,11 +306,7 @@ 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") - - if(hit_target.mob_size < MOB_SIZE_BIG) - hit_target.apply_effect(0.5, WEAKEN) - else - hit_target.apply_effect(0.5, SLOW) + hit_target.apply_effect(0.5, SLOW) 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") From a94f320f3140423b4abf17b885c086c1949e5f81 Mon Sep 17 00:00:00 2001 From: InsaneRed Date: Tue, 4 Jun 2024 19:34:37 +0300 Subject: [PATCH 2/4] vampire lurkers no longer "throw it back" after hitting somebody --- .../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 4c472ca411bd..72bf382d606d 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 @@ -267,10 +267,10 @@ 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 directly slam [hit_target] with our tail, throwing it back after impaling it on our tail!")) + 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] with our tail, throwing it back after stabbing it 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) From a8dc209fbb200838e77598a1d54715200174b792 Mon Sep 17 00:00:00 2001 From: Red <47158596+Red-byte3D@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:26:43 +0300 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Vero <73014819+vero5123@users.noreply.github.com> --- .../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 72bf382d606d..da570ebb793b 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 @@ -292,9 +292,9 @@ 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.apply_effect(0.5, WEAKEN) + hit_target.KnockDown(0.5) else - hit_target.apply_effects(0.5, SLOW) + hit_target.Slow(0.5) /// To reset the direction if they haven't moved since then in below callback. var/last_dir = xeno.dir @@ -306,7 +306,7 @@ 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.apply_effect(0.5, SLOW) + 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") From ca631be2815232ea465e334a3a4619e6bbe14919 Mon Sep 17 00:00:00 2001 From: InsaneRed Date: Fri, 21 Jun 2024 17:21:01 +0300 Subject: [PATCH 4/4] removes dir --- .../living/carbon/xenomorph/abilities/lurker/lurker_powers.dm | 3 +-- 1 file changed, 1 insertion(+), 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 da570ebb793b..2cf5e34e6ac2 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 @@ -284,8 +284,7 @@ playsound(hit_target,'sound/weapons/alien_tail_attack.ogg', 50, TRUE) var/direction = Get_Compass_Dir(xeno, targeted_atom) //More precise than get_dir. - if(!direction) //Same tile. - return + if(!step(hit_target, direction)) playsound(hit_target.loc, "punch", 25, 1) hit_target.visible_message(SPAN_DANGER("[hit_target] slams into an obstacle!"),