﻿
##################################################
# GENERIC TRIGGERS

# Note: this is a very stripped down trigger set. It's expected that it'll be parsed through something that parses out more typically unsuitable candidates (e.g., prisoners under most circumstances).
bg_can_start_board_game_trigger = {
	# Check for the usual stuff.
	can_start_board_game_eligibility_checks_trigger = yes
	# And filter out those who can never play a board game.
	bg_can_start_board_game_is_scope_banned_checks_trigger = no
}

can_start_board_game_eligibility_checks_trigger = {
	# Children need to be old enough to know to not eat the playing pieces.
	age >= 8
	# Otherwise, we're actually pretty forgiving of basically everyone being able to play somehow. For now.
}

bg_can_start_board_game_is_scope_banned_checks_trigger = {
	# Currently, we just *always* filter anyone who's already in a bout.
	exists = var:engaged_in_board_game
}

##################################################
# INTERACTION TRIGGERS

bg_game_type_region_pachisi_trigger = {
	OR = {
		geographical_region = world_india
		geographical_region = world_burma
	}
}

bg_game_type_region_hnefatafl_trigger = {
	NOT = { geographical_region = board_game_fidchell_region }
	OR = {
		geographical_region = world_europe_north
		geographical_region = world_europe_west_britannia
	}
}

bg_game_type_region_tabula_trigger = {
	OR = {
		geographical_region = world_asia_minor
		geographical_region = world_europe_south
	}
}

bg_game_type_region_go_trigger = {
	geographical_region = world_tibet
}

bg_game_type_region_fidchell_trigger = {
	geographical_region = board_game_fidchell_region
}

bg_stake_land_valid_neighbouring_county_to_trade_trigger = {
	tier = tier_county
	# Suppress a false positive error.
	trigger_if = {
		limit = { tier = tier_county }
		NOT = { this = prev.capital_county }
		any_neighboring_county = {
			# Ensure that they're swappable.
			OR = {
				# Generally, the county should be held by the other character.
				holder = $NEIGHBOUR$
				# But OCMs can be traded too.
				holder = {
					liege = $NEIGHBOUR$
					sub_realm_size = 1
				}
			}
		}
	}
}
