﻿tgp_child_personality.0009 = {
	type = character_event
	title = tgp_child_personality.0009.t
	desc = tgp_child_personality.0009.desc
	theme = education
	override_background = bedchamber
	left_portrait = {
		character = root
		animation = nervous
	}

	trigger = {
		is_available_child_allow_travel = yes
		NAND = {
			OR = {
				has_trait = brave
				has_trait = craven
			}
			OR = {
				has_trait = calm
				has_trait = wrathful
			}
			OR = {
				has_trait = zealous
				has_trait = cynical
			}
		}
		is_valid_for_east_asian_events_trigger = yes
	}

	weight_multiplier = {
		base = 1
		modifier = {
			add = 2
			any_relation = {
				type = guardian
				OR = {
					has_trait = brave
					has_trait = calm
					has_trait = zealous
				}
			}
		}
		modifier = {
			add = 2
			NOT = {
				any_relation = {
					type = guardian
				}
			}
			court_owner.court_position:court_tutor_court_position ?= {
				OR = {
					has_trait = brave
					has_trait = calm
					has_trait = zealous
				}
			}
		}
		modifier = {
			add = 5
			culture = {
				has_cultural_parameter = zealous_trait_more_common
			}
			NOR = {
				has_trait = zealous
				has_trait = cynical
			}
		}
		modifier = {
			add = 5
			culture = {
				has_cultural_parameter = calm_trait_more_common
			}
			NOR = {
				has_trait = calm
				has_trait = wrathful
			}
		}
		modifier = { #The Mordern Age 
			add = -5
			culture = {
				has_cultural_parameter = zealous_trait_less_common
			}
			NOR = {
				has_trait = zealous
				has_trait = cynical
			}
		}
	}

	immediate = {
		save_scope_as = child
	}

	option = {
		name = tgp_child_personality.0009.a
		trigger = {
			NOR = {
				has_trait = brave
				has_trait = craven
			}
		}
		ai_chance = {
			base = 1
			modifier = {
				add = 4
				guardian_or_court_tutor_trait = { TRAIT = brave }
			}
			modifier = {
				add = -0.5
				guardian_or_court_tutor_trait = { TRAIT = craven }
			}
		}
		add_trait = brave
		
		if = {
			limit = {
				is_ai = yes
			}
			guardian_or_court_tutor_trigger_event = { EVENT = tgp_child_personality.1091 }
		}
	}

	option = {
		name = tgp_child_personality.0009.b
		trigger = {
			NOR = {
				has_trait = calm
				has_trait = wrathful
			}
		}
		ai_chance = {
			base = 1
			modifier = {
				add = 4
				guardian_or_court_tutor_trait = { TRAIT = calm }
			}
			modifier = {
				add = -0.5
				guardian_or_court_tutor_trait = { TRAIT = wrathful }
			}
			modifier = {
				add = 100
				culture = {
					has_cultural_parameter = calm_trait_more_common
				}
			}
		}
		add_trait = calm
		if = {
			limit = {
				is_ai = yes
			}
			guardian_or_court_tutor_trigger_event = { EVENT = tgp_child_personality.1092 }
		}
	}

	option = {
		name = tgp_child_personality.0009.c
		trigger = {
			NOR = {
				has_trait = zealous
				has_trait = cynical
			}
		}
		ai_chance = {
			base = 1
			modifier = {
				add = 4
				guardian_or_court_tutor_trait = { TRAIT = zealous }
			}
			modifier = {
				add = -0.5
				guardian_or_court_tutor_trait = { TRAIT = cynical }
			}
			modifier = {
				add = 100
				culture = {
					has_cultural_parameter = zealous_trait_more_common
				}
			}
			modifier = { #The Modern Age
				add = -100
				culture = {
					has_cultural_parameter = zealous_trait_less_common
				}
			}
		}
		add_trait = zealous
		if = {
			limit = {
				is_ai = yes
			}
			guardian_or_court_tutor_trigger_event = { EVENT = tgp_child_personality.1093 }
		}	
	}
}