Skip to content

Commit

Permalink
Update abilities_hunter.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Helg2 committed Jul 14, 2024
1 parent a57cb91 commit 8f9136f
Showing 1 changed file with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
var/can_sneak_attack = FALSE
var/stealth_alpha_multiplier = 1

/datum/action/ability/xeno_action/stealth/remove_action(mob/living/L)
/datum/action/ability/xeno_action/stealth/remove_action()
if(stealth)
cancel_stealth()
return ..()
Expand Down Expand Up @@ -51,16 +51,15 @@

RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(handle_stealth))
RegisterSignal(owner, COMSIG_XENOMORPH_POUNCE_END, PROC_REF(sneak_attack_pounce))
RegisterSignal(owner, COMSIG_XENO_LIVING_THROW_HIT, PROC_REF(mob_hit))
RegisterSignal(owner, COMSIG_XENOMORPH_ATTACK_LIVING, PROC_REF(sneak_attack_slash))
RegisterSignal(owner, COMSIG_XENOMORPH_DISARM_HUMAN, PROC_REF(sneak_attack_slash))
RegisterSignal(owner, COMSIG_XENOMORPH_LEAP_BUMP, PROC_REF(mob_hit))
RegisterSignals(owner, list(COMSIG_XENOMORPH_ATTACK_LIVING, COMSIG_XENOMORPH_DISARM_HUMAN), PROC_REF(sneak_attack_slash))
RegisterSignal(owner, COMSIG_XENOMORPH_ZONE_SELECT, PROC_REF(sneak_attack_zone))
RegisterSignal(owner, COMSIG_XENOMORPH_PLASMA_REGEN, PROC_REF(plasma_regen))

// TODO: attack_alien() overrides are a mess and need a lot of work to make them require parentcalling
RegisterSignals(owner, list(
COMSIG_XENOMORPH_GRAB,
COMSIG_XENOMORPH_THROW_HIT,
COMSIG_XENOMORPH_LEAP_BUMP,
COMSIG_LIVING_IGNITED,
COMSIG_LIVING_ADD_VENTCRAWL), PROC_REF(cancel_stealth))

Expand Down Expand Up @@ -163,14 +162,18 @@
cancel_stealth()

/// Callback for when a mob gets hit as part of a pounce
/datum/action/ability/xeno_action/stealth/proc/mob_hit(datum/source, mob/living/M)
/datum/action/ability/xeno_action/stealth/proc/mob_hit(datum/source, mob/living/living_target)
SIGNAL_HANDLER
if(M.stat || isxeno(M))
if(living_target.stat || isxeno(living_target))
return
if(!can_sneak_attack)
return
if(can_sneak_attack)
M.adjust_stagger(3 SECONDS)
M.add_slowdown(1)
to_chat(owner, span_xenodanger("Pouncing from the shadows, we stagger our victim."))
living_target.adjust_stagger(3 SECONDS)
living_target.add_slowdown(1)

var/mob/living/carbon/xenomorph/xeno = owner
living_target.attack_alien_harm(xeno, xeno.xeno_caste.melee_damage * xeno.xeno_melee_damage_modifier)
to_chat(owner, span_xenodanger("Pouncing from the shadows, we stagger our victim."))

/datum/action/ability/xeno_action/stealth/proc/sneak_attack_slash(datum/source, mob/living/target, damage, list/damage_mod, list/armor_mod)
SIGNAL_HANDLER
Expand All @@ -185,7 +188,7 @@
target.adjust_stagger(2 SECONDS)
target.add_slowdown(1)
target.ParalyzeNoChain(1 SECONDS)
target.apply_damage(damage, BRUTE, xeno.zone_selected, MELEE) // additional damage
target.apply_damage(damage, BRUTE, xeno.zone_selected, MELEE, , penetration = 15) // additional damage

cancel_stealth()

Expand Down Expand Up @@ -270,11 +273,12 @@
return

var/mob/living/carbon/xenomorph/xeno = owner
damage = xeno.xeno_caste.melee_damage * xeno.xeno_melee_damage_modifier

owner.visible_message(span_danger("\The [owner] strikes [target] with deadly precision!"), \
span_danger("We strike [target] with deadly precision!"))
target.ParalyzeNoChain(1 SECONDS)
target.apply_damage(20, BRUTE, xeno.zone_selected) // additional damage
target.apply_damage(damage, BRUTE, xeno.zone_selected, MELEE, penetration = 25) // additional damage

cancel_stealth()

Expand Down Expand Up @@ -316,8 +320,7 @@
if(owner.layer != MOB_LAYER)
owner.layer = MOB_LAYER
var/datum/action/ability/xeno_action/xenohide/hide_action = owner.actions_by_path[/datum/action/ability/xeno_action/xenohide]
//hide_action?.button?.cut_overlay(mutable_appearance('icons/Xeno/actions.dmi', "selected_purple_frame", ACTION_LAYER_ACTION_ICON_STATE, FLOAT_PLANE)) // Removes Hide action icon border // ORIGINAL
hide_action?.button?.cut_overlay(mutable_appearance('icons/Xeno/actions.dmi', "selected_purple_frame", ACTION_LAYER_ACTION_ICON_STATE, FLOAT_PLANE)) // RUTGMC EDIT
hide_action?.button?.cut_overlay(mutable_appearance('icons/Xeno/actions.dmi', "selected_purple_frame", ACTION_LAYER_ACTION_ICON_STATE, FLOAT_PLANE)) // Removes Hide action icon border
if(owner.buckled)
owner.buckled.unbuckle_mob(owner)
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, PROC_REF(movement_fx))
Expand Down Expand Up @@ -354,7 +357,7 @@
if(!human_target.check_shields(COMBAT_TOUCH_ATTACK, 30, "melee"))
xeno_owner.Paralyze(XENO_POUNCE_SHIELD_STUN_DURATION)
xeno_owner.set_throwing(FALSE)
playsound(xeno_owner, 'sound/machines/bonk.ogg', 50, FALSE) // RUTGMC ADDITION
playsound(xeno_owner, 'sound/machines/bonk.ogg', 50, FALSE)
return
trigger_pounce_effect(living_target)
pounce_complete()
Expand All @@ -373,7 +376,7 @@
UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_XENO_OBJ_THROW_HIT, COMSIG_XENOMORPH_LEAP_BUMP, COMSIG_MOVABLE_POST_THROW))
SEND_SIGNAL(owner, COMSIG_XENOMORPH_POUNCE_END)
var/mob/living/carbon/xenomorph/xeno_owner = owner
xeno_owner.set_throwing(FALSE) // RUTGMC ADDITION, for whatever modular fuckery, without this pounce doesn't stop
xeno_owner.set_throwing(FALSE)
xeno_owner.xeno_flags &= ~XENO_LEAPING

/datum/action/ability/activable/xeno/pounce/proc/reset_pass_flags()
Expand Down

0 comments on commit 8f9136f

Please sign in to comment.