Skip to content

Commit

Permalink
updates single letter vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee B committed Oct 12, 2023
1 parent ff7a227 commit c4f0a90
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/datum/action/xeno_action/activable/pierce/use_ability(atom/A)
var/mob/living/carbon/xenomorph/X = owner
/datum/action/xeno_action/activable/pierce/use_ability(atom/targetted_atom)
var/mob/living/carbon/xenomorph/source_xeno = owner
if (!action_cooldown_check())
return

if (!X.check_state())
if (!source_xeno.check_state())
return

if(!A || A.layer >= FLY_LAYER || !isturf(X.loc))
if(!targetted_atom || targetted_atom.layer >= FLY_LAYER || !isturf(source_xeno.loc))
return

if (!check_and_use_plasma_owner())
return

//X = xeno user, A = target atom
var/list/turf/target_turfs = getline2(X, A, include_from_atom = FALSE)
var/list/turf/target_turfs = getline2(source_xeno, targetted_atom, include_from_atom = FALSE)
var/len = LAZYLEN(target_turfs)
if(len > 3)
target_turfs = target_turfs.Copy(1, 4)
Expand All @@ -39,38 +39,38 @@
break

if(istype(object, /obj/structure/window/framed))
var/obj/structure/window/framed/W = object
if(!W.unslashable)
W.deconstruct(disassembled = FALSE)
var/obj/structure/window/framed/framed_window = object
if(!framed_window.unslashable)
framed_window.deconstruct(disassembled = FALSE)

//Check for mobs and add them to our target list for damage
if(istype(path_content, /mob/living/carbon))
var/mob/living/carbon/mob_to_act = path_content
if(!isxeno_human(mob_to_act) || X.can_not_harm(mob_to_act))
if(!isxeno_human(mob_to_act) || source_xeno.can_not_harm(mob_to_act))
continue

if(!(mob_to_act in target_mobs))
target_mobs += mob_to_act

X.visible_message(SPAN_XENODANGER("[X] slashes its tail through the area in front of it!"), SPAN_XENODANGER("You slash your tail through the area in front of you!"))
X.animation_attack_on(A, 15)
source_xeno.visible_message(SPAN_XENODANGER("[source_xeno] slashes its tail through the area in front of it!"), SPAN_XENODANGER("You slash your tail through the area in front of you!"))
source_xeno.animation_attack_on(targetted_atom, 15)

X.emote("roar")
source_xeno.emote("roar")

// Loop through our mob list, finding any humans there and dealing damage to them
for (var/mob/living/carbon/H in target_mobs)
if (!isxeno_human(H) || X.can_not_harm(H))
for (var/mob/living/carbon/current_mob in target_mobs)
if (!isxeno_human(current_mob) || source_xeno.can_not_harm(current_mob))
continue

if (H.stat == DEAD)
if (current_mob.stat == DEAD)
continue

X.flick_attack_overlay(H, "slash")
H.apply_armoured_damage(get_xeno_damage_slash(H, damage), ARMOR_MELEE, BRUTE, null, 20)
current_mob.flick_attack_overlay(current_mob, "slash")
current_mob.apply_armoured_damage(get_xeno_damage_slash(current_mob, damage), ARMOR_MELEE, BRUTE, null, 20)

if (target_mobs.len >= shield_regen_threshold)
if (X.mutation_type == PRAETORIAN_VANGUARD)
var/datum/behavior_delegate/praetorian_vanguard/BD = X.behavior_delegate
if (source_xeno.mutation_type == PRAETORIAN_VANGUARD)
var/datum/behavior_delegate/praetorian_vanguard/BD = source_xeno.behavior_delegate
if (istype(BD))
BD.regen_shield()

Expand Down

0 comments on commit c4f0a90

Please sign in to comment.