decisions = {

	##################################################
	# Gifts and subsidizes to the Emperor
	##################################################
	
	send_a_gift_to_the_emperor = {
		potential = {
			is_female = no
			is_landed = yes
			NOT = { has_character_modifier = send_a_gift_to_the_emperor_timer }
		}
		
		allow = {
			age = 16
			wealth = 25
		}
		
		effect = {
			wealth = -25
			honor = 2.5
			hidden_tooltip = {
				add_character_modifier = {
					name = send_a_gift_to_the_emperor_timer
					duration = 90
					hidden = yes
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				honor = 30
				NOT = { wealth = 75 }
			}
			modifier = {
				factor = 0
				honor = 50
				NOT = { wealth = 150 }
			}
			modifier = {
				factor = 0
				honor = 80
				NOT = { wealth = 300 }
			}
		}
	}

	subsidize_an_imperial_ceremony = {
		potential = {
			is_female = no
			is_landed = yes
			NOT = { has_character_modifier = subsidize_an_imperial_ceremony_timer }
		}
		
		allow = {
			age = 16
			wealth = 50
		}
		
		effect = {
			wealth = -50
			honor = 5
			hidden_tooltip = {
				add_character_modifier = {
					name = subsidize_an_imperial_ceremony_timer
					duration = 90
					hidden = yes
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			modifier = {
				factor = 0
				honor = 30
				NOT = { wealth = 125 }
			}
			modifier = {
				factor = 0
				honor = 50
				NOT = { wealth = 250 }
			}
			modifier = {
				factor = 0
				honor = 80
				NOT = { wealth = 500 }
			}
		}
	}
	
	subsidize_the_imperial_court = {
		potential = {
			is_female = no
			is_landed = yes
			NOT = { has_character_modifier = subsidizing_the_imperial_court }
			NOT = { has_character_modifier = subsidizing_the_emperors_household_timer }
		}
		
		allow = {
			age = 16
			wealth = 100
		}
		
		effect = {
			wealth = -100
			add_character_modifier = {
				name = subsidizing_the_imperial_court
				duration = 365
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = subsidizing_the_emperors_household_timer
					duration = 730
					hidden = yes
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			modifier = {
				factor = 0
				honor = 30
				NOT = { wealth = 200 }
			}
			modifier = {
				factor = 0
				honor = 50
				NOT = { wealth = 400 }
			}
			modifier = {
				factor = 0
				honor = 80
				NOT = { wealth = 600 }
			}
		}
	}

	##################################################
	# Court titles
	##################################################

	gain_court_rank_10 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			NOT = { has_character_modifier = court_rank_10 }
			NOT = { has_character_flag = court_rank_10 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 30
			wealth = 30
		}
		
		effect = {
			wealth = -30
			set_character_flag = court_rank_10
			add_character_modifier = {
				name = court_rank_10
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}

	gain_court_rank_9 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_10
			NOT = { has_character_flag = court_rank_9 }
			NOT = { has_character_modifier = court_rank_9 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 35
			wealth = 40
		}
		
		effect = {
			wealth = -40
			remove_character_modifier = court_rank_10
			set_character_flag = court_rank_9
			add_character_modifier = {
				name = court_rank_9
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_8 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_9
			NOT = { has_character_flag = court_rank_8 }
			NOT = { has_character_modifier = court_rank_8 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 40
			wealth = 50
		}
		
		effect = {
			wealth = -50
			remove_character_modifier = court_rank_9
			set_character_flag = court_rank_8
			add_character_modifier = {
				name = court_rank_8
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_7 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_8
			NOT = { has_character_flag = court_rank_7 }
			NOT = { has_character_modifier = court_rank_7 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 45
			wealth = 60
		}
		
		effect = {
			wealth = -60
			remove_character_modifier = court_rank_8
			set_character_flag = court_rank_7
			add_character_modifier = {
				name = court_rank_7
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_6 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_7
			NOT = { has_character_flag = court_rank_6 }
			NOT = { has_character_modifier = court_rank_6 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 50
			wealth = 70
		}
		
		effect = {
			wealth = -70
			remove_character_modifier = court_rank_7
			set_character_flag = court_rank_6
			add_character_modifier = {
				name = court_rank_6
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_5 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_6
			NOT = { has_character_flag = court_rank_5 }
			NOT = { has_character_modifier = court_rank_5 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 55
			wealth = 80
		}
		
		effect = {
			wealth = -80
			remove_character_modifier = court_rank_6
			set_character_flag = court_rank_5
			add_character_modifier = {
				name = court_rank_5
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_4 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_5
			NOT = { has_character_flag = court_rank_4 }
			NOT = { has_character_modifier = court_rank_4 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 60
			wealth = 90
		}
		
		effect = {
			wealth = -90
			remove_character_modifier = court_rank_5
			set_character_flag = court_rank_4
			add_character_modifier = {
				name = court_rank_4
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_3 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_4
			NOT = { has_character_flag = court_rank_3 }
			NOT = { has_character_modifier = court_rank_3 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 65
			wealth = 100
		}
		
		effect = {
			wealth = -100
			remove_character_modifier = court_rank_4
			set_character_flag = court_rank_3
			add_character_modifier = {
				name = court_rank_3
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_2 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_3
			NOT = { has_character_flag = court_rank_2 }
			NOT = { has_character_modifier = court_rank_2 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 70
			wealth = 110
		}
		
		effect = {
			wealth = -110
			remove_character_modifier = court_rank_3
			set_character_flag = court_rank_2
			add_character_modifier = {
				name = court_rank_2
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_1 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			has_character_modifier = court_rank_2
			NOT = { has_character_flag = court_rank_1 }
			NOT = { has_character_modifier = court_rank_1 }
			NOT = { has_character_modifier = gain_a_court_rank_timer }
		}
		
		allow = {
			age = 16
			honor = 75
			wealth = 120
		}
		
		effect = {
			wealth = -120
			remove_character_modifier = court_rank_2
			set_character_flag = court_rank_1
			add_character_modifier = {
				name = court_rank_1
				duration = -1
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	##################################################
	# Court titles for your son
	##################################################

	gain_court_rank_for_your_son_10 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				NOT = { has_character_modifier = court_rank_10 }
				NOT = { has_character_flag = court_rank_10 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 30
			wealth = 30
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -30
			first_son = {
				set_character_flag = court_rank_10
				add_character_modifier = {
					name = court_rank_10
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}

	gain_court_rank_for_your_son_9 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_10
				NOT = { has_character_modifier = court_rank_9 }
				NOT = { has_character_flag = court_rank_9 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 35
			wealth = 40
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -40
			first_son = {
				remove_character_modifier = court_rank_10
				set_character_flag = court_rank_9
				add_character_modifier = {
					name = court_rank_9
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}

	gain_court_rank_for_your_son_8 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_9
				NOT = { has_character_modifier = court_rank_8 }
				NOT = { has_character_flag = court_rank_8 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 40
			wealth = 50
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -50
			first_son = {
				remove_character_modifier = court_rank_9
				set_character_flag = court_rank_8
				add_character_modifier = {
					name = court_rank_8
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	gain_court_rank_for_your_son_7 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_8
				NOT = { has_character_modifier = court_rank_7 }
				NOT = { has_character_flag = court_rank_7 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 45
			wealth = 60
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -60
			first_son = {
				remove_character_modifier = court_rank_8
				set_character_flag = court_rank_7
				add_character_modifier = {
					name = court_rank_7
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	gain_court_rank_for_your_son_6 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_7
				NOT = { has_character_modifier = court_rank_6 }
				NOT = { has_character_flag = court_rank_6 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 50
			wealth = 70
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -70
			first_son = {
				remove_character_modifier = court_rank_7
				set_character_flag = court_rank_6
				add_character_modifier = {
					name = court_rank_6
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_for_your_son_5 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_6
				NOT = { has_character_modifier = court_rank_5 }
				NOT = { has_character_flag = court_rank_5 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 55
			wealth = 80
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -80
			first_son = {
				remove_character_modifier = court_rank_6
				set_character_flag = court_rank_5
				add_character_modifier = {
					name = court_rank_5
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_for_your_son_4 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_5
				NOT = { has_character_modifier = court_rank_4 }
				NOT = { has_character_flag = court_rank_4 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 60
			wealth = 90
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -90
			first_son = {
				remove_character_modifier = court_rank_5
				set_character_flag = court_rank_4
				add_character_modifier = {
					name = court_rank_4
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_for_your_son_3 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_4
				NOT = { has_character_modifier = court_rank_3 }
				NOT = { has_character_flag = court_rank_3 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 65
			wealth = 100
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -100
			first_son = {
				remove_character_modifier = court_rank_4
				set_character_flag = court_rank_3
				add_character_modifier = {
					name = court_rank_3
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_for_your_son_2 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_3
				NOT = { has_character_modifier = court_rank_2 }
				NOT = { has_character_flag = court_rank_2 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 70
			wealth = 110
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -110
			first_son = {
				remove_character_modifier = court_rank_3
				set_character_flag = court_rank_2
				add_character_modifier = {
					name = court_rank_2
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}
	
	gain_court_rank_for_your_son_1 = {
		potential = {
			is_female = no
			is_landed = yes
			OR = {
				# Daimyo
				any_demesne_title = {
					tier = duke
				}
				# Major independent kokujin
				AND = {
					independent = yes
					num_demesne_provinces = 3
				}
			}
			any_child = {
				first_son = yes
				has_character_modifier = court_rank_2
				NOT = { has_character_modifier = court_rank_1 }
				NOT = { has_character_flag = court_rank_1 }
			}
			NOT = { has_character_modifier = gain_a_court_rank_for_your_son_timer }
		}
		
		allow = {
			age = 16
			honor = 75
			wealth = 120
			any_child = {
				first_son = yes
				age = 16
			}
		}
		
		effect = {
			wealth = -120
			first_son = {
				remove_character_modifier = court_rank_2
				set_character_flag = court_rank_1
				add_character_modifier = {
					name = court_rank_1
					duration = -1
				}
			}
			hidden_tooltip = {
				add_character_modifier = {
					name = gain_a_court_rank_for_your_son_timer
					duration = 365
				}
			}
		}
		
		revoke_allowed = {
		}
		
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0
				wealth = 200
			}
		}
	}

}
