﻿law_no_social_security = {
	group = lawgroup_welfare
	
	icon = "gfx/interface/icons/law_icons/no_social_security.dds"
	
	progressiveness = 0
	
	possible_political_movements = {
		law_poor_laws
		law_wage_subsidies
	}
	
	# AI will never abolish institutions entirely
	ai_will_do = {
		always = no
	}
}

law_poor_laws = {
	group = lawgroup_welfare
	
	icon = "gfx/interface/icons/law_icons/poor_laws.dds"
	
	progressiveness = 25
	
	unlocking_technologies = {
		democracy
	}

	modifier = {
		state_welfare_payments_add = 0.4
	}
	
	institution = institution_social_security
	institution_modifier = {
		state_political_strength_from_welfare_mult = -0.15
	}
	
	possible_political_movements = {
		law_wage_subsidies
	}
	
	pop_support = {
		value = 0
		
		add = {
			desc = "POP_POVERTY"			
			if = {
				limit = { 
					standard_of_living <= 14
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 13
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 12
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}	
			if = {
				limit = { 
					standard_of_living <= 11
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}				
			if = {
				limit = { 
					standard_of_living <= 10
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}			
			if = {
				limit = { 
					standard_of_living <= 9
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 8
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 7
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}	
			if = {
				limit = { 
					standard_of_living <= 6
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 01
			}	
			if = {
				limit = { 
					standard_of_living <= 5
					owner = { 
						NOR = { 
							has_law = law_type:law_old_age_pension 
							has_law = law_type:law_wage_subsidies
						} 
					}
				}
				value = 0.1
			}					
		}		
	}
}

law_wage_subsidies = {
	group = lawgroup_welfare
	
	icon = "gfx/interface/icons/law_icons/wage_controls.dds"
	
	progressiveness = 75
	
	unlocking_technologies = {
		labor_movement
	}
	
	modifier = {
		state_welfare_payments_add = 0.5
		country_institution_social_security_max_investment_add = 2
	}

	institution = institution_social_security
	
	possible_political_movements = {
		law_old_age_pension
	}
	
	pop_support = {
		value = 0
		
		add = {
			desc = "POP_POVERTY"		
			if = {
				limit = { 
					standard_of_living <= 14
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 13
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 12
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}	
			if = {
				limit = { 
					standard_of_living <= 11
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}				
			if = {
				limit = { 
					standard_of_living <= 10
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}			
			if = {
				limit = { 
					standard_of_living <= 9
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 8
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 7
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}	
			if = {
				limit = { 
					standard_of_living <= 6
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}	
			if = {
				limit = { 
					standard_of_living <= 5
					owner = { NOT = { has_law = law_type:law_old_age_pension } }
				}
				value = 0.1
			}				
		}		
	}
}

law_old_age_pension = {
	group = lawgroup_welfare
	
	icon = "gfx/interface/icons/law_icons/old_age_pension.dds"
	
	progressiveness = 100
	
	unlocking_technologies = {
		human_rights
	}	
	
	modifier = {
		state_welfare_payments_add = 0.5
		country_institution_social_security_max_investment_add = 2
	}

	institution = institution_social_security
	institution_modifier = {
		state_dependent_wage_mult = 0.2
		state_working_adult_ratio_add = -0.01
		state_dependent_political_participation_add = 0.02
	}
	
	# Below needed since this Law changes Politial Participation
	on_activate = {
		recalculate_pop_ig_support = yes
	}
	
	on_deactivate = {
		recalculate_pop_ig_support = yes
	}
	
	pop_support = {
		value = 0
		
		add = {
			desc = "POP_POVERTY"			
			if = {
				limit = { 
					standard_of_living <= 14
				}
				value = 0.1
			}		
			if = {
				limit = { 
					standard_of_living <= 13
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 12
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 11
				}
				value = 0.1
			}			
			if = {
				limit = { 
					standard_of_living <= 10
				}
				value = 0.1
			}			
			if = {
				limit = { 
					standard_of_living <= 9
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 8
				}
				value = 0.1
			}
			if = {
				limit = { 
					standard_of_living <= 7
				}
				value = 0.1
			}	
			if = {
				limit = { 
					standard_of_living <= 6
				}
				value = 0.1
			}	
			if = {
				limit = { 
					standard_of_living <= 5
				}
				value = 0.1
			}				
		}		
	}
}
