##id is used for localization
#example_law = {
#	#tooltip description for the law
#	tooltip = "loc_key"
#
#	#gfx entry & frame for law entry icon
#	#gfx entry can be omitted, in that case it will default to GFX_policy_icon_strip
#	icon = "GFX_icon:5"
#
#	#plays when the law is selected
#	sound_effect = "sound_effect"
#
#	#if a law is not visible, it won't show up in gui at all
#	#scope is occupier country, occupied country is not set (this is only check at country level, not target level)
#	visible = {
#		always = yes
#	}
#
#	#if a law is not available, it will show up in disable state ingui and won't be selectable
#	#scope is occupier country and from scope is occupied country
#	available = {
#		always = yes
#	}
#
#	#if a current modifier is no longer active (visible/available is false) it will fallback to this law
#	fallback_law = law_id
#
#	#main fallback modifier will be used when previous modifier is no longer active and there is no fallback_law, there must be exactly one fallback modifier
#	#if you are lacking manpower/equipments for your current laws, fallback modifier bonuses will apply instead (will lerp to fallback and at 0 manpower you will be forced to switch)
#	main_fallback_law = yes
#
#	#applies to states if the law is selected
#	state_modifier = {
#
#	}
#
#	#states with resistance supressed (at 0) will get this modifier instead (if defined)
#	suppressed_state_modifier = {
#
#	}
#
#	#by default laws are sorted by load order, gui_order can be used to reorder them in gui. by default it is 0
#	gui_order = 1
#
#	# score used for selecting a law for state
#	# scope is state
#	# from is occupier
#	# from from is occupied
#	# ai_desire_resource temp variables will be available for the triggers,
#	# which is a value in between 0-1 to show desire for a certain resource
#	# uncapped_resistance_target temp variable can be used for getting resistance that that is not capped to 0-100
#	# resistance_target_without_law temp variable can be used for accessing resistance target value that is not modifier by law
#	# garrison_min_support_ratio garrison_equipment_support_ratio garrison_manpower_support_ratio gives what ratio of the garrison factor we can support for current template and buffers
#	ai_will_do = {
#		base = 100
#
#		modifier = {
#			steel > 10
#			add = 100
#		}
#	}
#}


no_garrison = {
	icon = 1
	sound_effect = "Martial_Law_Interface_No_Garrison"

	state_modifier = {
		#resistance_target = 0
		#resistance_growth = 0.25
		no_compliance_gain = 1
		required_garrison_factor = -1
		local_resources = -0.2
	}

	ai_will_do = {
		base = 0
		modifier = {
			FROM = {
				has_manpower < 100
			}
			law = autonomous_occupation
			add = 150
		}
	}
}

autonomous_occupation = {
	icon = 3
	sound_effect = "Martial_Law_Interface_Foreign_Cvilian_Oversight"

	state_modifier = {
		resistance_target = -0.35
		#resistance_damage_to_garrison = 0
		required_garrison_factor = -0.5
		resistance_damage_to_garrison = -0.25
		resistance_decay = 0.3
		# local_resources = -0.1
		# local_factories = -0.1
		#no_compliance_gain = 0
		compliance_gain = 0.02
	}

	ai_will_do = {
		base = 0
		modifier = {
			check_variable = {
				var = compliance
				value = 90
				compare = greater_than
			}
			add = 100
		}
	}
}

foreign_civilian_oversight = {
	icon = 11
	default_law = yes
	starting_law = yes
	sound_effect = "Martial_Law_Interface_Local_Police_Force_Garrison"

	state_modifier = {
		resistance_target = -0.45
		#resistance_damage_to_garrison = -0.3
		resistance_decay = 0.2
		#required_garrison_factor = 0
		local_resources = -0.2
		local_factories = -0.2
		#no_compliance_gain = 0
		compliance_gain = 0.04
	}

	ai_will_do = {
		base = 25
		modifier = {
			OR = {
				AND = {
					check_variable = { resistance_target_without_law < 0.75 }
					check_variable = {
						var = compliance
						value = 90
						compare = greater_than
					}
				}
				check_variable = { garrison_min_support_ratio < 0.7 }    # don't try to fight resistance, if you can't garrison anything
			}
			factor = 0
		}
	}
}

local_police_force_garrison = {
	icon = 2
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	state_modifier = {
		resistance_target = -0.5
		resistance_damage_to_garrison = 0.25
		required_garrison_factor = 0.5
		resistance_decay = 0.1
		local_resources = -0.4
		local_factories = -0.4
		#no_compliance_gain = 0
		compliance_gain = 0.06
	}
	ai_will_do = {
		base = 50
		modifier = {
			OR = {
				AND = {
					check_variable = { resistance_target_without_law < 0.80 }
					check_variable = {
						var = compliance
						value = 90
						compare = greater_than
					}
				}
				check_variable = { garrison_min_support_ratio < 0.7 }    # don't try to fight resistance, if you can't garrison anything
			}
			factor = 0
		}
	}
}

secret_police_oversight = {
	icon = 4
	sound_effect = "Martial_Law_Interface_Secret_Police_Oversight"

	state_modifier = {
		resistance_target = -0.55
		resistance_damage_to_garrison = 0.5
		required_garrison_factor = 1
		#resistance_growth = 0.5
		local_resources = -0.6
		local_factories = -0.6
		#no_compliance_gain = 0
		compliance_gain = 0.08
	}
	ai_will_do = {
		base = 75
		modifier = {
			OR = {
				AND = {
					check_variable = { resistance_target_without_law < 0.85 }
					check_variable = {
						var = compliance
						value = 90
						compare = greater_than
					}
				}
				check_variable = { garrison_min_support_ratio < 0.7 }    # don't try to fight resistance, if you can't garrison anything
			}
			factor = 0
		}
	}
}

military_governor_occupation = {
	icon = 6
	sound_effect = "Martial_Law_Interface_Military_Governor_Occupation"

	state_modifier = {
		resistance_target = -0.65
		resistance_damage_to_garrison = 0.75
		required_garrison_factor = 1.5
		resistance_growth = 0.1
		local_resources = -0.8
		local_factories = -0.8
		#no_compliance_gain = 0
		compliance_gain = 0.1
	}

	ai_will_do = {
		base = 100
		modifier = {
			OR = {
				AND = {
					check_variable = { resistance_target_without_law < 0.9 }
					check_variable = {
						var = compliance
						value = 90
						compare = greater_than
					}
				}
				check_variable = { garrison_min_support_ratio < 0.7 }    # don't try to fight resistance, if you can't garrison anything
			}
			factor = 0
		}
	}
}

martial_law_occupation = {
	icon = 6
	sound_effect = "Martial_Law_Interface_Military_Governor_Occupation"

	state_modifier = {
		resistance_target = -1
		resistance_damage_to_garrison = -0.5
		required_garrison_factor = 2
		resistance_decay = 3
		resistance_growth = -0.8
		recruitable_population_factor = -1
		local_supplies_for_controller = -0.15
		local_resources = -1
		local_factories = -1
		no_compliance_gain = 1
	}

	ai_will_do = {
		base = 0
	}
}