# Supported types: character
#
# Note: if 'chance' evaluates to 0, an AI character will also abandon the focus
#


#################
# FOCUSES		#
#################

focus_ch_pride = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_PRIDE"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 100
		modifier = {
			factor = 0
			NOR = { # Pride is only for heirs, rulers, and their close relatives.
				any_close_relative = { is_ruler = yes }
				is_ruler = yes
				is_heir = yes
			}
		}
		modifier = { # Pick this much more often for the actual heir or someone who is already a ruler.
			factor = 100
			OR = {
				is_heir = yes
				is_ruler = yes
			}
		}
		modifier = { # Pick this less often for girls in agnatic-cognatic realms.
			factor = 0.1
			is_female = yes
			is_ruler = no
			liege = {
				primary_title = { 
					has_law = cognatic_succession
				}
			}
		}
		modifier = { # Don't pick this at all for girls in strictly agnatic realms.
			factor = 0
			is_female = yes
			is_ruler = no
			liege = {
				primary_title = { 
					has_law = agnatic_succession
				}
			}
		}
		modifier = { # Pick this less often for boys in enatic-cognatic realms.
			factor = 0.1
			is_female = no
			is_ruler = no
			liege = {
				primary_title = { 
					has_law = enatic_cognatic_succession
				}
			}
		}
		modifier = { # Don't pick this at all for boys in strictly enatic realms.
			factor = 0.1
			is_female = no
			is_ruler = no
			liege = {
				primary_title = { 
					has_law = enatic_succession
				}
			}
		}
	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	
	
	potential_traits = {
		haughty
		brooding
	}
}

focus_ch_humility = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_HUMILITY"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 100
		modifier = {
			factor = 0
			NOR = { # Humility is for lowborn children and bastards.
				dynasty = none
				trait = bastard
			}
		}
	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	
	potential_traits = {
		timid
		affectionate
	}
}

focus_ch_duty = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_DUTY"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 100
		modifier = {
			factor = 0
			NOR = { # Fallback option for all republican and feudal governments.
				liege = { is_republic = yes }
				liege = { is_feudal = yes }
			}
		}

	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	

	potential_traits = {
		conscientious
	}
}

focus_ch_etiquette = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_ETIQUETTE"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 100
		modifier = {
			factor = 0
			OR = { # Etiquette is for civilized highborn children. Lowborns should learn humility and barbarians should learn to struggle.
				dynasty = none
				liege = { is_nomadic = yes }
				liege = { is_tribal = yes }
			}
		}
		modifier = {
			factor = 10
			AND = { # Pick this more often for girls in agnatic realms. They're unlikely to be given a real job.
				is_female = yes
				liege = {
					primary_title = { 
						OR = {
							has_law = agnatic_succession
							has_law = cognatic_succession
						}
					}
				}
			}
		}
		modifier = {
			factor = 0.1
			AND = { # Pick this less often for boys in agnatic realms. They're likely to be given a real job.
				is_female = no
				liege = {
					primary_title = { 
						OR = {
							has_law = agnatic_succession
							has_law = cognatic_succession
						}
					}
				}
			}
		}
		modifier = {
			factor = 10
			AND = { # Pick this more often for boys in enatic realms. They're unlikely to be given a real job.
				is_female = no
				liege = {
					primary_title = { 
						OR = {
							has_law = enatic_succession
							has_law = enatic_cognatic_succession
						}
					}
				}
			}
		}
		modifier = {
			factor = 0.1
			AND = { # Pick this less often for girls in enatic realms. They're likely to be given a real job.
				is_female = yes
				liege = {
					primary_title = { 
						OR = {
							has_law = enatic_succession
							has_law = enatic_cognatic_succession
						}
					}
				}
			}
		}
	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	

	potential_traits = {
		playful
		indolent
	}
}

focus_ch_thrift = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_THRIFT"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 100
		modifier = {
			factor = 0
			NOR = { # Education by tradesmen and mathematicians is for republican type governments or if liege is a scholarly type.
				liege = { is_republic = yes }
				liege = { trait = erudite }
				liege = { trait = scholar }
			}
		}

	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	

	potential_traits = {
		curious
		fussy
	}
}

focus_ch_faith = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_FAITH"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 100
		modifier = {
			factor = 0
			AND = { # Faith is only for those who have a different religion and children in theocracies.
				liege = { is_theocracy = no }
				liege = { religion = ROOT }
			}
		}
	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	
	
	potential_traits = {
		idolizer
	}
}

focus_ch_struggle = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_STRUGGLE"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 100
		modifier = {
			factor = 0
			NOR = { # Struggle is only for nomads, tribals, bastards, lowborn children.
				liege = { is_nomadic = yes }
				liege = { is_tribal = yes }
				trait = bastard
				dynasty = none
			}
		}
	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	

	potential_traits = {
		rowdy
		willful
	}
}

focus_ch_heritage = {
	type = character
	
	modifier_name = "CHILDHOOD_FOCUS_HERITAGE"
	
	potential = {
		NOT = { age = 12 }
	}
	
	allow = {
	}
	
	# AI Pick chance
	chance = {
		factor = 1000
		modifier = {
			factor = 0
			is_ruler = yes
		}
		modifier = {
			factor = 0
			liege = {
				culture = ROOT
				religion = ROOT
			}
		}
	}
	
	# Focuses have no success conditions
	success = {
		always = no
	}
	
	abort = {
		age = 12
	}
	
	abort_effect = {
	}
	

}
