########################################################
# MINOR TITLES
# Characters can have any number of these
########################################################
#	grant_limit			Max number of holders
#	realm_in_name		Append the name of the realm after the title (Queen [of Sweden])
#	allowed_to_hold		Conditions for the character to hold the title
#	allowed_to_grant	Conditions for a ruler to grant the title
#	gain_effect			Fires when the title is granted
#	lose_effect			Fires when a title is lost through most causes
#	retire_effect		Fires when a title is lost due to the character stepping down
#	death_effect		Fires when a title is lost due to the character dying
#	message				Should fire a message to the its owner when set
#	The other fields are all character modifiers

#	Scopes (except allowed_to_grant)
#	ROOT is potential holder of minor title
#	FROM is liege

#	ai_will_do is supported

title_lighthouse_custodian = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.1

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = lighthouse_custodian
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}


title_stone_custodian = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.1

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = stone_custodian
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_guardian_of_the_deep = {
	dignity = 0.9
	grant_limit = 1
	opinion_effect = 5
	message = yes

	monthly_prestige = 0.15

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = guardian_of_the_deep
			is_active = yes
		}
	}

	allowed_to_hold = {
		trait = dwarf
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		is_incapable = no
		prisoner = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_watcher_of_giants = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.1

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = watcher_of_giants
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
			trait = blinded
			trait = one_eyed
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_wall_walker = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.1

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = wall_walker
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		practical_age < 55
		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_master_of_tides = {
	message = yes
	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.15

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = master_of_tides
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_master_of_games = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = master_of_the_games
			is_active = yes
		}
	}

	allowed_to_hold = {
		trait = gregarious
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_royal_custodian = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = royal_custodian
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_guardian_of_knowledge = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = guardian_of_knowledge
			is_active = yes
		}
	}

	allowed_to_hold = {
		learning > 15
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_keeper_of_tomes = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = keeper_of_tomes
			is_active = yes
		}
	}

	allowed_to_hold = {
		learning > 12
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_keeper_of_the_dead = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = keeper_of_the_dead
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_overseer_of_rites = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = overseer_of_rites
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		piety > 100

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_custodian_of_the_mosque = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = custodian_of_the_mosque
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		piety > 100

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_custodian_of_the_temple = {
	message = yes

	dignity = 0.9
	grant_limit = 1

	opinion_effect = 5
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = custodian_of_temple
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		piety > 100

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}

title_castellan = {
	message = yes

	dignity = 0.9
	grant_limit = 2

	opinion_effect = 15
	monthly_prestige = 0.2

	allowed_to_grant = {
		any_realm_wonder_upgrade = {
			has_wonder_upgrade_flag = soaring_fortresses
			is_active = yes
		}
	}

	allowed_to_hold = {
		is_adult = yes

		custom_tooltip = {
			text = court_physician_tooltip_2

			OR = {
				male_can_hold_minor_title_trigger = yes
				female_can_hold_minor_commander_title_trigger = yes
			}
		}

		prisoner = no
		is_incapable = no

		NOR = {
			trait = infirm
			trait = imbecile
			trait = in_hiding
		}
	}

	revoke_trigger = {
	}

	gain_effect = {
	}

	lose_effect = {
	}

	retire_effect = {
	}

	death_effect = {
	}
}