fix: don't auto-mark when the skull can't shoot — mirrors game's validate_target_func_shooting_ability (must be in a following state + above minimum capacitance, with the game's training-grounds charge exemption); previously a ping issued while busy/low-charge hit the prevent_shooting_activation_on_fail branch which sticks the tag for its full 25s lifetime with no retry, blocking mark_limit — the real 'long cooldown after a kill' the game itself routes around for manual double-tags

This commit is contained in:
2026-10-03 17:34:09 -04:00
parent eb8b178a0f
commit afb458e2c2
2 changed files with 18 additions and 1 deletions
+5 -1
View File
@@ -457,6 +457,10 @@ local function can_noospheric_command_boost()
return player_ability_extension:has_enough_ability_charge_percentage("combat_ability", cryptic_talent_settings.servo_skull_shooting_tagging.minimum_capacitance) return player_ability_extension:has_enough_ability_charge_percentage("combat_ability", cryptic_talent_settings.servo_skull_shooting_tagging.minimum_capacitance)
end end
local function is_training_grounds()
return Managers.state.game_mode:game_mode_name() == "training_grounds"
end
local function is_player_in_platform() local function is_player_in_platform()
local locomotion_component = context.locomotion_component local locomotion_component = context.locomotion_component
local locomotion_parent_unit = locomotion_component and locomotion_component.parent_unit local locomotion_parent_unit = locomotion_component and locomotion_component.parent_unit
@@ -473,7 +477,7 @@ local function is_tag_valid(tag_name)
elseif tag_name == TAG_NAMES.ENEMY_TAG then elseif tag_name == TAG_NAMES.ENEMY_TAG then
return context.class_name ~= "veteran" or not context.has_focus_target return context.class_name ~= "veteran" or not context.has_focus_target
elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then
return context.class_name == "cryptic" and context.has_servo_skull and not mod:is_servo_skull_hacking() return context.class_name == "cryptic" and context.has_servo_skull and mod:is_servo_skull_ready_to_shoot() and (is_training_grounds() or can_noospheric_command_boost())
end end
return false return false
end end
@@ -210,6 +210,19 @@ function mod:is_servo_skull_hacking()
return state == servo_skull_states.hacking return state == servo_skull_states.hacking
end end
function mod:is_servo_skull_ready_to_shoot()
local companion_spawner_extension = context.companion_spawner_extension
local companion_unit = companion_spawner_extension and companion_spawner_extension:spawned_unit_lookup(special_rules.cryptic_servo_skull_hack)
if not companion_unit then
return false
end
local game_session = Managers.state.game_session:game_session()
local game_object_id = Managers.state.unit_spawner:game_object_id(companion_unit)
local state = get_game_object_field(game_session, game_object_id, "state")
return state == servo_skull_states.following or state == servo_skull_states.following_shooting or state == servo_skull_states.following_shooting_ability
end
function mod:is_noospheric_command_boost_breed_valid(target_unit) function mod:is_noospheric_command_boost_breed_valid(target_unit)
local unit_data_extension = ScriptUnit_extension(target_unit, "unit_data_system") local unit_data_extension = ScriptUnit_extension(target_unit, "unit_data_system")
local breed_data = unit_data_extension and unit_data_extension._breed local breed_data = unit_data_extension and unit_data_extension._breed