﻿#EK NOTE: removed IRL decision
#EK TODO COMP 1-13: check if triumph is appropriate for our cultures
hold_triumph_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/ep3_decision_hold_triumph.dds"
	}
	ai_check_interval = 60

	sort_order = 110

	desc = hold_triumph_decision_desc
	selection_tooltip = hold_triumph_decision_tooltip
	decision_group_type = major

	is_shown = {
		has_ep3_dlc_trigger = yes
		#OR = {
		#	has_title = title:e_byzantium
		#	has_title = title:e_roman_empire
		#}
		highest_held_title_tier >= tier_empire
		culture = { has_cultural_parameter = holds_triumphs }
	}

	is_valid = {
		is_at_war = no
		#OR = {
		#	has_title = title:e_byzantium
		#	has_title = title:e_roman_empire
		#}
		highest_held_title_tier >= tier_empire
		culture = { has_cultural_parameter = holds_triumphs }
	}

	is_valid_showing_failures_only = {
		is_alive = yes
		is_available_healthy_adult = yes
		NOT = { exists = involved_activity }
		is_imprisoned = no
	}

	cost = {
		gold = {
			value = 0
			if = {
				limit = {
					#EK EDIT
					# NOT = { has_character_flag = free_triumph_flag }
					always = yes
				}
				add = ep3_triumph_gold_cost
			}
		}
		influence = {
			value = 0
			if = {
				limit = {
					#EK EDIT
					# NOT = { has_character_flag = free_triumph_flag }
					always = yes
				}
				add = ep3_triumph_influence_cost
			}
		}
	}

	cooldown = { years = 10 }

	effect = {
		custom_tooltip = hold_triumph_decision_effects
		trigger_event = {
			id = ep3_decisions_event.0001
			days = 1
		}
		#EK DISABLED
		#if = {
		#	limit = { has_character_flag = free_triumph_flag }
		#	remove_character_flag = free_triumph_flag
		#}
	}

	ai_potential = {
		NOT = { has_trait = humble }
		has_variable = ep3_valid_triumph_victory
	}

	ai_will_do = {
		base = 30
		modifier = {
			has_trait = arrogant
			add = 30
		}
		modifier = {
			has_trait = ambitious
			add = 20
		}
	}
}
#EK DISABLED: deleted roman decisions

#mass_arrests_decision = {
#	picture = {
#		reference = "gfx/interface/illustrations/decisions/decision_prison.dds"
#	}
#	sort_order = 115
#
#	desc = mass_arrests_decision_desc
#	selection_tooltip = mass_arrests_decision_tooltip
#	decision_group_type = admin
#
#	is_shown = {
#		has_ep3_dlc_trigger = yes
#		government_allows = administrative
#		primary_title.tier ?= tier_empire
#		dynasty ?= { has_dynasty_perk = ep3_administrative_legacy_5 }
#	}
#
#	is_valid = {
#		government_has_flag = government_is_administrative
#		primary_title.tier ?= tier_empire
#		dynasty ?= { has_dynasty_perk = ep3_administrative_legacy_5 }
#	}
#
#	is_valid_showing_failures_only = {
#		NOT = { exists = involved_activity }
#		is_imprisoned = no
#		any_powerful_family = {
#			count >= 1
#		}
#	}
#
#	cost = {
#		influence = monumental_influence_value
#	}
#
#	cooldown = { years = 20 }
#
#	effect = {
#		show_as_tooltip = {
#			add_tyranny = massive_tyranny_gain
#			add_legitimacy = medium_legitimacy_loss
#
#			custom_tooltip = house_loses_power_rating
#			random_powerful_family = {
#				every_house_member = {
#					custom = choose_a_powerful_family
#					change_influence = major_influence_loss
#					custom_tooltip = imprisoned_by_you
#					add_opinion = {
#						modifier = imprisoned_me
#						years = 10
#						target = root
#					}
#				}
#			}
#		}
#
#		trigger_event = ep3_decisions_event.3200
#	}
#
#	ai_potential = {
#		always = no
#	}
#
#	ai_check_interval = 0
#
#	ai_will_do = {
#		base = 0
#	}
#}

change_state_faith = {
	#EK DISABLED: deleted pictures for irl religions/titles
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}

	ai_check_interval = 60
	sort_order = 110
	decision_group_type = admin

	desc = change_state_faith_decision_desc
	selection_tooltip = change_state_faith_decision_selection_tooltip

	is_shown = {
		has_ep3_dlc_trigger = yes
		government_allows = state_faith
		exists = primary_title.state_faith
		faith != primary_title.state_faith
	}

	is_valid = {
		government_allows = state_faith
		NOT = { faith ?= top_liege.primary_title.state_faith }
	}

	is_valid_showing_failures_only = {
		NOT = { exists = involved_activity }
		is_imprisoned = no
	}

	cost = {
		influence = {
			value = 5000
			if = {
				limit = {
					has_character_flag = ep3_hof_state_faith_discount
				}
				multiply = {
					value = 0.7
					desc = hof_state_faith_discount
				}
			}
			if = {
				limit = {
					domicile ?= { has_domicile_parameter = reduce_state_faith_cost }
				}
				multiply = {
					value = 0.9
					desc = domicile_large_temple
				}
			}
			if = {
				limit = {
					has_perk = prophet_perk
				}
				multiply = {
					value = 1
					subtract = admin_state_faith_cost_perk_value
					desc = "[GetPerk('prophet_perk').GetName(GetPlayer)]"
				}
			}
		}
		piety = {
			value = 5000
			if = {
				limit = {
					has_character_flag = ep3_hof_state_faith_discount
				}
				multiply = {
					value = 0.7
					desc = hof_state_faith_discount
				}
			}
			if = {
				limit = {
					domicile ?= { has_domicile_parameter = reduce_state_faith_cost }
				}
				multiply = {
					value = 0.9
					desc = domicile_large_temple
				}
			}
			if = {
				limit = {
					has_perk = prophet_perk
				}
				multiply = {
					value = 1
					subtract = admin_state_faith_cost_perk_value
					desc = "[GetPerk('prophet_perk').GetName(GetPlayer)]"
				}
			}
		}
	}

	effect = {
		hidden_effect = {
			primary_title.state_faith = { save_scope_as = old_faith }
			root.faith = { save_scope_as = new_faith }
			create_character_memory = { type = changed_state_faith_memory }
			scope:new_memory = {
				set_variable = {
					name = old_faith
					value = scope:old_faith
				}
				set_variable = {
					name = new_faith
					value = scope:new_faith
				}
				set_variable = {
					name = title
					value = root.primary_title
				}
			}
		}

		primary_title = { set_state_faith = root.faith }
		capital_county = { set_county_faith = root.faith }

		# Some vassals who like you the most will convert
		every_vassal = {
			custom = vassals_change_state_faith
			limit = {
				opinion = {
					target = root
					value >= 30
				}
				faith != root.faith
				NOT = { has_vassal_stance = zealot }
				is_ai = yes
			}

			hidden_effect = {
				faith = { save_scope_as = old_faith }
				root.faith = { save_scope_as = new_faith }
				create_character_memory = { type = adopted_state_faith_memory }
				scope:new_memory = {
					set_variable = {
						name = old_faith
						value = scope:old_faith
					}
					set_variable = {
						name = new_faith
						value = scope:new_faith
					}
					set_variable = {
						name = title
						value = root.primary_title
					}
				}
			}

			set_character_faith = root.faith
		}

		# Opinion malus with Zealot vassals
		save_scope_as = root_scope
		every_vassal = {
			limit = {
				has_vassal_stance = zealot
				faith != root.faith
			}
			custom = every_zealot_vassal
			add_opinion = {
				target = root
				modifier = changed_state_faith_opinion
				opinion = -30
			}
		}

		# Notify and let the players choose
		every_vassal = {
			limit = {
				is_ai = no
			}
			trigger_event = {
				id = ep3_emperor_yearly.2300
				days = 1
			}
		}
	}

	ai_potential = {
		government_has_flag = government_is_administrative
		primary_title.tier >= tier_empire
		faith != primary_title.state_faith
	}

	ai_will_do = {
		base = 50
		modifier = {
			has_trait = ambitious
			add = 30
		}
		modifier = {
			has_trait = arbitrary
			add = 30
		}
		modifier = {
			has_trait = arrogant
			add = 25
		}
		modifier = {
			has_trait = lazy
			add = -20
		}
		modifier = {
			has_trait = content
			add = -50
		}
		modifier = {
			has_trait = cynical
			add = -50
		}
		modifier = {
			has_trait = zealous
			factor = 2
		}
	}
}

adopt_state_faith = {
	#EK DISABLED: deleted pictures for irl religions/titles
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}

	ai_check_interval = 60
	sort_order = 110
	decision_group_type = admin

	desc = adopt_state_faith_decision_desc
	selection_tooltip = adopt_state_faith_decision_selection_tooltip

	is_shown = {
		has_ep3_dlc_trigger = yes
		top_liege = { government_allows = state_faith }
		exists = top_liege.primary_title.state_faith
		NOT = { faith ?= top_liege.primary_title.state_faith }
		#If ai, don't show if faith is tolerated. Players can always adopt it
		trigger_if = {
			limit = { is_ai = yes }
			is_faith_tolerated_by_admin_government = { EMPIRE = top_liege.primary_title FAITH = root.faith }
		}
	}

	is_valid = {
		top_liege = { government_allows = state_faith }
		NOT = { faith ?= top_liege.primary_title.state_faith }
	}

	is_valid_showing_failures_only = {
		NOT = {
			custom_description = {
				text = "is_in_an_activity"
				exists = involved_activity
			}
		}
		is_imprisoned = no
		NOT = { faith.religious_head ?= root }
	}

	cost = {}

	effect = {
		hidden_effect = {
			faith = { save_scope_as = old_faith }
			top_liege.faith = { save_scope_as = new_faith }
			create_character_memory = { type = adopted_state_faith_memory }
			scope:new_memory = {
				set_variable = {
					name = old_faith
					value = scope:old_faith
				}
				set_variable = {
					name = new_faith
					value = scope:new_faith
				}
				set_variable = {
					name = title
					value = root.top_liege.primary_title
				}
			}
		}

		set_character_faith = top_liege.primary_title.state_faith

		if = {
			limit = { NOT = { has_character_flag = adopted_state_faith } }
			if = {
				limit = { government_allows = administrative }
				change_influence = monumental_influence_gain
			}
			add_piety = massive_piety_gain
			top_liege = {
				if = {
					limit = { faith = primary_title.state_faith }
					add_opinion = {
						target = root
						modifier = converted_to_state_faith_opinion
						opinion = 30
					}
				}
				every_vassal = {
					custom = every_governor_of_state_faith
					limit = {
						faith = top_liege.primary_title.state_faith
						this != root
					}
					add_opinion = {
						target = root
						modifier = converted_to_state_faith_opinion
						opinion = 30
					}
				}
			}
			add_character_flag = adopted_state_faith
		}
	}

	ai_potential = {
		government_has_flag = government_is_administrative
		NOT = { has_trait = zealous } # A zealous vassal would presumably not want to change their faith
		exists = top_liege.primary_title.state_faith
		faith != top_liege.primary_title.state_faith
	}

	ai_will_do = {
		base = 20
		modifier = {
			is_governor = yes
			add = 40
		}
		
		# Personality
		modifier = {
			is_governor = yes
			has_trait = ambitious
			add = 20
		}
		modifier = {
			has_trait = fickle
			add = 30
		}
		modifier = {
			has_trait = arbitrary
			add = 10
		}
		modifier = {
			has_trait = ambitious
			add = -15
		}
		modifier = {
			has_trait = arrogant
			add = -15
		}
		modifier = {
			has_trait = content
			add = -20
		}
		modifier = {
			has_trait = cynical
			add = -30
		}
		modifier = {
			has_trait = stubborn
			add = -50
		}
		
		# Faith
		modifier = { # More likely to switch away from an unreformed faith
			faith ?= { has_doctrine_parameter = unreformed }
			add = 20
		}
		modifier = { # Communal Identity make it more likely to adopt faith if they share same culture with the top liege
			faith ?= { has_doctrine_parameter = same_culture_conversion_bonus_active }
			culture ?= top_liege.culture
			add = 10
		}
		modifier = { # Some faith are more likely to be abandoned
			faith ?= { has_doctrine_parameter = unattractive_for_character_conversions }
			add = 10
		}
		modifier = { # Don't adopt the state faith if you have the same faith as the top liege (if the emperor can have this faith, so can we!)
			faith = top_liege.faith
			is_independent_ruler = no
			factor = 0
		}
		
		# Other
		modifier = {
			has_vassal_stance = zealot
			factor = 0.3
		}
		
		# Non-admin vassals only consider converting if their faith hostility is low enough
		modifier = {
			NOT = { government_has_flag = government_is_administrative }
			faith ?= {
				faith_hostility_level = {
					target = root.top_liege.primary_title.state_faith
					value >= faith_hostile_level
				}
			}
			factor = 0
		}
	}
}

found_salon_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_golden_age.dds"
	}
	sort_order = 120

	desc = found_salon_decision_desc
	selection_tooltip = found_salon_decision_tooltip
	decision_group_type = adventurer

	is_shown = {
		has_ep3_dlc_trigger = yes
		has_trait = violet_poet
		NOT = {	#You can only do it once.
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_founded_salon
			}
		}
	}

	is_valid = {
		has_trait = violet_poet
		custom_tooltip = {
			text = found_salon_decision_trigger_tt
			any_courtier = {
				has_trait = poet
				count > 4
			}
		}
	}

	cost = {
		gold = {
			value = 350
			if = {
				limit = {
					has_character_modifier = ep3_power_couple_modifier
				}
				subtract = 125
			}
		}
	}

	effect = {
		root.location = {
			save_scope_as = location
		}
		show_as_tooltip = {
			if = {
				limit = {
					exists = dynasty
				}
				dynasty = {
					add_dynasty_prestige = medium_dynasty_prestige_gain
				}
			}
			add_prestige = major_prestige_gain
			scope:location = {
				add_province_modifier = {
					modifier = ep3_poets_salon_modifier
					years = 250
				}
			}
			add_character_modifier = {
				modifier = ep3_founded_salon_modifier
			}
		}

		hidden_effect = {
			add_to_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_founded_salon
			}
		}

		trigger_event = ep3_decisions_event.4080
	}

	ai_potential = {
		always = no
	}

	ai_check_interval = 0

	ai_will_do = {
		base = 0
	}
}
#EK TODO COMP 1-13: check if appropriate for our religions
commission_icon_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_smith.dds"
	}
	cooldown = { days = standard_commission_artifact_cooldown_time }
	sort_order = 150
	decision_group_type = admin
	
	is_shown = {
		always = no
		#has_dlc_feature = roads_to_power
		#is_landed_or_landless_administrative = yes
		#OR = {
		#	faith = faith:orthodox
		#	faiths_are_in_orthodox_christianity_group = { FAITH_1 = faith:orthodox FAITH_2 = root.faith }
		#}
		#faith_is_aniconic_trigger = no
	}
	
	is_valid_showing_failures_only = {
		trigger_if = {
			limit = {
				government_allows = administrative
			}
			domicile ?= {
				has_domicile_building_or_higher = temple_monastery_04
			}
		}
		trigger_else = { always = yes }
	}

	minimum_cost = {
		# Matches the cost defined in 00_inspirations.txt
		gold = {
			value = basic_fund_inspiration_cost
			if = {
				limit = { # Estate discount bonus
					domicile ?= { has_domicile_parameter = estate_reduce_commission_artifact_cost }
				}
				multiply = estate_reduce_commission_artifact_cost_value
			}
		}
	}
	widget = {
    	gui = "decision_view_widget_commission_artifact"
		controller = decision_option_list_controller
		decision_to_second_step_button = "COMMISSION_ARTIFACT_DECISION_NEXT_STEP_BUTTON" 

		# Personal Artifacts are always valid to commission
		item = {
			value = commission_trinket_icon
			current_description = {
				desc = commission_artifact_decision_option_trinket_icon_desc
			}
			localization  = {
				desc = commission_artifact_decision_option_trinket_icon
			}
			icon = "gfx/interface/icons/artifact/artifact_icon_byz.dds"

			ai_chance = {
				value = 10
				if = {
					limit = {
						has_royal_court = yes
					}
					multiply = 0
				}
			}
		}
		# Court Artifacts only appear if you have the Royal Court DLC, and are only valid if you have an active Royal Court
		item = {
			value = commission_court_icon_large
			is_shown = { has_dlc_feature = royal_court }
			is_valid = { has_royal_court = yes }
			current_description = {
				desc = commission_artifact_decision_option_tapestry_desc
			}

			localization = {
				desc = commission_artifact_decision_option_court_icon_large
			}
			icon = "gfx/interface/icons/artifact/artifact_icon_byz.dds"

			ai_chance = {
				value = 20
				if = {
					limit = {
						has_royal_court = yes
						# Only make this choice if we don't already have an artifact of this type.
						NOT = {
							any_character_artifact = {
								artifact_slot_type = wall_big
							}
						}
					}
					add = 100
				}
			}
		}
		item = {
			value = commission_court_icon_small
			is_shown = { has_dlc_feature = royal_court }
			is_valid = { has_royal_court = yes }
			current_description = {
				desc = commission_artifact_decision_option_court_icon_small_desc
			}

			localization = {
				desc = commission_artifact_decision_option_court_icon_small
			}
			icon = "gfx/interface/icons/artifact/artifact_icon_byz.dds"

			ai_chance = {
				value = 20
				if = {
					limit = {
						has_royal_court = yes
						# Only make this choice if we don't already have an artifact of this type.
						NOT = {
							any_character_artifact = {
								artifact_slot_type = wall_small
							}
						}
					}
					add = 100
				}
			}
		}
	}
	effect = {
		if = {
			limit = {
				any_court_position_holder = {
					type = antiquarian_court_position
				}
			}
			random_court_position_holder = {
				type = antiquarian_court_position
				save_scope_as = antiquarian
			}
		}
		# Explanatory Tooltips
		custom_tooltip = commission_icon_decision_effect
		if = {
			limit = {
				any_pool_character = {
					province = root.capital_province
					has_no_particular_noble_roots_trigger = yes
					is_available_healthy_ai_adult = yes
					NOR = {
						exists = inspiration
						has_trait = peasant_leader
					}
				}
			}
			random_pool_character = {
				province = root.capital_province
				limit = {
					has_no_particular_noble_roots_trigger = yes
					is_available_healthy_ai_adult = yes
					NOR = {
						exists = inspiration
						has_trait = peasant_leader
					}
				}
				save_scope_as = local_artisan
			}
		}
		else = {
			# Artisan Generation
			hidden_effect = {
				create_character = {
					template = local_artisan_template
					location = root.capital_province
					gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
					save_scope_as = local_artisan
				}
			}
		}

		hidden_effect = {
			if = {
				# Conditional exists to avoid false-positives during tooltip generation, but 'local_artisan' should always exist on execution!
				limit = { exists = scope:local_artisan }
				root = { add_courtier = scope:local_artisan	}
				scope:local_artisan = {
					add_trait = devoted
				}
			}
			trigger_event = ep3_decisions_event.5000
		}
	}

	ai_check_interval = 36
	
	ai_potential = {
		is_at_war = no
		ai_greed < medium_positive_ai_value
		short_term_gold > ai_war_chest_desired_gold_value
		war_chest_gold >= halved_ai_war_chest_gold_maximum
		ai_has_conqueror_personality = no
		ai_should_focus_on_building_in_their_capital = no
	}

	ai_will_do = {
		base = 75

		ai_value_modifier = {
			ai_zeal = 1
		}
	}
}

embrace_heresy_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}
	sort_order = 120

	desc = embrace_heresy_decision_desc
	selection_tooltip = embrace_heresy_decision_tooltip
	decision_group_type = admin

	is_shown = {
		government_allows = state_faith
		is_adult = yes
		is_independent_ruler = no
		exists = top_liege
		top_liege = { is_ai = yes }
		top_liege.primary_title.state_faith ?= {
			#EK DISABLED
			#OR = {
				#NOT = { has_doctrine = eastern_hostility_doctrine }
				has_doctrine = heresy_hostility_doctrine #Zoroastrians also get heresies, despite being Eastern.
			#}
		}
		NOT = {
			this = top_liege.primary_title.state_faith.religious_head
		}
	}

	is_valid = {
		has_lifestyle = learning_lifestyle
		custom_tooltip = {
			text = heresy_in_empire_or_bordering_tt
			top_liege ?= {
				any_realm_county = {
					OR = {
						faith = {
							faith_is_interesting_heresy_to_state_faith_trigger = yes
						}
						any_neighboring_county = {
							holder.top_liege ?= {
								NOT = {
									this = root.top_liege
								}
							}
							faith = {
								faith_is_interesting_heresy_to_state_faith_trigger = yes
							}
						}
					}
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		NOT = { exists = involved_activity }
		is_imprisoned = no
		is_available = yes
	}

	cost = {
		prestige = major_influence_loss
		piety = massive_piety_loss
	}

	cooldown = { years = 50 }

	effect = {
		custom_tooltip = embrace_heresy_tt
		custom_tooltip = leverage_position_tt
		custom_tooltip = unlocks_demand_state_faith_decision
		trigger_event = ep3_decisions_event.5020
	}

	ai_potential = {
		always = no
	}

	ai_check_interval = 0

	ai_will_do = {
		base = 0
	}
}

push_heresy_as_state_faith = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}
	sort_order = 150

	desc = push_heresy_as_state_faith_desc
	selection_tooltip = push_heresy_as_state_faith_tooltip
	decision_group_type = admin

	is_shown = {
		government_allows = state_faith
		is_adult = yes
		is_independent_ruler = no
		exists = top_liege
		top_liege = { is_ai = yes }
		top_liege.primary_title.state_faith ?= {
			OR = {
				NOT = { has_doctrine = eastern_hostility_doctrine }
				has_doctrine = heresy_hostility_doctrine #Zoroastrians also get heresies, despite being Eastern.
			}
		}
		NOR = {
			this = top_liege.primary_title.state_faith.religious_head
			faith = top_liege.primary_title.state_faith
		}
		has_variable = heresy_embraced
	}

	is_valid = {
		custom_tooltip = {
			text = has_embraced_heresy_tt
			has_variable = heresy_embraced
			faith = var:heresy_embraced
		}
	}

	is_valid_showing_failures_only = {
		NOT = { exists = involved_activity }
		is_imprisoned = no
		is_available = yes
	}

	cost = {
		influence = major_influence_loss
	}

	cooldown = { years = 10 }

	effect = {
		custom_tooltip = try_to_push_faith_with_emperor_tt
		save_scope_as = heretic
		scope:heretic.faith = { save_scope_as = heresy }
		top_liege = {
			trigger_event = {
				id = ep3_decisions_event.5021 
				days = 1
			}
		}
	}

	ai_potential = {
		always = no
	}

	ai_check_interval = 0

	ai_will_do = {
		base = 0
	}
}

#EK DISABLED: deleted vanilla silk decisions

foster_integration_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_legitimacy.dds"
	}
	cooldown = { years = 20 }
	sort_order = 120

	desc = foster_integration_decision_desc
	selection_tooltip = foster_integration_decision_tooltip
	decision_group_type = admin
	
	is_shown = {
		has_dlc_feature = roads_to_power
		is_adult = yes
		this = house.house_head
		government_allows = administrative
		domicile ?= {
			is_domicile_type = estate
		}
		exists = top_liege
		root.top_liege != root
		OR = {
			top_liege.primary_title = {
				NOT = { is_de_jure_liege_or_above_target = root.domicile.domicile_location.county }
			}
			domicile.domicile_location.county.culture != root.top_liege.culture
		}
	}

	is_valid = {
		OR = {
			domicile.domicile_location.county = { de_jure_drifting_towards = root.top_liege.primary_title }
			domicile.domicile_location.county.culture = {
				cultural_acceptance = {
					target = root.top_liege.culture
					value <= 75
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		NOT = { exists = involved_activity }
		is_imprisoned = no
		is_available = yes
		is_at_war = no
	}

	cost = {
		influence = {
			value = {
				add = major_influence_value
				multiply = 2
			}
		}
	}

	effect = {
		domicile.domicile_location.county = { save_scope_as = target_county }
		add_character_modifier = {
			modifier = ep3_integration_promoter_modifier
			years = 15
		}
		set_variable = {
			name = integration_promoted_in
			value = scope:target_county
			years = 15
		}
		if = {
			limit = {
				scope:target_county = { de_jure_drifting_towards = root.top_liege.primary_title }
			}
			scope:target_county = {
				add_county_modifier = {
					modifier = improve_de_jure_integration_modifier
					years = 10
				}
			}
		}
		if = {
			limit = {
				scope:target_county.culture != root.top_liege.culture
				scope:target_county.culture = {
					cultural_acceptance = {
						target = root.top_liege.culture
						value <= 75
					}
				}
			}
			scope:target_county = {
				add_county_modifier = {
					modifier = improve_promote_culture_modifier
					years = 10
				}
			}
		}
		if = {
			limit = {
				top_liege = { is_ai = yes }
			}
			top_liege = {
				add_opinion = {
					target = root
					modifier = grateful_opinion
					opinion = 25
				}
			}
		}
		else = {
			if = {
				limit = {
					scope:target_county = { has_county_modifier = improve_promote_culture_modifier }
				}
				top_liege = {
					send_interface_message = {
						type = msg_vassal_decision_good
						title = improve_promote_culture_modifier
						desc = improve_promote_culture_modifier_tt
						left_icon = root
						right_icon = scope:target_county
					}
				}
			}
			else = {
				top_liege = {
					send_interface_message = {
						type = msg_vassal_decision_good
						title = improve_de_jure_integration_modifier
						desc = improve_de_jure_integration_modifier_tt
						left_icon = root
						right_icon = scope:target_county
					}
				}
			}
		}
	}

	ai_check_interval = 36
	
	ai_potential = {
		government_allows = administrative
		exists = top_liege
		root.top_liege != root
	}

	ai_will_do = {
		base = 75
		modifier = {
			culture = top_liege.culture
			add = 25
		}
		modifier = {
			has_trait = loyal
			add = 20
		}
		modifier = {
			has_trait = disloyal
			add = -20
		}
	}
}

gather_faction_support_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_recruitment.dds"
	}
	cooldown = { years = 25 }
	sort_order = 120

	desc = gather_faction_support_decision_desc
	selection_tooltip = gather_faction_support_decision_tooltip
	decision_group_type = admin
	
	is_shown = {
		has_dlc_feature = roads_to_power
		government_allows = administrative
		exists = top_liege
		top_liege != root
		is_adult = yes
		this = house.house_head
		domicile ?= {
			is_domicile_type = estate
		}
	}

	is_valid = {
		custom_tooltip = {
			text = belong_to_claimant_liberty_faction_tt
			exists = joined_faction
			joined_faction = {
				OR = {
					faction_is_type = claimant_faction
					faction_is_type = liberty_faction
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		NOT = { exists = involved_activity }
		is_imprisoned = no
		is_available = yes
		is_at_war = no
	}

	cost = {
		influence = {
			value = {
				add = massive_influence_value
				multiply = 2
			}
		}
	}

	effect = {
		joined_faction = { save_scope_as = the_faction }
		add_joined_faction_discontent = 20
		custom_tooltip = gathered_support_for_faction_get_army_tt
		set_variable = {
			name = gathered_support_for_faction
			value = scope:the_faction
			years = 5
		}
	}

	ai_check_interval = 60
	
	ai_potential = {
		government_allows = administrative
		exists = top_liege
		top_liege != root
	}

	ai_will_do = {
		base = 50
		modifier = {
			has_trait = loyal
			add = -30
		}
		modifier = {
			has_trait = disloyal
			add = 30
		}
		modifier = {
			has_trait = ambitious
			add = 50
		}
	}
}

#EK DISABLED: deleted latin empire decisions

go_fishing_decision = {
	picture = { reference = "gfx/interface/illustrations/event_scenes/bp1_docks_tribal.dds" }
	desc = go_fishing_decision_desc
	selection_tooltip = go_fishing_decision_tooltip
	ai_check_interval = 24
	cooldown = { years = 2 }
	decision_group_type = adventurer_minor

	is_shown = {
		#DLC check.
		has_ep3_dlc_trigger = yes
		is_landless_adventurer = yes
	}

	is_valid_showing_failures_only = {
		is_available = yes
		custom_tooltip = {
			text = go_fishing_decision_unlock_tt
			location = {
				OR = {
					is_coastal = yes
					is_riverside_province = yes
				}
			}
		}
	}

	effect = {
		custom_tooltip = {
			text = go_fishing_decision_effect_tt
			trigger_event = ep3_decisions_event.9001
		}
		close_view = {
			view = decisions
			player = root
		}
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}
