﻿legendary_cultural_conversion = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_legend.dds"
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = legendary_cultural_conversion_desc

	is_shown = {
		has_character_flag = legendary_cultural_conversion
		has_dlc_feature = legends
	}

	is_valid = {
		custom_tooltip = {
			text = leg_conv_culture_valid_county_tt
			any_sub_realm_county = {
				NOT = {
					culture = root.culture
				}
			}
		}
		is_landless_adventurer = no
	}

	effect = {
		custom_tooltip = {
			text = legendary_cultural_conversion_tt
			remove_character_flag = legendary_cultural_conversion
			random_sub_realm_county = { # Give em a freebie
				set_county_culture = root.culture
			}
			every_sub_realm_county = {
				random = {
					chance = 50
					set_county_culture = root.culture
				}
			}
		}
	}
	
	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}


legendary_investment = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_legend.dds"
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = legendary_investment_desc

	is_shown = {
		has_character_flag = legendary_investment
		has_dlc_feature = legends
		is_landless_adventurer = no
	}

	is_valid = {
	}

	effect = {
		custom_tooltip = {
			text = legendary_investment_tt
			remove_character_flag = legendary_investment
			capital_county = { # Give em a freebie
				# if = {
				# 	limit = { has_variable = larger_investment }
				# 	change_development_level  = 8
				# }
				# else = {
					change_development_level  = 2
				# }
			}
			# if = {
			# 	limit = { has_variable = larger_investment }
			# 	every_sub_realm_county = {
			# 		change_development_level  = { 3 8 }
			# 	}
			# }
			# else = {
				every_sub_realm_county = {
					change_development_level  = { 1 5 }
				}
			# }
		}
	}
	
	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}

large_legendary_investment = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_legend.dds"
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = large_legendary_investment_desc

	is_shown = {
		has_character_flag = large_legendary_investment
		has_dlc_feature = legends
		is_landless_adventurer = no
	}

	is_valid = {
	}

	effect = {
		custom_tooltip = {
			text = large_legendary_investment_tt
			remove_character_flag = large_legendary_investment
			capital_county = { # Give em a freebie
				# if = {
				# 	limit = { has_variable = larger_investment }
				# 	change_development_level  = 8
				# }
				# else = {
					change_development_level  = 2
				# }
			}
			# if = {
			# 	limit = { has_variable = larger_investment }
			# 	every_sub_realm_county = {
			# 		change_development_level  = { 3 8 }
			# 	}
			# }
			# else = {
				every_sub_realm_county = {
					change_development_level  = { 3 8 }
				}
			# }
		}
	}
	
	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}

legendary_extort_favor = {
	picture = {
		reference = "gfx/interface/illustrations/decisions/decision_legend.dds"
	}
	decision_group_type = major
	ai_check_interval = 120
	desc = legendary_extort_favor_desc

	is_shown = {
		has_character_flag = legendary_extort_favor
		has_dlc_feature = legends
		is_landless_adventurer = no
	}

	is_valid = {
	
	}
	effect = {
		custom_tooltip = {
			text = legendary_extort_favor_tt
			remove_character_flag = legendary_extort_favor
				every_vassal = {
					save_temporary_scope_as = current_vassal
					root = {
						add_hook = {
							type = loyalty_hook
							target = scope:current_vassal
						}
					}
				}

		}
	}
	

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}
}