

add_namespace = repbdef


country_event = {
	id = repbdef.1
	title = repbdef.1.t
	desc = repbdef.1.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			check_variable = partyopposition > 35 
			has_government = communism }
	mean_time_to_happen = {
		days = 3000 }

	option = {
		name = theywillpay_option.1.a
		add_political_power = -100
		add_stability = -0.02
		add_war_support = -0.02
		subtract_from_variable = { approvalr = 5 }
		}
	
	option = {
		name = freedemocrat_option.2.b
		add_political_power = -50
		add_stability = -0.03
		add_war_support = -0.05
		subtract_from_variable = { approvalr = 10 }
	if = { limit = { check_variable = { partysupport > 10 }
				check_variable = { partyopposition < 10 } }
		add_to_variable = { partyopposition = 10 }
		subtract_from_variable = { partysupport = 10 }
			}
		country_event = {
   		 id = repbdef.2
   		 days = 15
			}
		}
	}

# gainssupportone
country_event = {
	id = repbdef.2
	title = repbdef.2.t
	desc = repbdef.2.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	option = {
		name = problemsok_option.1.a
		if = { limit = { check_variable = { partysupport > 10 }
				check_variable = { partyopposition < 10 } }
		add_to_variable = { partyopposition = 10 }
		subtract_from_variable = { partysupport = 10 }
			}
	}
}

# questions
country_event = {
	id = repbdef.3
	title = repbdef.3.t
	desc = repbdef.3.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no
			has_government = communist
			has_stability < 0.75 }
	mean_time_to_happen = {
		days = 3530 }
	option = {
		name = problemsok_option.1.a
		add_stability = -0.02
		if = { limit = { check_variable = { partysupport > 10 }
				check_variable = { partyopposition < 100 } }
		add_to_variable = { partyopposition = 10 }
		subtract_from_variable = { partysupport = 10 }
			}
	}
}

# losing hope
country_event = {
	id = repbdef.4
	title = repbdef.4.t
	desc = repbdef.4.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			has_war = yes
			has_war_support < 0.50 
			has_government = communism }
	mean_time_to_happen = {
		days = 3330 }
	option = {
		name = problemsok_option.1.a
		add_war_support = -0.02
		if = { limit = { check_variable = { partysupport > 10 }
				check_variable = { partyopposition < 100 } }
		add_to_variable = { partyopposition = 10 }
		subtract_from_variable = { partysupport = 10 }
			}
	}
}

country_event = {
	id = repbdef.5
	title = repbdef.5.t
	desc = repbdef.5.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			check_variable = partyopposition > 45 
			has_government = communism }
	mean_time_to_happen = {
		days = 1400 }

	option = {
		name = theywillpay_option.1.a
		add_political_power = -100
		add_stability = -0.02
		add_war_support = -0.02
		subtract_from_variable = { approvalr = 3 }
		add_popularity = {
  		  ideology = neutrality
  		  popularity = 0.05
		}	
		}
	
	}

country_event = {
	id = repbdef.6
	title = repbdef.6.t
	desc = repbdef.6.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			check_variable = partyopposition > 45 
			has_government = communism }
	mean_time_to_happen = {
		days = 1400 }

	option = {
		name = theywillpay_option.1.a
		add_political_power = -150
		add_stability = -0.02
		add_war_support = -0.02
		subtract_from_variable = { approvalr = 5 }
		add_popularity = {
  		  ideology = democratic
  		  popularity = 0.05
		}	
		}
	
	}

# losing hope
country_event = {
	id = repbdef.7
	title = repbdef.7.t
	desc = repbdef.7.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			check_variable = partyopposition > 15 
			has_government = communism }
	mean_time_to_happen = {
		days = 2650 }
	option = {
		name = problemsok_option.1.a
		add_war_support = -0.03
		if = { limit = { check_variable = { partysupport > 10 }
				check_variable = { partyopposition < 100 } }
		add_to_variable = { partyopposition = 10 }
		subtract_from_variable = { partysupport = 10 }
			}
	}
}

# rewrittenconstitution
country_event = {
	id = repbdef.8
	title = repbdef.8.t
	desc = repbdef.8.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes
	
	option = {
		name = adoptliberalpolicies_option.1.a
		news_event = {
			id = worldpol.9
			days = 1
		}
			add_ideas = {
					 yesfreedom_idea
   					 freepress_idea
					}
			add_political_power = -1000
			set_country_leader_ideology = marxism
			}
	}

	option = {
		name = astatewithoutlawswillhon_option.2.b
		add_political_power = -1000
		country_event = {
   				 id = aan.2
				}
		news_event = {
			id = worldpol.9
			days = 1
		}
			}
	}

	option = {
		name = leninteachiings_option.3.c
		add_political_power = -1000
		set_country_leader_ideology = leninism
		news_event = {
			id = worldpol.9
			days = 1
		}
			}
	}

	option = {
		name = stalinteachiings_option.4.d
		news_event = {
			id = worldpol.9
			days = 1
		}
		add_political_power = -1000
		set_country_leader_ideology = stalinism
			}
	}

# Party Disproves of Justice
country_event = {
	id = repbdef.9
	title = repbdef.9.t
	desc = repbdef.9.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			has_government = communism 
			OR = { 
			has_country_flag = judgehavecon
			has_country_flag = judgehavenat
				}}
	mean_time_to_happen = {
		days = 750 }
	option = {
		name = firethejustice_option.1.a
		subtract_from_variable = { numjustices = 1 }
		custom_effect_tooltip = LOSE_JUSTICE_EVENT_TT
			}
	option = {
		name = hewillnotgo_option.1.a
		if = { limit = { check_variable = { partysupport > 10 }
				check_variable = { partyopposition < 100 } }
		add_to_variable = { partyopposition = 10 }
		subtract_from_variable = { partysupport = 10 }
				}
			}
	}


country_event = {
	id = repbdef.10
	title = repbdef.10.t
	desc = repbdef.10.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			has_government = communism 
			OR = { 
			has_country_flag = judgehavecon
			has_country_flag = judgehavenat
				}}
	mean_time_to_happen = {
		days = 1750 }
	option = {
		name = anunfortunate_option.1.a
		subtract_from_variable = { numjustices = 1 }
		custom_effect_tooltip = LOSE_JUSTICE_EVENT_TT
			}
	}
	
# Fascist Party Disproves of Justice 
country_event = {
	id = repbdef.11
	title = repbdef.11.t
	desc = repbdef.11.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			has_government = fascist
			OR = { 
			has_country_flag = judgehavelib
			has_country_flag = judgehavesoc
				}}
	mean_time_to_happen = {
		days = 750 }
	option = {
		name = firethejustice_option.1.a
		subtract_from_variable = { numjustices = 1 }
		custom_effect_tooltip = LOSE_JUSTICE_EVENT_TT
			}
	option = {
		name = hewillnotgo_option.1.a
			}
	}


country_event = {
	id = repbdef.12
	title = repbdef.12.t
	desc = repbdef.12.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = no
	trigger = { is_ai = no 
			has_government = fascist
			OR = { 
			has_country_flag = judgehavelib
			has_country_flag = judgehavesoc
				}}
	mean_time_to_happen = {
		days = 1750 }
	option = {
		name = anunfortunate_option.1.a
		subtract_from_variable = { numjustices = 1 }
		custom_effect_tooltip = LOSE_JUSTICE_EVENT_TT
			}
	}