﻿INJECT:law_no_schools = {
	progressiveness = -25
}

REPLACE:law_religious_schools = {
	group = lawgroup_education_system

	icon = "gfx/interface/icons/law_icons/religious_schools.dds"

	progressiveness = 0

	unlocking_technologies = {
		rationalism
	}

	disallowing_laws = {
		law_total_separation
		law_state_atheism
		#law_serfdom
	}

	modifier = {
		country_institution_cost_institution_schools_mult = -0.2
	}

	institution = institution_schools
	institution_modifier = {
		#state_education_access_wealth_add = 0 # + base 0.02  = 0 + 0.02 = 0.02 => 75% education (missing) at ~37.5 SoL. Should be bad by design
		state_conversion_mult = 0.075
		state_education_access_add = 0.05 #was 0.1
		interest_group_ig_devout_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_or_variant = law_type:law_no_schools
			}
			add = 500

			if = {
				limit = {
					OR = {
						has_journal_entry = je_sick_man_education
						has_journal_entry = je_terakoya
						has_journal_entry = je_portugal_regeneration_institutions
					}
				}
				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_or_variant = 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
		}
	}
}

INJECT:law_private_schools = {
	modifier = {
        country_institution_schools_max_investment_add = 1
        #country_institution_cost_institution_schools_mult = 0.15
	}

	institution_modifier = {
        state_education_access_add = 0.02 #was none
		state_education_access_wealth_add = -0.002 # + base 0.02 = 0.02+0.015 = 0.035 => 100% education at ~29% SoL #Only freaking rich people gets education
	}
}

INJECT:law_public_schools = {
     modifier = {
        country_institution_schools_max_investment_add = 1
		#country_institution_cost_institution_schools_mult = 0.5
    }

	institution_modifier = {
		state_assimilation_mult = -0.025
		state_education_access_wealth_add = 0.001 # + base 0.02  = 0.02 + 0.005 = 0.025 => 50% education (missing) at 20 SoL. Best by design
		state_education_access_add = -0.045
	}
}
