#BR Deprecated all of these because they were causing lag for some reason.
# country_decisions = {
	
	# BYZ_justinians_empire_decision = {
		# major = yes
		# potential = {
			# has_country_flag = BYZ_justinians_empire_decision_flag
		# }
		# provinces_to_highlight = {
			# BYZ_roman_empire_decision_trigger = yes
			# NOT = { owned_by = ROOT }
		# }
		# allow = {
			# mission_completed = BYZ_justinians_ambition
			# mission_completed = BYZ_egypt
			
			# num_of_owned_provinces_with = {
				# custom_trigger_tooltip = {
					# tooltip = BYZ_highlighted_by_decision
					# BYZ_roman_empire_decision_trigger = yes
				# }
				# value = 150
			# }
		# }
		# effect = {
			# override_country_name = BYZ_eastern_roman_empire
			# set_country_flag = is_BYZ_eastern_roman_empire_flag
			# clr_country_flag = BYZ_justinians_empire_decision_flag
			
			# custom_tooltip = " "
			
			# if = {
				# limit = {
					# has_dlc = "Mandate of Heaven"
				# }
				# add_splendor = 400
				# add_prestige_or_monarch_power = { amount = 25 }
			# }
			# else = {
				# add_prestige_or_monarch_power = { amount = 60 }
			# }
		# }
		# ai_will_do = {
			# factor = 1
		# }
	# }
	
	# BYZ_build_hexamilion_wall_decision = {
		# major = yes
		# potential = {
			# has_country_flag = BYZ_unlock_decision_to_upgrade_hexamilion_wall_flag
			# 4701 = {
				# NOT = { has_province_modifier = BYZ_hexamilion_wall_2 }
			# }
		# }
		# provinces_to_highlight = {
			# province_id = 4701
		# }
		# allow = {
			# owns = 4701 # corinth
			# NOT = {	
				# custom_trigger_tooltip = {
					# tooltip = BYZ_hexamilion_wall_is_being_upgraded
					# has_country_flag = BYZ_upgrading_hexamilion
				# }
			# }
			
			# if = {
				# limit = {
					# 4701 = { 
						# NOT = { has_province_modifier = BYZ_hexamilion_wall_2 }
						# NOT = { has_province_modifier = BYZ_hexamilion_wall_1 }
					# }
				# }
				# treasury = 100
			# }
			# else_if = {
				# limit = {
					# 4701 = { 
						# NOT = { has_province_modifier = BYZ_hexamilion_wall_2 }
						# has_province_modifier = BYZ_hexamilion_wall_1
					# }
				# }
				# treasury = 250
			# }
		# }
		# effect = {
			# if = {
				# limit = {
					# 4701 = { 
						# NOT = { has_province_modifier = BYZ_hexamilion_wall_2 }
						# NOT = { has_province_modifier = BYZ_hexamilion_wall_1 }
					# }
				# }
				# add_treasury = -100
			# }
			# else_if = {
				# limit = {
					# 4701 = { 
						# NOT = { has_province_modifier = BYZ_hexamilion_wall_2 }
						# has_province_modifier = BYZ_hexamilion_wall_1
					# }
				# }
				# add_treasury = -250
			# }
			# country_event = { 
				# id = MEE_Byzantine_Events.13
				# days = 365 
				# tooltip = BYZ_upgrade_will_be_complete_in_one_year
			# }
			# set_country_flag = BYZ_upgrading_hexamilion
			
			# custom_tooltip = BYZ_level_1
			# tooltip = {
				# add_province_modifier = {
					# name = BYZ_hexamilion_wall_1
					# duration = -1
				# }
			# }
			# custom_tooltip = BYZ_level_2
			# tooltip = {
				# add_province_modifier = {
					# name = BYZ_hexamilion_wall_2
					# duration = -1
				# }
			# }
		# }
		# ai_will_do = {
			# factor = 1
		# }
	# }
	
	# BYZ_build_theodosian_wall_decision = {
		# major = yes
		# potential = {
			# has_country_flag = BYZ_unlock_decision_to_upgrade_theodosian_wall_flag
			# 151 = {
				# NOT = { has_province_modifier = BYZ_theodosian_wall_3 }
			# }
		# }
		# provinces_to_highlight = {
			# province_id = 151
		# }
		# allow = {
			# owns = 151 # constantinople
			# NOT = {	
				# custom_trigger_tooltip = {
					# tooltip = BYZ_theodosian_wall_is_being_upgraded
					# has_country_flag = BYZ_upgrading_theodosian
				# }
			# }
			
			# if = {
				# limit = {
					# 151 = {
						# NOT = { has_province_modifier = BYZ_theodosian_wall_3 }
						# NOT = { has_province_modifier = BYZ_theodosian_wall_2 }
						# NOT = { has_province_modifier = BYZ_theodosian_wall_1 }
					# }
				# }
				# if = {
					# limit = { has_country_flag = BYZ_upgrading_theodosian_walls_will_be_25_cheaper }
					# treasury = 75
				# }
				# else = { treasury = 100 }
			# }
			# else_if = {
				# limit = {
					# 151 = { has_province_modifier = BYZ_theodosian_wall_1 }
				# }
				# if = {
					# limit = { has_country_flag = BYZ_upgrading_theodosian_walls_will_be_25_cheaper }
					# treasury = 150
				# }
				# else = { treasury = 200 }
			# }
			# else_if = {
				# limit = {
					# 151 = { has_province_modifier = BYZ_theodosian_wall_2 }
				# }
				# if = {
					# limit = { has_country_flag = BYZ_upgrading_theodosian_walls_will_be_25_cheaper }
					# treasury = 375
				# }
				# else = { treasury = 500 }
			# }
		# }
		# effect = {
			# if = {
				# limit = {
					# 151 = {
						# NOT = { has_province_modifier = BYZ_theodosian_wall_3 }
						# NOT = { has_province_modifier = BYZ_theodosian_wall_2 }
						# NOT = { has_province_modifier = BYZ_theodosian_wall_1 }
					# }
				# }
				# if = {
					# limit = { has_country_flag = BYZ_upgrading_theodosian_walls_will_be_25_cheaper }
					# add_treasury = -75
				# }
				# else = { add_treasury = -100 }
			# }
			# else_if = {
				# limit = {
					# 151 = { has_province_modifier = BYZ_theodosian_wall_1 }
				# }
				# if = {
					# limit = { has_country_flag = BYZ_upgrading_theodosian_walls_will_be_25_cheaper }
					# add_treasury = -150
				# }
				# else = { add_treasury = -200 }
			# }
			# else_if = {
				# limit = {
					# 151 = { has_province_modifier = BYZ_theodosian_wall_2 }
				# }
				# if = {
					# limit = { has_country_flag = BYZ_upgrading_theodosian_walls_will_be_25_cheaper }
					# add_treasury = -375
				# }
				# else = { add_treasury = -500 }
			# }
			# set_country_flag = BYZ_upgrading_theodosian
			# country_event = {
				# id = MEE_Byzantine_Events.14
				# days = 365
				# tooltip = BYZ_upgrade_will_be_complete_in_one_year
			# }
			
			# custom_tooltip = BYZ_level_1
			# tooltip = {
				# add_province_modifier = {
					# name = BYZ_theodosian_wall_1
					# duration = -1
				# }
			# }
			# custom_tooltip = BYZ_level_2
			# tooltip = {
				# add_province_modifier = {
					# name = BYZ_theodosian_wall_2
					# duration = -1
				# }
			# }
			# custom_tooltip = BYZ_level_3
			# tooltip = {
				# add_province_modifier = {
					# name = BYZ_theodosian_wall_3
					# duration = -1
				# }
			# }
		# }
		# ai_will_do = {
			# factor = 1
		# }
	# }
	
	# BYZ_bosphorus_toll_decision = {
		# major = yes
		# potential = {
			# has_country_flag = BYZ_unlocked_bosphorus_toll
		# }
		# provinces_to_highlight = {
			# OR = {
				# province_id = 151
				# province_id = 316
			# }
		# }
		# allow = {
			# 151 = {
				# owned_by = ROOT
				# has_shipyard_building_trigger = yes
				# development = 50
				# has_coast_defense_building_trigger = yes
			# }
			# 316 = {
				# owned_by = ROOT
				# has_shipyard_building_trigger = yes
				# development = 20
				# has_coast_defense_building_trigger = yes
			# }
			# navy_size = 80
		# }
		# effect = {
			# clr_country_flag = BYZ_unlocked_bosphorus_toll
			# 151 = {
				# add_province_triggered_modifier = BYZ_bosphorus_toll
			# }
			# 316 = {
				# add_province_triggered_modifier = BYZ_bosphorus_toll
			# }
			
			# add_years_of_trade_income = {
				# years = 1
				# custom_tooltip = BYZ_add_1_years_of_trade_income
			# }
		# }
		# ai_will_do = {
			# factor = 100
		# }
	# }
	
	# BYZ_mosaicists_decision = {
		# major = yes
		# potential = {
			# mission_completed = BYZ_glass_ware
		# }
		# allow = {
			# prestige = 50
			# has_adm_advisor_2 = yes
			# custom_trigger_tooltip = {
				# tooltip = BYZ_10_year_cooldown
				# OR = {
					# NOT = { has_country_flag = BYZ_mosaicists_cooldown }
					# had_country_flag = {
						# flag = BYZ_mosaicists_cooldown
						# days = 3650
					# }
				# }
			# }
		# }
		# effect = {
			# set_country_flag = BYZ_mosaicists_cooldown
			
			# country_event = { id = MEE_Byzantine_Events.24 }
		# }
		# ai_will_do = {
			# factor = 100
		# }
	# }
	
	# BYZ_ecumenical_decision = {
		# major = yes
		# potential = {
			# has_country_flag = BYZ_ecumenical_decision_flag
		# }
		# allow = {
			# custom_trigger_tooltip = {
				# tooltip = BYZ_25_year_cooldown
				# OR = {
					# NOT = { has_country_flag = BYZ_ecumenical_decision_flag_cooldown }
					# had_country_flag = {
						# flag = BYZ_ecumenical_decision_flag_cooldown
						# days = 9125
					# }
				# }
			# }
		# }
		# effect = {
			# set_country_flag = BYZ_ecumenical_decision_flag_cooldown
			
			# country_event = { id = MEE_Byzantine_Events.18 }
		# }
		# ai_will_do = {
			# factor = 100
		# }
	# }
	
	# BYZ_revoke_exkousseiai = {
		# major = yes
		# potential = {
			# has_estate_privilege = estate_burghers_exkousseiai_for_latins
		# }
		# allow = {
			# if = {
				# limit = {
					# trade_income_percentage = 0.01
				# }
				# monthly_trade_income = 7
			# }
			# share_of_starting_income = 2
			# OR = {
				# trader = 2
				# has_dip_advisor_3 = yes
			# }
		# }
		# effect = {
			# remove_estate_privilege = estate_burghers_exkousseiai_for_latins
		# }
		# ai_will_do = {
			# factor = 100
		# }
	# }
	
	# BYZ_revoke_deteriorating_army = {
		# major = yes
		# potential = {
			# has_estate_privilege = estate_nobles_deteriorating_army
		# }
		# allow = {
			# if = {
				# limit = {
					# mission_completed = BYZ_tarnished_state
				# }
				# total_development = 75
				# army_size = 15
				# has_mil_advisor_2 = yes
			# }
			# else = {
				# total_development = 100
				# army_size = 20
				# has_mil_advisor_2 = yes
				# has_global_modifier_value = {
					# which = land_morale
					# value = 0.15
				# }
			# }
		# }
		# effect = {
			# remove_estate_privilege = estate_nobles_deteriorating_army
			# add_estate_loyalty = {
				# estate = estate_nobles
				# loyalty = -20
			# }
		# }
		# ai_will_do = {
			# factor = 100
		# }
	# }
	
	# BYZ_revoke_union_of_the_churches = {
		# major = yes
		# potential = {
			# has_estate_privilege = estate_church_union_of_the_churches
			# NOT = { religion = catholic }
		# }
		# allow = {
			# if = {
				# limit = {
					# exists = TUR
				# }
				# has_won_war_against = { who = TUR }
			# }
			# num_of_owned_provinces_with = {
				# religion = orthodox
				# has_tax_building_trigger = yes
				# value = 5
			# }
			# custom_trigger_tooltip = {
				# tooltip = BYZ_not_allied_to_a_catholic_country
				# NOT = {
					# any_ally = {
						# religion = catholic
					# }
				# }
			# }
			# estate_loyalty = {
				# estate = estate_church
				# loyalty = 60
			# }
		# }
		# effect = {
			# remove_estate_privilege = estate_church_union_of_the_churches
			# add_estate_loyalty = {
                # estate = estate_church
                # loyalty = -20
            # }
		# }
		# ai_will_do = {
			# factor = 100
		# }
	# }
	
	# BYZ_become_orthodox_again = {
		# major = yes
		# potential = {
			# has_estate_privilege = estate_church_union_of_the_churches
			# religion = catholic
		# }
		# allow = {
			# if = {
				# limit = {
					# exists = TUR
				# }
				# has_won_war_against = { who = TUR max_years_since = 50 }
			# }
			# num_of_owned_provinces_with = {
				# religion = orthodox
				# has_tax_building_trigger = yes
				# value = 15
			# }
			# NOT = {
				# any_ally = {
					# religion = catholic
				# }
			# }
			# estate_loyalty = {
				# estate = estate_church
				# loyalty = 60
			# }
			# dominant_religion = orthodox
			# custom_trigger_tooltip = {
				# tooltip = BYZ_at_least_1_tolerance_heretic
				# has_global_modifier_value = {
					# which = tolerance_heretic
					# value = 1
				# }
			# }
			# owns = 151
			# OR = { #either owns rome or the other patriarchates
				# owns = 118
				# AND = {
					# owns = 358
					# owns = 2313
					# owns = 379
				# }
			# }
		# }
		# effect = {
			# remove_estate_privilege = estate_church_union_of_the_churches
			# change_tag = BYZ
			# change_religion = orthodox
			# add_estate_loyalty = {
				# estate = estate_church
				# loyalty = -20
			# }
		# }
		# ai_will_do = {
			# factor = 100
		# }
	# }
country_decisions = { #BR: Re-enabled as I kind of like it. Not a bad way to represent Galata I think.
	BYZ_integrate_galata = {
		major = yes
		potential = {
			owns = 151
			151 = {
				has_province_modifier = BYZ_galata 
			}
		}
		allow = {
			151 = {
				has_most_province_trade_power = ROOT
				trade_share = {
					country = ROOT
					share = 50
				}
			}
		}
		effect = {
			151 = {
				remove_province_triggered_modifier = BYZ_galata
				
				if = {
					limit = {
						NOT = { owned_by = TUR } #Ottomans already get plenty dev bonuses and can do it as soon as they conquer...
					}
					add_base_tax = 2 #BT; 3
					add_base_production = 2 #BT; 1
				}
				if = {
					limit = {
						has_trade_modifier = {
							who = GEN
							key = BYZ_colony_in_galata
						}
					}
					remove_trade_modifier = {
						who = GEN
						key = BYZ_colony_in_galata
					}
				}
			}
		}
		ai_will_do = {
			factor = 100
		}
	}
}