﻿create_artifact_necronomicon_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_illustrious = yes

	# Create the artifact
	create_artifact = {
		name = artifact_necronomicon_name
		description = artifact_necronomicon_description
		template = necronomicon_template
		type = book
		visuals = necronomicon
		wealth = scope:wealth
		quality = scope:quality
		history = {
			type = created 
			date = 629.9.14
                  actor = character:abdul_alhazred
                  recipient = character:abdul_alhazred
                  location = province:5924 #Damascus
		}
		modifier = necronomicon_modifier
		save_scope_as = newly_created_artifact
		decaying = no
	}

	scope:newly_created_artifact = {
		set_variable = { name = historical_unique_artifact value = yes }
		set_variable = necronomicon
		add_artifact_title_history = {
			target = title:c_baghdad
			date = 629.9.14
		}
		set_variable = cursed_artifact
		save_scope_as = epic
		set_variable = {
			name = artifact_succession_title
			value = title:c_baghdad #Located in the House of Wisdom
		}
	}
}

create_artifact_holy_hand_granade_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_illustrious = yes

	# Create the artifact
	create_artifact = {
		name = artifact_holy_hand_granade_name
		description = artifact_holy_hand_granade_description
		template = holy_hand_granade_template
		type = spear
		visuals = holy_hand_granade
		wealth = scope:wealth
		quality = scope:quality
		history = {
			type = created_before_history
		}
		modifier = holy_hand_granade_modifier
		save_scope_as = newly_created_artifact
		decaying = no
	}

	scope:newly_created_artifact = {
		set_variable = { name = historical_unique_artifact value = yes }
		set_variable = holy_hand_granade
		add_artifact_title_history = {
			target = title:k_england
			date = 435.1.1
		}
		save_scope_as = epic
		set_variable = {
			name = artifact_succession_title
			value = title:k_england
		}
	}
}