Skip to content

Commit

Permalink
stomp animation and human ramming buffs
Browse files Browse the repository at this point in the history
  • Loading branch information
xDanilcusx committed Nov 6, 2023
1 parent 2e256a4 commit bd6911d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -218,7 +218,7 @@
if(Mob.knocked_down)
continue

if(momentum < max_momentum / 2)
if(momentum < 5)
continue

Mob.apply_effect(0.5, WEAKEN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@
attack_log += text("\[[time_stamp()]\] <font color='orange'>was xeno charged by [xeno] ([xeno.ckey])</font>")
xeno.attack_log += text("\[[time_stamp()]\] <font color='red'>xeno charged [src] ([src.ckey])</font>")
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(
Expand Down

0 comments on commit bd6911d

Please sign in to comment.