﻿add_namespace = eco_crash

###panic of 1857###

# Panic of 1857
country_event = {
	id = eco_crash.1
	title = usa_panic_of_1857.1.t
	desc = usa_panic_of_1857.1.d
	picture = GFX_report_event_generic_rally2

	fire_only_once = yes
	is_triggered_only = yes

	option = {
		name = usa_panic_of_1857.1.a
		trigger = { tag = USA }
		add_ideas = USA_1857Panic0
		#activate_decision = na_b_monthly_economic_panic_countdown
		hidden_effect = {
			set_country_flag = na_b_monthly_economic_panic_countdown_flag
			set_global_flag = Panic_of_1857
			complete_national_focus = USA_under_panic
			news_event = eco_crash.2
			country_event = {
				id = usa.73
				days = 40
			}
			#country_event = {
			#	id = usa.231
			#	days = 75
			#}
		}
		mark_focus_tree_layout_dirty = yes
	}
}

# Panic of 1857 News Event
news_event = {
	id = eco_crash.2
	title = usa_panic_of_1857.2.t
	desc = usa_panic_of_1857.2.d
	picture = GFX_news_event_generic_riot

	is_triggered_only = yes
	major = yes

	immediate = {
		hidden_effect = {
			every_country = {
				limit = {
					OR = {
						owns_state = 357
						owns_state = 960
					}
				}
				country_event = { id = usa.279 days = 12 }
			}
		}
	}

	option = {
		name = usa_panic_of_1857.2.a
		if = {
			limit = { is_ai = no }
			set_variable = { super_event_displayed = 3 }
		}
		if = {
			limit = {
				NOT = { tag = USA }
				OR = {
					NOT = { has_idea = agrarian }
					NOT = { tag = BHA }
					tag = BAV
					tag = DEN
					tag = WUR
				}
			}
			set_country_flag = Panic_of_1857_hit
			if = {
				limit = { tag = BRA }
				add_ideas = Panic_of_1857_4
				hidden_effect = { 
					set_country_flag = na_b_monthly_economic_panic_countdown_flag 
					country_event = { id = na_b_monthly_economic_panic_report.2 days = 600 }
					if = {
						limit = {
							tag = BRA
							has_country_flag = na_b_monthly_economic_panic_countdown_flag
							NOT = { BRA = { has_completed_focus = BRA_1857_panic } }
						}
						BRA = { complete_national_focus = BRA_1857_panic }
					}
				}
			}
			if = {#major power
				limit = {
					OR = {
						tag = ENG
						tag = FRA
						tag = PRS
						#tag = BRA
						tag = DEN
						is_major = yes
					}
				}
				add_timed_idea = {
					idea = Panic_of_1857_4
					days = 300
				}
				hidden_effect = { 
					set_country_flag = na_b_monthly_economic_panic_countdown_flag 
					country_event = { id = na_b_monthly_economic_panic_report.2 days = 300 }
				}
				#activate_decision = na_b_monthly_economic_panic_countdown
			}
			else_if = {#more than 10 factories
				limit = {
					AND = {
						num_of_factories > 10
						NOT = { tag = BHA }
						NOT = { tag = BRA }
					}
				}
				add_timed_idea = {
					idea = Panic_of_1857_3
					days = 280
				}
				hidden_effect = { 
					set_country_flag = na_b_monthly_economic_panic_countdown_flag 
					country_event = { id = na_b_monthly_economic_panic_report.2 days = 280 }
				}
				#activate_decision = na_b_monthly_economic_panic_countdown
			}
			else_if = {#more than 5 factories
				limit = {
					AND = {
						num_of_factories > 5
						NOT = { tag = BHA }
						NOT = { tag = BRA }
					}
				}
				add_timed_idea = {
					idea = Panic_of_1857_2
					days = 260
				}
				hidden_effect = { 
					set_country_flag = na_b_monthly_economic_panic_countdown_flag 
					country_event = { id = na_b_monthly_economic_panic_report.2 days = 260 }
				}
				#activate_decision = na_b_monthly_economic_panic_countdown
			}
			else_if = {#has less than 5, but more than 1 factories
				limit = {
					AND = {
						num_of_factories < 5
						num_of_factories > 1
						NOT = { tag = BHA }
						NOT = { tag = BRA }
					}
				}
				add_timed_idea = {
					idea = Panic_of_1857_1
					days = 240
				}
				hidden_effect = { 
					set_country_flag = na_b_monthly_economic_panic_countdown_flag 
					country_event = { id = na_b_monthly_economic_panic_report.2 days = 240 }
				}
				#activate_decision = na_b_monthly_economic_panic_countdown
			}
			else={#has less than 2 factories
				add_political_power = -10
			}
		}
	}
}


add_namespace = fbrailcrisis

#Belgian Rail Companies turn to France (7.12.1868)
country_event = {
	id = fbrailcrisis.1
	title = fbrailcrisis.1.t
	desc = fbrailcrisis.1.d
	picture = GFX_report_event_generic_railway_2
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		tag = BEL
		BEL = { 
			owns_state = 34
		}
	}
	
	#Enact a law against the sale.
	option = {
		name = fbrailcrisis.1.a
		ai_chance = { factor = 85 }
		custom_effect_tooltip = eoanb_tt_BEL_prepare_rail_law
		custom_effect_tooltip = historical_option
		hidden_effect = {	
			BEL = { country_event = { days = 45 id = fbrailcrisis.2 } }
		}
	}
	
	#Let the sale go through.
	option = {
		name = fbrailcrisis.1.b
		ai_chance = { 
			factor = 15 
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_ideas = BEL_idea_french_rail_influence
	}
	
	#Bail the company out.
	option = {
		name = fbrailcrisis.1.c
		ai_chance = { factor = 0 }
		add_political_power = -200
		add_stability = -0.05
		set_temp_variable = { money_to_gain = -20 }
		add_money_with_inflation_included_with_tooltip_effect = yes
	}

}

#Law against foreign intervention
country_event = {
	id = fbrailcrisis.2
	title = fbrailcrisis.2.t
	desc = fbrailcrisis.2.d
	picture = GFX_report_event_saf_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = fbrailcrisis.2.a
		ai_chance = { factor = 100 }
		FRA = { country_event = { days = 1 id = fbrailcrisis.3 } }
	}
	
}

#France hears about them being blocked
country_event = {
	id = fbrailcrisis.3
	title = fbrailcrisis.3.t
	desc = fbrailcrisis.3.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	#Call a conference
	option = {
		name = fbrailcrisis.3.a
		ai_chance = { factor = 80 }
		custom_effect_tooltip = eoanb_tt_FRA_call_rail_conference
		custom_effect_tooltip = historical_option
		hidden_effect = {
			FRA = { country_event = { days = 5 id = fbrailcrisis.4 } }
		}
	}
	
	#Back down
	option = {
		name = fbrailcrisis.3.b
		ai_chance = { 
			factor = 20
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
	
}

#The Conference begins
country_event = {
	id = fbrailcrisis.4
	title = fbrailcrisis.4.t
	desc = fbrailcrisis.4.d
	picture = GFX_report_event_election_vote
	
	is_triggered_only = yes
	
	#Demand that the sale go through.
	option = {
		name = fbrailcrisis.4.a
		ai_chance = { factor = 100 }
		BEL = { country_event = { days = 1 id = fbrailcrisis.5 } }
		custom_effect_tooltip = historical_option
	}
	
	#Back off
	option = {
		name = fbrailcrisis.4.b
		ai_chance = { factor = 0 }
		custom_effect_tooltip = eoanb_tt_FRA_rail_crisis_cave
	}
	
}

#Belgium receives French demands
country_event = {
	id = fbrailcrisis.5
	title = fbrailcrisis.5.t
	desc = fbrailcrisis.5.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	#Refuse to allow the sale.
	option = {
		name = fbrailcrisis.5.a
		ai_chance = { factor = 90 }
		FRA = { country_event = { days = 1 id = fbrailcrisis.6 } }
	}
	
	#Allow the sale.
	option = {
		name = fbrailcrisis.5.b
		ai_chance = { 
			factor = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_ideas = BEL_idea_french_rail_influence
		FRA = { country_event = { days = 1 id = fbrailcrisis.8 } }
	}
	
}

#France gets told to back off
country_event = {
	id = fbrailcrisis.6
	title = fbrailcrisis.6.t
	desc = fbrailcrisis.6.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	#
	option = {
		name = fbrailcrisis.6.a
		ai_chance = { factor = 100 }
		custom_effect_tooltip = eoanb_tt_FRA_rail_crisis_averted
	}
	
	option = {
		name = fbrailcrisis.6.b
		ai_chance = { factor = 0 }
		BEL = { country_event = { days = 1 id = fbrailcrisis.7 } }
		custom_effect_tooltip = eoanb_tt_FRA_rail_crisis_war
	}
	
}

#Belgium gets threatened 
country_event = {
	id = fbrailcrisis.7
	title = fbrailcrisis.7.t
	desc = fbrailcrisis.7.d
	picture = GFX_report_event_albanian_partisans
	
	is_triggered_only = yes
	
	#Back down and let the sale go through.
	option = {
		name = fbrailcrisis.7.a
		ai_chance = {
			base = 10
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
		add_ideas = BEL_idea_french_rail_influence
		FRA = { country_event = { days = 1 id = fbrailcrisis.8 } }
	}
	
	#Threaten to call in England
	option = {
		name = fbrailcrisis.7.b
		ai_chance = { factor = 90 }
		FRA = { country_event = { days = 1 id = fbrailcrisis.9 } }
		custom_effect_tooltip = historical_option
	}
	
	#Declare war on France
	option = {
		name = fbrailcrisis.7.c
		ai_chance = { factor = 0 }
		976 = { add_claim_by = BEL }
		declare_war_on = { target = FRA type = take_claimed_state }
	}
	
}

#France gets the News that Belgium backed down
country_event = {
	id = fbrailcrisis.8
	title = fbrailcrisis.8.t
	desc = fbrailcrisis.8.d
	picture = GFX_report_event_gathering_protest
	
	is_triggered_only = yes
	
	option = {
		name = fbrailcrisis.8.a
		ai_chance = { factor = 100 }
		custom_effect_tooltip = eoanb_tt_FRA_belgian_spirit
		set_temp_variable = { money_to_gain = -7.5 }
		add_money_with_inflation_included_with_tooltip_effect = yes
	}
	
}

#France gets told Belgium will call in England
country_event = {
	id = fbrailcrisis.9
	title = fbrailcrisis.9.t
	desc = fbrailcrisis.9.d
	picture = GFX_report_event_generic_parliament
	
	is_triggered_only = yes
	
	#Back down
	option = {
		name = fbrailcrisis.9.a
		ai_chance = { factor = 100 }
		custom_effect_tooltip = eoanb_tt_FRA_rail_crisis_averted
		custom_effect_tooltip = historical_option
	}

	#Declare war
	option = {
		name = fbrailcrisis.9.b
		ai_chance = { factor = 0 }
		declare_war_on = { target = BEL type = take_claimed_state }
		34 = { add_claim_by = FRA }
		#involve PRS/NGC
	}
	
}


###Panic of 1873###


add_namespace = eighteenseventhreecrisis

#TRIGGERS FROM AND EFFECTS TO OTHER NATIONS TO BE ADDED
#FACTORY EVENTS TO BE ADDED
#WORKER ANGER LEVEL TO BE ADDED

#AUS - The Vienna Stock Exchange Crash - May 1873
country_event = {
	id = eighteenseventhreecrisis.1
	title = eighteenseventhreecrisis.1.t
	desc = eighteenseventhreecrisis.1.d
	picture = GFX_report_event_vienna_stock_exchange_crash
	
	is_triggered_only = yes
	
	option = {
		name = eighteenseventhreecrisis.1.a
		trigger = {
			tag = AUS
		}
		ai_chance = { base = 100 }
		decrease_ps_by_two = yes
		hidden_effect = {
			news_event = news.47
			ENG = { country_event = { days = 1 id = eighteenseventhreecrisis.1 } }
			FRA = { country_event = { days = 1 id = eighteenseventhreecrisis.1 } }
			PRS = { country_event = { days = 1 id = eighteenseventhreecrisis.1 } }
			USA = { country_event = { days = 1 id = eighteenseventhreecrisis.1 } }
			#USA = { country_event = { days = 133 random_days = 14 id = eighteenseventhreecrisis.X } } #New York Stock Exchange Panic
			set_variable = { political_legitimacy_equilibrium_custom = -0.15 }
		}
	}

	option = {
		name = eighteenseventhreecrisis.1.b
		trigger = {
			NOT = { tag = AUS }
		}
		ai_chance = { base = 100 }
		decrease_ps_by_one = yes
		add_ideas = eoanb_idea_panic_of_1873_minor
		hidden_effect = {
			set_variable = { political_legitimacy_equilibrium_custom = -0.05 }
			ENG = {
				complete_national_focus = ENG_focus_1873_panic
				set_country_flag = ENG_panic_1873
			}
		}
	}
}

#Strousberg Businesses Forced into Liquidation
country_event = {
	id = eighteenseventhreecrisis.2
	title = eighteenseventhreecrisis.2.t
	desc = eighteenseventhreecrisis.2.d
	picture = GFX_report_event_strousberg
	
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = eighteenseventhreecrisis.2.a
		ai_chance = { base = 100 }
		add_stability = -0.02
		swap_ideas = {
			remove_idea = eoanb_idea_panic_of_1873_minor
			add_idea = eoanb_idea_panic_of_1873_modest
		}
		custom_effect_tooltip = GER_damage_railways_effect_tt
		#advisor
		hidden_effect = {
			random_owned_controlled_state = {
				limit = {
					rail_way > 3
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 1
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			random_owned_controlled_state = {
				limit = {
					rail_way > 3
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 1
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			random_owned_controlled_state = {
				limit = {
					rail_way > 3
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 1
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			every_owned_state = {
				limit = { 
					has_state_flag = AUS_the_panic_of_1873_rail
				}
				clr_state_flag = AUS_the_panic_of_1873_rail
			}
			hidden_effect = {
				set_variable = { political_legitimacy_equilibrium_custom = -0.1 }
			}
		}
	}
}

#PRS - The Crisis Starts in Berlin - October 1873
country_event = {
	id = eighteenseventhreecrisis.3
	title = eighteenseventhreecrisis.3.t
	desc = eighteenseventhreecrisis.3.d
	picture = GFX_report_event_berliner_borse
	
	is_triggered_only = yes
	fire_only_once = yes
	
	option = {
		name = eighteenseventhreecrisis.3.a
		ai_chance = { base = 100 }
		decrease_ps_by_two = yes
		swap_ideas = {
			remove_idea = eoanb_idea_panic_of_1873_modest
			add_idea = eoanb_idea_panic_of_1873_substantial
		}
		complete_national_focus = GER_focus_historical_gruenderkrach
		activate_mission_tooltip = GER_mission_panic_of_1873
		custom_effect_tooltip = eighteenseventhreecrisis_panic_of_1873_damage_tt
		hidden_effect = {
			set_variable = { political_legitimacy_equilibrium_custom = -0.15 }
			mark_focus_tree_layout_dirty = yes
			activate_mission = GER_mission_panic_of_1873
			country_event = { days = 60 id = eighteenseventhreecrisis.4 }
			### Civilian Industry - Businesses in trouble
			random_owned_controlled_state = {
				prioritize = { 951 }
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_civ
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_civ
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_civ
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_civ
			}
			### Civilian Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				prioritize = { 951 }
				limit = {
					industrial_complex > 0
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_civr
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_civr
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_civr
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_civr
			}
			### Railways in trouble
			random_owned_controlled_state = {
				limit = {
					rail_way > 1
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			random_owned_controlled_state = {
				limit = {
					rail_way > 1
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			random_owned_controlled_state = {
				limit = {
					rail_way > 1
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			### Military Industry - Businesses in trouble
			random_owned_controlled_state = {
				limit = {
					arms_factory > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_mil
							has_state_flag = AUS_the_panic_of_1873_milr
						}
					}
				}
				damage_building = {
					type = arms_factory
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_mil
			}
			random_owned_controlled_state = {
				limit = {
					arms_factory > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_mil
							has_state_flag = AUS_the_panic_of_1873_milr
						}
					}
				}
				damage_building = {
					type = arms_factory
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_mil
			}
			### Military Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					arms_factory > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_mil
							has_state_flag = AUS_the_panic_of_1873_milr
						}
					}
				}
				remove_building = {
					type = arms_factory
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_milr
			}
			random_owned_controlled_state = {
				limit = {
					arms_factory > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_mil
							has_state_flag = AUS_the_panic_of_1873_milr
						}
					}
				}
				remove_building = {
					type = arms_factory
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_milr
			}
			### Naval Industry - Businesses in trouble
			random_owned_controlled_state = {
				limit = {
					dockyard > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_nav
							has_state_flag = AUS_the_panic_of_1873_navr
						}
					}
				}
				damage_building = {
					type = dockyard
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_nav
			}
			random_owned_controlled_state = {
				limit = {
					dockyard > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_nav
							has_state_flag = AUS_the_panic_of_1873_navr
						}
					}
				}
				damage_building = {
					type = dockyard
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_nav
			}
			### Naval Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					dockyard > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_nav
							has_state_flag = AUS_the_panic_of_1873_navr
						}
					}
				}
				remove_building = {
					type = dockyard
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_nav
			}
			### Textile Industry - Businesses in trouble
			random_owned_controlled_state = {
				limit = {
					fabric_weavery > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_tex
							has_state_flag = AUS_the_panic_of_1873_texr
						}
					}
				}
				damage_building = {
					type = fabric_weavery
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_tex
			}
			### Textile Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					fabric_weavery > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_tex
							has_state_flag = AUS_the_panic_of_1873_texr
						}
					}
				}
				remove_building = {
					type = fabric_weavery
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_texr
			}
			### Coal Mines - Businesses in trouble
			random_owned_controlled_state = {
				limit = {
					coal_mine > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_coal
							has_state_flag = AUS_the_panic_of_1873_coalr
						}
					}
				}
				damage_building = {
					type = coal_mine
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_coal
			}
			### Coal Mines - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					coal_mine > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_coal
							has_state_flag = AUS_the_panic_of_1873_coalr
						}
					}
				}
				remove_building = {
					type = coal_mine
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_coalr
			}
			### Steel Mills - Businesses in trouble
			random_owned_controlled_state = {
				limit = {
					steel_mill > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_steel
							has_state_flag = AUS_the_panic_of_1873_steelr
						}
					}
				}
				damage_building = {
					type = steel_mill
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_steel
			}
			random_owned_controlled_state = {
				limit = {
					steel_mill > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_steel
							has_state_flag = AUS_the_panic_of_1873_steelr
						}
					}
				}
				damage_building = {
					type = steel_mill
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_steel
			}
			### Steel Mills - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					steel_mill > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_steel
							has_state_flag = AUS_the_panic_of_1873_steelr
						}
					}
				}
				remove_building = {
					type = steel_mill
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_steelr
			}
		}
	}
}

#The Crisis Worsens
country_event = {
	id = eighteenseventhreecrisis.4
	title = eighteenseventhreecrisis.4.t
	desc = eighteenseventhreecrisis.4.d
	picture = GFX_report_event_worker_protests
	
	is_triggered_only = yes
	
	option = {
		name = eighteenseventhreecrisis.4.a
		ai_chance = { base = 100 }
		decrease_ps_by_one = yes
		swap_ideas = {
			remove_idea = eoanb_idea_panic_of_1873_substantial
			add_idea = eoanb_idea_panic_of_1873_severe
		}
		custom_effect_tooltip = eighteenseventhreecrisis_panic_of_1873_damage_tt
		hidden_effect = {
			set_variable = { political_legitimacy_equilibrium_custom = -0.2 }
			country_event = { days = 60 id = eighteenseventhreecrisis.5 }
			### Civilian Industry - Businesses in trouble
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_civ
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_civ
			}
			### Civilian Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					has_state_flag = AUS_the_panic_of_1873_civ
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
				clr_state_flag = AUS_the_panic_of_1873_civ
				set_state_flag = AUS_the_panic_of_1873_civr
			}
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					has_state_flag = AUS_the_panic_of_1873_civ
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
				clr_state_flag = AUS_the_panic_of_1873_civ
				set_state_flag = AUS_the_panic_of_1873_civr
			}
			### Railways in trouble
			random_owned_controlled_state = {
				limit = {
					rail_way > 1
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			### Textile Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					fabric_weavery > 0
					has_state_flag = AUS_the_panic_of_1873_tex
				}
				remove_building = {
					type = fabric_weavery
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_texr
			}
			### Coal Mines - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					coal_mine > 0
					has_state_flag = AUS_the_panic_of_1873_coal
				}
				remove_building = {
					type = coal_mine
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_coalr
			}
		}
	}
}

#More Businesses Collapse
country_event = {
	id = eighteenseventhreecrisis.5
	title = eighteenseventhreecrisis.5.t
	desc = eighteenseventhreecrisis.5.d
	picture = GFX_report_event_worker_protests
	
	is_triggered_only = yes
	
	option = {
		name = eighteenseventhreecrisis.5.a
		ai_chance = { base = 100 }
		decrease_ps_by_one = yes
		swap_ideas = {
			remove_idea = eoanb_idea_panic_of_1873_severe
			add_idea = eoanb_idea_panic_of_1873_dramatic
		}
		custom_effect_tooltip = eighteenseventhreecrisis_panic_of_1873_damage_tt
		hidden_effect = {
			set_variable = { political_legitimacy_equilibrium_custom = -0.25 }
			### Civilian Industry - Businesses in trouble
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				damage_building = {
					type = industrial_complex
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_civ
			}
			### Civilian Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					industrial_complex > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_civ
							has_state_flag = AUS_the_panic_of_1873_civr
						}
					}
				}
				remove_building = {
					type = industrial_complex
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_civr
			}
			### Railways in trouble
			random_owned_controlled_state = {
				limit = {
					rail_way > 1
					NOT = { has_state_flag = AUS_the_panic_of_1873_rail }
				}
				damage_building = {
					type = rail_way
					damage = 0.95
				}
				set_state_flag = AUS_the_panic_of_1873_rail
			}
			### Textile Industry - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					fabric_weavery > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_tex
							has_state_flag = AUS_the_panic_of_1873_texr
						}
					}
				}
				remove_building = {
					type = fabric_weavery
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_texr
			}
			### Coal Mines - Businesses going bankrupt
			random_owned_controlled_state = {
				limit = {
					coal_mine > 0
					NOT = {
						OR = {
							has_state_flag = AUS_the_panic_of_1873_coal
							has_state_flag = AUS_the_panic_of_1873_coalr
						}
					}
				}
				remove_building = {
					type = coal_mine
					level = 1
				}
				set_state_flag = AUS_the_panic_of_1873_coalr
			}
			### Clear temporary flags
			every_owned_state = {
				limit = { 
					OR = {
						has_state_flag = AUS_the_panic_of_1873_civ
						has_state_flag = AUS_the_panic_of_1873_rail
						has_state_flag = AUS_the_panic_of_1873_mil
						has_state_flag = AUS_the_panic_of_1873_nav
						has_state_flag = AUS_the_panic_of_1873_tex
						has_state_flag = AUS_the_panic_of_1873_coal
						has_state_flag = AUS_the_panic_of_1873_steel
					}
				}
				clr_state_flag = AUS_the_panic_of_1873_civ
				clr_state_flag = AUS_the_panic_of_1873_rail
				clr_state_flag = AUS_the_panic_of_1873_mil
				clr_state_flag = AUS_the_panic_of_1873_nav
				clr_state_flag = AUS_the_panic_of_1873_tex
				clr_state_flag = AUS_the_panic_of_1873_coal
				clr_state_flag = AUS_the_panic_of_1873_steel
			}
		}
	}
}

#The Crisis is over
country_event = {
	id = eighteenseventhreecrisis.24
	title = eighteenseventhreecrisis.24.t
	desc = eighteenseventhreecrisis.24.d
	picture = GFX_report_event_generic_military_parade
	
	is_triggered_only = yes
	
	option = {
		name = eighteenseventhreecrisis.24.a
		ai_chance = { base = 100 }
		trigger = {
			tag = AUS
		}
		#remove_ideas = eoanb_idea_panic_of_1873_substantial
		#complete_national_focus = GER_focus_historical_the_crisis_ends
	}

	option = {
		name = eighteenseventhreecrisis.24.b
		ai_chance = { base = 100 }
		trigger = {
			tag = PRS
		}
		swap_ideas = {
			remove_idea = eoanb_idea_panic_of_1873_modest
			add_idea = eoanb_idea_panic_of_1873_minor
		}
		complete_national_focus = GER_focus_historical_the_crisis_ends
		hidden_effect = {
			set_variable = { political_legitimacy_equilibrium_custom = -0.05 }
		}
	}
}

#Industry Stabilizing
country_event = {
	id = eighteenseventhreecrisis.25
	title = eighteenseventhreecrisis.25.t
	desc = eighteenseventhreecrisis.25.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes
	
	trigger = {
		Country_is_in_1873_crisis = no
	}
	
	option = {
		name = eighteenseventhreecrisis.25.a
		ai_chance = { base = 100 }
		increase_ps_by_one = yes
		add_stability = 0.05
		remove_ideas = eoanb_idea_panic_of_1873_minor
		hidden_effect = {
			### Clear all remaining flags
			every_owned_state = {
				limit = { 
					OR = {
						has_state_flag = AUS_the_panic_of_1873_civr
						has_state_flag = AUS_the_panic_of_1873_milr
						has_state_flag = AUS_the_panic_of_1873_navr
						has_state_flag = AUS_the_panic_of_1873_texr
						has_state_flag = AUS_the_panic_of_1873_coalr
						has_state_flag = AUS_the_panic_of_1873_steelr
					}
				}
				clr_state_flag = AUS_the_panic_of_1873_civr
				clr_state_flag = AUS_the_panic_of_1873_milr
				clr_state_flag = AUS_the_panic_of_1873_navr
				clr_state_flag = AUS_the_panic_of_1873_texr
				clr_state_flag = AUS_the_panic_of_1873_coalr
				clr_state_flag = AUS_the_panic_of_1873_steelr
			}
		}
	}
}