Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
crusher (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Helg2 authored Mar 26, 2024
1 parent c984915 commit 5aa02ee
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/~RUtgmc_defines/dsc/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
#define COMSIG_XENOABILITY_CHIMERA_BODYSWAP "xenoability_chimera_bodyswap"
#define COMSIG_XENOABILITY_CHIMERA_CRIPPLING_STRIKE "xenoability_chimera_crippling_strike"


#define COMSIG_XENOABILITY_CRESTTOSS_BEHIND "xenoability_cresttoss_behind"

///mob/living signals
#define COMSIG_HUMAN_DEATH_STAGE_CHANGE "human_death_stage_change"
12 changes: 12 additions & 0 deletions modular_RUtgmc/code/datums/keybinding/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,15 @@
description = "Leap at your target and knock them down, if you jump close you will hug the target."
keybind_signal = COMSING_XENOABILITY_HUGGER_POUNCE
hotkey_keys = list("E")

/datum/keybinding/xeno/cresttoss
name = "cresttoss_away"
full_name = "Crusher: Crest Toss Away"
description = "Fling an adjacent target away from you."

/datum/keybinding/xeno/cresttoss_behind
name = "cresttoss_behind"
full_name = "Crusher: Crest Toss Behind"
description = "Fling an adjacent target behind you."
keybind_signal = COMSIG_XENOABILITY_CRESTTOSS_BEHIND
hotkey_keys = list("R")
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,11 @@
return succeed_activate()

/datum/action/ability/activable/xeno/cresttoss
name = "Crest Toss Away"
action_icon_state = "cresttoss_away"
desc = "Fling an adjacent target either over and behind you, or away from you by toggling the ability. Also works over barricades."
desc = "Fling an adjacent target away from you. Shares the cooldown with the Crest Toss Behind!"
var/tossing_away = TRUE

/datum/action/ability/activable/xeno/cresttoss/action_activate(atom/movable/A)
var/mob/living/carbon/xenomorph/xeno_owner = owner
if(xeno_owner.selected_ability == src)
if(!tossing_away)
tossing_away = TRUE
xeno_owner.balloon_alert(xeno_owner, "Tossing away!")
else
tossing_away = FALSE
xeno_owner.balloon_alert(xeno_owner, "Tossing behind you!")
update_button_icon()
return ..()

/datum/action/ability/activable/xeno/cresttoss/update_button_icon()
action_icon_state = tossing_away ? "cresttoss_away" : "cresttoss_behind"
return ..()
var/ability_for_cooldown = /datum/action/ability/activable/xeno/cresttoss/behind

/datum/action/ability/activable/xeno/cresttoss/use_ability(atom/movable/A)
var/mob/living/carbon/xenomorph/X = owner
Expand Down Expand Up @@ -113,3 +99,17 @@

add_cooldown()
addtimer(CALLBACK(X, TYPE_PROC_REF(/mob, update_icons)), 3)

var/datum/action/ability/xeno_action/toss = X.actions_by_path[ability_for_cooldown]
if(toss)
toss.add_cooldown()

/datum/action/ability/activable/xeno/cresttoss/behind
name = "Crest Toss Behind"
action_icon_state = "cresttoss_behind"
desc = "Fling an adjacent target behind you. Also works over barricades. Shares the cooldown with the Crest Toss Away!"
keybinding_signals = list(
KEYBINDING_NORMAL = COMSIG_XENOABILITY_CRESTTOSS_BEHIND,
)
tossing_away = FALSE
ability_for_cooldown = /datum/action/ability/activable/xeno/cresttoss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/datum/action/ability/activable/xeno/stomp,
/datum/action/ability/xeno_action/ready_charge,
/datum/action/ability/activable/xeno/cresttoss,
/datum/action/ability/activable/xeno/cresttoss/behind,
/datum/action/ability/xeno_action/regenerate_skin/crusher,
)

Expand All @@ -22,6 +23,7 @@
/datum/action/ability/activable/xeno/stomp,
/datum/action/ability/xeno_action/ready_charge,
/datum/action/ability/activable/xeno/cresttoss,
/datum/action/ability/activable/xeno/cresttoss/behind,
/datum/action/ability/activable/xeno/advance,
/datum/action/ability/xeno_action/regenerate_skin/crusher,
)

0 comments on commit 5aa02ee

Please sign in to comment.