Skip to content
11 changes: 10 additions & 1 deletion code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
/// If the mob won't drop items held in face slot when downed
#define TRAIT_IRON_TEETH "t_iron_teeth"

// -- ability traits --
// -- general ability traits --
/// Xenos with this trait cannot have plasma transferred to them
#define TRAIT_ABILITY_NO_PLASMA_TRANSFER "t_ability_no_plasma_transfer"
/// Shows that the xeno queen is on ovi
Expand All @@ -267,6 +267,15 @@
#define TRAIT_ABILITY_BURROWED "t_ability_burrowed"
/// Xenos with this trait can toggle long sight while resting.
#define TRAIT_ABILITY_SIGHT_IGNORE_REST "t_ability_sight_ignore_rest"


// -- specific ability traits --
#define TRAIT_ABILITY_ASSASINATE "t_ability_assasinate"
#define TRAIT_ABILITY_INVIS "t_ability_invis"
#define TRAIT_ABILITY_DODGE "t_ability_dodge"
#define TRAIT_ABILITY_RED_TAG "t_ability_red_tag"
#define TRAIT_ABILITY_YELLOW_TAG "t_ability_yellow_tag"
#define TRAIT_ABILITY_SHED_SPIKES "t_ability_shed_spikes"
/// Used by shielder to check stance.
#define TRAIT_ABILITY_ENCLOSED_PLATES "t_ability_enclosed_plates"
/// Used by shielder for reflective plates.
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/xenomorph/Evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ GLOBAL_LIST_EMPTY(deevolved_ckeys)
to_chat(src, SPAN_WARNING("We must be at full health to evolve."))
return FALSE

if(fortify || crest_defense || stealth || HAS_TRAIT(src, TRAIT_ABILITY_ENCLOSED_PLATES) || HAS_TRAIT(src, TRAIT_ABILITY_REFLECTIVE_PLATES))
if(fortify || crest_defense || HAS_TRAIT(src, TRAIT_ABILITY_INVIS) || HAS_TRAIT(src, TRAIT_ABILITY_ENCLOSED_PLATES) || HAS_TRAIT(src, TRAIT_ABILITY_REFLECTIVE_PLATES))
to_chat(src, SPAN_WARNING("We cannot evolve while in this stance."))
return FALSE

Expand Down Expand Up @@ -326,7 +326,7 @@ GLOBAL_LIST_EMPTY(deevolved_ckeys)
if(tier == 0 || tier == 4)
to_chat(src, SPAN_XENOWARNING("We can't transmute."))
return
if(fortify || crest_defense || stealth)
if(fortify || crest_defense || HAS_TRAIT(src, TRAIT_ABILITY_INVIS))
to_chat(src, SPAN_XENOWARNING("We can't transmute while in this stance."))
return
if(lock_evolve)
Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@

var/tunnel = FALSE
/// for check on lurker invisibility
var/stealth = FALSE
var/fortify = FALSE
var/crest_defense = FALSE
/// For drones/hivelords. Extends the maximum build range they have
Expand Down Expand Up @@ -827,7 +826,7 @@
return TRUE
playsound(puller.loc, 'sound/weapons/pierce.ogg', 25, 1)
puller.visible_message(SPAN_WARNING("[puller] tried to pull [src] but instead gets a tail swipe to the head!"))
if(stealth)
if(HAS_TRAIT(src, TRAIT_ABILITY_INVIS))
puller.apply_effect(caste.tacklestrength_min, WEAKEN)
return FALSE
puller.apply_effect(rand(caste.tacklestrength_min,caste.tacklestrength_max), WEAKEN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
action_type = XENO_ACTION_CLICK
plasma_cost = 20

var/duration = 30 SECONDS // 30 seconds base
var/invis_timer_id = TIMER_ID_NULL
var/alpha_amount = 25
var/speed_buff = 0.20
var/invis_recharge_time = 20 SECONDS
var/invis_start_time = -1 // Special value for when we're not invisible
var/invis_duration = 30 SECONDS

// tightly coupled 'buff next slash' action
/datum/action/xeno_action/onclick/lurker_assassinate
Expand All @@ -35,6 +37,8 @@
plasma_cost = 20

var/buff_duration = 50
var/buffed_slash_damage_ratio = 1.2
var/slash_slow_duration = 35

// VAMP LURKER ABILITIES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@
action_type = XENO_ACTION_CLICK
ability_primacy = XENO_TAIL_STAB

var/blunt_damage = 8 // How much damage Harpoon Tail on DISARM mode do. (pierces armor)
var/tail_mode = null // Harpoon Tail mode, used only to display in status.

/datum/action/xeno_action/activable/prae_impale
name = "Impale"
action_icon_state = "prae_impale"
Expand All @@ -197,6 +200,11 @@
var/speed_buff_amount = 0.5
var/afterimage_interval = 1 DECISECONDS

var/dodge_start_time = -1 // Used to countdown DANCER_DODGE_TIME.
var/refund_multiplier = 2.0 // How much refund we want to get back? 1.0 is 1s used to 1s cooldown, 2.0 is 1s used 2s cooldown.
var/recharge_time = null // Used in calculation, finalized number will be displayed as cooldown.
var/safe_click_cooldown = 0 // Cooldown after activation to prevent accidental double click.

/datum/action/xeno_action/activable/prae_tail_trip
name = "Tail Trip"
action_icon_state = "prae_tail_trip"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,7 @@
var/ammo_type = /datum/ammo/xeno/bone_chips/spread
var/shrapnel_amount = 40

var/shard_lock_duration = 15 SECONDS
var/shard_lock_speed_mod = 0.45


Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
macro_path = /datum/action/xeno_action/verb/verb_acider_acid
ability_primacy = XENO_PRIMARY_ACTION_1
action_type = XENO_ACTION_CLICK

var/acid_cost = 100

/datum/action/xeno_action/activable/acider_for_the_hive
Expand All @@ -46,4 +47,19 @@
macro_path = /datum/action/xeno_action/verb/verb_acider_sacrifice
action_type = XENO_ACTION_CLICK
ability_primacy = XENO_PRIMARY_ACTION_2

var/minimal_acid = 200
var/caboom_timer = 20
var/caboom_left = 20
var/caboom_loop = 1

var/caboom_left_display = 20 SECONDS

var/caboom_trigger
var/caboom_last_proc
var/list/caboom_sound = list('sound/effects/runner_charging_1.ogg','sound/effects/runner_charging_2.ogg')

var/caboom_acid_ratio = 200
var/caboom_burn_damage_ratio = 5
var/caboom_burn_range_ratio = 100
var/caboom_struct_acid_type = /obj/effect/xenomorph/acid
39 changes: 36 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
var/cooldown_message = null
var/no_cooldown_msg = FALSE

var/cooldown_timer_id = TIMER_ID_NULL // holds our timer ID
var/cooldown_timer_id = TIMER_ID_NULL // holds cooldown timer ID

// Track state so we can effectively REDUCE xeno_cooldown by removing and replacing timers.
var/current_cooldown_start_time = 0
var/current_cooldown_duration = 0

var/duration_timer_id = TIMER_ID_NULL // holds duration timer ID
var/current_duration_start_time = 0
var/current_duration_duration = 0

// Charging
/// When set, an ability has to be charged up by being the active ability before it can be used
var/charge_time = null
Expand All @@ -43,6 +47,9 @@
. = ..()

/datum/action/xeno_action/process(delta_time)
if(duration_timer_id != TIMER_ID_NULL)
return update_duration_visual()

return update_cooldown_visual()

/datum/action/xeno_action/proc/remove_charge()
Expand Down Expand Up @@ -472,13 +479,39 @@
if(action_start_message)
to_chat(owner, SPAN_NOTICE(action_start_message))

///Use to display duration time of active ability.
/datum/action/xeno_action/proc/start_duration_display(duration)
if(duration_timer_id != TIMER_ID_NULL)
deltimer(duration_timer_id)

duration_timer_id = addtimer(CALLBACK(src, PROC_REF(end_duration_display)), duration, TIMER_STOPPABLE)

current_duration_start_time = world.time
current_duration_duration = duration

START_PROCESSING(SSfasteffects, src)

///Use to stop display duration time of active ability.
/datum/action/xeno_action/proc/end_duration_display()
duration_timer_id = TIMER_ID_NULL
current_duration_start_time = 0
current_duration_duration = 0

update_button_icon()

/datum/action/xeno_action/proc/update_duration_visual()
var/time_left = max(current_duration_start_time + current_duration_duration - world.time, 0)
if(!owner || time_left <= 0 || duration_timer_id == TIMER_ID_NULL)
button.set_maptext()
return PROCESS_KILL
button.set_maptext(SMALL_FONTS(7, round(time_left/10, 0.1)), 4, 4)

/datum/action/xeno_action/proc/update_cooldown_visual()
var/time_left = max(current_cooldown_start_time + current_cooldown_duration - world.time, 0)
if(!owner || time_left <= 0 || cooldown_timer_id == TIMER_ID_NULL)
button.set_maptext()
return PROCESS_KILL
else
button.set_maptext(SMALL_FONTS(7, round(time_left/10, 0.1)), 4, 4)
button.set_maptext(SMALL_FONTS_COLOR(7, round(time_left/10, 0.1), "#fffb00"), 4, 4)

/datum/action/xeno_action/proc/on_select(mob/user)
return
Expand Down
Loading