 EOANBSYS_legislative_reform_process_decision_category = {
	parl_vote_for_the_reform = {
		available = { always = no }
		activation = {
			NOT = { check_variable = { current_reform_id = 0 } }
		}
		is_good = yes
		days_mission_timeout = 30
		timeout_effect = {
			hidden_effect = {
				# Fire the vote event for all non-zero reform ID, dont change
				if = {
					limit = { NOT = { check_variable = { current_reform_id = 0 } } }
					country_event = { id = parliament_vote.0 }
				}
			}
		}
	}

	parl_rad_soc_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^0 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^0 > 0 }
			NOT = { has_country_flag = parl_rad_soc_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^0 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^0 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^0 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^0 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_soc_lib_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^1 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^1 > 0 }
			NOT = { has_country_flag = parl_soc_lib_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^1 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^1 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^1 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^1 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_soc_ega_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^2 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^2 > 0 }
			NOT = { has_country_flag = parl_soc_ega_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^2 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^2 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^2 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^2 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_cen_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^3 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^3 > 0 }
			NOT = { has_country_flag = parl_cen_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^3 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^3 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^3 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^3 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_tra_con_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^4 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^4 > 0 }
			NOT = { has_country_flag = parl_tra_con_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^4 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^4 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^4 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^4 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_rad_dem_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^5 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^5 > 0 }
			NOT = { has_country_flag = parl_rad_dem_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^5 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^5 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^5 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^5 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_chauv_pop_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^6 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^6 > 0 }
			NOT = { has_country_flag = parl_chauv_pop_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^6 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^6 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^6 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^6 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_aut_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^7 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^7 > 0 }
			NOT = { has_country_flag = parl_aut_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^7 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^7 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^7 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^7 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_fun_meet_party_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { parl_voting_approval_array^8 < 0.6 }
			check_variable = { current_reform_id > 0 }
			check_variable = { seats_count_array^8 > 0 }
			NOT = { has_country_flag = parl_fun_meet_party_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_meeting_small_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.1 }
			
			if = {
				limit = { check_variable = { parl_voting_approval_array^8 < 0.4 } }
				multiply_temp_variable = { parl_r = 0.5 }
				if = {
					limit = { check_variable = { parl_voting_approval_array^8 < 0.26 } }
					multiply_temp_variable = { parl_r = 0.5 }
				}
			}
			
			add_to_variable = { parl_voting_approval_array^8 = parl_r }
			clamp_variable = { var = parl_voting_approval_array^8 min = 0 max = 1 }
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_make_speech_in_parliament = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { current_reform_id > 0 }
			NOT = { has_country_flag = parl_make_speech_in_parliament_is_prohibited }
		}
		complete_effect = {
			add_political_power = -25
			custom_effect_tooltip = parl_speech_boost_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.05 }
			add_to_temp_variable = { parl_r = 0.025 }

			for_each_loop = {
				array = parl_voting_approval_array
				index = parl_i

				set_temp_variable = { parl_r_mod = parl_r }
				
				if = {
					limit = { check_variable = { parl_coalitions^parl_i = 1 } }
					multiply_temp_variable = { parl_r_mod = 1.5 }
				}
				else_if = {
					limit = { check_variable = { parl_coalitions^parl_i = 2 } }
					multiply_temp_variable = { parl_r_mod = -1 }
				}
				
				add_to_variable = { parl_voting_approval_array^parl_i = parl_r_mod }
				clamp_variable = { var = parl_voting_approval_array^parl_i min = 0 max = 1 }
			}

			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_make_political_deals = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { current_reform_id > 0 }
			NOT = { has_country_flag = parl_make_political_deals_is_prohibited }
		}
		complete_effect = {
			add_political_power = -20
			custom_effect_tooltip = parl_political_deals_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			set_temp_variable = { parl_r = random }
			multiply_temp_variable = { parl_r = 0.05 }
			add_to_temp_variable = { parl_r = 0.025 }

			for_each_loop = {
				array = parl_voting_approval_array
				index = parl_i

				if = {
					limit = { check_variable = { parl_coalitions^parl_i = 0 } }
					add_to_variable = { parl_voting_approval_array^parl_i = parl_r }
					clamp_variable = { var = parl_voting_approval_array^parl_i min = 0 max = 1 }
				}
			}

			# Set weight index based on government type
			if = {
				limit = { has_government = ideology_social_liberalism }
				add_to_variable = { parl_weights_normalized^0 = -0.05 }
			}
			else_if = {
				limit = { has_government = ideology_radical_socialism }
				add_to_variable = { parl_weights_normalized^1 = -0.05 }
			}
			else_if = {
				limit = { has_government = social_egalitarianism }
				add_to_variable = { parl_weights_normalized^2 = -0.05 }
			}
			else_if = {
				limit = { has_government = centrism }
				add_to_variable = { parl_weights_normalized^3 = -0.05 }
			}
			else_if = {
				limit = { has_government = traditional_conservatism }
				add_to_variable = { parl_weights_normalized^4 = -0.05 }
			}
			else_if = {
				limit = { has_government = radical_democracy }
				add_to_variable = { parl_weights_normalized^5 = -0.05 }
			}
			else_if = {
				limit = { has_government = chauvinist_populism }
				add_to_variable = { parl_weights_normalized^6 = -0.05 }
			}
			else_if = {
				limit = { has_government = autocracy }
				add_to_variable = { parl_weights_normalized^7 = -0.05 }
			}
			else_if = {
				limit = { has_government = fundamentalism }
				add_to_variable = { parl_weights_normalized^8 = -0.05 }
			}

			apply_coalition_modifier = yes
			compute_weights = yes
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_convince_opposition_leaders = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { current_reform_id > 0 }
			NOT = { has_country_flag = parl_convince_opposition_leaders_is_prohibited }
		}
		complete_effect = {
			add_political_power = -40
			custom_effect_tooltip = parl_convince_opposition_leaders_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_pressure_the_lobbies = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { current_reform_id > 0 }
			NOT = { has_country_flag = parl_pressure_the_lobbies_is_prohibited }
		}
		complete_effect = {
			add_political_power = -40
			custom_effect_tooltip = parl_pressure_the_lobbies_leaders_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_talk_with_the_unions = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { current_reform_id > 0 }
			NOT = { has_country_flag = parl_talk_with_the_unions_is_prohibited }
		}
		complete_effect = {
			add_political_power = -40
			custom_effect_tooltip = parl_pressure_the_lobbies_leaders_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_silence_out_opponants = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { current_reform_id > 0 }
			NOT = { has_country_flag = parl_silence_out_opponants_is_prohibited }
		}
		complete_effect = {
			add_political_power = -40
			custom_effect_tooltip = parl_silence_out_opponants_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}

	parl_propose_compromises = {
		available = { NOT = { has_country_flag = parl_political_action_in_progress } }
		days_remove = 7
		visible = {
			check_variable = { current_reform_id > 0 }
			NOT = { has_country_flag = parl_propose_compromises_is_prohibited }
		}
		complete_effect = {
			add_political_power = -40
			custom_effect_tooltip = parl_propose_compromises_tt
			set_country_flag = parl_political_action_in_progress
		}
		remove_effect = {
			clr_country_flag = parl_political_action_in_progress
			compute_number_seats_tot = yes
			compute_number_seats_approve_est = yes
		}
	}
}
