ideas = {
	
	cop_penal_system = {
		law = yes

		penal_slavery = {
			available = {
				NOT = { has_idea = penal_recruitment }
			}

			modifier = {
				industry_free_repair_factor = 1
				industry_repair_factor = 0.5
				production_speed_buildings_factor = 0.15
				local_resources_factor = 0.15
				stability_factor = -0.1
				opinion_gain_monthly_factor = -0.5
				trade_opinion_factor = -0.25
			}

			ai_will_do = {
				factor = 1
			}

			cancel_if_invalid = yes
		}

		penal_capital_punishment = {
			available = {
				NOT = { has_idea = penal_recruitment }
			}

			modifier = {
				industry_free_repair_factor = 0.5
				industry_repair_factor = 0.25
				production_speed_buildings_factor = 0.075
				local_resources_factor = 0.075
				stability_factor = -0.05
				opinion_gain_monthly_factor = -0.25
				trade_opinion_factor = -0.125
			}

			ai_will_do = {
				factor = 1
			}

			cancel_if_invalid = yes
		}

		penal_labour = {
			available = {
				NOT = { has_idea = penal_recruitment }
			}

			modifier = {
				industry_free_repair_factor = 0.25
				industry_repair_factor = 0.125
				local_resources_factor = 0.05
				production_speed_buildings_factor = 0.05
			}

			ai_will_do = {
				factor = 40
			}

			cancel_if_invalid = yes
		}

		penal_incarceration = {
			available = {
				NOT = { has_idea = penal_recruitment }
			}

			modifier = {
				political_power_gain = 0.05
				stability_factor = 0.05
			}

			ai_will_do = {
				factor = 40
				modifier = {
					has_government = neutrality
					factor = 40
				}
			}

			cancel_if_invalid = yes
		}

		penal_rehabilitation = {
			available = {
				NOT = { has_idea = penal_recruitment }
			}

			modifier = {
				political_power_factor = -0.05
				conscription_factor = 0.15
				stability_factor = 0.1
			}

			ai_will_do = {
				modifier = {
					has_government = democratic
					factor = 40
				}
			}

			cancel_if_invalid = yes
		}

		penal_recruitment = {
			removal_cost = -1

			available = {
				has_war = yes
				OR = {
					NOT = { has_government = democratic }
					surrender_progress < 0.35
				}
			}

			modifier = {
				army_org_factor = -0.05
				army_attack_factor = 0.075
				army_defence_factor = 0.075
				stability_factor = -0.1
				breakthrough_factor = 0.05
			}

			ai_will_do = {
				factor = 0
				modifier = {
					tag = SOV
					factor = 40
				}
			}

			on_add = {
				set_technology = {
					penal_infantry = 1
					popup = yes
				}
			}
		}
	}
}

