namespace = dis_com

# Revolution
country_event = {
	id = dis_com.1
	title = "dis_com.EVTNAME1"
	desc = "dis_com.EVTDESC1"
	picture = REVOLUTION_eventPicture
	
	major = yes
	
	is_triggered_only = yes

	mean_time_to_happen = {
		days = 1
	}
	

	immediate = {
		random_owned_province = { 
			limit = {
				base_tax = 4
			}
			spawn_rebels = {
				type = communist_rebels
				size = 3		
				win = yes
				unrest = 10
			}
			
		}
		add_stability = -3
	
	
	
		set_country_flag = had_communist_revolution
		set_country_flag = communist_revolution
	}
	
	option = {
		name = "dis_com.EVTOPTA1"			# Dire times are ahead of us
		add_prestige = -10
	}
}

# Serfdom
country_event = {
	id = dis_com.2
	title = "dis_com.EVTNAME2"
	desc = "dis_com.EVTDESC2"
	picture = REVOLUTION_eventPicture
	
	trigger = {
		NOT = { has_country_flag = work_class_rights }
	}
	
	is_triggered_only = yes

	mean_time_to_happen = {
		days = 1
	}

	immediate = {
		set_country_flag = work_class_rights
	}	
	
	option = {
		name = "dis_com.EVTOPTA2"		# Restrict serfdom
		ai_chance = { factor = 30 }
		add_country_modifier = {
			name = "working_class_benefits"
			duration = -1
			desc = "END_OF_REVOLUTION"
		}
	}
	option = {
		name = "dis_com.EVTOPTB2"		# Keep the masses in chains
		ai_chance = { factor = 70 }
		random_owned_province = { communist_rebels = 2 }
		add_country_modifier = {
			name = "working_class_restricted"
			duration = -1
			desc = "END_OF_REVOLUTION"
		}
	}
}

# Social reform
country_event = {
	id = dis_com.3
	title = "dis_com.EVTNAME3"
	desc = "dis_com.EVTDESC3"
	picture = REFORM_eventPicture
	
	trigger = {
		NOT = { has_country_flag = marxist_thinkers }
	}
	
	is_triggered_only = yes

	mean_time_to_happen = {
		days = 1
	}
	immediate = { 
		set_country_flag = marxist_thinkers
	}
	
	option = {
		name = "dis_com.EVTOPTA3"			# Suppress the free thinkers
		ai_chance = { factor = 60 }
		add_country_modifier = {
			name = "suppress_marxist_thinkers"
			duration = -1
			desc = "END_OF_REVOLUTION"			
		}
	}
	option = {
		name = "dis_com.EVTOPTB3"			# They hardly pose a threat
		ai_chance = { factor = 40 }
		random_owned_province = { communist_rebels = 1 }
		random_owned_province = { communist_rebels = 1 }
		random_owned_province = { communist_rebels = 1 }
	}
}

# Royal Bureaucracy
country_event = {
	id = dis_com.4
	title = "dis_com.EVTNAME4"
	desc = "dis_com.EVTDESC4"
	picture = REVOLUTION_eventPicture
	
	trigger = {
		NOT = { has_country_flag = government_corruption }
	}
	
	is_triggered_only = yes

	mean_time_to_happen = {
		days = 1
	}
	immediate = { 
		set_country_flag = government_corruption
	}
	
	option = {
		name = "dis_com.EVTOPTA4"			# Reduce the royal bureaucracy
		ai_chance = { factor = 65 }
		add_adm_power = -50
	}
	option = {
		name = "dis_com.EVTOPTB4"			# Expand the royal bureaucracy
		ai_chance = { factor = 35 }
		add_country_modifier = {
			name = "corrupted_government"
			duration = -1
			desc = "END_OF_REVOLUTION"
		}
	}
}

# Stability returns
country_event = {
	id = dis_com.5
	title = "EVTNAME3019"
	desc = "EVTDESC3019"
	picture = REVOLUTION_eventPicture
	
	major = yes	
	
	trigger = {
		has_country_flag = communist_revolution
		had_country_flag = { flag = communist_revolution days = 1000 }
	
	}
	
	is_triggered_only = yes

	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "EVTOPTA3019"			# Restore order
		country_event = { id = dis_com.6 }
		add_stability = 2
	}
}

country_event = {
	id = dis_com.6
	title = revolution.20.t
	desc = revolution.20.d
	picture = REVOLUTION_eventPicture

	is_triggered_only = yes

	option = {
		name = revolution.20.a
		end_disaster = communist_revolution
		clr_country_flag = communist_revolution

		clr_country_flag = work_class_rights
		clr_country_flag = marxist_thinkers
		clr_country_flag = government_corruption
		clr_country_flag = road_to_bankruptcy
		clr_country_flag = financial_crisis		
		remove_country_modifier = working_class_benefits
		remove_country_modifier = working_class_restricted
		remove_country_modifier = suppress_marxist_thinkers
		remove_country_modifier = corrupted_government
		remove_country_modifier = mint_money
		remove_country_modifier = fight_inflation
		remove_country_modifier = disarmament
		remove_country_modifier = financial_disaster
	}
}

