#	Example:
# 
#	example_effect = {
#		add_political_power = 66
#		add_popularity = {
#			ideology = fascism
#			popularity = 0.33
#		}
#	}
#
#
#	In a script file:
#
#	effect = {
#		example_effect = yes
#	}
#

######


SS_resolve_effects_wehrmacht = {
	if = {
		limit = {
			AND = {
				check_variable = { var = wehrmacht_anger value = 0 compare = greater_than_or_equals }
				check_variable = { wehrmacht_anger < 10 }
			}
		}
		random_list = {
			50 = { country_event = { id = ss_recruitment_event.10 days = 1 } } #generals protest
			50 = {}
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = wehrmacht_anger value = 10 compare = greater_than_or_equals }
				check_variable = { wehrmacht_anger < 20 }
			}
		}
		random_list = {
			50 = { country_event = { id = ss_recruitment_event.10 days = 1 } } #generals protest
			25 = { country_event = { id = ss_recruitment_event.11 days = 1 } } #general resigns in protest
			25 = {}
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = wehrmacht_anger value = 20 compare = greater_than_or_equals }
				check_variable = { wehrmacht_anger < 30 }
			}
		}
		random_list = {
			50 = { country_event = { id = ss_recruitment_event.10 days = 1 } } #generals protest
			25 = { country_event = { id = ss_recruitment_event.11 days = 1 } } #general resigns in protest
			25 = { country_event = { id = ss_recruitment_event.12 days = 1 } } #generals plot
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = wehrmacht_anger value = 30 compare = greater_than_or_equals }
				check_variable = { wehrmacht_anger < 40 }
			}
		}
		random_list = {
			35 = { country_event = { id = ss_recruitment_event.10 days = 1 } } #generals protest
			35 = { country_event = { id = ss_recruitment_event.11 days = 1 } } #general resign
			30 = { country_event = { id = ss_recruitment_event.12 days = 1 } } #generals plot
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = wehrmacht_anger value = 40 compare = greater_than_or_equals }
				check_variable = { wehrmacht_anger < 50 }
			}
		}
		random_list = {
			35 = { country_event = { id = ss_recruitment_event.11 days = 1 } } #general resigns
			55 = { country_event = { id = ss_recruitment_event.12 days = 1 } } #generals plot
			10 = { 
				modifier = {
					NOT = {
						any_unit_leader = {
							has_unit_leader_flag = GER_SS_conspirator
						}
					}
					factor = 0
				}
				country_event = { id = ss_recruitment_event.13 days = 1 } 
			} #assassination attempt
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = wehrmacht_anger value = 50 compare = greater_than_or_equals }
				check_variable = { wehrmacht_anger < 60 }
			}
		}
		random_list = {
			75 = { country_event = { id = ss_recruitment_event.12 days = 1 } } #generals plot
			15 = { 
				modifier = {
					NOT = {
						any_unit_leader = {
							has_unit_leader_flag = GER_SS_conspirator
						}
					}
					factor = 0
				}
				country_event = { id = ss_recruitment_event.13 days = 1 } 
			} #assassination attempt
			10 = { country_event = { id = ss_recruitment_event.14 days = 1 } } #civil war
		}
	}
	if = {
		limit = {
			check_variable = { var = wehrmacht_anger value = 60 compare = greater_than_or_equals }
		}
		random_list = {
			15 = { 
				modifier = {
					NOT = {
						any_unit_leader = {
							has_unit_leader_flag = GER_SS_conspirator
						}
					}
					factor = 0
				}
				country_event = { id = ss_recruitment_event.13 days = 1 } 
			} #assassination attempt
			10 = { country_event = { id = ss_recruitment_event.14 days = 1 } } #civil war
		}
	}
}

SS_resolve_effects_ss = {
	if = {
		limit = {
			AND = {
				check_variable = { var = SS_anger value = 0 compare = greater_than_or_equals }
				check_variable = { SS_anger < 10 }
			}
		}
		random_list = {
			50 = { country_event = { id = ss_recruitment_event.20 days = 1 } } #Himmler protests
			50 = {}
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = SS_anger value = 10 compare = greater_than_or_equals }
				check_variable = { SS_anger < 20 }
			}
		}
		random_list = {
			50 = { country_event = { id = ss_recruitment_event.20 days = 1 } } #Himmler protest
			25 = { country_event = { id = ss_recruitment_event.21 days = 1 } } #secret meeting of SS officers
			25 = {}
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = SS_anger value = 20 compare = greater_than_or_equals }
				check_variable = { SS_anger < 30 }
			}
		}
		random_list = {
			50 = { country_event = { id = ss_recruitment_event.20 days = 1 } } #Himmler protest
			25 = { country_event = { id = ss_recruitment_event.21 days = 1 } } #SS officials meet
			25 = { country_event = { id = ss_recruitment_event.22 days = 1 } } #SS reroutes factory output
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = SS_anger value = 30 compare = greater_than_or_equals }
				check_variable = { SS_anger < 40 }
			}
		}
		random_list = {
			35 = { country_event = { id = ss_recruitment_event.21 days = 1 } } #SS officials meet
			35 = { country_event = { id = ss_recruitment_event.22 days = 1 } } #SS reroutes factory output
			30 = { country_event = { id = ss_recruitment_event.23 days = 1 } } #Himmler plots plot
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = SS_anger value = 40 compare = greater_than_or_equals }
				check_variable = { SS_anger < 50 }
			}
		}
		random_list = {
			35 = { country_event = { id = ss_recruitment_event.21 days = 1 } } #SS officials meet
			55 = { country_event = { id = ss_recruitment_event.23 days = 1 } } #Himmler plots
			10 = { country_event = { id = ss_recruitment_event.24 days = 1 } } #assassination attempt - SS
		}
	}
	if = {
		limit = {
			AND = {
				check_variable = { var = SS_anger value = 50 compare = greater_than_or_equals }
				check_variable = { SS_anger < 60 }
			}
		}
		random_list = {
			75 = { country_event = { id = ss_recruitment_event.23 days = 1 } } #Himmler plots
			15 = { country_event = { id = ss_recruitment_event.24 days = 1 } } #assassination attempt - SS
			10 = { country_event = { id = ss_recruitment_event.25 days = 1 } } #fascist on fascist violence
		}
	}
	if = {
		limit = {
			check_variable = { var = SS_anger value = 60 compare = greater_than_or_equals }
		}
		random_list = {
			15 = { country_event = { id = ss_recruitment_event.24 days = 1 } } #assassination attempt - SS
			10 = { country_event = { id = ss_recruitment_event.25 days = 1 } } #fascist on fascist violence
		}
	}
}