﻿INJECT:ai_strategy_conservative_agenda = {
	revolution_aversion = {
		value = 93.75
	}

	min_law_chance_to_pass = {
		value = 10
		if = {
			limit = { ai_has_reasons_to_not_oppose_law = yes }
			multiply = 0.5
		}
	}

	max_regressiveness = {
		value = 50
	}

	change_law_chance = {
		value = 10

		if = {
			limit = {
				has_enactment_je_or_law_commitment = yes
			}
			add = 25
		}
	}

	weight = {
		value = -10

		every_interest_group = {
			if = {
				limit = {
					this = {
						OR = {
							is_interest_group_type = ig_devout
							is_interest_group_type = ig_landowners
							leader = {
								OR = {
									has_conservative_ideology = yes
									has_reactionary_ideology = yes
									has_monarchist_ideology = yes
								}
							}
						}
					}
				}

				if = {
					limit = {
						this = { ig_counts_as_marginal = no }
					}
					add = {
						value = ig_clout
						multiply = 100
					}
				}

				if = {
					limit = {
						exists = ROOT.ruler
						this = { is_same_interest_group_type = ROOT.ruler.interest_group }
					}
					add = modifier:country_legitimacy_headofstate_add
				}
			}
		}

		if = { # Metternich System
			limit = {
				c:AUS ?= this
				has_journal_entry = je_metternich
			}
			add = 20
		}

		if = {
			limit = {
				exists = c:FRA
				c:FRA = this
				ruler = {
					has_variable = house_orleans
				}
			}
			add = 10
		}

		if = {
			limit = {
				is_princely_state = yes
			}
			add = 10
		}

		if = {
			limit = {
				has_radical_leftist_government = yes
			}
			multiply = 0.25
		}

	}
}

INJECT:ai_strategy_reactionary_agenda = {
	revolution_aversion = {
		value = 60
	}

	min_law_chance_to_pass = {
		value = 10
		if = {
			limit = { ai_has_reasons_to_not_oppose_law = yes }
			multiply = 0.5
		}
	}

	change_law_chance = {
		value = 5

		if = {
			limit = {
				has_enactment_je_or_law_commitment = yes
			}
			add = 10
		}
	}

	weight = {
		value = -10

		every_interest_group = {
			if = {
				limit = {
					this = {
						leader = {
							has_reactionary_ideology = yes
						}
					}
				}

				if = {
					limit = {
						this = { ig_counts_as_marginal = no }
					}
					add = {
						value = ig_clout
						multiply = 100
					}
				}

				if = {
					limit = {
						exists = ROOT.ruler
						this = { is_same_interest_group_type = ROOT.ruler.interest_group }
					}
					add = modifier:country_legitimacy_headofstate_add
				}
			}
		}

		if = {
			limit = {
				has_modifier = forced_regime_change
				OR = {
					ig:ig_devout ?= { is_in_government = yes }
					ig:ig_landowners ?= { is_in_government = yes }
				}
			}

			add = 1000
		}

		if = {
			limit = {
				has_radical_leftist_government = yes
			}
			multiply = 0.25
		}
	}
}

INJECT:ai_strategy_progressive_agenda = {
	revolution_aversion = {
		value = 75
	}

	min_law_chance_to_pass = {
		value = 10
		if = {
			limit = { ai_has_reasons_to_not_oppose_law = yes }
			multiply = 0.5
		}
	}

	max_regressiveness = {
		value = 50
	}

	change_law_chance = {
		value = 20

		if = {
			limit = {
				has_enactment_je_or_law_commitment = yes
			}
			add = 25
		}
	}

	weight = {
		value = -10

		every_interest_group = {
			if = {
				limit = {
					this = {
						OR = {
							is_interest_group_type = ig_intelligentsia
							is_interest_group_type = ig_industrialists
							leader = {
								OR = {
									has_liberal_ideology = yes
									has_progressive_ideology = yes
								}
							}
						}
					}
				}

				if = {
					limit = {
						this = { ig_counts_as_marginal = no }
					}
					add = {
						value = ig_clout
						multiply = 100
					}
				}

				if = {
					limit = {
						exists = ROOT.ruler
						this = { is_same_interest_group_type = ROOT.ruler.interest_group }
					}
					add = modifier:country_legitimacy_headofstate_add
				}
			}
		}

		if = {
			limit = {
				has_modifier = forced_regime_change
				OR = {
					ig:ig_industrialists ?= { is_in_government = yes }
					ig:ig_intelligentsia ?= { is_in_government = yes }
				}
			}

			add = 1000
		}

		if = {
			limit = {
				AND = {
					c:CHI ?= this
					has_variable = china_warlord_explosion
					var:china_warlord_explosion <= 3
				}
			}
			add = 50
		}
	}
}

INJECT:ai_strategy_egalitarian_agenda = {
	revolution_aversion = {
		value = 43.75
	}

	min_law_chance_to_pass = {
		value = 10
		if = {
			limit = { ai_has_reasons_to_not_oppose_law = yes }
			multiply = 0.5
		}
	}

	max_regressiveness = {
		value = 50
	}

	change_law_chance = {
		value = 20

		if = {
			limit = {
				has_enactment_je_or_law_commitment = yes
			}
			add = 25
		}
	}

	weight = {
		value = -10

		every_interest_group = {
			if = {
				limit = {
					this = {
						OR = {
							is_interest_group_type = ig_trade_unions
							leader = {
								has_socialist_ideology = yes
							}
						}
					}
				}

				if = {
					limit = {
						this = { ig_counts_as_marginal = no }
					}
					add = {
						value = ig_clout
						multiply = 100
					}
				}

				if = {
					limit = {
						exists = ROOT.ruler
						this = { is_same_interest_group_type = ROOT.ruler.interest_group }
					}
					add = modifier:country_legitimacy_headofstate_add
				}
			}
		}

		if = {
			limit = {
				has_modifier = forced_regime_change
				ig:ig_trade_unions ?= { is_in_government = yes }
			}

			add = 1000
		}

		if = {
			limit = {
				has_radical_leftist_government = yes
			}
			add = 250
		}
	}
}

INJECT:ai_strategy_nationalist_agenda = {
	revolution_aversion = {
		value = 67.5
	}

	min_law_chance_to_pass = {
		value = 10
		if = {
			limit = { ai_has_reasons_to_not_oppose_law = yes }
			multiply = 0.5
		}
	}

	max_progressiveness = {
		value = 100
	}

	max_regressiveness = {
		# Militarized Police and Ethnostate
		value = 100
	}

	change_law_chance = {
		value = 20

		if = {
			limit = {
				has_enactment_je_or_law_commitment = yes
			}
			add = 25
		}
	}

	weight = {
		value = -10

		every_interest_group = {
			if = {
				limit = {
					this = {
						OR = {
							is_interest_group_type = ig_armed_forces
							is_interest_group_type = ig_petty_bourgeoisie
							leader = {
								OR = {
									has_ideology = ideology:ideology_authoritarian
									has_ideology = ideology:ideology_jingoist_leader
									has_ideology = ideology:ideology_fascist
									has_ideology = ideology:ideology_ethno_nationalist
									has_ideology = ideology:ideology_integralist
									has_ideology = ideology:ideology_corporatist_leader
								}
							}
						}
					}
				}

				if = {
					limit = {
						this = { ig_counts_as_marginal = no }
					}
					add = {
						value = ig_clout
						multiply = 100
					}
				}

				if = {
					limit = {
						exists = ROOT.ruler
						this = { is_same_interest_group_type = ROOT.ruler.interest_group }
					}
					add = modifier:country_legitimacy_headofstate_add
				}
			}
		}

		if = {
			limit = {
				has_modifier = forced_regime_change
				OR = {
					ig:ig_petty_bourgeoisie ?= { is_in_government = yes }
					ig:ig_armed_forces ?= { is_in_government = yes }
				}
			}

			add = 1000
		}

		if = {
			limit = {
				AND = {
					c:CHI ?= this
					has_variable = china_warlord_explosion
					var:china_warlord_explosion <= 3
				}
			}
			add = 50
		}

		# High-fervour AI is inclined to become nationalistic
		if = {
			limit = {
				country_fervor_primary_culture > 10
			}
			add = {
				value = country_fervor_primary_culture
				divide = 4
			}
		}
	}
}
