﻿# establish PLC
gediminid_establish_plc_decision = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_destiny_goal.dds"
	}

	desc = gediminid_establish_plc_decision_desc
	selection_tooltip = gediminid_establish_plc_decision_tooltip
	decision_group_type = major

	ai_check_interval = 60

	is_shown = {
		is_ruler = yes
		is_landed = yes
		exists = dynasty
		exists = title:e_gediminid
		has_title = title:e_gediminid
		NOT = {	# only once
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:gediminid_establish_plc_decision
			}
		}
	}

	is_valid = {
		has_primary_title = title:e_gediminid
		completely_controls_region = special_gediminid_plc_region
	}

	is_valid_showing_failures_only = {
		NOT = { has_trait = incapable }
		is_imprisoned = no
		is_independent_ruler = yes
	}

	cost = { # lower cost for AI
		gold = {
			value = 50
			if = {
				limit = { is_ai = no }
				add = 450
			}
		}
		prestige = {
			value = 100
			if = {
				limit = { is_ai = no }
				add = 1400
			}
		}
		piety = {
			value = 25
			if = {
				limit = { is_ai = no }
				add = 475
			}
		}
	}

	effect = {
		custom_tooltip = plc_when_more_than_x_counties_within
		gediminid_establish_plc_decision_effect = yes
		# legend
		gain_heroic_legend_seed_tooltip_effect = yes
		hidden_effect = { legend_seed_new_title_effect = yes }
	}

	ai_potential = {
		primary_title.tier = tier_empire
		has_primary_title = title:e_gediminid
	}

	ai_will_do = { base = 100 }
}