﻿INJECT:law_religious_schools = {
	ai_enact_weight_modifier = { #Petitions
		value = 0

		if = {
			limit = {
				NOT = { has_institution = institution_schools }
				kai_can_afford_institution = no
			}
			add = -1000
		}

		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_portugal_regeneration_institutions
					}
				}
				add = 500
			}
		}

		# For Japanese religion Journal Entries
		if = {
			limit = {
				OR = {
					has_journal_entry = je_elevate_buddhism
					AND = {
						# If Shinbutsu Bunri is active and the Taikyo Proclamation has been made
						has_journal_entry = je_shinbutsu_bunri
						country_has_state_religion = rel:shinto
					}
				}
			}
			add = 1000
		}
	}
}

INJECT:law_private_schools = {
	ai_enact_weight_modifier = { #Petitions
		value = 0

		if = {
			limit = {
				NOT = { has_institution = institution_schools }
				kai_can_afford_institution = no
			}
			add = -1000
		}

		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_portugal_regeneration_institutions
					}
				}
				add = 500
			}
		}
	}
}

INJECT:law_public_schools = {
	ai_enact_weight_modifier = { #Petitions
		value = 0

		if = {
			limit = {
				NOT = { has_institution = institution_schools }
				kai_can_afford_institution = no
			}
			add = -1000
		}

		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_portugal_regeneration_institutions
					}
				}
				add = 500
			}
		}
	}
}
