﻿destiny_score_interest = {
	value = 0
	add = destiny_score_interest_family_relations
	add = destiny_score_interest_skills_traits
	add = destiny_score_interest_titles_claims
	add = destiny_score_interest_story
	add = destiny_score_interesting_traits
	add = destiny_score_interesting_circumstances
}

destiny_score_interest_family_relations = {
	# Family
	if = {
		limit = {
			is_child_of = scope:predecessor
		}
		add = {
			value = 10
			desc = is_your_child_desc
		}
	}
	if = {
		limit = {
			is_close_family_of = scope:predecessor
		}
		add = {
			value = 5
			desc = is_your_close_family_desc
		}
	}
	if = {
		limit = {
			house = scope:predecessor.house
		}
		add = {
			value = 5
			desc = is_your_house_desc
		}
	}
	## spouse who is ruler/in line to inherit
	if = {
		limit = {
			any_spouse = {
				OR = {
					is_ruler = yes
					any_heir_title = {
						exists = holder
						place_in_line_of_succession = {
							target = prev
							value >= 2
						}
					}
				}
			}
		}
		add = {
			value = 100
			desc = landed_spouse_desc
		}
	}
	## has heir who is ruler or in line to inherit
	if = {
		limit = {
			is_ruler = yes
			this = { save_temporary_scope_as = check_character }
			exists = player_heir
			player_heir = {
				OR = {
					is_ruler = yes
					any_heir_title = {
						exists = holder
						NOT = { holder = scope:check_character }
						place_in_line_of_succession = {
							target = prev
							value >= 2
						}
					}
				}
			}
		}
		add = {
			value = 50
			desc = landed_heir_desc
		}
	}
	# Relations
	## many good relations
	if = {
		limit = {
			OR = {
				any_relation = {
					type = lover
					count >= 1
				}
				any_relation = {
					type = friend
					count >= 1
				}
			}
		}
		add = {
			value = {
				every_relation =  {
					type = lover
					add = 20
				}
				every_relation =  {
					type = friend
					add = 20
				}
			}
			desc = has_many_good_relations_desc
		}
	}
	## many bad relations
	if = {
		limit = {
			OR = {
				any_relation = {
					type = rival
					count >= 1
				}
				any_relation = {
					type = nemesis
					count >= 1
				}
			}
		}
		add = {
			value = {
				every_relation =  {
					type = rival
					add = 20
				}
				every_relation =  {
					type = nemesis
					add = 20
				}
			}
			desc = has_many_bad_relations_desc
		}
	}
	## feuding
	if = {
		limit = {
			house.house_head ?= {
				any_owned_story = {
					story_type = story_cycle_house_feud
				}
			}
		}
		add = {
			value = 125
			desc = part_of_feud_desc
		}
	}
}

destiny_score_interest_skills_traits = {
	value = 0
	# Skills/Education
	## high skills
	if = {
		limit = {
			sum_of_all_skills_value >= 65
		}
		add = {
			value = 75
			desc = high_skills_desc
		}
	}
	if = {
		limit = {
			diplomacy >= high_skill_rating
		}
		add = {
			value = 10
			desc = high_diplomacy_desc
		}
	}
	if = {
		limit = {
			martial >= high_skill_rating
		}
		add = {
			value = 10
			desc = high_martial_desc
		}
	}
	if = {
		limit = {
			stewardship >= high_skill_rating
		}
		add = {
			value = 10
			desc = high_stewardship_desc
		}
	}
	if = {
		limit = {
			intrigue >= high_skill_rating
		}
		add = {
			value = 10
			desc = high_intrigue_desc
		}
	}
	if = {
		limit = {
			learning >= high_skill_rating
		}
		add = {
			value = 10
			desc = high_learning_desc
		}
	}
	if = {
		limit = {
			prowess >= high_skill_rating
		}
		add = {
			value = 10
			desc = high_prowess_desc
		}
	}
	if = {
		limit = {
			OR = {
				has_trait = education_diplomacy_5
				has_trait = education_martial_5
				has_trait = education_stewardship_5
				has_trait = education_intrigue_5
				has_trait = education_learning_5
			}
		}
		add = {
			value = 40
			desc = high_education_desc
		}
	}
	## Better than the current heir
	if = {
		limit = {
			exists = scope:heir
			has_trait_rank = {
				trait = beauty_good
				character > scope:heir
			}
		}
		add = {
			value = 80
			desc = more_beautiful_desc
		}
	}
	if = {
		limit = {
			exists = scope:heir
			has_trait_rank = {
				trait = intellect_good
				character > scope:heir
			}
		}
		add = {
			value = 70
			desc = more_smart_desc
		}
	}
	if = {
		limit = {
			exists = scope:heir
			has_trait_rank = {
				trait = physique_good
				character > scope:heir
			}
		}
		add = {
			value = 70
			desc = more_fit_desc
		}
	}
	if = {
		limit = {
			has_trait = strong
			exists = scope:heir
			NOT = { scope:heir = { has_trait = strong } }
		}
		add = {
			value = 40
			desc = more_strong_desc
		}
	}
	if = {
		limit = {
			exists = scope:heir
			sum_of_all_skills_value > scope:heir.sum_of_all_skills_value
		}
		add = {
			value = 100
			desc = more_skillful_desc
		}
	}
	if = {
		limit = {
			has_any_nickname = yes
			exists = scope:heir
			scope:heir = { has_any_nickname = no }
		}
		add = {
			value = 30
			desc = has_nickname_desc
		}
	}
	if = {
		limit = {
			exists = scope:heir
			prestige_level > scope:heir.prestige_level
		}
		add = {
			value = 60
			desc = more_famous_desc
		}
	}
}

destiny_score_interest_titles_claims = {
	value = 0
	# Titles
	## is inheriting the most after primary_heir
	if = {
		limit = {
			this = { save_temporary_scope_as = check_character }
			scope:predecessor.primary_title ?= {
				any_title_heir = {
					prev = {
						place_in_line_of_succession = {
							target = scope:check_character
							value = 2
						}
					}
				}
			}
		}
		add = {
			value = 30
			desc = second_in_line_desc
		}
	}
	## has a higher rank than you
	if = {
		limit = {
			highest_held_title_tier > scope:predecessor.highest_held_title_tier
		}
		add = {
			value = 40
			desc = higher_title_desc
		}
	}
	## different government
	if = {
		limit = {
			exists = scope:heir
			is_ruler = yes
			OR = {
				NOT = { has_same_government = scope:predecessor }
				NOT = { has_same_government = scope:heir }
			}
		}
		add = {
			value = 30
			desc = different_government_desc
		}
	}
	## different liege
	if = {
		limit = {
			is_ruler = yes
			is_independent_ruler = no
			NOR = {
				liege = scope:predecessor
				liege = scope:predecessor.liege
			}
		}
		add = {
			value = 30
			desc = new_liege_desc
		}
	}
	## different top liege
	if = {
		limit = {
			is_ruler = yes
			is_independent_ruler = no
			NOR = {
				top_liege = scope:predecessor
				top_liege = scope:predecessor.top_liege
			}
		}
		add = {
			value = 50
			desc = new_top_liege_desc
		}
	}
	if = {
		limit = {
			is_ruler = yes
			is_independent_ruler = yes
			NOT = {
				government_has_flag = government_is_landless_adventurer
			}
		}
		add = {
			value = 55
			desc = outside_realm_desc
		}
	}

	# Claims
	## High stakes claims
	if = {
		limit = {
			any_claim = {
				tier >= tier_duchy
			}
		}
		# add a point for claim
		add = {
			value = {
				every_claim = {
					limit = {
						tier = tier_duchy
					}
					add = 15
				}
				every_claim = {
					limit = {
						tier > tier_duchy
					}
					add = 30
				}
			}
			desc = tall_claims_desc
		}
	}
	## has pressed claims
	if = {
		limit = {
			any_claim = {
				pressed = yes
				exists = holder
			}
			NOT = {
				is_weak_claimant_due_to_gender_trigger = { FAITH = faith CHARACTER = this }
			}
		}
		add = {
			value = {
				every_claim = {
					pressed = yes
					limit = {
						exists = holder
						tier >= tier_duchy
					}
					add = 15
				}
				every_claim = {
					pressed = yes
					limit = {
						exists = holder
						tier < tier_duchy
					}
					add = 5
				}
			}
			desc = pressed_claims_desc
		}
	}
	## has weak claims
	if = {
		limit = {
			any_claim = {
				pressed = no
				exists = holder
			}
			NOT = {
				is_weak_claimant_due_to_gender_trigger = { FAITH = faith CHARACTER = this }
			}
		}
		add = {
			value = {
				every_claim = {
					pressed = no
					limit = {
						exists = holder
						tier >= tier_duchy
					}
					add = 5
				}
				every_claim = {
					pressed = no
					limit = {
						exists = holder
						tier < tier_duchy
					}
					add = 2
				}
			}
			desc = unpressed_claims_desc
		}
	}
	## in line to inherit stuff
	if = {
		limit = {
			any_heir_title = {
				place_in_line_of_succession = {
					target = prev
					value >= 2
				}
			}
		}
		add = {
			value = {
				every_heir_title = {
					limit = {
						place_in_line_of_succession = {
							target = prev
							value >= 2
						}
					}
					add = 30
				}
			}
			desc = inheritance_line_desc
		}
	}
}

destiny_score_interest_story = {
	value = 0
	# Faith/Culture
	## opposite side in a struggle
	if = {
		limit = {
			OR = {
				AND = {
					has_trait = fp3_struggle_supporter
					OR = {
						scope:predecessor = { has_trait = fp3_struggle_detractor }
						scope:heir = { has_trait = fp3_struggle_detractor }
					}
				}
				AND = {
					has_trait = fp3_struggle_detractor
					OR = {
						scope:predecessor = { has_trait = fp3_struggle_supporter }
						scope:heir = { has_trait = fp3_struggle_supporter }
					}
				}
			}
		}
		add = {
			value = 20
			desc = opposite_struggle_faction_desc
		}
	}

	# Story cycle
	if = {
		limit = {
			any_owned_story = {
				exists = this
			}
		}
		add = {
			value = 60
			desc = has_interesting_story_desc
		}
	}

	# Various
	if = {
		limit = {
			has_character_modifier = bp2_tool_of_fate_modifier
		}
		add = {
			value = 500
			desc = child_of_destiny_desc
		}
	}
}

destiny_score_interesting_traits = {
	# Traits
	if = {
		limit = {
			num_virtuous_traits > 0
		}
		add = {
			value = 10
			multiply = num_virtuous_traits
			desc = virtues_interesting_desc
		}
	}
	## has levelled/lifestyle traits
	if = {
		limit = {
			has_trait = tourney_participant
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = bow
							value >= 30
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = foot
							value >= 30
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = horse
							value >= 30
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = wit
							value >= 30
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = bow
							value >= 65
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = foot
							value >= 65
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = horse
							value >= 65
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = tourney_participant
							track = wit
							value >= 65
						}
					}
					add = 30
				}
			}
			desc = tourney_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = lifestyle_reveler
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_reveler
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_reveler
							value >= 100
						}
					}
					add = 30
				}
			}
			desc = reveler_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = lifestyle_mystic
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_mystic
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_mystic
							value >= 100
						}
					}
					add = 30
				}
			}
			desc = mystic_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = lifestyle_hunter
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_hunter
							track = hunter
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_hunter
							track = hunter
							value >= 100
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_hunter
							track = falconer
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_hunter
							track = falconer
							value >= 100
						}
					}
					add = 30
				}
			}
			desc = hunter_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = lifestyle_blademaster
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_blademaster
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_blademaster
							value >= 100
						}
					}
					add = 30
				}
			}
			desc = blademaster_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = lifestyle_traveler
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_traveler
							track = travel
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_traveler
							track = travel
							value >= 100
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_traveler
							track = danger
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_traveler
							track = danger
							value >= 100
						}
					}
					add = 30
				}
			}
			desc = traveler_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = lifestyle_physician
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_physician
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_physician
							value >= 100
						}
					}
					add = 30
				}
			}
			desc = physician_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = lifestyle_herbalist
		}
		add = {
			value = {
				value = 20
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_herbalist
							value >= 50
						}
					}
					add = 30
				}
				if = {
					limit = {
						has_trait_xp = {
							trait = lifestyle_herbalist
							value >= 100
						}
					}
					add = 30
				}
			}
			desc = herbalist_xp_desc
		}
	}
	if = {
		limit = {
			has_trait = loyal
		}
		add = {
			value = 20
			desc = loyal_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = disloyal
		}
		add = {
			value = 20
			desc = disloyal_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = faith_warrior
		}
		add = {
			value = 20
			desc = faith_warrior_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = blood_of_prophet
		}
		add = {
			value = 30
			desc = blood_of_prophet_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = varangian
		}
		add = {
			value = {
				value = 50
				if = {
					limit = {
						location = title:b_constantinople
					}
					add = 50
				}
			}
			desc = varangian_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = poet
		}
		add = {
			value = 25
			desc = poet_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = peasant_leader
		}
		add = {
			value = 50
			desc = peasant_leader_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = populist_leader
		}
		add = {
			value = 50
			desc = populist_leader_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = berserker
		}
		add = {
			value = 50
			desc = berserker_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = born_in_the_purple
		}
		add = {
			value = 25
			desc = born_in_the_purple_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = scaly
		}
		add = {
			value = 40
			desc = scaly_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = albino
		}
		add = {
			value = 60
			desc = albino_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = dwarf
		}
		add = {
			value = 40
			desc = dwarf_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = giant
		}
		add = {
			value = 40
			desc = giant_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = devoted
		}
		add = {
			value = 40
			desc = devoted_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = blind
		}
		add = {
			value = 40
			desc = blind_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = pure_blooded
		}
		add = {
			value = 20
			desc = pure_blooded_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = crusader_king
		}
		add = {
			value = 250
			desc = crusader_king_interesting_desc
		}
	}
	if = {
		limit = {
			has_trait = disinherited
		}
		add = {
			value = 100
			desc = disinherited_interesting_desc
		}
	}
	if = {
		limit = {
			num_of_good_genetic_traits > 0
			num_of_bad_genetic_traits > 0
		}
		add = {
			value = 120
			desc = has_both_good_and_bad_genetics_desc
		}
	}
	if = {
		limit = {
			num_of_good_genetic_traits > 0
		}
		add = {
			value = {
				value = 15
				multiply = num_of_good_genetic_traits
			}
			desc = good_genetics_desc
		}
	}
	if = {
		limit = {
			num_of_bad_genetic_traits > 0
		}
		add = {
			value = {
				value = 10
				multiply = num_of_bad_genetic_traits
			}
			desc = bad_genetics_desc
		}
	}
	if = {
		limit = {
			num_virtuous_traits >= 3
		}
		add = {
			value = {
				value = 165
			}
			desc = three_virtues_desc
		}
	}
	if = {
		limit = {
			num_sinful_traits >= 3
		}
		add = {
			value = {
				value = 165
			}
			desc = three_sins_desc
		}
	}
}

destiny_score_interesting_circumstances = {
	if = {
		limit = {
			is_ruler = yes
			is_diarch = yes
		}
		add = {
			value = {
				value = 100
				if = {
					limit = {
						liege = {
							has_diarchy_active_parameter = unlock_diarch_revoke_title_interaction
						}
					}
					add = 50
				}
				if = {
					limit = {
						liege = {
							has_diarchy_active_parameter = regency_cant_be_ended_above_this_point
						}
					}
					add = 150
				}
			}
			desc = is_diarch_interesting_desc
		}
	}
	if = {
		limit = {
			exists = capital_county
			NAND = {
				culture = capital_county.culture
				faith = capital_county.faith
			}
		}
		add = {
			value = {
				value = 75
				if = {
					limit = {
						faith = {
							has_doctrine_parameter = unreformed
						}
					}
					add = 50
				}
				if = {
					limit = {
						is_independent_ruler = yes
					}
					add = 100
				}
			}
			desc = ruler_in_foreign_lands_interesting_desc
		}
	}
	if = {
		limit = {
			is_landed = no
			prowess >= 14
			martial >= 12
			num_virtuous_traits > 0
			num_sinful_traits <= 0
		}
		add = {
			value = {
				value = 80
				if = {
					limit = {
						prowess >= 20
					}
					add = 40
				}
				if = {
					limit = {
						num_virtuous_traits > 1
					}
					add = 60
				}
			}
			desc = valiant_knight_interesting_desc
		}
	}
	if = {
		limit = {
			is_landed = no
			OR = {
				has_trait = bastard
				has_trait = legitimized_bastard
			}
			prowess >= 12
			intrigue >= 10
			num_sinful_traits > 0
		}
		add = {
			value = {
				value = 80
				if = {
					limit = {
						prowess >= 16
					}
					add = 40
				}
				if = {
					limit = {
						num_sinful_traits > 1
					}
					add = 60
				}
			}
			desc = sinful_bastard_interesting_desc
		}
	}
	if = {
		limit = {
			government_has_flag = government_is_landless_adventurer
		}
		add = {
			value = {
				value = 120
			}
			desc = adventurer_interesting_desc
		}
	}
	if = {
		limit = {
			is_independent_ruler = no
			liege ?= {
				OR = {
					has_trait = crusader_king
					any_parent = {
						even_if_dead = yes
						has_trait = crusader_king
					}
				}
			}
		}
		add = {
			value = {
				value = 120
			}
			desc = liege_crusader_king_liege_lineage_interesting_desc
		}
	}
	if = {
		limit = {
			save_temporary_scope_as = this_char
			any_held_county = {
				any_county_province = {
					barony = {
						is_holy_site_of = scope:this_char.faith
					}
				}
			}
		}
		add = {
			value = {
				value = 110
			}
			desc = holy_site_steward_interesting_desc
		}
	}
	if = {
		limit = {
			any_held_title = {
				tier = tier_county
				any_county_province = {
					has_special_building = yes
				}
			}
		}
		add = {
			value = {
				every_held_title = {
					limit = {
						tier = tier_county
						any_county_province = {
							has_special_building = yes
						}
					}
					every_county_province = {
						limit = {
							has_special_building = yes
						}
						add = 45
					}
				}
			}
			desc = holds_special_buildings_interesting_desc
		}
	}
	if = {
		limit = {
			save_temporary_scope_as = this_char
			promoted_legend ?= { legend_owner = scope:this_char }
		}
		add = {
			value = {
				value = 105
			}
			desc = has_a_legend_interesting_desc
		}
	}
	if = {
		limit = {
			is_independent_ruler = no
			exists = liege
			has_weak_hook = liege
		}
		add = {
			value = {
				value = 75
			}
			desc = weak_hook_liege_interesting_desc
		}
	}
	if = {
		limit = {
			is_independent_ruler = no
			exists = liege
			has_strong_hook = liege
		}
		add = {
			value = {
				value = 150
			}
			desc = strong_hook_liege_interesting_desc
		}
	}
	if = {
		limit = {
			faith = faith:catholic
			faith.religious_head ?= {
				opinion = {
					target = scope:predecessor
					value >= 80
				}
			}
		}
		add = {
			value = {
				value = 100
			}
			desc = beloved_by_pope_interesting_desc
		}
	}
	if = {
		limit = {
			faith.religious_head ?= this
		}
		add = {
			value = {
				value = 150
			}
			desc = head_of_faith_interesting_desc
		}
	}
	if = {
		limit = {
			is_independent_ruler = yes
			current_military_strength >= max_military_strength
			max_military_strength > liege.max_military_strength
		}
		add = {
			value = {
				value = 150
			}
			desc = stronger_than_liege_interesting_desc
		}
	}
	if = {
		limit = {
			is_independent_ruler = yes
			highest_held_title_tier >= tier_kingdom
			sub_realm_size <= 10
		}
		add = {
			value = {
				value = 100
			}
			desc = small_king_interesting_desc
		}
	}
	if = {
		limit = {
			OR = {
				can_execute_decision = convert_whole_realm_to_feudalism_decision
				can_execute_decision = convert_whole_realm_to_feudalism_west_african_pagan_decision
			}
		}
		add = {
			value = {
				value = 250
			}
			desc = can_feudalize_interesting_desc
		}
	}
	if = {
		limit = {
			primary_title.tier ?= tier_duchy
			any_held_title = {
				count >= 3
				tier = tier_duchy
			}
		}
		add = {
			value = {
				value = 75
			}
			desc = multiduke_interesting_desc
		}
	}
	if = {
		limit = {
			is_ruler = yes
			government_allows = legitimacy
			legitimacy_level >= 5
		}
		add = {
			value = 95
			desc = legitimacy_interesting_desc
		}
	}
	if = {
		limit = {
			ai_boldness >= 50
			sum_of_all_skills_value >= 50
			OR = {
				AND = {
					is_male = yes
					faith = { has_doctrine = doctrine_gender_female_dominated }
				}
				AND = {
					is_female = yes
					faith = { has_doctrine = doctrine_gender_male_dominated }
				}
			}
		}
		add = {
			value = 95
			desc = non_dominant_gender_ambitious_char_interesting_desc
		}
	}
	if = {
		limit = {
			is_ruler = yes
			OR = {
				AND = {
					is_male = yes
					faith = { has_doctrine = doctrine_gender_female_dominated }
				}
				AND = {
					is_female = yes
					faith = { has_doctrine = doctrine_gender_male_dominated }
				}
			}
		}
		add = {
			value = 55
			desc = non_dominant_gender_ruler_interesting_desc
		}
	}
	if = {
		limit = {
			intrigue >= 18
			has_trait = education_intrigue
			calc_true_if = {
				amount >= 2
				has_trait = deceitful
				has_trait = schemer
				has_trait = vengeful
				has_trait = arbitrary
				has_trait = paranoid
			}
		}
		add = {
			value = 120
			desc = treacherous_schemer_interesting_desc
		}
	}
	if = {
		limit = {
			diplomacy >= 18
			has_trait = education_diplomacy
			calc_true_if = {
				amount >= 2
				has_trait = diplomat
				has_trait = honest
				has_trait = gregarious
				has_trait = generous
				has_trait = compassionate
			}
		}
		add = {
			value = 120
			desc = kind_hearted_diplomat_interesting_desc
		}
	}
	if = {
		limit = {
			NOT = {
				faith = scope:predecessor.faith
			}
		}
		add = {
			value = 65
			desc = different_faith_interesting_desc
		}
	}
	if = {
		limit = {
			stewardship >= 18
			has_trait = education_stewardship
			calc_true_if = {
				amount >= 2
				has_trait = greedy
				has_trait = ambitious
				has_trait = diligent
				has_trait = stubborn
				has_trait = avaricious
			}
		}
		add = {
			value = 120
			desc = greedy_steward_interesting_desc
		}
	}
	if = {
		limit = {
			martial >= 18
			has_trait = education_martial
			ai_boldness >= 0
			calc_true_if = {
				amount >= 2
				has_trait = strategist
				has_trait = brave
				has_trait = ambitious
				has_trait = wrathful
			}
		}
		add = {
			value = 120
			desc = brazen_commander_interesting_desc
		}
	}
	if = {
		limit = {
			learning >= 18
			has_trait = education_learning
			ai_zeal >= 1
			calc_true_if = {
				amount >= 2
				has_trait = theologian
				has_trait = zealous
				has_trait = humble
				has_trait = patient
				has_trait = chaste
				has_trait = content
			}
		}
		add = {
			value = 120
			desc = pious_theologian_interesting_desc
		}
	}
	if = {
		limit = {
			intrigue >= 12
			ai_honor <= 0
			has_trait = lustful
			age <= 45
			calc_true_if = {
				amount >= 2
				attraction >= 25
				has_trait = beauty_good
				has_trait = seducer
				num_of_relation_lover >= 2
				is_deviant_trigger = yes
				has_sexuality = bisexual
			}
		}
		add = {
			value = 120
			desc = salacious_seducer_interesting_desc
		}
	}
	if = {
		limit = {
			any_killed_character = { count >= 10 }
		}
		add = {
			value = 75
			desc = killed_a_lot_interesting_desc
		}
	}
	if = {
		limit = {
			is_landed = yes
			has_title = title:c_roma
		}
		add = {
			value = 85
			desc = holds_rome_interesting_desc
		}
	}
	if = {
		limit = {
			is_landed = yes
			has_title = title:c_byzantion
		}
		add = {
			value = 85
			desc = holds_byzantion_interesting_desc
		}
	}
	if = {
		limit = {
			is_landed = yes
			has_title = title:c_jerusalem
		}
		add = {
			value = 85
			desc = holds_jerusalem_interesting_desc
		}
	}
	if = {
		limit = {
			is_landed = yes
			has_title = title:c_mecca
		}
		add = {
			value = 85
			desc = holds_mecca_interesting_desc
		}
	}
	if = {
		limit = {
			is_landed = yes
			has_title = title:c_baghdad
		}
		add = {
			value = 85
			desc = holds_baghdad_interesting_desc
		}
	}
	if = {
		limit = {
			any_character_artifact = {
				has_variable = historical_unique_artifact
			}
		}
		add = {
			value = {
				every_character_artifact = {
					limit = {
						has_variable = historical_unique_artifact
					}
					add = 110
				}
			}
			desc = has_historical_artifacts_interesting_desc
		}
	}
	if = {
		limit = {
			save_temporary_scope_as = scope_check
			dynasty ?= {
				any_dynasty_member = {
					percent <= 0.1
					faith = scope:scope_check.faith
				}
			}
		}
		add = {
			value = 150
			desc = underrepresented_faith_interesting_desc
		}
	}
	if = {
		limit = {
			save_temporary_scope_as = scope_check
			dynasty ?= {
				any_dynasty_member = {
					percent <= 0.1
					culture = scope:scope_check.culture
				}
			}
		}
		add = {
			value = 105
			desc = underrepresented_culture_interesting_desc
		}
	}
	if = {
		limit = {
			any_known_secret = {
				count >= 2
			}
		}
		add = {
			value = {
				every_known_secret = {
					add = 30
				}
			}
			desc = knows_many_secrets_interesting_desc
		}
	}
	if = {
		limit = {
			any_secret = {
				count >= 1
			}
		}
		add = {
			value = {
				every_secret = {
					add = 30
				}
			}
			desc = has_secrets_interesting_desc
		}
	}
	if = {
		limit = {
			is_ruler = no
			gold >= 1000
		}
		add = {
			value = 60
			desc = extremely_wealthy_interesting_desc
		}
	}
	if = {
		limit = {
			is_ruler = no
			any_heir_title = {
				count >= 1
			}
		}
		add = {
			value = {
				every_heir_title = {
					limit = {
						tier >= tier_duchy
					}
					add = -100
				}
				every_heir_title = {
					limit = {
						tier = tier_county
					}
					add = -25
				}
			}
			desc = landless_heir_uninteresting_desc
		}
	}
}
