/tg/ Station 13 - Modules - Types

code/datums/ai/basic_mobs/target_priority_strategies/_target_priority_strategy.dm

/datum/target_priority_strategyTarget priority datum, exists to allow target acquisition behaviors to have custom selection policies. Singleton.
/datum/target_priority_strategy/nearestSelects the closest candidate.
/datum/target_priority_strategy/most_woundedSelects the living candidate with the lowest health.
/datum/target_priority_strategy/prioritize_traitSelects candidates carrying the trait configured in trait_key before candidates without it.
/datum/target_priority_strategy/type_weightedChooses a nonempty target type tier by weight, then randomly chooses a target within that tier. This prevents a large number of low-priority candidates from drowning out one high-priority candidate.