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

		if = {
			limit = { ai_has_enact_weight_modifier_journal_entries = yes }
			add = 750
		}

		# Once the AI gets to a certain society tech level they should try to ditch Traditionalism for either Agrarianism or Interventionism
		if = {
			limit = {
				OR = {
					has_technology_researched = civilizing_mission
					has_technology_researched = human_rights
					has_technology_researched = pan-nationalism
				}
				has_law_or_variant = law_type:law_traditionalism
			}

			add = 1000
		}

		if = {
			limit = {
				has_journal_entry = je_sick_man_bureaucracy
				has_law_or_variant = law_type:law_traditionalism
			}
			add = 10000 # Top priority for Tanzimat AI is to get out of Traditionalism
		}

		if = {
			limit = {
				has_journal_entry = je_great_reforms_serfdom
				# KAI: Vanilla forgot to check for Traditionalism
				has_law_or_variant = law_type:law_traditionalism
			}
			add = 1000 # Less preferred than either laissez-faire or interventionism
		}

		# AI should really try to get out of Traditionalism under the right circumstances
		if = {
			limit = {
				has_law_or_variant = law_type:law_traditionalism
				NOT = { has_strategy = ai_strategy_reactionary_agenda }
				OR = {
					NOT = { has_strategy = ai_strategy_conservative_agenda }
					any_political_movement = {
						law_enactment_stance = {
							law = law_type:law_agrarianism
							value > neutral
						}
						political_movement_support >= 0.10
					}
				}
			}
			add = 1000
		}
	}
}
