Skip to content
Draft
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
28 changes: 25 additions & 3 deletions 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,9 +267,31 @@
#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"
/// Used by shielder to check stance.
/// Xenos with this trait cannot spit multiple times.
#define TRAIT_ABILITY_SPITTING "t_ability_charge_spitting"


// -- specific ability traits --
#define TRAIT_ABILITY_POUNCE "t_ability_pounce"
#define TRAIT_ABILITY_ASSASINATE "t_ability_assasinate"
#define TRAIT_ABILITY_INVIS "t_ability_invis"
#define TRAIT_ABILITY_LUNGE "t_ability_lunge"
#define TRAIT_ABILITY_BURROW_DIGGING "t_ability_burrow_digging"
#define TRAIT_ABILITY_BURROW_UNDERGROUND "t_ability_burrow_underground"
#define TRAIT_ABILITY_CREST "t_ability_burrower_crest"
#define TRAIT_ABILITY_FORTIFY "t_ability_fortify"
#define TRAIT_ABILITY_POUNCE_CHARGE "t_ability_pounce_charge"
#define TRAIT_ABILITY_PRE_EMPOWER "t_ability_pre_empower"
#define TRAIT_ABILITY_EMPOWER "t_ability_empower"
#define TRAIT_ABILITY_CATALYZE_EMPOWER "t_ability_catalyze_empower"
#define TRAIT_ABILITY_CLEAVE_ROOT "t_ability_cleave_root"
#define TRAIT_ABILITY_CLEAVE_BUFFED "t_ability_cleave_buffed"
#define TRAIT_ABILITY_PRE_DASH "t_ability_pre_dash"
#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"
#define TRAIT_ABILITY_ENCLOSED_PLATES "t_ability_enclosed_plates"
/// Used by shielder for reflective plates.
#define TRAIT_ABILITY_REFLECTIVE_PLATES "t_ability_reflective_plates"


Expand Down
1 change: 1 addition & 0 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
if(!new_maptext)
return
maptext_overlay = image(null, null, null, layer + 0.1)
maptext_overlay.appearance_flags |= RESET_COLOR
maptext_overlay.maptext = new_maptext
if(new_maptext_x)
maptext_overlay.maptext_x = new_maptext_x
Expand Down
2 changes: 2 additions & 0 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -663,3 +663,5 @@
if(reload_screen)
client.add_to_screen(hud_used.hide_actions_toggle)

#define XENO_ACTION_CHECK(X) if(!X.check_state() || !action_cooldown_check() || !check_plasma_owner(src.plasma_cost)) return
#define XENO_ACTION_CHECK_USE_PLASMA(X) if(!X.check_state() || !action_cooldown_check() || !check_and_use_plasma_owner(src.plasma_cost)) return
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(HAS_TRAIT(src, TRAIT_ABILITY_FORTIFY) || HAS_TRAIT(src, TRAIT_ABILITY_CREST) || 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(HAS_TRAIT(src, TRAIT_ABILITY_FORTIFY) || HAS_TRAIT(src, TRAIT_ABILITY_CREST) || HAS_TRAIT(src, TRAIT_ABILITY_INVIS) || HAS_TRAIT(src, TRAIT_ABILITY_ENCLOSED_PLATES) || HAS_TRAIT(src, TRAIT_ABILITY_REFLECTIVE_PLATES))
to_chat(src, SPAN_XENOWARNING("We can't transmute while in this stance."))
return
if(lock_evolve)
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/XenoAttacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
if(..())
return TRUE

if(HAS_TRAIT(src, TRAIT_ABILITY_BURROWED))
return

switch(M.a_intent)

if(INTENT_HELP)
Expand Down Expand Up @@ -109,7 +112,7 @@
//Hot hot Aliens on Aliens action.
//Actually just used for eating people.
/mob/living/carbon/xenomorph/attack_alien(mob/living/carbon/xenomorph/xeno)
if(xeno.fortify || HAS_TRAIT(xeno, TRAIT_ABILITY_BURROWED) || HAS_TRAIT(xeno, TRAIT_ABILITY_REFLECTIVE_PLATES))
if(HAS_TRAIT(xeno, TRAIT_ABILITY_FORTIFY) || HAS_TRAIT(xeno, TRAIT_ABILITY_BURROWED))
return XENO_NO_DELAY_ACTION

if(HAS_TRAIT(src, TRAIT_ABILITY_BURROWED))
Expand Down
17 changes: 1 addition & 16 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,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
var/extra_build_dist = 0
/// tiles from self you can plant eggs.
Expand Down Expand Up @@ -362,14 +357,6 @@
// Vars that should be deleted
//
//////////////////////////////////////////////////////////////////
var/burrow_timer = 200
var/tunnel_timer = 20

//Burrower Vars
var/used_tremor = 0
// Burrowers
var/used_burrow = 0
var/used_tunnel = 0

//Taken from update_icon for all xeno's
var/list/overlays_standing[X_TOTAL_LAYERS]
Expand Down Expand Up @@ -827,7 +814,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 All @@ -854,7 +841,6 @@
pulledby.stop_pulling()
. = 1


/mob/living/carbon/xenomorph/proc/rename_tunnel(obj/structure/tunnel/tunnel_target in oview(1))
set name = "Rename Tunnel"
set desc = "Rename the tunnel."
Expand All @@ -872,7 +858,6 @@
tunnel_target.tunnel_desc = "[new_name]"
return


/mob/living/carbon/xenomorph/prepare_huds()
..()
//updating all the mob's hud images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
action_type = XENO_ACTION_CLICK
ability_primacy = XENO_PRIMARY_ACTION_3

/datum/action/xeno_action/activable/burrow/use_ability(atom/A)
var/mob/living/carbon/xenomorph/xenomorph = owner
var/used_digging = FALSE
var/digging_timer = 2 SECONDS
var/burrow_timer = 20 SECONDS

if(!action_cooldown_check())
return

if(HAS_TRAIT(xenomorph, TRAIT_ABILITY_BURROWED))
xenomorph.tunnel(get_turf(A))
else
xenomorph.burrow()
return ..()
var/burrow_cooldown = 2 SECONDS
var/digging_cooldown = 7 SECONDS

/datum/action/xeno_action/onclick/tremor
name = "Tremor (100)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
action_type = XENO_ACTION_CLICK
ability_primacy = XENO_PRIMARY_ACTION_3

/datum/action/xeno_action/activable/throw_hugger/action_cooldown_check()
if(owner)
var/mob/living/carbon/xenomorph/carrier/alien = owner
return world.time >= alien.hugger_throw_cooldown // i think
return TRUE //When we first add the ability we still do this check, but owner is null, so a workaround

/datum/action/xeno_action/activable/retrieve_egg
name = "Retrieve Egg"
action_icon_state = "retrieve_egg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
// Object types that don't reduce cooldown when hit
var/list/not_reducing_objects = list()


/datum/action/xeno_action/activable/pounce/crusher_charge/New()
. = ..()
not_reducing_objects = typesof(/obj/structure/barricade) + typesof(/obj/structure/machinery/defenses)

/datum/action/xeno_action/activable/pounce/crusher_charge/initialize_pounce_pass_flags()
pounce_pass_flags = PASS_CRUSHER_CHARGE

/datum/action/xeno_action/onclick/crusher_stomp
name = "Stomp"
action_icon_state = "stomp"
Expand Down Expand Up @@ -119,137 +111,6 @@
var/momentum = 0


/datum/action/xeno_action/onclick/charger_charge/proc/handle_position_change(mob/living/carbon/xenomorph/xeno, body_position)
SIGNAL_HANDLER
if(body_position == LYING_DOWN)
handle_movement(xeno)

/datum/action/xeno_action/onclick/charger_charge/proc/handle_movement(mob/living/carbon/xenomorph/Xeno, atom/oldloc, dir, forced)
SIGNAL_HANDLER
if(Xeno.pulling)
if(!momentum)
steps_taken = 0
return
else
Xeno.stop_pulling()

if(Xeno.is_mob_incapacitated())
if(!momentum)
return
var/distance_to_throw = get_ranged_target_turf(Xeno, charge_dir, momentum/2)
INVOKE_ASYNC(Xeno, TYPE_PROC_REF(/atom/movable, throw_atom), distance_to_throw, momentum/2, SPEED_FAST, null, TRUE)
stop_momentum()
return
if(!isturf(Xeno.loc))
stop_momentum()
return
// Don't build up charge if you move via getting propelled by something
if(Xeno.throwing)
stop_momentum()
return

var/do_stop_momentum = FALSE

// Need to be constantly moving in order to maintain charge
if(world.time > last_charge_move + 0.5 SECONDS)
do_stop_momentum = TRUE
if(dir != charge_dir)
charge_dir = dir
do_stop_momentum = TRUE

if(do_stop_momentum)
stop_momentum()
if(Xeno.plasma_stored <= plasma_per_step)
stop_momentum()
return
last_charge_move = world.time
steps_taken++
if(steps_taken < steps_to_charge)
return
if(momentum < max_momentum)
momentum++
ADD_TRAIT(Xeno, TRAIT_CHARGING, TRAIT_SOURCE_XENO_ACTION_CHARGE)
Xeno.update_icons()
if(momentum == max_momentum)
Xeno.emote("roar")
//X.use_plasma(plasma_per_step) // take if you are in toggle charge mode
if(momentum > 0)
Xeno.use_plasma(plasma_per_step) // take plasma when you have momentum

noise_timer = noise_timer ? --noise_timer : 3
if(noise_timer == 3)
playsound(Xeno, 'sound/effects/alien_footstep_charge1.ogg', 50)

for(var/mob/living/carbon/human/Mob in Xeno.loc)
if(Mob.body_position == LYING_DOWN && Mob.stat != DEAD)
Xeno.visible_message(SPAN_DANGER("[Xeno] runs [Mob] over!"),
SPAN_DANGER("We run [Mob] over!")
)
var/ram_dir = pick(get_perpen_dir(Xeno.dir))
var/dist = 1
if(momentum == max_momentum)
dist = momentum * 0.25
step(Mob, ram_dir, dist)
Mob.take_overall_armored_damage(momentum * 6)
INVOKE_ASYNC(Mob, TYPE_PROC_REF(/mob/living/carbon/human, emote),"pain")
shake_camera(Mob, 7,3)
animation_flash_color(Mob)

Xeno.recalculate_speed()

/datum/action/xeno_action/onclick/charger_charge/proc/handle_dir_change(datum/source, old_dir, new_dir)
SIGNAL_HANDLER
if(new_dir != charge_dir)
charge_dir = new_dir
if(momentum)
stop_momentum()

/datum/action/xeno_action/onclick/charger_charge/proc/handle_river(datum/source, covered)
SIGNAL_HANDLER
if(!covered)
stop_momentum()

/datum/action/xeno_action/onclick/charger_charge/proc/update_speed(mob/living/carbon/xenomorph/Xeno)
SIGNAL_HANDLER
Xeno.speed += momentum * speed_per_momentum

/datum/action/xeno_action/onclick/charger_charge/proc/stop_momentum(datum/source)
SIGNAL_HANDLER
var/mob/living/carbon/xenomorph/Xeno = owner
if(momentum == max_momentum)
Xeno.visible_message(SPAN_DANGER("[Xeno] skids to a halt!"))

REMOVE_TRAIT(Xeno, TRAIT_CHARGING, TRAIT_SOURCE_XENO_ACTION_CHARGE)
steps_taken = 0
momentum = 0
Xeno.recalculate_speed()
Xeno.update_icons()

/datum/action/xeno_action/onclick/charger_charge/proc/lose_momentum(amount)
if(amount >= momentum)
stop_momentum()
else
momentum -= amount
var/mob/living/carbon/xenomorph/Xeno = owner
Xeno.recalculate_speed()

/datum/action/xeno_action/onclick/charger_charge/proc/handle_collision(mob/living/carbon/xenomorph/Xeno, atom/tar)
SIGNAL_HANDLER
if(!momentum)
stop_momentum()
return

var/result = tar.handle_charge_collision(Xeno, src)
switch(result)
if(XENO_CHARGE_TRY_MOVE)
if(step(Xeno, charge_dir))
return COMPONENT_LIVING_COLLIDE_HANDLED

/datum/action/xeno_action/onclick/charger_charge/proc/start_charging(datum/source)
SIGNAL_HANDLER
steps_taken = steps_to_charge


/datum/action/xeno_action/activable/tumble
name = "Tumble"
action_icon_state = "tumble"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,21 @@
/datum/action/xeno_action/activable/pounce/proc/pre_pounce_effects()
return

/**
* Effects to apply before "thrown" xeno to choosen tile.
*/
/datum/action/xeno_action/activable/pounce/proc/start_airbone()
return

/**
* Effects to apply after xeno is "thrown" to choosen tile.
*/
/datum/action/xeno_action/activable/pounce/proc/end_airbone()
var/mob/living/carbon/xenomorph/xeno = owner

if(HAS_TRAIT(xeno, TRAIT_ABILITY_POUNCE))
REMOVE_TRAIT(xeno, TRAIT_ABILITY_POUNCE, TRAIT_SOURCE_ABILITY("pounce"))

/datum/action/xeno_action/activable/pounce/proc/end_pounce_freeze()
if(freeze_timer_id == TIMER_ID_NULL)
return
Expand Down Expand Up @@ -461,8 +476,6 @@
no_cooldown_msg = TRUE // Currently [14.6.25], every xeno that uses this save Boiler has a cooldown far too fast for messages to be worth it
ability_uses_acid_overlay = TRUE

/// Var that keeps track of in-progress wind-up spits like Bombard to prevent spitting multiple spits at the same time
var/spitting = FALSE
var/sound_to_play = "acid_spit"
var/aim_turf = FALSE

Expand Down
Loading
Loading