﻿REPLACE:ai_strategy_agricultural_expansion = {
	icon = "gfx/interface/icons/ai_strategy_icons/agricultural_expansion.dds"

	type = administrative

	building_group_weights = {
		# KAI: Halve the building weights to make it less extreme.
		bg_agriculture = 1.5
		bg_ranching = 1.5
		# KAI: Added whaling and logging.
		# The idea of this strategy is to favor buildings that cost less infrastructure
		# before railways are researched.
		bg_whaling = 1.25
		bg_fishing = 1.25
		bg_plantations = 1.25
		bg_logging = 1.25
	}

	goods_stances = {
		grain = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = grain } } }
		meat = {
			stance = wants_export
			trigger = {
				NOR = {
					country_has_state_religion = rel:hindu
				}
				kai_has_high_supply = { GOODS = meat }
			}
		}
		fish = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fish } } }
		fruit = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fruit } } }
		wine = {
			stance = wants_export
			trigger = {
				NOR = {
					country_has_state_religion = rel:sunni
					country_has_state_religion = rel:shiite
					country_has_state_religion = rel:ibadi
				}
				kai_has_high_supply = { GOODS = wine }
			}
		}
		fabric = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fabric } } }
	}

	possible = {
		always = yes
	}

	weight = {
		value = 10
	}
}

REPLACE:ai_strategy_plantation_economy = {
	icon = "gfx/interface/icons/ai_strategy_icons/agricultural_expansion.dds"

	type = administrative

	goods_stances = {
		fruit = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fruit } } }
		fabric = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fabric } } }
		sugar = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = sugar } } }
		coffee = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = coffee } } }
		tea = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = tea } } }
		opium = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = opium } } }
		tobacco = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = tobacco } } }
		dye = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = dye } } }
		silk = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = silk } } }
		rubber = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = rubber } } }
	}

	building_group_weights = {
		bg_plantations = 1.5
		# KAI: Add rubber
		bg_rubber = 1.5
	}

	possible = {
		OR = {
			is_in_geographic_region = geographic_region_dixie_old
			is_in_geographic_region = geographic_region_south_america
			is_in_geographic_region = geographic_region_central_america_old
			is_in_geographic_region = geographic_region_india
			is_in_geographic_region = geographic_region_south_east_asia
			is_in_geographic_region = geographic_region_africa
			is_in_geographic_region = geographic_region_east_asia
			is_in_geographic_region = geographic_region_middle_east
		}
		NOT = {
			has_law_or_variant = law_type:law_isolationism
		}
	}

	weight = {
		value = 15

		if = {
			limit = {
				has_journal_entry = je_agricultural_development
			}
			add = 45
		}
	}
}

REPLACE:ai_strategy_resource_expansion = {
	icon = "gfx/interface/icons/ai_strategy_icons/resource_expansion.dds"

	type = administrative

	building_group_weights = {
		bg_rubber = 1.5
		bg_oil_extraction = 1.5
		bg_mining = 1.5
		bg_logging = 1.5
	}

	goods_stances = {
		coal = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = coal } } }
		iron = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = iron } } }
		oil = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = oil } } }
		lead = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = lead } } }
		wood = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = wood } } }
		hardwood = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = hardwood } } }
		sulfur = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = sulfur } } }
		rubber = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = rubber } } }
	}


	possible = {
		always = yes
	}

	weight = {
		value = 20

		# Scaling with literacy 10-30%
		multiply = {
			value = literacy_rate
			add = -0.10
			divide = 0.20
			min = 0
			max = 1
		}
	}
}

REPLACE:ai_strategy_industrial_expansion = {
	icon = "gfx/interface/icons/ai_strategy_icons/industrial_expansion.dds"

	type = administrative

	goods_stances = {
		tools = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = tools } } }
		fertilizer = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fertilizer } } }
		explosives = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = explosives } } }
		steel = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = steel } } }
		engines = {
			stance = wants_export
			trigger = {
				has_technology_researched = atmospheric_engine
				kai_has_high_supply = { GOODS = engines }
			}
		}
		automobiles = {
			stance = wants_export
			trigger = {
				has_technology_researched = combustion_engine
				kai_has_high_supply = { GOODS = automobiles }
			}
		}
		telephones = {
			stance = wants_export
			trigger = {
				has_technology_researched = telephone
				kai_has_high_supply = { GOODS = telephones }
			}
		}
		radios = {
			stance = wants_export
			trigger = {
				has_technology_researched = radio
				kai_has_high_supply = { GOODS = radios }
			}
		}
	}

	building_group_weights = {
		bg_manufacturing = 1.25
		bg_rubber = 1.25
		bg_oil_extraction = 1.25
		bg_mining = 1.25
		bg_logging = 1.25
	}

	possible = {
		NOR = {
			has_law_or_variant = law_type:law_industry_banned
			has_law_or_variant = law_type:law_extraction_economy
		}
	}

	weight = {
		value = 30

		# Scaling with literacy 20-50%
		multiply = {
			value = literacy_rate
			add = -0.20
			divide = 0.30
			min = 0
			max = 1
		}

		if = {
			limit = {
				OR = {
					has_journal_entry = je_meiji_restoration
					has_journal_entry = je_meiji_main
				}
			}
			add = 1000
		}

		if = { # Grunderzeit
			limit = {
				has_journal_entry = je_grunderzeit
			}
			add = 100
		}

		# Metternich agenda of 1844 - inclined to industrialise
		if = {
			limit = {
				c:AUS ?= this
				has_journal_entry = je_metternich
			}
			add = 10
		}
	}
}

REPLACE:ai_strategy_placate_population = {
	icon = "gfx/interface/icons/ai_strategy_icons/placate_population.dds"

	type = administrative

	# KAI: Lowering taxes can be crippling when backwards countries can barely stay solvent to begin with
	#desired_tax_level = low
	#max_tax_level = medium
	#min_tax_level = very_low

	building_group_weights = {}

	goods_stances = {
		opium = {
			stance = does_not_want
			trigger = {
				has_journal_entry = je_opium_obsession
			}
		}
	}

	# KAI: This is originally meant to be a bad strategy
	# I might repurpose it for luddites / anarchist in the future
	possible = {
		always = no
	}

	weight = {
		value = 10
	}
}

REPLACE:ai_strategy_colonial_extraction = {
    icon = "gfx/interface/icons/ai_strategy_icons/resource_expansion.dds"

    type = administrative
    building_group_weights = {
        bg_rubber = 1.5
        bg_oil_extraction = 1.5
        bg_mining = 1.5
        bg_logging = 1.5
        bg_plantations = 1.5
    }

    goods_stances = {
        coal = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = coal } } }
        iron = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = iron } } }
        oil = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = oil } } }
        lead = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = lead } } }
        wood = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = wood } } }
        hardwood = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = hardwood } } }
        sulfur = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = sulfur } } }
        fruit = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fruit } } }
        fabric = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = fabric } } }
        sugar = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = sugar } } }
        coffee = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = coffee } } }
        tea = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = tea } } }
        opium = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = opium } } }
        tobacco = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = tobacco } } }
        dye = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = dye } } }
        silk = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = silk } } }
        rubber = { stance = wants_export trigger = { kai_has_high_supply = { GOODS = rubber } } }
    }
    possible = {
    	is_subject = yes
		country_is_colonial_or_company = yes
    }

    weight = {
        value = 100
    }
}
