﻿form_first_bulgarian_empire_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_realm.dds"
	}
	ai_check_interval = 30
	decision_group_type = major
	desc = form_first_bulgarian_empire_decision_desc

	is_shown = {
		is_ruler = yes
		is_landed = yes
		exists = dynasty
		exists = title:e_bulgaria
		culture = {
			OR = {
				has_cultural_pillar = heritage_south_slavic
				any_parent_culture_or_above = { has_cultural_pillar = heritage_south_slavic }
				has_cultural_pillar = language_slavonic
				any_parent_culture_or_above = { has_cultural_pillar = language_slavonic }
			}
		}
		NOT = {
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:form_first_bulgarian_empire_decision
			}
		}
	}

	is_valid = {
		trigger_if = {
			limit = {
				has_game_rule = default_balgarsko_invasion
				NOT = { current_date > 1017.1.1 } # story can not trigger past this date
			}
			custom_tooltip = {
				text = form_first_bulgarian_empire_decision_story_started
				is_target_in_global_variable_list = {
					name = historicinvasions_story_started
					target = flag:balgarsko_story_started
				}
			}
		}
		highest_held_title_tier = tier_kingdom
		OR = {
			culture = culture:bulgarian
			custom_tooltip = {
				text = form_first_bulgarian_empire_decision.culture_trigger
				culture = { any_parent_culture_or_above = { this = culture:bulgarian } }
			}
		}
		trigger_if = { #player
			limit = { is_ai = no }

			custom_tooltip = {
				text = form_first_bulgarian_empire_decision_mindate
				current_date >= 910.1.1
			}

			religion = religion:christianity_religion
			
			has_title = title:k_bulgaria

			completely_controls_region = special_balgarsko_conquest_region_total
		}
		trigger_else = { #AI
			has_title = title:k_bulgaria
			any_county_in_region = {
				region = special_balgarsko_conquest_region_de_jure
				percent > 0.7
				OR = {
					holder = ROOT
					holder = { target_is_liege_or_above = ROOT }
				}
			}
		}
	}

	is_valid_showing_failures_only = {
		is_imprisoned = no
		is_available_adult = yes
		is_at_war = no
	}

	cost = {
		prestige = 500
	}

	effect = {
		form_first_bulgarian_empire_decision_effects = yes

		#trigger_event = balgarsko_invasion.0012 # ?
	}

	ai_potential = {
		highest_held_title_tier = tier_kingdom
	}

	ai_will_do = {
		base = 100
	}
}