###############################################
# Order of the Sacred Magdalene
# Order House Buildings
#
# Catholic-only institutional building chains
# for tribal, castle, and city holdings.
#
# Tribal levels convert directly to the matching
# castle or city level when the tribal holding
# changes government form.
###############################################

tribal = {

	#######################################
	# ORDER OF THE SACRED MAGDALENE
	#######################################

	tb_ggsm_magdalene_house_1 = {
		desc = tb_ggsm_magdalene_house_1_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 0 }

		gold_cost = 50
		build_time = 365

		tax_income = 0.5
		monthly_character_piety = 0.05
		vassal_opinion = 2
		church_opinion = 5

		ai_creation_factor = 100
		ai_feudal_modifier = 10
		ai_republic_modifier = 10

		convert_to_castle = ca_ggsm_magdalene_house_1
		convert_to_city = ct_ggsm_magdalene_house_1
	}

	tb_ggsm_magdalene_house_2 = {
		desc = tb_ggsm_magdalene_house_2_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 1 }

		upgrades_from = tb_ggsm_magdalene_house_1

		gold_cost = 75
		build_time = 547

		tax_income = 0.5
		monthly_character_piety = 0.05
		vassal_opinion = 2
		church_opinion = 5

		ai_creation_factor = 99
		ai_feudal_modifier = 10
		ai_republic_modifier = 10

		convert_to_castle = ca_ggsm_magdalene_house_2
		convert_to_city = ct_ggsm_magdalene_house_2
	}

	tb_ggsm_magdalene_house_3 = {
		desc = tb_ggsm_magdalene_house_3_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 2 }

		upgrades_from = tb_ggsm_magdalene_house_2

		gold_cost = 100
		build_time = 730

		tax_income = 0.5
		monthly_character_piety = 0.10
		vassal_opinion = 3
		church_opinion = 5

		ai_creation_factor = 98
		ai_feudal_modifier = 10
		ai_republic_modifier = 10

		convert_to_castle = ca_ggsm_magdalene_house_3
		convert_to_city = ct_ggsm_magdalene_house_3
	}

	tb_ggsm_magdalene_house_4 = {
		desc = tb_ggsm_magdalene_house_4_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 3 }

		upgrades_from = tb_ggsm_magdalene_house_3

		gold_cost = 150
		build_time = 1095

		tax_income = 0.5
		monthly_character_piety = 0.10
		vassal_opinion = 3
		church_opinion = 5

		ai_creation_factor = 97
		ai_feudal_modifier = 10
		ai_republic_modifier = 10

		convert_to_castle = ca_ggsm_magdalene_house_4
		convert_to_city = ct_ggsm_magdalene_house_4
	}

	tb_ggsm_magdalene_house_5 = {
		desc = tb_ggsm_magdalene_house_5_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 4 }

		upgrades_from = tb_ggsm_magdalene_house_4

		gold_cost = 200
		build_time = 1460

		tax_income = 1.0
		monthly_character_piety = 0.20
		vassal_opinion = 5
		church_opinion = 10

		ai_creation_factor = 96
		ai_feudal_modifier = 10
		ai_republic_modifier = 10

		convert_to_castle = ca_ggsm_magdalene_house_5
		convert_to_city = ct_ggsm_magdalene_house_5
	}
}


castle = {

	#######################################
	# ORDER OF THE SACRED MAGDALENE
	#######################################

	ca_ggsm_magdalene_house_1 = {
		desc = ca_ggsm_magdalene_house_1_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CASTLE_CONSTRUCTION = 0 }

		gold_cost = 100
		build_time = 365

		tax_income = 1.0
		monthly_character_piety = 0.05
		vassal_opinion = 2
		church_opinion = 5

		ai_creation_factor = 100
	}

	ca_ggsm_magdalene_house_2 = {
		desc = ca_ggsm_magdalene_house_2_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CASTLE_CONSTRUCTION = 2 }

		upgrades_from = ca_ggsm_magdalene_house_1

		gold_cost = 150
		build_time = 547

		tax_income = 1.0
		monthly_character_piety = 0.05
		vassal_opinion = 2
		church_opinion = 5

		ai_creation_factor = 99
	}

	ca_ggsm_magdalene_house_3 = {
		desc = ca_ggsm_magdalene_house_3_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CASTLE_CONSTRUCTION = 4 }

		upgrades_from = ca_ggsm_magdalene_house_2

		gold_cost = 200
		build_time = 730

		tax_income = 1.0
		monthly_character_piety = 0.10
		vassal_opinion = 3
		church_opinion = 5

		ai_creation_factor = 98
	}

	ca_ggsm_magdalene_house_4 = {
		desc = ca_ggsm_magdalene_house_4_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CASTLE_CONSTRUCTION = 6 }

		upgrades_from = ca_ggsm_magdalene_house_3

		gold_cost = 300
		build_time = 1095

		tax_income = 1.0
		monthly_character_piety = 0.10
		vassal_opinion = 3
		church_opinion = 5

		ai_creation_factor = 97
	}

	ca_ggsm_magdalene_house_5 = {
		desc = ca_ggsm_magdalene_house_5_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CASTLE_CONSTRUCTION = 8 }

		upgrades_from = ca_ggsm_magdalene_house_4

		gold_cost = 500
		build_time = 1460

		tax_income = 2.0
		monthly_character_piety = 0.20
		vassal_opinion = 5
		church_opinion = 10

		ai_creation_factor = 96
	}
}


city = {

	#######################################
	# ORDER OF THE SACRED MAGDALENE
	#######################################

	ct_ggsm_magdalene_house_1 = {
		desc = ct_ggsm_magdalene_house_1_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 0 }

		gold_cost = 100
		build_time = 365

		tax_income = 1.5
		monthly_character_piety = 0.05
		vassal_opinion = 2
		church_opinion = 5

		ai_creation_factor = 105
	}

	ct_ggsm_magdalene_house_2 = {
		desc = ct_ggsm_magdalene_house_2_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 2 }

		upgrades_from = ct_ggsm_magdalene_house_1

		gold_cost = 150
		build_time = 547

		tax_income = 1.5
		monthly_character_piety = 0.05
		vassal_opinion = 2
		church_opinion = 5

		ai_creation_factor = 104
	}

	ct_ggsm_magdalene_house_3 = {
		desc = ct_ggsm_magdalene_house_3_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 4 }

		upgrades_from = ct_ggsm_magdalene_house_2

		gold_cost = 200
		build_time = 730

		tax_income = 1.5
		monthly_character_piety = 0.10
		vassal_opinion = 3
		church_opinion = 5

		ai_creation_factor = 103
	}

	ct_ggsm_magdalene_house_4 = {
		desc = ct_ggsm_magdalene_house_4_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 6 }

		upgrades_from = ct_ggsm_magdalene_house_3

		gold_cost = 300
		build_time = 1095

		tax_income = 1.5
		monthly_character_piety = 0.10
		vassal_opinion = 3
		church_opinion = 5

		ai_creation_factor = 102
	}

	ct_ggsm_magdalene_house_5 = {
		desc = ct_ggsm_magdalene_house_5_desc

		potential = {
			FROM = {
				religion = catholic
			}
		}

		is_active_trigger = {
			FROM = {
				religion = catholic
			}
		}

		trigger = { TECH_CITY_CONSTRUCTION = 8 }

		upgrades_from = ct_ggsm_magdalene_house_4

		gold_cost = 500
		build_time = 1460

		tax_income = 3.0
		monthly_character_piety = 0.20
		vassal_opinion = 5
		church_opinion = 10

		ai_creation_factor = 101
	}
}
