Skip to content

Commit

Permalink
lurker crippling strike plus general changes
Browse files Browse the repository at this point in the history
  • Loading branch information
morrowwolf committed Oct 30, 2023
1 parent 6d8d5e6 commit 1cd76f1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,15 @@
// (note that if a collided atom does not match any of the key types, defaults to the appropriate X_launch_collision proc)

default_ai_action = TRUE
var/prob_chance = 80

/datum/action/xeno_action/activable/pounce/process_ai(mob/living/carbon/xenomorph/pouncing_xeno, delta_time)
if(get_dist(pouncing_xeno, pouncing_xeno.current_target) > distance || !DT_PROB(prob_chance, delta_time))
return
. = ..()

if(get_dist(pouncing_xeno, pouncing_xeno.current_target) > distance)
return FALSE

if(!DT_PROB(ai_prob_chance, delta_time))
return FALSE

var/turf/last_turf = pouncing_xeno.loc
var/clear = TRUE
Expand All @@ -240,9 +244,10 @@
pouncing_xeno.remove_temp_pass_flags(PASS_OVER_THROW_MOB)

if(!clear)
return
return FALSE

use_ability_async(pouncing_xeno.current_target)
return TRUE

/datum/action/xeno_action/activable/pounce/New()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,26 @@
action_type = XENO_ACTION_ACTIVATE
xeno_cooldown = 100
plasma_cost = 20
default_ai_action = TRUE

var/buff_duration = 50

/datum/action/xeno_action/onclick/lurker_assassinate/process_ai(mob/living/carbon/xenomorph/using_xeno, delta_time)
. = ..()

if(using_xeno.next_move <= world.time)
return FALSE

if(get_dist(using_xeno, using_xeno.current_target) > 1)
return FALSE

if(!DT_PROB(ai_prob_chance, delta_time))
return FALSE

use_ability_async(using_xeno.current_target)

return TRUE

// VAMP LURKER ABILITIES

/datum/action/xeno_action/activable/pounce/rush
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
/// Whether this action gets added to AI xenos
var/default_ai_action = FALSE

/// Chance of use per tick applicable tick
var/ai_prob_chance = 80

// Cooldown
/// Cooldown of the ability (do not use the cooldown var)
/// Probably should only have the cooldown var, but that is for another rework
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
to_chat(bound_xeno, SPAN_XENOHIGHDANGER("You significantly strengthen your attack, slowing [target_carbon]!"))
to_chat(target_carbon, SPAN_XENOHIGHDANGER("You feel a sharp pain as [bound_xeno] slashes you, slowing you down!"))
original_damage *= buffed_slash_damage_ratio
target_carbon.set_effect(get_xeno_stun_duration(target_carbon, 3), SUPERSLOW)
target_carbon.set_effect(get_xeno_stun_duration(target_carbon, 3), SLOW)
next_slash_buffed = FALSE
var/datum/action/xeno_action/onclick/lurker_assassinate/ability = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_assassinate)
if (ability && istype(ability))
Expand Down

0 comments on commit 1cd76f1

Please sign in to comment.