﻿add_namespace = BUL
add_namespace = MAC

# Boris dies
country_event = {
	id = BUL.1000
	title = BUL.1000.t
	desc = BUL.1000.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.1000" }

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = BUL.1000.a
		remove_ideas = BUL_king_of_rubies_without_shine
		if = {
			limit = {
				has_country_leader = {
					character = BUL_Boris_III
					ruling_only = yes
				}
			}
			if = {
				limit = {
					has_government = ultranationalism
				}
				BUL_Simeon_II = {
					promote_character = despotism_civilian_dictatorship_subtype
				}
				set_country_leader_description = {
					ideology = despotism
					desc = "POLITICS_SIMEON_II_BORIS_DEATH_DESC"
				}
				set_politics = {
					ruling_party = despotism
				}
				add_popularity = {
					ideology = ultranationalism
					popularity = -0.07
				}
				remove_all_ministers = yes
				add_ideas = {
					BUL_Stefan_Popov_hog
					BUL_Stanislav_Balan_for
					BUL_Petar_Aladzhov_eco
					BUL_Rafail_Zhechev_sec
				}
				remove_ideas = BUL_rusting_sword_of_damocles
				hidden_effect = {
					every_country = {
						limit = { is_ai = no }
						news_event = { id = BUL_NEWS.5 }
					}
				}
			}
			else = {
				add_country_leader_role = {
					character = BUL_Simeon_II
					promote_leader = yes
					country_leader = {
						#desc = "POLITICS_DESC_SIMEON_II"
						ideology = paternalism_semi_constitutional_monarchy_subtype
						traits = { }
						expire = "1999.1.1.1"
						id = -1
					}
				}
				set_country_leader_description = {
					ideology = paternalism
					desc = "POLITICS_SIMEON_II_BORIS_DEATH_DESC"
				}
				set_politics = {
					ruling_party = paternalism
				}
				set_party_name = {
					ideology = paternalism
					long_name = BUL_despotism_party_long
					name = BUL_despotism_party
				}
				add_popularity = {
					ideology = paternalism
					popularity = 0.2
				}
				remove_all_ministers = yes
				add_ideas = {
					BUL_Petar_Uvaliev_hog
					BUL_Stefan_Savov_for
					BUL_Petar_Aladzhov_eco
					BUL_Stefan_Popov_sec
				}
				remove_ideas = BUL_rusting_sword_of_damocles
				hidden_effect = {
					every_country = {
						limit = { is_ai = no }
						news_event = { id = BUL_NEWS.4 }
					}
				}
			}
		}
		retire_character = BUL_Boris_III
	}
}

# Second Bulgarian War
country_event = {
	id = BUL.1
	title = BUL.1.t
	desc = BUL.1.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.1" }

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = BUL.1.a
		1271 = {
			set_demilitarized_zone = yes
		}
		1714 = {
			set_demilitarized_zone = yes
		}
		1985 = {
			set_demilitarized_zone = yes
		}
		country_event = { id = BUL.2 days = 365 }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.1 }
			}
		}
	}
}

country_event = {
	id = BUL.2
	title = BUL.2.t
	desc = BUL.2.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.2" }
	immediate = { remove_ideas = BUL_empires_cradle_now_a_grave }
	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = BUL.2.a
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_MAC_CRISIS option = BUL_MAC_CRISIS_BORIS_FLEES }
			}
		}
		1271 = {
			set_demilitarized_zone = no
		}
		1985 = {
			set_demilitarized_zone = no
		}
		1714 = {
			set_demilitarized_zone = no
		}
		add_popularity = {
			ideology = despotism
			popularity = 0.15
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Dimitar_Peshev_hog
			BUL_Petar_Uvaliev_for
			BUL_Petar_Aladzhov_eco
			BUL_Stefan_Popov_sec
		}
		country_event = { id = BUL.20 days = 730 }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.2 }
			}
		}
	}
	option = {
		name = BUL.2.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_MAC_CRISIS option = BUL_MAC_CRISIS_QUIET }
			}
		}
		1271 = {
			set_demilitarized_zone = no
		}
		1985 = {
			set_demilitarized_zone = no
		}
		1714 = {
			set_demilitarized_zone = no
		}
		1271 = {
			transfer_state_to = MAC
		}
		1985 = {
			transfer_state_to = MAC
		}
		1714 = {
			transfer_state_to = MAC
		}
		MAC = {
			load_oob = "MAC_uprising"
			if = {
				limit = { has_game_rule = { rule = BUL_MAC_WAR_PATH option = RULE_OPTION_BUL_MAC_WAR_PATH_MACEDONIA_VICTORY } }
				capital_scope = {
					create_unit = {
						division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = MAC
					}
					create_unit = {
						division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = MAC
					}
					create_unit = {
						division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = MAC
					}
					create_unit = {
						division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = MAC
					}
					create_unit = {
						division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = MAC
					}
					create_unit = {
						division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = MAC
					}
				}
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = 3000
					producer = MAC
				}
				add_equipment_to_stockpile = {
					type = artillery_equipment
					amount = 400
					producer = MAC
				}
				add_equipment_to_stockpile = {
					type = support_equipment
					amount = 1200
					producer = MAC
				}
			}
		}
		remove_ideas = BUL_king_of_rubies_without_shine
		retire_country_leader = yes
		BUL_Simeon_II = {
			promote_character = despotism_civilian_dictatorship_subtype
		}
		set_country_leader_description = {
			ideology = despotism
			desc = "POLITICS_SIMEON_II_BORIS_FLIGHT_DESC"
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Konstantin_Stoyanov_hog
			BUL_Asen_Kantardzhiev_for
			BUL_Stefan_Klechkov_eco
			BUL_Todor_Zhekov_sec
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.15
		}
		add_popularity = {
			ideology = national_socialism
			popularity = 0.12
		}
		add_popularity = {
			ideology = paternalism
			popularity = 0.07
		}
		add_popularity = {
			ideology = socialist
			popularity = 0.07
		}
		add_popularity = {
			ideology = communist
			popularity = 0.07
		}
		country_event = { id = BUL.21 days = 180 }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.6 }
			}
		}
		if = {
			limit = {
				NOT = { has_global_flag = goering_betrayed_allies }
			}
			BUL = {
				add_ideas = Pakt_Bundnispartner
				GER = { add_to_faction = BUL }
				econ_join_sphere_GER = yes
				if = {
					limit = { has_global_flag = german_civil_war_speervic }
					join_zollverein = yes
				}
			}
		}
	}
}

country_event = {
	id = BUL.20
	title = BUL.20.t
	desc = BUL.20.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.20" }

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = BUL.20.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_BORIS_III_PATH option = BUL_BORIS_III_PATH_DESPOTISM }
			}
		}
		set_politics = {
			ruling_party = ultranationalism
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Military_Directed }
		econ_subtype_change = yes
		add_popularity = {
			ideology = ultranationalism
			popularity = 0.15
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Jordan_Sevov_hog
			BUL_Stanislav_Balan_for
			BUL_Stefan_Popov_eco
			BUL_Rafail_Zhechev_sec
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.3 }
			}
		}
	}

	option = {
		name = BUL.20.b
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_BORIS_III_PATH option = BUL_BORIS_III_PATH_ULTRAMILITARISM }
			}
		}
	}
}

country_event = {
	id = BUL.21
	title = BUL.21.t
	desc = BUL.21.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.21" }

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = BUL.21.a
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_MAC_NEGOTIATION_OUTCOME option = BUL_MAC_NEGOTIATION_OUTCOME_WAR }
			}
		}
		BUL_Simeon_II = {
			promote_character = paternalism_left_wing_corporatism_subtype
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Kimon_Georgiev_hog
			BUL_Todor_Zhivkov_for
			BUL_Nikola_Petkov_eco
			BUL_Vladimir_Stoychev_sec
		}
		set_party_name = {
			ideology = communist
			long_name = BUL_FF_communist_party_long
			name = BUL_FF_communist_party
		}
		set_party_name = {
			ideology = socialist
			long_name = BUL_FF_socialist_party_long
			name = BUL_FF_socialist_party
		}
		set_party_name = {
			ideology = progressivism
			long_name = BUL_FF_progressivism_party_long
			name = BUL_FF_progressivism_party
		}
		set_party_name = {
			ideology = paternalism
			long_name = BUL_FF_paternalism_party_long
			name = BUL_FF_paternalism_party
		}
		set_politics = {
			ruling_party = paternalism
		}
		add_popularity = {
			ideology = paternalism
			popularity = 0.1
		}
		add_popularity = {
			ideology = socialist
			popularity = 0.1
		}
		add_popularity = {
			ideology = communist
			popularity = 0.1
		}
		add_popularity = {
			ideology = fascism
			popularity = -0.15
		}
		add_popularity = {
			ideology = national_socialism
			popularity = -0.15
		}
		add_popularity = {
			ideology = despotism
			popularity = -0.5
		}
		country_event = { id = BUL.22 days = 548 }
		remove_ideas = {
			BUL_endless_roots_of_radicals
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.7 }
			}
		}
		remove_ideas = BUL_rusting_sword_of_damocles
		remove_ideas = BUL_endless_roots_of_radicals
	}
	option = {
		name = BUL.21.b
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_MAC_NEGOTIATION_OUTCOME option = BUL_MAC_NEGOTIATION_OUTCOME_READY_TO_NEGOTIATE }
			}
		}
		country_event = { id = BUL.3 days = 548 }
	}
}

country_event = {
	id = BUL.22
	title = BUL.22.t
	desc = BUL.22.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.22" }

	fire_only_once = yes
	is_triggered_only = yes

	option = { #Federation
		name = BUL.22.a
		ai_chance = {
			factor = 45
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = BUL_MAC_NEGOTIATION_PATH option = BUL_MAC_NEGOTIATION_PATH_FAILED }
					has_game_rule = { rule = BUL_MAC_NEGOTIATION_PATH option = BUL_MAC_NEGOTIATION_PATH_AUTONOMY }
				}
			}
		}
		puppet = MAC
		MAC = {
			country_event = { id = MAC.1 }
			econ_join_sphere_GER = yes
			add_ideas = Pakt_Mitstreiter
			if = {
				limit = { has_global_flag = german_civil_war_speervic }
				join_zollverein = yes
			}
		}
		country_event = { id = BUL.23 days = 730 }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.12 }
			}
		}
	}

	option = { #Autonomy
		name = BUL.22.b
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = BUL_MAC_NEGOTIATION_PATH option = BUL_MAC_NEGOTIATION_PATH_FAILED }
					has_game_rule = { rule = BUL_MAC_NEGOTIATION_PATH option = BUL_MAC_NEGOTIATION_PATH_FEDERATION }
				}
			}
		}
		annex_country = {
			target = MAC
			transfer_troops = no
		}
		1271 = {
			set_demilitarized_zone = yes
		}
		1985 = {
			set_demilitarized_zone = yes
		}
		1714 = {
			set_demilitarized_zone = yes
		}
		country_event = { id = BUL.23 days = 730 }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.13 }
			}
		}
	}

	option = { #Failed
		name = BUL.22.c
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = BUL_MAC_NEGOTIATION_PATH option = BUL_MAC_NEGOTIATION_PATH_AUTONOMY }
					has_game_rule = { rule = BUL_MAC_NEGOTIATION_PATH option = BUL_MAC_NEGOTIATION_PATH_FEDERATION }
				}
			}
		}
		MAC = {
			set_politics = {
				ruling_party = communist
			}
			set_cosmetic_tag = MAC_peoples_republic
			remove_all_ministers = yes
			add_ideas = {
				MAC_Lazar_Kolisevski_hog
				MAC_Lazar_Mojsov_for
				MAC_Angel_Chemerski_eco
				MAC_Tihomir_Milosevski_sec
			}
		}
		if = {
			limit = { has_game_rule = { rule = BUL_MAC_WAR_PATH option = RULE_OPTION_BUL_MAC_WAR_PATH_MACEDONIA_VICTORY } }
			capital_scope = {
				create_unit = {
					division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
					owner = MAC
				}
				create_unit = {
					division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
					owner = MAC
				}
				create_unit = {
					division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
					owner = MAC
				}
				create_unit = {
					division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
					owner = MAC
				}
				create_unit = {
					division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
					owner = MAC
				}
				create_unit = {
					division = "name = \"Divizija na NOVM\" division_template = \"Divizija na NOVM\" start_experience_factor = 0.8 start_equipment_factor = 1"
					owner = MAC
				}
			}
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 3000
				producer = MAC
			}
			add_equipment_to_stockpile = {
				type = artillery_equipment
				amount = 400
				producer = MAC
			}
			add_equipment_to_stockpile = {
				type = support_equipment
				amount = 1200
				producer = MAC
			}
		}
		country_event = { id = BUL.23 days = 730 }
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.15 }
			}
		}
	}

	option = { #Holy Shit Bulgaroslavia
		name = BUL.22.d
		trigger = {
			SER = {
				has_country_leader = {
					character = SER_Josip_Broz_Tito
					ruling_only = yes
				}
			}
		}
		ai_chance = {
			factor = 0
		}
		BUL = {
			BUL_Stancho_Chokalov = {
				set_nationality = SER
			}
			BUL_Dimo_Kamasov = {
				set_nationality = SER
			}
			BUL_Gavril_Genov = {
				set_nationality = SER
			}
			BUL_Krum_Lekarski = {
				set_nationality = SER
			}
			BUL_Georgi_Mihov_Dimitrov = {
				set_nationality = SER
			}
			BUL_Tsenko_Barev = {
				set_nationality = SER
			}
			BUL_Milan_Drenchev = {
				set_nationality = SER
			}
			BUL_Borislav_Baychev = {
				set_nationality = SER
			}
			BUL_Stanko_Todorov = {
				set_nationality = SER
			}
			BUL_Petar_Mladenov = {
				set_nationality = SER
			}
			BUL_Alexandar_Lilov = {
				set_nationality = SER
			}
			BUL_Dobri_Dzhurov = {
				set_nationality = SER
			}
			BUL_Todor_Zhivkov = {
				set_nationality = SER
			}
			BUL_Nikola_Petkov = {
				set_nationality = SER
			}
		}
		MAC = {
			MAC_Metodija_Andonov_Cento = {
				set_nationality = SER
			}
			MAC_Mihajlo_Apostolski = {
				set_nationality = SER
			}
			MAC_Metodija_Shatorov_Sharlo = {
				set_nationality = SER
			}
			MAC_Dragan_Bogdanovski = {
				set_nationality = SER
			}
			MAC_Kiro_Gligorov = {
				set_nationality = SER
			}
			MAC_Lazar_Kolisevski = {
				set_nationality = SER
			}
			MAC_Lazar_Mojsov = {
				set_nationality = SER
			}
			MAC_Angel_Chemerski = {
				set_nationality = SER
			}
			MAC_Tihomir_Milosevski = {
				set_nationality = SER
			}
		}
		SER = {
			annex_country = {
				target = BUL
				transfer_troops = yes
			}
			annex_country = {
				target = MAC
				transfer_troops = yes
			}
			set_cosmetic_tag = SER_BALKAN
			set_popularities = {
				communist = 52
				socialist = 33
				progressivism = 9
				despotism = 6
			}
			set_party_name = {
				ideology = communist
				long_name = SER_communist_party_bulgaroslavia_long
				name = SER_communist_party_bulgaroslavia
			}
			set_party_name = {
				ideology = socialist
				long_name = SER_communist_party_bulgaroslavia_long
				name = SER_communist_party_bulgaroslavia
			}
			set_party_name = {
				ideology = progressivism
				long_name = SER_communist_party_bulgaroslavia_long
				name = SER_communist_party_bulgaroslavia
			}
			add_country_leader_role = {
				character = SER_Yugoslavia_Provisional_Government
				country_leader = {
					expire = "1999.1.1.1"
					ideology = communist_subtype
					traits = { }
				}
				promote_leader = yes
			}
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.14 }
			}
		}
	}
}

country_event = {
	id = BUL.23
	title = BUL.23.t
	desc = BUL.23.desc
	picture = x

	immediate = {
		log = "[GetDateText]: [Root.GetName]: event BUL.23"
	}
	fire_only_once = yes
	is_triggered_only = yes

	option = {#BKP
		name = BUL.23.a
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_PATERNALISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_MONARCHISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_SOCIALISM }
				}
			}
		}
		meta_effect = { #sets up next election date in country ui
			text = {
				set_politics = {
					ruling_party = communist
					last_election = "[current_election_date]"
					elections_allowed = yes
					election_frequency = 48
				}
			}
			current_election_date = "[?global.date.GetDateStringNoHour]"
		}
		add_popularity = {
			ideology = communist
			popularity = 0.2
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes
		remove_all_ministers = yes
		add_ideas = {
			BUL_Stanko_Todorov_hog
			BUL_Petar_Mladenov_for
			BUL_Alexandar_Lilov_eco
			BUL_Dobri_Dzhurov_sec
		}
		remove_ideas = {
			BUL_king_of_rubies_without_shine
			BUL_empires_cradle_now_a_grave
			BUL_king_of_rubies_without_shine
			BUL_endless_roots_of_radicals
		}
		set_cosmetic_tag = BUL_republic
		promote_character = BUL_Hristo_Stoykov
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.16 }
			}
		}
		remove_ideas = { Pakt_Mitstreiter }
		leave_faction = yes
		econ_leave_sphere = yes
		remove_faction_status = yes
		if = {
			limit = { has_global_flag = german_civil_war_speervic }
			leave_zollverein = yes
		}
		MAC = {
			if = {
				limit = {
					is_puppet_of = BUL
				}
				econ_leave_sphere = yes
				leave_faction = yes
				remove_faction_status = yes
			}
		}
	}

	option = {#BZNS
		name = BUL.23.b
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_PATERNALISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_MONARCHISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_COMMUNISM }
				}
			}
		}
		remove_ideas = { Pakt_Mitstreiter }
		leave_faction = yes
		econ_leave_sphere = yes
		remove_faction_status = yes
		if = {
			limit = { has_global_flag = german_civil_war_speervic }
			leave_zollverein = yes
		}
		MAC = {
			if = {
				limit = {
					is_puppet_of = BUL
				}
				econ_leave_sphere = yes
				leave_faction = yes
				remove_faction_status = yes
			}
			if = {
				limit = { has_global_flag = german_civil_war_speervic }
				leave_zollverein = yes
			}
		}
		if = {
			limit = {
				NOT = { ITA = { has_government = fascism } }
			}
			BUL = {
				get_current_government_type = yes
				save_party_popularities = yes
			}
			ITA = {
				set_autonomy = {
					target = BUL
					autonomy_state = autonomy_italy_associate
				}
			}
			BUL = {
				restore_previous_government_type = yes
				apply_party_popularities = yes
			}
			econ_join_sphere_ITA = yes
			MAC = {
				if = {
					limit = {
						is_puppet_of = BUL
					}
					econ_join_sphere_ITA = yes
				}
				if = {
					limit = {
						USA = { is_faction_leader = yes }
						ITA = { is_in_faction_with = USA }
					}
					add_ideas = OFN_Dependent_Member
				}
				else_if = {
					limit = {
						JAP = { is_faction_leader = yes }
						ITA = { is_in_faction_with = JAP }
					}
					add_ideas = Sphere_Economic_Dependent
				}
			}
			if = {
				limit = {
					USA = { is_faction_leader = yes }
					ITA = { is_in_faction_with = USA }
				}
				add_ideas = OFN_Independent_Member
			}
			else_if = {
				limit = {
					JAP = { is_faction_leader = yes }
					ITA = { is_in_faction_with = JAP }
				}
				add_ideas = Sphere_Coequal
			}
		}
		meta_effect = { #sets up next election date in country ui
			text = {
				set_politics = {
					ruling_party = socialist
					last_election = "[current_election_date]"
					elections_allowed = yes
					election_frequency = 48
				}
			}
			current_election_date = "[?global.date.GetDateStringNoHour]"
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Socialized_Economy }
		econ_subtype_change = yes
		add_popularity = {
			ideology = socialist
			popularity = 0.2
		}
		add_popularity = {
			ideology = progressivism
			popularity = 0.12
		}
		add_popularity = {
			ideology = liberalism
			popularity = 0.12
		}
		add_popularity = {
			ideology = liberal_conservatism
			popularity = 0.12
		}
		add_popularity = {
			ideology = conservatism
			popularity = 0.12
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Georgi_Mihov_Dimitrov_hog
			BUL_Tsenko_Barev_for
			BUL_Milan_Drenchev_eco
			BUL_Borislav_Baychev_sec
		}
		set_cosmetic_tag = BUL_republic
		promote_character = BUL_Hristo_Stoykov
		set_party_name = {
			ideology = communist
			long_name = BUL_communist_party_long
			name = BUL_communist_party
		}
		set_party_name = {
			ideology = socialist
			long_name = BUL_socialist_party_long
			name = BUL_socialist_party
		}
		set_party_name = {
			ideology = progressivism
			long_name = BUL_progressivism_party_long
			name = BUL_progressivism_party
		}
		set_party_name = {
			ideology = paternalism
			long_name = BUL_paternalism_party_long
			name = BUL_paternalism_party
		}
		remove_ideas = {
			BUL_king_of_rubies_without_shine
			BUL_empires_cradle_now_a_grave
			BUL_king_of_rubies_without_shine
			BUL_endless_roots_of_radicals
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.17 }
			}
		}
	}

	option = {#Zveno
		name = BUL.23.c
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_SOCIALISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_MONARCHISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_COMMUNISM }
				}
			}
		}
		meta_effect = { #sets up next election date in country ui
			text = {
				set_politics = {
					ruling_party = paternalism
					last_election = "[current_election_date]"
					elections_allowed = yes
					election_frequency = 48
				}
			}
			current_election_date = "[?global.date.GetDateStringNoHour]"
		}
		remove_ideas = { Pakt_Mitstreiter }
		leave_faction = yes
		econ_leave_sphere = yes
		remove_faction_status = yes
		if = {
			limit = { has_global_flag = german_civil_war_speervic }
			leave_zollverein = yes
		}
		MAC = {
			if = {
				limit = {
					is_puppet_of = BUL
				}
				econ_leave_sphere = yes
				leave_faction = yes
				remove_faction_status = yes
			}
			if = {
				limit = { has_global_flag = german_civil_war_speervic }
				leave_zollverein = yes
			}
		}
		BUL = {
			get_current_government_type = yes
			save_party_popularities = yes
		}
		ITA = {
			set_autonomy = {
				target = BUL
				autonomy_state = autonomy_italy_associate
			}
		}
		BUL = {
			restore_previous_government_type = yes
			apply_party_popularities = yes
		}
		econ_join_sphere_ITA = yes
		MAC = {
			if = {
				limit = {
					is_puppet_of = BUL
				}
				econ_join_sphere_ITA = yes
			}
			if = {
				limit = {
					USA = { is_faction_leader = yes }
					ITA = { is_in_faction_with = USA }
				}
				add_ideas = OFN_Dependent_Member
			}
			else_if = {
				limit = {
					JAP = { is_faction_leader = yes }
					ITA = { is_in_faction_with = JAP }
				}
				add_ideas = Sphere_Economic_Dependent
			}
		}

		if = {
			limit = {
				USA = { is_faction_leader = yes }
				ITA = { is_in_faction_with = USA }
			}
			add_ideas = OFN_Independent_Member
		}
		else_if = {
			limit = {
				JAP = { is_faction_leader = yes }
				ITA = { is_in_faction_with = JAP }
			}
			add_ideas = Sphere_Coequal
		}
		add_popularity = {
			ideology = paternalism
			popularity = 0.2
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Stancho_Chokalov_hog
			BUL_Dimo_Kamasov_for
			BUL_Gavril_Genov_eco
			BUL_Krum_Lekarski_sec
		}
		set_cosmetic_tag = BUL_republic
		promote_character = BUL_Hristo_Stoykov
		set_party_name = {
			ideology = communist
			long_name = BUL_communist_party_long
			name = BUL_communist_party
		}
		set_party_name = {
			ideology = socialist
			long_name = BUL_socialist_party_long
			name = BUL_socialist_party
		}
		set_party_name = {
			ideology = progressivism
			long_name = BUL_progressivism_party_long
			name = BUL_progressivism_party
		}
		set_party_name = {
			ideology = paternalism
			long_name = BUL_paternalism_party_long
			name = BUL_paternalism_party
		}
		remove_ideas = {
			BUL_king_of_rubies_without_shine
			BUL_empires_cradle_now_a_grave
			BUL_king_of_rubies_without_shine
			BUL_endless_roots_of_radicals
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.18 }
			}
		}
	}

	option = {#Monarchists
		name = BUL.23.d
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_SOCIALISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_PATERNALISM }
					has_game_rule = { rule = BUL_ELECTION_OUTCOME option = BUL_ELECTION_OUTCOME_COMMUNISM }
				}
			}
		}
		set_politics = {
			ruling_party = despotism
		}
		set_country_leader_description = {
			ideology = despotism
			desc = "POLITICS_SIMEON_II_RESTORATION_DESC"
		}
		add_popularity = {
			ideology = despotism
			popularity = 0.15
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Nikola_Geshev_hog
			BUL_Generic_Vacant_for
			BUL_Generic_Vacant_eco
			BUL_Generic_Vacant_sec
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.19 }
			}
		}
	}
}

country_event = {
	id = BUL.3
	title = BUL.3.t
	desc = BUL.3.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.3" }

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = BUL.3.a
		leave_faction = yes
		declare_war_on = {
			target = MAC
			type = annex_everything
		}
		country_event = { id = BUL.31 days = 180 }
		hidden_effect = {
			if = {
				limit = { has_game_rule = { rule = BUL_MAC_WAR_PATH option = RULE_OPTION_BUL_MAC_WAR_PATH_BULGARIA_VICTORY } }
				capital_scope = {
					create_unit = {
						division = "name = \"Obštovojskovi Kamion Divizija\" division_template = \"Obštovojskovi Kamion Divizija\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = BUL
					}
					create_unit = {
						division = "name = \"Obštovojskovi Kamion Divizija\" division_template = \"Obštovojskovi Kamion Divizija\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = BUL
					}
					create_unit = {
						division = "name = \"Konna Bǎrza Divizija\" division_template = \"Konna Bǎrza Divizija\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = BUL
					}
					create_unit = {
						division = "name = \"Konna Bǎrza Divizija\" division_template = \"Konna Bǎrza Divizija\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = BUL
					}
					create_unit = {
						division = "name = \"Pekhotna Divizija\" division_template = \"Pekhotna Divizija\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = BUL
					}
					create_unit = {
						division = "name = \"Pekhotna Divizija\" division_template = \"Pekhotna Divizija\" start_experience_factor = 0.8 start_equipment_factor = 1"
						owner = BUL
					}
				}
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = 3000
					producer = BUL
				}
				add_equipment_to_stockpile = {
					type = artillery_equipment
					amount = 400
					producer = BUL
				}
				add_equipment_to_stockpile = {
					type = support_equipment
					amount = 1200
					producer = BUL
				}
				add_equipment_to_stockpile = {
					type = motorized_equipment
					amount = 800
					producer = BUL
				}
			}
		}
	}
}

country_event = {
	id = BUL.31
	title = BUL.31.t
	desc = BUL.31.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.31" }

	fire_only_once = yes
	is_triggered_only = yes

	trigger = {
		BUL = {
			has_war_with = MAC
		}
	}

	option = {
		name = BUL.31.a
		white_peace = MAC
		if = {
			limit = {
				NOT = { has_global_flag = goering_betrayed_allies }
			}
			GER = { add_to_faction = BUL }
		}
		country_event = { id = BUL.32 days = 180 }
		MAC = {
			country_event = { id = MAC.1 }
		}
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.9 }
			}
		}
	}
}

country_event = {
	id = BUL.32
	title = BUL.32.t
	desc = BUL.32.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event BUL.32" }
	immediate = {
		remove_ideas = BUL_endless_roots_of_radicals
		remove_ideas = BUL_rusting_sword_of_damocles
	}
	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = BUL.32.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_COUP_OUTCOME option = BUL_COUP_OUTCOME_NATIONAL_SOCIALISM }
			}
		}
		set_politics = {
			ruling_party = fascism
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.25
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Ivan_Dochev_hog
			BUL_Ilya_Minev_for
			BUL_Dimitar_Valchev_eco
			BUL_Lyuben_Kostov_sec
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Corporatism }
		econ_type_change = yes
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.10 }
			}
			if = {
				limit = {
					NOT = { has_global_flag = goering_betrayed_allies }
				}
				BUL = {
					add_ideas = Pakt_Bundnispartner
					GER = { add_to_faction = BUL }
					econ_join_sphere_GER = yes
					if = {
						limit = { has_global_flag = german_civil_war_speervic }
						join_zollverein = yes
					}
				}
			}
		}
	}

	option = {
		name = BUL.32.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0
				has_game_rule = { rule = BUL_COUP_OUTCOME option = BUL_COUP_OUTCOME_FASCISM }
			}
		}
		set_politics = {
			ruling_party = national_socialism
		}
		add_popularity = {
			ideology = national_socialism
			popularity = 0.25
		}
		remove_all_ministers = yes
		add_ideas = {
			BUL_Petar_Gabrovski_hog
			BUL_Ivan_Gyoshev_for
			BUL_Alexandar_Belev_eco
			BUL_Zmey_Goryanin_sec
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Gelenkte_Wirtschaft }
		econ_subtype_change = yes
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = { id = BUL_NEWS.11 }
			}
			if = {
				limit = {
					NOT = { has_global_flag = goering_betrayed_allies }
				}
				BUL = {
					add_ideas = Pakt_Bundnispartner
					GER = { add_to_faction = BUL }
					econ_join_sphere_GER = yes
					if = {
						limit = { has_global_flag = german_civil_war_speervic }
						join_zollverein = yes
					}
				}
			}
		}
	}
}

#Event for Andonov-Cento to change his ideology
country_event = {
	id = MAC.1
	title = MAC.1.t
	desc = MAC.1.desc
	picture = x

	immediate = { log = "[GetDateText]: [Root.GetName]: event MAC.1" }

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = MAC.1.a
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				AND = {
					has_game_rule = { rule = MAC_PATH option = MAC_PATH_PATERNALISM }
					NOT = { is_subject_of = BUL }
				}
			}
		}
		MAC_Metodija_Andonov_Cento = {
			promote_character = communist_national_communism_subtype
		}
		set_politics = {
			ruling_party = communist
		}
		set_popularities = {
			communist = 70
			paternalism = 30
		}
	}

	option = {
		name = MAC.1.b
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				AND = {
					has_game_rule = { rule = MAC_PATH option = MAC_PATH_COMMUNISM }
					NOT = { is_subject_of = BUL }
				}
			}
		}
		MAC_Metodija_Andonov_Cento = {
			promote_character = paternalism_social_nationalism_subtype
		}
		set_politics = {
			ruling_party = paternalism
		}
		set_popularities = {
			communist = 40
			paternalism = 60
		}
	}
}