﻿# LEGENDS LEGACIES

ce1_heroic_legacy_1 = { # Heroes of Old
	legacy = ce1_heroic_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		show_as_tooltip = {
			create_legend_seed = {
				type = legitimizing
				quality = famed
				chronicle = great_deed_dynasty
				properties = {
					founder = house.house_founder
					dynasty = dynasty
					title = primary_title
				}
			}
		}
		custom_tooltip = ce1_heroic_legacy_1_useable_once
	}

	ai_chance = {
		value = 11
		if = {
			limit = {
				dynasty = {
					dynasty_prestige_level >= high_dynasty_prestige_level
				}
			}
			multiply = 2
		}
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_valor }
					root.house = { has_house_modifier = trad_honor }
					root.house = { has_house_modifier = trad_distinction }
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_duty }
					root.house = { has_house_modifier = trad_vengeance }
					root.house = { has_house_modifier = trad_vigilance }
					root.house = { has_house_modifier = trad_pride }
					root.house = { has_house_modifier = trad_power }
					root.house = { has_house_modifier = trad_devotion }
				}
			}
			multiply = 5
		}
		# End New Bloc
	}
}

ce1_heroic_legacy_2 = { # Mythical ancestors
	legacy = ce1_heroic_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		# Make a founder trait more common, handled in on_birth_child
		custom_description_no_bullet = { text = ce1_heroic_legacy_2_effect }
	}
}

ce1_heroic_legacy_3 = { # Golden Legend
	legacy = ce1_heroic_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		# Tell the player about their increased sainthood chance
		custom_description_no_bullet = { text = ce1_heroic_legacy_3_effect }
	}

	traits = {
		saint = 100
	}
}

ce1_heroic_legacy_4 = { # Down in History
	legacy = ce1_heroic_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		# Tell the player about their ability to gain the legend trait
		custom_description_no_bullet = { text = ce1_heroic_legacy_4_effect }
	}

	traits = {
		legend = 100
	}
}

ce1_heroic_legacy_5 = { # Living Legends
	legacy = ce1_heroic_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	character_modifier = {
		clergy_opinion = 10
		domain_tax_same_faith_mult = 0.05
	}

	effect = {
		custom_description_no_bullet = { text = ce1_legitimacy_legacy_5_effect }
	}
}

ce1_legitimacy_legacy_1 = { # Sons of our Fathers
	legacy = ce1_legitimacy_legacy_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	character_modifier = {
		county_opinion_add = 5
		monthly_county_control_growth_add = 0.1
	}

	ai_chance = {
		value = 11
		if = {
			limit = {
				dynasty = {
					dynasty_prestige_level >= high_dynasty_prestige_level
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				can_start_new_legacy_track_trigger = no
			}
			multiply = 0
		}
		# Start New Bloc
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_honor }
					root.house = { has_house_modifier = trad_justice}
					root.house = { has_house_modifier = trad_pride }
					root.house = { has_house_modifier = trad_respect }
					root.house = { has_house_modifier = trad_wisdom }
					root.house = { has_house_modifier = trad_devotion }
				}
			}
			multiply = 10
		}
		if = {
			limit = {
				OR = {
					root.house = { has_house_modifier = trad_duty }
					root.house = { has_house_modifier = trad_peace }
					root.house = { has_house_modifier = trad_truth }
					root.house = { has_house_modifier = trad_family }
				}
			}
			multiply = 5
		}
		# End New Bloc
	}
}

ce1_legitimacy_legacy_2 = { # Lasting Line
	legacy = ce1_legitimacy_legacy_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		custom_description_no_bullet = { text = ce1_legitimacy_legacy_2_effect }
	}
}

ce1_legitimacy_legacy_3 = { # Rightful Rulers
	legacy = ce1_legitimacy_legacy_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		custom_description_no_bullet = { text = ce1_legitimacy_legacy_3_effect }
	}

	character_modifier = {
		dynasty_opinion = 5
	}
}

ce1_legitimacy_legacy_4 = { # Divine Mandate
	legacy = ce1_legitimacy_legacy_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		custom_description_no_bullet = { text = ce1_legitimacy_legacy_4_effect }
	}
}

ce1_legitimacy_legacy_5 = { # Dieu et Mon Droit
	legacy = ce1_legitimacy_legacy_track

	can_be_picked = {
		has_dlc_feature = legends_of_the_dead
	}

	effect = {
		# Tell the player they can gain a 5th education trait level
		custom_description_no_bullet = { text = ce1_heroic_legacy_5_effect }
	}

	traits = {
		education_intrigue_5 = 100
		education_diplomacy_5 = 100
		education_stewardship_5 = 100
		education_martial_5 = 100
		education_learning_5 = 100
	}
}
