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

# csc_effect_country_annex
csc_effect_country_annex = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			annex_country = {
				target = PREV
				transfer_troops = yes
			}
		}
	}
}

# csc_effect_country_puppet
csc_effect_country_puppet = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			puppet = PREV
		}
	}
}

# csc_effect_country_release_subject
csc_effect_country_release_subject = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			end_puppet = PREV
		}
	}
}

# csc_effect_country_grant_independence
csc_effect_country_grant_independence = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			release = PREV
		}
	}
}

# csc_effect_country_set_autonomy
csc_effect_country_set_autonomy = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			set_autonomy = {
				target = PREV
				autonomy_state = autonomy_puppet
			}
		}
	}
}

# csc_effect_country_white_peace
csc_effect_country_white_peace = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		white_peace = ROOT
	}
}

# csc_effect_country_faction_invite
csc_effect_country_faction_invite = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			add_to_faction = PREV
		}
	}
}

# csc_effect_country_faction_remove
csc_effect_country_faction_remove = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			remove_from_faction = PREV
		}
	}
}

# csc_effect_country_leave_faction
csc_effect_country_leave_faction = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			leave_faction = yes
		}
	}
}

# csc_effect_country_create_faction
csc_effect_country_create_faction = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			create_faction = csc_faction
			add_to_faction = PREV
		}
	}
}

# csc_effect_country_dismantle_faction
csc_effect_country_dismantle_faction = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		ROOT = {
			dismantle_faction = yes
		}
	}
}

# csc_effect_country_set_faction_leader
csc_effect_country_set_faction_leader = {
	if = {
		limit = { ROOT = { csc_disruptive_enabled = yes } }
		set_faction_leader = yes
	}
}
