decisions = {
		sun_destiny = {
		is_high_prio = yes # Will show an alert once decision is enabled
		potential = {
			#Conditions for the decision to appear
			ROOT = {
				NOT = {trait = pristine_blood}
				NOT = {trait = sun_blood}
				NOT = {trait = refined_blood}
				NOT = {has_global_flag = flag_sun_destiny_2}
			}
		}
		allow = {
			OR = {
				AND = {
					ai = yes
					OR = {
						tier = duke
						tier = king
						tier = emperor
					}
					has_global_flag = flag_sun_destiny
					is_landed = yes
					OR = {
						culture_group = latin
						culture_group = central_germanic
						culture_group = west_germanic
						}
					ROOT = {
						NOT = {trait = pristine_blood}
						NOT = {trait = sun_blood}
						NOT = {trait = refined_blood}
					}
				}
				AND = {
					ai = no
					ROOT = {
						NOT = {trait = pristine_blood}
						NOT = {trait = sun_blood}
						NOT = {trait = refined_blood}
					}
				}
			}
		}
		effect = {
			ROOT = {
				add_trait = sun_blood
				add_trait = h_sun_four
				add_trait = h_sun_main
			}
			any_close_relative = {
				add_trait = sun_blood
				character_event = { id = HSB.01 }
			}
			any_spouse  = {
				add_trait = sun_blood
				character_event = { id = HSB.01 }
			}
			set_global_flag = flag_sun_destiny
			set_global_flag = flag_pristine_destiny
			if = {
				limit = {has_global_flag = flag_sun_destiny}
				set_global_flag = flag_sun_destiny_2
			}
		}
	}
	condense_gold_drop = {
		is_high_prio = yes # Will show an alert once decision is enabled
		ai_check_interval = 16
		potential = {
			#Conditions for the decision to appear
			trait = sun_blood
			OR = {
				trait = h_sun_four
				trait = h_sun_five
				trait = h_sun_six
				trait = h_sun_last
			}
			is_adult = yes
		}
		allow = {
			NOT = {
				trait = g_drop_5
				trait = blinded
				is_pilgrim = yes
				is_incapable = yes
			}
		}
		effect = {
			character_event = { id = HSB.10 }
		}
		ai_will_do = {
			factor = 0.1
		}
	}
	use_gold_drop = {
		ai_check_interval = 36
		is_high_prio = yes # Will show an alert once decision is enabled
		potential = {
			#Conditions for the decision to appear
			trait = sun_blood
			is_adult = yes
		}
		allow = {
			NOT = {
				is_pilgrim = yes
				is_incapable = yes
				trait = blinded
			}
		}
		effect = {
			character_event = { id = HSB.12 }
		}
	}
	use_gold_drop_last = {
		ai_check_interval = 36
		is_high_prio = yes # Will show an alert once decision is enabled
		potential = {
			#Conditions for the decision to appear
			trait = sun_blood
			trait = h_sun_last
			is_adult = yes
		}
		allow = {
			NOT = {
				is_pilgrim = yes
				is_incapable = yes
				trait = blinded
			}
			trait = g_drop_5
		}
		effect = {
			character_event = { id = HSB.16 }
		}
	}
}

targetted_decisions = {
	sun_revoke_title = {
		ai_check_interval = 48 # Determines how seldom the AI checks whether they can and should do the decision, in months. By default 1 (every month).
		filter = sub_realm
		ai_target_filter = sub_realm
		from_potential = {
			trait = sun_blood
			trait = h_sun_main
		}
		potential = {
			trait = h_sun_second
		}
		allow = {
			FROM = {
				NOT = {
					trait = severely_injured
					has_character_modifier = sun_loose_title_duel
				}
			}
			ROOT = {
				trait = h_sun_second
				is_landed = yes
			}
		}
		effect = {
			FROM = {character_event = { id = HSB.02}}
		}
		ai_will_do = {
			factor = 0.1
		}
	}
}























