﻿law_no_police = {
	group = lawgroup_policing
	
	icon = "gfx/interface/icons/law_icons/no_police.dds"
	
	progressiveness = 0

	can_enact = {
		custom_tooltip = {
			modifier:country_disallow_law_no_police_bool = no
			text = disallow_law_no_police_tt
		}
	}	

	# AI shouldn't try to abolish institutions
	ai_will_do = {
		always = no
	}

	ai_enact_weight_modifier = { #Petitions
		value = 0
		
		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}
	}
}

law_local_police = {
	group = lawgroup_policing
	
	icon = "gfx/interface/icons/law_icons/local_police.dds"
	
	unlocking_technologies = {
		tech_bureaucracy
	}

	modifier = {
	}
	
	progressiveness = 50

	institution = institution_police
	institution_modifier = {
		country_aristocrats_pol_str_mult = 0.05
	}

	can_impose = {
		OR = {
			AND = {
				is_in_same_power_bloc = scope:target_country
				AND = {
					modifier:country_can_impose_same_lawgroup_policing_in_power_bloc_bool = yes
					has_law = scope:law
				}
			}
			can_impose_law_default = yes
		}
	}

	ai_enact_weight_modifier = { #Petitions
		value = 0

		if = {
			limit = {
				has_law = law_type:law_no_police
			}
			add = 500
		}
		
		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}
	}

	ai_impose_chance = {
		value = 0
		
		if = {
			limit = {
				has_law = law_type:law_local_police
				power_bloc ?= { has_principle_group = principle_group:principle_group_police_coordination }
			}
			add = base_impose_law_weight
		}

		if = {
			limit = {
				has_law = law_type:law_local_police
				scope:target_country = {
					has_law = law_type:law_no_police
				}
				power_bloc ?= { has_principle_group = principle_group:principle_group_police_coordination }
			}
			add = 10
		}
			
		if = {
			limit = {
				scope:target_country = {
					c:BIC ?= this
					OR = {	
						has_journal_entry = je_british_dictate_plantations
						has_journal_entry = je_british_dictate_military
						has_journal_entry = je_british_dictate_universities
					}
				}
			}
			multiply = 0
		}
	}
}

law_dedicated_police = {
	group = lawgroup_policing
	
	icon = "gfx/interface/icons/law_icons/dedicated_police.dds"
	
	progressiveness = 100

	unlocking_technologies = {
		law_enforcement
	}

	modifier = {
	}

	institution = institution_police
	institution_modifier = {
	}
	
	can_impose = {
		OR = {
			AND = {
				is_in_same_power_bloc = scope:target_country
				AND = {
					modifier:country_can_impose_same_lawgroup_policing_in_power_bloc_bool = yes
					has_law = scope:law
				}
			}
			can_impose_law_default = yes
		}
	}

	ai_enact_weight_modifier = { #Petitions
		value = 0

		if = {
			limit = {
				has_law = law_type:law_no_police
			}
			add = 500
		}
		
		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}
	}

	ai_impose_chance = {
		value = 0
		
		if = {
			limit = {
				has_law = law_type:law_dedicated_police
				power_bloc ?= { has_principle_group = principle_group:principle_group_police_coordination }
			}
			add = base_impose_law_weight
		}

		if = {
			limit = {
				has_law = law_type:law_dedicated_police
				scope:target_country = {
					has_law = law_type:law_no_police
				}
				power_bloc ?= { has_principle_group = principle_group:principle_group_police_coordination }
			}
			add = 10
		}
			
		if = {
			limit = {
				scope:target_country = {
					c:BIC ?= this
					OR = {	
						has_journal_entry = je_british_dictate_plantations
						has_journal_entry = je_british_dictate_military
						has_journal_entry = je_british_dictate_universities
					}
				}
			}
			multiply = 0
		}
	}
}

law_militarized_police = {
	group = lawgroup_policing
	
	icon = "gfx/interface/icons/law_icons/militarized_police.dds"
	
	progressiveness = 75

	unlocking_technologies = {
		enlistment_offices
	}

	modifier = {
	}

	institution = institution_police
	institution_modifier = {
		country_officers_pol_str_mult = 0.05
		state_mortality_turmoil_mult = 0.005
		country_authority_add = 20
	}
	
	can_impose = {
		OR = {
			AND = {
				is_in_same_power_bloc = scope:target_country
				AND = {
					modifier:country_can_impose_same_lawgroup_policing_in_power_bloc_bool = yes
					has_law = scope:law
				}
			}
			can_impose_law_default = yes
		}
	}

	ai_enact_weight_modifier = { #Petitions
		value = 0

		if = {
			limit = {
				has_law = law_type:law_no_police
			}
			add = 500
		}
		
		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}
	}

	ai_impose_chance = {
		value = 0
		
		if = {
			limit = {
				has_law = law_type:law_militarized_police
				power_bloc ?= { has_principle_group = principle_group:principle_group_police_coordination }
			}
			add = base_impose_law_weight
		}

		if = {
			limit = {
				has_law = law_type:law_militarized_police
				scope:target_country = {
					has_law = law_type:law_no_police
				}
				power_bloc ?= { has_principle_group = principle_group:principle_group_police_coordination }
			}
			add = 10
		}
			
		if = {
			limit = {
				scope:target_country = {
					c:BIC ?= this
					OR = {	
						has_journal_entry = je_british_dictate_plantations
						has_journal_entry = je_british_dictate_military
						has_journal_entry = je_british_dictate_universities
					}
				}
			}
			multiply = 0
		}
	}
}
