diff --git a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm index fa9036bd8305..be2700aa4fca 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm @@ -621,22 +621,22 @@ if(pipe) handle_ventcrawl(pipe) -/mob/living/carbon/xenomorph/proc/attempt_tackle(mob/M, tackle_mult = 1, tackle_min_offset = 0, tackle_max_offset = 0, tackle_bonus = 0) - var/datum/tackle_counter/TC = LAZYACCESS(tackle_counter, M) +/mob/living/carbon/xenomorph/proc/attempt_tackle(mob/living/carbon/human/tackled_mob, tackle_min_offset = 0, tackle_max_offset = 0) + var/datum/tackle_counter/TC = LAZYACCESS(tackle_counter, tackled_mob) if(!TC) - TC = new(tackle_min + tackle_min_offset, tackle_max + tackle_max_offset, tackle_chance*tackle_mult) - LAZYSET(tackle_counter, M, TC) - RegisterSignal(M, COMSIG_MOB_KNOCKED_DOWN, PROC_REF(tackle_handle_lying_changed)) + TC = new(tackled_mob, tackle_min + tackle_min_offset, tackle_max + tackle_max_offset) + LAZYSET(tackle_counter, tackled_mob, TC) + RegisterSignal(tackled_mob, COMSIG_MOB_KNOCKED_DOWN, PROC_REF(tackle_handle_lying_changed)) if (TC.tackle_reset_id) deltimer(TC.tackle_reset_id) TC.tackle_reset_id = null - . = TC.attempt_tackle(tackle_bonus) - if (!. || (M.status_flags & XENO_HOST)) - TC.tackle_reset_id = addtimer(CALLBACK(src, PROC_REF(reset_tackle), M), 4 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) + . = TC.attempt_tackle() + if (!. || (tackled_mob.status_flags & XENO_HOST)) + TC.tackle_reset_id = addtimer(CALLBACK(src, PROC_REF(reset_tackle), tackled_mob), 4 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) else - reset_tackle(M) + reset_tackle(tackled_mob) /mob/living/carbon/xenomorph/proc/tackle_handle_lying_changed(mob/M) SIGNAL_HANDLER diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 90c22e19c483..7f738716c521 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -102,9 +102,8 @@ var/can_hivemind_speak = TRUE // Tackles - var/tackle_min = 2 - var/tackle_max = 6 - var/tackle_chance = 35 + var/tackle_min = 3 + var/tackle_max = 7 var/tacklestrength_min = 2 var/tacklestrength_max = 3 @@ -199,7 +198,6 @@ var/explosivearmor_modifier = 0 var/plasmapool_modifier = 1 var/plasmagain_modifier = 0 - var/tackle_chance_modifier = 0 var/regeneration_multiplier = 1 var/speed_modifier = 0 var/phero_modifier = 0 @@ -876,7 +874,6 @@ /mob/living/carbon/xenomorph/proc/recalculate_tackle() tackle_min = caste.tackle_min tackle_max = caste.tackle_max - tackle_chance = caste.tackle_chance + tackle_chance_modifier tacklestrength_min = caste.tacklestrength_min + mutators.tackle_strength_bonus + hive.mutators.tackle_strength_bonus tacklestrength_max = caste.tacklestrength_max + mutators.tackle_strength_bonus + hive.mutators.tackle_strength_bonus diff --git a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm index 25f6108c14f6..beecd60edaf2 100644 --- a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm +++ b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm @@ -194,15 +194,13 @@ return XENO_ATTACK_ACTION M.flick_attack_overlay(src, "disarm") - var/tackle_mult = 1 var/tackle_min_offset = 0 var/tackle_max_offset = 0 if (isyautja(src)) - tackle_mult = 0.2 - tackle_min_offset += 2 - tackle_max_offset += 2 + tackle_min_offset += 3 + tackle_max_offset += 3 - if(M.attempt_tackle(src, tackle_mult, tackle_min_offset, tackle_max_offset)) + if(M.attempt_tackle(src, tackle_min_offset, tackle_max_offset)) playsound(loc, 'sound/weapons/alien_knockdown.ogg', 25, 1) apply_effect(rand(M.tacklestrength_min, M.tacklestrength_max), WEAKEN) M.visible_message(SPAN_DANGER("[M] tackles down [src]!"), \ diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm b/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm index 092dae00d603..c96dcc04e437 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Boiler.dm @@ -26,9 +26,8 @@ // 3x fire damage fire_vulnerability_mult = FIRE_MULTIPLIER_DEADLY - tackle_min = 2 + tackle_min = 3 tackle_max = 6 - tackle_chance = 25 tacklestrength_min = 3 tacklestrength_max = 4 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm b/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm index ead254344e0a..fc9574cf1eaf 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Burrower.dm @@ -24,8 +24,7 @@ behavior_delegate_type = /datum/behavior_delegate/burrower_base tackle_min = 3 - tackle_max = 5 - tackle_chance = 40 + tackle_max = 6 tacklestrength_min = 4 tacklestrength_max = 5 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm index 6b847a6a4fec..22ff58055d5f 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Carrier.dm @@ -26,9 +26,8 @@ huggers_max = 16 eggs_max = 8 - tackle_min = 2 - tackle_max = 4 - tackle_chance = 50 + tackle_min = 3 + tackle_max = 5 tacklestrength_min = 4 tacklestrength_max = 5 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm index bf1702598250..4f7421aa1445 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Crusher.dm @@ -18,9 +18,8 @@ minimum_evolve_time = 15 MINUTES - tackle_min = 2 + tackle_min = 3 tackle_max = 6 - tackle_chance = 25 evolution_allowed = FALSE deevolves_to = list(XENO_CASTE_WARRIOR) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm b/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm index 8c05fa53660e..7d4219aa2dc0 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Defender.dm @@ -20,7 +20,7 @@ behavior_delegate_type = /datum/behavior_delegate/defender_base - tackle_min = 2 + tackle_min = 3 tackle_max = 4 minimum_evolve_time = 4 MINUTES diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm index dbdb03bb94ca..18b833205632 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Drone.dm @@ -24,7 +24,7 @@ weed_level = WEED_LEVEL_STANDARD max_build_dist = 1 - tackle_min = 2 + tackle_min = 3 tackle_max = 4 tacklestrength_min = 3 tacklestrength_max = 4 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm index a44fee5645ac..5db4f256af66 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm @@ -18,7 +18,6 @@ tackle_min = 4 tackle_max = 5 - tackle_chance = 40 tacklestrength_min = 4 tacklestrength_max = 4 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm b/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm index b0a44b0e3835..d9f3b1fb5890 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Hivelord.dm @@ -25,9 +25,8 @@ behavior_delegate_type = /datum/behavior_delegate/hivelord_base max_build_dist = 1 - tackle_min = 2 + tackle_min = 3 tackle_max = 4 - tackle_chance = 45 tacklestrength_min = 4 tacklestrength_max = 5 diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm index c106eb30781b..8dfd6f3e31d5 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm @@ -53,7 +53,7 @@ mutation_type = LURKER_NORMAL claw_type = CLAW_TYPE_SHARP - tackle_min = 2 + tackle_min = 4 tackle_max = 6 icon_xeno = 'icons/mob/xenos/lurker.dmi' diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm b/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm index 344e1e21f302..5af6e2900831 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Praetorian.dm @@ -22,9 +22,8 @@ aura_strength = 3 spit_delay = 20 - tackle_min = 2 + tackle_min = 3 tackle_max = 5 - tackle_chance = 45 behavior_delegate_type = /datum/behavior_delegate/praetorian_base diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm b/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm index 14aa31b1f1e8..fd76ca545cd2 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm @@ -147,7 +147,7 @@ Your health meter will not regenerate normally, so kill and die for the hive!= max_tackles) return TRUE - else if (tackle_count < min_tackles) + + if (tackle_count < min_tackles) return FALSE - else if (prob(tackle_chance + tackle_bonus)) + + var/tackle_mob_damage = 100 - max(tackled_mob.health, TACKLE_HEALTH_CONSIDERATION_CAP) + var/tackle_tier_cut_offs = TACKLE_DAMAGE_CONSIDERATION_MAX / (max_tackles - min_tackles) + var/tackle_tier_diff = tackle_mob_damage / tackle_tier_cut_offs + var/tackles_required = max_tackles - tackle_tier_diff + + if(tackle_count >= tackles_required) return TRUE return FALSE + +#undef TACKLE_HEALTH_CONSIDERATION_CAP +#undef TACKLE_DAMAGE_CONSIDERATION_MAX