@ucr_small = 20
@ucr_big = 35

BLR_recalc_parliament_icon_frames = { ### Always use this after adding value to the variable, updates the GFX 
	
	set_temp_variable = { parliament_temp = blr_parliament_support } ### Assigns the currrent parliament support to a temporary variable
	divide_temp_variable = { parliament_temp = blr_parliament_total } ### Divides the current support by the max value
	multiply_temp_variable = { parliament_temp = 10 } ### Set it to 10, 1 less than the max because the first frame of the GFX has 0 green seats
	add_to_temp_variable = { parliament_temp = 1 } ### Adding 1 to the variable in order to make all frames accessable
	if = {
		limit = { check_variable = { parliament_temp > 0 } }
		clamp_temp_variable = {
			var = parliament_temp
			min = 1
			max = 11
		}
	}
	else = {
		set_temp_variable = { parliament_temp = 1 }
	}
	set_variable = { BLR_current_parliament_icon_frame = parliament_temp } ### Sets the current frame number to the one caluclated
}


BLR_parliament_support_add5 = { ### Use this when adding 1-5 support
	custom_effect_tooltip = BLR_parliament_support_add5_tt ### Custom tooltip
	set_temp_variable = { temp_factor = random } ### Generates a random value between 0 and 1
	multiply_temp_variable = { temp_factor = 6 } ### Multiplies the value by 5 to get a value between 0 and 10
	clamp_temp_variable = { var = temp_factor max = 6 min = 2 } ### Is used to cap the variable, currently set that it can be at most 5 and at least 1
	add_to_variable = { blr_parliament_support = temp_factor } ### Increases the support by the value generated
	round_variable = blr_parliament_support ### Rounds the support to the nearest int
	clamp_variable = { var = blr_parliament_support max = blr_parliament_total min = 0 } ### Clamps the support value so it can't exceed the maximum
	BLR_recalc_parliament_icon_frames = yes
}

BLR_parliament_support_add3 = { ### Use this when adding 6-10 support
    custom_effect_tooltip = BLR_parliament_support_add3_tt ### Custom tooltip
    set_temp_variable = { temp_factor = random } ### Generates a random value between 0 and 1
    multiply_temp_variable = { temp_factor = 3 } ### Multiplies the value by 10 to get a value between 0 and 10
    clamp_temp_variable = { var = temp_factor max = 3 min = 1 } ### Is used to cap the variable, currently set that it can be at most 10 and at least 1
    add_to_variable = { blr_parliament_support  = temp_factor } ### Increases the support by the value generated
    round_variable = blr_parliament_support ### Rounds the support to the nearest int
    clamp_variable = { var = blr_parliament_support max = blr_parliament_total min = 0 } ### Clamps the support value so it can't exceed the maximum
    BLR_recalc_parliament_icon_frames = yes
}

BLR_parliament_small_opposition = {
	custom_effect_tooltip = blr_parliament_small_opposition_tt
	set_temp_variable = { temp_factor = random }
	multiply_temp_variable = { temp_factor = -5 }
	add_to_variable = { blr_parliament_support = temp_factor }
	round_variable = blr_parliament_support
	clamp_variable = { var = blr_parliament_support max = blr_parliament_total min = 0 }
	BLR_recalc_parliament_icon_frames = yes
}

BLR_parliament_big_opposition = {
	custom_effect_tooltip = blr_parliament_big_opposition_tt
	set_temp_variable = { temp_factor = random }
	multiply_temp_variable = { temp_factor = -10 }
	clamp_temp_variable = { var = temp_factor max = -5 min = -10 }
	add_to_variable = { blr_parliament_support = temp_factor }
	round_variable = blr_parliament_support
	clamp_variable = { var = blr_parliament_support max = blr_parliament_total min = 0 }
	BLR_recalc_parliament_icon_frames = yes
}

BLR_parliament_small_support = {
	custom_effect_tooltip = blr_parliament_small_support_tt
	set_temp_variable = { temp_factor = random }
	multiply_temp_variable = { temp_factor = 5 }
	add_to_variable = { blr_parliament_support = temp_factor }
	round_variable = blr_parliament_support
	clamp_variable = { var = blr_parliament_support max = blr_parliament_total min = 0 }
	BLR_recalc_parliament_icon_frames = yes
}

BLR_check_attitude_status = {
	hidden_effect = {
	    if = {
		    limit = { 
			    has_completed_focus = BLR_belarusian_sanation_political_regime
                has_government = neutrality
			}
			
			if = {
			    limit = { 
				    check_variable = { var_nikodim_attitude = -2 }
				}
				set_country_flag = BLR_nikod_is_-2
				clr_country_flag = BLR_nikod_is_-1
				clr_country_flag = BLR_nikod_is_0
				clr_country_flag = BLR_nikod_is_1
				clr_country_flag = BLR_nikod_is_2
				add_ideas = blr_angry_balakhovich
			}
			
			if = {
			    limit = { 
				    check_variable = { var_nikodim_attitude = -1 }
				}
				set_country_flag = BLR_nikod_is_-1
				clr_country_flag = BLR_nikod_is_-2
				clr_country_flag = BLR_nikod_is_0
				clr_country_flag = BLR_nikod_is_1
				clr_country_flag = BLR_nikod_is_2
				add_ideas = blr_disloyal_balakhovich
			}
			
			if = {
			    limit = { 
				    check_variable = { var_nikodim_attitude = 0 }
				}
				set_country_flag = BLR_nikod_is_0
				clr_country_flag = BLR_nikod_is_-2
				clr_country_flag = BLR_nikod_is_-1
				clr_country_flag = BLR_nikod_is_1
				clr_country_flag = BLR_nikod_is_2
				add_ideas = blr_neutral_balakhovich
			}
			
			if = {
			    limit = { 
				    check_variable = { var_nikodim_attitude = 1 }
				}
				set_country_flag = BLR_nikod_is_1
				clr_country_flag = BLR_nikod_is_-2
				clr_country_flag = BLR_nikod_is_-1
				clr_country_flag = BLR_nikod_is_0
				clr_country_flag = BLR_nikod_is_2
				add_ideas = blr_loyal_balakhovich
			}
			
			if = {
			    limit = { 
				    check_variable = { var_nikodim_attitude = 2 }
				}
				set_country_flag = BLR_nikod_is_2
				clr_country_flag = BLR_nikod_is_-2
				clr_country_flag = BLR_nikod_is_-1
				clr_country_flag = BLR_nikod_is_0
				clr_country_flag = BLR_nikod_is_1
				add_ideas = blr_happy_balakhovich
			}
			
			###
			
			if = {
			    limit = { 
				    check_variable = { var_sereda_attitude = -2 }
				}
				set_country_flag = BLR_sereda_is_-2
				clr_country_flag = BLR_sereda_is_-1
				clr_country_flag = BLR_sereda_is_0
				clr_country_flag = BLR_sereda_is_1
				clr_country_flag = BLR_sereda_is_2
				add_ideas = blr_angry_sereda
			}
			
			if = {
			    limit = { 
				    check_variable = { var_sereda_attitude = -1 }
				}
				set_country_flag = BLR_sereda_is_-1
				clr_country_flag = BLR_sereda_is_-2
				clr_country_flag = BLR_sereda_is_0
				clr_country_flag = BLR_sereda_is_1
				clr_country_flag = BLR_sereda_is_2
				add_ideas = blr_disloyal_sereda
			}
			
			if = {
			    limit = { 
				    check_variable = { var_sereda_attitude = 0 }
				}
				set_country_flag = BLR_sereda_is_0
				clr_country_flag = BLR_sereda_is_-2
				clr_country_flag = BLR_sereda_is_-1
				clr_country_flag = BLR_sereda_is_1
				clr_country_flag = BLR_sereda_is_2
				add_ideas = blr_neutral_sereda
			}
			
			if = {
			    limit = { 
				    check_variable = { var_sereda_attitude = 1 }
				}
				set_country_flag = BLR_sereda_is_1
				clr_country_flag = BLR_sereda_is_-2
				clr_country_flag = BLR_sereda_is_-1
				clr_country_flag = BLR_sereda_is_0
				clr_country_flag = BLR_sereda_is_2
				add_ideas = blr_loyal_sereda
			}
			
			if = {
			    limit = { 
				    check_variable = { var_sereda_attitude = 2 }
				}
				set_country_flag = BLR_sereda_is_2
				clr_country_flag = BLR_sereda_is_-2
				clr_country_flag = BLR_sereda_is_-1
				clr_country_flag = BLR_sereda_is_0
				clr_country_flag = BLR_sereda_is_1
				add_ideas = blr_happy_sereda
			}
		}
		
	}
			
		
}



	