﻿###########################
# Political Events
###########################

add_namespace = political

# Communism on the Rise
country_event = {
	id = political.1
	title = political.1.t
	desc = political.1.d
	picture = GFX_report_event_worker_protests
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_government = communism }
	}
	
	# Seek government support
	option = {
		name = political.1.a
		trigger = {
			OR = {
				NOT = { tag = CHI }
				AND = {
					NOT = { country_exists = PRC }
					tag = CHI
				}			
			}
		}
		custom_effect_tooltip = political.1.a.tt
		clr_country_flag = communism_popular_movement
		set_country_flag = communism_political_movement
	}

	# Seek popular support
	option = {
		name = political.1.b
		custom_effect_tooltip = political.1.b.tt
		clr_country_flag = communism_political_movement
		clr_country_flag = communism_government_support
		set_country_flag = communism_popular_movement
	}
}

# Marxist Sympathies in Government
country_event = {
	id = political.2
	title = political.2.t
	desc = political.2.d
	picture = GFX_report_event_worker_protests

	trigger = {
		NOT = { tag = EQS
		tag = GRF }
		has_idea_with_trait = communist_revolutionary
		NOT = { has_government = communism }
		NOT = { has_country_flag = communism_government_support }
	}
	
	mean_time_to_happen = {
		days = 500
		modifier = {
			factor = 0.5
			has_country_flag = communism_political_movement
		}
	}
	
	option = {
		name = political.2.a
		custom_effect_tooltip = political.2.a.tt
		clr_country_flag = communism_political_movement
		set_country_flag = communism_government_support
	}
}

# Communists Execute Coup
country_event = {
	id = political.3
	title = political.3.t
	desc = political.3.d
	picture = GFX_report_event_gathering_protest
	
	trigger = {
		NOT = { tag = EQS
		tag = GRF }
		has_idea_with_trait = communist_revolutionary
		NOT = { has_government = communism }
		has_country_flag = communism_government_support
		communism > 0.4
		is_major = no
		is_puppet = no
		OR = {
			NOT = { tag = CHI }
			AND = {
				NOT = { country_exists = PRC }
				tag = CHI
			}			
		}
	}

	mean_time_to_happen = {
		days = 100
		modifier = {
			factor = 0.5
			communism > 0.5
		}
	}

	immediate = {
		hidden_effect = { remove_ideas = communist_revolutionaries }
	}
	
	option = {
		name = political.3.a
		set_politics = {
			ruling_party = communism
			elections_allowed = no
		}
		add_timed_idea = { idea = reign_of_terror days = 730 }
	}
}

# Class Conflicts Divide [Root.GetName]
country_event = {
	id = political.4
	title = political.4.t
	desc = political.4.d
	picture = GFX_report_event_gathering_protest
	
	trigger = {
		NOT = { tag = EQS
		tag = GRF }
		has_idea_with_trait = communist_revolutionary
		NOT = { has_government = communism }
		communism > 0.2
		if = {
			limit = {
				has_dlc = "Together for Victory"
			}
			OR = {
				NOT = { tag = RAJ }
				AND = {
					tag = RAJ
					is_puppet = no
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 365
		modifier = {
			factor = 0.5
			has_country_flag = communism_popular_movement
		}
	}
	
	option = {
		name = political.4.a
		add_popularity = {
			ideology = communism
			popularity = 0.15
		}
		add_national_unity = -0.02
	}
}

# Soldiers Desert to Communist Partisans
country_event = {
	id = political.5
	title = political.5.t
	desc = political.5.d
	picture = GFX_report_event_desertion_poster
	
	trigger = {
		NOT = { tag = EQS
		tag = GRF }
		has_idea_with_trait = communist_revolutionary
		NOT = { has_government = communism }
		communism > 0.3
		NOT = { has_idea = communist_partisans_recruiting }
		if = {
			limit = {
				has_dlc = "Together for Victory"
			}
			OR = {
				NOT = { tag = RAJ }
				AND = {
					tag = RAJ
					is_puppet = no
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 365
		modifier = {
			factor = 0.5
			has_country_flag = communism_popular_movement
		}
	}
	
	option = {
		name = political.5.a
		add_popularity = {
			ideology = communism
			popularity = 0.15
		}
		add_ideas = communist_partisans_recruiting
	}
}

# The [Month] Revolution
country_event = {
	id = political.6
	title = political.6.t
	desc = political.6.d
	picture = GFX_report_event_gathering_protest
	
	trigger = {
		NOT = { tag = EQS
		tag = GRF }
		has_idea_with_trait = communist_revolutionary
		NOT = { has_government = communism }
		communism > 0.4
		OR = {
			NOT = { tag = CHI }
			AND = {
				NOT = { country_exists = PRC }
				tag = CHI
			}			
		}
		if = {
			limit = {
				has_dlc = "Together for Victory"
			}
			OR = {
				NOT = { tag = RAJ }
				AND = {
					tag = RAJ
					NOT = { has_completed_focus = RAJ_swaraj }
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 365
		modifier = {
			factor = 0.75
			has_country_flag = communism_popular_movement
		}
	}
	
	option = {
		name = political.6.a
		if = {
			limit = {
				has_government = democratic
			}
			start_civil_war = {
				ruling_party = communism
				ideology = democratic
				size = 0.6
			}
		}
		if = {
			limit = {
				has_government = fascism
			}
			start_civil_war = {
				ruling_party = communism
				ideology = fascism
				size = 0.6
			}
		}
		if = {
			limit = {
				has_government = neutrality
			}
			start_civil_war = {
				ruling_party = communism
				ideology = neutrality
				size = 0.6
			}
		}
		add_timed_idea = { idea = reign_of_terror days = 730 }
		remove_ideas = communist_revolutionaries
	}
	option = {
		name = political.6.b
	}
}

# Fascism on the Rise
country_event = {
	id = political.7
	title = political.7.t
	desc = political.7.d
	picture = GFX_report_event_fascist_gathering
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_government = fascism }
	}
	
	# Seek government support
	option = {
		name = political.7.a
		custom_effect_tooltip = political.7.a.tt
		clr_country_flag = fascism_popular_movement
		set_country_flag = fascism_political_movement
	}

	# Seek popular support
	option = {
		name = political.7.b
		custom_effect_tooltip = political.7.b.tt
		clr_country_flag = fascism_political_movement
		clr_country_flag = fascism_government_support
		set_country_flag = fascism_popular_movement
	}
}

# Fascist Sympathies in the Military
country_event = {
	id = political.8
	title = political.8.t
	desc = political.8.d
	picture = GFX_report_event_fascist_gathering
	
	trigger = {
		has_idea_with_trait = fascist_demagogue
		NOT = { has_government = fascism }
		NOT = { has_country_flag = fascism_government_support }
	}
	
	mean_time_to_happen = {
		days = 500
		modifier = {
			factor = 0.5
			has_country_flag = fascism_political_movement
		}
	}
	
	option = {
		name = political.8.a
		custom_effect_tooltip = political.2.a.tt
		clr_country_flag = fascism_political_movement
		set_country_flag = fascism_government_support
	}
}

# Fascist Coup d'état
country_event = {
	id = political.9
	title = political.9.t
	desc = political.9.d
	picture = GFX_report_event_fascist_gathering
	
	trigger = {
		has_idea_with_trait = fascist_demagogue
		NOT = { has_government = fascism }
		has_country_flag = fascism_government_support
		fascism > 0.3
		is_major = no
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 100
		modifier = {
			factor = 0.5
			fascism > 0.4
		}
	}

	immediate = {
		hidden_effect = { remove_ideas = fascist_revolutionaries }
	}
	
	option = {
		name = political.9.a
		set_politics = {
			ruling_party = fascism
			elections_allowed = no
		}
		add_timed_idea = { idea = reign_of_terror days = 730 }
	}
}

# Civil War for Fascism
country_event = {
	id = political.10
	title = political.10.t
	desc = political.10.d
	picture = GFX_report_event_fascist_gathering
	
	trigger = {
		has_idea_with_trait = fascist_demagogue
		NOT = { has_government = fascism }
		fascism > 0.25
		if = {
			limit = {
				has_dlc = "Together for Victory"
			}
			OR = {
				NOT = { tag = RAJ }
				AND = {
					tag = RAJ
					NOT = { has_completed_focus = RAJ_swaraj }
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 365
		modifier = {
			factor = 0.75
			has_country_flag = fascism_popular_movement
		}
	}
	
	option = {
		name = political.10.a
		if = {
			limit = {
				has_government = democratic
			}
			if = {
				limit = { fascism > 0.4 }
				start_civil_war = {
					ruling_party = fascism
					ideology = democratic
					size = 0.6
				}
			}
			if = {
				limit = { NOT = { fascism > 0.4 } }
				start_civil_war = {
					ruling_party = fascism
					ideology = democratic
					size = 0.7
				}
			}
		}
		if = {
			limit = {
				has_government = communism
			}
			if = {
				limit = { fascism > 0.4 }
				start_civil_war = {
					ruling_party = fascism
					ideology = communism
					size = 0.6
				}
			}
			if = {
				limit = { NOT = { fascism > 0.4 } }
				start_civil_war = {
					ruling_party = fascism
					ideology = communism
					size = 0.7
				}
			}
		}
		if = {
			limit = {
				has_government = neutrality
			}
			if = {
				limit = { fascism > 0.4 }
				start_civil_war = {
					ruling_party = fascism
					ideology = neutrality
					size = 0.6
				}
			}
			if = {
				limit = { NOT = { fascism > 0.4 } }
				start_civil_war = {
					ruling_party = fascism
					ideology = neutrality
					size = 0.7
				}
			}
		}
		remove_ideas = fascist_revolutionaries
		add_timed_idea = { idea = reign_of_terror days = 730 }
	}
	option = {
		name = political.10.b
	}
}

# Fascist Assault Divisions Form
country_event = {
	id = political.11
	title = political.11.t
	desc = political.11.d
	picture = GFX_report_event_fascist_militia
	
	trigger = {
		has_idea_with_trait = fascist_demagogue
		NOT = { has_government = fascism }
		fascism > 0.3
		NOT = { has_idea = fascist_assault_divisions }
		if = {
			limit = {
				has_dlc = "Together for Victory"
			}
			OR = {
				NOT = { tag = RAJ }
				AND = {
					tag = RAJ
					is_puppet = no
				}
			}
		}
	}

	mean_time_to_happen = {
		days = 365
		modifier = {
			factor = 0.5
			has_country_flag = fascism_popular_movement
		}
	}
	
	option = {
		name = political.11.a
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}
		add_ideas = fascist_assault_divisions
	}
}

# The Threat of Communism
country_event = {
	id = political.12
	title = political.12.t
	desc = political.12.d
	picture = GFX_report_event_worker_protests
	
	trigger = {
		has_idea_with_trait = fascist_demagogue
		NOT = { has_government = fascism }
		fascism > 0.25
		any_neighbor_country = {
			has_government = communism
		}
	}

	mean_time_to_happen = {
		days = 365
		modifier = {
			factor = 0.5
			has_country_flag = fascism_popular_movement
		}
	}
	
	option = {
		name = political.12.a
		add_popularity = {
			ideology = fascism
			popularity = 0.2
		}
	}
}

# Move Towards Democracy
country_event = {
	id = political.13
	title = political.13.t
	desc = political.13.d
	picture = GFX_report_event_journalists_speech
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { has_government = democratic }
	}

	# Seek government support
	option = {
		name = political.13.a
		custom_effect_tooltip = political.13.a.tt
		clr_country_flag = democracy_popular_movement
		clr_country_flag = democracy_opposition_formed
		set_country_flag = democracy_political_movement
	}

	# Seek popular support
	option = {
		name = political.13.b
		custom_effect_tooltip = political.13.b.tt
		clr_country_flag = democracy_political_movement
		clr_country_flag = democracy_government_support
		set_country_flag = democracy_popular_movement
	}
}

# [Ruling Party] Debates Democracy
country_event = {
	id = political.14
	title = political.14.t
	desc = political.14.d
	picture = GFX_report_event_journalists_speech
	
	trigger = {
		has_idea_with_trait = democratic_reformer
		NOT = { has_government = democratic }
		NOT = { has_country_flag = democracy_government_support }
	}
	
	mean_time_to_happen = {
		days = 400
		modifier = {
			factor = 0.5
			has_country_flag = democracy_political_movement
		}
		modifier = {
			factor = 0.5
			democratic > 0.5
		}
	}
	
	option = {
		name = political.14.a
		custom_effect_tooltip = political.14.a.tt
		clr_country_flag = democracy_political_movement
		set_country_flag = democracy_government_support
	}
}

# Democratic Opposition Forming
country_event = {
	id = political.15
	title = political.15.t
	desc = political.15.d
	picture = GFX_report_event_journalists_speech
	
	trigger = {
		has_idea_with_trait = democratic_reformer
		NOT = { has_government = democratic }
		NOT = { has_country_flag = democracy_opposition_formed }
		is_puppet = no
	}
	
	mean_time_to_happen = {
		days = 300
		modifier = {
			factor = 0.5
			has_country_flag = democracy_popular_movement
		}
	}
	
	option = {
		name = political.15.a
		add_popularity = {
			ideology = democratic
			popularity = 0.1
		}
		add_national_unity = -0.02
		set_country_flag = democracy_opposition_formed
	}
}

# Public Call for Elections
country_event = {
	id = political.16
	title = political.16.t
	desc = political.16.d
	picture = GFX_report_event_election_vote
	
	trigger = {
		has_idea_with_trait = democratic_reformer
		NOT = { has_government = democratic }
		has_country_flag = democracy_opposition_formed
		NOT = { has_idea = democratic_opposition_voicing_protests }
	}
	
	mean_time_to_happen = {
		days = 150
	}
	
	option = {
		name = political.16.a
	}

	option = {
		name = political.16.b
		add_political_power = -20
		add_ideas = democratic_opposition_voicing_protests
	}
}

country_event = {
	id = political.17
	title = political.17.t
	desc = political.17.d
	picture = GFX_report_event_election_vote
	
	trigger = {
		has_idea_with_trait = democratic_reformer
		NOT = { has_government = democratic }
		democratic > 0.5
		has_country_flag = democracy_government_support
		is_puppet = no
	}
	
	mean_time_to_happen = {
		days = 200
	}
	
	option = {
		name = political.17.a
		if = {
			limit = { has_government = fascism }
			add_timed_idea = { idea = fascism_defeated days = 730 }
		}
		if = {
			limit = { has_government = communism }
			add_timed_idea = { idea = communism_defeated days = 730 }
		}
		set_politics = {
			ruling_party = democratic
			elections_allowed = yes
		}
		hold_election = ROOT
		remove_ideas = democratic_revolutionaries
	}
	option = {
		name = political.17.b
	}
}

### > 50% support
# political.18 Fascist

country_event = {
	id = political.18
	title = political.18.t
	desc = political.18.d
	picture = GFX_report_event_fascist_gathering

	trigger = {
		fascism > 0.5
		NOT = { has_government = fascism }
		NOT = { has_idea = fascist_revolutionaries }
		NOT = { has_idea = reign_of_terror }
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 30
	}

	option = {
		name = political.18.a
		add_political_power = -100
		add_popularity = {
			ideology = fascism
			popularity = -0.10
		}
		add_timed_idea = {
			idea = fascist_revolutionaries
			days = 365
		}
	}

	option = {
		name = political.18.b
		add_timed_idea = {
			idea = fascist_revolutionaries
			days = 365
		}
	}

	option = {
		name = political.18.c
		set_politics = {
			ruling_party = fascism
			elections_allowed = no
		}
		add_national_unity = -0.05
	}
}

# political.19 Communist

country_event = {
	id = political.19
	title = political.19.t
	desc = political.19.d
	picture = GFX_report_event_worker_protests

	trigger = {
		NOT = { tag = EQS
		tag = GRF }
		communism > 0.5
		NOT = { has_government = communism }
		NOT = { has_idea = communist_revolutionaries }
		NOT = { has_idea = reign_of_terror }
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 30
	}

	option = {
		name = political.19.a
		add_political_power = -100
		add_popularity = {
			ideology = communism
			popularity = -0.10
		}
		add_timed_idea = {
			idea = communist_revolutionaries
			days = 365
		}
	}

	option = {
		name = political.19.b
		add_timed_idea = {
			idea = communist_revolutionaries
			days = 365
		}
	}

	option = {
		name = political.19.c
		trigger = {
			#Special case CHI PRC
			OR = {
				NOT = { tag = CHI }
				AND = {
					NOT = { country_exists = PRC }
					tag = CHI
				}			
			}
		}
		set_politics = {
			ruling_party = communism
			elections_allowed = no
		}
		add_national_unity = -0.05
	}
}

# political.20 Democratic

country_event = {
	id = political.20
	title = political.20.t
	desc = political.20.d
	picture = GFX_report_event_journalists_speech

	trigger = {
		democratic > 0.5
		NOT = { has_government = democratic }
		NOT = { has_idea = democratic_revolutionaries }
		NOT = { has_idea = reign_of_terror }
		is_puppet = no
	}

	mean_time_to_happen = {
		days = 30
	}

	option = {
		name = political.20.a
		add_political_power = -100
		add_popularity = {
			ideology = democratic
			popularity = -0.10
		}
		add_timed_idea = {
			idea = democratic_revolutionaries
			days = 365
		}
	}

	option = {
		name = political.20.b
		add_timed_idea = {
			idea = democratic_revolutionaries
			days = 365
		}
	}

	option = {
		name = political.20.c
		if = {
			limit = { has_government = fascism }
			add_timed_idea = { idea = fascism_defeated days = 730 }
		}
		if = {
			limit = { has_government = communism }
			add_timed_idea = { idea = communism_defeated days = 730 }
		}
		set_politics = {
			ruling_party = democratic
			elections_allowed = yes
		}
		add_national_unity = -0.05
	}
}


### Revolution
# political.21 Fascist
country_event = {
	id = political.21
	title = political.21.t
	desc = political.21.d
	picture = GFX_report_event_fascist_militia

	trigger = {
		fascism > 0.7
		has_idea = fascist_revolutionaries
	}

	mean_time_to_happen = {
		days = 2
	}

	immediate = {
		hidden_effect = { remove_ideas = fascist_revolutionaries }
	}

	option = {
		name = political.21.a
		start_civil_war = {
			ideology = fascism
			size = 0.5
		}
	}

	option = {
		name = political.21.b
		if = {
			limit = {
				has_government = democratic
			}
			start_civil_war = {
				ruling_party = fascism
				ideology = democratic
				size = 0.5
			}
		}
		if = {
			limit = {
				has_government = communism
			}
			start_civil_war = {
				ruling_party = fascism
				ideology = communism
				size = 0.5
			}
		}
		if = {
			limit = {
				has_government = neutrality
			}
			start_civil_war = {
				ruling_party = fascism
				ideology = neutrality
				size = 0.5
			}
		}
	}
}
# political.22 Communist
country_event = {
	id = political.22
	title = political.22.t
	desc = political.22.d
	picture = GFX_report_event_worker_protests

	trigger = {
		NOT = { tag = EQS
		tag = GRF }
		communism > 0.7
		has_idea = communist_revolutionaries
		#Special case CHI PRC
		OR = {
			NOT = { tag = CHI }
			AND = {
				NOT = { country_exists = PRC }
				tag = CHI
			}			
		}
	}

	mean_time_to_happen = {
		days = 2
	}

	immediate = {
		hidden_effect = { remove_ideas = communist_revolutionaries }
	}

	option = {
		name = political.22.a
		start_civil_war = {
			ideology = communism
			size = 0.5
		}
	}

	option = {
		name = political.22.b
		if = {
			limit = {
				has_government = democratic
			}
			start_civil_war = {
				ruling_party = communism
				ideology = democratic
				size = 0.5
			}
		}
		if = {
			limit = {
				has_government = fascism
			}
			start_civil_war = {
				ruling_party = communism
				ideology = fascism
				size = 0.5
			}
		}
		if = {
			limit = {
				has_government = neutrality
			}
			start_civil_war = {
				ruling_party = communism
				ideology = neutrality
				size = 0.5
			}
		}
	}
}
# political.23 Democratic
country_event = {
	id = political.23
	title = political.23.t
	desc = political.23.d
	picture = GFX_report_event_gathering_protest

	trigger = {
		democratic > 0.7
		has_idea = democratic_revolutionaries
		#Special case CHI PRC
		OR = {
			NOT = { tag = CHI }
			AND = {
				NOT = { country_exists = PRC }
				tag = CHI
			}			
		}
	}

	mean_time_to_happen = {
		days = 2
	}

	immediate = {
		hidden_effect = { remove_ideas = democratic_revolutionaries }
	}

	option = {
		name = political.23.a
		start_civil_war = {
			ideology = democratic
			size = 0.5
		}
	}

	option = {
		name = political.23.b
		if = {
			limit = {
				has_government = neutrality
			}
			start_civil_war = {
				ruling_party = democratic
				ideology = neutrality
				size = 0.5
			}
		}
		if = {
			limit = {
				has_government = fascism
			}
			add_timed_idea = { idea = fascism_defeated days = 730 }			
			start_civil_war = {
				ruling_party = democratic
				ideology = fascism
				size = 0.5
			}
		}
		if = {
			limit = {
				has_government = communism
			}
			add_timed_idea = { idea = communism_defeated days = 730 }
			start_civil_war = {
				ruling_party = democratic
				ideology = communism
				size = 0.5
			}
		}
	}
}

### Suppressed
# political.24 Fascist
country_event = {
	id = political.24
	title = political.24.t
	desc = political.24.d
	picture = GFX_report_event_fascists_posing

	trigger = {
		fascism < 0.3
		has_idea = fascist_revolutionaries
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = political.24.a
		remove_ideas = fascist_revolutionaries
	}
}
# political.25 Communist
country_event = {
	id = political.25
	title = political.25.t
	desc = political.25.d
	picture = GFX_report_event_stalin_propaganda

	trigger = {
		communism < 0.3
		has_idea = communist_revolutionaries
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = political.25.a
		remove_ideas = communist_revolutionaries
	}
}
# political.26 Democratic
country_event = {
	id = political.26
	title = political.26.t
	desc = political.26.d
	picture = GFX_report_event_europe_funeral

	trigger = {
		democratic < 0.3
		has_idea = democratic_revolutionaries
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = political.26.a
		remove_ideas = democratic_revolutionaries
	}
}

# Remove neutral foreign policy if fascist or commie
country_event = {
	id = political.27
	title = political.27.t
	desc = { 
		text = political.27.d_fascism
	 	trigger = { has_government = fascism }
	}
	desc = { 
		text = political.27.d_communism
	 	trigger = { has_government = communism }
	}
	picture = GFX_report_event_journalists_speech

	trigger = {
		OR = {
			has_government = fascism
			has_government = communism
		}
		has_idea = neutrality_idea
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = political.27.a
		remove_ideas = neutrality_idea
	}
}

# Country has same ideology as revolter
country_event = {
	id = political.28
	title = political.28.t
	desc = political.28.d

	picture = GFX_report_event_journalists_speech

	trigger = {
		any_other_country = {
			NOT = { tag = ROOT }
			original_tag = ROOT
			has_government = ROOT
		}
	}

	mean_time_to_happen = {
		days = 2
	}

	option = {
		name = political.28.a
		random_other_country = {
			limit = {
				original_tag = ROOT
				NOT = { tag = ROOT }
			}
			ROOT = { annex_country = { target = PREV transfer_troops = yes } }
		}
	}
}
