﻿###################
# MILITARY ORDERS #
###################

# Defined - Catholic & Pre-Catholic #

#Knights Hospitaller
ho_christian_knights_hospitaller = {
	
	type = military
	government = holy_order_government
	title = d_knights_hospitaller
	name = "holy_order_knights_hospitaller"
	coat_of_arms = "ho_knights_hospitaller"

	trigger = {
		trigger_if = {
			limit = {
				scope:founder = { has_variable = military_order_game_start_founder_2 }
			}
			always = no
		}
		trigger_else = {
			scope:founder = {
				faith = faith:roman_catholic_faith
				culture = {
					has_cultural_pillar = heritage_italian
				}
			}
		}
	}

	weight = {
		value = 10
		#Should be founded in Italy
		if = {
			limit = {
				scope:province.county ?= title:c_spoleto
			}
			add = 10
		}
		#Trying to put benedictines here on game start
		if = {
			limit = {
				years_from_game_start < 1
				current_year >= 2555
				
				scope:province.county ?= title:c_spoleto
			}
			add = 10000
		}
	}

	men_at_arms = { order_knights order_serjeants }

	effect = {
		scope:leader = {
			add_trait = lifestyle_physician
			add_trait_xp = {
				trait = lifestyle_physician
				value = { 25 50 }
			}
		}
		scope:new_holy_order = { set_order_tenet = tenet:tenet_celestial_hierarchy }
	}
}

#Teutonic Knights
ho_christian_teutonic_order = {
	
	type = military
	government = holy_order_government
	title = d_teutonic_order
	name = "holy_order_teutonic_order"
	coat_of_arms = "ho_teutonic_order"

	trigger = {
		trigger_if = {
			limit = {
				scope:founder = { has_variable = military_order_game_start_founder_1 }
			}
			always = no
		}
		trigger_else = {
			scope:founder = {
				faith = faith:roman_catholic_faith
				culture = {
					has_cultural_pillar = heritage_central_germanic
				}
			}
		}
	}

	weight = {
		value = 10
		#Should be founded in vienna
		if = {
			limit = {
				scope:province.county ?= title:c_vienna
			}
			add = 10
		}
		#Trying to put benedictines here on game start
		if = {
			limit = {
				years_from_game_start < 1
				current_year >= 2555
				
				scope:province.county ?= title:c_vienna
			}
			add = 10000
		}
	}

	men_at_arms = { order_serjeants crossbowmen }

	effect = {
		scope:leader = {
			if = {
				limit = {
					NOT = {
						has_realm_law = cultural_holy_order_succession_law
					}
				}
				add_realm_law = cultural_holy_order_succession_law
			}
		}
		scope:new_holy_order = { set_order_tenet = tenet:tenet_peace_of_god }
	}
}

#Knights of St Lazarus
#Who cared for lepers (as well as fighting in battles)
ho_knights_of_st_lazarus = {

	type = military
	government = holy_order_government
	title = d_knights_of_st_lazarus
	name = "holy_order_knights_of_st_lazarus"
	coat_of_arms = "ho_knights_of_st_lazarus"

	trigger = {
		trigger_if = {
			limit = {
				scope:founder = { has_variable = military_order_game_start_founder_3 }
			}
			always = no
		}
		trigger_else = {
			scope:founder = {
				faith = faith:roman_catholic_faith
				culture = {
					has_cultural_pillar = heritage_goidelic
				}
			}
		}
	}

	weight = {
		value = 10
		if = {
			limit = {
				scope:province.county ?= title:c_kildare
			}
			add = 5
		}
		#Trying to put benedictines here on game start
		if = {
			limit = {
				years_from_game_start < 1
				current_year >= 2555
				
				scope:province.county ?= title:c_kildare
			}
			add = 10000
		}
	}

	men_at_arms = { order_knights order_serjeants }

	effect = {
		scope:leader = {
			add_trait = lifestyle_physician
			add_trait_xp = {
				trait = lifestyle_physician
				value = { 25 50 }
			}
		}
		scope:new_holy_order = { set_order_tenet = tenet:tenet_dulia }
	}
}

###################
# MONASTIC ORDERS #
###################

# Fixed

#Benedictines - extant by earliest game start
ho_contemplative_hospitaller_johannics = {
	
	type = monastic
	government = monastic_holy_order_government
	title = d_contemplative_hospitaller_johannics
	name = "contemplative_hospitaller_johannics"
	coat_of_arms = "ho_contemplative_hospitaller_johannics"

	trigger = {
		trigger_if = {
			limit = {
				scope:founder = { has_variable = monastic_game_start_founder_2 }
			}
			scope:province.county ?= title:c_capua
		}
		trigger_else = {
		}
	}

	weight = {
		value = 10
		#Should be founded in Italy
		if = {
			limit = {
				scope:province.county ?= title:c_capua
			}
			add = 10
		}
		#Trying to put benedictines here on game start
		if = {
			limit = {
				years_from_game_start < 1
				current_year >= 2555
				
				scope:province.county ?= title:c_capua
			}
			add = 10000
		}
	}


	effect = {
		scope:leader = {
			add_trait = lifestyle_physician
			add_trait_xp = {
				trait = lifestyle_physician
				value = { 25 50 }
			}
		}
		scope:new_holy_order = { set_order_tenet = tenet:tenet_celestial_hierarchy }
	}
}

ho_contemplative_teutonic_order = {
	
	type = monastic
	government = monastic_holy_order_government
	title = d_contemplative_teutonic_order
	name = "contemplative_teutonic_order"
	coat_of_arms = "ho_contemplative_teutonic_order"

	trigger = {
		trigger_if = {
			limit = {
				scope:founder = { has_variable = monastic_game_start_founder_1 }
			}
			scope:province.county ?= title:c_wiener_neustadt
		}
		trigger_else = {
		}
	}

	weight = {
		value = 10
		#Should be founded in Italy
		if = {
			limit = {
				scope:province.county ?= title:c_wiener_neustadt
			}
			add = 10
		}
		#Trying to put benedictines here on game start
		if = {
			limit = {
				years_from_game_start < 1
				current_year >= 2555
				
				scope:province.county ?= title:c_wiener_neustadt
			}
			add = 10000
		}
	}


	effect = {
		scope:leader = {
			add_trait = lifestyle_physician
			add_trait_xp = {
				trait = lifestyle_physician
				value = { 25 50 }
			}
		}
		scope:new_holy_order = { set_order_tenet = tenet:tenet_peace_of_god }
	}
}

ho_contemplative_hospitaller_lazareans = {
	
	type = monastic
	government = monastic_holy_order_government
	title = d_contemplative_hospitaller_lazareans
	name = "contemplative_hospitaller_lazareans"
	coat_of_arms = "ho_contemplative_hospitaller_lazareans"

	trigger = {
		trigger_if = {
			limit = {
				scope:founder = { has_variable = monastic_game_start_founder_3 }
			}
			scope:province.county ?= title:c_offaly
		}
		trigger_else = {
		}
	}

	weight = {
		value = 10
		#Should be founded in Italy
		if = {
			limit = {
				scope:province.county ?= title:c_offaly
			}
			add = 10
		}
		#Trying to put benedictines here on game start
		if = {
			limit = {
				years_from_game_start < 1
				current_year >= 2555
				
				scope:province.county ?= title:c_offaly
			}
			add = 10000
		}
	}


	effect = {
		scope:leader = {
			add_trait = lifestyle_physician
			add_trait_xp = {
				trait = lifestyle_physician
				value = { 25 50 }
			}
		}
		scope:new_holy_order = { set_order_tenet = tenet:tenet_dulia }
	}
}