From 384cdf3f4d4f4636a7b0150ad396f48e93787ce5 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Thu, 26 Oct 2023 18:52:44 +0300 Subject: [PATCH 01/41] crusher's AI and changes --- .../abilities/crusher/crusher_abilities.dm | 32 +++++-- .../abilities/crusher/crusher_powers.dm | 24 +++++- .../carbon/xenomorph/ai/movement/crusher.dm | 86 +++++++++++++++++++ .../mob/living/carbon/xenomorph/ai/xeno_ai.dm | 4 +- .../living/carbon/xenomorph/castes/Crusher.dm | 32 +++++-- .../mutators/strains/crusher/charger.dm | 38 +++++++- colonialmarines.dme | 1 + 7 files changed, 200 insertions(+), 17 deletions(-) create mode 100644 code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 6405428de7..1908f115c9 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -44,9 +44,19 @@ var/damage = 65 - var/distance = 2 + var/distance = 5 var/effect_type_base = /datum/effects/xeno_slow/superslow var/effect_duration = 10 + var/windup_duration = 1 SECONDS + + default_ai_action = TRUE + var/prob_chance = 80 + +/datum/action/xeno_action/onclick/crusher_stomp/process_ai(mob/living/carbon/xenomorph/X, delta_time) + if(get_dist(X, X.current_target) >= distance-1 || HAS_TRAIT(X, TRAIT_CHARGING) || !DT_PROB(prob_chance, delta_time)) + return + + use_ability_async() /datum/action/xeno_action/onclick/crusher_stomp/charger name = "Crush" @@ -86,6 +96,15 @@ weaken_power = 0 slowdown = 8 + default_ai_action = TRUE + var/prob_chance = 60 + +/datum/action/xeno_action/activable/fling/charger/process_ai(mob/living/carbon/xenomorph/X, delta_time) + if(get_dist(X, X.current_target) > 1 || HAS_TRAIT(X, TRAIT_CHARGING) || !DT_PROB(prob_chance, delta_time)) + return + + use_ability_async(X.current_target) + /datum/action/xeno_action/onclick/charger_charge name = "Toggle Charging" @@ -97,9 +116,9 @@ // Config vars var/max_momentum = 8 - var/steps_to_charge = 4 - var/speed_per_momentum = XENO_SPEED_FASTMOD_TIER_5 + XENO_SPEED_FASTMOD_TIER_1//2 - var/plasma_per_step = 3 // charger has 400 plasma atm, this gives a good 100 tiles of crooshing + var/steps_to_charge = 3 + var/speed_per_momentum = XENO_SPEED_FASTMOD_TIER_5//2.2 + var/plasma_per_step = 0 // State vars var/activated = FALSE @@ -177,6 +196,9 @@ if(noise_timer == 3) playsound(Xeno, 'sound/effects/alien_footstep_charge1.ogg', 50) + for(var/mob/living/carbon/human/Mob in range(10, Xeno)) + shake_camera(Mob, 2, 1) + for(var/mob/living/carbon/human/Mob in Xeno.loc) if(Mob.lying && Mob.stat != DEAD) Xeno.visible_message(SPAN_DANGER("[Xeno] runs [Mob] over!"), @@ -189,7 +211,7 @@ 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) + shake_camera(Mob, 7, 3) animation_flash_color(Mob) Xeno.recalculate_speed() diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index ce4a631e28..d42269053b 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -109,6 +109,22 @@ if (!check_and_use_plasma_owner()) return + apply_cooldown() + + X.frozen = TRUE + X.anchored = TRUE + X.update_canmove() + + if (!do_after(X, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) + X.frozen = FALSE + X.anchored = FALSE + X.update_canmove() + return + + X.frozen = FALSE + X.anchored = FALSE + X.update_canmove() + playsound(get_turf(X), 'sound/effects/bang.ogg', 25, 0) X.visible_message(SPAN_XENODANGER("[X] smashes into the ground!"), SPAN_XENODANGER("You smash into the ground!")) X.create_stomp() @@ -131,11 +147,15 @@ continue new effect_type_base(H, X, , , get_xeno_stun_duration(H, effect_duration)) - if(H.mob_size < MOB_SIZE_BIG) + if (H.mob_size < MOB_SIZE_BIG) H.apply_effect(get_xeno_stun_duration(H, 0.2), WEAKEN) + + if (H.client) + var/steps = 20 / get_dist(H, X) + shake_camera(H, steps, 2) + to_chat(H, SPAN_XENOHIGHDANGER("You are slowed as [X] knocks you off balance!")) - apply_cooldown() return ..() /datum/action/xeno_action/onclick/crusher_stomp/charger/use_ability() diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm new file mode 100644 index 0000000000..4831e3f98f --- /dev/null +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -0,0 +1,86 @@ +#define CRUSHER_MOMENTUM_MOBILITY 3 +#define CRUSHER_CHARGE_DISTANCE 10 +#define CROOSH_MODE_TIME 16 SECONDS +#define CROOSH_MODE_CD 4 SECONDS + +/datum/xeno_ai_movement/crusher + var/datum/action/xeno_action/onclick/charger_charge/charge_action + var/croosh_mode = FALSE + + COOLDOWN_DECLARE(croosh_mode_cooldown) + COOLDOWN_DECLARE(croosh_mode_timer) + +/datum/xeno_ai_movement/crusher/New(mob/living/carbon/xenomorph/parent) + . = ..() + charge_action = get_xeno_action_by_type(parent, /datum/action/xeno_action/onclick/charger_charge) + +/datum/xeno_ai_movement/crusher/ai_move_target(delta_time) + var/mob/living/carbon/xenomorph/moving_xeno = parent + if(moving_xeno.throwing) + return + + check_ai_mode() + + if(HAS_TRAIT(moving_xeno, TRAIT_CHARGING)) + var/turf/current_loc = moving_xeno.loc + var/mob/target = moving_xeno.current_target + var/moving_dir = moving_xeno.dir + + if(!(get_dir(target, moving_xeno) in reverse_nearby_direction(moving_dir) + NONE)) + if(charge_action.momentum <= CRUSHER_MOMENTUM_MOBILITY) + charge_action.stop_momentum() + return ..() + + charge_action.lose_momentum(1.5) + + var/turf/charge_turf = current_loc + var/list/to_ram = list() + + for(var/i=0, i<=CRUSHER_CHARGE_DISTANCE, i++) + var/turf/T = get_step(charge_turf, moving_dir) + for(var/atom/A in T) + to_ram += A + + if(LinkBlocked(moving_xeno, moving_xeno.loc, T, list(target, moving_xeno) + to_ram)) + break + + charge_turf = T + + if(!moving_xeno.move_to_next_turf(charge_turf, ignore = to_ram)) + return ..() + + var/turf/next_turf = get_step(moving_xeno.loc, moving_dir) + + if(next_turf.density) + if(!moving_xeno.Move(next_turf, moving_dir)) + charge_action.stop_momentum() + + return + + return ..() + +/datum/xeno_ai_movement/crusher/proc/check_ai_mode() + var/mob/living/carbon/xenomorph/croosher = parent + + if(COOLDOWN_FINISHED(src, croosh_mode_cooldown) && !croosh_mode) + INVOKE_ASYNC(charge_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/charger_charge, use_ability_wrapper)) + COOLDOWN_START(src, croosh_mode_timer, CROOSH_MODE_TIME) + croosher.emote("roar") + croosh_mode = TRUE + + if(COOLDOWN_FINISHED(src, croosh_mode_timer) && croosh_mode && !HAS_TRAIT(croosher, TRAIT_CHARGING)) + INVOKE_ASYNC(charge_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/charger_charge, use_ability_wrapper)) + COOLDOWN_START(src, croosh_mode_cooldown, CROOSH_MODE_CD) + croosher.emote("growl") + croosh_mode = FALSE + +#undef CROOSH_MODE_CD +#undef CROOSH_MODE_TIME +#undef CRUSHER_CHARGE_DISTANCE +#undef CRUSHER_MOMENTUM_MOBILITY + +/mob/living/carbon/xenomorph/crusher/Move(NewLoc, direct) + if(direct == 0) + direct = last_move_dir + + return ..() diff --git a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm index 20613e56a2..3fd659f141 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm @@ -135,7 +135,7 @@ GLOBAL_LIST_INIT(ai_target_limbs, list( if(!path) no_path_found = TRUE -/mob/living/carbon/xenomorph/proc/move_to_next_turf(turf/T, max_range = ai_range) +/mob/living/carbon/xenomorph/proc/move_to_next_turf(turf/T, max_range = ai_range, list/ignore) if(!T) return FALSE @@ -145,7 +145,7 @@ GLOBAL_LIST_INIT(ai_target_limbs, list( if(!current_path || (next_path_generation < world.time && current_target_turf != T)) if(!XENO_CALCULATING_PATH(src) || current_target_turf != T) - SSxeno_pathfinding.calculate_path(src, T, max_range, src, CALLBACK(src, PROC_REF(set_path)), list(src, current_target)) + SSxeno_pathfinding.calculate_path(src, T, max_range, src, CALLBACK(src, PROC_REF(set_path)), list(src, current_target) + ignore) current_target_turf = T next_path_generation = world.time + path_update_period diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index bf17025982..a2e23fd602 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -5,13 +5,13 @@ melee_damage_lower = XENO_DAMAGE_TIER_5 melee_damage_upper = XENO_DAMAGE_TIER_5 melee_vehicle_damage = XENO_DAMAGE_TIER_5 - max_health = XENO_HEALTH_TIER_10 + max_health = XENO_HEALTH_QUEEN plasma_gain = XENO_PLASMA_GAIN_TIER_7 - plasma_max = XENO_PLASMA_TIER_4 + plasma_max = XENO_PLASMA_TIER_8 xeno_explosion_resistance = XENO_EXPLOSIVE_ARMOR_TIER_10 armor_deflection = XENO_ARMOR_TIER_3 evasion = XENO_EVASION_NONE - speed = XENO_SPEED_TIER_2 + speed = XENO_SPEED_TIER_4 heal_standing = 0.66 behavior_delegate_type = /datum/behavior_delegate/crusher_base @@ -56,7 +56,8 @@ /datum/action/xeno_action/onclick/regurgitate, /datum/action/xeno_action/watch_xeno, /datum/action/xeno_action/activable/tail_stab, - /datum/action/xeno_action/activable/pounce/crusher_charge, + /datum/action/xeno_action/activable/fling/charger, + /datum/action/xeno_action/onclick/charger_charge, /datum/action/xeno_action/onclick/crusher_stomp, /datum/action/xeno_action/onclick/crusher_shield, /datum/action/xeno_action/onclick/tacmap, @@ -64,11 +65,30 @@ claw_type = CLAW_TYPE_VERY_SHARP mutation_icon_state = CRUSHER_NORMAL - mutation_type = CRUSHER_NORMAL + mutation_type = CRUSHER_CHARGER icon_xeno = 'icons/mob/xenos/crusher.dmi' icon_xenonid = 'icons/mob/xenonids/crusher.dmi' + ai_range = 24 + +/mob/living/carbon/xenomorph/crusher/init_movement_handler() + return new /datum/xeno_ai_movement/crusher(src) + +/mob/living/carbon/xenomorph/crusher/New(loc, ...) + . = ..() + qdel(behavior_delegate) + behavior_delegate = new /datum/behavior_delegate/crusher_charger() + behavior_delegate.bound_xeno = src + behavior_delegate.add_to_xeno() + + RegisterSignal(src, COMSIG_MOB_PRE_CLICK, PROC_REF(on_click)) + +/mob/living/carbon/xenomorph/crusher/proc/on_click(mob/living/carbon/xenomorph/X, atom/target, list/mods) + SIGNAL_HANDLER + if(HAS_TRAIT(src, TRAIT_CHARGING) && !istype(target, /atom/movable/screen)) + return COMPONENT_INTERRUPT_CLICK + // Refactored to handle all of crusher's interactions with object during charge. /mob/living/carbon/xenomorph/proc/handle_collision(atom/target) if(!target) @@ -205,7 +225,7 @@ if (!.) update_icons() -// Mutator delegate for base ravager +// Mutator delegate for base crusher /datum/behavior_delegate/crusher_base name = "Base Crusher Behavior Delegate" diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm index f7daee71df..9b402d4d92 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm @@ -59,7 +59,9 @@ name = "Charger Crusher Behavior Delegate" var/frontal_armor = 30 - var/side_armor = 15 + var/side_armor = 20 + + var/aoe_slash_damage_reduction = 0.40 /datum/behavior_delegate/crusher_charger/add_to_xeno() RegisterSignal(bound_xeno, COMSIG_MOB_SET_FACE_DIR, PROC_REF(cancel_dir_lock)) @@ -69,6 +71,38 @@ SIGNAL_HANDLER return COMPONENT_CANCEL_SET_FACE_DIR +/datum/behavior_delegate/crusher_charger/melee_attack_additional_effects_target(mob/living/carbon/A) + + if (!isxeno_human(A)) + return + + new /datum/effects/xeno_slow(A, bound_xeno, , , 20) + + var/damage = bound_xeno.melee_damage_upper * aoe_slash_damage_reduction + + var/base_cdr_amount = 15 + var/cdr_amount = base_cdr_amount + for (var/mob/living/carbon/H in orange(1, A)) + if (H.stat == DEAD) + continue + + if(!isxeno_human(H) || bound_xeno.can_not_harm(H)) + continue + + cdr_amount += 5 + + bound_xeno.visible_message(SPAN_DANGER("[bound_xeno] slashes [H]!"), \ + SPAN_DANGER("You slash [H]!"), null, null, CHAT_TYPE_XENO_COMBAT) + + bound_xeno.flick_attack_overlay(H, "slash") + + H.last_damage_data = create_cause_data(initial(bound_xeno.name), bound_xeno) + H.apply_armoured_damage(get_xeno_damage_slash(H, damage), ARMOR_MELEE, BRUTE, bound_xeno.zone_selected) + + var/datum/action/xeno_action/onclick/crusher_stomp/cAction = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/crusher_stomp) + if (!cAction.action_cooldown_check()) + cAction.reduce_cooldown(cdr_amount) + /datum/behavior_delegate/crusher_charger/proc/apply_directional_armor(mob/living/carbon/xenomorph/xeno, list/damagedata) SIGNAL_HANDLER var/projectile_direction = damagedata["direction"] @@ -363,7 +397,7 @@ if(LinkBlocked(src, cur_turf, target_turf)) ram_dir = REVERSE_DIR(ram_dir) step(src, ram_dir, charger_ability.momentum * 0.5) - charger_ability.lose_momentum(CCA_MOMENTUM_LOSS_MIN) +// charger_ability.lose_momentum(CCA_MOMENTUM_LOSS_MIN) return XENO_CHARGE_TRY_MOVE // Fellow xenos diff --git a/colonialmarines.dme b/colonialmarines.dme index 5228c4e0dd..48648df818 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1985,6 +1985,7 @@ s// DM Environment file for colonialmarines.dme. #include "code\modules\mob\living\carbon\xenomorph\abilities\warrior\warrior_powers.dm" #include "code\modules\mob\living\carbon\xenomorph\ai\xeno_ai.dm" #include "code\modules\mob\living\carbon\xenomorph\ai\movement\base_define.dm" +#include "code\modules\mob\living\carbon\xenomorph\ai\movement\crusher.dm" #include "code\modules\mob\living\carbon\xenomorph\ai\movement\drone.dm" #include "code\modules\mob\living\carbon\xenomorph\ai\movement\linger.dm" #include "code\modules\mob\living\carbon\xenomorph\castes\Boiler.dm" From af21cbba45ddb91d5fb323e8671dea234299855b Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Thu, 26 Oct 2023 18:53:00 +0300 Subject: [PATCH 02/41] shotgun penetration nerf --- code/datums/ammo/bullet/shotgun.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/datums/ammo/bullet/shotgun.dm b/code/datums/ammo/bullet/shotgun.dm index 9504e3c1d1..527cb9afa5 100644 --- a/code/datums/ammo/bullet/shotgun.dm +++ b/code/datums/ammo/bullet/shotgun.dm @@ -160,7 +160,6 @@ accurate_range = 8 max_range = 8 damage = 90 - penetration = ARMOR_PENETRATION_TIER_4 bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_6 firing_freq_offset = SOUND_FREQ_LOW From 6f05cc994024906ed5c70ac5e967f8535cb2ca24 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Thu, 26 Oct 2023 18:56:59 +0300 Subject: [PATCH 03/41] no abilities while action_busy --- .../carbon/xenomorph/abilities/crusher/crusher_abilities.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 1908f115c9..022640d50d 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -53,7 +53,7 @@ var/prob_chance = 80 /datum/action/xeno_action/onclick/crusher_stomp/process_ai(mob/living/carbon/xenomorph/X, delta_time) - if(get_dist(X, X.current_target) >= distance-1 || HAS_TRAIT(X, TRAIT_CHARGING) || !DT_PROB(prob_chance, delta_time)) + if(!DT_PROB(prob_chance, delta_time) || get_dist(X, X.current_target) >= distance-1 || HAS_TRAIT(X, TRAIT_CHARGING) || X.action_busy) return use_ability_async() @@ -100,7 +100,7 @@ var/prob_chance = 60 /datum/action/xeno_action/activable/fling/charger/process_ai(mob/living/carbon/xenomorph/X, delta_time) - if(get_dist(X, X.current_target) > 1 || HAS_TRAIT(X, TRAIT_CHARGING) || !DT_PROB(prob_chance, delta_time)) + if(!DT_PROB(prob_chance, delta_time) || get_dist(X, X.current_target) > 1 || HAS_TRAIT(X, TRAIT_CHARGING) || X.action_busy) return use_ability_async(X.current_target) From 2e256a4b142a1abcbec025e8cd01cfe876aa7115 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 6 Nov 2023 02:09:47 +0300 Subject: [PATCH 04/41] finally WORKING CROOSHIE --- .../abilities/crusher/crusher_abilities.dm | 11 ++ .../carbon/xenomorph/ai/movement/crusher.dm | 163 ++++++++++++------ .../living/carbon/xenomorph/castes/Crusher.dm | 4 +- .../mutators/strains/crusher/charger.dm | 2 +- 4 files changed, 125 insertions(+), 55 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 022640d50d..61d6c62525 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -214,6 +214,17 @@ shake_camera(Mob, 7, 3) animation_flash_color(Mob) + for(var/mob/living/carbon/human/Mob in orange(1, Xeno)) + if(Mob.knocked_down) + continue + + if(momentum < max_momentum / 2) + continue + + Mob.apply_effect(0.5, WEAKEN) + animation_flash_color(Mob) + shake_camera(Mob, 4, 2) + Xeno.recalculate_speed() /datum/action/xeno_action/onclick/charger_charge/proc/handle_dir_change(datum/source, old_dir, new_dir) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 4831e3f98f..7193491733 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -1,83 +1,142 @@ -#define CRUSHER_MOMENTUM_MOBILITY 3 -#define CRUSHER_CHARGE_DISTANCE 10 -#define CROOSH_MODE_TIME 16 SECONDS -#define CROOSH_MODE_CD 4 SECONDS - /datum/xeno_ai_movement/crusher - var/datum/action/xeno_action/onclick/charger_charge/charge_action - var/croosh_mode = FALSE - COOLDOWN_DECLARE(croosh_mode_cooldown) - COOLDOWN_DECLARE(croosh_mode_timer) + /// The turf we force our crusher to walk to when he charges + var/turf/charge_turf + + +#define AI_NEW_TARGET_COOLDOWN 5 SECONDS /datum/xeno_ai_movement/crusher/New(mob/living/carbon/xenomorph/parent) . = ..() - charge_action = get_xeno_action_by_type(parent, /datum/action/xeno_action/onclick/charger_charge) + addtimer(CALLBACK(src, PROC_REF(get_new_target), parent), AI_NEW_TARGET_COOLDOWN, TIMER_UNIQUE|TIMER_LOOP|TIMER_DELETE_ME) + +/datum/xeno_ai_movement/crusher/proc/get_new_target(mob/living/carbon/xenomorph/parent) + parent.current_target = parent.get_target(parent.ai_range) + +#undef AI_NEW_TARGET_COOLDOWN + + +#define MIN_TARGETS_TO_CHARGE 3 +#define MIN_CHARGE_DISTANCE 5 +#define CHARGE_DEVIATION 1 /datum/xeno_ai_movement/crusher/ai_move_target(delta_time) var/mob/living/carbon/xenomorph/moving_xeno = parent if(moving_xeno.throwing) return - check_ai_mode() + var/target = moving_xeno.current_target - if(HAS_TRAIT(moving_xeno, TRAIT_CHARGING)) - var/turf/current_loc = moving_xeno.loc - var/mob/target = moving_xeno.current_target - var/moving_dir = moving_xeno.dir + if(charge_turf) + if(get_dist(target, moving_xeno) >= moving_xeno.ai_range) + toggle_charging(FALSE) + return TRUE - if(!(get_dir(target, moving_xeno) in reverse_nearby_direction(moving_dir) + NONE)) - if(charge_action.momentum <= CRUSHER_MOMENTUM_MOBILITY) - charge_action.stop_momentum() - return ..() + var/list/to_ram = list() + for(var/turf/turfs in getline2(moving_xeno, charge_turf)) + to_ram += turfs.contents - charge_action.lose_momentum(1.5) + var/charging_dir = get_dir(moving_xeno, charge_turf) + if(moving_xeno.move_to_next_turf(charge_turf, world.maxx, to_ram)) + if(charging_dir in cardinal) + return TRUE - var/turf/charge_turf = current_loc - var/list/to_ram = list() + var/turf/next_turf = get_step(moving_xeno, charging_dir) + if(LinkBlocked(moving_xeno, get_turf(moving_xeno), next_turf)) + if(moving_xeno.Move(next_turf, 0)) + return TRUE - for(var/i=0, i<=CRUSHER_CHARGE_DISTANCE, i++) - var/turf/T = get_step(charge_turf, moving_dir) - for(var/atom/A in T) - to_ram += A + toggle_charging(FALSE) + return TRUE - if(LinkBlocked(moving_xeno, moving_xeno.loc, T, list(target, moving_xeno) + to_ram)) - break + if(get_dist(moving_xeno, target) <= MIN_CHARGE_DISTANCE) + return ..() - charge_turf = T + var/humans_x = 0 + var/humans_y = 0 + var/humans_count = 0 - if(!moving_xeno.move_to_next_turf(charge_turf, ignore = to_ram)) - return ..() + for(var/mob/living/carbon/human/humie in view(MIN_CHARGE_DISTANCE, target)) + if(humie.stat) + continue - var/turf/next_turf = get_step(moving_xeno.loc, moving_dir) + humans_x += humie.x + humans_y += humie.y + humans_count++ - if(next_turf.density) - if(!moving_xeno.Move(next_turf, moving_dir)) - charge_action.stop_momentum() + if(humans_count < MIN_TARGETS_TO_CHARGE) + return ..() - return + humans_x = Floor(humans_x / humans_count) + rand(-CHARGE_DEVIATION, CHARGE_DEVIATION) + humans_y = Floor(humans_y / humans_count) + rand(-CHARGE_DEVIATION, CHARGE_DEVIATION) + + var/turf/middle = locate(humans_x, humans_y, moving_xeno.z) + + var/turf/WE_move_variant = locate(moving_xeno.x, middle.y, moving_xeno.z) + var/turf/NS_move_variant = locate(middle.x, moving_xeno.y, moving_xeno.z) + + var/list/possible_blocked_turfs = list(WE_move_variant, NS_move_variant) + var/list/non_blocked_turfs = list() + + for(var/i=1 to LAZYLEN(possible_blocked_turfs)) + var/turf/next_turf = possible_blocked_turfs[i] + var/blocked = FALSE + + for(var/I=0 to MIN_CHARGE_DISTANCE) + var/turf/last_turf = next_turf + next_turf = get_step(next_turf, get_dir(next_turf, middle)) + + if(LinkBlocked(moving_xeno, last_turf, next_turf)) + blocked = TRUE + + if(blocked) + continue + + non_blocked_turfs += possible_blocked_turfs[i] + + var/lenght = LAZYLEN(non_blocked_turfs) + if(!lenght) + return ..() + + var/turf/to_move + if(lenght == 1) + to_move = pick(non_blocked_turfs) + + if(!to_move) + var/dist_check = get_dist(WE_move_variant, parent) > get_dist(NS_move_variant, parent) + to_move = dist_check ? NS_move_variant : WE_move_variant + + if(!moving_xeno.move_to_next_turf(to_move)) + return ..() + + if(get_turf(moving_xeno) != to_move) + return TRUE + + var/step_dir = get_dir(to_move, middle) + var/turf/edge_turf = get_step(moving_xeno, step_dir) + + while(!edge_turf.density) + edge_turf = get_step(edge_turf, step_dir) + + toggle_charging(TRUE) + charge_turf = edge_turf + + return TRUE + +#undef CHARGE_DEVIATION +#undef MIN_CHARGE_DISTANCE +#undef MIN_TARGETS_TO_CHARGE - return ..() -/datum/xeno_ai_movement/crusher/proc/check_ai_mode() - var/mob/living/carbon/xenomorph/croosher = parent +/datum/xeno_ai_movement/crusher/proc/toggle_charging(toggle) + var/datum/action/xeno_action/onclick/charger_charge/charge_action = get_xeno_action_by_type(parent, /datum/action/xeno_action/onclick/charger_charge) - if(COOLDOWN_FINISHED(src, croosh_mode_cooldown) && !croosh_mode) + if(toggle && !charge_action.activated) INVOKE_ASYNC(charge_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/charger_charge, use_ability_wrapper)) - COOLDOWN_START(src, croosh_mode_timer, CROOSH_MODE_TIME) - croosher.emote("roar") - croosh_mode = TRUE - if(COOLDOWN_FINISHED(src, croosh_mode_timer) && croosh_mode && !HAS_TRAIT(croosher, TRAIT_CHARGING)) + if(!toggle && charge_action.activated) INVOKE_ASYNC(charge_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/charger_charge, use_ability_wrapper)) - COOLDOWN_START(src, croosh_mode_cooldown, CROOSH_MODE_CD) - croosher.emote("growl") - croosh_mode = FALSE - -#undef CROOSH_MODE_CD -#undef CROOSH_MODE_TIME -#undef CRUSHER_CHARGE_DISTANCE -#undef CRUSHER_MOMENTUM_MOBILITY + charge_turf = null /mob/living/carbon/xenomorph/crusher/Move(NewLoc, direct) if(direct == 0) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index a2e23fd602..b8648b7a54 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -70,7 +70,7 @@ icon_xeno = 'icons/mob/xenos/crusher.dmi' icon_xenonid = 'icons/mob/xenonids/crusher.dmi' - ai_range = 24 + ai_range = 28 /mob/living/carbon/xenomorph/crusher/init_movement_handler() return new /datum/xeno_ai_movement/crusher(src) @@ -296,6 +296,6 @@ . += "Shield: [shield_total]" /datum/behavior_delegate/crusher_base/on_update_icons() - if(bound_xeno.throwing || is_charging) //Let it build up a bit so we're not changing icons every single turf + if(HAS_TRAIT(bound_xeno, TRAIT_CHARGING) && !bound_xeno.lying) bound_xeno.icon_state = "[bound_xeno.mutation_icon_state || bound_xeno.mutation_type] Crusher Charging" return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm index 9b402d4d92..704782344c 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm @@ -136,7 +136,7 @@ charger_ability.stop_momentum() return - health -= CHARGER_DESTROY //Usually knocks it down. + health -= CHARGER_DESTROY * 2 //Usually knocks it down. healthcheck() if(QDELETED(src)) From bd6911db6042c6d1e86927ac3ad60ca54f5a76c4 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 6 Nov 2023 04:02:53 +0300 Subject: [PATCH 05/41] stomp animation and human ramming buffs --- .../abilities/crusher/crusher_abilities.dm | 8 +++--- .../abilities/crusher/crusher_powers.dm | 27 +++++++++++++++++++ .../mutators/strains/crusher/charger.dm | 4 +-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 61d6c62525..ea24885ff5 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -46,8 +46,8 @@ var/distance = 5 var/effect_type_base = /datum/effects/xeno_slow/superslow - var/effect_duration = 10 - var/windup_duration = 1 SECONDS + var/effect_duration = 1 SECONDS + var/windup_duration = 1.5 SECONDS default_ai_action = TRUE var/prob_chance = 80 @@ -209,7 +209,7 @@ if(momentum == max_momentum) dist = momentum * 0.25 step(Mob, ram_dir, dist) - Mob.take_overall_armored_damage(momentum * 6) + Mob.take_overall_armored_damage(momentum * 10) INVOKE_ASYNC(Mob, TYPE_PROC_REF(/mob/living/carbon/human, emote),"pain") shake_camera(Mob, 7, 3) animation_flash_color(Mob) @@ -218,7 +218,7 @@ if(Mob.knocked_down) continue - if(momentum < max_momentum / 2) + if(momentum < 5) continue Mob.apply_effect(0.5, WEAKEN) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index d42269053b..9dd60abd3d 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -115,6 +115,12 @@ X.anchored = TRUE X.update_canmove() + if(X.dir == WEST) + animate_stomp(windup_duration, 30) + + if(X.dir == EAST) + animate_stomp(windup_duration, -30) + if (!do_after(X, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) X.frozen = FALSE X.anchored = FALSE @@ -158,6 +164,20 @@ return ..() +/datum/action/xeno_action/onclick/crusher_stomp/proc/animate_stomp(windup_duration, angle) + set waitfor = FALSE + var/duration = windup_duration / 3 + + animate(owner, transform = turn(matrix(), angle / -3.75), time = duration, easing = SINE_EASING|EASE_OUT) + + sleep(duration) + + animate(owner, pixel_y = 3, transform = turn(matrix(), angle), time = duration, easing = SINE_EASING|EASE_OUT) + + sleep(duration) + + animate(owner, pixel_y = 0, transform = matrix(), time = duration, easing = QUAD_EASING|EASE_IN) + /datum/action/xeno_action/onclick/crusher_stomp/charger/use_ability() var/mob/living/carbon/xenomorph/Xeno = owner var/mob/living/carbon/Targeted @@ -295,6 +315,13 @@ button.icon_state = "template" return ..() +/datum/action/xeno_action/activable/fling/charger/use_ability(atom/Target) + if(!.) + return FALSE + + flick("Normal Crusher Charging", owner) + return TRUE + /datum/action/xeno_action/activable/tumble/use_ability(atom/Target) if(!action_cooldown_check()) return diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm index 704782344c..241296f17c 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm @@ -374,9 +374,9 @@ attack_log += text("\[[time_stamp()]\] was xeno charged by [xeno] ([xeno.ckey])") xeno.attack_log += text("\[[time_stamp()]\] xeno charged [src] ([src.ckey])") log_attack("[xeno] ([xeno.ckey]) xeno charged [src] ([src.ckey])") - var/momentum_mult = 5 + var/momentum_mult = 7 if(charger_ability.momentum == charger_ability.max_momentum) - momentum_mult = 8 + momentum_mult = 10 take_overall_armored_damage(charger_ability.momentum * momentum_mult, ARMOR_MELEE, BRUTE, 60, 13) // Giving AP because this spreads damage out and then applies armor to them apply_armoured_damage(charger_ability.momentum * momentum_mult/4, ARMOR_MELEE, BRUTE,"chest") xeno.visible_message( From e81988fe2df7944f91df939b10b2f88457a30055 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 6 Nov 2023 16:44:54 +0300 Subject: [PATCH 06/41] a lil' bit longer stun after stomp --- .../carbon/xenomorph/abilities/crusher/crusher_powers.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index 9dd60abd3d..fe63446726 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -143,7 +143,7 @@ to_chat(H, SPAN_XENOHIGHDANGER("You are slowed as [X] knocks you off balance!")) if(H.mob_size < MOB_SIZE_BIG) - H.apply_effect(get_xeno_stun_duration(H, 0.2), WEAKEN) + H.apply_effect(get_xeno_stun_duration(H, 0.4), WEAKEN) H.apply_armoured_damage(get_xeno_damage_slash(H, damage), ARMOR_MELEE, BRUTE) H.last_damage_data = create_cause_data(X.caste_type, X) @@ -154,7 +154,7 @@ new effect_type_base(H, X, , , get_xeno_stun_duration(H, effect_duration)) if (H.mob_size < MOB_SIZE_BIG) - H.apply_effect(get_xeno_stun_duration(H, 0.2), WEAKEN) + H.apply_effect(get_xeno_stun_duration(H, 0.4), WEAKEN) if (H.client) var/steps = 20 / get_dist(H, X) From 0cf7312dc6d618f21781cdaabbb9776e99a04693 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 6 Nov 2023 17:07:38 +0300 Subject: [PATCH 07/41] oopsie broken fling fixed!!! Now with small anim --- .../carbon/xenomorph/abilities/crusher/crusher_powers.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index fe63446726..fc77f33250 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -316,9 +316,8 @@ return ..() /datum/action/xeno_action/activable/fling/charger/use_ability(atom/Target) - if(!.) + if (..() == FALSE) return FALSE - flick("Normal Crusher Charging", owner) return TRUE From d70c7951b853d68d2d25b834e8ba72883b1b7764 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Mon, 6 Nov 2023 17:26:42 +0300 Subject: [PATCH 08/41] bruv now fixed for real --- .../carbon/xenomorph/abilities/crusher/crusher_powers.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index fc77f33250..3046913a1c 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -315,10 +315,12 @@ button.icon_state = "template" return ..() -/datum/action/xeno_action/activable/fling/charger/use_ability(atom/Target) - if (..() == FALSE) +/datum/action/xeno_action/activable/fling/charger/check_and_use_plasma_owner(plasma_to_use) + if (!check_plasma_owner(plasma_to_use)) return FALSE + flick("Normal Crusher Charging", owner) + use_plasma_owner(plasma_to_use) return TRUE /datum/action/xeno_action/activable/tumble/use_ability(atom/Target) From 5e82b3a13896fa7f4c566dac42c9d069d07a298b Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Tue, 7 Nov 2023 16:17:18 +0300 Subject: [PATCH 09/41] minor spelling mistake --- .../xenomorph/abilities/crusher/crusher_abilities.dm | 7 ++++--- .../living/carbon/xenomorph/ai/movement/crusher.dm | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index ea24885ff5..7ddf7f6fd0 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -215,15 +215,16 @@ animation_flash_color(Mob) for(var/mob/living/carbon/human/Mob in orange(1, Xeno)) - if(Mob.knocked_down) + if(momentum < 5) continue - if(momentum < 5) + shake_camera(Mob, 4, 2) + + if(Mob.knocked_down) continue Mob.apply_effect(0.5, WEAKEN) animation_flash_color(Mob) - shake_camera(Mob, 4, 2) Xeno.recalculate_speed() diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 7193491733..1e0c3787b8 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -27,6 +27,7 @@ var/target = moving_xeno.current_target + /// If we are charging - override everything and just move straight towards charge_turf if(charge_turf) if(get_dist(target, moving_xeno) >= moving_xeno.ai_range) toggle_charging(FALSE) @@ -56,6 +57,7 @@ var/humans_y = 0 var/humans_count = 0 + /// Now we getting medium coordinates from all humans standing around our target for(var/mob/living/carbon/human/humie in view(MIN_CHARGE_DISTANCE, target)) if(humie.stat) continue @@ -78,6 +80,7 @@ var/list/possible_blocked_turfs = list(WE_move_variant, NS_move_variant) var/list/non_blocked_turfs = list() + /// Checking which one of two ways is non-blocked in distance of MIN_CHARGE_DISTANCE for(var/i=1 to LAZYLEN(possible_blocked_turfs)) var/turf/next_turf = possible_blocked_turfs[i] var/blocked = FALSE @@ -94,13 +97,13 @@ non_blocked_turfs += possible_blocked_turfs[i] - var/lenght = LAZYLEN(non_blocked_turfs) - if(!lenght) + var/length = LAZYLEN(non_blocked_turfs) + if(!length) return ..() var/turf/to_move - if(lenght == 1) - to_move = pick(non_blocked_turfs) + if(length == 1) + to_move = non_blocked_turfs[1] if(!to_move) var/dist_check = get_dist(WE_move_variant, parent) > get_dist(NS_move_variant, parent) @@ -112,6 +115,7 @@ if(get_turf(moving_xeno) != to_move) return TRUE + /// When we eventially get to our move_variant - get an edge_turf in middle direction and toggle charging var/step_dir = get_dir(to_move, middle) var/turf/edge_turf = get_step(moving_xeno, step_dir) From aa8a898a0723c0fe3051d3d3e68edd54930bd002 Mon Sep 17 00:00:00 2001 From: Morrow Date: Wed, 8 Nov 2023 21:02:08 -0500 Subject: [PATCH 10/41] moves shotgun ammo around --- code/datums/ammo/bullet/shotgun.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/datums/ammo/bullet/shotgun.dm b/code/datums/ammo/bullet/shotgun.dm index 527cb9afa5..d8a7248436 100644 --- a/code/datums/ammo/bullet/shotgun.dm +++ b/code/datums/ammo/bullet/shotgun.dm @@ -159,8 +159,8 @@ accurate_range = 8 max_range = 8 - damage = 90 - bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_6 + damage = 60 + bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_8 firing_freq_offset = SOUND_FREQ_LOW //buckshot variant only used by the masterkey shotgun attachment. @@ -195,7 +195,6 @@ accurate_range = 8 max_range = 8 damage = 90 - penetration = ARMOR_PENETRATION_TIER_4 firing_freq_offset = SOUND_FREQ_LOW /* From 7d22db31d79d46fa5ef0139f4668ea34f79c6cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BA=D1=82=D0=BE?= <65656972+xDanilcusx@users.noreply.github.com> Date: Thu, 9 Nov 2023 05:41:36 +0300 Subject: [PATCH 11/41] Nahh no anim till we get some sprites!! --- .../abilities/crusher/crusher_powers.dm | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index 3046913a1c..4e13e6f0a7 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -115,12 +115,6 @@ X.anchored = TRUE X.update_canmove() - if(X.dir == WEST) - animate_stomp(windup_duration, 30) - - if(X.dir == EAST) - animate_stomp(windup_duration, -30) - if (!do_after(X, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) X.frozen = FALSE X.anchored = FALSE @@ -164,20 +158,6 @@ return ..() -/datum/action/xeno_action/onclick/crusher_stomp/proc/animate_stomp(windup_duration, angle) - set waitfor = FALSE - var/duration = windup_duration / 3 - - animate(owner, transform = turn(matrix(), angle / -3.75), time = duration, easing = SINE_EASING|EASE_OUT) - - sleep(duration) - - animate(owner, pixel_y = 3, transform = turn(matrix(), angle), time = duration, easing = SINE_EASING|EASE_OUT) - - sleep(duration) - - animate(owner, pixel_y = 0, transform = matrix(), time = duration, easing = QUAD_EASING|EASE_IN) - /datum/action/xeno_action/onclick/crusher_stomp/charger/use_ability() var/mob/living/carbon/xenomorph/Xeno = owner var/mob/living/carbon/Targeted From 8f65a08c4c5907506f61f52901fb55b3af4d5efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BA=D1=82=D0=BE?= <65656972+xDanilcusx@users.noreply.github.com> Date: Thu, 9 Nov 2023 05:42:35 +0300 Subject: [PATCH 12/41] Lowering stomp windup --- .../carbon/xenomorph/abilities/crusher/crusher_abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 7ddf7f6fd0..4ffffd2c00 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -47,7 +47,7 @@ var/distance = 5 var/effect_type_base = /datum/effects/xeno_slow/superslow var/effect_duration = 1 SECONDS - var/windup_duration = 1.5 SECONDS + var/windup_duration = 1 SECONDS default_ai_action = TRUE var/prob_chance = 80 From 2b1bc598d70e43d7447b5f075a87cde83e331375 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Thu, 9 Nov 2023 15:48:00 +0300 Subject: [PATCH 13/41] Revert "Lowering stomp windup" This reverts commit 8f65a08c4c5907506f61f52901fb55b3af4d5efc. --- .../carbon/xenomorph/abilities/crusher/crusher_abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 4ffffd2c00..7ddf7f6fd0 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -47,7 +47,7 @@ var/distance = 5 var/effect_type_base = /datum/effects/xeno_slow/superslow var/effect_duration = 1 SECONDS - var/windup_duration = 1 SECONDS + var/windup_duration = 1.5 SECONDS default_ai_action = TRUE var/prob_chance = 80 From 9fd5f57ce24a5345ae8a5c278cffcb94c0b85198 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Thu, 9 Nov 2023 15:48:03 +0300 Subject: [PATCH 14/41] Revert "Nahh no anim till we get some sprites!!" This reverts commit 7d22db31d79d46fa5ef0139f4668ea34f79c6cd1. --- .../abilities/crusher/crusher_powers.dm | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index 4e13e6f0a7..3046913a1c 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -115,6 +115,12 @@ X.anchored = TRUE X.update_canmove() + if(X.dir == WEST) + animate_stomp(windup_duration, 30) + + if(X.dir == EAST) + animate_stomp(windup_duration, -30) + if (!do_after(X, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) X.frozen = FALSE X.anchored = FALSE @@ -158,6 +164,20 @@ return ..() +/datum/action/xeno_action/onclick/crusher_stomp/proc/animate_stomp(windup_duration, angle) + set waitfor = FALSE + var/duration = windup_duration / 3 + + animate(owner, transform = turn(matrix(), angle / -3.75), time = duration, easing = SINE_EASING|EASE_OUT) + + sleep(duration) + + animate(owner, pixel_y = 3, transform = turn(matrix(), angle), time = duration, easing = SINE_EASING|EASE_OUT) + + sleep(duration) + + animate(owner, pixel_y = 0, transform = matrix(), time = duration, easing = QUAD_EASING|EASE_IN) + /datum/action/xeno_action/onclick/crusher_stomp/charger/use_ability() var/mob/living/carbon/xenomorph/Xeno = owner var/mob/living/carbon/Targeted From a1e5364119d2fef79825db934aedc94f1cc79ba3 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Thu, 9 Nov 2023 17:28:03 +0300 Subject: [PATCH 15/41] chonky tonky --- code/modules/mob/living/carbon/xenomorph/Xenomorph.dm | 1 + .../mob/living/carbon/xenomorph/ai/movement/crusher.dm | 2 +- code/modules/mob/living/carbon/xenomorph/attack_alien.dm | 2 +- code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm | 7 +++++-- code/modules/mob/living/carbon/xenomorph/life.dm | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index b9e44b142f..13f61b48ca 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -85,6 +85,7 @@ melee_damage_lower = 5 melee_damage_upper = 10 var/melee_vehicle_damage = 10 + var/melee_sentry_damage_multiplier = 1 var/claw_type = CLAW_TYPE_SHARP var/burn_damage_lower = 0 var/burn_damage_upper = 0 diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 1e0c3787b8..5d57fd7ba5 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -4,7 +4,7 @@ var/turf/charge_turf -#define AI_NEW_TARGET_COOLDOWN 5 SECONDS +#define AI_NEW_TARGET_COOLDOWN 2 SECONDS /datum/xeno_ai_movement/crusher/New(mob/living/carbon/xenomorph/parent) . = ..() diff --git a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm index c331324770..aad8d40f3b 100644 --- a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm +++ b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm @@ -659,7 +659,7 @@ M.animation_attack_on(src) playsound(src, 'sound/effects/metalhit.ogg', 25, 1) - update_health(rand(M.melee_damage_lower, M.melee_damage_upper)) + update_health(rand(M.melee_damage_lower, M.melee_damage_upper) * M.melee_sentry_damage_multiplier) if(health <= 0) M.visible_message(SPAN_DANGER("[M] slices \the [src] apart!"), \ SPAN_DANGER("You slice \the [src] apart!"), null, 5, CHAT_TYPE_XENO_COMBAT) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index b8648b7a54..9922858264 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -4,8 +4,8 @@ melee_damage_lower = XENO_DAMAGE_TIER_5 melee_damage_upper = XENO_DAMAGE_TIER_5 - melee_vehicle_damage = XENO_DAMAGE_TIER_5 - max_health = XENO_HEALTH_QUEEN + melee_vehicle_damage = XENO_DAMAGE_TIER_5 * 8 + max_health = XENO_HEALTH_IMMORTAL plasma_gain = XENO_PLASMA_GAIN_TIER_7 plasma_max = XENO_PLASMA_TIER_8 xeno_explosion_resistance = XENO_EXPLOSIVE_ARMOR_TIER_10 @@ -25,6 +25,8 @@ evolution_allowed = FALSE deevolves_to = list(XENO_CASTE_WARRIOR) caste_desc = "A huge tanky xenomorph." + fire_intensity_resistance = 40 + fire_vulnerability_mult = 0.25 minimap_icon = "crusher" @@ -37,6 +39,7 @@ plasma_types = list(PLASMA_CHITIN) tier = 3 drag_delay = 6 //pulling a big dead xeno is hard + melee_sentry_damage_multiplier = 2 small_explosives_stun = FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/life.dm b/code/modules/mob/living/carbon/xenomorph/life.dm index da66c61bfc..f1f02e47a7 100644 --- a/code/modules/mob/living/carbon/xenomorph/life.dm +++ b/code/modules/mob/living/carbon/xenomorph/life.dm @@ -83,7 +83,7 @@ G.die() drop_inv_item_on_ground(G) if(!caste || !(caste.fire_immunity & FIRE_IMMUNITY_NO_DAMAGE) || fire_reagent.fire_penetrating) - if(caste.fire_immunity & FIRE_VULNERABILITY && caste.fire_vulnerability_mult >= 1) + if(caste.fire_immunity & FIRE_VULNERABILITY && caste.fire_vulnerability_mult != 1) apply_damage(PASSIVE_BURN_DAM_CALC(fire_reagent.intensityfire, fire_reagent.durationfire, fire_stacks) * caste.fire_vulnerability_mult, BURN) else apply_damage(armor_damage_reduction(GLOB.xeno_fire, PASSIVE_BURN_DAM_CALC(fire_reagent.intensityfire, fire_reagent.durationfire, fire_stacks)), BURN) From 02d9561eafc7d9288f03f21d05ed88e6d40944a0 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Thu, 9 Nov 2023 19:28:17 +0300 Subject: [PATCH 16/41] maybe even THAT fast --- code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 5d57fd7ba5..56e0c6bca0 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -4,7 +4,7 @@ var/turf/charge_turf -#define AI_NEW_TARGET_COOLDOWN 2 SECONDS +#define AI_NEW_TARGET_COOLDOWN 1 SECONDS /datum/xeno_ai_movement/crusher/New(mob/living/carbon/xenomorph/parent) . = ..() From 927ea625b3ec7703db49ad16e82292e212a5a315 Mon Sep 17 00:00:00 2001 From: Morrow Date: Thu, 9 Nov 2023 16:20:10 -0500 Subject: [PATCH 17/41] flame changes --- code/__DEFINES/xeno.dm | 1 - code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm | 1 - code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm | 2 +- code/modules/mob/living/carbon/xenomorph/life.dm | 5 +---- code/modules/mob/living/carbon/xenomorph/xeno_defines.dm | 2 +- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/code/__DEFINES/xeno.dm b/code/__DEFINES/xeno.dm index 935f58f69c..c77dac05fc 100644 --- a/code/__DEFINES/xeno.dm +++ b/code/__DEFINES/xeno.dm @@ -662,7 +662,6 @@ #define FIRE_IMMUNITY_NO_DAMAGE (1<<0) #define FIRE_IMMUNITY_NO_IGNITE (1<<1) #define FIRE_IMMUNITY_XENO_FRENZY (1<<2) -#define FIRE_VULNERABILITY (1<<3) #define FIRE_MULTIPLIER_BASE 1 #define FIRE_MULTIPLIER_LOW 1.25 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm b/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm index 092dae00d6..2651137a80 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm @@ -22,7 +22,6 @@ acid_level = 3 caste_luminosity = 2 spit_types = list(/datum/ammo/xeno/boiler_gas, /datum/ammo/xeno/boiler_gas/acid) - fire_immunity = FIRE_VULNERABILITY // 3x fire damage fire_vulnerability_mult = FIRE_MULTIPLIER_DEADLY diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index 9922858264..ae7243af9f 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -25,7 +25,7 @@ evolution_allowed = FALSE deevolves_to = list(XENO_CASTE_WARRIOR) caste_desc = "A huge tanky xenomorph." - fire_intensity_resistance = 40 + fire_intensity_resistance = 10 fire_vulnerability_mult = 0.25 minimap_icon = "crusher" diff --git a/code/modules/mob/living/carbon/xenomorph/life.dm b/code/modules/mob/living/carbon/xenomorph/life.dm index f1f02e47a7..6ea3b699dc 100644 --- a/code/modules/mob/living/carbon/xenomorph/life.dm +++ b/code/modules/mob/living/carbon/xenomorph/life.dm @@ -83,10 +83,7 @@ G.die() drop_inv_item_on_ground(G) if(!caste || !(caste.fire_immunity & FIRE_IMMUNITY_NO_DAMAGE) || fire_reagent.fire_penetrating) - if(caste.fire_immunity & FIRE_VULNERABILITY && caste.fire_vulnerability_mult != 1) - apply_damage(PASSIVE_BURN_DAM_CALC(fire_reagent.intensityfire, fire_reagent.durationfire, fire_stacks) * caste.fire_vulnerability_mult, BURN) - else - apply_damage(armor_damage_reduction(GLOB.xeno_fire, PASSIVE_BURN_DAM_CALC(fire_reagent.intensityfire, fire_reagent.durationfire, fire_stacks)), BURN) + apply_damage(armor_damage_reduction(GLOB.xeno_fire, PASSIVE_BURN_DAM_CALC(fire_reagent.intensityfire, fire_reagent.durationfire, fire_stacks) * caste.fire_vulnerability_mult), BURN) INVOKE_ASYNC(src, TYPE_PROC_REF(/mob, emote), pick("roar", "needhelp")) #undef PASSIVE_BURN_DAM_CALC diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index a74fa74138..f2e287b6fc 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -101,7 +101,7 @@ var/caste_luminosity = 0 /// if fire_immunity is set to be vulnerable, how much will fire damage be multiplied. Defines in xeno.dm - var/fire_vulnerability_mult = 0 + var/fire_vulnerability_mult = 1 var/burrow_cooldown = 5 SECONDS var/tunnel_cooldown = 100 From 41daaac331aac477bd99e68171ff1fc876b94c17 Mon Sep 17 00:00:00 2001 From: Morrow Date: Thu, 9 Nov 2023 16:40:18 -0500 Subject: [PATCH 18/41] stops pounce --- .../carbon/xenomorph/abilities/crusher/crusher_abilities.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm index 7ddf7f6fd0..6e3ef8b072 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_abilities.dm @@ -19,6 +19,9 @@ should_destroy_objects = TRUE throw_speed = SPEED_FAST tracks_target = FALSE + + default_ai_action = FALSE + var/direct_hit_damage = 60 var/frontal_armor = 15 // Object types that dont reduce cooldown when hit From 783519503e0dcdc77a57bcaf59ec1f9e07d13853 Mon Sep 17 00:00:00 2001 From: Morrow Date: Thu, 9 Nov 2023 16:40:30 -0500 Subject: [PATCH 19/41] not a fan of this but let's see --- .../mob/living/carbon/xenomorph/ai/movement/crusher.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 56e0c6bca0..22be24a779 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -119,8 +119,10 @@ var/step_dir = get_dir(to_move, middle) var/turf/edge_turf = get_step(moving_xeno, step_dir) - while(!edge_turf.density) + var/cap = 0 + while(!edge_turf.density && cap < 8) edge_turf = get_step(edge_turf, step_dir) + cap++ toggle_charging(TRUE) charge_turf = edge_turf From 0d7b3e5a70c0f5a71019a91025b50773d545d210 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Fri, 10 Nov 2023 02:14:06 +0300 Subject: [PATCH 20/41] stomp nerf --- .../carbon/xenomorph/abilities/crusher/crusher_powers.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index 3046913a1c..fba253d375 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -152,12 +152,14 @@ if (H.stat == DEAD || X.can_not_harm(H)) continue + var/distance = get_dist(H,X) + new effect_type_base(H, X, , , get_xeno_stun_duration(H, effect_duration)) - if (H.mob_size < MOB_SIZE_BIG) + if (H.mob_size < MOB_SIZE_BIG && distance <= 3) H.apply_effect(get_xeno_stun_duration(H, 0.4), WEAKEN) if (H.client) - var/steps = 20 / get_dist(H, X) + var/steps = 20 / distance shake_camera(H, steps, 2) to_chat(H, SPAN_XENOHIGHDANGER("You are slowed as [X] knocks you off balance!")) From f0925eea2f6195d4125adaf35647e6ebf3c20414 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Fri, 10 Nov 2023 02:14:19 +0300 Subject: [PATCH 21/41] no more losing all momentum on drones --- .../living/carbon/xenomorph/mutators/strains/crusher/charger.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm index 241296f17c..6471c62aa2 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/crusher/charger.dm @@ -435,7 +435,7 @@ apply_effect(1, WEAKEN) // brief flicker stun src.throw_atom(src.loc,1,3,xeno,TRUE) step(src, ram_dir, charger_ability.momentum * 0.5) - charger_ability.lose_momentum(CCA_MOMENTUM_LOSS_MIN) +// charger_ability.lose_momentum(CCA_MOMENTUM_LOSS_MIN) return XENO_CHARGE_TRY_MOVE charger_ability.stop_momentum() From 70696eb7418b0b4a2930789e26a59a785e7f6857 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Fri, 10 Nov 2023 02:14:54 +0300 Subject: [PATCH 22/41] charge distance changes and ignore xeno in the way --- .../carbon/xenomorph/ai/movement/crusher.dm | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 22be24a779..4eff08c926 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -17,7 +17,8 @@ #define MIN_TARGETS_TO_CHARGE 3 -#define MIN_CHARGE_DISTANCE 5 +#define MIN_CHARGE_DISTANCE 4 +#define FLOCK_SCAN_RADIUS 5 #define CHARGE_DEVIATION 1 /datum/xeno_ai_movement/crusher/ai_move_target(delta_time) @@ -25,11 +26,12 @@ if(moving_xeno.throwing) return + var/ai_range = moving_xeno.ai_range var/target = moving_xeno.current_target /// If we are charging - override everything and just move straight towards charge_turf if(charge_turf) - if(get_dist(target, moving_xeno) >= moving_xeno.ai_range) + if(get_dist(target, moving_xeno) >= ai_range) toggle_charging(FALSE) return TRUE @@ -58,7 +60,7 @@ var/humans_count = 0 /// Now we getting medium coordinates from all humans standing around our target - for(var/mob/living/carbon/human/humie in view(MIN_CHARGE_DISTANCE, target)) + for(var/mob/living/carbon/human/humie in view(FLOCK_SCAN_RADIUS, target)) if(humie.stat) continue @@ -89,7 +91,11 @@ var/turf/last_turf = next_turf next_turf = get_step(next_turf, get_dir(next_turf, middle)) - if(LinkBlocked(moving_xeno, last_turf, next_turf)) + var/list/ignore = list() + for(var/mob/living/carbon/xenomorph/xeno_blocker in next_turf) + ignore += xeno_blocker + + if(LinkBlocked(moving_xeno, last_turf, next_turf, ignore)) blocked = TRUE if(blocked) @@ -119,10 +125,10 @@ var/step_dir = get_dir(to_move, middle) var/turf/edge_turf = get_step(moving_xeno, step_dir) - var/cap = 0 - while(!edge_turf.density && cap < 8) + for(var/i=1 to ai_range * 2) + if(edge_turf.density) + break edge_turf = get_step(edge_turf, step_dir) - cap++ toggle_charging(TRUE) charge_turf = edge_turf @@ -130,6 +136,7 @@ return TRUE #undef CHARGE_DEVIATION +#undef FLOCK_SCAN_RADIUS #undef MIN_CHARGE_DISTANCE #undef MIN_TARGETS_TO_CHARGE From bd9d81a265a01828259693920607660cebe1eb97 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Fri, 10 Nov 2023 03:43:42 +0300 Subject: [PATCH 23/41] maybe that --- code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 4eff08c926..068ff42cdf 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -16,7 +16,7 @@ #undef AI_NEW_TARGET_COOLDOWN -#define MIN_TARGETS_TO_CHARGE 3 +#define MIN_TARGETS_TO_CHARGE 2 #define MIN_CHARGE_DISTANCE 4 #define FLOCK_SCAN_RADIUS 5 #define CHARGE_DEVIATION 1 From a652bc700d1bc92b9958d41c2ee78936ee19de68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BA=D1=82=D0=BE?= <65656972+xDanilcusx@users.noreply.github.com> Date: Fri, 10 Nov 2023 04:23:24 +0300 Subject: [PATCH 24/41] Aand a little bit of this --- .../mob/living/carbon/xenomorph/ai/movement/crusher.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 068ff42cdf..83569450c6 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -17,8 +17,8 @@ #define MIN_TARGETS_TO_CHARGE 2 -#define MIN_CHARGE_DISTANCE 4 -#define FLOCK_SCAN_RADIUS 5 +#define MIN_CHARGE_DISTANCE 3 +#define FLOCK_SCAN_RADIUS 4 #define CHARGE_DEVIATION 1 /datum/xeno_ai_movement/crusher/ai_move_target(delta_time) From f58dd7afdee680bf972e0cf666b784fff37050ba Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Sat, 11 Nov 2023 03:45:10 +0300 Subject: [PATCH 25/41] should've just added MAX_CHARGE_DISTANCE define :3 --- .../mob/living/carbon/xenomorph/ai/movement/crusher.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm index 83569450c6..675d9b872d 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/crusher.dm @@ -17,6 +17,7 @@ #define MIN_TARGETS_TO_CHARGE 2 +#define MAX_CHARGE_DISTANCE 50 #define MIN_CHARGE_DISTANCE 3 #define FLOCK_SCAN_RADIUS 4 #define CHARGE_DEVIATION 1 @@ -121,14 +122,14 @@ if(get_turf(moving_xeno) != to_move) return TRUE - /// When we eventially get to our move_variant - get an edge_turf in middle direction and toggle charging + /// When we eventially get to our move_variant - get an edge_turf in direction of middle, and then toggle our charging ability var/step_dir = get_dir(to_move, middle) var/turf/edge_turf = get_step(moving_xeno, step_dir) - for(var/i=1 to ai_range * 2) + for(var/i=1 to MAX_CHARGE_DISTANCE) + edge_turf = get_step(edge_turf, step_dir) if(edge_turf.density) break - edge_turf = get_step(edge_turf, step_dir) toggle_charging(TRUE) charge_turf = edge_turf @@ -138,12 +139,12 @@ #undef CHARGE_DEVIATION #undef FLOCK_SCAN_RADIUS #undef MIN_CHARGE_DISTANCE +#undef MAX_CHARGE_DISTANCE #undef MIN_TARGETS_TO_CHARGE /datum/xeno_ai_movement/crusher/proc/toggle_charging(toggle) var/datum/action/xeno_action/onclick/charger_charge/charge_action = get_xeno_action_by_type(parent, /datum/action/xeno_action/onclick/charger_charge) - if(toggle && !charge_action.activated) INVOKE_ASYNC(charge_action, TYPE_PROC_REF(/datum/action/xeno_action/onclick/charger_charge, use_ability_wrapper)) From ed58df59957dda469be9aff2068d8340508c987d Mon Sep 17 00:00:00 2001 From: Morrow Date: Sun, 12 Nov 2023 19:29:32 -0500 Subject: [PATCH 26/41] no animation maybe if we get sprites --- .../abilities/crusher/crusher_powers.dm | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm index fba253d375..6f285fec2a 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/crusher/crusher_powers.dm @@ -115,12 +115,6 @@ X.anchored = TRUE X.update_canmove() - if(X.dir == WEST) - animate_stomp(windup_duration, 30) - - if(X.dir == EAST) - animate_stomp(windup_duration, -30) - if (!do_after(X, windup_duration, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE)) X.frozen = FALSE X.anchored = FALSE @@ -166,20 +160,6 @@ return ..() -/datum/action/xeno_action/onclick/crusher_stomp/proc/animate_stomp(windup_duration, angle) - set waitfor = FALSE - var/duration = windup_duration / 3 - - animate(owner, transform = turn(matrix(), angle / -3.75), time = duration, easing = SINE_EASING|EASE_OUT) - - sleep(duration) - - animate(owner, pixel_y = 3, transform = turn(matrix(), angle), time = duration, easing = SINE_EASING|EASE_OUT) - - sleep(duration) - - animate(owner, pixel_y = 0, transform = matrix(), time = duration, easing = QUAD_EASING|EASE_IN) - /datum/action/xeno_action/onclick/crusher_stomp/charger/use_ability() var/mob/living/carbon/xenomorph/Xeno = owner var/mob/living/carbon/Targeted From 5891e7afe58e59645a4eceaea4b77efee048f0a4 Mon Sep 17 00:00:00 2001 From: Morrow Date: Mon, 13 Nov 2023 21:53:13 -0500 Subject: [PATCH 27/41] spawn sound and partial firaview --- .../living/carbon/xenomorph/castes/Crusher.dm | 15 +++------------ sound/voice/alien_crusher_spawn.ogg | Bin 0 -> 61818 bytes 2 files changed, 3 insertions(+), 12 deletions(-) create mode 100644 sound/voice/alien_crusher_spawn.ogg diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index ae7243af9f..4ae1916521 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -14,7 +14,7 @@ speed = XENO_SPEED_TIER_4 heal_standing = 0.66 - behavior_delegate_type = /datum/behavior_delegate/crusher_base + behavior_delegate_type = /datum/behavior_delegate/crusher_charger minimum_evolve_time = 15 MINUTES @@ -78,19 +78,10 @@ /mob/living/carbon/xenomorph/crusher/init_movement_handler() return new /datum/xeno_ai_movement/crusher(src) -/mob/living/carbon/xenomorph/crusher/New(loc, ...) +/mob/living/carbon/xenomorph/crusher/Initialize(mapload, mob/living/carbon/xenomorph/oldXeno, h_number, ai_hard_off = FALSE) . = ..() - qdel(behavior_delegate) - behavior_delegate = new /datum/behavior_delegate/crusher_charger() - behavior_delegate.bound_xeno = src - behavior_delegate.add_to_xeno() - RegisterSignal(src, COMSIG_MOB_PRE_CLICK, PROC_REF(on_click)) - -/mob/living/carbon/xenomorph/crusher/proc/on_click(mob/living/carbon/xenomorph/X, atom/target, list/mods) - SIGNAL_HANDLER - if(HAS_TRAIT(src, TRAIT_CHARGING) && !istype(target, /atom/movable/screen)) - return COMPONENT_INTERRUPT_CLICK + playsound(src, 'sound/voice/alien_crusher_spawn.ogg', 100, 1, 30) // Refactored to handle all of crusher's interactions with object during charge. /mob/living/carbon/xenomorph/proc/handle_collision(atom/target) diff --git a/sound/voice/alien_crusher_spawn.ogg b/sound/voice/alien_crusher_spawn.ogg new file mode 100644 index 0000000000000000000000000000000000000000..b93030e3edd58093395331ca1432ce8c880a762f GIT binary patch literal 61818 zcmce-d00~E|2KX>R5UbDG&C&0B}8q&rPP)|1y?jcFw`u>9kp?7odr<|(ab$uDpy3* zMon9+X53R#bI)pOv@Dmlsis-#Gvn`AGvDWPJ-_REp6mC|@4gN<_kHf=ocHU!-0%B+ z&e<0gm%2D zY}1bMKdRf*LRS}QNi#*p${p2ip zQC2@DEQd1iZ-%oEHvj+_AR=nz);#kPjyXkPw&f;OI>q=o*5fo~ta&G`p7$1EhZXIL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