Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(agility || fortify || crest_defense || stealth || HAS_TRAIT(src, TRAIT_ABILITY_ENCLOSED_PLATES) || HAS_TRAIT(src, TRAIT_ABILITY_REFLECTIVE_PLATES))
if(agility || 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 @@ -324,7 +324,7 @@ GLOBAL_LIST_EMPTY(deevolved_ckeys)
if(tier == 0 || tier == 4)
to_chat(src, SPAN_XENOWARNING("We can't transmute."))
return
if(agility || fortify || crest_defense || stealth)
if(agility || 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 @@ -296,7 +296,6 @@

var/tunnel = FALSE
/// for check on lurker invisibility
var/stealth = FALSE
var/fortify = FALSE
var/crest_defense = FALSE
/// 0/FALSE - upright, 1/TRUE - all fours
Expand Down Expand Up @@ -830,7 +829,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 @@ -173,6 +173,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 @@ -198,6 +201,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
Original file line number Diff line number Diff line change
Expand Up @@ -25,252 +25,3 @@

apply_cooldown()
return ..()


/datum/action/xeno_action/activable/acider_acid/use_ability(atom/affected_atom)
var/mob/living/carbon/xenomorph/xeno = owner
if(!istype(affected_atom, /obj/item) && !istype(affected_atom, /obj/structure/) && !istype(affected_atom, /obj/vehicle/multitile))
to_chat(xeno, SPAN_XENOHIGHDANGER("Can only melt barricades and items!"))
return
var/datum/behavior_delegate/runner_acider/behavior_delegate = xeno.behavior_delegate
if (!istype(behavior_delegate))
return
if(behavior_delegate.acid_amount < acid_cost)
to_chat(xeno, SPAN_XENOHIGHDANGER("Not enough acid stored!"))
return

xeno.corrosive_acid(affected_atom, acid_type, 0)
for(var/obj/item/explosive/plastic/plastic_explosive in affected_atom.contents)
xeno.corrosive_acid(plastic_explosive, acid_type, 0)
return ..()

/mob/living/carbon/xenomorph/runner/corrosive_acid(atom/affected_atom, acid_type, plasma_cost)
if(!istype(strain, /datum/xeno_strain/acider))
return ..()
if(!affected_atom.Adjacent(src))
if(istype(affected_atom,/obj/item/explosive/plastic))
var/obj/item/explosive/plastic/plastic_explosive = affected_atom
if(plastic_explosive.plant_target && !plastic_explosive.plant_target.Adjacent(src))
to_chat(src, SPAN_WARNING("We can't reach [affected_atom]."))
return
else
to_chat(src, SPAN_WARNING("[affected_atom] is too far away."))
return

if(!isturf(loc) || HAS_TRAIT(src, TRAIT_ABILITY_BURROWED))
to_chat(src, SPAN_WARNING("We can't melt [affected_atom] from here!"))
return

face_atom(affected_atom)

var/wait_time = 10

var/turf/turf = get_turf(affected_atom)

for(var/obj/effect/xenomorph/acid/acid in turf)
if(acid_type == acid.type && acid.acid_t == affected_atom)
to_chat(src, SPAN_WARNING("[affected_atom] is already drenched in acid."))
return

var/obj/object
//OBJ CHECK
if(isobj(affected_atom))
object = affected_atom

wait_time = object.get_applying_acid_time()
if(wait_time == -1)
to_chat(src, SPAN_WARNING("We cannot dissolve [object]."))
return
else
to_chat(src, SPAN_WARNING("We cannot dissolve [affected_atom]."))
return
wait_time = wait_time / 4
if(!do_after(src, wait_time, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE))
return

// AGAIN BECAUSE SOMETHING COULD'VE ACIDED THE PLACE
for(var/obj/effect/xenomorph/acid/acid in turf)
if(acid_type == acid.type && acid.acid_t == affected_atom)
to_chat(src, SPAN_WARNING("[affected_atom] is already drenched in acid."))
return

if(!check_state())
return

if(!affected_atom || QDELETED(affected_atom)) //Some logic.
return

if(!affected_atom.Adjacent(src) || (object && !isturf(object.loc)))//not adjacent or inside something
if(istype(affected_atom, /obj/item/explosive/plastic))
var/obj/item/explosive/plastic/plastic_explosive = affected_atom
if(plastic_explosive.plant_target && !plastic_explosive.plant_target.Adjacent(src))
to_chat(src, SPAN_WARNING("We can't reach [affected_atom]."))
return
else
to_chat(src, SPAN_WARNING("[affected_atom] is too far away."))
return

var/datum/behavior_delegate/runner_acider/behavior_del = behavior_delegate
if (!istype(behavior_del))
return
if(behavior_del.acid_amount < behavior_del.melt_acid_cost)
to_chat(src, SPAN_XENOHIGHDANGER("Not enough acid stored!"))
return

behavior_del.modify_acid(-behavior_del.melt_acid_cost)

var/obj/effect/xenomorph/acid/acid = new acid_type(turf, affected_atom)

if(istype(affected_atom, /obj/vehicle/multitile))
var/obj/vehicle/multitile/multitile_vehicle = affected_atom
multitile_vehicle.take_damage_type(20 / acid.acid_delay, "acid", src)
visible_message(SPAN_XENOWARNING("[src] vomits globs of vile stuff at [multitile_vehicle]. It sizzles under the bubbling mess of acid!"),
SPAN_XENOWARNING("We vomit globs of vile stuff at [multitile_vehicle]. It sizzles under the bubbling mess of acid!"), null, 5)
playsound(loc, "sound/bullets/acid_impact1.ogg", 25)
QDEL_IN(acid, 20)
return

acid.add_hiddenprint(src)
acid.name += " ([affected_atom])"

visible_message(SPAN_XENOWARNING("[src] vomits globs of vile stuff all over [affected_atom]. It begins to sizzle and melt under the bubbling mess of acid!"),
SPAN_XENOWARNING("We vomit globs of vile stuff all over [affected_atom]. It begins to sizzle and melt under the bubbling mess of acid!"), null, 5)
playsound(loc, "sound/bullets/acid_impact1.ogg", 25)

#define ACIDER_ACID_LEVEL 3

/mob/living/carbon/xenomorph/runner/try_fill_trap(obj/effect/alien/resin/trap/target)
if(!istype(strain, /datum/xeno_strain/acider))
return ..()

if(!istype(target))
return FALSE

var/datum/behavior_delegate/runner_acider/behavior_del = behavior_delegate
if(!istype(behavior_del))
return FALSE

if(behavior_del.acid_amount < behavior_del.fill_acid_cost)
to_chat(src, SPAN_XENOHIGHDANGER("Not enough acid stored!"))
return FALSE

var/trap_acid_level = 0
if(target.trap_type >= RESIN_TRAP_ACID1)
trap_acid_level = 1 + target.trap_type - RESIN_TRAP_ACID1

if(trap_acid_level >= ACIDER_ACID_LEVEL) // Acid runners apply /obj/effect/xenomorph/acid/strong generally
to_chat(src, SPAN_XENONOTICE("It already has good acid in."))
return FALSE

to_chat(src, SPAN_XENONOTICE("You begin charging the resin trap with acid."))
xeno_attack_delay(src)
if(!do_after(src, 3 SECONDS, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE, src))
return FALSE

if(target.trap_type >= RESIN_TRAP_ACID1)
trap_acid_level = 1 + target.trap_type - RESIN_TRAP_ACID1

if(trap_acid_level >= ACIDER_ACID_LEVEL)
return FALSE

if(behavior_del.acid_amount < behavior_del.fill_acid_cost)
to_chat(src, SPAN_XENOHIGHDANGER("Not enough acid stored!"))
return FALSE

behavior_del.modify_acid(-behavior_del.fill_acid_cost)

target.cause_data = create_cause_data("resin acid trap", src)
target.setup_tripwires()
target.set_state(RESIN_TRAP_ACID1 + ACIDER_ACID_LEVEL - 1)

playsound(target, 'sound/effects/refill.ogg', 25, 1)
visible_message(SPAN_XENOWARNING("[src] pressurises the resin trap with acid!"),
SPAN_XENOWARNING("You pressurise the resin trap with acid!"), null, 5)
return TRUE

#undef ACIDER_ACID_LEVEL

/datum/action/xeno_action/activable/acider_for_the_hive/use_ability(atom/affected_atom)
var/mob/living/carbon/xenomorph/xeno = owner

if(!istype(xeno))
return

if(!isturf(xeno.loc))
to_chat(xeno, SPAN_XENOWARNING("It is too cramped in here to activate this!"))
return

var/area/xeno_area = get_area(xeno)
if(xeno_area.flags_area & AREA_CONTAINMENT)
to_chat(xeno, SPAN_XENOWARNING("We can't activate this here!"))
return

if(!xeno.check_state())
return

if(!action_cooldown_check())
return

var/datum/behavior_delegate/runner_acider/behavior_delegate = xeno.behavior_delegate
if(!istype(behavior_delegate))
return

if(behavior_delegate.caboom_trigger)
cancel_ability()
return

if(behavior_delegate.acid_amount < minimal_acid)
to_chat(xeno, SPAN_XENOWARNING("Not enough acid built up for an explosion."))
return

notify_ghosts(header = "For the Hive!", message = "[xeno] is going to explode for the Hive!", source = xeno, action = NOTIFY_ORBIT)

to_chat(xeno, SPAN_XENOWARNING("Our stomach starts turning and twisting, getting ready to compress the built up acid."))
xeno.color = "#22FF22"
xeno.set_light_color("#22FF22")
xeno.set_light_range(3)

behavior_delegate.caboom_trigger = TRUE
behavior_delegate.caboom_left = behavior_delegate.caboom_timer
behavior_delegate.caboom_last_proc = 0
xeno.set_effect(behavior_delegate.caboom_timer*2, SUPERSLOW)

START_PROCESSING(SSfasteffects, src)

xeno.say(";FOR THE HIVE!!!")
return ..()

/datum/action/xeno_action/activable/acider_for_the_hive/proc/cancel_ability()
var/mob/living/carbon/xenomorph/xeno = owner
if(!istype(xeno))
return
var/datum/behavior_delegate/runner_acider/behavior_delegate = xeno.behavior_delegate
if(!istype(behavior_delegate))
return

behavior_delegate.caboom_trigger = FALSE
xeno.color = null
xeno.set_light_range(0)
behavior_delegate.modify_acid(-behavior_delegate.max_acid / 4)

// Done this way rather than setting to 0 in case something else slowed us
// -Original amount set - (time exploding + timer inaccuracy) * how much gets removed per tick / 2
xeno.adjust_effect(behavior_delegate.caboom_timer * -2 - (behavior_delegate.caboom_timer - behavior_delegate.caboom_left + 2) * xeno.life_slow_reduction * 0.5, SUPERSLOW)

to_chat(xeno, SPAN_XENOWARNING("We remove all our explosive acid before it combusted."))

STOP_PROCESSING(SSfasteffects, src)
button.set_maptext()

/datum/action/xeno_action/activable/acider_for_the_hive/process(delta_time)
return update_caboom_maptext()

/datum/action/xeno_action/activable/acider_for_the_hive/proc/update_caboom_maptext()
var/mob/living/carbon/xenomorph/xeno = owner
var/datum/behavior_delegate/runner_acider/delegate = xeno.behavior_delegate
if(!istype(delegate) || !delegate.caboom_trigger || delegate.caboom_left <= 0)
button.set_maptext()
return PROCESS_KILL

button.set_maptext(SMALL_FONTS_COLOR(7, delegate.caboom_left, "#e69d00"), 19, 2)
return
Loading