﻿create_artifact_excalibur_effect = {
	# Get the character the artifact is being made for.
	$OWNER$ = { save_scope_as = owner }
	# Not really used, but if we don't set the scopes we get errors in the feature selection
	set_artifact_rarity_common = yes

	# Create the artifact
	create_artifact = {
		name = excalibur_name
		description = excalibur_description
		type = pedestal
		visuals = excalibur
		wealth = scope:wealth
		quality = scope:quality
		history = {
			type = created_before_history
		}
		modifier = excalibur_modifier
		save_scope_as = newly_created_artifact
		decaying = no
	}

	scope:newly_created_artifact = {
		set_variable = { name = historical_unique_artifact value = yes }
		set_variable = excalibur
		save_scope_as = epic
	}
}