# Comprehensive Sandbox Control - country and faction actions scripted triggers
#
# Country-scoped triggers. Target country is in scope (THIS). Acting country is ROOT.

# csc_country_action_annex_enabled
csc_country_action_annex_enabled = {
	exists = yes
	NOT = { tag = ROOT }
}

# csc_country_action_puppet_enabled
csc_country_action_puppet_enabled = {
	exists = yes
	NOT = { tag = ROOT }
	NOT = { is_subject_of = ROOT }
}

# csc_country_action_release_subject_enabled
csc_country_action_release_subject_enabled = {
	exists = yes
	is_subject = yes
	is_subject_of = ROOT
}

# csc_country_action_grant_independence_enabled
csc_country_action_grant_independence_enabled = {
	exists = yes
	is_subject_of = ROOT
}

# csc_country_action_set_autonomy_enabled
csc_country_action_set_autonomy_enabled = {
	exists = yes
	is_subject_of = ROOT
}

# csc_country_action_white_peace_enabled
csc_country_action_white_peace_enabled = {
	exists = yes
	has_war_with = ROOT
}

# csc_country_action_faction_invite_enabled
csc_country_action_faction_invite_enabled = {
	exists = yes
	NOT = { tag = ROOT }
	ROOT = {
		is_in_faction = yes
		is_faction_leader = yes
	}
	NOT = { is_in_faction_with = ROOT }
}

# csc_country_action_faction_remove_enabled
csc_country_action_faction_remove_enabled = {
	exists = yes
	NOT = { tag = ROOT }
	ROOT = {
		is_in_faction = yes
		is_faction_leader = yes
	}
	is_in_faction_with = ROOT
}

# csc_country_action_leave_faction_enabled
csc_country_action_leave_faction_enabled = {
	ROOT = {
		is_in_faction = yes
	}
}

# csc_country_action_create_faction_enabled
csc_country_action_create_faction_enabled = {
	exists = yes
	NOT = { tag = ROOT }
	ROOT = {
		is_in_faction = no
	}
	NOT = { is_in_faction = yes }
}

# csc_country_action_dismantle_faction_enabled
csc_country_action_dismantle_faction_enabled = {
	ROOT = {
		is_in_faction = yes
		is_faction_leader = yes
	}
}

# csc_country_action_set_faction_leader_enabled
csc_country_action_set_faction_leader_enabled = {
	exists = yes
	is_in_faction_with = ROOT
	NOT = { is_faction_leader = yes }
}
