﻿
#All start dates
divine_diplomat = {
	type = legitimizing
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			exists = var:dynasty_legend_used
		}
		has_enough_diplomacy_2_see = yes
	}
	is_valid = {
		is_landed = yes
		is_divine_diplomat_valid = yes
	}

	chronicle = ml_eminent_diplomat
	chronicle_properties = {
		title = primary_title
		religion = root.religion
		culture = root.culture
		dynasty = dynasty
	}
}

ml_wise_monarch = {
	type = enriching
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			has_variable = ml_wise_monarch_used 
		}
		has_enough_diplomacy_and_stewardship_2_see = yes
	}
	is_valid = {
		is_landed = yes
		is_wise_monarch_valid = yes
	}

	chronicle = ml_wise_monarch
	chronicle_properties = {
		more_legends_ml_wise_monarch_flag = flag:started_ml_wise_monarch
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

ml_war_virtuoso = {
	type = heroic
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			exists = var:dynasty_legend_used
		}
		has_enough_martial_2_see = yes
	}
	is_valid = {
		is_landed = yes
		is_war_virtuoso_valid = yes
	}

	chronicle = ml_war_virtuoso
	chronicle_properties = {
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

ml_legendary_warrior = {
	type = heroic
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			exists = var:dynasty_legend_used
			has_trait = craven
		}
		AND = {
			ml_is_strong_warrior = yes
			has_enough_prowess_2_see = yes
		}
	}
	is_valid = {
		is_landed = yes
		is_legendary_warrior_valid = yes
	}

	chronicle = ml_legendary_warrior
	chronicle_properties = {
		culture = root.culture
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

midas_touched = {
	type = enriching
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			has_variable = midas_touched_used 
		}
		has_enough_stewardship_2_see = yes
	}
	is_valid = {
		is_landed = yes
		is_midas_touched_valid = yes
	}

	chronicle = ml_prosperous_ruler
	chronicle_properties = {
		more_legends_midas_touched_flag = flag:started_midas_touched
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

ml_legendary_tactician = {
	type = terrorizing
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			has_variable = ml_legendary_tactician_used 
		}
		has_enough_intrigue_and_martial_2_see = yes
	}
	is_valid = {
		is_landed = yes
		is_legendary_tactician_valid = yes
	}

	chronicle = ml_legendary_tactician
	chronicle_properties = {
		more_legends_ml_legendary_tactician_flag = flag:started_ml_legendary_tactician
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}


ml_boundless_terror = {
	type = terrorizing
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			has_variable = ml_boundless_terror_used 
			has_trait = compassionate
			has_trait = gallant	
		}
		has_enough_intrigue_2_see = yes
	}
	is_valid = {
		is_landed = yes
		is_boundless_terror_valid = yes
	}

	chronicle = ml_boundless_terror
	chronicle_properties = {
		more_legends_ml_boundless_terror_flag = flag:started_ml_boundless_terror
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

ml_great_scholar = {
	type = cultural
	quality = famed

	is_shown = {
		has_dlc_feature = legends
		NOT = {
			has_variable = ml_great_scholar_used 
		}
		has_enough_learning_2_see = yes
	}

	is_valid = {
		is_landed = yes
		is_great_scholar_valid = yes
	}

	chronicle = ml_great_scholar
	chronicle_properties = {
		more_legends_ml_great_scholar_flag = flag:started_ml_great_scholar
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

ml_mad_ruler = {
	type = terrorizing
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			has_variable = ml_mad_ruler_used 
		}
		OR = {
			ml_is_insane = yes
			dread >= 50
		}

	}
	is_valid = {
		is_landed = yes
		is_mad_ruler_valid = yes
	}

	chronicle = ml_mad_ruler
	chronicle_properties = {
		more_legends_ml_mad_ruler_flag = flag:started_ml_mad_ruler
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

ml_eternal_ascetic = {
	type = cultural
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			has_variable = ml_eternal_ascetic_used 
			has_trait = infirm
		}
		ml_is_old_and_healthy = yes
	}
	is_valid = {
		is_landed = yes
		ml_is_eternal_ascetic_valid = yes
	}

	chronicle = ml_eternal_ascetic
	chronicle_properties = {
		more_legends_ml_eternal_ascetic_flag = flag:started_ml_eternal_ascetic
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

# ml_exalted_youth = {
# 	type = legitimizing
# 	quality = famed
# 	is_shown = {
# 		has_dlc_feature = legends
# 		NOT = {
# 			exists = var:dynasty_legend_used
# 		}
# 		is_adult = no
# 		is_landed = yes
# 	}
# 	is_valid = {
# 		age >= 12
# 		is_landed = yes
# 		is_adult = no
# 		prestige_level >= very_medium_prestige_level
# 	}
# }

ml_shining_ruler = {
	type = legitimizing
	quality = famed
	is_shown = {
		has_dlc_feature = legends
		NOT = {
			exists = var:dynasty_legend_used
		}
		OR = {
			ml_is_intelligent = yes
			AND = {
				diplomacy >= 10
				martial >= 10
				stewardship >= 10
				intrigue >= 10
				learning >= 10
				prowess >= 10
			}
		}
		prestige_level >= medium_prestige_level
	}
	is_valid = {
		is_landed = yes
		ml_is_shining_ruler_valid = yes
	}

	chronicle = ml_shining_ruler
	chronicle_properties = {
		founder = house.house_founder
		dynasty = dynasty
		title = primary_title
	}
}

# ml_fatal_beauty = {
# 	type = legitimizing
# 	quality = famed
# 	is_shown = {
# 		has_dlc_feature = legends
# 		NOT = {
# 			exists = var:dynasty_legend_used
# 		}
# 		OR = {
# 			has_trait = education_intrigue_4
# 			has_trait = education_intrigue_5
# 			has_trait = schemer
# 			has_trait = seducer
# 			intrigue >= 17
# 		}
# 		AND = {
# 			OR = {
# 				has_trait = beauty_good_2
# 				has_trait = beauty_good_3
# 			}
# 		}
# 		is_female = yes
# 	}
# 	is_valid = {
# 		custom_tooltip = {
# 			text = ml_seducer_and_schemer_or_seducer_and_intrigue_5_tt
# 			OR = {
# 				AND = {
# 					has_trait = schemer
# 					has_trait = seducer
# 				}
# 				AND = {
# 					has_trait = seducer
# 					has_trait = education_intrigue_5
# 				}
# 			}
# 		}
# 		custom_tooltip = {
# 			text = ml_has_at_least_beauty_good_2_tt
# 			OR = {
# 				has_trait = beauty_good_2
# 				has_trait = beauty_good_3
# 			}
# 		}
# 		intrigue >= 25
# 		prestige_level >= medium_prestige_level
# 	}

# 	chronicle = ml_fatal_beauty
# 	chronicle_properties = {
# 		founder = house.house_founder
# 		dynasty = dynasty
# 		title = primary_title
# 	}
# }