﻿law_no_schools = {
	group = lawgroup_education_system
	
	icon = "gfx/interface/icons/law_icons/no_schools.dds"
	
	progressiveness = 0

	disallowing_laws = {
		law_compulsory_primary_school
	}

	modifier = {}

	can_enact = {
		custom_tooltip = {
			modifier:country_disallow_law_no_schools_bool = no
			text = disallow_law_no_schools_tt
		}
	}

	# AI will never abolish institutions entirely
	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_religious_schools = {
	group = lawgroup_education_system
	
	icon = "gfx/interface/icons/law_icons/religious_schools.dds"
	
	progressiveness = 25
	
	unlocking_technologies = {
		rationalism
	}

	disallowing_laws = {
		law_total_separation
		law_state_atheism
	}

	institution = institution_schools
	institution_modifier = {
		state_conversion_mult = 0.2
		state_education_access_add = 0.05
		country_clergymen_pol_str_mult = 0.05
	}

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

	ai_enact_weight_modifier = { #Petitions
		value = 0
		
		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}		
	
		if = {
			limit = {
				has_law = law_type:law_no_schools
			}
			add = 500

			if = {
				limit = { 
					OR = {
						has_journal_entry = je_sick_man_education
						has_journal_entry = je_terakoya
					}
				}
				add = 500
			}
		}				
	}

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

		if = {
			limit = {
				has_law = law_type:law_religious_schools
				scope:target_country = {
					has_law = law_type:law_no_schools
				}
				power_bloc ?= { has_principle_group = principle_group:principle_group_advanced_research }
			}
			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_private_schools = {
	group = lawgroup_education_system
	
	icon = "gfx/interface/icons/law_icons/private_schools.dds"
	
	progressiveness = 25
	
	unlocking_technologies = {
		academia
	}

	disallowing_laws = {
		law_serfdom
	}
	
	institution = institution_schools
	institution_modifier = {
		state_education_access_wealth_add = 0.005
		country_capitalists_pol_str_mult = 0.05
	}
	
	can_impose = {
		OR = {
			AND = {
				is_in_same_power_bloc = scope:target_country
				AND = {
					modifier:country_can_impose_same_lawgroup_education_system_in_power_bloc_bool = yes
					has_law = scope:law
				}
			}
			can_impose_law_default = yes
		}
	}

	ai_enact_weight_modifier = { #Petitions
		value = 0
		
		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}
		
		if = {
			limit = {
				has_law = law_type:law_no_schools
			}
			add = 500

			if = {
				limit = { 
					OR = {
						has_journal_entry = je_sick_man_education
						has_journal_entry = je_terakoya
					}
				}
				add = 500
			}
		}		
	}

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

		if = {
			limit = {
				has_law = law_type:law_private_schools
				scope:target_country = {
					has_law = law_type:law_no_schools
				}
				power_bloc ?= { has_principle_group = principle_group:principle_group_advanced_research }
			}
			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_public_schools = {
	group = lawgroup_education_system

	icon = "gfx/interface/icons/law_icons/public_schools.dds"
	
	progressiveness = 50
	
	unlocking_technologies = {
		empiricism
	}

	disallowing_laws = {
		law_serfdom
	}
	
	institution = institution_schools
	institution_modifier = {
		state_assimilation_mult = 0.2
		state_education_access_add = 0.05
	}
	
	can_impose = {
		OR = {
			AND = {
				is_in_same_power_bloc = scope:target_country
				AND = {
					modifier:country_can_impose_same_lawgroup_education_system_in_power_bloc_bool = yes
					has_law = scope:law
				}
			}
			can_impose_law_default = yes
		}
	}

	ai_enact_weight_modifier = { #Petitions
		value = 0
		
		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}
		
		if = {
			limit = {
				has_law = law_type:law_no_schools
			}
			add = 500

			if = {
				limit = { 
					OR = {
						has_journal_entry = je_sick_man_education
						has_journal_entry = je_terakoya
					}
				}
				add = 500
			}
		}			
	}

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

		if = {
			limit = {
				has_law = law_type:law_public_schools
				scope:target_country = {
					has_law = law_type:law_no_schools
				}
				power_bloc ?= { has_principle_group = principle_group:principle_group_advanced_research }
			}
			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
		}
	}
}