# Defines the different values available for given Agreement terms. The terms are defined in agreement_terms scripts.
# The term values contain the main logic of Agreement terms, including the modifiers and effects.
# For Subject Agreements, the owner is the overlord and the target is the subject.

# Example:
#
# name_of_term_value = {
# 	term = name_of_term 					# References the term in agreement_terms that this value applies to
#
# 	owner_modifier = {						# A modifier that applies to the Agreement owner country. Can stack multiple times.
# 		my_owner_modifier = 1
# 	}
# 	target_modifier = {						# A modifier that applies to the Agreement target country. Can stack multiple times.
# 		my_target_modifier = 1
# 	}
# 	unique_owner_modifier = {				# A modifier that applies to the Agreement owner country. Only applies once.
# 		my_unique_owner_modifier = 1
# 	}
# 	unique_target_modifier = {				# A modifier that applies to the Agreement target country. Only applies once.
# 		my_unique_target_modifier = 1
# 	}
# 	loyalty_change = value					# How much the subject's loyalty will change when a new agreement with this term starts
# 	ai_acceptance = {
#		overlord = 1						# Willingness of AI overlord to accept this term
#		subject = 1							# Willingness of AI subject to accept this term
#	}
# 	triggered_loyalty_change = {			# How much the subject's loyalty will additionally change when a new agreement with this term starts, if "trigger" is true
# 		trigger = {
# 			agreement_scope_trigger
# 		}
# 		loyalty_change = value
#		ai_acceptance = {
#			overlord = 1
#			subject = 1
#		}
# 	}
# 	extra_term_text_subject = <LOC_KEY> 	# What should be shown in the "extra terms" panel for the subject if this term value is active (default is to not show it)
# 											# This loc key can use $SUBJECT$ and $OVERLORD$ to show the name of the relevant empire, and $MODIFIER$ to show the modifiers applying to the subject
# 	extra_term_text_overlord = <LOC_KEY>	# What should be shown in the "extra terms" panel for the overlord if this term value is active (default is to not show it)
# 											# Loc key can use $SUBJECT$ and $OVERLORD$ to show the name of the relevant empire, $MODIFIER$ for the overlord's modifiers, and $RESOURCES$ for the net resources it gains
# }
#
# name_of_resource_term_value = {
# 	term = name_of_resource_term
#	resource = <resource> (food/alloys/...)
# }

subject_holdings_limit_0 = {
	term = subject_holdings_limit
	target_modifier = {
		subject_holding_target_max_buildings_add = 0
	}
	potential = {
		NOT = { 
			owner = { has_tradition = tr_plentiful_dedication_4 }
		}
	}
}

subject_holdings_limit_0_plentiful_traditions = {
	term = subject_holdings_limit
	target_modifier = {
		subject_holding_target_max_buildings_add = 0
	}
	potential = {
		owner = { has_tradition = tr_plentiful_dedication_4 }
	}
}

subject_holdings_limit_1 = {
	term = subject_holdings_limit
	loyalty_change = -5
	ai_acceptance = {
		overlord = 30
		subject = -25
	}
	target_modifier = {
		monthly_loyalty = -0.4
		subject_holding_target_max_buildings_add = 1
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		NOT = { 
			owner = { has_tradition = tr_plentiful_dedication_4 }
		}
	}
}

subject_holdings_limit_1_plentiful_traditions = {
	term = subject_holdings_limit
	loyalty_change = -5
	ai_acceptance = {
		overlord = 30
		subject = -25
	}
	target_modifier = {
		monthly_loyalty = -0.4
		subject_holding_target_max_buildings_add = 1
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		owner = { has_tradition = tr_plentiful_dedication_4 }
	}
}

subject_holdings_limit_2 = {
	term = subject_holdings_limit
	loyalty_change = -15
	ai_acceptance = {
		overlord = 90
		subject = -75
	}
	target_modifier = {
		monthly_loyalty = -1
		subject_holding_target_max_buildings_add = 2
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		has_overlord_dlc = yes
		NOT = { 
			owner = { has_tradition = tr_plentiful_dedication_4 }
		}
	}
}

subject_holdings_limit_2_plentiful_traditions = {
	term = subject_holdings_limit
	loyalty_change = -15
	ai_acceptance = {
		overlord = 90
		subject = -75
	}
	target_modifier = {
		monthly_loyalty = -1
		subject_holding_target_max_buildings_add = 2
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		has_overlord_dlc = yes
		owner = { has_tradition = tr_plentiful_dedication_4 }
	}
}

subject_holdings_limit_3 = {
	term = subject_holdings_limit
	loyalty_change = -30
	ai_acceptance = {
		overlord = 180
		subject = -150
	}
	target_modifier = {
		monthly_loyalty = -2
		subject_holding_target_max_buildings_add = 3
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_galcom_resolution
			OR = {
				owner = { is_galactic_community_member = no }
				NOT = { is_active_resolution = resolution_bureaucraticsurveillance_personal_oversight }
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		has_overlord_dlc = yes
		NOT = { 
			owner = { has_tradition = tr_plentiful_dedication_4 }
		}
	}
}

subject_holdings_limit_3_plentiful_traditions = {
	term = subject_holdings_limit
	loyalty_change = -30
	ai_acceptance = {
		overlord = 180
		subject = -150
	}
	target_modifier = {
		monthly_loyalty = -2
		subject_holding_target_max_buildings_add = 3
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_galcom_resolution
			OR = {
				owner = { is_galactic_community_member = no }
				NOT = { is_active_resolution = resolution_bureaucraticsurveillance_personal_oversight }
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		has_overlord_dlc = yes
		owner = { has_tradition = tr_plentiful_dedication_4 }
	}
}

subject_holdings_limit_4 = {
	term = subject_holdings_limit
	loyalty_change = -50
	ai_acceptance = {
		overlord = 300
		subject = -250
	}
	target_modifier = {
		monthly_loyalty = -4
		subject_holding_target_max_buildings_add = 4
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_galcom_resolution
			OR = {
				owner = { is_galactic_community_member = no }
				NOR = {
					is_active_resolution = resolution_bureaucraticsurveillance_borderless_authority
					is_active_resolution = resolution_bureaucraticsurveillance_personal_oversight
				}
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		has_overlord_dlc = yes
		NOT = { 
			owner = { has_tradition = tr_plentiful_dedication_4 }
		}
	}
}

subject_holdings_limit_4_plentiful_traditions = {
	term = subject_holdings_limit
	loyalty_change = -50
	ai_acceptance = {
		overlord = 300
		subject = -250
	}
	target_modifier = {
		monthly_loyalty = -4
		subject_holding_target_max_buildings_add = 4
	}
	possible = {
		custom_tooltip = {
			fail_text = not_allowed_for_tributary
			NOT = {
				agreement_preset = preset_tributary
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_galcom_resolution
			OR = {
				owner = { is_galactic_community_member = no }
				NOR = {
					is_active_resolution = resolution_bureaucraticsurveillance_borderless_authority
					is_active_resolution = resolution_bureaucraticsurveillance_personal_oversight
				}
			}
		}
		custom_tooltip = {
			fail_text = not_allowed_for_luminarium
			NOT = {
				agreement_preset = preset_luminarium
			}
		}
	}
	potential = {
		has_overlord_dlc = yes
		owner = { has_tradition = tr_plentiful_dedication_4 }
	}
}