Skip to content

Commit

Permalink
Steel crest (#654)
Browse files Browse the repository at this point in the history
* steel

* moving

* actions_by_path

* uh

* Update code/modules/mob/living/carbon/xenomorph/castes/defender/abilities_defender.dm

Co-authored-by: Helg2 <[email protected]>
Signed-off-by: homexp13 <[email protected]>

* Update code/modules/mob/living/carbon/xenomorph/castes/defender/abilities_defender.dm

Co-authored-by: Helg2 <[email protected]>
Signed-off-by: homexp13 <[email protected]>

* Update code/modules/mob/living/carbon/xenomorph/castes/defender/abilities_defender.dm

Co-authored-by: Helg2 <[email protected]>
Signed-off-by: homexp13 <[email protected]>

* Update code/modules/mob/living/carbon/xenomorph/castes/defender/abilities_defender.dm

Co-authored-by: Helg2 <[email protected]>
Signed-off-by: homexp13 <[email protected]>

* X => xeno_owner

* hotkey_keys

* Update code/modules/mob/living/carbon/xenomorph/castes/defender/defender.dm

Co-authored-by: Helg2 <[email protected]>
Signed-off-by: homexp13 <[email protected]>

---------

Signed-off-by: homexp13 <[email protected]>
Co-authored-by: Helg2 <[email protected]>
  • Loading branch information
homexp13 and Helg2 authored Nov 28, 2024
1 parent f5f055f commit ce5e263
Show file tree
Hide file tree
Showing 9 changed files with 354 additions and 118 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,9 @@
#define COMSIG_XENOABILITY_REGENERATE_SKIN "xenoability_regenerate_skin"
#define COMSIG_XENOABILITY_CENTRIFUGAL_FORCE "xenoability_centrifugal_force"

#define COMSIG_XENOABILITY_STEELCREST_HEADBUTT "xenoability_steelcrest_bodyswap_headbutt"
#define COMSIG_XENOABILITY_STEELCREST_SOAK "xenoability_steelcrest_soak"

#define COMSIG_XENOABILITY_EMIT_NEUROGAS "xenoability_emit_neurogas"
#define COMSIG_XENOABILITY_SELECT_REAGENT "xenoability_select_reagent"
#define COMSIG_XENOABILITY_RADIAL_SELECT_REAGENT "xenoability_radial_select_reagent"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/movespeed_modification.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define MOVESPEED_ID_XENO_CHARGE "XENO_CHARGE_MODIFIER"
#define MOVESPEED_ID_ENHANCEMENT "ENHANCEMENT"
#define MOVESPEED_ID_CRESTDEFENSE "CRESTDEFENSE"
#define MOVESPEED_ID_FORTIFY "FORTIFY"
#define MOVESPEED_ID_WARRIOR_AGILITY "WARRIOR_AGILITY"
#define MOVESPEED_ID_FRENZY_AURA "FRENZY_AURA"
#define MOVESPEED_ID_XENO_HEMODILE "XENO_HEMODILE"
Expand Down
14 changes: 14 additions & 0 deletions code/datums/keybinding/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,20 @@
keybind_signal = COMSIG_XENOABILITY_FORTIFY
hotkey_keys = list("Space")

/datum/keybinding/xeno/headbutt
name = "headbutt"
full_name = "Steel Crest: Headbutt"
description = "Headbutts into the designated target."
keybind_signal = COMSIG_XENOABILITY_STEELCREST_HEADBUTT
hotkey_keys = list("F")

/datum/keybinding/xeno/soak
name = "soak"
full_name = "Steel Crest: Soak"
description = "Healing after taking damage"
keybind_signal = COMSIG_XENOABILITY_STEELCREST_SOAK
hotkey_keys = list("E")

/datum/keybinding/xeno/regenerate_skin
name = "regenerate_skin"
full_name = "Defender: Regenerate Skin"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
/datum/action/ability/xeno_action/tail_sweep,
)

/datum/xeno_caste/defender/ancient
/datum/xeno_caste/defender/normal
upgrade = XENO_UPGRADE_NORMAL

/datum/xeno_caste/defender/steel_crest/normal
upgrade = XENO_UPGRADE_NORMAL

/datum/xeno_caste/defender/primordial
Expand All @@ -72,3 +75,35 @@
/datum/action/ability/xeno_action/tail_sweep,
/datum/action/ability/xeno_action/centrifugal_force,
)

/datum/xeno_caste/defender/steel_crest
caste_type_path = /mob/living/carbon/xenomorph/defender/steel_crest
base_caste_type_path = /mob/living/carbon/xenomorph/defender
upgrade_name = ""
caste_name = "Defender"
display_name = "Steel crest"
upgrade = XENO_UPGRADE_BASETYPE
caste_desc = "An alien with an armored crest. It looks very tough."

// *** Speed *** //
speed = -0.4

// *** Defender Abilities *** //
crest_defense_armor = 30
crest_defense_slowdown = 0.8
fortify_armor = 40

actions = list(
/datum/action/ability/xeno_action/xeno_resting,
/datum/action/ability/xeno_action/watch_xeno,
/datum/action/ability/activable/xeno/psydrain,
/datum/action/ability/xeno_action/fortify/steel_crest,
/datum/action/ability/xeno_action/toggle_crest_defense,
/datum/action/ability/activable/xeno/headbutt,
/datum/action/ability/xeno_action/soak,
)

/datum/xeno_caste/defender/steel_crest/primordial
upgrade_name = "Primordial"
upgrade = XENO_UPGRADE_PRIMO
caste_desc = "Alien with an incredibly tough and armored head crest able to endure even the strongest hits."
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,13 @@
if(isnull(.))
return
if(. == CONSCIOUS && fortify) //No longer conscious.
var/datum/action/ability/xeno_action/fortify/FT = actions_by_path[/datum/action/ability/xeno_action/fortify]
FT.set_fortify(FALSE) //Fortify prevents dragging due to the anchor component.

//Fortify prevents dragging due to the anchor component. // TODO: Unshitcode me
if(actions_by_path[/datum/action/ability/xeno_action/fortify])
var/datum/action/ability/xeno_action/fortify/FT = actions_by_path[/datum/action/ability/xeno_action/fortify]
FT.set_fortify(FALSE)
else if(actions_by_path[/datum/action/ability/xeno_action/fortify/steel_crest])
var/datum/action/ability/xeno_action/fortify/FT = actions_by_path[/datum/action/ability/xeno_action/fortify/steel_crest]
FT.set_fortify(FALSE)

// ***************************************
// *********** Mob overrides
Expand All @@ -54,3 +58,24 @@
/mob/living/carbon/xenomorph/defender/Initialize(mapload)
. = ..()
AddComponent(/datum/component/throw_parry)

// ***************************************
// *********** Steel crest
// ***************************************

/mob/living/carbon/xenomorph/defender/steel_crest
icon = 'icons/Xeno/castes/defender/steel_crest.dmi'
caste_base_type = /datum/xeno_caste/defender/steel_crest

// ***************************************
// *********** Front Armor
// ***************************************

/mob/living/carbon/xenomorph/defender/steel_crest/projectile_hit(obj/projectile/proj, cardinal_move, uncrossing)
if(SEND_SIGNAL(src, COMSIG_XENO_PROJECTILE_HIT, proj, cardinal_move, uncrossing) & COMPONENT_PROJECTILE_DODGE)
return FALSE
if(proj.ammo.flags_ammo_behavior & AMMO_SKIPS_ALIENS)
return FALSE
if((cardinal_move & REVERSE_DIR(dir)))
proj.damage -= proj.damage * (0.2 * get_sunder())
return ..()
2 changes: 2 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@
return FALSE
if(buckled || now_pushing)
return
if(anchored)
return
if(isliving(A))
var/mob/living/L = A

Expand Down
Binary file modified icons/Xeno/actions.dmi
Binary file not shown.
Binary file added icons/Xeno/castes/defender/steel_crest.dmi
Binary file not shown.

0 comments on commit ce5e263

Please sign in to comment.