﻿council_calculate_progression_effect = {
	if = {
		limit = {
			has_activity_intent = council_support_host
			OR = {
				is_vassal_of = scope:host
				is_ruler = yes
			}
		}
		if = {
			limit = { is_vassal_of = scope:host }
			if = {
				limit = { has_government = theocracy_government }
				scope:activity = { change_variable = { name = activity_special_type_progression add = 10 } }
			}
			if = {
				limit = { is_powerful_vassal = yes }
				scope:activity = { change_variable = { name = activity_special_type_progression add = 20 } }
			}
			else = {
				scope:activity = { change_variable = { name = activity_special_type_progression add = 10 } }
			}
			if = {
				limit = { is_ruler = yes }
				if = {
					limit = { has_government = landless_adventurer_government }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 5 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_empire }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 15 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_kingdom }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 7 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_duchy }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 5 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_county }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 2 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_barony }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 7 } }
				}
			}
		}
		else = {
			if = {
				limit = { has_government = theocracy_government }
				scope:activity = { change_variable = { name = activity_special_type_progression add = 5 } }
			}
			if = {
				limit = { is_ruler = yes }
				if = {
					limit = { has_government = landless_adventurer_government }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 2 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_empire }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 7 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_kingdom }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 3 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_duchy }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 2 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_county }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 1 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_barony }
					scope:activity = { change_variable = { name = activity_special_type_progression add = 3 } }
				}
			}
		}
	}
	if = {
		limit = {
			has_activity_intent = council_support_pretender
			OR = {
				is_vassal_of = scope:host
				is_ruler = yes
			}
		}
		if = {
			limit = { is_vassal_of = scope:host }
			if = {
				limit = { has_government = theocracy_government }
				scope:activity = { change_variable = { name = activity_special_type_progression add = -10 } }
			}
			if = {
				limit = { is_powerful_vassal = yes }
				scope:activity = { change_variable = { name = activity_special_type_progression add = -20 } }
			}
			else = {
				scope:activity = { change_variable = { name = activity_special_type_progression add = -10 } }
			}
			if = {
				limit = { is_ruler = yes }
				if = {
					limit = { has_government = landless_adventurer_government }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -5 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_empire }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -15 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_kingdom }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -7 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_duchy }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -5 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_county }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -2 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_barony }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -7 } }
				}
			}
		}
		else = {
			if = {
				limit = { has_government = theocracy_government }
				scope:activity = { change_variable = { name = activity_special_type_progression add = -5 } }
			}
			if = {
				limit = { is_ruler = yes }
				if = {
					limit = { has_government = landless_adventurer_government }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -2 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_empire }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -7 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_kingdom }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -3 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_duchy }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -2 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_county }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -1 } }
				}
				else_if = {
					limit = { primary_title.tier = tier_barony }
					scope:activity = { change_variable = { name = activity_special_type_progression add = -3 } }
				}
			}
		}
	}
}