##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_occupation_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
#		}
#	}
#}
missing_garrison_scaled_effect = {
	icon = 1
	missing_garrison_law = yes # missing garrison will now be scaling to law set as missing_garrison_law if it is set, otherwise it will use default_law as it used to
	sound_effect = "Martial_Law_Interface_No_Garrison"
	visible = {
		always = no
	}

	state_modifier = {
		resistance_target = 0.1
		compliance_gain = -0.045
	}

	ai_will_do = {
		base = 0
	}
}

no_garrison = {
	icon = 1
	sound_effect = "Martial_Law_Interface_No_Garrison"

	state_modifier = {
		resistance_target = 0.4
		no_compliance_gain = 1
		required_garrison_factor = -1
	}

	suppressed_state_modifier = {
		#no_compliance_gain = 1
		required_garrison_factor = -1
		resistance_target = 0.4
	}

	visible = {
		if = {
			limit = {
				original_tag = RAJ
				has_dlc = "Graveyard of Empires"
			}

			NOT = {
				RAJ = { has_country_flag = RAJ_hide_no_garrison } 
			}

		}
	}

	ai_will_do = {
		base = 0
	}
}

# EAI: 
autonomous_occupation = {
	icon = 2
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	visible = {
		has_government = democratic #? on design
	}

	state_modifier = {
		resistance_target 				= +0.10
		compliance_gain 				= 0.02
		required_garrison_factor 		= -0.40
		resistance_damage_to_garrison 	= -0.25
	}
	
	ai_will_do = { #EAI
		base = 0

		modifier = {
			add = 20000

			set_temp_variable = { t1 = resistance_target_without_law }
			add_to_temp_variable = { t1 = 0.1 } # autonomous_occupation
			check_variable = { resistance_target_without_law < 0.50 }
		}
	}
}

# EAI: 
foreign_civilian_oversight = {
	icon = 3
	sound_effect = "Martial_Law_Interface_Foreign_Cvilian_Oversight"

	state_modifier = {
		#resistance_target 				= 0.0
		required_garrison_factor 		= -0.25
		resistance_damage_to_garrison 	= -0.25
		compliance_gain 				= 0.000
		local_factories 				= 0.00
		local_resources 				= 0.00
	}

	ai_will_do = { #EAI
		base = 0

		modifier = {
			add = 10000

			OR = {
				is_owned_by = FROM

				AND = {
					NOT = { check_variable = { compliance > 25 } }
					check_variable = { resistance_target_without_law < 0.25 }
				}

				AND = {
					check_variable = { compliance > 25 }
					check_variable = { resistance_target_without_law < 0.50 }
				}
			}
		}

		modifier = {
			factor = 0

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.0 } # foreign_civilian_oversight
			NOT = { check_variable = { t1 < 0.50 } }
		}
	}
}

# EAI: 
local_police_force_garrison = {
	icon = 11
	sound_effect = "Martial_Law_Interface_Local_Police_Force_Garrison"
	
	state_modifier = {
		resistance_target 				= -0.15
		compliance_gain 				= -0.025
		required_garrison_factor 		= -0.35
		resistance_damage_to_garrison	= -0.5
		local_factories 				= 0.00
		local_resources 				= 0.00
	}
	
	
	ai_will_do = { #EAI
		base = 0

		modifier = {
			add = 10000

			check_variable = { compliance > 25 }

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.0 } # foreign_civilian_oversight
			NOT = { check_variable = { t1 < 0.50 } }
		}

		modifier = { 
			add = 1000

			NOT = { check_variable = { compliance > 25 } }

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.0 } # foreign_civilian_oversight
			NOT = { check_variable = { t1 < 0.25 } }
		}

		modifier = {
			factor = 0

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.15 } # local_police_force_garrison
			NOT = { check_variable = { t1 < 0.50 } }
		}
	}
}

# EAI: 
secret_police_oversight = {
	icon = 4
	sound_effect = "Martial_Law_Interface_Secret_Police_Oversight"

	state_modifier = {
		resistance_target 				= -0.30
		compliance_gain 				= -0.04
		required_garrison_factor 		= -0.15
		resistance_damage_to_garrison 	= -0.15
		local_factories 				= 0.05
		local_resources 				= 0.05
		enemy_operative_detection_chance_over_occupied_tag = 1 # offset detection chance by +1%
		enemy_intel_network_gain_factor_over_occupied_tag = -0.25 # -25% scaled by the number of occupied states and the ratio of the network covering those occupied states
		# todo + spy defense
	}
	ai_will_do = { #EAI
		base = 0

		modifier = {
			add = 2000

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.15 } # local_police_force_garrison
			NOT = { check_variable = { t1 < 0.50 } }
		}
	}
}

# EAI: unused
liberate_workers_occupation = {
	icon = 5
	sound_effect = "Martial_Law_Interface_Liberate_Workers_Occupation_Unique_COM"

	visible = {
		has_government = communism
	}

	state_modifier = {
		resistance_target 				= -0.15
		compliance_gain 				= -0.025
		required_garrison_factor 		= -0.15
		resistance_damage_to_garrison 	= 0.25
		local_factories 				= 0.2
		local_resources 				= 0.3
	}
	
	ai_will_do = { #EAI
		base = 0
	}
}

# EAI: unused
military_governor_occupation = {
	icon = 6
	sound_effect = "Martial_Law_Interface_Military_Governor_Occupation"
	default_law = yes
	starting_law = yes
	
	state_modifier = {
		resistance_target 			= -0.35
		compliance_gain 			= -0.045
		required_garrison_factor 	= 0.0
		#local_factories 			= 0.00
		local_resources 			= 0.10
		local_manpower 				= 0.08
	}
	ai_will_do = { #EAI
		base = 0
	}
}

# EAI: 
martial_law_occupation = {
	icon = 7
	sound_effect = "Martial_Law_Interface_Martial_Law_Occupation_Default"

	state_modifier = {
		resistance_target 				= -0.60
		compliance_gain 				= -0.055
		#required_garrison_factor 		= 0.0
		#resistance_damage_to_garrison 	= 0.0
		#local_factories 				= 0.0
		local_resources 				= 0.1
	}
	
	ai_will_do = { #EAI
		base = 0

		modifier = {
			add = 3000

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.30 } # secret_police_oversight
			NOT = { check_variable = { t1 < 0.50 } }
		}
	}
}

# EAI: get resources
forced_labor_occupation = {
	icon = 8
	sound_effect = "Martial_Law_Interface_Forced_Labor_Occupation"

	state_modifier = {
		resistance_target 					= -0.40
		compliance_gain 					= -0.08
		resistance_damage_to_garrison 		= 0.3
		required_garrison_factor 			= 0.15
		local_resources 					= 0.40
		local_factories 					= 0.05
		repair_speed_infrastructure_factor 	= 0.25

		custom_modifier_tooltip = "resource_sabotage_decrease_tooltip"
	}
	
	ai_will_do = { #EAI
		base = 0

		modifier = {

			NOT = { check_variable = { compliance > 25 } }

			###

			set_temp_variable = { add_score = 0 }
		
			OR = {
				AND = {
					check_variable = { EAI_total_resources > 75 }
					
					set_temp_variable = { add_score = 4000 }
				}

				AND = {
					check_variable = { resource@oil > 5 }

					FROM = {
						if = { limit = { fuel_ratio < 0.25 }
							set_temp_variable = { add_score = 4000 }
						}
						else_if = { limit = { fuel_ratio < 0.5 }
							set_temp_variable = { add_score = 4000 }
						}
					}
				}
				AND = {
					check_variable = { resource@aluminium > 10 }
					
					FROM = {
						if = { limit = { check_variable = { EAI_aluminium_resource_shortage = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
						else_if = { limit = { check_variable = { EAI_needs_aluminium = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
					}
				}
				AND = {
					check_variable = { resource@rubber > 10 }

					FROM = {
						if = { limit = { check_variable = { EAI_rubber_resource_shortage = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
						else_if = { limit = { check_variable = { EAI_needs_rubber = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
					}
				}
				AND = {
					check_variable = { resource@tungsten > 10 }
					
					FROM = {
						if = { limit = { check_variable = { EAI_tungsten_resource_shortage = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
						else_if = { limit = { check_variable = { EAI_needs_tungsten = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
					}
				}
				AND = {
					check_variable = { resource@steel > 10 }
					
					FROM = {
						if = { limit = { check_variable = { EAI_steel_resource_shortage = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
						else_if = { limit = { check_variable = { EAI_needs_steel = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
					}
				}
				AND = {
					check_variable = { resource@chromium > 10 }
					
					FROM = {
						if = { limit = { check_variable = { EAI_chromium_resource_shortage = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
						else_if = { limit = { check_variable = { EAI_needs_chromium = 3 } }
							set_temp_variable = { add_score = 4000 }
						}
					}
				}
			}

			add = add_score
		}

		modifier = {
			factor = 0

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.40 } # forced_labor_occupation
			NOT = { check_variable = { t1 < 0.50 } }
		}
	}
}

# EAI: get factories
harsh_quotas_occupation = {
	icon = 9
	sound_effect = "Martial_Law_Interface_Harsh_Quotas_Occupation"

	state_modifier = {
		resistance_target 				= -0.40
		compliance_gain 				= -0.08
		required_garrison_factor 		= 0.15
		resistance_damage_to_garrison 	= 0.50

		local_factories 				= 0.25
		local_resources 				= 0.05

		repair_speed_arms_factory_factor = 0.25
		repair_speed_industrial_complex_factor = 0.25

		custom_modifier_tooltip = "factory_sabotage_decrease_tooltip"
	}
	
	ai_will_do = { #EAI
		base = 0

		modifier = {

			NOT = { check_variable = { compliance > 25 } }

			###

			set_temp_variable = { t1 = building_level@arms_factory }
			add_to_temp_variable = { t1 = building_level@industrial_complex }
			add_to_temp_variable = { t1 = building_level@dockyard }

			multiply_temp_variable = { t1 = 250 }
			add = t1
		}

		modifier = {
			factor = 0

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.40 } # harsh_quotas_occupation
			NOT = { check_variable = { t1 < 0.50 } }
		}
	}
}

# EAI: 
brutally_oppressive_occupation = {
	icon = 10
	sound_effect = "Martial_Law_Interface_Brutally_Oppressive_Occupation_Unique_FAS"

	visible = {
		has_government = fascism
	}

	state_modifier = {
		resistance_target 				= -0.75
		compliance_gain 				= -0.11
		required_garrison_factor 		= 0.25
		resistance_damage_to_garrison 	= 1.0
		local_resources 				= 0.10
		resistance_decay 				= 1.0
	}
	
	ai_will_do = { #EAI
		base = 0

		modifier = {
			add = 50000

			set_temp_variable = { t1 = resistance_target_without_law }
			subtract_from_temp_variable = { t1 = 0.60 } # martial_law_occupation
			NOT = { check_variable = { t1 < 0.75 } }
		}
	}
}

# EAI: Unused
reconciliation = {
	icon = 12
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	visible = {
		original_tag = TUR
		has_dlc = "Battle for the Bosporus"
		OR = {
			has_completed_focus = TUR_a_common_destiny_for_all_of_turkey
			has_completed_focus = TUR_permit_regional_elections
		}
		FROM = { original_tag = KUR }
	}

	state_modifier = {
		compliance_gain 				= 0.03
		required_garrison_factor 		= -0.5
		resistance_damage_to_garrison 	= -0.3
		resistance_decay 				= 0.5
	}
	
	ai_will_do = { #EAI
		base = 0
	}
}

# EAI: ITA uses when compliance < 60
colonial_police = {
	icon = 13
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = colonial_police_improved

	visible = {
		OR = {
			AND = {
				original_tag = ITA
				#NOT = { has_completed_focus = ITA_regional_development }
				NOT = { has_country_flag = ITA_colonial_police_improved_flag }
				OR = {
					AND = {
						has_completed_focus = ITA_albanian_fascist_militia
						FROM = { original_tag = ALB }
					}
					AND = {
						has_completed_focus = ITA_ministry_of_italian_africa
						FROM = { capital_scope = { is_on_continent = africa } }
					}
				}
			}
			AND = {
				original_tag = BEL
				has_completed_focus = CONGO_force_publique
				FROM = { capital_scope = { is_on_continent = africa } }
			}
		}
		
	}

	state_modifier = { #CHANGES HERE NEED TO BE APPLIED ALSO IN ITA_fake_colonial_police_law idea
		resistance_target 				= -0.3
		compliance_gain 				= -0.02
		required_garrison_factor 		= -0.30
		resistance_damage_to_garrison	= -0.4
	}


	ai_will_do = {
		base = 0

		modifier = { #EAI
			add = 20000

			NOT = { check_variable = { compliance > 60 } }
		}



		# modifier = {
		# 	check_variable  = { resistance_target_without_law > 0.3}
		# 	add = 200
		# }


		# modifier = {
		# 	check_variable  = { resistance_target_without_law > 0.44}

		# 	set_temp_variable = { requirement_limit = 0.35 }
		# 	if = {
		# 		limit = { occupation_law = local_police_force_garrison }
		# 		set_temp_variable = { requirement_limit = 0.55 }
		# 	}
		# 	check_variable = { garrison_min_support_ratio < requirement_limit }

		# 	add = 350
		# }
	}
}

# EAI: ITA uses when compliance < 60
colonial_police_improved = {
	icon = 13
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = colonial_police_final

	visible = {
		original_tag = ITA
		has_completed_focus = ITA_regional_development
		NOT = { has_country_flag = ITA_colonial_police_final_flag }
		OR = {
			AND = {
				FROM = { original_tag = ALB }
				has_completed_focus = ITA_albanian_fascist_militia
			}
			FROM = { capital_scope = { is_on_continent = africa } }
		}
	}

	state_modifier = {
		resistance_target 				= -0.35
		compliance_gain 				= -0.015
		required_garrison_factor 		= -0.35
		resistance_damage_to_garrison	= -0.45
		local_factories 				= 0.25
		local_resources 				= 0.25
	}


	ai_will_do = {
		base = 0

		modifier = { #EAI
			add = 20000

			NOT = { check_variable = { compliance > 60 } }
		}

		# modifier = {
		# 	check_variable  = { resistance_target_without_law > 0.3}
		# 	add = 200
		# }


		# modifier = {
		# 	check_variable  = { resistance_target_without_law > 0.44}

		# 	set_temp_variable = { requirement_limit = 0.35 }
		# 	if = {
		# 		limit = { occupation_law = local_police_force_garrison }
		# 		set_temp_variable = { requirement_limit = 0.55 }
		# 	}
		# 	check_variable = { garrison_min_support_ratio < requirement_limit }

		# 	add = 350
		# }
	}
}

# EAI: ITA uses when compliance < 60
colonial_police_final = {
	icon = 13
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = foreign_civilian_oversight

	visible = {
		original_tag = ITA
		has_completed_focus = ITA_polizia_dell_africa_italiana
		OR = {
			AND = {
				FROM = { original_tag = ALB }
				has_completed_focus = ITA_albanian_fascist_militia
			}
			FROM = { capital_scope = { is_on_continent = africa } }
		}
	}

	state_modifier = {
		resistance_target 				= -0.45
		compliance_gain 				= -0.01
		required_garrison_factor 		= -0.4
		resistance_damage_to_garrison	= -0.55
		local_factories 				= 0.25
		local_resources 				= 0.25
		local_manpower 					= 0.05
	}


	ai_will_do = {
		base = 0

		modifier = { #EAI
			add = 20000

			NOT = { check_variable = { compliance > 60 } }
		}

		# modifier = {
		# 	check_variable  = { resistance_target_without_law > 0.3}
		# 	add = 200
		# }


		# modifier = {
		# 	check_variable  = { resistance_target_without_law > 0.44}

		# 	set_temp_variable = { requirement_limit = 0.35 }
		# 	if = {
		# 		limit = { occupation_law = local_police_force_garrison }
		# 		set_temp_variable = { requirement_limit = 0.55 }
		# 	}
		# 	check_variable = { garrison_min_support_ratio < requirement_limit }

		# 	add = 350
		# }
	}
}

secretaries_general = {
	icon = 13
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = military_governor_occupation

	visible = {
		has_dlc = "Gotterdammerung"
		BEL = {
			has_completed_focus = BEL_secretaries_general
		}
		FROM = { original_tag = BEL }
		NOT = {
			has_global_flag = BEL_no_secretaries_general
		}
	}

	state_modifier = { #CHANGES HERE NEED TO BE APPLIED ALSO IN ITA_fake_colonial_police_law idea TODO_GARETH: anything to do here? 
		resistance_target 				= -0.3
		compliance_gain 				= -0.02
		required_garrison_factor 		= -0.30
		resistance_damage_to_garrison	= -0.4
	}

	ai_will_do = {
		base = 250
		modifier = {
			check_variable  = { resistance_target_without_law > 0.3}
			add = 200
		}

		modifier = {
			check_variable  = { resistance_target_without_law > 0.44}
			set_temp_variable = { requirement_limit = 0.35 }
			if = {
				limit = { occupation_law = local_police_force_garrison }
				set_temp_variable = { requirement_limit = 0.55 }
			}
			check_variable = { garrison_min_support_ratio < requirement_limit }
			add = 350
		}
	}
}

independent_rule = {
	icon = 15
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = foreign_civilian_oversight

	visible = {
		original_tag = RAJ
		has_completed_focus = RAJ_princely_states_policy
		FROM = {
			OR = {
				original_tag = MYS
				original_tag = HYD
				original_tag = MYS
				original_tag = RJP
				original_tag = CIP
				original_tag = WIS
				original_tag = SIN
				original_tag = KAS
				original_tag = KOL
				original_tag = KAS
				original_tag = WIS
				original_tag = NWF
				original_tag = MPU
				original_tag = KHL
				original_tag = FSS
				original_tag = SKK
				original_tag = RAS
				original_tag = KLT
			}
		}
	}

	state_modifier = {
		resistance_target 				= -0.1
		compliance_gain 				=  0.03
		required_garrison_factor 		= -0.5
		resistance_damage_to_garrison	= -0.5
		local_resources 				= -0.35
		local_factories 				= -0.35
	}


	ai_will_do = {

		base = 450
		modifier = {
			check_variable  = { resistance_target_without_law > 0.2 }
			add = 200
		}


		modifier = {
			check_variable  = { resistance_target_without_law > 0.34}
			add = 300
		}
	}
}

# The idea for this law is that we exploit the people to get us extra resources fast, but builds up resistance much quicker
princely_subjugation = {
	icon = 14
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = military_governor_occupation

	visible = {
		original_tag = RAJ
		has_completed_focus = RAJ_princely_states_policy
		FROM = {
			OR = {
				original_tag = MYS
				original_tag = HYD
				original_tag = MYS
				original_tag = RJP
				original_tag = CIP
				original_tag = WIS
				original_tag = SIN
				original_tag = KAS
				original_tag = KOL
				original_tag = KAS
				original_tag = WIS
				original_tag = NWF
				original_tag = MPU
				original_tag = KHL
				original_tag = FSS
				original_tag = SKK
				original_tag = RAS
				original_tag = KLT
			}
		}
	}

	state_modifier = {
		resistance_target 				= 0.60
		compliance_gain 				= -0.10
		required_garrison_factor 		= 0.15
		resistance_damage_to_garrison 	= -0.10
		local_factories 				= 0.60
		local_resources 				= 0.60

	}


	ai_will_do = {
		base = 250
		modifier = {
			check_variable  = { resistance_target_without_law > 0.3}
			add = 200
		}


		modifier = {
			check_variable  = { resistance_target_without_law > 0.44}

			set_temp_variable = { requirement_limit = 0.35 }
			if = {
				limit = { occupation_law = local_police_force_garrison }
				set_temp_variable = { requirement_limit = 0.55 }
			}
			check_variable = { garrison_min_support_ratio < requirement_limit }

			add = 350
		}
	}
}

senbu_occupation_law = {
	icon = 16
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = foreign_civilian_oversight

	visible = {
		
		AND = {

			OR = {
				AND = {
					original_tag = JAP
					has_completed_focus = JAP_invest_in_senbu
				}
				AND = {
					has_dlc = "No Compromise, No Surrender"
					is_literally_china = yes 
					has_completed_focus = CHI_tsr_the_reorganied_government
				}
			}
			
			FROM = { 
				OR = {
					is_literally_china = yes
					tag = MEN
					tag = MAN
					tag = KOR
					tag = MON
					tag = TIB
				}
			}

		}
		
	}

	state_modifier = { #CHANGES HERE NEED TO BE APPLIED ALSO IN senbu_occupation_law_fake_idea idea
		resistance_target 				= -0.2
		compliance_gain 				= 0.01
		required_garrison_factor 		= 0.05
		resistance_damage_to_garrison	= -0.35
		local_factories 				= -0.1
		local_resources 				= -0.1
	}

	ai_will_do = {
		base = 250
		modifier = {
			check_variable  = { resistance_target_without_law > 0.3}
			add = 200
		}

		modifier = {
			check_variable  = { resistance_target_without_law > 0.44}

			set_temp_variable = { requirement_limit = 0.35 }
			if = {
				limit = { occupation_law = local_police_force_garrison }
				set_temp_variable = { requirement_limit = 0.55 }
			}
			check_variable = { garrison_min_support_ratio < requirement_limit }

			add = 350
		}
	}
}

GEACPS_exploitation_occupation_law = {
	icon = 17
	sound_effect = "Martial_Law_Interface_Harsh_Quotas_Occupation"

	fallback_law = harsh_quotas_occupation

	visible = {
		
		AND = {
			original_tag = JAP
			has_country_flag = JAP_chose_to_exploit_east_asia_flag
			FROM = { capital_scope = { is_on_continent = asia } }
		}
		
	}

	state_modifier = {
		resistance_target 				= -0.40
		compliance_gain 				= -0.08
		required_garrison_factor 		= 0.3
		resistance_damage_to_garrison 	= 0.6

		local_factories 				= 0.2
		local_resources 				= 0.6

		repair_speed_arms_factory_factor = 0.25
		repair_speed_industrial_complex_factor = 0.25

		custom_modifier_tooltip = "factory_sabotage_decrease_tooltip"
	}

	ai_will_do = {
		# enabled if has damaged factories
		# gets higher score if more are damaged
		base = 0

		modifier = {
			set_temp_variable = { num_damaged = damaged_building_level@arms_factory }
			add_to_temp_variable = { num_damaged = damaged_building_level@industrial_complex }

			check_variable = { num_damaged > 0 }
			clamp_temp_variable = { var = num_damaged max = 4 }
			multiply_temp_variable = { num_damaged = 50 }
			add_to_temp_variable = { num_damaged = 150 }

			add = num_damaged
		}
	}
}

GEACPS_prosperity_occupation_law = {
	icon = 17
	sound_effect = "Martial_Law_Interface_Autonomous_Occupation_Unique_DEM"

	fallback_law = foreign_civilian_oversight

	visible = {
		
		AND = {
			original_tag = JAP
			has_country_flag = JAP_chose_to_support_east_asia_flag
			FROM = { capital_scope = { is_on_continent = asia } }
		}
		
	}

	state_modifier = { #CHANGES HERE NEED TO BE APPLIED ALSO IN senbu_occupation_law_fake_idea idea
		resistance_target 				= -0.15
		compliance_gain 				= 0
		required_garrison_factor 		= 0.05
		resistance_damage_to_garrison	= -0.25
		local_factories 				= 0.1
		local_resources 				= 0.05
	}

	ai_will_do = {
		base = 250
		modifier = {
			check_variable  = { resistance_target_without_law > 0.3}
			add = 200
		}

		modifier = {
			check_variable  = { resistance_target_without_law > 0.44}

			set_temp_variable = { requirement_limit = 0.35 }
			if = {
				limit = { occupation_law = local_police_force_garrison }
				set_temp_variable = { requirement_limit = 0.55 }
			}
			check_variable = { garrison_min_support_ratio < requirement_limit }

			add = 350
		}
	}
}




