﻿religious = {
	allowed_for_character = {
		OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you.
			top_liege = this
			any_liege_or_above = {
				faith = prev.faith
				count = all
			}
		}
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			} 
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
		faith = {
			NOR = {
				has_doctrine_parameter = unreformed # Unreformed Pagans cannot Holy War
				AND = {
					has_doctrine_parameter = holy_wars_forbidden # Pacifists cannot Holy War
					NOT = { prev = { has_character_flag = bonus_major_holy_war } } #...unless they got the legend bonus
				}
			}
		}
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
	}
}

#Holy wars that should be restricted if your liege disagrees, or your faith does, but which don't require organised religion. E.g., human sacrifice raids.
religious_disorganised = {
	allowed_for_character = {
		OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you.
			top_liege = this
			any_liege_or_above = {
				faith = prev.faith
				count = all
			}
		}
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			} 
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
		faith = {
			NOT = { has_doctrine_parameter = holy_wars_forbidden }	# Pacifists cannot Holy War
		}
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
	}
}

religious_script_only = {
	should_check_for_interface_availability = no
	can_only_start_via_script = yes # Only fired by event
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
	}
}

de_jure = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
	}
}

debug = {
	debug = yes
	should_check_for_interface_availability = no
	allowed_for_character = {
		herders_and_tributary_constraints = yes
	}
}

claim = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
	}
}

civil_war = {
	should_check_for_interface_availability = no
	can_only_start_via_script = yes # Only fired by event
	allowed_for_character = {
		herders_and_tributary_constraints = yes
	}
}

invasion = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			} 
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
	}
}

vassalization = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			}
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
	}
}

conquest = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			} 
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
	}
}

struggle = {
	allowed_for_character = { 
		can_use_struggle_cbs_trigger = yes
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			} 
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
	}
}

subjugation = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		tgp_dynastic_cycle_offensive_wars_ban_trigger = yes
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			} 
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
	}
}

independence = {
}

event = {
	should_check_for_interface_availability = no
	can_only_start_via_script = yes # Only fired by event
	allowed_for_character = {
		herders_and_tributary_constraints = yes
	}
}

artifact = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
	}
}

migration = {
	should_check_for_interface_availability = no
	can_only_start_via_script = yes # Only fired by event
}

humiliation = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
	}
}

mandala = {
	allowed_for_character = {
		herders_and_tributary_constraints = yes
		OR = {
			is_independent_ruler = yes
			is_tributary = yes
			is_ai = no
			AND = { OR = { has_trait = ambitious has_trait = greedy } NOR = { has_trait = content has_trait = compassionate has_trait = craven } }
			AND = {
				ai_greed >= 0 ai_boldness >= 0
				OR = {
					government_has_flag = government_is_tribal
					government_has_flag = government_is_nomadic
				}
			} 
			has_trait = rd_gpt_conqueror
			has_trait = rd_gpt_conquest_era
		}
	}
}
