###########################
# Bulgarian Events
###########################

add_namespace = bftb_bulgaria_factions
add_namespace = bftb_bulgaria_imro
add_namespace = bftb_bulgaria_tsar_boris
add_namespace = bftb_bulgarian_claims
add_namespace = bftb_bulgaria_fatherland_front
add_namespace = bftb_bulgaria_rearmament
add_namespace = bftb_bulgaria_german_influence
add_namespace = bftb_bulgaria_italian_influence
add_namespace = bftb_bulgaria_uranium_mining_concessions
add_namespace = bftb_bulgaria_nationalization
add_namespace = bftb_bulgaria_equipment_purchases
add_namespace = bftb_bulgaria_scw_volunteers
add_namespace = bftb_bulgaria_soviet_influence
add_namespace = bftb_bulgaria_yugoslavian_influence
add_namespace = bftb_bulgaria_balkan_federation
add_namespace = bftb_bulgaria_fate_of_the_balkans
add_namespace = bftb_bulgaria_political_leaders
add_namespace = bftb_bulgaria_greek_influence
add_namespace = bftb_bulgaria_british_influence
add_namespace = bftb_bulgaria_democratic_international_policies


#### ##    ## ######## ######## ########  ##    ##    ###    ##          ########    ###     ######  ######## ####  #######  ##    ##  ######  
 ##  ###   ##    ##    ##       ##     ## ###   ##   ## ##   ##          ##         ## ##   ##    ##    ##     ##  ##     ## ###   ## ##    ## 
 ##  ####  ##    ##    ##       ##     ## ####  ##  ##   ##  ##          ##        ##   ##  ##          ##     ##  ##     ## ####  ## ##       
 ##  ## ## ##    ##    ######   ########  ## ## ## ##     ## ##          ######   ##     ## ##          ##     ##  ##     ## ## ## ##  ######  
 ##  ##  ####    ##    ##       ##   ##   ##  #### ######### ##          ##       ######### ##          ##     ##  ##     ## ##  ####       ## 
 ##  ##   ###    ##    ##       ##    ##  ##   ### ##     ## ##          ##       ##     ## ##    ##    ##     ##  ##     ## ##   ### ##    ## 
#### ##    ##    ##    ######## ##     ## ##    ## ##     ## ########    ##       ##     ##  ######     ##    ####  #######  ##    ##  ######  

#ZVENO DISPATCHER EVENT
country_event = {
	id = bftb_bulgaria_factions.01

	hidden = yes

	is_triggered_only = yes

	immediate = {
		random_list = {
			10 = {
				modifier = {
					add = 30
					NOT = { has_country_flag = BUL_zveno_dissident_event_flag }
				}
				modifier = {
					add = 10
					check_variable = { BUL_zveno_popularity = 25 compare = greater_than_or_equals }
				}
				modifier = {
					add = 20
					check_variable = { BUL_zveno_popularity = 50 compare = greater_than_or_equals }
				}
				modifier = {
					add = 30
					check_variable = { BUL_zveno_popularity = 75 compare = greater_than_or_equals }
				}
				modifier = {
					add = 10
					has_stability < 0.5
				}
				modifier = {
					add = 10
					has_stability < 0.25
				}
				modifier = {
					add = 10
					has_stability < 0.15
				}
				modifier = {
					add = -30
					check_variable = { BUL_zveno_loyalty = 75 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -20
					check_variable = { BUL_zveno_loyalty = 50 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -10
					check_variable = { BUL_zveno_loyalty = 25 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -30
					has_country_flag = { flag = BUL_zveno_dissident_event_flag value > 2 }
				}
				modifier = {
					add = -10
					has_completed_focus = BUL_dissolve_the_military_union
				}
				modifier = {
					add = -10
					has_country_flag = BUL_zveno_repressed_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_zveno_leaders_imprisoned_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_raided_zveno_supporters_flag
				}
				
				country_event = { id = bftb_bulgaria_factions.10 days = 15 random_days = 10 } 
			} 
			90 = { 		
				#Do nothing
			}
		}
	}	
}

#BROAD SOCIALISTS DISPATCHER EVENT
country_event = {
	id = bftb_bulgaria_factions.02

	hidden = yes

	is_triggered_only = yes

	immediate = {
		random_list = {
			10 = {
				modifier = {
					add = 30
					NOT = { has_country_flag = BUL_bs_dissident_event_flag }
				}
				modifier = {
					add = 10
					check_variable = { BUL_bs_popularity = 25 compare = greater_than_or_equals }
				}
				modifier = {
					add = 20
					check_variable = { BUL_bs_popularity = 50 compare = greater_than_or_equals }
				}
				modifier = {
					add = 30
					check_variable = { BUL_bs_popularity = 75 compare = greater_than_or_equals }
				}
				modifier = {
					add = 10
					has_stability < 0.5
				}
				modifier = {
					add = 10
					has_stability < 0.25
				}
				modifier = {
					add = 10
					has_stability < 0.15
				}
				modifier = {
					add = 10
					has_completed_focus = BUL_crush_the_communists
				}
				modifier = {
					add = -30
					check_variable = { BUL_bs_loyalty = 75 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -20
					check_variable = { BUL_bs_loyalty = 50 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -10
					check_variable = { BUL_bs_loyalty = 25 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -30
					has_country_flag = { flag = BUL_bs_dissident_event_flag value > 2 }
				}
				modifier = {
					add = -10
					OR = {
						has_completed_focus = BUL_unify_the_bourgeois_movement
						has_completed_focus = BUL_form_a_popular_bloc
						has_completed_focus = BUL_freedom_of_press
					}
				}
				modifier = {
					add = -10
					has_country_flag = BUL_bs_repressed_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_bs_leaders_imprisoned_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_raided_bs_supporters_flag
				}
				
				country_event = { id = bftb_bulgaria_factions.20 days = 15 random_days = 10 } 
			} 
			90 = { 		
				#Do nothing
			}
		}
	}	
}

#AGRARIAN NATIONAL UNION DISPATCHER EVENT
country_event = {
	id = bftb_bulgaria_factions.03

	hidden = yes

	is_triggered_only = yes

	immediate = {
		random_list = {
			10 = {
				modifier = {
					add = 30
					NOT = { has_country_flag = BUL_bzns_dissident_event_flag }
				}
				modifier = {
					add = 10
					check_variable = { BUL_bzns_popularity = 25 compare = greater_than_or_equals }
				}
				modifier = {
					add = 20
					check_variable = { BUL_bzns_popularity = 50 compare = greater_than_or_equals }
				}
				modifier = {
					add = 30
					check_variable = { BUL_bzns_popularity = 75 compare = greater_than_or_equals }
				}
				modifier = {
					add = 10
					has_stability < 0.5
				}
				modifier = {
					add = 10
					has_stability < 0.25
				}
				modifier = {
					add = 10
					has_stability < 0.15
				}
				modifier = {
					add = -30
					check_variable = { BUL_bzns_loyalty = 75 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -20
					check_variable = { BUL_bzns_loyalty = 50 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -10
					check_variable = { BUL_bzns_loyalty = 25 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -30
					has_country_flag = { flag = BUL_bzns_dissident_event_flag value > 2 }
				}
				modifier = {
					add = -10
					OR = {
						has_completed_focus = BUL_democratic_principles
						has_completed_focus = BUL_united_front_against_fascism
						has_completed_focus = BUL_freedom_of_press
					}
				}
				modifier = {
					add = -10
					has_country_flag = BUL_bzns_repressed_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_bzns_leaders_imprisoned_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_raided_bzns_supporters_flag
				}
				
				country_event = { id = bftb_bulgaria_factions.30 days = 15 random_days = 10 } 
			} 
			90 = { 		
				#Do nothing
			}
		}
	}	
}

#NATIONAL SOCIAL MOVEMENT DISPATCHER EVENT
country_event = {
	id = bftb_bulgaria_factions.04

	hidden = yes

	is_triggered_only = yes

	immediate = {
		random_list = {
			10 = {
				modifier = {
					add = 30
					NOT = { has_country_flag = BUL_nsm_dissident_event_flag }
				}
				modifier = {
					add = 10
					check_variable = { BUL_nsm_popularity = 25 compare = greater_than_or_equals }
				}
				modifier = {
					add = 20
					check_variable = { BUL_nsm_popularity = 50 compare = greater_than_or_equals }
				}
				modifier = {
					add = 30
					check_variable = { BUL_nsm_popularity = 75 compare = greater_than_or_equals }
				}
				modifier = {
					add = 10
					has_stability < 0.5
				}
				modifier = {
					add = 10
					has_stability < 0.25
				}
				modifier = {
					add = 10
					has_stability < 0.15
				}
				modifier = {
					add = -10
					has_completed_focus = BUL_appoint_communist_ministers
				}
				modifier = {
					add = -30
					check_variable = { BUL_nsm_loyalty = 75 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -20
					check_variable = { BUL_nsm_loyalty = 50 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -10
					check_variable = { BUL_nsm_loyalty = 25 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -30
					has_country_flag = { flag = BUL_nsm_dissident_event_flag value > 2 }
				}
				modifier = {
					add = -10
					has_completed_focus = BUL_appoint_right_wing_ministers
				}
				modifier = {
					add = -10
					has_country_flag = BUL_nsm_repressed_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_nsm_leaders_imprisoned_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_raided_nsm_supporters_flag
				}
				
				country_event = { id = bftb_bulgaria_factions.40 days = 15 random_days = 10 } 
			} 
			90 = { 		
				#Do nothing
			}
		}
	}	
}

#ZVENO COUP DISPATCHER EVENT
country_event = {
	id = bftb_bulgaria_factions.05

	hidden = yes

	is_triggered_only = yes

	immediate = {
		random_list = {
			10 = {
				modifier = {
					add = 30
					has_country_flag = BUL_zveno_dissident_event_flag
				}
				modifier = {
					add = 30
					has_country_flag = { flag = BUL_zveno_dissident_event_flag value > 1 }
				}
				modifier = {
					add = 40
					has_country_flag = { flag = BUL_zveno_dissident_event_flag value > 2 }
				}
				modifier = {
					add = 80
					has_country_flag = { flag = BUL_zveno_dissident_event_flag value > 3 }
				}
				modifier = {
					add = 20
					check_variable = { BUL_zveno_popularity = 25 compare = greater_than_or_equals }
				}
				modifier = {
					add = 30
					check_variable = { BUL_zveno_popularity = 50 compare = greater_than_or_equals }
				}
				modifier = {
					add = 40
					check_variable = { BUL_zveno_popularity = 75 compare = greater_than_or_equals }
				}
				modifier = {
					add = 20
					has_completed_focus = BUL_dissolve_the_military_union
				}
				modifier = {
					add = 20
					has_stability < 0.5
				}
				modifier = {
					add = 25
					has_stability < 0.25
				}
				modifier = {
					add = 30
					has_stability < 0.15
				}
				modifier = {
					add = -30
					check_variable = { BUL_zveno_loyalty = 75 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -15
					check_variable = { BUL_zveno_loyalty = 50 compare = greater_than_or_equals }	
				}
				modifier = {
					add = -5
					check_variable = { BUL_zveno_loyalty = 25 compare = greater_than_or_equals }	
				}			
				modifier = {
					add = -10
					has_completed_focus = BUL_cooperate_with_the_zveno
				}
				modifier = {
					add = -10
					has_country_flag = BUL_zveno_repressed_flag
				}
				modifier = {
					add = -10
					has_country_flag = BUL_disposed_of_zveno_generals_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_zveno_leaders_imprisoned_flag
				}
				modifier = {
					add = -20
					has_country_flag = BUL_raided_zveno_supporters_flag
				}
				country_event = { id = bftb_bulgaria_factions.12 days = 15 random_days = 10 } 
			} 
			90 = { 		
				#Do nothing
			}
		}
	}	
}

#Dissident Event ZVENO - Military members conspiring
country_event = {
	id = bftb_bulgaria_factions.10
	title = bftb_bulgaria_factions.10.t
	desc = bftb_bulgaria_factions.10.desc
	picture = GFX_report_event_bul_military_parade_vidin 

	is_triggered_only = yes

	trigger = {
		original_tag = BUL
		NOT = {	has_country_flag = BUL_zveno_destroyed_flag } 								#Zveno is not destroyed
		NOT = {	has_country_flag = BUL_zveno_legalized_flag } 								#Zveno is not legalized
		OR = {						
			NOT = { has_country_flag = BUL_zveno_dissident_event_flag }						#Zveno has not trigger dissident event recently
			has_country_flag = { flag = BUL_zveno_dissident_event_flag days > 365 }
		}
		OR = {						
			NOT = { has_country_flag = BUL_zveno_repressed_flag }							#Zveno members have not been repressed recently
			has_country_flag = { flag = BUL_zveno_repressed_flag days > 720 }
		}
		NOT = { has_active_mission = BUL_impending_zveno_coup }								#Zveno coup mission is not ongoing
		NOT = { has_country_flag = BUL_zveno_coup_flag }									#Zveno CW has not started
		check_variable = { BUL_zveno_popularity = 5 compare = greater_than_or_equals }		#Zveno has some popularity
		check_variable = { BUL_zveno_loyalty = 50 compare = less_than_or_equals }			#Zveno has low loyalty
		OR = {
			NOT = { has_country_flag = BUL_fatherland_front_formed_flag }					#Fatherland Front has not formed or has being defeated
			has_country_flag = BUL_ff_destroyed_flag
		}
	}

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = BUL_zveno_dissident_event_flag
				}
				modify_country_flag = { flag = BUL_zveno_dissident_event_flag value = 1 }
			}
			else = {
				set_country_flag = BUL_zveno_dissident_event_flag
			}
			set_country_flag = BUL_zveno_dissident_event_not_addressed_flag
			random_unit_leader = {
				limit = {
					NOT = { has_trait = trait_BUL_tsar_loyalist }
					NOT = { has_trait = trait_BUL_ff_sympathizer }
				}
				add_unit_leader_trait = trait_BUL_zveno_member
			}
		}
	}
	
	option = { #Investigate further
		name = bftb_bulgaria_factions.10.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}

		add_war_support = -0.05
		add_political_power = -50
		country_event = { id = bftb_bulgaria_factions.11 days = 30 random_days = 15 } #Event leading to discovering the conspirators and removing a Zveno general/adv

		if = {
			limit = {
				NOT = { has_decision = BUL_opression_repress_zveno }
			}
			unlock_decision_tooltip = BUL_opression_repress_zveno
		}
		custom_effect_tooltip = BUL_zveno_dissidents_tt
	}

	option = { #Do nothing
		name = bftb_bulgaria_factions.10.b

		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes #Don't want a CW on historical
			}
		}

		if = {
			limit = {
				NOT = { has_decision = BUL_opression_repress_zveno }
			}
			unlock_decision_tooltip = BUL_opression_repress_zveno
		}
		custom_effect_tooltip = BUL_zveno_dissidents_tt
	}		
}

#Dissident Event ZVENO - Conspirators exposed
country_event = {
	id = bftb_bulgaria_factions.11
	title = bftb_bulgaria_factions.11.t
	desc = bftb_bulgaria_factions.11.desc
	picture = GFX_report_event_bul_officers_burgas

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = BUL_zveno_conspirators_exposed_flag
				}
				modify_country_flag = { flag = BUL_zveno_conspirators_exposed_flag value = 1 }
			}
			else = {
				set_country_flag = BUL_zveno_conspirators_exposed_flag
			}
			random_unit_leader = {
				limit = {
					has_trait = trait_BUL_zveno_member
				}
				set_unit_leader_flag = BUL_zveno_conspirator_flag
				BUL = { set_variable = { BUL_zveno_conspirator = PREV } }
			}
		}
	}
	
	option = { #Imprison Conspirator
		name = bftb_bulgaria_factions.11.a

		#A general is removed
		random_unit_leader = {
			limit = {
				has_unit_leader_flag = BUL_zveno_conspirator_flag
			}
			retire = yes
		}
		custom_effect_tooltip = BUL_exposed_zveno_conspirator_tt
	}

	option = { #Do nothing
		name = bftb_bulgaria_factions.11.b

		hidden_effect = {
			#A general is removed
			random_unit_leader = {
				limit = {
					has_unit_leader_flag = BUL_zveno_conspirator_flag
				}
				clr_unit_leader_flag = BUL_zveno_conspirator_flag
			}
		}
	}
}

#Dissident Event ZVENO - Impending coup
country_event = {
	id = bftb_bulgaria_factions.12
	title = bftb_bulgaria_factions.12.t
	desc = bftb_bulgaria_factions.12.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	trigger = {
		original_tag = BUL
		NOT = {	has_country_flag = BUL_zveno_destroyed_flag }
		NOT = {	has_country_flag = BUL_zveno_legalized_flag } 
		OR = {						
			NOT = { has_country_flag = BUL_zveno_repressed_flag }							#Zveno members have not been repressed recently
			has_country_flag = { flag = BUL_zveno_repressed_flag days > 365 }
		}
		NOT = { has_active_mission = BUL_impending_zveno_coup }								#Zveno coup mission is not ongoing
		NOT = { has_country_flag = BUL_zveno_coup_flag }									#Zveno CW has not started
		check_variable = { BUL_zveno_popularity = 5 compare = greater_than_or_equals }		#Zveno has some popularity
		check_variable = { BUL_zveno_loyalty = 50 compare = less_than_or_equals }			#Zveno has low loyalty
		OR = {
			NOT = { has_country_flag = BUL_fatherland_front_formed_flag }					#Fatherland Front has not formed or has being defeated
			has_country_flag = BUL_ff_destroyed_flag
		}
	}

	immediate = {
		hidden_effect = {
			set_country_flag = BUL_impending_zveno_coup_flag
		}
	}
	
	option = {
		name = bftb_bulgaria_factions.12.a

		effect_tooltip = {
			activate_mission = BUL_impending_zveno_coup
		}
	}		
}

#Dissident Event BS - Workers Strike
country_event = {
	id = bftb_bulgaria_factions.20
	title = bftb_bulgaria_factions.20.t
	desc = bftb_bulgaria_factions.20.desc
	picture = GFX_report_event_generic_strike 

	is_triggered_only = yes

	trigger = {
		original_tag = BUL
		NOT = {	has_country_flag = BUL_bs_destroyed_flag }
		NOT = { has_country_flag = BUL_bs_legalized_flag }
		check_variable = { BUL_bs_popularity = 5 compare = greater_than_or_equals }
		check_variable = { BUL_bs_loyalty = 50 compare = less_than_or_equals }
		OR = {
			NOT = { has_country_flag = BUL_bs_dissident_event_flag }
			has_country_flag = { flag = BUL_bs_dissident_event_flag days > 365 }
		}
		OR = {						
			NOT = { has_country_flag = BUL_bs_repressed_flag }							#BS members have not been repressed recently
			has_country_flag = { flag = BUL_bs_repressed_flag days > 720 }
		}
	}

	immediate = {
		set_country_flag = BUL_bs_dissident_event_flag
		set_country_flag = BUL_bs_dissident_event_not_addressed_flag
	}
	
	option = { #Do not employ violence
		name = bftb_bulgaria_factions.20.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}

		BUL_bs_medium_popularity_increase_effect = yes
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
		add_timed_idea = { idea = BUL_worker_strikes days = 120 }

		if = {
			limit = {
				NOT = { has_decision = BUL_opression_repress_bs }
			}
			unlock_decision_tooltip = BUL_opression_repress_bs
		}
	}
	option = { #Employ violence
		name = bftb_bulgaria_factions.20.b

		BUL_bs_low_popularity_increase_effect = yes
		add_stability = -0.05
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
		add_timed_idea = { idea = BUL_worker_strikes days = 15 }

		custom_effect_tooltip = BUL_bs_strikes_no_violence_tt

		country_event = { id = bftb_bulgaria_factions.21 hours = 8 random_hours = 4 }

		hidden_effect = {
			random_list = {
				20 = {
					random_owned_state = {
						limit = {
							industrial_complex > 0
						}
						set_state_flag = { flag = BUL_damaged_civ_factory_flag value = 1 }
						ROOT = { set_variable = { BUL_damaged_civs_state = PREV } }
					}
				}
				20 = {
					random_owned_state = {
						limit = {
							industrial_complex > 1
						}
						set_state_flag = { flag = BUL_damaged_civ_factory_flag value = 2 }
						ROOT = { set_variable = { BUL_damaged_civs_state = PREV } }
					}
				}
				20 = {
					random_owned_state = {
						limit = {
							industrial_complex > 2
						}
						set_state_flag = { flag = BUL_damaged_civ_factory_flag value = 3 }
						ROOT = { set_variable = { BUL_damaged_civs_state = PREV } }
					}
				}
			}
			if = {
				limit = {
					communism > 0.3
				}
				if = {
					limit = {
						any_owned_state = {
							arms_factory > 1
						}
					}
					random_owned_state = {
						limit = {
							arms_factory > 1
						}
						set_state_flag = { flag = BUL_damaged_military_factory_flag value = 2 }
						ROOT = { set_variable = { BUL_damaged_mils_state = PREV } }
					}
				}
				else = {
					random_owned_state = {
						limit = {
							arms_factory > 0
						}
						set_state_flag = { flag = BUL_damaged_military_factory_flag value = 1 }
						ROOT = { set_variable = { BUL_damaged_mils_state = PREV } }
					}
				}
			}
			if = {
				limit = {
					check_variable = { BUL_bs_popularity = 50 compare = greater_than_or_equals }
				}
				random_owned_state = {
					limit = {
						OR = {
							has_state_flag = BUL_damaged_civ_factory_flag
							has_state_flag = BUL_damaged_military_factory_flag
						}
					}
					set_state_flag = BUL_damaged_infrastructre_flag
					ROOT = { set_variable = { BUL_damaged_infrastructure_state = PREV } }
				}
			}
		}
		
		if = {
			limit = {
				NOT = { has_decision = BUL_opression_repress_bs }
			}
			unlock_decision_tooltip = BUL_opression_repress_bs
		}
	}
}

#Dissident Event BS - Workers Strikes Outcome
country_event = {
	id = bftb_bulgaria_factions.21
	title = bftb_bulgaria_factions.21.t
	desc = bftb_bulgaria_factions.21.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			random_owned_state = {
				limit = {
					has_state_flag = BUL_damaged_civ_factory_flag
				}
				if = {
					limit = {
						has_state_flag = { flag = BUL_damaged_civ_factory_flag value = 1 }
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
				}
				else_if = {
					limit = {
						has_state_flag = { flag = BUL_damaged_civ_factory_flag value = 2 }
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
				}
				else = {
					damage_building = {
						type = industrial_complex
						damage = 1
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
				}
			}
			
			if = {
				limit = {
					any_owned_state = {
						has_state_flag = { flag = BUL_damaged_military_factory_flag value = 1 }
					}
				}
				random_owned_state = {
					limit = {
						has_state_flag = BUL_damaged_military_factory_flag
					}
					damage_building = {
						type = arms_factory
						damage = 1
					}
				}
			}
			else_if = {
				limit = {
					any_owned_state = {
						has_state_flag = { flag = BUL_damaged_military_factory_flag value = 2 }
					}
				}
				random_owned_state = {
					limit = {
						has_state_flag = BUL_damaged_military_factory_flag
					}
					damage_building = {
						type = arms_factory
						damage = 0.75
					}
					damage_building = {
						type = arms_factory
						damage = 0.5
					}
				}
			}
			if = {
				limit = {
					any_owned_state = {
						has_state_flag = BUL_damaged_infrastructre_flag
					}
				}
				random_owned_state = {
					limit = {
						has_state_flag = BUL_damaged_infrastructre_flag
					}
					damage_building = {
						type = infrastructure
						damage = 2
					}
				}
			}
		}
	}

	option = {
		name = bftb_bulgaria_factions.21.a

		effect_tooltip = {
			random_owned_state = {
				limit = {
					has_state_flag = BUL_damaged_civ_factory_flag
				}
				if = {
					limit = {
						has_state_flag = { flag = BUL_damaged_civ_factory_flag value = 1 }
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
				}
				else_if = {
					limit = {
						has_state_flag = { flag = BUL_damaged_civ_factory_flag value = 2 }
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
				}
				else = {
					damage_building = {
						type = industrial_complex
						damage = 1
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
					damage_building = {
						type = industrial_complex
						damage = 1
					}
				}
			}
			
			if = {
				limit = {
					any_owned_state = {
						has_state_flag = { flag = BUL_military_factory_damaged_flag value = 1 }
					}
				}
				random_owned_state = {
					limit = {
						has_state_flag = BUL_military_factory_damaged_flag
					}
					damage_building = {
						type = arms_factory
						damage = 1
					}
				}
			}
			else_if = {
				limit = {
					any_owned_state = {
						has_state_flag = { flag = BUL_military_factory_damaged_flag value = 2 }
					}
				}
				random_owned_state = {
					limit = {
						has_state_flag = BUL_military_factory_damaged_flag
					}
					damage_building = {
						type = arms_factory
						damage = 0.75
					}
					damage_building = {
						type = arms_factory
						damage = 0.5
					}
				}
			}
			if = {
				limit = {
					any_owned_state = {
						has_state_flag = BUL_damaged_infrastructre_flag
					}
				}
				random_owned_state = {
					limit = {
						has_state_flag = BUL_damaged_infrastructre_flag
					}
					damage_building = {
						type = infrastructure
						damage = 2
					}
				}
			}
		}
	}
}

#Dissident Event BZNS - Agrarian Support Rising in the Countryside
country_event = {
	id = bftb_bulgaria_factions.30
	title = bftb_bulgaria_factions.30.t
	desc = bftb_bulgaria_factions.30.desc
	picture = GFX_report_event_bul_making_bricks_for_school

	is_triggered_only = yes

	trigger = {
		original_tag = BUL
		NOT = {	has_country_flag = BUL_bzns_destroyed_flag }
		NOT = { has_country_flag = BUL_bzns_legalized_flag }
		check_variable = { BUL_bzns_popularity = 5 compare = greater_than_or_equals }
		check_variable = { BUL_bzns_loyalty = 50 compare = less_than_or_equals }
		OR = {
			NOT = { has_country_flag = BUL_bzns_dissident_event_flag }
			has_country_flag = { flag = BUL_bzns_dissident_event_flag days > 365 }
		}
		OR = {						
			NOT = { has_country_flag = BUL_bzns_repressed_flag }							#BZNS members have not been repressed recently
			has_country_flag = { flag = BUL_bzns_repressed_flag days > 720 }
		}
	}
	
	immediate = {
		hidden_effect = {
			if = {
				limit = { has_country_flag = BUL_bzns_dissident_event_flag }
				clr_country_flag = BUL_bzns_dissident_event_flag
			}
			set_country_flag = BUL_bzns_dissident_event_flag
			set_country_flag = BUL_bzns_dissident_event_not_addressed_flag
		}
	}

	option = {
		name = bftb_bulgaria_factions.30.a

		add_stability = -0.05
		add_war_support = -0.1
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}

		if = {
			limit = {
				NOT = { has_decision = BUL_opression_repress_bzns }
			}
			unlock_decision_tooltip = BUL_opression_repress_bzns
		}
	}
}

#Flavor Event BZNS - Agrarian Support splits!
country_event = {
	id = bftb_bulgaria_factions.31
	title = bftb_bulgaria_factions.31.t
	desc = bftb_bulgaria_factions.31.desc
	picture = GFX_report_event_generic_rally2 

	trigger = {
		has_dlc = "Battle for the Bosporus"
		original_tag = BUL
		date > 1938.1.1
		NOT = {	has_country_flag = BUL_bzns_destroyed_flag }
		NOT = { has_country_flag = BUL_bzns_integrated_flag }
		OR = {
			check_variable = { BUL_bzns_popularity = 30 compare = less_than_or_equals }
			check_variable = { BUL_bzns_popularity = 70 compare = greater_than_or_equals }
		}
	}

	mean_time_to_happen = {
		days = 365
		modifier = {
			factor = 0.75
			check_variable = { BUL_bzns_loyalty = 15 compare = less_than_or_equals }
		}
	}

	fire_only_once = yes
	
	option = {
		name = bftb_bulgaria_factions.31.a

		BUL_bzns_high_popularity_decrease_effect = yes
		BUL_bzns_low_loyalty_increase_effect = yes
		add_political_power = 50
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
	}
}

#Dissident Event NSM - March on Turnovo (March on "X" afterwards)
country_event = {
	id = bftb_bulgaria_factions.40
	title = bftb_bulgaria_factions.40.t
	desc = bftb_bulgaria_factions.40.desc
	picture = GFX_report_event_fascists_posing 

	is_triggered_only = yes

	trigger = {
		original_tag = BUL
		NOT = {	has_country_flag = BUL_nsm_destroyed_flag }
		NOT = { has_country_flag = BUL_nsm_legalized_flag }
		check_variable = { BUL_nsm_popularity = 5 compare = greater_than_or_equals }
		check_variable = { BUL_nsm_loyalty = 50 compare = less_than_or_equals }
		OR = {
			NOT = { has_country_flag = BUL_nsm_dissident_event_flag }
			has_country_flag = { flag = BUL_nsm_dissident_event_flag days > 365 }
		}
		OR = {						
			NOT = { has_country_flag = BUL_nsm_repressed_flag }							#NSM members have not been repressed recently
			has_country_flag = { flag = BUL_nsm_repressed_flag days > 720 }
		}
	}

	immediate = {
		hidden_effect = {
			if = {
				limit = { has_country_flag = BUL_nsm_dissident_event_flag }
				clr_country_flag = BUL_nsm_dissident_event_flag
			}
			set_country_flag = BUL_nsm_dissident_event_flag
			set_country_flag = BUL_nsm_dissident_event_not_addressed_flag
		}
	}
	
	option = { #Allow them
		name = bftb_bulgaria_factions.40.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
		}

		BUL_nsm_high_popularity_increase_effect = yes
		add_war_support = 0.05
		add_popularity = {
			ideology = fascism
			popularity = 0.1
		}

		if = {
			limit = {
				NOT = { has_decision = BUL_opression_repress_nsm }
			}
			unlock_decision_tooltip = BUL_opression_repress_nsm
		}
		hidden_effect = {#Randomize next location
			BUL_get_random_bulgarian_destination_march = yes
		}
	}

	option = { #Repress demonstrators
		name = bftb_bulgaria_factions.40.b

		BUL_nsm_low_loyalty_decrease_effect = yes
		BUL_nsm_low_popularity_decrease_effect = yes
		add_stability = -0.05
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}

		if = {
			limit = {
				NOT = { has_decision = BUL_opression_repress_nsm }
			}
			unlock_decision_tooltip = BUL_opression_repress_nsm
		}
		hidden_effect = {#Randomize next location
			BUL_get_random_bulgarian_destination_march = yes
		}
	}
}

# Zveno Repression - Success
country_event = {
	id = bftb_bulgaria_factions.50
	title = bftb_bulgaria_factions.50.t
	desc = bftb_bulgaria_factions.50.desc
	picture = GFX_report_event_gathering_protest 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.50.a

		BUL_zveno_low_loyalty_decrease_effect = yes
		BUL_zveno_low_popularity_decrease_effect = yes

		add_stability = -0.05

		#Add days to Zveno Coup timer if active
		if = {
			limit = {
				has_active_mission = BUL_impending_zveno_coup
			}
			add_days_mission_timeout = {
				mission = BUL_impending_zveno_coup
				days = BUL_zveno_coup_timer_delay_high
			}
		}
	}
}

# Zveno Repression - Extra Success
country_event = {
	id = bftb_bulgaria_factions.51
	title = bftb_bulgaria_factions.51.t
	desc = bftb_bulgaria_factions.51.desc
	picture = GFX_report_event_gathering_protest  

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.51.a

		BUL_zveno_low_loyalty_decrease_effect = yes
		BUL_zveno_medium_popularity_decrease_effect = yes

		add_stability = -0.05
		add_political_power = 50

		#Add days to Zveno Coup timer if active
		if = {
			limit = {
				has_active_mission = BUL_impending_zveno_coup
			}
			add_days_mission_timeout = {
				mission = BUL_impending_zveno_coup
				days = BUL_zveno_coup_timer_delay_high
			}
		}
	}
}

# Zveno Repression - Failure
country_event = {
	id = bftb_bulgaria_factions.52
	title = bftb_bulgaria_factions.52.t
	desc = bftb_bulgaria_factions.52.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.52.a

		BUL_zveno_medium_loyalty_decrease_effect = yes

		add_stability = -0.1
	}
}

# Zveno Imprison Leaders - Success
country_event = {
	id = bftb_bulgaria_factions.53
	title = bftb_bulgaria_factions.53.t
	desc = bftb_bulgaria_factions.53.desc
	picture = GFX_report_event_bul_boris_military 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.53.a

		BUL_zveno_low_loyalty_decrease_effect = yes
		BUL_zveno_high_popularity_decrease_effect = yes

		add_political_power = 50

		#Add days to Zveno Coup timer if active
		if = {
			limit = {
				has_active_mission = BUL_impending_zveno_coup
			}
			add_days_mission_timeout = {
				mission = BUL_impending_zveno_coup
				days = BUL_zveno_coup_timer_delay_high
			}
		}
	}
}

# Zveno Imprison Leaders - Failure
country_event = {
	id = bftb_bulgaria_factions.54
	title = bftb_bulgaria_factions.54.t
	desc = bftb_bulgaria_factions.54.desc
	picture = GFX_report_event_bul_military_parade_vidin 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.54.a

		BUL_zveno_medium_loyalty_decrease_effect = yes
		BUL_zveno_medium_popularity_decrease_effect = yes

		#Add days to Zveno Coup timer if active
		if = {
			limit = {
				has_active_mission = BUL_impending_zveno_coup
			}
			add_days_mission_timeout = {
				mission = BUL_impending_zveno_coup
				days = BUL_zveno_coup_timer_delay_medium
			}
		}
	}
}

# Zveno Imprison Leaders - Backfired
country_event = {
	id = bftb_bulgaria_factions.55
	title = bftb_bulgaria_factions.55.t
	desc = bftb_bulgaria_factions.55.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.55.a

		BUL_zveno_low_loyalty_decrease_effect = yes
		
		add_stability = -0.1

		#Add days to Zveno Coup timer if active
		if = {
			limit = {
				has_active_mission = BUL_impending_zveno_coup
			}
			add_days_mission_timeout = {
				mission = BUL_impending_zveno_coup
				days = BUL_zveno_coup_timer_delay_low
			}
		}
	}
}

# Broad Socialists Repression - Success
country_event = {
	id = bftb_bulgaria_factions.60
	title = bftb_bulgaria_factions.60.t
	desc = bftb_bulgaria_factions.60.desc
	picture = GFX_report_event_gathering_protest 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.60.a

		BUL_bs_low_loyalty_decrease_effect = yes
		BUL_bs_low_popularity_decrease_effect = yes

		add_stability = -0.05
	}
}

# Broad Socialists Repression - Extra Success
country_event = {
	id = bftb_bulgaria_factions.61
	title = bftb_bulgaria_factions.61.t
	desc = bftb_bulgaria_factions.61.desc
	picture = GFX_report_event_gathering_protest  

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.61.a

		BUL_bs_low_loyalty_decrease_effect = yes
		BUL_bs_medium_popularity_decrease_effect = yes

		add_stability = -0.05
		add_political_power = 50
	}
}

# Broad Socialists Repression - Failure
country_event = {
	id = bftb_bulgaria_factions.62
	title = bftb_bulgaria_factions.62.t
	desc = bftb_bulgaria_factions.62.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.62.a

		BUL_bs_medium_loyalty_decrease_effect = yes

		add_stability = -0.1
	}
}

# Broad Socialists Imprison Leaders - Success
country_event = {
	id = bftb_bulgaria_factions.63
	title = bftb_bulgaria_factions.63.t
	desc = bftb_bulgaria_factions.63.desc
	picture = GFX_report_event_bul_boris_military

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.63.a

		BUL_bs_low_loyalty_decrease_effect = yes
		BUL_bs_high_popularity_decrease_effect = yes

		add_political_power = 50
	}
}

# Broad Socialists Imprison Leaders - Failure
country_event = {
	id = bftb_bulgaria_factions.64
	title = bftb_bulgaria_factions.64.t
	desc = bftb_bulgaria_factions.64.desc
	picture = GFX_report_event_bul_military_parade_vidin

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.64.a

		BUL_bs_low_loyalty_decrease_effect = yes
		BUL_bs_medium_popularity_decrease_effect = yes
	}
}

# Broad Socialists Imprison Leaders - Backfired
country_event = {
	id = bftb_bulgaria_factions.65
	title = bftb_bulgaria_factions.65.t
	desc = bftb_bulgaria_factions.65.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.65.a

		BUL_bs_low_loyalty_decrease_effect = yes

		add_stability = -0.1
	}
}

# Agrarian Union Repression - Success
country_event = {
	id = bftb_bulgaria_factions.70
	title = bftb_bulgaria_factions.70.t
	desc = bftb_bulgaria_factions.70.desc
	picture = GFX_report_event_gathering_protest 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.70.a

		BUL_bzns_low_loyalty_decrease_effect = yes
		BUL_bzns_low_popularity_decrease_effect = yes
		
		add_stability = -0.05
	}
}

# Agrarian Union Repression - Extra Success
country_event = {
	id = bftb_bulgaria_factions.71
	title = bftb_bulgaria_factions.71.t
	desc = bftb_bulgaria_factions.71.desc
	picture = GFX_report_event_gathering_protest  

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.71.a

		BUL_bzns_low_loyalty_decrease_effect = yes
		BUL_bzns_medium_popularity_decrease_effect = yes

		add_stability = -0.05
		add_political_power = 50
	}
}

# Agrarian Union Repression - Failure
country_event = {
	id = bftb_bulgaria_factions.72
	title = bftb_bulgaria_factions.72.t
	desc = bftb_bulgaria_factions.72.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.72.a

		BUL_bzns_medium_loyalty_decrease_effect = yes

		add_stability = -0.1
	}
}

# Agrarian Union Imprison Leaders - Success
country_event = {
	id = bftb_bulgaria_factions.73
	title = bftb_bulgaria_factions.73.t
	desc = bftb_bulgaria_factions.73.desc
	picture = GFX_report_event_bul_boris_military

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.73.a

		BUL_bzns_low_loyalty_decrease_effect = yes
		BUL_bzns_high_popularity_decrease_effect = yes

		add_political_power = 50
	}
}

# Agrarian Union Imprison Leaders - Failure
country_event = {
	id = bftb_bulgaria_factions.74
	title = bftb_bulgaria_factions.74.t
	desc = bftb_bulgaria_factions.74.desc
	picture = GFX_report_event_bul_military_parade_vidin

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.74.a

		BUL_bzns_low_loyalty_decrease_effect = yes
		BUL_bzns_medium_popularity_decrease_effect = yes
	}
}

# Agrarian Union Imprison Leaders - Backfired
country_event = {
	id = bftb_bulgaria_factions.75
	title = bftb_bulgaria_factions.75.t
	desc = bftb_bulgaria_factions.75.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.75.a

		BUL_bzns_low_loyalty_decrease_effect = yes

		add_stability = -0.1
	}
}

# National Social Movement Repression - Success
country_event = {
	id = bftb_bulgaria_factions.80
	title = bftb_bulgaria_factions.80.t
	desc = bftb_bulgaria_factions.80.desc
	picture = GFX_report_event_gathering_protest 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.80.a

		BUL_nsm_low_loyalty_decrease_effect = yes
		BUL_nsm_low_popularity_decrease_effect = yes

		add_stability = -0.05
	}
}

# National Social Movement Repression - Extra Success
country_event = {
	id = bftb_bulgaria_factions.81
	title = bftb_bulgaria_factions.81.t
	desc = bftb_bulgaria_factions.81.desc
	picture = GFX_report_event_gathering_protest  

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.81.a

		BUL_nsm_low_loyalty_decrease_effect = yes
		BUL_nsm_medium_popularity_decrease_effect = yes

		add_stability = -0.05
		add_political_power = 50
	}
}

# National Social Movement Repression - Failure
country_event = {
	id = bftb_bulgaria_factions.82
	title = bftb_bulgaria_factions.82.t
	desc = bftb_bulgaria_factions.82.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.82.a

		BUL_nsm_medium_loyalty_decrease_effect = yes

		add_stability = -0.1
	}
}

# National Social Movement Imprison Leaders - Success
country_event = {
	id = bftb_bulgaria_factions.83
	title = bftb_bulgaria_factions.83.t
	desc = bftb_bulgaria_factions.83.desc
	picture = GFX_report_event_bul_boris_military

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.83.a

		BUL_nsm_low_loyalty_decrease_effect = yes
		BUL_nsm_high_popularity_decrease_effect = yes

		add_political_power = 50
	}
}

# National Social Movement Imprison Leaders - Failure
country_event = {
	id = bftb_bulgaria_factions.84
	title = bftb_bulgaria_factions.84.t
	desc = bftb_bulgaria_factions.84.desc
	picture = GFX_report_event_bul_military_parade_vidin

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.84.a

		BUL_nsm_low_loyalty_decrease_effect = yes
		BUL_nsm_medium_popularity_decrease_effect = yes
	}
}

# National Social Movement Imprison Leaders - Backfired
country_event = {
	id = bftb_bulgaria_factions.85
	title = bftb_bulgaria_factions.85.t
	desc = bftb_bulgaria_factions.85.desc
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.85.a

		BUL_nsm_low_loyalty_decrease_effect = yes

		add_stability = -0.1
	}
}

# Integrated Faction - ZVENO
country_event = {
	id = bftb_bulgaria_factions.17
	title = bftb_bulgaria_factions.17.t
	desc = bftb_bulgaria_factions.17.desc
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.17.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bs_destroyed_flag }
				NOT = { has_country_flag = BUL_bs_integrated_flag }
			}
			BUL_bs_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bzns_destroyed_flag }
				NOT = { has_country_flag = BUL_bzns_integrated_flag }
			}
			BUL_bzns_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_nsm_destroyed_flag }
				NOT = { has_country_flag = BUL_nsm_integrated_flag }
			}
			BUL_nsm_medium_loyalty_decrease_effect = yes
		}
	}		
}

# Integrated Faction - BS
country_event = {
	id = bftb_bulgaria_factions.27
	title = bftb_bulgaria_factions.27.t
	desc = bftb_bulgaria_factions.27.desc
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.27.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				NOT = { has_country_flag = BUL_zveno_destroyed_flag }
				NOT = { has_country_flag = BUL_zveno_integrated_flag }
			}
			BUL_zveno_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bzns_destroyed_flag }
				NOT = { has_country_flag = BUL_bzns_integrated_flag }
			}
			BUL_bzns_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_nsm_destroyed_flag }
				NOT = { has_country_flag = BUL_nsm_integrated_flag }
			}
			BUL_nsm_medium_loyalty_decrease_effect = yes
		}
	}		
}

# Integrated Faction - BZNS
country_event = {
	id = bftb_bulgaria_factions.37
	title = bftb_bulgaria_factions.37.t
	desc = bftb_bulgaria_factions.37.desc
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.37.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				NOT = { has_country_flag = BUL_zveno_destroyed_flag }
				NOT = { has_country_flag = BUL_zveno_integrated_flag }
			}
			BUL_zveno_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bs_destroyed_flag }
				NOT = { has_country_flag = BUL_bs_integrated_flag }
			}
			BUL_bs_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_nsm_destroyed_flag }
				NOT = { has_country_flag = BUL_nsm_integrated_flag }
			}
			BUL_nsm_medium_loyalty_decrease_effect = yes
		}
	}		
}

# Integrated Faction - NSM
country_event = {
	id = bftb_bulgaria_factions.47
	title = bftb_bulgaria_factions.47.t
	desc = bftb_bulgaria_factions.47.desc
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.47.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				NOT = { has_country_flag = BUL_zveno_destroyed_flag }
				NOT = { has_country_flag = BUL_zveno_integrated_flag }
			}
			BUL_zveno_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bs_destroyed_flag }
				NOT = { has_country_flag = BUL_bs_integrated_flag }
			}
			BUL_bs_medium_loyalty_decrease_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bzns_destroyed_flag }
				NOT = { has_country_flag = BUL_bzns_integrated_flag }
			}
			BUL_bzns_medium_loyalty_decrease_effect = yes
		}
	}		
}

# Destroyed Faction - ZVENO
country_event = {
	id = bftb_bulgaria_factions.19
	title = bftb_bulgaria_factions.19.t
	desc = bftb_bulgaria_factions.19.desc
	picture = GFX_report_event_bul_military_parade_vidin 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.19.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				has_idea = BUL_zveno_ns
			}
			remove_ideas = BUL_zveno_ns
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bs_destroyed_flag }
				NOT = { has_country_flag = BUL_bs_integrated_flag }
			}
			BUL_bs_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bzns_destroyed_flag }
				NOT = { has_country_flag = BUL_bzns_integrated_flag }
			}
			BUL_bzns_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_nsm_destroyed_flag }
				NOT = { has_country_flag = BUL_nsm_integrated_flag }
			}
			BUL_nsm_low_loyalty_increase_effect = yes
		}
	}		
}

# Destroyed Faction - BS
country_event = {
	id = bftb_bulgaria_factions.29
	title = bftb_bulgaria_factions.29.t
	desc = bftb_bulgaria_factions.29.desc
	picture = GFX_report_event_bul_military_parade_vidin 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.29.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				NOT = { has_country_flag = BUL_zveno_destroyed_flag }
				NOT = { has_country_flag = BUL_zveno_integrated_flag }
			}
			BUL_zveno_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bzns_destroyed_flag }
				NOT = { has_country_flag = BUL_bzns_integrated_flag }
			}
			BUL_bzns_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_nsm_destroyed_flag }
				NOT = { has_country_flag = BUL_nsm_integrated_flag }
			}
			BUL_nsm_low_loyalty_increase_effect = yes
		}
	}		
}

# Destroyed Faction - BZNS
country_event = {
	id = bftb_bulgaria_factions.39
	title = bftb_bulgaria_factions.39.t
	desc = bftb_bulgaria_factions.39.desc
	picture = GFX_report_event_bul_military_parade_vidin 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.39.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				NOT = { has_country_flag = BUL_zveno_destroyed_flag }
				NOT = { has_country_flag = BUL_zveno_integrated_flag }
			}
			BUL_zveno_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bs_destroyed_flag }
				NOT = { has_country_flag = BUL_bs_integrated_flag }
			}
			BUL_bs_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_nsm_destroyed_flag }
				NOT = { has_country_flag = BUL_nsm_integrated_flag }
			}
			BUL_nsm_low_loyalty_increase_effect = yes
		}
	}		
}

# Destroyed Faction - NSM
country_event = {
	id = bftb_bulgaria_factions.49
	title = bftb_bulgaria_factions.49.t
	desc = bftb_bulgaria_factions.49.desc
	picture = GFX_report_event_bul_military_parade_vidin 

	is_triggered_only = yes
	
	option = {
		name = bftb_bulgaria_factions.49.a

		add_political_power = 120
		add_stability = 0.1
		if = {
			limit = {
				NOT = { has_country_flag = BUL_zveno_destroyed_flag }
				NOT = { has_country_flag = BUL_zveno_integrated_flag }
			}
			BUL_zveno_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bs_destroyed_flag }
				NOT = { has_country_flag = BUL_bs_integrated_flag }
			}
			BUL_bs_low_loyalty_increase_effect = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = BUL_bzns_destroyed_flag }
				NOT = { has_country_flag = BUL_bzns_integrated_flag }
			}
			BUL_bzns_low_loyalty_increase_effect = yes
		}
	}		
}


#### ##     ## ########   #######  
 ##  ###   ### ##     ## ##     ## 
 ##  #### #### ##     ## ##     ## 
 ##  ## ### ## ########  ##     ## 
 ##  ##     ## ##   ##   ##     ## 
 ##  ##     ## ##    ##  ##     ## 
#### ##     ## ##     ##  #######  


#The IMRO is back! - Event for YUG and GRE (or whoever occupy Macedonian states)
country_event = {
	id = bftb_bulgaria_imro.1
	title = bftb_bulgaria_imro.1.t
	desc = bftb_bulgaria_imro.1.desc
	picture = GFX_report_event_bul_troops_macedonia

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_imro.1.a

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					BUL_is_macedonian_state = yes
					is_controlled_by = ROOT
				}
				remove_core_of = controller
				start_resistance = BUL
			}
		}
		unlock_decision_tooltip = BUL_repress_imro_foreign
		unlock_decision_tooltip = BUL_destroy_imro_foreign
	}
}

#IMRO spreads Bulgarian sentiment - Event for YUG and GRE (or whoever occupy Macedonian states)
country_event = {
	id = bftb_bulgaria_imro.2
	title = bftb_bulgaria_imro.2.t
	desc = bftb_bulgaria_imro.2.desc
	picture = GFX_report_event_albanian_partisans

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgaria_imro.2.a

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					BUL_is_macedonian_state = yes
					is_controlled_by = ROOT
				}
				add_dynamic_modifier = { modifier = widespread_bulgarian_sentiment_01 }
			}
		}
	}
}


########  ######     ###    ########     ########   #######  ########  ####  ######     #### #### #### 
   ##    ##    ##   ## ##   ##     ##    ##     ## ##     ## ##     ##  ##  ##    ##     ##   ##   ##  
   ##    ##        ##   ##  ##     ##    ##     ## ##     ## ##     ##  ##  ##           ##   ##   ##  
   ##     ######  ##     ## ########     ########  ##     ## ########   ##   ######      ##   ##   ##  
   ##          ## ######### ##   ##      ##     ## ##     ## ##   ##    ##        ##     ##   ##   ##  
   ##    ##    ## ##     ## ##    ##     ##     ## ##     ## ##    ##   ##  ##    ##     ##   ##   ##  
   ##     ######  ##     ## ##     ##    ########   #######  ##     ## ####  ######     #### #### #### 


#Tsar Boris visits a town
country_event = {
	id = bftb_bulgaria_tsar_boris.1
	title = bftb_bulgaria_tsar_boris.1.t
	desc = {
		text = bftb_bulgaria_tsar_boris.1.desc_success
		trigger = {
			NOT = { has_country_flag = BUL_a_royal_visit_extra_success_flag }
			NOT = { has_country_flag = BUL_a_royal_visit_failure_flag }
		}
	}
	desc = {
		text = bftb_bulgaria_tsar_boris.1.desc_extra_success
		trigger = {
			has_country_flag = BUL_a_royal_visit_extra_success_flag
		}
	}
	desc = {
		text = bftb_bulgaria_tsar_boris.1.desc_failure
		trigger = {
			has_country_flag = BUL_a_royal_visit_failure_flag
		}
	}

	picture = GFX_report_event_bul_boris_tour

	is_triggered_only = yes

	option = { #Normal
		name = bftb_bulgaria_tsar_boris.1.a

		trigger = { 
			NOT = { has_country_flag = BUL_a_royal_visit_extra_success_flag }
			NOT = { has_country_flag = BUL_a_royal_visit_failure_flag }
		}

		add_stability = 0.05
		add_popularity = {
			ideology = neutrality
			popularity = 0.05
		}
		
		if = {
			limit = {
				OR = {
					has_completed_focus = BUL_the_fate_of_the_balkans
					has_completed_focus = BUL_armed_neutrality
					has_completed_focus = BUL_join_the_tripartite_pact
				}
			}
			add_war_support = 0.02
			add_manpower = 200
		}
		
		hidden_effect = { #Randomize next location
			BUL_get_random_bulgarian_destination_royal_visit = yes
		}
	}

	option = { #Extra success
		name = bftb_bulgaria_tsar_boris.1.b

		trigger = {
			has_country_flag = BUL_a_royal_visit_extra_success_flag
		}

		add_stability = 0.1
		add_popularity = {
			ideology = neutrality
			popularity = 0.1
		}
		
		if = {
			limit = {
				OR = {
					has_completed_focus = BUL_the_fate_of_the_balkans
					has_completed_focus = BUL_armed_neutrality
					has_completed_focus = BUL_join_the_tripartite_pact
				}
			}
			add_war_support = 0.05
			add_manpower = 500
		}
		
		clr_country_flag = BUL_a_royal_visit_extra_success_flag
		hidden_effect = { #Randomize next location
			BUL_get_random_bulgarian_destination_royal_visit = yes
		}
	}
	option = { #Failure
		name = bftb_bulgaria_tsar_boris.1.c
		
		trigger = {
			has_country_flag = BUL_a_royal_visit_failure_flag
		}

		add_stability = -0.05
		add_popularity = {
			ideology = neutrality
			popularity = -0.05
		}
		
		if = {
			limit = {
				OR = {
					has_completed_focus = BUL_the_fate_of_the_balkans
					has_completed_focus = BUL_armed_neutrality
					has_completed_focus = BUL_join_the_tripartite_pact
				}
			}
			add_war_support = -0.03
		}
		
		clr_country_flag = BUL_a_royal_visit_failure_flag
		hidden_effect = { #Randomize next location
			BUL_get_random_bulgarian_destination_royal_visit = yes
		}
	}
}

#Tsar Boris has died. Form a temporary government
country_event = {
	id = bftb_bulgaria_tsar_boris.2
	title = bftb_bulgaria_tsar_boris.2.t
	desc = bftb_bulgaria_tsar_boris.2.desc
	picture = GFX_report_event_bul_boris_death

	is_triggered_only = yes

	fire_only_once = yes

	trigger = {
		NOT = { has_country_flag = BUL_tsar_boris_is_dead_flag }
	}

	immediate = {
		hidden_effect = {
			set_variable = { BUL_date_of_tsars_death = global.date }
			set_country_flag = BUL_tsar_boris_is_dead_flag
			unlock_national_focus = BUL_plot_against_boris
		}
	}

	option = {
		name = bftb_bulgaria_tsar_boris.2.a

		trigger = { 
		}

		if = {
			limit = {
				has_country_flag = BUL_foreign_support_for_regicide_flag
			}
			add_stability = -0.05
		}
		else = {
			add_stability = -0.15
		}

		if = {
			limit = {
				has_idea = BUL_tsar_boris_positive_01
			}
			remove_ideas = BUL_tsar_boris_positive_01
		}
		else_if = {
			limit = {
				has_idea = BUL_tsar_boris_positive_02
			}
			remove_ideas = BUL_tsar_boris_positive_02
		}
		else_if = {
			limit = {
				has_idea = BUL_tsar_boris_positive_03
			}
			remove_ideas = BUL_tsar_boris_positive_03
		}
		else_if = {
			limit = {
				has_idea = BUL_tsar_boris_negative_01
			}
			remove_ideas = BUL_tsar_boris_negative_01
		}
		else_if = {
			limit = {
				has_idea = BUL_tsar_boris_negative_02
			}
			remove_ideas = BUL_tsar_boris_negative_02
		}
		
		effect_tooltip = {
			unlock_national_focus = BUL_plot_against_boris
		}

		if = {
			limit = {
				has_government = neutrality
			}
			kill_country_leader = yes
		}
		if = {
			limit = { has_idea = BUL_georgi_ivanov_kyoseivanov }
			BUL_georgi_ivanov_kyoseivanov = {
				promote_character = { ideology = moderatism }
				add_country_leader_trait = no_designated_regency
			}		
		}
		else = {
			BUL_bogdan_filov = {
				promote_character = { ideology = centrism }
				add_country_leader_trait = no_designated_regency
			}		
		}

		hidden_effect = {
			every_other_country = {
				news_event = { id = bftb_news.3 hours = 4 }
			}
		}
	}
}

#Form a Regency Council
country_event = {
	id = bftb_bulgaria_tsar_boris.3
	title = bftb_bulgaria_tsar_boris.3.t
	desc = bftb_bulgaria_tsar_boris.3.desc
	picture = GFX_report_event_bul_prince_simeon 

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Pro-Fascist Regency Council
		name = bftb_bulgaria_tsar_boris.3.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 5
				is_in_faction_with = GER
				GER = { has_government = fascism }
			}
		}

		trigger = {
			OR = {
				has_government = fascism
				AND = {
					has_government = neutrality
					OR = {
						is_in_faction = no
						AND = {
							any_allied_country = {
								is_major = yes
								has_government = fascism
							}
						}
						AND = {
							is_faction_leader = yes
							NOT = {
								any_allied_country = {
									is_major = yes
									OR = {
										has_government = democratic
										has_government = communism
									}
								}
							}
						}
					}
				}	
			}
		}

		add_popularity = {
			ideology = fascism
			popularity = 0.1
		}

		if = {
			limit = {
				has_government = fascism
			}
			if = {
				limit = {
					has_country_leader = {
						character = BUL_hristo_lukov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = fascism_ideology
						traits = {
							elected_regency_council_pro_axis hardened_officer_regency_council
						}
					}
					promote_leader = yes
				}
			}
			else_if = {
				limit = {
					has_country_leader = {
						character = BUL_aleksandar_tsankov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = gen_nazism
						traits = {
							elected_regency_council_pro_axis the_bloody_professor_regency_council
						}
					}
					promote_leader = yes
				}
			}
			else = {
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = fascism_ideology
						traits = {
							elected_regency_council_pro_axis
						}
					}
					promote_leader = yes
				}
			}
		}
		else = {
			if = {
				limit = {
					has_country_leader = {
						character = BUL_bogdan_filov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = fascism_ideology
						traits = {
							elected_regency_council_pro_axis political_manipulator_regency_council
						}
					}
					promote_leader = yes
				}
				promote_character = { 
					character = BUL_georgi_ivanov_kyoseivanov
					ideology = moderatism
				}	
			}
			else_if = {
				limit = {
					has_country_leader = {
						character = BUL_georgi_ivanov_kyoseivanov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = fascism_ideology
						traits = {
							elected_regency_council_pro_axis
						}
					}
					promote_leader = yes
				}
				promote_character = { 
					character =  BUL_bogdan_filov
					ideology = centrism
				}	
			}
			else = {
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = fascism_ideology
						traits = {
							elected_regency_council_pro_axis
						}
					}
					promote_leader = yes
				}
			}
		}
		if = {
			limit = {
				NOT = { has_government = fascism }
			}
			set_politics = {
				ruling_party = fascism
				election_frequency = 48
				elections_allowed = no
			}
		}
	}

	option = { #Pro-Democratic Regency Council
		name = bftb_bulgaria_tsar_boris.3.b

		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 0
				is_in_faction_with = GER
				GER = { has_government = fascism }
			}
		}

		trigger = { 
			OR = {
				has_government = democratic
				AND = {
					has_government = neutrality
					OR = {
						is_in_faction = no
						AND = {
							any_allied_country = {
								is_major = yes
								has_government = democratic
							}
						}
						AND = {
							is_faction_leader = yes
							NOT = {
								any_allied_country = {
									is_major = yes
									has_government = fascism
								}
							}
						}
					}
				}	
			}
		}

		add_popularity = {
			ideology = democratic
			popularity = 0.1
		}

		if = {
			limit = {
				has_government = democratic
			}
			if = {
				limit = {
					has_country_leader = {
						character = BUL_nikola_mushanov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = conservatism
						traits = {
							elected_regency_council_pro_allies appeaser_regency_council
						}
					}
					promote_leader = yes
				}
			}
			else = {
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = conservatism
						traits = {
							elected_regency_council_pro_allies
						}
					}
					promote_leader = yes
				}
			}	
		}
		else = {
			if = {
				limit = {
					has_country_leader = {
						character = BUL_bogdan_filov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = conservatism
						traits = {
							elected_regency_council_pro_allies political_manipulator_regency_council
						}
					}
					promote_leader = yes
				}
				promote_character = { 
					character = BUL_georgi_ivanov_kyoseivanov
					ideology = moderatism
				}	
			}
			else_if = {
				limit = {
					has_country_leader = {
						character = BUL_georgi_ivanov_kyoseivanov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = conservatism
						traits = {
							elected_regency_council_pro_allies
						}
					}
					promote_leader = yes
				}
				promote_character = { 
					character = BUL_bogdan_filov
					ideology = centrism
				}	
			}
			else = {
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = conservatism
						traits = {
							elected_regency_council_pro_allies
						}
					}
					promote_leader = yes
				}
			}
		}
		if = {
			limit = {
				NOT = { has_government = democratic }
			}
			set_politics = {
				ruling_party = democratic
				election_frequency = 48
				elections_allowed = no
			}
		}
	}

	option = { #Independent Regency Council
		name = bftb_bulgaria_tsar_boris.3.c

		ai_chance = {
			base = 1
			modifier = {
				factor = 0.9
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 0
				is_in_faction_with = GER
				GER = { has_government = fascism }
			}
		}

		add_popularity = {
			ideology = neutrality
			popularity = 0.1
		}

		if = {
			limit = {
				has_government = fascism
			}
			if = {
				limit = {
					has_country_leader = {
						character = BUL_hristo_lukov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = despotism
						traits = {
							elected_regency_council hardened_officer_regency_council
						}
					}
					promote_leader = yes
				}
				hidden_effect = {
					retire_ideology_leader = fascism
				}
			}
			else_if = {
				limit = {
					has_country_leader = {
						character = BUL_aleksandar_tsankov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = despotism
						traits = {
							elected_regency_council the_bloody_professor_regency_council
						}
					}
					promote_leader = yes
				}
				hidden_effect = {
					retire_ideology_leader = fascism
				}
			}
			else = {
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = despotism
						traits = {
							elected_regency_council
						}
					}
					promote_leader = yes
				}
			}
		}
		else_if = {
			limit = {
				has_government = democratic
			}
			if = {
				limit = {
					has_country_leader = {
						character = BUL_nikola_mushanov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = centrism
						traits = {
							elected_regency_council appeaser_regency_council
						}
					}
					promote_leader = yes
				}
				hidden_effect = {
					retire_ideology_leader = democratic
				}
			}
			else = {
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = centrism
						traits = {
							elected_regency_council
						}
					}
					promote_leader = yes
				}
			}	
		}
		else = {
			if = {
				limit = {
					has_country_leader = {
						character = BUL_bogdan_filov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = centrism
						traits = {
							elected_regency_council political_manipulator_regency_council
						}
					}
					promote_leader = yes
				}
			}
			else_if = {
				limit = {
					has_country_leader = {
						character = BUL_georgi_ivanov_kyoseivanov
						ruling_only = yes
					}
				}
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = moderatism
						traits = {
							elected_regency_council
						}
					}
					promote_leader = yes
				}
			}
			else = {
				add_country_leader_role = {
					character = BUL_regency_council
					country_leader = {
						expire = "1965.1.1"
						ideology = moderatism
						traits = {
							elected_regency_council
						}
					}
					promote_leader = yes
				}
			}
		}
		if = {
			limit = {
				NOT = { has_government = neutrality }
			}
			set_politics = {
				ruling_party = neutrality
				election_frequency = 48
				elections_allowed = no
			}
		}
	}
}


########    ###    ######## ##     ## ######## ########  ##          ###    ##    ## ########     ######## ########   #######  ##    ## ######## 
##         ## ##      ##    ##     ## ##       ##     ## ##         ## ##   ###   ## ##     ##    ##       ##     ## ##     ## ###   ##    ##    
##        ##   ##     ##    ##     ## ##       ##     ## ##        ##   ##  ####  ## ##     ##    ##       ##     ## ##     ## ####  ##    ##    
######   ##     ##    ##    ######### ######   ########  ##       ##     ## ## ## ## ##     ##    ######   ########  ##     ## ## ## ##    ##    
##       #########    ##    ##     ## ##       ##   ##   ##       ######### ##  #### ##     ##    ##       ##   ##   ##     ## ##  ####    ##    
##       ##     ##    ##    ##     ## ##       ##    ##  ##       ##     ## ##   ### ##     ##    ##       ##    ##  ##     ## ##   ###    ##    
##       ##     ##    ##    ##     ## ######## ##     ## ######## ##     ## ##    ## ########     ##       ##     ##  #######  ##    ##    ##    


#The Fatherland Front has formed
country_event = {
	id = bftb_bulgaria_fatherland_front.1
	title = bftb_bulgaria_fatherland_front.1.t

	# Desc when formed by the player
	desc = {
		text = bftb_bulgaria_fatherland_front.1.desc_positive
		trigger = {
			has_completed_focus = BUL_the_fatherland_front
		}
	}

	# Desc when NOT formed by the player
	desc = {
		text = bftb_bulgaria_fatherland_front.1.desc_negative
		trigger = {
			NOT = { has_completed_focus = BUL_the_fatherland_front }
		}
	}

	picture = GFX_report_event_bul_partisans_plovdiv

	is_triggered_only = yes #on_weekly_BUL handles this

	fire_only_once = yes

	immediate = {
		hidden_effect = {
			if = {
				limit = { 
					NOT = { has_completed_focus = BUL_the_fatherland_front }
				}
				add_popularity = {
					ideology = communism
					popularity = 0.2
				}
				set_country_flag = BUL_fatherland_front_formed_flag
			}
		}
	}

	option = { #When formed by the player
		name = bftb_bulgaria_fatherland_front.1.a

		trigger = {
			has_completed_focus = BUL_the_fatherland_front
		}
		add_political_power = 70
		add_ideas = BUL_fatherland_front_positive
	}

	option = { #When NOT formed by the player
		name = bftb_bulgaria_fatherland_front.1.b

		trigger = {
			NOT = { has_completed_focus = BUL_the_fatherland_front }
		}
		effect_tooltip = {
			add_popularity = {
				ideology = communism
				popularity = 0.2
			}
		}
		set_party_name = {
			ideology = communism
			long_name = BUL_fatherland_front_party_long
			name = BUL_fatherland_front_party
		}
		add_ideas = BUL_fatherland_front_negative
		activate_mission_tooltip = BUL_ff_impending_coup_mission
		random_unit_leader = {
			limit = {
				has_id = 1203 #Hadzhipetkov
			}
			add_unit_leader_trait = trait_BUL_ff_sympathizer
		}

		random_list = {
			50 = {
				random_unit_leader = {
					limit = {
						has_id = 1202 #Popov
					}
					add_unit_leader_trait = trait_BUL_ff_sympathizer
				}
			}
			50 = {
				random_unit_leader = {
					limit = {
						has_id = 1211 #Dotsev
					}
					add_unit_leader_trait = trait_BUL_ff_sympathizer
				}
			}
		}
	}
}

#The Fatherland Front coup
country_event = {
	id = bftb_bulgaria_fatherland_front.2
	title = bftb_bulgaria_fatherland_front.2.t
	desc = bftb_bulgaria_fatherland_front.2.desc
	picture = GFX_report_event_bul_troops_partisans_boat

	is_triggered_only = yes #on_weekly_BUL handles this

	fire_only_once = yes

	immediate = {
		hidden_effect = {
			set_global_flag = BUL_fatherland_front_coup_flag
			set_country_flag = BUL_ff_civil_war_flag
			BUL_start_ff_civil_war = yes
		}
	}

	option = {
		name = bftb_bulgaria_fatherland_front.2.a

		effect_tooltip = {
			start_civil_war = {
				ideology = communism
			}
		}
	}
}


########  ########    ###    ########  ##     ##    ###    ##     ## ######## ##    ## ######## 
##     ## ##         ## ##   ##     ## ###   ###   ## ##   ###   ### ##       ###   ##    ##    
##     ## ##        ##   ##  ##     ## #### ####  ##   ##  #### #### ##       ####  ##    ##    
########  ######   ##     ## ########  ## ### ## ##     ## ## ### ## ######   ## ## ##    ##    
##   ##   ##       ######### ##   ##   ##     ## ######### ##     ## ##       ##  ####    ##    
##    ##  ##       ##     ## ##    ##  ##     ## ##     ## ##     ## ##       ##   ###    ##    
##     ## ######## ##     ## ##     ## ##     ## ##     ## ##     ## ######## ##    ##    ##    


#Negotiate Bulgarian Rearmament - Event for ENG
country_event = {
	id = bftb_bulgaria_rearmament.1
	title = bftb_bulgaria_rearmament.1.t
	desc = bftb_bulgaria_rearmament.1.desc
	picture = GFX_report_event_generic_sign_treaty1 

	is_triggered_only = yes

	immediate = {

	}
	
	option = { #Refuse
		name = bftb_bulgaria_rearmament.1.a

		#ai_chance = {
		#	base = 1
		#	modifier = {
		#		factor = 100
		#		has_opinion = {
		#			target = BUL
		#			value < 0
		#		}
		#	}
		#	modifier = {
		#		factor = 100
		#		BUL = {
		#			is_in_faction_with = GER
		#		}
		#		NOT = {
		#			GER = {
		#				is_in_faction_with = ROOT
		#			}
		#		}
		#	}
		#	modifier = { #Support IMRO is not cool bro
		#		factor = 10
		#		BUL = { has_completed_focus = BUL_support_macedonian_organizations }
		#	}
		#	modifier = { #Your coop with IMRO is just too much
		#		factor = 10
		#		BUL = { has_idea = BUL_imro_05 }
		#	}
		#	modifier = {
		#		factor = 5
		#		BUL_has_some_sort_of_bogdan_filov = yes
		#	}
		#}

		BUL = { country_event = { id = bftb_bulgaria_rearmament.2 hours = 16 random_hours = 8 } }
		custom_effect_tooltip = bftb_bulgaria_rearmament.1_refuse_tt
	}

	option = { #Demands NAP with (at least) one balkan nation
		name = bftb_bulgaria_rearmament.1.b

		#ai_chance = {
		#	base = 5
		#	modifier = {
		#		factor = 5
		#		is_historical_focus_on = yes
		#	}
		#	modifier = {
		#		factor = 2
		#		BUL_has_some_sort_of_bogdan_filov = yes
		#	}
		#}

		BUL = { country_event = { id = bftb_bulgaria_rearmament.3 hours = 16 random_hours = 8 } }
		custom_effect_tooltip = bftb_bulgaria_rearmament.1_refuse_tt
	}

	option = { #Accept
		name = bftb_bulgaria_rearmament.1.c

		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				has_opinion = {
					target = BUL
					value > 75
				}
			}
			modifier = {
				factor = 100
				BUL = {
					OR = {
						AND = {
							has_war_with = GER
							NOT = { GER = { is_in_faction_with = ROOT } }
						}
						is_in_faction_with = ROOT
					}
				}
			}
			modifier = { #We like that you condemn IMRO
				factor = 10
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 10
				BUL = {
					NOT = {
						has_idea = BUL_imro_01
						has_idea = BUL_imro_04
						has_idea = BUL_imro_05
					}
				}
			}
			modifier = { #You have good relations with your neighbors, we like that
				factor = 1.5
				BUL = {
					OR = {
						has_completed_focus = BUL_treaty_of_perpetual_friendship
						has_completed_focus = BUL_the_salonika_agreement
					}
				}
			}
			modifier = { #You approached us, we like that
				factor = 1.5
				BUL = {	has_completed_focus = BUL_approach_the_united_kingdom }
			}
			modifier = { #You are becoming yet another capitalist country, we like that
				factor = 1.5
				has_government = democratic
				BUL = {	has_completed_focus = BUL_democratic_principles }
			}
			modifier = { #You think like us, we like that
				factor = 5
				BUL = {	has_government = ROOT }
			}
		}

		BUL = { country_event = { id = bftb_bulgaria_rearmament.6 hours = 16 random_hours = 8 } }
		effect_tooltip = { 
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				BUL = { remove_ideas = BUL_army_restrictions_aat }
			}
			else = {
				BUL = { remove_ideas = BUL_army_restrictions }
			}
		}
	}
}

#Negotiate Bulgarian Rearmament - ENG refuses (Event for BUL)
country_event = {
	id = bftb_bulgaria_rearmament.2
	title = bftb_bulgaria_rearmament.2.t
	desc = bftb_bulgaria_rearmament.2.desc
	picture = GFX_report_event_generic_sign_treaty1 

	is_triggered_only = yes

	immediate = {

	}
	
	option = { #Refuse
		name = bftb_bulgaria_rearmament.2.a

	}
}

#Negotiate Bulgarian Rearmament - ENG demands NAP with a Balkan nation (Event for BUL)
country_event = {
	id = bftb_bulgaria_rearmament.3
	title = bftb_bulgaria_rearmament.3.t
	desc = bftb_bulgaria_rearmament.3.desc
	picture = GFX_report_event_generic_sign_treaty2 

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			set_country_flag = BUL_uk_demands_nap_with_balkan_nation_flag
		}
	}
	
	option = { #Ok
		name = bftb_bulgaria_rearmament.3.a

		custom_effect_tooltip = BUL_uk_demands_nap_with_balkan_nation_tt
	}
}

#Negotiate Bulgarian Rearmament - BUL has NAP (event for BUL)
country_event = {
	id = bftb_bulgaria_rearmament.4
	title = bftb_bulgaria_rearmament.4.t
	desc = bftb_bulgaria_rearmament.4.desc
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes
	
	option = { #Ok
		name = bftb_bulgaria_rearmament.4.a

		effect_tooltip = {
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				remove_ideas = BUL_army_restrictions_aat
			}
			else = {
				remove_ideas = BUL_army_restrictions
			}
		}
	}
}

#Negotiate Bulgarian Rearmament - BUL has NAP (event for ENG)
country_event = {
	id = bftb_bulgaria_rearmament.5
	title = bftb_bulgaria_rearmament.5.t
	desc = bftb_bulgaria_rearmament.5.desc
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes
	
	option = { #Ok
		name = bftb_bulgaria_rearmament.5.a

		effect_tooltip = {
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				remove_ideas = BUL_army_restrictions_aat
			}
			else = {
				remove_ideas = BUL_army_restrictions
			}
		}
	}
}

#Negotiate Bulgarian Rearmament - ENG accepts (Event for BUL)
country_event = {
	id = bftb_bulgaria_rearmament.6
	title = bftb_bulgaria_rearmament.6.t
	desc = bftb_bulgaria_rearmament.6.desc
	picture = GFX_report_event_generic_sign_treaty1 

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_rearmament.6.a
		
		if = {
			limit = {
				has_dlc = "Arms Against Tyranny"
			}
			remove_ideas = BUL_army_restrictions_aat
		}
		else = {
			remove_ideas = BUL_army_restrictions
		}
		clr_country_flag = BUL_rearmament_flag

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_lifted_arms_restrictions
		}
	}
}

#Pressure for Bulgarian Rearmament - Event for ENG
country_event = {
	id = bftb_bulgaria_rearmament.7
	title = bftb_bulgaria_rearmament.7.t
	desc = bftb_bulgaria_rearmament.7.desc
	picture = GFX_report_event_generic_sign_treaty2 

	is_triggered_only = yes

	option = { #Refuse
		name = bftb_bulgaria_rearmament.7.a

		#ai_chance = {
		#	base = 5
		#	modifier = {
		#		factor = 5
		#		has_opinion = {
		#			target = BUL
		#			value < 0
		#		}
		#	}
		#	modifier = {
		#		factor = 5
		#		has_opinion = {
		#			target = BUL
		#			value < 50
		#		}
		#	}
		#	modifier = {
		#		factor = 5
		#		NOT = { has_government = BUL }
		#	}
		#	modifier = {
		#		factor = 10
		#		BUL = { has_completed_focus = BUL_bulgarian_irredentism }
		#	}
		#	modifier = {
		#		factor = 100
		#		BUL = {
		#			OR = {
		#				has_war_with = ENG
		#				AND = {
		#					is_in_faction = yes
		#					NOT = { is_in_faction_with = ROOT }
		#				}	
		#			}
		#		}
		#	}
		#	modifier = { #Support IMRO is not cool bro
		#		factor = 10
		#		BUL = {	has_completed_focus = BUL_support_macedonian_organizations }
		#	}
		#	modifier = { #Your coop with IMRO is just too much
		#		factor = 15
		#		BUL = { has_idea = BUL_imro_05 }
		#	}
		#	modifier = {
		#		factor = 5
		#		BUL_has_some_sort_of_bogdan_filov = yes
		#	}
		#}

		effect_tooltip = {
			BUL = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_refused_to_lift_arms_restrictions
				}
			}
		}

		BUL = { country_event = { id = bftb_bulgaria_rearmament.8 hours = 8 random_hours = 4 } }
		custom_effect_tooltip = bftb_bulgaria_rearmament.1_refuse_tt
	}

	option = { #Accept
		name = bftb_bulgaria_rearmament.7.b

		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value > 0
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = BUL
					value > 25
				}
			}
			modifier = {
				factor = 100
				BUL = { 
					OR = {
						AND = {
							has_war_with = GER
							NOT = { GER = { is_in_faction_with = ROOT } }
						}
						is_in_faction_with = ROOT
					}
				}
			}
			modifier = {
				factor = 50
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 0
				any_country = {
					has_war_with = BUL
					is_in_faction_with = ROOT
				}
			}
			modifier = { #We like that you condemn IMRO
				factor = 10
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 10
				BUL = {
					NOT = {	has_idea = BUL_imro_01 }
					NOT = {	has_idea = BUL_imro_04 }
					NOT = {	has_idea = BUL_imro_05 }
				}
			}
			modifier = { #You have good relations with your neighbors, we like that
				factor = 1.5
				BUL = {
					OR = {
						has_completed_focus = BUL_treaty_of_perpetual_friendship
						has_completed_focus = BUL_the_salonika_agreement
					}
				}
			}
			modifier = { #You approached us, we like that
				factor = 1.5
				BUL = {	has_completed_focus = BUL_approach_the_united_kingdom }
			}
			modifier = { #You are becoming yet another capitalist country, we like that
				factor = 1.5
				has_government = democratic
				BUL = {	has_completed_focus = BUL_democratic_principles }
			}
			modifier = { #You think like us, we like that
				factor = 7
				BUL = {	has_government = ROOT }
			}
		}

		hidden_effect = {
			BUL = { set_country_flag = BUL_uk_gives_in_to_pressure_flag }
		}
		BUL = { country_event = { id = bftb_bulgaria_rearmament.6 hours = 8 random_hours = 4 } }
		effect_tooltip = { 
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				BUL = { remove_ideas = BUL_army_restrictions_aat }
			}
			else = {
				BUL = { remove_ideas = BUL_army_restrictions }
			}
			BUL = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_lifted_arms_restrictions
				}
			}
		}
	}
}

#Pressure for Bulgarian Rearmament - ENG refuses (Event for BUL)
country_event = {
	id = bftb_bulgaria_rearmament.8
	title = bftb_bulgaria_rearmament.8.t
	desc = bftb_bulgaria_rearmament.8.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = { #Refuse
		name = bftb_bulgaria_rearmament.8.a

		add_opinion_modifier = {
			target = ROOT
			modifier = BUL_refused_to_lift_arms_restrictions
		}
		clr_country_flag = BUL_rearmament_negotiations_ongoing_flag
	}
}

#Bulgaria Refuses Army Restrictions - Event for ENG
country_event = {
	id = bftb_bulgaria_rearmament.9
	title = bftb_bulgaria_rearmament.9.t
	desc = bftb_bulgaria_rearmament.9.desc
	picture = GFX_report_event_generic_sign_treaty1 

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_rearmament.9.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 100
				BUL = {
					OR = {
						has_war_with = GER
						is_in_faction_with = ROOT	
					}
				}
			}
			modifier = { #You have good relations with your neighbors, we like that
				factor = 1.5
				BUL = {
					OR = {
						has_completed_focus = BUL_treaty_of_perpetual_friendship
						has_completed_focus = BUL_the_salonika_agreement
					}
				}
			}
			modifier = { #You approached us, we like that
				factor = 1.5
				BUL = {	has_completed_focus = BUL_approach_the_united_kingdom }
			}
			modifier = { #You are becoming yet another capitalist country, we like that
				factor = 1.5
				has_government = democratic
				BUL = {	has_completed_focus = BUL_democratic_principles }
			}
			modifier = { #You think like us, we like that
				factor = 1.5
				BUL = {	has_government = ROOT }
			}
		}

		effect_tooltip = { 
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				BUL = { remove_ideas = BUL_army_restrictions_aat }
			}
			else = {
				BUL = { remove_ideas = BUL_army_restrictions }
			}
		}
	}

	option = { #Take action
		name = bftb_bulgaria_rearmament.9.b

		ai_chance = {
			base = 0
			modifier = {
				add = 100
				any_allied_country = {
					has_war_with = BUL
				}
			}
		}

		trigger = {
			BUL = {
				is_in_faction = yes
			}
		}

		effect_tooltip = { 
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				BUL = { remove_ideas = BUL_army_restrictions_aat }
			}
			else = {
				BUL = { remove_ideas = BUL_army_restrictions }
			}
		}
		add_political_power = -75
		create_wargoal = {
			type = topple_government
			target = BUL
		}
	}
}


##    ##    ###    ######## ####  #######  ##    ##    ###    ##       #### ########    ###    ######## ####  #######  ##    ## 
###   ##   ## ##      ##     ##  ##     ## ###   ##   ## ##   ##        ##       ##    ## ##      ##     ##  ##     ## ###   ## 
####  ##  ##   ##     ##     ##  ##     ## ####  ##  ##   ##  ##        ##      ##    ##   ##     ##     ##  ##     ## ####  ## 
## ## ## ##     ##    ##     ##  ##     ## ## ## ## ##     ## ##        ##     ##    ##     ##    ##     ##  ##     ## ## ## ## 
##  #### #########    ##     ##  ##     ## ##  #### ######### ##        ##    ##     #########    ##     ##  ##     ## ##  #### 
##   ### ##     ##    ##     ##  ##     ## ##   ### ##     ## ##        ##   ##      ##     ##    ##     ##  ##     ## ##   ### 
##    ## ##     ##    ##    ####  #######  ##    ## ##     ## ######## #### ######## ##     ##    ##    ####  #######  ##    ## 


#Bulgaria has nationalized foreign factories and subsidiaries - Event for GER/SOV/ENG
country_event = {
	id = bftb_bulgaria_nationalization.1
	title = bftb_bulgaria_nationalization.1.t
	desc = bftb_bulgaria_nationalization.1.desc
	picture = GFX_report_event_generic_factory 

	is_triggered_only = yes

	option = { #Do Nothing
		name = bftb_bulgaria_nationalization.1.a

		ai_chance = {
			factor = 10
			modifier = {
				factor = 0.5
				OR = {
					has_government = fascism
					has_government = democratic
				}
			}
			modifier = {
				factor = 10
				FROM = {
					has_government = ROOT
				}
			}
			modifier = {
				factor = 2
				surrender_progress > 0.5
			}
			modifier = {
				factor = 0.1
				FROM = {
					is_enemy_ideology = yes
				}
			}
		}

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_seized_our_bulgarian_subsidiaries
		}

		log = "[ROOT.GetNameDef] does NOTHING"
	}

	option = { #Embargo
		name = bftb_bulgaria_nationalization.1.b

		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.5
				has_war = yes
			}
			modifier = {
				factor = 0
				has_government = communism
				FROM = {
					has_government = communism
				}
			}
			modifier = {
				add = 10
				strength_ratio = {
					tag = FROM
					ratio > 2
				}
			}
			modifier = {
				add = 30
				OR = {
					AND = {
						tag = GER
						check_variable = { FROM.BUL_german_industrial_investments > 2 }
					}
					AND = {
						tag = ENG
						check_variable = { FROM.BUL_british_industrial_investments > 2 }
					}
					AND = {
						tag = SOV
						check_variable = { FROM.BUL_soviet_industrial_investments > 2 }
					}
				}
			}
			modifier = {
				add = 20
				OR = {
					AND = {
						tag = GER
						check_variable = { FROM.BUL_german_industrial_investments > 5 }
					}
					AND = {
						tag = ENG
						check_variable = { FROM.BUL_british_industrial_investments > 5 }
					}
					AND = {
						tag = SOV
						check_variable = { FROM.BUL_soviet_industrial_investments > 5 }
					}
				}
			}
			modifier = {
				factor = 2
				AND = {
					tag = ENG
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
			modifier = {
				factor = 0.5
				AND = {
					tag = GER
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
		}

		set_country_flag = BUL_country_has_embargoed_bulgaria_flag

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_seized_our_bulgarian_subsidiaries
		}
		
		if = {
			limit = {
				is_faction_leader = yes
			}
			every_country = {
				limit = {
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
					}
					NOT = { tag = FROM }
					NOT = { has_country_flag = BUL_industrial_investments_in_bulgaria_flag }
				}
				add_opinion_modifier = {
					target = FROM
					modifier = embargo
				}
				FROM = {
					add_opinion_modifier = {
						target = PREV
						modifier = embargo
					}
				}
			}
		}
		else = {
			add_opinion_modifier = {
				target = FROM
				modifier = embargo
			}
			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = embargo
				}
			}
		}
		FROM = {
			country_event = { id = bftb_bulgaria_nationalization.2 hours = 12 random_hours = 12 }
		}

		log = "[ROOT.GetNameDef] does EMBARGO"
	}

	option = { #Wargoal (and embargo)
		name = bftb_bulgaria_nationalization.1.c

		trigger = { 
			NOT = { is_in_faction_with = FROM }
		}

		ai_chance = {
			factor = 10
			modifier = {
				factor = 5
				strength_ratio = {
					tag = FROM
					ratio > 2
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio > 3
				}
			}
			modifier = {
				factor = 0
				OR = {
					has_war = yes
					has_stability < 0.4
					has_war_support < 0.4
				}
			}
			modifier = {
				factor = 0
				OR = {
					AND = {
						tag = GER
						check_variable = { FROM.BUL_german_industrial_investments < 3 }
					}
					AND = {
						tag = ENG
						check_variable = { FROM.BUL_british_industrial_investments < 3 }
					}
					AND = {
						tag = SOV
						check_variable = { FROM.BUL_soviet_industrial_investments < 3 }
					}
				}
			}
			modifier = {
				factor = 5
				OR = {
					AND = {
						tag = GER
						check_variable = { FROM.BUL_german_industrial_investments > 5 }
					}
					AND = {
						tag = ENG
						check_variable = { FROM.BUL_british_industrial_investments > 5 }
					}
					AND = {
						tag = SOV
						check_variable = { FROM.BUL_soviet_industrial_investments > 5 }
					}
				}
			}
			modifier = {
				factor = 2.5
				AND = {
					tag = ENG
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
			modifier = {
				factor = 0.25
				AND = {
					tag = GER
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
		}

		set_country_flag = BUL_country_has_embargoed_bulgaria_flag

		add_stability = -0.1
		add_war_support = -0.1
		
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
		}

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_seized_our_bulgarian_subsidiaries
		}
		
		if = {
			limit = {
				is_faction_leader = yes
			}
			every_country = {
				limit = {
					OR = {
						is_in_faction_with = ROOT
						is_subject_of = ROOT
					}
					NOT = { tag = FROM }
					NOT = { has_country_flag = BUL_industrial_investments_in_bulgaria_flag }
				}
				add_opinion_modifier = {
					target = FROM
					modifier = embargo
				}
				FROM = {
					add_opinion_modifier = {
						target = PREV
						modifier = embargo
					}
				}
			}
		}
		else = {
			add_opinion_modifier = {
				target = FROM
				modifier = embargo
			}
			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = embargo
				}
			}
		}
		FROM = {
			country_event = { id = bftb_bulgaria_nationalization.2 hours = 12 random_hours = 12 }
		}
	}

	option = { #Kick from Faction (and embargo)
		name = bftb_bulgaria_nationalization.1.d

		trigger = {
			is_in_faction_with = FROM
			is_faction_leader = yes
		}

		ai_chance = {
			factor = 80
			modifier = {
				factor = 0.5
				has_war_together_with = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 0
				surrender_progress > 0.7
			}
			modifier = {
				add = 30
				OR = {
					AND = {
						tag = GER
						check_variable = { FROM.BUL_german_industrial_investments > 2 }
					}
					AND = {
						tag = ENG
						check_variable = { FROM.BUL_british_industrial_investments > 2 }
					}
					AND = {
						tag = SOV
						check_variable = { FROM.BUL_soviet_industrial_investments > 2 }
					}
				}
			}
			modifier = {
				add = 20
				OR = {
					AND = {
						tag = GER
						check_variable = { FROM.BUL_german_industrial_investments > 5 }
					}
					AND = {
						tag = ENG
						check_variable = { FROM.BUL_british_industrial_investments > 5 }
					}
					AND = {
						tag = SOV
						check_variable = { FROM.BUL_soviet_industrial_investments > 5 }
					}
				}
			}
			modifier = {
				factor = 2
				AND = {
					tag = ENG
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
			modifier = {
				factor = 0.5
				AND = {
					tag = GER
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
		}

		set_country_flag = BUL_country_has_embargoed_bulgaria_flag

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_seized_our_bulgarian_subsidiaries
		}

		every_country = {
			limit = {
				OR = {
					is_in_faction_with = ROOT
					is_subject_of = ROOT
				}
				NOT = { tag = FROM }
				NOT = { has_country_flag = BUL_industrial_investments_in_bulgaria_flag }
			}
			add_opinion_modifier = {
				target = FROM
				modifier = embargo
			}
			FROM = {
				add_opinion_modifier = {
					target = PREV
					modifier = embargo
				}
			}
		}
		remove_from_faction = FROM
		FROM = {
			country_event = { id = bftb_bulgaria_nationalization.3 hours = 12 random_hours = 12 }
		}

		log = "[ROOT.GetNameDef] does KICK"
	}
}

# Bulgaria is under embargo - Event for BUL
country_event = {
	id = bftb_bulgaria_nationalization.2
	title = bftb_bulgaria_nationalization.2.t
	desc = bftb_bulgaria_nationalization.2.desc
	picture = GFX_report_event_merchant_ship_01  

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_nationalization.2.a

		if = {
			limit = {
				NOT = { has_country_flag = BUL_stability_hit_by_embargo_flag }
			}
			add_stability = -0.05
			set_country_flag = BUL_stability_hit_by_embargo_flag
		}
	}
}

# Bulgaria has been kicked from faction - Event for BUL
country_event = {
	id = bftb_bulgaria_nationalization.3
	title = bftb_bulgaria_nationalization.3.t
	desc = bftb_bulgaria_nationalization.3.desc
	picture = GFX_report_event_generic_read_write 

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_nationalization.3.a

		if = {
			limit = {
				NOT = { has_country_flag = BUL_stability_hit_by_embargo_flag }
			}
			add_stability = -0.05
		}
	}
}


 #######  ######## ##     ## ######## ########  
##     ##    ##    ##     ## ##       ##     ## 
##     ##    ##    ##     ## ##       ##     ## 
##     ##    ##    ######### ######   ########  
##     ##    ##    ##     ## ##       ##   ##   
##     ##    ##    ##     ## ##       ##    ##  
 #######     ##    ##     ## ######## ##     ## 


 #Bulgaria grants exploitation rights to an ally
country_event = {
	id = bftb_bulgaria_uranium_mining_concessions.1
	title = bftb_bulgaria_uranium_mining_concessions.1.t
	desc = bftb_bulgaria_uranium_mining_concessions.1.desc
	picture = GFX_report_event_generic_read_write 

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_uranium_mining_concessions.1.a

		effect_tooltip = {
			add_ideas = BUL_buhovo_uranium_mines
			add_opinion_modifier = {
				target = BUL
				modifier = BUL_granted_uranium_mining_rights
			}
			BUL = {
				remove_ideas = BUL_buhovo_uranium_mines
				add_ideas = BUL_uranium_concession_agreement_ns
			}
		}
	}
}




   ###    ##     ## ####  ######     ######## ##     ## ######## ##    ## ########  ######  
  ## ##    ##   ##   ##  ##    ##    ##       ##     ## ##       ###   ##    ##    ##    ## 
 ##   ##    ## ##    ##  ##          ##       ##     ## ##       ####  ##    ##    ##       
##     ##    ###     ##   ######     ######   ##     ## ######   ## ## ##    ##     ######  
#########   ## ##    ##        ##    ##        ##   ##  ##       ##  ####    ##          ## 
##     ##  ##   ##   ##  ##    ##    ##         ## ##   ##       ##   ###    ##    ##    ## 
##     ## ##     ## ####  ######     ########    ###    ######## ##    ##    ##     ######  


#Bulgaria wants to get their claims warranted - Event for GER
country_event = {
	id = bftb_bulgarian_claims.1
	title = bftb_bulgarian_claims.1.t
	desc = bftb_bulgarian_claims.1.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes

	fire_only_once = yes

	option = { #YES
		name = bftb_bulgarian_claims.1.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 5
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 2
				BUL = { 
					is_in_faction = no
				}
			}
			modifier = {
				factor = 20
				BUL = { 
					is_in_faction_with = ROOT
				}
			}
			modifier = {
				factor = 100
				BUL = { 
					has_country_flag = { flag = BUL_german_influence_flag value > 3 }
				}
			}
			modifier = {
				factor = 0.5
				ENG = { 
					has_opinion = {
						target = BUL
						value > 50
					}
				}
			}
			modifier = {
				factor = 0.25
				BUL = { has_completed_focus = BUL_approach_the_united_kingdom }
			}
			modifier = {
				factor = 0
				BUL = {
					is_in_faction = yes
					NOT = { is_in_faction_with = ROOT }
				}
			}
			modifier = {
				factor = 5
				BUL_has_some_sort_of_bogdan_filov = yes
			}
		}

		every_state = {
			limit = {
				has_state_flag = BUL_historical_bulgarian_claim_flag
				controller = {
					OR = {
						tag = GER
						AND = {
							NOT = { is_in_faction_with = GER }
							NOT = { tag = BUL }
						}
					}
				}
			}
			set_state_flag = BUL_bulgarian_claim_warranted_flag
			add_dynamic_modifier = { modifier = bulgarian_territorial_expansion_arranged }
		}
		effect_tooltip = {
			BUL = {
				add_opinion_modifier = { 
					target = GER
					modifier = BUL_bulgarian_claims_recognized
				}
			}
		}
		BUL = { country_event = { id = bftb_bulgarian_claims.2 hours = 16 random_hours = 8 } }

		set_global_flag = BUL_germany_recognizes_bulgarian_claims_flag
		custom_effect_tooltip = bftb_bulgarian_claims.1.a_tt
	}

	option = { #NOPE
		name = bftb_bulgarian_claims.1.b

		ai_chance = {
			base = 10
		}

		effect_tooltip = {
			BUL = {
				add_opinion_modifier = { 
					target = GER
					modifier = BUL_bulgarian_claims_not_recognized
				}
			}
		}
		BUL = { country_event = { id = bftb_bulgarian_claims.3 hours = 16 random_hours = 8 } }
	}
}

#Germany recognizes Bulgarian claims in the Balkans - Event for BUL
country_event = {
	id = bftb_bulgarian_claims.2
	title = bftb_bulgarian_claims.2.t
	desc = bftb_bulgarian_claims.2.desc
	picture = GFX_report_event_bul_boris_with_hitler 

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgarian_claims.2.a

		add_opinion_modifier = { 
			target = GER
			modifier = BUL_bulgarian_claims_recognized
		}
		effect_tooltip = {
			every_state = {
				limit = {
					has_state_flag = BUL_historical_bulgarian_claim_flag
					controller = {
						OR = {
							tag = GER
							AND = {
								NOT = { is_in_faction_with = GER }
								NOT = { tag = BUL }
							}
						}
					}
				}
				add_dynamic_modifier = { modifier = bulgarian_territorial_expansion_arranged }
				custom_effect_tooltip = BUL_germany_recognizes_our_claim_tt
			}
		}

		if = {
			limit = {
				has_country_flag = BUL_german_influence_flag
			}
			modify_country_flag = { flag = BUL_german_influence_flag value = 1 }
		}
		else = {
			set_country_flag = { flag = BUL_german_influence_flag value = 1 }
		}
	}
}

#Germany does not recognize Bulgarian claims in the Balkans - Event for BUL
country_event = {
	id = bftb_bulgarian_claims.3
	title = bftb_bulgarian_claims.3.t
	desc = bftb_bulgarian_claims.3.desc
	picture = GFX_report_event_generic_sign_treaty1 

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgarian_claims.3.a

		add_opinion_modifier = { 
			target = GER
			modifier = BUL_bulgarian_claims_not_recognized
		}
	}
}

#Germany transferred Bulgaria's claimed states - Event for BUL
country_event = {
	id = bftb_bulgarian_claims.4
	title = bftb_bulgarian_claims.4.t
	desc = bftb_bulgarian_claims.4.desc
	picture = GFX_report_event_bul_imro_chieftain

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			GER = { country_event = bftb_bulgarian_claims.5 }
		
		if = {
			limit = {
				any_state = {
					OR = {
						is_controlled_by = GER
						controller = {
							is_in_faction_with = GER
							NOT = { tag = BUL }
							NOT = { owns_state = PREV } #Not owner (it should be actually occupating the state -> Also prevents the issue in YUG with IMRO removing the core)
							NOT = { PREV = { is_core_of = PREV } }
						}
					}
				}
			}
			every_state = {
				limit = {
					has_state_flag = BUL_bulgarian_claim_warranted_flag
					OR = {
						is_controlled_by = GER
						controller = {
							is_in_faction_with = GER
							NOT = { tag = BUL }
							NOT = { owns_state = PREV } #Not owner (it should be actually occupating the state -> Also prevents the issue in YUG with IMRO removing the core)
							NOT = { PREV = { is_core_of = PREV } }
						}
					}
				}
				controller = { country_event = bftb_bulgarian_claims.6 }
				remove_dynamic_modifier = { modifier = bulgarian_territorial_expansion_arranged }
			}
		}
		}
	}

	option = {
		name = bftb_bulgarian_claims.4.a

		add_opinion_modifier = { 
			target = GER
			modifier = BUL_honored_bulgarian_claims
		}

		every_state = {
			limit = {
				has_state_flag = BUL_bulgarian_claim_warranted_flag
				OR = {
					is_controlled_by = GER
					controller = {
						is_in_faction_with = GER
						NOT = { tag = BUL }
					}
				}		
			}
			BUL = {
				transfer_state = PREV
				hidden_effect = {
					set_state_controller = PREV
				}
			}
		}
	}
}

#Germany transferred Bulgaria's claimed states - Event for GER
country_event = {
	id = bftb_bulgarian_claims.5
	title = bftb_bulgarian_claims.5.t
	desc = bftb_bulgarian_claims.5.desc
	picture = GFX_report_event_bul_troops_dobrudja

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgarian_claims.5.a

		effect_tooltip = {
			BUL = {
				add_opinion_modifier = { 
					target = GER
					modifier = BUL_honored_bulgarian_claims
				}
			}
			every_state = {
				limit = {
					has_state_flag = BUL_bulgarian_claim_warranted_flag
					OR = {
						is_controlled_by = GER
						controller = {
							is_in_faction_with = GER
						}
					}		
				}
				BUL = { set_state_controller = PREV }
			}
		}
	}
}

#Germany transferred Bulgaria's claimed states - Event for any allied controller of transferred states
country_event = {
	id = bftb_bulgarian_claims.6
	title = bftb_bulgarian_claims.6.t
	desc = bftb_bulgarian_claims.6.desc
	picture = GFX_report_event_bul_troops_dobrudja 

	is_triggered_only = yes

	option = {
		name = bftb_bulgarian_claims.6.a

		effect_tooltip = {
			every_state = {
				limit = {
					has_state_flag = BUL_bulgarian_claim_warranted_flag
					is_controlled_by = ROOT		
				}
				BUL = { set_state_controller = PREV }
			}
		}
	}
}

#Bulgaria asks for control over Balkan state - Event for controller of the state
country_event = {
	id = bftb_bulgarian_claims.7
	title = bftb_bulgarian_claims.7.t
	desc = bftb_bulgarian_claims.7.desc
	picture = GFX_report_event_generic_sign_treaty2 

	is_triggered_only = yes

	option = { #ACCEPT
		name = bftb_bulgarian_claims.7.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 1.5
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 2
				has_war = yes
			}
			modifier = {
				factor = 2
				is_major = no
			}
			modifier = {
				factor = 2
				has_manpower < 49999
			}
			modifier = {
				factor = 5
				has_manpower < 9999
			}
			modifier = {
				factor = 2
				has_equipment = {
					infantry_equipment < 99
				}
			}
			modifier = {
				factor = 2
				has_opinion	= {
					target = FROM
					value > 49
				}
			}
			modifier = {
				factor = 5
				AND = {
					tag = GER
					is_historical_focus_on = yes
					FROM.FROM = { is_core_of = YUG }
				}
			}
			modifier = {
				factor = 5
				FROM.FROM = { is_claimed_by = BUL }
			}
			modifier = {
				factor = 100
				FROM.FROM = {
					OR = {
						is_core_of = BUL
						has_state_flag = BUL_initial_bulgarian_state_flag
						has_state_flag = BUL_historical_bulgarian_claim_flag
					}
				}
			}
			modifier = {
				factor = 5
				AND = {
					tag = GER
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
		}

		add_political_power = 25
		#FROM.FROM is the state targeted by the decision
		FROM = {
			transfer_state = FROM.FROM
			set_state_controller = FROM.FROM
			country_event = bftb_bulgarian_claims.8
		}
	}

	option = { #REFUSE
		name = bftb_bulgarian_claims.7.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				is_major = yes
			}
			modifier = {
				factor = 1.5
				BUL = { is_ai = yes }
			}
			modifier = {
				factor = 2
				has_manpower > 99999
			}
			modifier = {
				factor = 5
				has_manpower > 199999
			}
			modifier = {
				factor = 2
				has_opinion	= {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				has_opinion	= {
					target = FROM
					value < -49
				}
			}
		}

		FROM = { country_event = bftb_bulgarian_claims.9 }
	}
}

#Country accepts Bulgarian control over state - Event for BUL
country_event = {
	id = bftb_bulgarian_claims.8
	title = bftb_bulgarian_claims.8.t
	desc = bftb_bulgarian_claims.8.desc
	picture = GFX_report_event_bul_troops_dobrudja

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgarian_claims.8.a

		effect_tooltip = {
			#FROM.FROM is the state targeted by the decision
			transfer_state = FROM.FROM
			set_state_controller = FROM.FROM
		}
	}
}

#Country rejects Bulgarian control over state - Event for BUL
country_event = {
	id = bftb_bulgarian_claims.9
	title = bftb_bulgarian_claims.9.t
	desc = bftb_bulgarian_claims.9.desc
	picture = GFX_report_event_generic_read_write 

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgarian_claims.9.a

	}
}

#Germany offers to donate aircraft - Event for BUL
country_event = {
	id = bftb_bulgaria_german_influence.1
	title = bftb_bulgaria_german_influence.1.t
	desc = bftb_bulgaria_german_influence.1.desc
	picture = GFX_report_event_bul_boris_with_hitler

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Accept
		name = bftb_bulgaria_german_influence.1.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 100
				is_historical_focus_on = yes
			}
		}

		set_country_flag = BUL_german_aircraft_donation_flag

		GER = {
			if = {
				limit = { NOT = { has_dlc = "By Blood Alone" } }
				send_equipment = {
					type = fighter_equipment_1
					amount = 12
					target = ROOT
				}
				send_equipment = {
					type = tac_bomber_equipment_0
					amount = 12
					target = ROOT
				}
			}
			else = {
				send_equipment = {
					type = small_plane_airframe
					amount = 12
					target = ROOT
				}
			}
		}
		if = {
			limit = {
				has_country_flag = BUL_german_influence_flag
			}
			modify_country_flag = { flag = BUL_german_influence_flag value = 1 }
		}
		else = {
			set_country_flag = { flag = BUL_german_influence_flag value = 1 }
		}
		add_opinion_modifier = { 
			target = GER
			modifier = BUL_donated_aircraft
		}
		GER = { country_event = { id = bftb_bulgaria_german_influence.2 hours = 2 random_hours = 1 } }
	}

	option = { #Reject
		name = bftb_bulgaria_german_influence.1.b

		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		GER = { country_event = { id = bftb_bulgaria_german_influence.3 hours = 2 random_hours = 1 } }
	}
}

#Bulgaria accepts our donation - Event for GER
country_event = {
	id = bftb_bulgaria_german_influence.2
	title = bftb_bulgaria_german_influence.2.t
	desc = bftb_bulgaria_german_influence.2.desc
	picture = GFX_report_event_bul_boris_with_hitler

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgaria_german_influence.2.a

		effect_tooltip = {
			BUL = {
				add_opinion_modifier = { 
					target = GER
					modifier = BUL_donated_aircraft
				}
			}
			send_equipment = {
				type = small_plane_airframe
				amount = 12
				target = ROOT
			}
		}
	}
}

#Bulgaria rejects our donation - Event for GER
country_event = {
	id = bftb_bulgaria_german_influence.3
	title = bftb_bulgaria_german_influence.3.t
	desc = bftb_bulgaria_german_influence.3.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgaria_german_influence.3.a

		add_opinion_modifier = { 
			target = BUL
			modifier = BUL_rejected_our_donation
		}
	}
}

#Germany demands we replace Kyoseyvanov - Event for BUL
country_event = {
	id = bftb_bulgaria_german_influence.4
	title = bftb_bulgaria_german_influence.4.t
	desc = bftb_bulgaria_german_influence.4.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Accept
		name = bftb_bulgaria_german_influence.4.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 10
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 10
				is_in_faction_with = GER
			}
			modifier = {
				factor = 100
				has_government = GER
			}
		}

		add_political_power = 50
		remove_ideas = BUL_georgi_ivanov_kyoseivanov
		add_ideas = BUL_bogdan_filov
		GER = {
			add_opinion_modifier = { 
				target = BUL
				modifier = BUL_complied_with_our_demands
			}
		}
		modify_country_flag = { flag = BUL_german_influence_flag value = 1 }

		GER = { country_event = { id = bftb_bulgaria_german_influence.5 hours = 2 random_hours = 1 } }
	}

	option = { #Refuse
		name = bftb_bulgaria_german_influence.4.b

		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		GER = {
			add_opinion_modifier = { 
				target = BUL
				modifier = BUL_rejected_our_demands
			}
		}
		GER = { country_event = { id = bftb_bulgaria_german_influence.6 hours = 2 random_hours = 1 } }
	}
}

#Bulgaria accepts to replace Kyoseyvanov - Event for GER
country_event = {
	id = bftb_bulgaria_german_influence.5
	title = bftb_bulgaria_german_influence.5.t
	desc = bftb_bulgaria_german_influence.5.desc
	picture = GFX_report_event_generic_sign_treaty2 

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgaria_german_influence.5.a

		effect_tooltip = {
			add_opinion_modifier = { 
				target = BUL
				modifier = BUL_complied_with_our_demands
			}
			BUL = {
				add_political_power = 50
				remove_ideas = BUL_georgi_ivanov_kyoseivanov
				add_ideas = BUL_bogdan_filov
			}
		}
	}
}

#Bulgaria refuses to replace Kyoseyvanov - Event for GER
country_event = {
	id = bftb_bulgaria_german_influence.6
	title = bftb_bulgaria_german_influence.6.t
	desc = bftb_bulgaria_german_influence.6.desc
	picture = GFX_report_event_generic_sign_treaty2 

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgaria_german_influence.6.a

		effect_tooltip = {
			add_opinion_modifier = { 
				target = BUL
				modifier = BUL_rejected_our_demands
			}
		}
	}
}

#Germany demands military access - Event for BUL
country_event = {
	id = bftb_bulgaria_german_influence.7
	title = bftb_bulgaria_german_influence.7.t
	desc = bftb_bulgaria_german_influence.7.desc
	picture = GFX_report_event_german_troops 

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Accept
		name = bftb_bulgaria_german_influence.7.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 10
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 100
				is_in_faction_with = GER
			}
			modifier = {
				factor = 5
				BUL_has_some_sort_of_bogdan_filov = yes
			}
		}

		effect_tooltip = {
			give_military_access = GER
			GER = {
				add_opinion_modifier = { 
					target = BUL
					modifier = BUL_complied_with_our_demands
				}
			}
		}
		modify_country_flag = { flag = BUL_german_influence_flag value = 1 }

		GER = { country_event = { id = bftb_bulgaria_german_influence.8 hours = 2 random_hours = 1 } }
	}

	option = { #Refuse
		name = bftb_bulgaria_german_influence.7.b

		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}

		GER = {
			add_opinion_modifier = { 
				target = BUL
				modifier = BUL_rejected_our_demands
			}
		}
		GER = { country_event = { id = bftb_bulgaria_german_influence.9 hours = 2 random_hours = 1 } }
	}
}

#Bulgaria grants us military access - Event for GER
country_event = {
	id = bftb_bulgaria_german_influence.8
	title = bftb_bulgaria_german_influence.8.t
	desc = bftb_bulgaria_german_influence.8.desc
	picture = GFX_report_event_german_troops 

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgaria_german_influence.8.a

		BUL = { give_military_access = GER }
		add_opinion_modifier = { 
			target = BUL
			modifier = BUL_complied_with_our_demands
		}
	}
}

#Bulgaria refuses to grant us military access - Event for GER
country_event = {
	id = bftb_bulgaria_german_influence.9
	title = bftb_bulgaria_german_influence.9.t
	desc = bftb_bulgaria_german_influence.9.desc
	picture = GFX_report_event_generic_sign_treaty2 

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Ok
		name = bftb_bulgaria_german_influence.9.a

		effect_tooltip = {
			add_opinion_modifier = { 
				target = BUL
				modifier = BUL_rejected_our_demands
			}
		}
	}
	#OPTION TO CREATE A WARGOAL ON BUL (AI will never choose this)
#	option = { #Unacceptable
#		name = bftb_bulgaria_german_influence.9.b
#
#		trigger = {
#			any_country = {
#				OR = {
#					tag = GER
#					is_in_faction_with = GER
#				}
#				is_neighbor_of = BUL
#			}
#		}
#		
#		effect_tooltip = {
#			add_opinion_modifier = { 
#				target = BUL
#				modifier = BUL_rejected_our_demands
#			}
#		}
#		
#		add_political_power = -100
#		create_wargoal = {
#			type = annex_everything
#			target = BUL
#		}
#	}
}

#BUL wants a Research Agreement with ITA - Event for ITA
country_event = {
	id = bftb_bulgaria_italian_influence.1
	title = bftb_bulgaria_italian_influence.1.t
	desc = bftb_bulgaria_italian_influence.1.desc
	picture = GFX_report_event_german_troops 

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Accept
		name = bftb_bulgaria_italian_influence.1.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 10
				is_historical_focus_on = yes
			}
			modifier = {
				factor = 10
				is_in_faction_with = ROOT
			}
			modifier = {
				factor = 10
				has_government = FROM
			}
		}
		add_to_tech_sharing_group = BUL_italian_research
		BUL = { add_to_tech_sharing_group = BUL_italian_research }
		add_political_power = 75

		hidden_effect = {
			news_event = { id = bftb_news.12 hours = 8 random_hours = 4 }
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_italian_influence.1.b

		ai_chance = {
			base = 5
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
}




########  ##     ## ########   ######  ##     ##    ###     ######  ########    ########  #######  ##     ## #### ########  ##     ## ######## ##    ## ######## 
##     ## ##     ## ##     ## ##    ## ##     ##   ## ##   ##    ## ##          ##       ##     ## ##     ##  ##  ##     ## ###   ### ##       ###   ##    ##    
##     ## ##     ## ##     ## ##       ##     ##  ##   ##  ##       ##          ##       ##     ## ##     ##  ##  ##     ## #### #### ##       ####  ##    ##    
########  ##     ## ########  ##       ######### ##     ##  ######  ######      ######   ##     ## ##     ##  ##  ########  ## ### ## ######   ## ## ##    ##    
##        ##     ## ##   ##   ##       ##     ## #########       ## ##          ##       ##  ## ## ##     ##  ##  ##        ##     ## ##       ##  ####    ##    
##        ##     ## ##    ##  ##    ## ##     ## ##     ## ##    ## ##          ##       ##    ##  ##     ##  ##  ##        ##     ## ##       ##   ###    ##    
##         #######  ##     ##  ######  ##     ## ##     ##  ######  ########    ########  ##### ##  #######  #### ##        ##     ## ######## ##    ##    ##    


#Purchase Artillery
country_event = {
	id = bftb_bulgaria_equipment_purchases.1
	title = bftb_bulgaria_equipment_purchases.1.t
	desc = bftb_bulgaria_equipment_purchases.1.desc
	picture = GFX_report_event_bul_artillery 

	is_triggered_only = yes

	option = { #Artillery
		name = bftb_bulgaria_equipment_purchases.1.a

		ai_chance = {
			base = 15
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = artillery_equipment
	  				ratio < 0.76
	  			}
			}
		}

		set_variable = { BUL_artillery_type = token:artillery_equipment }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.1.a_tt
	}

	option = { #Anti-Air
		name = bftb_bulgaria_equipment_purchases.1.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = anti_air_equipment
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_artillery_seller = {
				has_tech = interwar_antiair
			}
		}

		set_variable = { BUL_artillery_type = token:anti_air_equipment }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.1.b_tt
	}

	option = { #Anti-Tank
		name = bftb_bulgaria_equipment_purchases.1.c

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = anti_tank_equipment
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_artillery_seller = {
				has_tech = interwar_antitank
			}
		}

		set_variable = { BUL_artillery_type = token:anti_tank_equipment }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.1.c_tt
	}
}

#Purchase Military Vehicles
country_event = {
	id = bftb_bulgaria_equipment_purchases.2
	title = bftb_bulgaria_equipment_purchases.2.t
	desc = bftb_bulgaria_equipment_purchases.2.desc
	picture = GFX_report_event_generic_truck 

	is_triggered_only = yes

	option = { #Motorized
		name = bftb_bulgaria_equipment_purchases.2.a

		ai_chance = {
			base = 15
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = motorized_equipment
	  				ratio < 0.76
	  			}
			}
		}

		set_variable = { BUL_vehicle_type = token:motorized_equipment }
		var:BUL_military_vehicles_seller = { set_country_flag = BUL_producing_motorized_for_bulgaria_flag } #Used for different amounts of equipment based on type
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.2.a_tt
	}

	option = { #Mechanized
		name = bftb_bulgaria_equipment_purchases.2.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = mechanized_equipment
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_military_vehicles_seller = {
				has_tech = mechanised_infantry
			}
		}

		set_variable = { BUL_vehicle_type = token:mechanized_equipment }
		var:BUL_military_vehicles_seller = { set_country_flag = BUL_producing_mechanized_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.2.b_tt
	}

	option = { #Armored Cars
		name = bftb_bulgaria_equipment_purchases.2.c

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = armored_car_equipment
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_military_vehicles_seller = {
				has_tech = armored_car1
			}
		}

		set_variable = { BUL_vehicle_type = token:armored_car_equipment }
		var:BUL_military_vehicles_seller = { set_country_flag = BUL_producing_armored_car_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.2.c_tt
	}
}

#Purchase Armor
country_event = {
	id = bftb_bulgaria_equipment_purchases.3
	title = bftb_bulgaria_equipment_purchases.3.t
	desc = bftb_bulgaria_equipment_purchases.3.desc
	picture = GFX_report_event_tank_factory 

	is_triggered_only = yes

	option = { #Light Tank
		name = bftb_bulgaria_equipment_purchases.3.a

		ai_chance = {
			base = 15
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = light_tank_chassis
	  				ratio < 0.76
	  			}
			}
		}

		set_variable = { BUL_armor_type = token:light_tank_chassis }
		var:BUL_armor_seller = { set_country_flag = BUL_producing_light_armor_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.3.a_tt
	}

	option = { #Medium Tank
		name = bftb_bulgaria_equipment_purchases.3.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = medium_tank_chassis
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_armor_seller = {
				OR = {
					has_tech = basic_medium_tank
					has_tech = basic_medium_tank_chassis
				}
			}
		}

		set_variable = { BUL_armor_type = token:medium_tank_chassis }
		var:BUL_armor_seller = { set_country_flag = BUL_producing_medium_armor_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.3.b_tt
	}

	option = { #Heavy Tank
		name = bftb_bulgaria_equipment_purchases.3.c

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = heavy_tank_chassis
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_armor_seller = {
				has_tech = basic_heavy_tank
			}
		}

		set_variable = { BUL_armor_type = token:heavy_tank_chassis }
		var:BUL_armor_seller = { set_country_flag = BUL_producing_heavy_armor_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.3.c_tt
	}
}

#Purchase Aircraft
country_event = {
	id = bftb_bulgaria_equipment_purchases.4
	title = bftb_bulgaria_equipment_purchases.4.t
	desc = bftb_bulgaria_equipment_purchases.4.desc
	picture = GFX_report_event_bul_aircraft_repairs

	is_triggered_only = yes

	option = { #Fighters
		name = bftb_bulgaria_equipment_purchases.4.a

		ai_chance = {
			base = 15
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = small_plane_airframe
	  				ratio < 0.76
	  			}
			}
		}

		set_variable = { BUL_aircraft_type = token:small_plane_airframe }
		var:BUL_aircraft_seller = { set_country_flag = BUL_producing_fighters_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.4.a_tt
	}

	option = { #Naval Bombers
		name = bftb_bulgaria_equipment_purchases.4.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = small_plane_naval_bomber_airframe
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_aircraft_seller = {
				has_tech = naval_bomber1 #this won't work for BBA, because we can not guarantee that the sender country has a naval bomber design
			}
		}

		set_variable = { BUL_aircraft_type = token:small_plane_naval_bomber_airframe }
		var:BUL_aircraft_seller = { set_country_flag = BUL_producing_naval_bombers_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.4.b_tt
	}

	option = { #Tactical Bombers
		name = bftb_bulgaria_equipment_purchases.4.c

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				stockpile_ratio = { 
	  				archetype = medium_plane_airframe
	  				ratio < 0.76
	  			}
			}
		}

		trigger = {
			var:BUL_aircraft_seller = {
				OR = {
					has_tech = early_bomber
					has_tech = iw_medium_airframe
				}
			}
		}

		set_variable = { BUL_aircraft_type = token:medium_plane_airframe }
		var:BUL_aircraft_seller = { set_country_flag = BUL_producing_tactical_bombers_for_bulgaria_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.4.c_tt
	}
}

#BUL wants to purchase our ships - Event for Majors influencing BUL
country_event = {
	id = bftb_bulgaria_equipment_purchases.5
	title = bftb_bulgaria_equipment_purchases.5.t
	desc = lar_portugal_purchase_ships.1.desc
	picture = GFX_report_event_sailors_in_working_rig

	is_triggered_only = yes

	option = { #Accept
		name = lar_portugal_purchase_ships.1.a

		ai_chance = {
			base = 99
			modifier = {
				factor = 0
				OR = {
					has_opinion = { target = BUL value < 0 }
					has_civil_war = yes
					has_capitulated = yes
					is_subject = yes
					surrender_progress > 0.4
					any_other_country = {
						is_major = yes
						has_war_with = PREV
					}
				}
			}
		}

		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.5.a_tt
		BUL = {
			country_event = { id = bftb_bulgaria_equipment_purchases.6 hours = 1 }
		}
	}
	option = { #Reject
		name = lar_portugal_purchase_ships.1.b

		ai_chance = {
			base = 1
			modifier = {
				factor = 99
				has_war = yes
			}
		}

		BUL = {
			country_event = { id = bftb_bulgaria_equipment_purchases.7 hours = 1 }
			set_country_flag = {
					flag = BUL_ships_purchase_rejected_flag
					value = 1
					days = 180
			}
		}
	}
}

#Purchase Ships - FROM has accepted - Event for BUL (Choose type of ships)
country_event = {
	id = bftb_bulgaria_equipment_purchases.6
	title = lar_portugal_purchase_ships.2.t
	desc = lar_portugal_purchase_ships.2.desc
	picture = GFX_report_event_sailors_in_working_rig

	is_triggered_only = yes

	option = { #3 Submarines
		name = lar_portugal_purchase_ships.2.a

		ai_chance = {
			base = 15
		}

		trigger = {
			OR = {
				AND = {
					has_dlc = "Man the Guns"
					FROM = { has_tech = early_ship_hull_submarine }
				}
				AND = {
					NOT = { has_dlc = "Man the Guns" }
					FROM = { has_tech = early_submarine }
				}
			}
		}

		FROM = { set_country_flag = BUL_building_submarines_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.6.a_tt
	}

	option = { #2 Destroyers
		name = lar_portugal_purchase_ships.2.b

		ai_chance = {
			base = 10
		}

		trigger = {
			OR = {
				AND = {
					has_dlc = "Man the Guns"
					FROM = { has_tech = early_ship_hull_light }
				}
				AND = {
					NOT = { has_dlc = "Man the Guns" }
					FROM = { has_tech = early_destroyer }
				}
			}
		}

		FROM = { set_country_flag = BUL_building_destroyers_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.6.b_tt
	}

	option = { #1 Light Cruiser
		name = lar_portugal_purchase_ships.2.c

		ai_chance = {
			base = 5
		}

		trigger = {
			OR = {
				AND = {
					has_dlc = "Man the Guns"
					FROM = { has_tech = early_ship_hull_cruiser }
				}
				AND = {
					NOT = { has_dlc = "Man the Guns" }
					FROM = { has_tech = early_light_cruiser }
				}
			}
		}

		FROM = { set_country_flag = BUL_building_light_cruiser_flag }
		custom_effect_tooltip = bftb_bulgaria_equipment_purchases.6.c_tt
	}
}

#Purchase Ships - FROM has declined our offer - Event for BUL
country_event = {
	id = bftb_bulgaria_equipment_purchases.7
	title = lar_portugal_purchase_ships.3.t
	desc = lar_portugal_purchase_ships.3.desc
	picture = GFX_report_event_sailors_in_working_rig

	is_triggered_only = yes

	option = { #Ok
		name = lar_portugal_purchase_ships.3.a

	}
}

#Purchase Ships - Submarines ready - Event for BUL
country_event = {
	id = bftb_bulgaria_equipment_purchases.8
	title = bftb_bulgaria_equipment_purchases.8.t
	desc = bftb_bulgaria_equipment_purchases.8.desc
	picture = GFX_report_event_ast_navy

	is_triggered_only = yes

	option = { #Ok
		name = lar_portugal_purchase_ships.4.a

		custom_effect_tooltip = lar_portugal_purchase_ships.4.a_tt
		hidden_effect = {
			hidden_effect = { add_manpower = 600 } # 3 x 200MP/SS
			if = {
				limit = { has_dlc = "Man the Guns" }
				if = {
					limit = {
						FROM.FROM = { has_tech = advanced_ship_hull_submarine }
					}
					FROM.FROM = { #LVL4
						create_equipment_variant = {
							name = "Slava Class"				
							type = ship_hull_submarine_4
							name_group = BUL_SS_HISTORICAL
							parent_version = 0
							modules = {
								fixed_ship_torpedo_slot = ship_torpedo_sub_1
								fixed_ship_engine_slot = sub_ship_engine_1
								rear_1_custom_slot = ship_torpedo_sub_1
								front_1_custom_slot = ship_torpedo_sub_1
							}
						}
					}
					create_ship = { type = ship_hull_submarine_4 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_4 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_4 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else_if = { #LVL3
					limit = {
						FROM.FROM = { has_tech = improved_ship_hull_submarine }
					}
					FROM.FROM = {
						create_equipment_variant = {
							name = "Slava Class"				
							type = ship_hull_submarine_3
							name_group = BUL_SS_HISTORICAL
							parent_version = 0
							modules = {
								fixed_ship_torpedo_slot = ship_torpedo_sub_1
								fixed_ship_engine_slot = sub_ship_engine_1
								rear_1_custom_slot = ship_torpedo_sub_1
							}
						}
					}
					create_ship = { type = ship_hull_submarine_3 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_3 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_3 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else_if = { #LVL2
					limit = {
						FROM.FROM = { has_tech = basic_ship_hull_submarine }
					}
					FROM.FROM = {
						create_equipment_variant = {
							name = "Slava Class"				
							type = ship_hull_submarine_2
							name_group = BUL_SS_HISTORICAL
							parent_version = 0
							modules = {
								fixed_ship_torpedo_slot = ship_torpedo_sub_1
								fixed_ship_engine_slot = sub_ship_engine_1
								rear_1_custom_slot = ship_torpedo_sub_1
							}
						}
					}
					create_ship = { type = ship_hull_submarine_2 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_2 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_2 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else_if = { #LVL1
					limit = {
						FROM.FROM = { has_tech = early_ship_hull_submarine }
					}
					FROM.FROM = {
						create_equipment_variant = {
							name = "Slava Class"				
							type = ship_hull_submarine_1
							name_group = BUL_SS_HISTORICAL
							parent_version = 0
							modules = {
								fixed_ship_torpedo_slot = ship_torpedo_sub_1
								fixed_ship_engine_slot = sub_ship_engine_1
							}
						}
					}
					create_ship = { type = ship_hull_submarine_1 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_1 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = ship_hull_submarine_1 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else = { #Fallback
					create_equipment_variant = {
						name = "Slava Class"				
						type = ship_hull_submarine_1
						name_group = BUL_SS_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_torpedo_slot = ship_torpedo_sub_1
							fixed_ship_engine_slot = sub_ship_engine_1
						}
					}
					create_ship = { type = ship_hull_submarine_1 equipment_variant = "Slava Class" creator = ROOT }
					create_ship = { type = ship_hull_submarine_1 equipment_variant = "Slava Class" creator = ROOT }
					create_ship = { type = ship_hull_submarine_1 equipment_variant = "Slava Class" creator = ROOT }
				}
			}
			else = { #NO MTG
				if = { #LVL4
					limit = {
						FROM.FROM = { has_tech = advanced_submarine }
					}
					FROM.FROM = {
						create_equipment_variant = {
							name = "Slava Class"
							type = submarine_4
							upgrades = {
								ship_reliability_upgrade = 3
								sub_torpedo_upgrade = 3
								sub_stealth_upgrade = 3
								sub_engine_upgrade = 2
							}
						}
					}
					create_ship = { type = submarine_4 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_4 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_4 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else_if = { #LVL3
					limit = {
						FROM.FROM = { has_tech = improved_submarine }
					}
					FROM.FROM = {
						create_equipment_variant = {
							name = "Slava Class"
							type = submarine_3
							upgrades = {
								ship_reliability_upgrade = 2
								sub_torpedo_upgrade = 3
								sub_stealth_upgrade = 2
								sub_engine_upgrade = 2
							}
						}
					}
					create_ship = { type = submarine_3 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_3 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_3 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else_if = { #LVL2
					limit = {
						FROM.FROM = { has_tech = basic_submarine }
					}
					FROM.FROM = {
						create_equipment_variant = {
							name = "Slava Class"
							type = submarine_2
							upgrades = {
								ship_reliability_upgrade = 2
								sub_torpedo_upgrade = 2
								sub_stealth_upgrade = 2
								sub_engine_upgrade = 1
							}
						}
					}
					create_ship = { type = submarine_2 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_2 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_2 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else_if = { #LVL1
					limit = {
						FROM.FROM = { has_tech = early_submarine }
					}
					FROM.FROM = {
						create_equipment_variant = {
							name = "Slava Class"
							type = submarine_1
							upgrades = {
								ship_reliability_upgrade = 1
								sub_torpedo_upgrade = 1
								sub_stealth_upgrade = 1
								sub_engine_upgrade = 0
							}
						}
					}
					create_ship = { type = submarine_1 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_1 equipment_variant = "Slava Class" creator = FROM.FROM }
					create_ship = { type = submarine_1 equipment_variant = "Slava Class" creator = FROM.FROM }
				}
				else = { #Fallback (assuming BUL has at least early tech)
					create_equipment_variant = {
						name = "Slava Class"
						type = submarine_1
						upgrades = {
							ship_reliability_upgrade = 1
							sub_torpedo_upgrade = 1
							sub_stealth_upgrade = 1
							sub_engine_upgrade = 0
						}
					}
					create_ship = { type = submarine_1 equipment_variant = "Slava Class" creator = ROOT }
					create_ship = { type = submarine_1 equipment_variant = "Slava Class" creator = ROOT }
					create_ship = { type = submarine_1 equipment_variant = "Slava Class" creator = ROOT }
				}
			}

		}
	}
}

#Purchase Ships - Destroyers ready - Event for BUL
country_event = {
	id = bftb_bulgaria_equipment_purchases.9
	title = bftb_bulgaria_equipment_purchases.9.t
	desc = bftb_bulgaria_equipment_purchases.9.desc
	picture = GFX_report_event_ast_navy

	is_triggered_only = yes

	option = { #Ok
		name = lar_portugal_purchase_ships.4.a

		custom_effect_tooltip = lar_portugal_purchase_ships.5.a_tt

		if = {
			limit = { has_dlc = "Man the Guns" }
			if = { #LVL 4
				limit = {
					FROM.FROM = { has_tech = advanced_ship_hull_light }
				}
				hidden_effect = { add_manpower = 1000 } # 2 x 500MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"	
						type = ship_hull_light_4
						name_group = BUL_DD_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_battery_1
							fixed_ship_anti_air_slot = ship_anti_air_1
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = light_ship_engine_2
							fixed_ship_torpedo_slot = ship_torpedo_1
							mid_1_custom_slot = ship_mine_layer_1
							rear_1_custom_slot = ship_depth_charge_1
						}
					}
				}
				create_ship = { type = ship_hull_light_4 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = ship_hull_light_4 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else_if = { #LVL 3
				limit = {
					FROM.FROM = { has_tech = improved_ship_hull_light }
				}
				hidden_effect = { add_manpower = 800 } # 2 x 400MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"	
						type = ship_hull_light_3
						name_group = BUL_DD_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_battery_1
							fixed_ship_anti_air_slot = ship_anti_air_1
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = light_ship_engine_2
							fixed_ship_torpedo_slot = ship_torpedo_1
							mid_1_custom_slot = ship_mine_layer_1
							rear_1_custom_slot = ship_depth_charge_1
						}
					}
				}
				create_ship = { type = ship_hull_light_3 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = ship_hull_light_3 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else_if = { #LVL 2
				limit = {
					FROM.FROM = { has_tech = basic_ship_hull_light }
				}
				hidden_effect = { add_manpower = 650 } # 2 x 325MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"	
						type = ship_hull_light_2
						name_group = BUL_DD_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_battery_1
							fixed_ship_anti_air_slot = ship_anti_air_1
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = light_ship_engine_2
							fixed_ship_torpedo_slot = ship_torpedo_1
							mid_1_custom_slot = ship_mine_layer_1
							rear_1_custom_slot = ship_depth_charge_1
						}
					}
				}
				create_ship = { type = ship_hull_light_2 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = ship_hull_light_2 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else_if = { #LVL 1
				limit = {
					FROM.FROM = { has_tech = early_ship_hull_light }
				}
				hidden_effect = { add_manpower = 500 } # 2 x 250MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"	
						type = ship_hull_light_1
						name_group = BUL_DD_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_battery_1
							fixed_ship_anti_air_slot = ship_anti_air_1
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = light_ship_engine_2
							fixed_ship_torpedo_slot = ship_torpedo_1
							mid_1_custom_slot = ship_mine_layer_1
							rear_1_custom_slot = ship_depth_charge_1
						}
					}
				}
				create_ship = { type = ship_hull_light_1 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = ship_hull_light_1 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else = { #Fallback (assuming BUL has at least early tech)
				hidden_effect = { add_manpower = 500 } # 2 x 250MP/DD
				create_equipment_variant = {
					name = "Drazki Class"	
					type = ship_hull_light_1
					name_group = BUL_DD_HISTORICAL
					parent_version = 0
					modules = {
						fixed_ship_battery_slot = ship_light_battery_1
						fixed_ship_anti_air_slot = ship_anti_air_1
						fixed_ship_fire_control_system_slot = ship_fire_control_system_0
						fixed_ship_radar_slot = empty
						fixed_ship_engine_slot = light_ship_engine_2
						fixed_ship_torpedo_slot = ship_torpedo_1
						mid_1_custom_slot = ship_mine_layer_1
						rear_1_custom_slot = ship_depth_charge_1
					}
				}
				create_ship = { type = ship_hull_light_1 equipment_variant = "Drazki Class" creator = ROOT }
				create_ship = { type = ship_hull_light_1 equipment_variant = "Drazki Class" creator = ROOT }
			}
		}
		else = { #NO MTG
			if = { #LVL 4
				limit = {
					FROM.FROM = { has_tech = advanced_destroyer }
				}
				hidden_effect = { add_manpower = 1000 } # 2 x 500MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"
						type = destroyer_4
						upgrades = {
							ship_torpedo_upgrade = 4
							destroyer_engine_upgrade = 2
							ship_ASW_upgrade = 3
							ship_anti_air_upgrade = 3
						}
					}
				}
				create_ship = { type = destroyer_4 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = destroyer_4 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else_if = { #LVL 3
				limit = {
					FROM.FROM = { has_tech = improved_destroyer }
				}
				hidden_effect = { add_manpower = 800 } # 2 x 400MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"
						type = destroyer_3
						upgrades = {
							ship_torpedo_upgrade = 3
							destroyer_engine_upgrade = 2
							ship_ASW_upgrade = 2
							ship_anti_air_upgrade = 3
						}
					}
				}
				create_ship = { type = destroyer_3 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = destroyer_3 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else_if = { #LVL 2
				limit = {
					FROM.FROM = { has_tech = basic_destroyer }
				}
				hidden_effect = { add_manpower = 650 } # 2 x 325MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"
						type = destroyer_2
						upgrades = {
							ship_torpedo_upgrade = 2
							destroyer_engine_upgrade = 1
							ship_ASW_upgrade = 2
							ship_anti_air_upgrade = 3
						}
					}
				}
				create_ship = { type = destroyer_2 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = destroyer_2 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else_if = { #LVL 1
				limit = {
					FROM.FROM = { has_tech = early_destroyer }
				}
				hidden_effect = { add_manpower = 500 } # 2 x 250MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"
						type = destroyer_1
						upgrades = {
							ship_torpedo_upgrade = 1
							destroyer_engine_upgrade = 1
							ship_ASW_upgrade = 2
							ship_anti_air_upgrade = 2
						}
					}
				}
				create_ship = { type = destroyer_1 equipment_variant = "Drazki Class" creator = FROM.FROM }
				create_ship = { type = destroyer_1 equipment_variant = "Drazki Class" creator = FROM.FROM }
			}
			else = { #Fallback (assuming BUL has at least early tech)			
				hidden_effect = { add_manpower = 500 } # 2 x 250MP/DD
				FROM.FROM = {
					create_equipment_variant = {
						name = "Drazki Class"
						type = destroyer_1
						upgrades = {
							ship_torpedo_upgrade = 1
							destroyer_engine_upgrade = 1
							ship_ASW_upgrade = 2
							ship_anti_air_upgrade = 2
						}
					}
				}
				create_ship = { type = destroyer_1 equipment_variant = "Drazki Class" creator = ROOT }
				create_ship = { type = destroyer_1 equipment_variant = "Drazki Class" creator = ROOT }
			}
		}
	}
}

#Purchase Ships - Light Cruiser ready - Event for BUL
country_event = {
	id = bftb_bulgaria_equipment_purchases.10
	title = bftb_bulgaria_equipment_purchases.10.t
	desc = bftb_bulgaria_equipment_purchases.10.desc
	picture = GFX_report_event_ast_navy

	is_triggered_only = yes

	option = { #Ok
		name = lar_portugal_purchase_ships.4.a

		custom_effect_tooltip = lar_portugal_purchase_ships.6.a_tt
		
		if = {
			limit = { has_dlc = "Man the Guns" }
			if = { #LVL 4
				limit = {
					FROM.FROM = { has_tech = advanced_ship_hull_cruiser }
				}
				hidden_effect = { add_manpower = 1400 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"	
						type = ship_hull_cruiser_4
						name_group = BUL_CL_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_medium_battery_2
							fixed_ship_anti_air_slot = ship_anti_air_2
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = cruiser_ship_engine_2
							fixed_ship_armor_slot = empty
							front_1_custom_slot = ship_anti_air_1
							mid_1_custom_slot = ship_torpedo_1
							mid_2_custom_slot = ship_airplane_launcher_1
							rear_1_custom_slot = ship_light_medium_battery_2
						}
					}
				}
				create_ship = { type = ship_hull_cruiser_4 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else_if = { #LVL 3
				limit = {
					FROM.FROM = { has_tech = improved_ship_hull_cruiser }
				}
				hidden_effect = { add_manpower = 1200 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"	
						type = ship_hull_cruiser_3
						name_group = BUL_CL_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_medium_battery_2
							fixed_ship_anti_air_slot = ship_anti_air_2
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = cruiser_ship_engine_2
							fixed_ship_armor_slot = empty
							front_1_custom_slot = ship_anti_air_1
							mid_1_custom_slot = ship_torpedo_1
							mid_2_custom_slot = ship_airplane_launcher_1
							rear_1_custom_slot = ship_light_medium_battery_2
						}
					}
				}
				create_ship = { type = ship_hull_cruiser_3 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else_if = { #LVL 2
				limit = {
					FROM.FROM = { has_tech = basic_ship_hull_cruiser }
				}
				hidden_effect = { add_manpower = 800 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"	
						type = ship_hull_cruiser_2
						name_group = BUL_CL_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_medium_battery_2
							fixed_ship_anti_air_slot = ship_anti_air_2
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = cruiser_ship_engine_2
							fixed_ship_armor_slot = empty
							front_1_custom_slot = ship_anti_air_1
							mid_1_custom_slot = ship_torpedo_1
							mid_2_custom_slot = ship_airplane_launcher_1
							rear_1_custom_slot = ship_light_medium_battery_2
						}
					}
				}
				create_ship = { type = ship_hull_cruiser_2 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else_if = { #LVL 1
				limit = {
					FROM.FROM = { has_tech = early_ship_hull_cruiser }
				}
				hidden_effect = { add_manpower = 600 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"	
						type = ship_hull_cruiser_1
						name_group = BUL_CL_HISTORICAL
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_medium_battery_2
							fixed_ship_anti_air_slot = ship_anti_air_2
							fixed_ship_fire_control_system_slot = ship_fire_control_system_0
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = cruiser_ship_engine_2
							fixed_ship_armor_slot = empty
							front_1_custom_slot = ship_anti_air_1
							mid_1_custom_slot = ship_torpedo_1
							mid_2_custom_slot = ship_airplane_launcher_1
							rear_1_custom_slot = ship_light_medium_battery_2
						}
					}
				}
				create_ship = { type = ship_hull_cruiser_1 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else = { #Fallback (assuming BUL has at least early tech)
				hidden_effect = { add_manpower = 600 }
				create_equipment_variant = {
					name = "Sofia Class"	
					type = ship_hull_cruiser_1
					name_group = BUL_CL_HISTORICAL
					parent_version = 0
					modules = {
						fixed_ship_battery_slot = ship_light_medium_battery_2
						fixed_ship_anti_air_slot = ship_anti_air_2
						fixed_ship_fire_control_system_slot = ship_fire_control_system_0
						fixed_ship_radar_slot = empty
						fixed_ship_engine_slot = cruiser_ship_engine_2
						fixed_ship_armor_slot = empty
						front_1_custom_slot = ship_anti_air_1
						mid_1_custom_slot = ship_torpedo_1
						mid_2_custom_slot = ship_airplane_launcher_1
						rear_1_custom_slot = ship_light_medium_battery_2
					}
				}
				create_ship = { type = ship_hull_cruiser_1 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
		}
		else = { #NO MTG
			if = { #LVL 4
				limit = {
					FROM.FROM = { has_tech = advanced_light_cruiser }
				}
				hidden_effect = { add_manpower = 1140 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"
						type = light_cruiser_4
						upgrades = {
							ship_reliability_upgrade = 4
							ship_engine_upgrade = 3
							ship_gun_upgrade = 4
							ship_anti_air_upgrade = 3
						}
					}
				}
				create_ship = { type = light_cruiser_4 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else_if = { #LVL 3
				limit = {
					FROM.FROM = { has_tech = improved_light_cruiser }
				}
				hidden_effect = { add_manpower = 960 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"
						type = light_cruiser_3
						upgrades = {
							ship_reliability_upgrade = 3
							ship_engine_upgrade = 2
							ship_gun_upgrade = 3
							ship_anti_air_upgrade = 3
						}
					}
				}
				create_ship = { type = light_cruiser_3 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else_if = { #LVL 2
				limit = {
					FROM.FROM = { has_tech = basic_light_cruiser }
				}
				hidden_effect = { add_manpower = 800 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"
						type = light_cruiser_2
						upgrades = {
							ship_reliability_upgrade = 2
							ship_engine_upgrade = 2
							ship_gun_upgrade = 2
							ship_anti_air_upgrade = 2
						}
					}
				}
				create_ship = { type = light_cruiser_2 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else_if = { #LVL 1
				limit = {
					FROM.FROM = { has_tech = early_light_cruiser }
				}
				hidden_effect = { add_manpower = 600 }
				FROM.FROM = {
					create_equipment_variant = {
						name = "Sofia Class"
						type = light_cruiser_1
						upgrades = {
							ship_reliability_upgrade = 2
							ship_engine_upgrade = 2
							ship_gun_upgrade = 1
							ship_anti_air_upgrade = 1
						}
					}
				}
				create_ship = { type = light_cruiser_1 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
			else = { #Fallback (assuming BUL has at least early tech)
				hidden_effect = { add_manpower = 600 }
				create_equipment_variant = {
					name = "Sofia Class"
					type = light_cruiser_1
					upgrades = {
						ship_reliability_upgrade = 2
						ship_engine_upgrade = 2
						ship_gun_upgrade = 1
						ship_anti_air_upgrade = 1
					}
				}
				create_ship = { type = light_cruiser_1 equipment_variant = "Sofia Class" creator = FROM.FROM }
			}
		}
	}
}


 ######   ######  ##      ## 
##    ## ##    ## ##  ##  ## 
##       ##       ##  ##  ## 
 ######  ##       ##  ##  ## 
      ## ##       ##  ##  ## 
##    ## ##    ## ##  ##  ## 
 ######   ######   ###  ###  


#SCW is over - Bulgarian volunteers aiding the Spanish Republic are back - Event for BUL
country_event = {
	id = bftb_bulgaria_scw_volunteers.1
	title = bftb_bulgaria_scw_volunteers.1.t
	desc = bftb_bulgaria_scw_volunteers.1.desc
	picture = GFX_report_event_spr_no_pasaran 

	is_triggered_only = yes

	fire_only_once = yes

	option = {
		name = bftb_bulgaria_scw_volunteers.1.a

		trigger = {
			country_exists = SPD
		}
		if = {
			limit = {
				has_government = communism
			}
			custom_effect_tooltip = available_chief_of_airforce
			show_ideas_tooltip = BUL_zachari_zachariev
		}
		
		if = {
			limit = {
				NOT = { has_government = communism }
			}
			add_doctrine_cost_reduction = {
				name = BUL_pilot_training_program
			    cost_reduction = 0.50
			    uses = 2
			    category = air_doctrine
			}
		}
		
		if = {
			limit = {
				has_completed_focus = BUL_increase_our_commitments
			}
			add_tech_bonus = {
				name = BUL_darzhavna_aeroplanna_rabotilnitsa
			    bonus = 0.5
			    uses = 1
				category = light_air
			}
		}

		if = {
			limit = {
				check_variable = { BUL_spanish_tag_aided = FROM }
			}
			army_experience = 50
			air_experience = 25
		}
		else = {
			army_experience = 25
			air_experience = 15
		}
	}

	option = {
		name = bftb_bulgaria_scw_volunteers.1.b

		trigger = {
			NOT = { country_exists = SPD }
		}

		if = {
			limit = {
				has_government = communism
			}
			custom_effect_tooltip = available_chief_of_airforce
			show_ideas_tooltip = BUL_zachari_zachariev
		}
		
		if = {
			limit = {
				NOT = { has_government = communism }
			}
			add_doctrine_cost_reduction = {
				name = BUL_pilot_training_program
			    cost_reduction = 0.50
			    uses = 2
			    category = air_doctrine
			}
		}
		
		if = {
			limit = {
				has_completed_focus = BUL_increase_our_commitments
			}
			add_tech_bonus = {
				name = BUL_darzhavna_aeroplanna_rabotilnitsa
			    bonus = 0.5
			    uses = 1
				category = light_air
			}
		}

		if = {
			limit = {
				check_variable = { BUL_spanish_tag_aided = FROM }
			}
			army_experience = 50
			air_experience = 25
		}
		else = {
			army_experience = 25
			air_experience = 15
		}
	}
}

#SCW is over - Bulgarian volunteers aiding the Spanish Nationalists are back - Event for BUL
country_event = {
	id = bftb_bulgaria_scw_volunteers.2
	title = bftb_bulgaria_scw_volunteers.2.t
	desc = bftb_bulgaria_scw_volunteers.2.desc
	picture = GFX_report_event_spr_army_of_africa

	is_triggered_only = yes

	fire_only_once = yes

	immediate = {
		hidden_effect = {
			random_list = {
				13 = {
					set_variable = { BUL_trait_gained_during_scw = 1 } #Commando
				}
				13 = {
					set_variable = { BUL_trait_gained_during_scw = 2 } #Mountaineer
				}
				13 = {
					set_variable = { BUL_trait_gained_during_scw = 3 } #Hill Fighter
				}
				13 = {
					set_variable = { BUL_trait_gained_during_scw = 4 } #Urban Assault Specialist
				}
				13 = {
					set_variable = { BUL_trait_gained_during_scw = 5 } #Trickster
				}
				13 = {
					set_variable = { BUL_trait_gained_during_scw = 6 } #Organizer
				}
			}
		}
	}

	option = {
		name = bftb_bulgaria_scw_volunteers.2.a

		trigger = {
			country_exists = SPA
		}
		
		if = {
			limit = {
				has_completed_focus = BUL_increase_our_commitments
			}
			add_tech_bonus = {
				name = armor_bonus
				bonus = 0.50
				uses = 2
				category = armor
			}
		}

		if = {
			limit = {
				any_unit_leader = {
					has_unit_leader_flag = BUL_scw_promotion_flag
				}
			}
			random_unit_leader = {
				limit = {
					has_unit_leader_flag = BUL_scw_promotion_flag
				}
				promote_leader = yes
				add_skill_level = 1
				add_attack = 1
				add_defense = 1
				add_planning = 1

				if = {
					limit = {
						BUL = { check_variable = { var = BUL_trait_gained_during_scw value = 1 compare = equals } }
					}
					add_unit_leader_trait = commando
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 2 } }
					}
					add_unit_leader_trait = trait_mountaineer
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 3 } }
					}
					add_unit_leader_trait = hill_fighter
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 4 } }
					}
					add_unit_leader_trait = urban_assault_specialist
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 5 } }
					}
					add_unit_leader_trait = trickster
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 6 } }
					}
					add_unit_leader_trait = organizer
				}
			}
		}
		else = {
			if = {
				limit = {
					BUL = { check_variable = { var = BUL_trait_gained_during_scw value = 1 compare = equals } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { commando }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 2 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { trait_mountaineer }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 3 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { hill_fighter }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 4 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { urban_assault_specialist }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 5 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { trickster }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 6 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { organizer }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
		}
		clear_variable = BUL_trait_gained_during_scw
		if = {
			limit = {
				check_variable = { BUL_spanish_tag_aided = FROM }
			}
			army_experience = 50
		}
		else = {
			army_experience = 25
		}
	}

	option = {
		name = bftb_bulgaria_scw_volunteers.2.b

		trigger = {
			NOT = { country_exists = SPA }
		}
		
		if = {
			limit = {
				has_completed_focus = BUL_increase_our_commitments
			}
			add_tech_bonus = {
				name = armor_bonus
				bonus = 0.50
				uses = 2
				category = armor
			}
		}

		if = {
			limit = {
				any_unit_leader = {
					is_field_marshal = no
					is_assigned = no
				}
			}
			random_unit_leader = {
				limit = {
					is_field_marshal = no
					is_assigned = no
				}
				promote_leader = yes
				add_skill_level = 1

				if = {
					limit = {
						BUL = { check_variable = { var = BUL_trait_gained_during_scw value = 1 compare = equals } }
					}
					add_unit_leader_trait = commando
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 2 } }
					}
					add_unit_leader_trait = trait_mountaineer
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 3 } }
					}
					add_unit_leader_trait = hill_fighter
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 4 } }
					}
					add_unit_leader_trait = urban_assault_specialist
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 5 } }
					}
					add_unit_leader_trait = trickster
				}
				else_if = {
					limit = {
						BUL = { check_variable = { BUL_trait_gained_during_scw = 6 } }
					}
					add_unit_leader_trait = organizer
				}
			}
		}
		else = {
			if = {
				limit = {
					BUL = { check_variable = { var = BUL_trait_gained_during_scw value = 1 compare = equals } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { commando }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 2 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { trait_mountaineer }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 3 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { hill_fighter }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 4 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { urban_assault_specialist }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 5 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { trickster }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
			else_if = {
				limit = {
					BUL = { check_variable = { BUL_trait_gained_during_scw = 6 } }
				}
				add_corps_commander_role = {
					character = BUL_nikola_nakov
					traits = { organizer }
					skill = 3
					attack_skill = 2
					defense_skill = 2
					planning_skill = 4
					logistics_skill = 2
				}
			}
		}
		clear_variable = BUL_trait_gained_during_scw
		if = {
			limit = {
				check_variable = { BUL_spanish_tag_aided = FROM }
			}
			army_experience = 50
		}
		else = {
			army_experience = 25
		}
	}
}


 ######   #######  ##     ## #### ######## ########    #### ##    ## ######## ##       ##     ## ######## ##    ##  ######  ######## 
##    ## ##     ## ##     ##  ##  ##          ##        ##  ###   ## ##       ##       ##     ## ##       ###   ## ##    ## ##       
##       ##     ## ##     ##  ##  ##          ##        ##  ####  ## ##       ##       ##     ## ##       ####  ## ##       ##       
 ######  ##     ## ##     ##  ##  ######      ##        ##  ## ## ## ######   ##       ##     ## ######   ## ## ## ##       ######   
      ## ##     ##  ##   ##   ##  ##          ##        ##  ##  #### ##       ##       ##     ## ##       ##  #### ##       ##       
##    ## ##     ##   ## ##    ##  ##          ##        ##  ##   ### ##       ##       ##     ## ##       ##   ### ##    ## ##       
 ######   #######     ###    #### ########    ##       #### ##    ## ##       ########  #######  ######## ##    ##  ######  ######## 


# Treaty of Mutual Assistance - BUL wants a NA and guarantee with SOV - Event for SOV
country_event = {
	id = bftb_bulgaria_soviet_influence.1
	title = bftb_bulgaria_soviet_influence.1.t
	desc = bftb_bulgaria_soviet_influence.1.desc
	picture = GFX_report_event_bul_dimitrov_with_stalin

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Accept
		name = bftb_bulgaria_soviet_influence.1.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				BUL = { 
					is_in_faction = no
				}
			}
			modifier = {
				factor = 100
				BUL = { 
					is_in_faction_with = ROOT
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = BUL
					value > 50
				}
			}
			modifier = {
				factor = 0.7
				BUL = { has_completed_focus = BUL_treaty_of_perpetual_friendship }
			}
			modifier = {
				factor = 0
				has_opinion = {
					target = BUL
					value < -50
				}
			}
		}

		give_guarantee = FROM
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		add_opinion_modifier = { 
			target = FROM
			modifier = BUL_strengthened_relations_with_us
		}
		FROM = {
			hidden_effect = {
				country_event = bftb_bulgaria_soviet_influence.2
			}
			add_opinion_modifier = { 
				target = SOV
				modifier = BUL_strengthened_relations_with_us
			}
		}
		every_country = {
			limit = {
				OR = {
					tag = ENG
					tag = FRA
					tag = GER
				}
				NOT = { is_in_faction_with = SOV }
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_approached_the_ussr
			}
		}

		hidden_effect = {
			news_event = { id = bftb_news.13 hours = 8 random_hours = 4 }
		}
	}

	option = { #Reject
		name = bftb_bulgaria_soviet_influence.1.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 100
				BUL = { 
					is_in_faction = yes
					NOT = { is_in_faction_with = ROOT }
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = BUL
					value < 0
				}
			}
		}

		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_rejected_our_proposal
			}
		}
	}
}

# Treaty of Mutual Assistance - SOV accepts - Event for BUL
country_event = {
	id = bftb_bulgaria_soviet_influence.2
	title = bftb_bulgaria_soviet_influence.2.t
	desc = bftb_bulgaria_soviet_influence.2.desc
	picture = GFX_report_event_bul_dimitrov_with_stalin

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Ok
		name = bftb_bulgaria_soviet_influence.2.a

		effect_tooltip = {
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_strengthened_relations_with_us
			}
			FROM = {
				hidden_effect = {
					country_event = bftb_bulgaria_soviet_influence.3
				}
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_strengthened_relations_with_us
				}
				give_guarantee = ROOT
				diplomatic_relation = {
					country = ROOT
					relation = non_aggression_pact
					active = yes
				}
			}
			every_country = {
				limit = {
					OR = {
						tag = ENG
						tag = FRA
						tag = GER
					}
					NOT = { is_in_faction_with = FROM }
				}
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_approached_the_ussr
				}
			}
		}
	}
}

# Treaty of Mutual Assistance - SOV rejects our proposal - Event for BUL
country_event = {
	id = bftb_bulgaria_soviet_influence.3
	title = bftb_bulgaria_soviet_influence.3.t
	desc = bftb_bulgaria_soviet_influence.3.desc
	picture = GFX_report_event_stalin_02

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Accept
		name = bftb_bulgaria_soviet_influence.3.a

		effect_tooltip = {
			add_opinion_modifier = {
				target = FROM
				modifier = BUL_rejected_our_proposal
			}
		}
	}
}

# Carry the Revolution Abroad - Join Faction or Wargoal - Event for Balkan communist independent nations
country_event = {
	id = bftb_bulgaria_soviet_influence.4
	title = bftb_bulgaria_soviet_influence.4.t
	desc = bftb_bulgaria_soviet_influence.4.desc
	picture = GFX_report_event_bul_ff_troops_panzer

	is_triggered_only = yes

	option = { #Accept
		name = bftb_bulgaria_soviet_influence.4.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				BUL = { 
					is_in_faction_with = SOV
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value > 50
				}
			}
			modifier = {
				factor = 2
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = {
				factor = 5
				strength_ratio = {
					tag = BUL
					ratio < 1
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = BUL
					ratio < 0.5
				}
			}
			modifier = {
				factor = 0
				has_opinion = {
					target = BUL
					value < -50
				}
			}
		}

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_balkan_communism
		}
		hidden_effect = {
			add_opinion_modifier = {
				target = FROM
				modifier = BUL_balkan_communism_trade
			}
		}
		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_balkan_communism
			}
			hidden_effect = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_balkan_communism_trade
				}
				country_event = { id = bftb_bulgaria_soviet_influence.5 hours = 2 }
			}
		}
		BUL_remove_balkan_opinion_modifiers = yes
		random_country = {
			limit = {
				is_in_faction_with = FROM
				is_faction_leader = yes
			}
			add_to_faction = ROOT
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_soviet_influence.4.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value < 0
				}
			}
			modifier = {
				factor = 5
				BUL = { has_completed_focus = BUL_support_macedonian_organizations }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = BUL
					ratio > 1
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = BUL
					ratio > 2
				}
			}
		}

		add_opinion_modifier = {
			target = FROM
			modifier = BUL_threatening_neighbor
		}
		FROM = {
			create_wargoal = {
				type = annex_everything
				target = ROOT
				expire = 180
			}
		}
		hidden_effect = {
			FROM = {
				country_event = { id = bftb_bulgaria_soviet_influence.6 hours = 2 }
			}
		}
	}
}

# Carry the Revolution Abroad - Country Accepts - Event for BUL
country_event = {
	id = bftb_bulgaria_soviet_influence.5
	title = bftb_bulgaria_soviet_influence.5.t
	desc = bftb_bulgaria_soviet_influence.5.desc
	picture = GFX_report_event_communists_cheer

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_soviet_influence.5.a

		effect_tooltip = {
			add_opinion_modifier = {
				target = FROM
				modifier = BUL_balkan_communism
			}
			hidden_effect = {
				add_opinion_modifier = {
					target = FROM
					modifier = BUL_balkan_communism_trade
				}
			}
			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_balkan_communism
				}
				hidden_effect = {
					add_opinion_modifier = {
						target = ROOT
						modifier = BUL_balkan_communism_trade
					}
				}
			}
			random_country = {
				limit = {
					is_in_faction_with = ROOT
					is_faction_leader = yes
				}
				add_to_faction = FROM
			}
		}
	}
}

# Carry the Revolution Abroad - Country Refuses - Event for BUL
country_event = {
	id = bftb_bulgaria_soviet_influence.6
	title = bftb_bulgaria_soviet_influence.6.t
	desc = bftb_bulgaria_soviet_influence.6.desc
	picture = GFX_report_event_generic_read_write

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_soviet_influence.6.a

		effect_tooltip = {
			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_threatening_neighbor
				}
			}
			create_wargoal = {
				type = annex_everything
				target = FROM
				expire = 180
			}
		}
	}
}


##    ## ##     ##  ######    #######   ######  ##          ###    ##     ## ####    ###    ##    ##    #### ##    ## ######## ##       ##     ## ######## ##    ##  ######  ######## 
 ##  ##  ##     ## ##    ##  ##     ## ##    ## ##         ## ##   ##     ##  ##    ## ##   ###   ##     ##  ###   ## ##       ##       ##     ## ##       ###   ## ##    ## ##       
  ####   ##     ## ##        ##     ## ##       ##        ##   ##  ##     ##  ##   ##   ##  ####  ##     ##  ####  ## ##       ##       ##     ## ##       ####  ## ##       ##       
   ##    ##     ## ##   #### ##     ##  ######  ##       ##     ## ##     ##  ##  ##     ## ## ## ##     ##  ## ## ## ######   ##       ##     ## ######   ## ## ## ##       ######   
   ##    ##     ## ##    ##  ##     ##       ## ##       #########  ##   ##   ##  ######### ##  ####     ##  ##  #### ##       ##       ##     ## ##       ##  #### ##       ##       
   ##    ##     ## ##    ##  ##     ## ##    ## ##       ##     ##   ## ##    ##  ##     ## ##   ###     ##  ##   ### ##       ##       ##     ## ##       ##   ### ##    ## ##       
   ##     #######   ######    #######   ######  ######## ##     ##    ###    #### ##     ## ##    ##    #### ##    ## ##       ########  #######  ######## ##    ##  ######  ######## 


# Treaty of Perpetual Friendship - BUL wants a NA with YUG - Event for YUG
country_event = {
	id = bftb_bulgaria_yugoslavian_influence.1
	title = bftb_bulgaria_yugoslavian_influence.1.t
	desc = bftb_bulgaria_yugoslavian_influence.1.desc
	picture = GFX_report_event_bul_ff_troops_yugoslavia

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Accept
		name = bftb_bulgaria_yugoslavian_influence.1.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value > 50
				}
			}
			modifier = {
				factor = 2
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 5
				BUL = { 
					NOT = {
						has_idea = BUL_imro_01
						has_idea = BUL_imro_04
						has_idea = BUL_imro_05
					}
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = BUL
					ratio < 1
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
					tag = BUL
					ratio < 0.5
				}
			}
			modifier = {
				factor = 0
				has_opinion = {
					target = BUL
					value < -50
				}
			}
		}

		set_country_flag = BUL_ongoing_balkan_project_flag

		every_owned_state = {
			limit = {
				is_claimed_by = FROM
			}
			remove_claim_by = FROM
		}
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		add_opinion_modifier = { 
			target = FROM
			modifier = BUL_strengthened_relations_with_us
		}
		FROM = {
			add_opinion_modifier = { 
				target = ROOT
				modifier = BUL_strengthened_relations_with_us
			}
		}
		BUL_remove_balkan_opinion_modifiers = yes

		add_ideas = BUL_balkan_federation_project_propaganda
		FROM = { add_ideas = BUL_balkan_federation_project_propaganda }

		every_country = {
			limit = {
				BUL_country_can_influence_bulgaria = yes
				NOT = { is_in_faction_with = ROOT }
				NOT = { is_in_faction_with = FROM }
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_approached_yugoslavia
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_yugoslavian_influence.2 }
			news_event = { id = bftb_news.14 hours = 8 random_hours = 4 }
		}

	}

	option = { #Reject
		name = bftb_bulgaria_yugoslavian_influence.1.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value < 0
				}
			}
			modifier = {
				factor = 5
				BUL = { has_completed_focus = BUL_support_macedonian_organizations }
			}
			modifier = { #Your coop with IMRO is just too much
				factor = 10
				BUL = { has_idea = BUL_imro_05 }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = BUL
					ratio > 2
				}
			}
		}

		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_rejected_our_proposal
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_yugoslavian_influence.3 }
		}
	}
}

# Treaty of Perpetual Friendship - YUG accepts - Event for BUL
country_event = {
	id = bftb_bulgaria_yugoslavian_influence.2
	title = bftb_bulgaria_yugoslavian_influence.2.t
	desc = bftb_bulgaria_yugoslavian_influence.2.desc
	picture = GFX_report_event_communists_cheer 

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Ok
		name = bftb_bulgaria_yugoslavian_influence.2.a

		effect_tooltip = {
			FROM = {
				every_owned_state = {
					limit = {
						is_claimed_by = ROOT
					}
					remove_claim_by = ROOT
				}
				diplomatic_relation = {
					country = ROOT
					relation = non_aggression_pact
					active = yes
				}
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_strengthened_relations_with_us
				}
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_strengthened_relations_with_us
			}

			add_ideas = BUL_balkan_federation_project_propaganda
			FROM = { add_ideas = BUL_balkan_federation_project_propaganda }

			every_country = {
				limit = {
					BUL_country_can_influence_bulgaria = yes
					NOT = { is_in_faction_with = ROOT }
					NOT = { is_in_faction_with = FROM }
				}
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_approached_yugoslavia
				}
			}
		}
	}
}

# Treaty of Perpetual Friendship - YUG rejects our proposal - Event for BUL
country_event = {
	id = bftb_bulgaria_yugoslavian_influence.3
	title = bftb_bulgaria_yugoslavian_influence.3.t
	desc = bftb_bulgaria_yugoslavian_influence.3.desc
	picture = GFX_report_event_generic_sign_treaty1 

	is_triggered_only = yes

	fire_only_once = yes

	option = { #Ok
		name = bftb_bulgaria_yugoslavian_influence.3.a

		effect_tooltip = {
			add_opinion_modifier = {
				target = FROM
				modifier = BUL_rejected_our_proposal
			}
		}
	}
}


########     ###    ##       ##    ##    ###    ##    ##    ######## ######## ########  ######## ########     ###    ######## ####  #######  ##    ## 
##     ##   ## ##   ##       ##   ##    ## ##   ###   ##    ##       ##       ##     ## ##       ##     ##   ## ##      ##     ##  ##     ## ###   ## 
##     ##  ##   ##  ##       ##  ##    ##   ##  ####  ##    ##       ##       ##     ## ##       ##     ##  ##   ##     ##     ##  ##     ## ####  ## 
########  ##     ## ##       #####    ##     ## ## ## ##    ######   ######   ##     ## ######   ########  ##     ##    ##     ##  ##     ## ## ## ## 
##     ## ######### ##       ##  ##   ######### ##  ####    ##       ##       ##     ## ##       ##   ##   #########    ##     ##  ##     ## ##  #### 
##     ## ##     ## ##       ##   ##  ##     ## ##   ###    ##       ##       ##     ## ##       ##    ##  ##     ##    ##     ##  ##     ## ##   ### 
########  ##     ## ######## ##    ## ##     ## ##    ##    ##       ######## ########  ######## ##     ## ##     ##    ##    ####  #######  ##    ## 


#Bulgarian Balkan Federation Project Ready - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.1
	title = bftb_bulgaria_balkan_federation.1.t
	desc = bftb_bulgaria_balkan_federation.1.desc
	picture = GFX_report_event_bul_soviet_army_sofia

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.1.a

		custom_effect_tooltip = bftb_bulgaria_balkan_federation_project_ready_tt
	}
}

#Bulgarian Balkan Federation Project Ready - Event for YUG
country_event = {
	id = bftb_bulgaria_balkan_federation.2
	title = bftb_bulgaria_balkan_federation.2.t
	desc = bftb_bulgaria_balkan_federation.2.desc
	picture = GFX_report_event_generic_rally

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.2.a

		add_popularity = {
			ideology = communism
			popularity = 0.1
		}
	}
}

#Bulgarian Propaganda for Balkan Federation - Event for Balkan Countries
country_event = {
	id = bftb_bulgaria_balkan_federation.3
	title = bftb_bulgaria_balkan_federation.3.t
	desc = bftb_bulgaria_balkan_federation.3.desc
	picture = GFX_report_event_generic_rally

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.3.a

		add_timed_idea = {
			idea = BUL_balkan_federation_project_propaganda
			days = 180
		}
	}
}

#Bulgaria destabilizes country - Event for Balkan Countries
country_event = {
	id = bftb_bulgaria_balkan_federation.4
	title = bftb_bulgaria_balkan_federation.4.t
	desc = bftb_bulgaria_balkan_federation.4.desc
	picture = GFX_report_event_bul_troops_partisans_boat 

	is_triggered_only = yes

	option = {
		name = worrying

		add_stability = -0.05
		add_popularity = {
			ideology = communism
			popularity = 0.1
		}
	}
}

#Unification of the Balkans - Event for Balkan Allies
country_event = {
	id = bftb_bulgaria_balkan_federation.5
	title = bftb_bulgaria_balkan_federation.5.t
	desc = bftb_bulgaria_balkan_federation.5.desc
	picture = GFX_report_event_bul_troops_dobrudja

	is_triggered_only = yes

	option = { #Accept (and get annexed)
		name = bftb_bulgaria_balkan_federation.5.a

		ai_chance = {
			factor = 11
			modifier = {
				factor = 2
				threat > 69
			}
			modifier = {
				factor = 2
				FROM = { is_faction_leader = yes }
			}
			modifier = {
				factor = 2
				FROM = { has_government = ROOT }
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 99
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
					tag = FROM
					ratio < 0.8
				}
				strength_ratio = {
					tag = FROM
					ratio > 0.4
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio < 0.1
				}
			}
			modifier = {
				factor = 2
				is_neighbor_of = BUL
			}
			modifier = {
				factor = 10
				has_opinion_modifier = BUL_territorial_arbitration
			}
			modifier = { #We like that you condemn IMRO
				factor = 2
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 5
				BUL = { 
					NOT = {
						has_idea = BUL_imro_01
						has_idea = BUL_imro_04
						has_idea = BUL_imro_05
					}
				}
			}
		}

		custom_effect_tooltip = GAME_OVER_TT
		hidden_effect = {
			FROM = { country_event = { id = bftb_bulgaria_balkan_federation.6 hours = 6 random_hours = 6 } }
		}
	}

#	option = { #Handle issues first (then get annexed) - AI only
#		name = bftb_bulgaria_balkan_federation.5.b
#
#		trigger = {
#			is_ai = yes
#			NOT = {
#				has_government = fascism
#			}
#		}
#
#		ai_chance = {
#			factor = 11
#			modifier = {
#				factor = 2
#				threat < 50
#			}
#			modifier = {
#				factor = 6
#				FROM = { is_faction_leader = no }
#			}
#			modifier = {
#				factor = 2
#				FROM = { has_government = ROOT }
#			}
#			modifier = {
#				factor = 2
#				has_opinion = {
#					target = FROM
#					value < 50
#				}
#			}
#			modifier = {
#				factor = 2
#				has_opinion = {
#					target = FROM
#					value < 15
#				}
#			}
#			modifier = {
#				factor = 5
#				strength_ratio = {
#					tag = FROM
#					ratio < 0.4
#				}
#				strength_ratio = {
#					tag = FROM
#					ratio > 0.1
#				}
#			}
#			modifier = {
#				factor = 10
#				has_opinion_modifier = BUL_territorial_arbitration
#			}
#			modifier = { #We like that you condemn IMRO
#				factor = 2
#				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
#			}
#			modifier = { #You have tried
#				factor = 2
#				BUL = { 
#					NOT = {
#						has_idea = BUL_imro_01
#						has_idea = BUL_imro_04
#						has_idea = BUL_imro_05
#					}
#				}
#			}
#		}
#
#		random_list = {
#			13 = { #Requests Industrial Aid
#				modifier = {
#					factor = 10
#					ic_ratio = {
#						tag = BUL
#						ratio < 0.5
#					}
#				}
#				FROM = {
#					country_event = { id = bftb_bulgaria_balkan_federation.7 hours = 6 random_hours = 6 }
#				}
#			}
#			11 = { #Requests Economic Aid for Infrastructure
#				modifier = {
#					factor = 10
#					any_owned_state = {
#						is_in_home_area = yes
#						is_on_continent = europe
#						any_neighbor_state = {
#							is_controlled_by = BUL
#						}
#					}
#				}
#				FROM = {
#					country_event = { id = bftb_bulgaria_balkan_federation.8 hours = 6 random_hours = 6 }
#				}
#			}
#			13 = { #Requests Military Aid
#				modifier = {
#					factor = 10
#					strength_ratio = {
#						tag = FROM
#						ratio < 0.5
#					}
#				}
#				FROM = {
#					country_event = { id = bftb_bulgaria_balkan_federation.9 hours = 6 random_hours = 6 }
#				}
#			}
#		}
#		custom_effect_tooltip = GAME_OVER_TT
#	}


	option = { #Puppet - Player only
		name = bftb_bulgaria_balkan_federation.5.c

		trigger = {
			is_ai = no
		}

		effect_tooltip = {
			FROM = {
				puppet = ROOT
			}
			if = {
				limit = {
					is_in_faction = no
					FROM = { is_in_faction = yes }
				}
				FROM = { add_to_faction = ROOT }
			}
		}
		hidden_effect = {
			FROM = { country_event = { id = bftb_bulgaria_balkan_federation.10 hours = 6 random_hours = 6 } }
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_balkan_federation.5.d

		ai_chance = {
			factor = 11
			modifier = {
				factor = 6
				FROM = { is_faction_leader = no }
			}
			modifier = {
				factor = 2
				NOT = { has_government = FROM }
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 50
				has_opinion = {
					target = FROM
					value < -50
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio > 2
				}
			}
		}

		effect_tooltip = {
			FROM = {
				add_opinion_modifier = {
					target = ROOT
					modifier = BUL_refused_unification
				}
			}
		}
		custom_effect_tooltip = bftb_bulgaria_balkan_federation.5.d_consequences_tt
		hidden_effect = {
			FROM = { country_event = { id = bftb_bulgaria_balkan_federation.11 hours = 6 random_hours = 6 } }
		}
	}
}

#Unification of the Balkans - Country Accepts - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.6
	title = bftb_bulgaria_balkan_federation.6.t
	desc = bftb_bulgaria_balkan_federation.6.desc
	picture = GFX_report_event_bul_soviet_army_sofia 

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.6.a

		BUL_join_wars_of_from = yes

		FROM = {
			every_unit_leader = {
				set_nationality = BUL
			}
		}
		annex_country = { target = FROM transfer_troops = yes }

		custom_effect_tooltip = germany.126.warning
	}
}

#Unification of the Balkans - Country Requests Industrial Aid before annexation - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.7
	title = bftb_bulgaria_balkan_federation.7.t
	desc = bftb_bulgaria_balkan_federation.7.desc
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.7.a

		activate_targeted_decision = { target = FROM decision = BUL_balkan_federation_industrial_aid }
	}
}

#Unification of the Balkans - Country Requests Economic Aid before annexation - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.8
	title = bftb_bulgaria_balkan_federation.8.t
	desc = bftb_bulgaria_balkan_federation.8.desc
	picture = GFX_report_event_hitler_handshake

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.8.a

		activate_targeted_decision = { target = FROM decision = BUL_balkan_federation_economic_aid }
	}
}

#Unification of the Balkans - Country Requests Military Aid before annexation - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.9
	title = bftb_bulgaria_balkan_federation.9.t
	desc = bftb_bulgaria_balkan_federation.9.desc
	picture = GFX_report_event_bul_ff_troops_yugoslavia

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.9.a

		activate_targeted_decision = { target = FROM decision = BUL_balkan_federation_military_aid }
	}
}

#Unification of the Balkans - Country requests limited freedom (aka puppet) - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.10
	title = bftb_bulgaria_balkan_federation.10.t
	desc = bftb_bulgaria_balkan_federation.10.desc
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.10.a

		BUL_join_wars_of_from = yes

		puppet = FROM
		BUL_remove_balkan_opinion_modifiers = yes
		set_autonomy = { target = FROM autonomy_state = autonomy_dominion }
		if = {
			limit = {
				FROM = { is_in_faction = no }
			}
			random_country = {
				limit = { 
					is_in_faction_with = BUL 
					is_faction_leader = yes
				}
				add_to_faction = FROM
			}
		}

		custom_effect_tooltip = germany.126.warning
	}
}

#Unification of the Balkans - Country Refuses - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.11
	title = bftb_bulgaria_balkan_federation.11.t
	desc = bftb_bulgaria_balkan_federation.11.desc
	picture = GFX_report_event_gre_balkan_pact

	is_triggered_only = yes

	option = { #Do nothing
		name = bftb_bulgaria_balkan_federation.11.a

		ai_chance = {
			factor = 10
			modifier = {
				factor = 10
				FROM = { is_faction_leader = no }
			}
			modifier = {
				factor = 2
				is_ai = yes
			}
			modifier = {
				factor = 0.5
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
		}

		add_opinion_modifier = {
			target = ROOT
			modifier = BUL_refused_unification
		}
	}
	
	

	option = { #Kick from faction
		name = bftb_bulgaria_balkan_federation.11.b

		trigger = {
			is_faction_leader = yes
		}

		ai_chance = {
			factor = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value < 50
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 0.7
				}
			}
		}

		add_opinion_modifier = {
			target = ROOT
			modifier = BUL_refused_unification
		}
		remove_from_faction = FROM
		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_kicked_us_from_faction
			}
		}

		hidden_effect = { #ROOT & FROM are not happy with each other's actions
			add_ai_strategy = {
				type = alliance
				id = FROM			
				value = -100
			}

			add_ai_strategy = {
				type = befriend
				id = FROM			
				value = -100
			}
			FROM = {
				add_ai_strategy = {
					type = alliance
					id = ROOT			
					value = -100
				}

				add_ai_strategy = {
					type = befriend
					id = ROOT			
					value = -100
				}
			}
		}
	}

	option = { #Kick and Wargoal
		name = bftb_bulgaria_balkan_federation.11.c

		trigger = {
			is_faction_leader = yes
		}

		ai_chance = {
			factor = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 25
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value < 50
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
					tag = FROM
					ratio > 1.5
				}
			}
		}

		add_political_power = -120
		add_opinion_modifier = {
			target = ROOT
			modifier = BUL_refused_unification
		}
		remove_from_faction = FROM
		create_wargoal = {
			type = annex_everything
			target = FROM
		}
		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_kicked_us_from_faction
			}
		}

		hidden_effect = { #ROOT & FROM are mad at each other
			add_ai_strategy = {
				type = alliance
				id = FROM			
				value = -200
			}

			add_ai_strategy = {
				type = befriend
				id = FROM			
				value = -200
			}
			FROM = {
				add_ai_strategy = {
					type = alliance
					id = ROOT			
					value = -200
				}

				add_ai_strategy = {
					type = befriend
					id = ROOT			
					value = -200
				}
			}
		}
	}
}

#Recover Italian Territories - Event for ITA
country_event = {
	id = bftb_bulgaria_balkan_federation.12
	title = bftb_bulgaria_balkan_federation.12.t
	desc = bftb_bulgaria_balkan_federation.12.desc
	picture = GFX_report_event_bul_boris_military

	is_triggered_only = yes

	option = { #Accept
		name = bftb_bulgaria_balkan_federation.12.a

		ai_chance = {
			factor = 10
			modifier = {
				factor = 10
				FROM = { is_faction_leader = no }
			}
			modifier = {
				factor = 100
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 90
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = {
				factor = 2
				FROM = { has_completed_focus = BUL_cooperation_with_italy }
			}
			modifier = {
				factor = 0
				OR = {
					has_war_with = FROM
					any_allied_country = {
						has_war_with = FROM
					}
				}			
			}
		}

		every_controlled_state = { # Any Italian-controlled states in the Balkans get transferred
			limit = {
				BUL_is_balkan_state = yes
			}
			hidden_effect = {
				if = { # Prio BUL always, if possible
					limit = {
						is_core_of = BUL
						exists = BUL
					}
					BUL = {
						transfer_state = PREV
					}
				}
				else_if = { #Initial Balkan countries are prioritized before releasables 
					limit = {
						is_core_of = YUG
						exists = YUG
					}
					YUG = {
						transfer_state = PREV
					}
				}
				else_if = {
					limit = {
						is_core_of = GRE
						exists = GRE
					}
					GRE = {
						transfer_state = PREV
					}
				}
				else_if = {
					limit = {
						is_core_of = ROM
						exists = ROM
					}
					ROM = {
						transfer_state = PREV
					}
				}
				else_if = {
					limit = {
						is_core_of = ALB
						exists = ALB
					}
					ALB = {
						transfer_state = PREV
					}
				}
				else_if = {
					limit = {
						is_core_of = TUR
						exists = TUR
					}
					TUR = {
						transfer_state = PREV
					}
				}
				else_if = { # Check for releasables
					limit = {
						any_country = {
							BUL_is_balkan_nation = yes
							country_exists = yes
							PREV = { is_core_of = THIS }
						}
					}
					random_country = {
						limit = {
							BUL_is_balkan_nation = yes
							country_exists = yes
							PREV = { is_core_of = THIS }
						}
						transfer_state = PREV
					}
				}
				else = { # Fallback is BUL
					BUL = {
						transfer_state = PREV
					}
				}
				set_state_flag = BUL_italy_yields_state_flag
			}
			custom_effect_tooltip = bftb_bulgaria_balkan_federation.12.a_state_transfering_tt
		}
		if = {
			limit = {
				any_country = {
					BUL_is_balkan_nation = yes
					any_controlled_state = {
						has_state_flag = BUL_italy_yields_state_flag
					}
					NOT = { original_tag = BUL }
				}
			}
			every_country = {
				limit = {
					BUL_is_balkan_nation = yes
					any_controlled_state = {
						has_state_flag = BUL_italy_yields_state_flag
					}
					NOT = { original_tag = BUL }
				}
				country_event = bftb_bulgaria_balkan_federation.14
			}
		}
		FROM = { country_event = { id = bftb_bulgaria_balkan_federation.13 hours = 2 } }
	}

	option = { #Refuse
		name = bftb_bulgaria_balkan_federation.12.b

		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value < 50
				}
			}
			modifier = {
				factor = 20
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
			modifier = {
				factor = 5
				has_war = no
			}
			modifier = {
				factor = 5
				is_faction_leader = yes
			}
		}

		FROM = { country_event = { id = bftb_bulgaria_balkan_federation.15 hours = 2 } }
		custom_effect_tooltip = bftb_bulgaria_balkan_federation.12.b_tt
		effect_tooltip = {
			every_controlled_state = { # Bulgaria gets a claim on any Italian-controlled states in the Balkans
				limit = {
					BUL_is_balkan_state = yes
				}
				add_claim_by = FROM
			}
			FROM = {
				create_wargoal = {
					type = annex_everything
					target = ROOT
				}
			}
		}
	}
}

#Recover Italian Territories - ITA Accepts - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.13
	title = bftb_bulgaria_balkan_federation.13.t
	desc = bftb_bulgaria_balkan_federation.13.desc
	picture = GFX_report_event_bul_italian_equipment 

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.13.a

		effect_tooltip = {
			if = {
				limit = {
					any_controlled_state = {
						has_state_flag = BUL_italy_yields_state_flag
					}
				}
				custom_effect_tooltip = BUL_italy_yields_states_to_root_tt
				every_controlled_state = {
					limit = {
						has_state_flag = BUL_italy_yields_state_flag
					}
				}
			}
			if = {
				limit = {
					any_state = {
						has_state_flag = BUL_italy_yields_state_flag
						NOT = { is_controlled_by = ROOT }
					}
				}
				custom_effect_tooltip = BUL_italy_yields_states_to_others_tt
				every_state = {
					limit = {
						has_state_flag = BUL_italy_yields_state_flag
						NOT = { is_controlled_by = ROOT }
					}
				}
			}
		}
		hidden_effect = {
			every_state = {
				limit = {
					has_state_flag = BUL_italy_yields_state_flag
				}
				clr_state_flag = BUL_italy_yields_state_flag
			}
		}
	}
}

#Recover Italian Territories - ITA transfers state - Event for other Balkan countries
country_event = {
	id = bftb_bulgaria_balkan_federation.14
	title = bftb_bulgaria_balkan_federation.14.t
	desc = bftb_bulgaria_balkan_federation.14.desc
	picture = GFX_report_event_bul_soviet_army_sofia

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.14.a

		effect_tooltip = {
			if = {
				limit = {
					any_controlled_state = {
						has_state_flag = BUL_italy_yields_state_flag
					}
				}
				custom_effect_tooltip = BUL_italy_yields_states_to_root_tt
				every_controlled_state = {
					limit = {
						has_state_flag = BUL_italy_yields_state_flag
					}
				}
			}
			if = {
				limit = {
					any_state = {
						has_state_flag = BUL_italy_yields_state_flag
						NOT = { is_controlled_by = ROOT }
					}
				}
				custom_effect_tooltip = BUL_italy_yields_states_to_others_tt
				every_state = {
					limit = {
						has_state_flag = BUL_italy_yields_state_flag
						NOT = { is_controlled_by = ROOT }
					}
				}
			}
		}
		add_opinion_modifier = {
			target = BUL
			modifier = BUL_territorial_arbitration
		}
	}
}

#Recover Italian Territories - ITA refuses - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.15
	title = bftb_bulgaria_balkan_federation.15.t
	desc = bftb_bulgaria_balkan_federation.15.desc
	picture = GFX_report_event_bul_ff_troops_panzer

	is_triggered_only = yes

	option = { # Wargoal
		name = bftb_bulgaria_balkan_federation.15.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 100
				strength_ratio = {
					tag = FROM
					ratio > 2
				}
			}
			modifier = {
				factor = 2
				alliance_strength_ratio > 1.5
			}
		}

		FROM = {
			every_controlled_state = {
				limit = {
					BUL_is_balkan_state = yes
				}
				add_claim_by = ROOT
			}
		}
		create_wargoal = {
			type = annex_everything
			target = FROM
		}
	}

	option = { # Do Nothing
		name = bftb_bulgaria_balkan_federation.15.b

		ai_chance = {
			base = 10
		}
	}
}

#Demand Turkish Territories - Event for TUR
country_event = {
	id = bftb_bulgaria_balkan_federation.16
	title = bftb_bulgaria_balkan_federation.16.t
	desc = bftb_bulgaria_balkan_federation.16.desc
	picture = GFX_report_event_bul_boris_military

	is_triggered_only = yes

	option = { # Yield
		name = bftb_bulgaria_balkan_federation.16.a

		ai_chance = {
			factor = 10
			modifier = {
				factor = 10
				FROM = { is_faction_leader = no }
			}
			modifier = {
				factor = 100
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 90
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = {
				factor = 2
				FROM = { has_government = FROM }
			}
			modifier = {
				factor = 0
				OR = {
					has_war_with = FROM
					any_allied_country = {
						has_war_with = FROM
					}
				}			
			}
		}

		effect_tooltip = {
			custom_effect_tooltip = bftb_bulgaria_balkan_federation_turkish_states_tt
			every_controlled_state = {
				limit = {
					BUL_is_balkan_state = yes
				}
			}
		}
		hidden_effect = {
			FROM = {
				country_event = { id = bftb_bulgaria_balkan_federation.17 hours = 4 random_hours = 4 }
			}
		}
	}

	option = { # Refuse
		name = bftb_bulgaria_balkan_federation.16.b

		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 10
				has_opinion = {
					target = FROM
					value < 50
				}
			}
			modifier = {
				factor = 20
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
			modifier = {
				factor = 10
				has_war = no
			}
			modifier = {
				factor = 100
				is_faction_leader = yes
			}
		}

		effect_tooltip = {
			every_controlled_state = {
				limit = {
					BUL_is_balkan_state = yes
				}
				add_claim_by = FROM
			}
			FROM = {
				create_wargoal = {
					type = annex_everything
					target = ROOT
				}
			}
		}
		hidden_effect = {
			FROM = {
				country_event = { id = bftb_bulgaria_balkan_federation.18 hours = 4 random_hours = 4 }
			}
		}
	}
}

#Demand Turkish Territories - Turkey accepts - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.17
	title = bftb_bulgaria_balkan_federation.17.t
	desc = bftb_bulgaria_balkan_federation.17.desc
	picture = GFX_report_event_bul_soviet_army_sofia 

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.17.a

		effect_tooltip = {
			custom_effect_tooltip = bftb_bulgaria_balkan_federation_turkish_states_tt
			every_controlled_state = {
				limit = {
					BUL_is_balkan_state = yes
				}
			}
		}
		hidden_effect = {
			FROM = {
				every_controlled_state = {
					limit = {
						BUL_is_balkan_state = yes
					}
					ROOT = {
						transfer_state = PREV
						hidden_effect = {
							set_state_controller = PREV
						}
					}
				}
			}
		}	
	}
}

#Demand Turkish Territories - Turkey refuses - Event for BUL
country_event = {
	id = bftb_bulgaria_balkan_federation.18
	title = bftb_bulgaria_balkan_federation.18.t
	desc = bftb_bulgaria_balkan_federation.18.desc
	picture = GFX_report_event_bul_ff_troops_panzer 

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_balkan_federation.18.a

		TUR = {
			every_controlled_state = {
				limit = {
					BUL_is_balkan_state = yes
				}
				add_claim_by = ROOT
			}
			create_wargoal = {
				type = annex_everything
				target = FROM
			}
		}
	}
}


########    ###    ######## ########     #######  ########    ######## ##     ## ########    ########     ###    ##       ##    ##    ###    ##    ##  ######  
##         ## ##      ##    ##          ##     ## ##             ##    ##     ## ##          ##     ##   ## ##   ##       ##   ##    ## ##   ###   ## ##    ## 
##        ##   ##     ##    ##          ##     ## ##             ##    ##     ## ##          ##     ##  ##   ##  ##       ##  ##    ##   ##  ####  ## ##       
######   ##     ##    ##    ######      ##     ## ######         ##    ######### ######      ########  ##     ## ##       #####    ##     ## ## ## ##  ######  
##       #########    ##    ##          ##     ## ##             ##    ##     ## ##          ##     ## ######### ##       ##  ##   ######### ##  ####       ## 
##       ##     ##    ##    ##          ##     ## ##             ##    ##     ## ##          ##     ## ##     ## ##       ##   ##  ##     ## ##   ### ##    ## 
##       ##     ##    ##    ########     #######  ##             ##    ##     ## ########    ########  ##     ## ######## ##    ## ##     ## ##    ##  ######  


#Ultimatum to join faction - Event for Balkan nation
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.1
	title = bftb_bulgaria_fate_of_the_balkans.1.t
	desc = bftb_bulgaria_fate_of_the_balkans.1.desc
	picture = GFX_report_event_bul_boris_military 

	is_triggered_only = yes

	option = { # Accept
		name = bftb_bulgaria_fate_of_the_balkans.1.a

		ai_chance = {
			base = 20
			modifier = {
				factor = 5
				has_country_flag = { flag = BUL_fate_of_the_balkans_government_influenced_flag value > 4 }
			}
			modifier = {
				factor = 4
				has_country_flag = { flag = BUL_fate_of_the_balkans_government_influenced_flag value > 3 }
			}
			modifier = {
				factor = 2
				has_country_flag = { flag = BUL_fate_of_the_balkans_government_influenced_flag value > 2 }
			}
			modifier = {
				factor = 2
				has_country_flag = { flag = BUL_fate_of_the_balkans_government_influenced_flag value > 1 }
			}
			modifier = {
				factor = 1.5
				has_country_flag = { flag = BUL_fate_of_the_balkans_government_influenced_flag value > 0 }
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 2
				is_neighbor_of = FROM
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = {
				factor = 10
				strength_ratio = {
					tag = FROM
					ratio < 0.5
				}
			}
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
			modifier = {
				factor = 0
				strength_ratio = {
					tag = FROM
					ratio > 2
				}
			}
		}

		FROM = {
			hidden_effect = {
				country_event = bftb_bulgaria_fate_of_the_balkans.2
			}
			effect_tooltip = {
				add_to_faction = ROOT
			}
		}
		hidden_effect = {
			random_other_country = {
				limit = {
					is_in_faction_with = ROOT
					is_faction_leader = yes
				}
				country_event = bftb_bulgaria_fate_of_the_balkans.10
			}
		}
	}

	option = { # Refuse
		name = bftb_bulgaria_fate_of_the_balkans.1.b

		ai_chance = {
			base = 50
			modifier = {
				factor = 5
				has_government = communism
			}
			modifier = {
				factor = 2
				has_government = democratic
			}
			modifier = {
				factor = 2
				has_opinion = {
					target = FROM
					value < 0
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 50
				}
			}
			modifier = {
				factor = 10
				is_in_faction = yes
			}
			modifier = {
				factor = 5
				is_major = yes
			}
		}

		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_fate_of_the_balkans.3 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
				}
			}
		}
	}
}

#Country accepts to join - Event for BUL
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.2
	title = bftb_bulgaria_fate_of_the_balkans.2.t
	desc = bftb_bulgaria_fate_of_the_balkans.2.desc
	picture = GFX_report_event_bul_boris_military

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_fate_of_the_balkans.2.a

		add_to_faction = FROM
		FROM = { BUL_remove_balkan_opinion_modifiers = yes }
	}
}

#Country refuses invitation - Event for BUL
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.3
	title = bftb_bulgaria_fate_of_the_balkans.3.t
	desc = bftb_bulgaria_fate_of_the_balkans.3.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_fate_of_the_balkans.3.a

		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
		}
	}
}

#Bulgaria demands territory - Event for Bulgarian puppets
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.4
	title = bftb_bulgaria_fate_of_the_balkans.4.t
	desc = bftb_bulgaria_fate_of_the_balkans.4.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = { #Accept
		name = bftb_bulgaria_fate_of_the_balkans.4.a

		add_political_power = 50
		effect_tooltip = {
			FROM = {
				transfer_state = FROM.FROM
				hidden_effect = {
					set_state_controller = FROM.FROM
				}
				add_autonomy_score = {
					value = 300
					localization = BUL_transferred_bulgarian_state_autonomy_desc
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_fate_of_the_balkans.5 }
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_fate_of_the_balkans.4.b

		ai_chance = {
			factor = 0
		}

		add_stability = -0.1
		add_war_support = -0.05
		add_political_power = -100
		effect_tooltip = {
			FROM.FROM = {
				add_claim_by = FROM
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_fate_of_the_balkans.6 }
		}
	}
}

#Puppet transfers territory - Event for BUL
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.5
	title = bftb_bulgaria_fate_of_the_balkans.5.t
	desc = bftb_bulgaria_fate_of_the_balkans.5.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_fate_of_the_balkans.5.a

		transfer_state = FROM.FROM.FROM
		hidden_effect = {
			set_state_controller = FROM.FROM.FROM
		}
		FROM = {
			add_autonomy_score = {
				value = 300
				localization = BUL_transferred_bulgarian_state_autonomy_desc
			}
		}
	}
}

#Puppet refuses to transfer territory - Event for BUL
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.6
	title = bftb_bulgaria_fate_of_the_balkans.6.t
	desc = bftb_bulgaria_fate_of_the_balkans.6.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_fate_of_the_balkans.6.a

		FROM.FROM.FROM = {
			add_claim_by = ROOT
		}
	}
}

#Bulgaria demands submission of an ally - Event for Bulgarian allies
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.7
	title = bftb_bulgaria_fate_of_the_balkans.7.t
	desc = bftb_bulgaria_fate_of_the_balkans.7.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = { #Accept
		name = bftb_bulgaria_fate_of_the_balkans.7.a

		ai_chance = {
			base = 15
		}

		add_political_power = 150
		add_stability = 0.1
		effect_tooltip = {
			FROM = {
				puppet = ROOT
				remove_wargoal = {
					target = ROOT
					type = all
				}
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_fate_of_the_balkans.8 }
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_fate_of_the_balkans.7.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = {
				factor = 0
				strength_ratio = {
					tag = FROM
					ratio < 0.5
				}
			}
		}

		add_stability = -0.1
		add_political_power = -150
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_fate_of_the_balkans.9 }
		}
	}
}

#Ally submits to BUL - Event for BUL
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.8
	title = bftb_bulgaria_fate_of_the_balkans.8.t
	desc = bftb_bulgaria_fate_of_the_balkans.8.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_fate_of_the_balkans.8.a

		BUL_join_wars_of_from = yes

		puppet = FROM
		remove_wargoal = {
			target = FROM
			type = all
		}

		FROM = { BUL_remove_balkan_opinion_modifiers = yes }

		custom_effect_tooltip = germany.126.warning
	}
}

#Ally refuses to become a Bulgarian puppet - Event for BUL
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.9
	title = bftb_bulgaria_fate_of_the_balkans.9.t
	desc = bftb_bulgaria_fate_of_the_balkans.9.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	option = {
		name = bftb_bulgaria_fate_of_the_balkans.9.a

		ai_chance = {
			base = 10
		}

		custom_effect_tooltip = bftb_bulgaria_fate_of_the_balkans.9.a_cooldown_tt
	}

	option = {
		name = bftb_bulgaria_fate_of_the_balkans.9.b

		ai_chance = {
			base = 0
		}

		remove_from_faction = FROM
	}
}

#Bulgaria has pressured an ally to join their faction - Event for faction leader whose ally has join BUL's faction
country_event = {
	id = bftb_bulgaria_fate_of_the_balkans.10
	title = bftb_bulgaria_fate_of_the_balkans.10.t
	desc = bftb_bulgaria_fate_of_the_balkans.10.desc
	picture = GFX_report_event_finnish_letter

	is_triggered_only = yes

	#immediate = {
	#	hidden_effect = { log = "FROM.FROM is [FROM.FROM.GetName]"}
	#}

	option = {#Wargoal
		name = bftb_bulgaria_fate_of_the_balkans.10.a

		ai_chance = {
			base = 1
			modifier = {
				factor = 20
				strength_ratio = {
					tag = BUL
					ratio > 2
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = FROM
					value < 50
				}
			}
			modifier = { #Support IMRO is not cool bro
				factor = 2
				BUL = { has_completed_focus = BUL_support_macedonian_organizations }
			}
			modifier = { #Your coop with IMRO is just too much
				factor = 2
				BUL = { has_idea = BUL_imro_05 }
			}
			modifier = {
				factor = 5
				AND = {
					tag = ENG
					BUL_has_some_sort_of_bogdan_filov = yes
				}
			}
		}

		create_wargoal = {
			type = puppet_wargoal_focus
			target = BUL
		}
	}

	option = {#Nothing
		name = bftb_bulgaria_fate_of_the_balkans.10.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = { #We like that you condemn IMRO
				factor = 2
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 5
				BUL = { 
					NOT = {
						has_idea = BUL_imro_01
						has_idea = BUL_imro_04
						has_idea = BUL_imro_05
					}
				}
			}
		}
	}
}


########   #######  ##       #### ######## ####  ######     ###    ##          ##       ########    ###    ########  ######## ########   ######  
##     ## ##     ## ##        ##     ##     ##  ##    ##   ## ##   ##          ##       ##         ## ##   ##     ## ##       ##     ## ##    ## 
##     ## ##     ## ##        ##     ##     ##  ##        ##   ##  ##          ##       ##        ##   ##  ##     ## ##       ##     ## ##       
########  ##     ## ##        ##     ##     ##  ##       ##     ## ##          ##       ######   ##     ## ##     ## ######   ########   ######  
##        ##     ## ##        ##     ##     ##  ##       ######### ##          ##       ##       ######### ##     ## ##       ##   ##         ## 
##        ##     ## ##        ##     ##     ##  ##    ## ##     ## ##          ##       ##       ##     ## ##     ## ##       ##    ##  ##    ## 
##         #######  ######## ####    ##    ####  ######  ##     ## ########    ######## ######## ##     ## ########  ######## ##     ##  ######  


#The murder of Hristo Lukov
country_event = {
	id = bftb_bulgaria_political_leaders.1
	title = bftb_bulgaria_political_leaders.1.t
	desc = bftb_bulgaria_political_leaders.1.desc
	picture = GFX_report_event_generic_funeral

	mean_time_to_happen = {
		days = 3
		modifier = {
			factor = 300
			has_government = fascism
		}
		modifier = {
			factor = 100
			has_stability > 0.5
		}
		modifier = {
			factor = 100
			has_stability > 0.75
		}
		modifier = {
			factor = 10
			communism < 0.05
		}
		modifier = {
			factor = 100
			communism < 0.01
		}
		modifier = {
			factor = 0.5
			has_country_flag = BUL_fatherland_front_formed_flag
			NOT = { has_country_flag = BUL_ff_destroyed_flag }
		}
		modifier = {
			factor = 0.5
			has_government = communism
		}
	}

	trigger = {
		has_dlc = "Battle for the Bosporus"
		original_tag = BUL
		has_country_leader = { character = BUL_hristo_lukov ruling_only = no }
		date > 1943.02.10
	}

	fire_only_once = yes

	option = {#Get a new UBNL leader
		name = bftb_bulgaria_political_leaders.1.a

		trigger = {
			has_government = fascism
		}

		kill_ideology_leader = fascism
	}

	option = {#Get Aleksandar Tsankov as leader
		name = bftb_bulgaria_political_leaders.1.b

		trigger = {
			has_country_flag = BUL_nsm_integrated_flag
			has_government = fascism
		}

		kill_ideology_leader = fascism
		set_party_name = {
			ideology = fascism
			long_name = BUL_national_social_movement_party_long
			name = BUL_national_social_movement_party
		}
		add_country_leader_role = {
			character = BUL_aleksandar_tsankov
			country_leader = {
				expire = "1965.1.1"
				ideology = nazism
				traits = {
					the_bloody_professor
				}
			}
			promote_leader = yes
		}
	}

	option = {#Commie
		name = bftb_bulgaria_political_leaders.1.c

		trigger = {
			has_government = communism
		}

		kill_ideology_leader = fascism
	}

	option = {#Other ideologies
		name = bftb_bulgaria_political_leaders.1.d

		trigger = {
			OR = {
				has_government = democratic
				has_government = neutrality
			}
		}

		kill_ideology_leader = fascism
	}
}


 ######   ########  ######## ######## ##    ##    #### ##    ## ######## ##       ##     ## ######## ##    ##  ######  ######## 
##    ##  ##     ## ##       ##       ##   ##      ##  ###   ## ##       ##       ##     ## ##       ###   ## ##    ## ##       
##        ##     ## ##       ##       ##  ##       ##  ####  ## ##       ##       ##     ## ##       ####  ## ##       ##       
##   #### ########  ######   ######   #####        ##  ## ## ## ######   ##       ##     ## ######   ## ## ## ##       ######   
##    ##  ##   ##   ##       ##       ##  ##       ##  ##  #### ##       ##       ##     ## ##       ##  #### ##       ##       
##    ##  ##    ##  ##       ##       ##   ##      ##  ##   ### ##       ##       ##     ## ##       ##   ### ##    ## ##       
 ######   ##     ## ######## ######## ##    ##    #### ##    ## ##       ########  #######  ######## ##    ##  ######  ######## 


#Bulgaria asks GRE for a NA pact - Event for GRE
country_event = {
	id = bftb_bulgaria_greek_influence.1
	title = bftb_bulgaria_greek_influence.1.t
	desc = bftb_bulgaria_greek_influence.1.desc
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes

	option = { #Accept
		name = bftb_bulgaria_greek_influence.1.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value > 50
				}
			}
			modifier = {
				factor = 2
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 5
				BUL = { 
					NOT = {
						has_idea = BUL_imro_01
						has_idea = BUL_imro_04
						has_idea = BUL_imro_05
					}
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = BUL
					ratio < 1
				}
			}
			modifier = {
				factor = 5
				strength_ratio = {
					tag = BUL
					ratio < 0.5
				}
			}
			modifier = {
				factor = 0
				has_opinion = {
					target = BUL
					value < -50
				}
			}
		}

		add_political_power = 75

		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		add_opinion_modifier = { 
			target = FROM
			modifier = BUL_strengthened_relations_with_us
		}
		FROM = {
			add_opinion_modifier = { 
				target = ROOT
				modifier = BUL_strengthened_relations_with_us
			}
		}
		BUL_remove_balkan_opinion_modifiers = yes

		every_country = {
			limit = {
				BUL_country_can_influence_bulgaria = yes
				NOT = { is_in_faction_with = ROOT }
				NOT = { is_in_faction_with = FROM }
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_approached_greece
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_greek_influence.2 }
			news_event = { id = bftb_news.15 hours = 8 random_hours = 4 }
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_greek_influence.1.b

		ai_chance = {
			base = 5
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value < 0
				}
			}
			modifier = {
				factor = 5
				BUL = { has_completed_focus = BUL_support_macedonian_organizations }
			}
			modifier = { #Your coop with IMRO is just too much
				factor = 10
				BUL = { has_idea = BUL_imro_05 }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = BUL
					ratio > 2
				}
			}
		}

		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_rejected_our_proposal
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_greek_influence.3 }
		}
	}
}

#GRE accepts NA with BUL - Event for BUL
country_event = {
	id = bftb_bulgaria_greek_influence.2
	title = bftb_bulgaria_greek_influence.2.t
	desc = bftb_bulgaria_greek_influence.2.desc
	picture = GFX_report_event_gre_cabinet_meeting

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_greek_influence.2.a

		effect_tooltip = {
			diplomatic_relation = {
				country = FROM
				relation = non_aggression_pact
				active = yes
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_strengthened_relations_with_us
			}
			FROM = {
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_strengthened_relations_with_us
				}
			}
			every_country = {
				limit = {
					BUL_country_can_influence_bulgaria = yes
					NOT = { is_in_faction_with = ROOT }
					NOT = { is_in_faction_with = FROM }
				}
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_approached_greece
				}
			}
		}
	}
}

#GRE declines NA with BUL - Event for BUL
country_event = {
	id = bftb_bulgaria_greek_influence.3
	title = bftb_bulgaria_greek_influence.3.t
	desc = bftb_bulgaria_greek_influence.3.desc
	picture = GFX_report_event_gre_balkan_pact

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_greek_influence.3.a

		effect_tooltip = {
			add_opinion_modifier = {
				target = FROM
				modifier = BUL_rejected_our_proposal
			}
		}
	}
}


########  ########  #### ######## ####  ######  ##     ##    #### ##    ## ######## ##       ##     ## ######## ##    ##  ######  ######## 
##     ## ##     ##  ##     ##     ##  ##    ## ##     ##     ##  ###   ## ##       ##       ##     ## ##       ###   ## ##    ## ##       
##     ## ##     ##  ##     ##     ##  ##       ##     ##     ##  ####  ## ##       ##       ##     ## ##       ####  ## ##       ##       
########  ########   ##     ##     ##   ######  #########     ##  ## ## ## ######   ##       ##     ## ######   ## ## ## ##       ######   
##     ## ##   ##    ##     ##     ##        ## ##     ##     ##  ##  #### ##       ##       ##     ## ##       ##  #### ##       ##       
##     ## ##    ##   ##     ##     ##  ##    ## ##     ##     ##  ##   ### ##       ##       ##     ## ##       ##   ### ##    ## ##       
########  ##     ## ####    ##    ####  ######  ##     ##    #### ##    ## ##       ########  #######  ######## ##    ##  ######  ######## 


#Bulgaria asks ENG for a NA pact - Event for ENG
country_event = {
	id = bftb_bulgaria_british_influence.1
	title = bftb_bulgaria_british_influence.1.t
	desc = bftb_bulgaria_british_influence.1.desc
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes

	option = { #Accept
		name = bftb_bulgaria_british_influence.1.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value > 0
				}
			}
			modifier = {
				factor = 5
				has_opinion = {
					target = BUL
					value > 50
				}
			}
			modifier = {
				factor = 2
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 2
				BUL = { 
					NOT = {
						has_idea = BUL_imro_01
						has_idea = BUL_imro_04
						has_idea = BUL_imro_05
					}
				}
			}
			modifier = {
				factor = 0
				has_opinion = {
					target = BUL
					value < -50
				}
			}
		}

		add_political_power = 75
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		give_guarantee = FROM
		add_opinion_modifier = { 
			target = FROM
			modifier = BUL_strengthened_relations_with_us
		}
		FROM = {
			add_opinion_modifier = { 
				target = ROOT
				modifier = BUL_strengthened_relations_with_us
			}
		}
		every_country = {
			limit = {
				BUL_country_can_influence_bulgaria = yes
				NOT = { is_in_faction_with = ROOT }
				NOT = { is_in_faction_with = FROM }
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_approached_the_uk
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_british_influence.2 }
			news_event = { id = bftb_news.16 hours = 8 random_hours = 4 }
		}
	}

	option = { #Only NA
		name = bftb_bulgaria_british_influence.1.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 5
				has_opinion = {
					target = BUL
					value < 15
				}
			}
			modifier = {
				factor = 0.5
				has_opinion = {
					target = BUL
					value > 50
				}
			}
			modifier = {
				factor = 0
				has_opinion = {
					target = BUL
					value < -50
				}
			}
			modifier = {
				factor = 10
				BUL_has_some_sort_of_bogdan_filov = yes
			}
		}

		add_political_power = 25
		diplomatic_relation = {
			country = FROM
			relation = non_aggression_pact
			active = yes
		}
		add_opinion_modifier = { 
			target = FROM
			modifier = BUL_strengthened_relations_with_us
		}
		FROM = {
			add_opinion_modifier = { 
				target = ROOT
				modifier = BUL_strengthened_relations_with_us
			}
		}
		every_country = {
			limit = {
				BUL_country_can_influence_bulgaria = yes
				NOT = { is_in_faction_with = ROOT }
				NOT = { is_in_faction_with = FROM }
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_approached_the_uk
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_british_influence.3 }
			news_event = { id = bftb_news.16 hours = 8 random_hours = 4 }
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_british_influence.1.c

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				has_opinion = {
					target = BUL
					value < 0
				}
			}
			modifier = {
				factor = 2
				BUL = { has_completed_focus = BUL_support_macedonian_organizations }
			}
			modifier = { #Your coop with IMRO is just too much
				factor = 5
				BUL = { has_idea = BUL_imro_05 }
			}
			modifier = {
				factor = 5
				BUL_has_some_sort_of_bogdan_filov = yes
			}
		}

		FROM = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_rejected_our_proposal
			}
		}
		hidden_effect = {
			FROM = { country_event = bftb_bulgaria_british_influence.4 }
		}
	}
}

#ENG accepts Guaranteeing BUL (and NA) - Event for BUL
country_event = {
	id = bftb_bulgaria_british_influence.2
	title = bftb_bulgaria_british_influence.2.t
	desc = bftb_bulgaria_british_influence.2.desc
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_british_influence.2.a

		effect_tooltip = {
			diplomatic_relation = {
				country = FROM
				relation = non_aggression_pact
				active = yes
			}
			FROM = { give_guarantee = ROOT }
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_strengthened_relations_with_us
			}
			FROM = {
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_strengthened_relations_with_us
				}
			}
			every_country = {
				limit = {
					BUL_country_can_influence_bulgaria = yes
					NOT = { is_in_faction_with = ROOT }
					NOT = { is_in_faction_with = FROM }
				}
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_approached_greece
				}
			}
		}
	}
}

#ENG accepts NA with BUL - Event for BUL
country_event = {
	id = bftb_bulgaria_british_influence.3
	title = bftb_bulgaria_british_influence.3.t
	desc = bftb_bulgaria_british_influence.3.desc
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_british_influence.3.a

		effect_tooltip = {
			diplomatic_relation = {
				country = FROM
				relation = non_aggression_pact
				active = yes
			}
			add_opinion_modifier = { 
				target = FROM
				modifier = BUL_strengthened_relations_with_us
			}
			FROM = {
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_strengthened_relations_with_us
				}
			}
			every_country = {
				limit = {
					BUL_country_can_influence_bulgaria = yes
					NOT = { is_in_faction_with = ROOT }
					NOT = { is_in_faction_with = FROM }
				}
				add_opinion_modifier = { 
					target = ROOT
					modifier = BUL_approached_greece
				}
			}
		}
	}
}

#ENG declines NA with BUL - Event for BUL
country_event = {
	id = bftb_bulgaria_british_influence.4
	title = bftb_bulgaria_british_influence.4.t
	desc = bftb_bulgaria_british_influence.4.desc
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_british_influence.4.a

		effect_tooltip = {
			add_opinion_modifier = {
				target = FROM
				modifier = BUL_rejected_our_proposal
			}
		}
	}
}


########  ######## ##     ##  #######   ######  ########     ###    ######## ####  ######     ######## ##     ## ######## ##    ## ########  ######  
##     ## ##       ###   ### ##     ## ##    ## ##     ##   ## ##      ##     ##  ##    ##    ##       ##     ## ##       ###   ##    ##    ##    ## 
##     ## ##       #### #### ##     ## ##       ##     ##  ##   ##     ##     ##  ##          ##       ##     ## ##       ####  ##    ##    ##       
##     ## ######   ## ### ## ##     ## ##       ########  ##     ##    ##     ##  ##          ######   ##     ## ######   ## ## ##    ##     ######  
##     ## ##       ##     ## ##     ## ##       ##   ##   #########    ##     ##  ##          ##        ##   ##  ##       ##  ####    ##          ## 
##     ## ##       ##     ## ##     ## ##    ## ##    ##  ##     ##    ##     ##  ##    ##    ##         ## ##   ##       ##   ###    ##    ##    ## 
########  ######## ##     ##  #######   ######  ##     ## ##     ##    ##    ####  ######     ########    ###    ######## ##    ##    ##     ######  



#BUL Guarantees Country - Event for Balkan Nations
country_event = {
	id = bftb_bulgaria_democratic_international_policies.1
	title = bftb_bulgaria_democratic_international_policies.1.t
	desc = bftb_bulgaria_democratic_international_policies.1.desc
	picture = GFX_report_event_bul_military_parade_vidin

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_democratic_international_policies.1.a

		FROM = { give_guarantee = ROOT }
	}
}

#Balkan Confederation - BUL has made an industrial investement in the country - Event for Balkan Nations
country_event = {
	id = bftb_bulgaria_democratic_international_policies.2
	title = bftb_bulgaria_democratic_international_policies.2.t
	desc = bftb_bulgaria_democratic_international_policies.2.desc
	picture = GFX_report_event_bul_officers_burgas

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_democratic_international_policies.2.a

		add_popularity = {
			ideology = democratic
			popularity = 0.1
		}
		random_owned_controlled_state = {
			limit = {
				has_state_flag = BUL_industrial_investement_target
			}
			add_extra_state_shared_building_slots = 1
			add_building_construction = {
				type = industrial_complex
				level = 1
				instant_build = yes
			}
		}
	}
}

#Balkan Confederation - Bulgarian capitalists are lobbying the government - Event for Balkan Nations
country_event = {
	id = bftb_bulgaria_democratic_international_policies.3
	title = bftb_bulgaria_democratic_international_policies.3.t
	desc = bftb_bulgaria_democratic_international_policies.3.desc
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_democratic_international_policies.3.a

		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}
		add_timed_idea = {
			idea = BUL_bulgarian_capital_injection
			days = 120
		}
	}
}

#Assert our Claims - Bulgaria asks to core controlled historical claims and bring back any Bulgarian initial state controlled by an ally - Event for ENG
country_event = {
	id = bftb_bulgaria_democratic_international_policies.4
	title = bftb_bulgaria_democratic_international_policies.4.t
	desc = bftb_bulgaria_democratic_international_policies.4.desc
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes

	option = { #Accept
		name = bftb_bulgaria_democratic_international_policies.4.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				BUL = { 
					any_war_score > 5
				}
			}
			modifier = {
				factor = 2
				BUL = { 
					any_war_score > 10
				}
			}
			modifier = {
				factor = 2
				BUL = { 
					any_war_score > 15
				}
			}
			modifier = {
				factor = 5
				BUL = { 
					any_war_score > 20
				}
			}
			modifier = {
				factor = 10
				BUL = { 
					any_war_score > 30
				}
			}
			modifier = {
				factor = 10
				BUL = { 
					any_war_score > 50
				}
			}
			modifier = {
				factor = 5
				BUL = { 
					casualties > 10000
				}
			}
			modifier = {
				factor = 10
				BUL = { 
					casualties > 100000
				}
			}
			modifier = { #We like that you condemn IMRO
				factor = 2
				BUL = { has_completed_focus = BUL_condemn_macedonian_organizations }
			}
			modifier = { #You have tried
				factor = 5
				BUL = { 
					NOT = {
						has_idea = BUL_imro_01
						has_idea = BUL_imro_04
						has_idea = BUL_imro_05
					}
				}
			}
		}

		effect_tooltip = {
			custom_effect_tooltip = bftb_bulgaria_democratic_international_policies.4_tt
			every_state = {
				limit = {
					has_state_flag = BUL_initial_bulgarian_state_flag
					NOT = { is_controlled_by = BUL }
					controller = {
						is_in_faction_with = BUL
						has_full_control_of_state = PREV
					}
				}
				controller = {
					add_opinion_modifier = {
						target = ENG
						modifier = BUL_territorial_arbitration_negative
					}
				}
			}
			BUL = {
				add_opinion_modifier = {
					target = ENG
					modifier = BUL_territorial_arbitration
				}
			}
		}
	}

	option = { #Refuse
		name = bftb_bulgaria_democratic_international_policies.4.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				BUL = { 
					any_war_score < 5
				}
			}
			modifier = {
				factor = 300
				BUL = { 
					any_war_score < 1
				}
			}
			modifier = {
				factor = 100
				BUL = { 
					casualties < 1000
				}
			}
			modifier = { #Support IMRO is not cool bro
				factor = 10
				BUL = { has_completed_focus = BUL_support_macedonian_organizations }
			}
			modifier = { #Your coop with IMRO is just too much
				factor = 10
				BUL = { has_idea = BUL_imro_05 }
			}
			modifier = {
				factor = 10
				BUL_has_some_sort_of_bogdan_filov = yes
			}
		}

		BUL = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_bulgarian_claims_not_recognized
			}
		}
	}
}

#Assert our Claims - ENG Accepts - Event for BUL
country_event = {
	id = bftb_bulgaria_democratic_international_policies.5
	title = bftb_bulgaria_democratic_international_policies.5.t
	desc = bftb_bulgaria_democratic_international_policies.5.desc
	picture = GFX_report_event_generic_sign_treaty3

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_democratic_international_policies.5.a

		custom_effect_tooltip = bftb_bulgaria_democratic_international_policies.4_tt
		every_state = {
			limit = {
				has_state_flag = BUL_initial_bulgarian_state_flag
				NOT = { is_controlled_by = BUL }
				controller = {
					is_in_faction_with = BUL
					has_full_control_of_state = PREV
				}
			}
			hidden_effect = {
				BUL = {
					transfer_state = PREV
					set_state_controller = PREV
				}
			}
		}
	}
}

#Assert our Claims - ENG Refuses - Event for BUL
country_event = {
	id = bftb_bulgaria_democratic_international_policies.6
	title = bftb_bulgaria_democratic_international_policies.6.t
	desc = bftb_bulgaria_democratic_international_policies.6.desc
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_democratic_international_policies.6.a

		add_opinion_modifier = {
			target = ENG
			modifier = BUL_bulgarian_claims_not_recognized
		}
	}
}

#Assert our Claims - Transferred formerly Bulgarian states to BUL - Event for allies controlling any Bulgarian initial state
country_event = {
	id = bftb_bulgaria_democratic_international_policies.7
	title = bftb_bulgaria_democratic_international_policies.7.t
	desc = bftb_bulgaria_democratic_international_policies.7.desc
	picture = GFX_report_event_bul_troops_dobrudja

	is_triggered_only = yes

	option = { #Ok
		name = bftb_bulgaria_democratic_international_policies.7.a

		add_opinion_modifier = {
			target = ENG
			modifier = BUL_territorial_arbitration_negative
		}
	}
}
