# Approximate annex-country infamy for AI gating (population-scaled, ignores interest-tier tweaks).
uw_estimated_annex_infamy_base = {
	value = 5
	multiply = {
		value = 1
		add = {
			value = scope:target_country.total_population
			divide = define:NDiplomacy|WAR_GOAL_INFAMY_POPULATION_SCALING_FACTOR
			multiply = define:NDiplomacy|WAR_GOAL_INFAMY_POPULATION_SCALING_MULTIPLIER
			max = define:NDiplomacy|WAR_GOAL_INFAMY_POPULATION_SCALING_MULTIPLIER_MAX_TOTAL
		}
	}
	min = 5
}

# Scaled by the active Union War infamy game rule.
uw_estimated_union_war_infamy = {
	value = uw_estimated_annex_infamy_base

	if = {
		limit = { has_game_rule = uw_infamy_none }
		multiply = 0
	}
	else_if = {
		limit = { has_game_rule = uw_infamy_quarter }
		multiply = 0.25
	}
	else_if = {
		limit = { has_game_rule = uw_infamy_half }
		multiply = 0.5
	}
	# uw_infamy_full keeps multiply = 1
}
