From bd6911db6042c6d1e86927ac3ad60ca54f5a76c4 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 6 Nov 2023 04:02:53 +0300 Subject: [PATCH] stomp animation and human ramming buffs --- .../abilities/crusher/crusher_abilities.dm | 8 +++--- .../abilities/crusher/crusher_powers.dm | 27 +++++++++++++++++++ .../mutators/strains/crusher/charger.dm | 4 +-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 61d6c62525..ea24885ff5 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -46,8 +46,8 @@ var/distance = 5 var/effect_type_base = /datum/effects/xeno_slow/superslow - var/effect_duration = 10 - var/windup_duration = 1 SECONDS + var/effect_duration = 1 SECONDS + var/windup_duration = 1.5 SECONDS default_ai_action = TRUE var/prob_chance = 80 @@ -209,7 +209,7 @@ if(momentum == max_momentum) dist = momentum * 0.25 step(Mob, ram_dir, dist) - Mob.take_overall_armored_damage(momentum * 6) + Mob.take_overall_armored_damage(momentum * 10) INVOKE_ASYNC(Mob, TYPE_PROC_REF(/mob/living/carbon/human, emote),"pain") shake_camera(Mob, 7, 3) animation_flash_color(Mob) @@ -218,7 +218,7 @@ if(Mob.knocked_down) continue - if(momentum < max_momentum / 2) + if(momentum < 5) continue Mob.apply_effect(0.5, WEAKEN) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index d42269053b..9dd60abd3d 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -115,6 +115,12 @@ X.anchored = TRUE X.update_canmove() + if(X.dir == WEST) + animate_stomp(windup_duration, 30) + + if(X.dir == EAST) + animate_stomp(windup_duration, -30) + if (!do_after(X, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) X.frozen = FALSE X.anchored = FALSE @@ -158,6 +164,20 @@ return ..() +/datum/action/xeno_action/onclick/crusher_stomp/proc/animate_stomp(windup_duration, angle) + set waitfor = FALSE + var/duration = windup_duration / 3 + + animate(owner, transform = turn(matrix(), angle / -3.75), time = duration, easing = SINE_EASING|EASE_OUT) + + sleep(duration) + + animate(owner, pixel_y = 3, transform = turn(matrix(), angle), time = duration, easing = SINE_EASING|EASE_OUT) + + sleep(duration) + + animate(owner, pixel_y = 0, transform = matrix(), time = duration, easing = QUAD_EASING|EASE_IN) + /datum/action/xeno_action/onclick/crusher_stomp/charger/use_ability() var/mob/living/carbon/xenomorph/Xeno = owner var/mob/living/carbon/Targeted @@ -295,6 +315,13 @@ button.icon_state = "template" return ..() +/datum/action/xeno_action/activable/fling/charger/use_ability(atom/Target) + if(!.) + return FALSE + + flick("Normal Crusher Charging", owner) + return TRUE + /datum/action/xeno_action/activable/tumble/use_ability(atom/Target) if(!action_cooldown_check()) return diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm index 704782344c..241296f17c 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm @@ -374,9 +374,9 @@ attack_log += text("\[[time_stamp()]\] was xeno charged by [xeno] ([xeno.ckey])") xeno.attack_log += text("\[[time_stamp()]\] xeno charged [src] ([src.ckey])") log_attack("[xeno] ([xeno.ckey]) xeno charged [src] ([src.ckey])") - var/momentum_mult = 5 + var/momentum_mult = 7 if(charger_ability.momentum == charger_ability.max_momentum) - momentum_mult = 8 + momentum_mult = 10 take_overall_armored_damage(charger_ability.momentum * momentum_mult, ARMOR_MELEE, BRUTE, 60, 13) // Giving AP because this spreads damage out and then applies armor to them apply_armoured_damage(charger_ability.momentum * momentum_mult/4, ARMOR_MELEE, BRUTE,"chest") xeno.visible_message(