﻿###| Harthgate Artifact Creation Effects for Estates and Adventurers |###

###| Credits |###

#: Developed by Edgar Harthgate

###| End of Credits |###

###| Table of Contents |###														###| Status |###	###| Quick Link |###

#: 000: Blank Template															#: Building			artifact_creation_effects_blank_template
#: 001: Historical Artifacts													#: Building			artifact_creation_effects_historical_artifacts

###| 000: Blank Template |###													###| Status |###	###| artifact_modifiers_blank_template |###

#: harthgate_artifact_creation_effect_blank_template							#: Building

###| 001: Historical Artifacts |###												###| Status |###	###| artifact_modifiers_historical_artifacts |###

#: harthgate_artifact_creation_effect_crown_scarlet_flame						#: Building
#: harthgate_artifact_creation_effect_honored_akolouthos_blade					#: Building
#: harthgate_artifact_creation_effect_hrodulfingr_banner_and_lexicon			#: Building
#: harthgate_artifact_creation_effect_notes_of_agnes_hueber						#: Building

###| End of Table of Contents |###

###| 000: Blank Template |###    ###| artifact_modifiers_blank_template |###

#: harthgate_artifact_creation_effect_blank_template = Blank Template

# harthgate_artifact_creation_effect_blank_template = {
#
#	#: Get the character the artifact is being made for.
#	#: Not really used, but if we don't set the scopes we get errors in the feature selection
#	$OWNER$ = { save_scope_as = owner }
#	
#	#: set_artifact_rarity_common = yes
#	#: set_artifact_rarity_masterwork = yes
#	#: set_artifact_rarity_famed = yes
#	#: set_artifact_rarity_illustrious = yes
#	
#	###| Create the Artifact |###
#	create_artifact = {	
#		name = harthgate_artifact_blank_template_name
#		description = harthgate_artifact_blank_template_description
#		type = 
#		visuals = harthgate_artifact_visuals_blank_template
#		wealth = scope:wealth
#		quality = scope:quality
#		template = harthgate_artifact_templates_blank_template
#		history = {
#			type = created_before_history
#		}
#		modifier = harthgate_artifact_modifiers_blank_template
#		save_scope_as = newly_created_artifact
#	}
#
#	scope:newly_created_artifact = {
#		set_variable = { name = historical_unique_artifact value = yes }
#		set_variable = harthgate_blank_template
#		save_scope_as = epic
#	}
# }

###| 001: Historical Artifacts |###    ###| artifact_modifiers_historical_artifacts |###

#: harthgate_artifact_creation_effect_crown_scarlet_flame = Crown of Scarlet Flame

harthgate_artifact_creation_effect_crown_scarlet_flame = {

	if = {
	
		limit = { has_dlc_feature = roads_to_power }

		#: Get the character the artifact is being made for.
		#: Not really used, but if we don't set the scopes we get errors in the feature selection
		$OWNER$ = { save_scope_as = owner }
	
		#: set_artifact_rarity_common = yes
		#: set_artifact_rarity_masterwork = yes
		#: set_artifact_rarity_famed = yes
		set_artifact_rarity_illustrious = yes
	
		###| Create the Artifact |###
		create_artifact = {	
			name = harthgate_artifact_crown_scarlet_flame_name
			description = harthgate_artifact_crown_scarlet_flame_description
			type = helmet
			visuals = harthgate_artifact_visuals_crown_scarlet_flame
			wealth = scope:wealth
			quality = scope:quality
			template = harthgate_artifact_template_historical_illustrious
			history = {
				type = created
				date = 840.1.1
				recipient = character:001_keszycki_krzeslaw_keszycki
			}
			modifier = harthgate_artifact_modifiers_crown_scarlet_flame
			decaying = no
			save_scope_as = newly_created_artifact
		}

		scope:newly_created_artifact = {
			set_variable = { name = historical_unique_artifact value = yes }
			set_variable = harthgate_artifact_crown_scarlet_flame
			save_scope_as = epic
			add_artifact_history = {
				artifact = this
				type = inherited
				date = 795.1.1
				recipient = character:003_keszycki_krzesimir_keszycki
			}
			add_artifact_history = {
				artifact = this
				type = inherited
				date = 849.1.1
				recipient = character:004_keszycki_krzysztof_keszycki
			}
			add_artifact_history = {
				artifact = this
				type = inherited
				date = 859.1.1
				recipient = character:008_keszycki_krzyseik_keszycki
			}
		}
	}
}

#: harthgate_artifact_creation_effect_honored_akolouthos_blade = Honored Akolouthos Blade

harthgate_artifact_creation_effect_honored_akolouthos_blade = {
	
	if = {
	
		limit = { has_dlc_feature = roads_to_power }

		#: Get the character the artifact is being made for.
		#: Not really used, but if we don't set the scopes we get errors in the feature selection
		$OWNER$ = { save_scope_as = owner }
	
		#: set_artifact_rarity_common = yes
		#: set_artifact_rarity_masterwork = yes
		#: set_artifact_rarity_famed = yes
		set_artifact_rarity_illustrious = yes
	
		###| Create the Artifact |###
		create_artifact = {	
			name = harthgate_artifact_honored_akolouthos_blade_name
			description = harthgate_artifact_honored_akolouthos_blade_description
			type = sword
			visuals = harthgate_artifact_visuals_honored_akolouthos_blade
			wealth = scope:wealth
			quality = scope:quality
			template = harthgate_artifact_template_historical_illustrious
			history = {
				type = created
				date = 840.1.1
				recipient = character:70491 #: Basileus Theophilos Amorios
			}
			modifier = harthgate_artifact_modifiers_honored_akolouthos_blade
			decaying = no
			save_scope_as = newly_created_artifact
		}

		scope:newly_created_artifact = {
			set_variable = { name = historical_unique_artifact value = yes }
			set_variable = harthgate_artifact_honored_akolouthos_blade
			save_scope_as = epic
			add_artifact_history = {
				artifact = this
				type = given
				date = 840.1.1
				recipient = character:001_hrorikingr_hrorikr_hrorikingr
			}
			add_artifact_history = {
				artifact = this
				type = inherited
				date = 854.1.1
				recipient = character:101_hrorikingr_hrodulfr_hrodulfingr
			}
		}
	}
}

#: harthgate_artifact_creation_effect_hrodulfingr_banner_and_lexicon = Hrodulfingr Banner and Lexicon

harthgate_artifact_creation_effect_hrodulfingr_banner_and_lexicon = {
	
	if = {
	
		limit = { has_dlc_feature = roads_to_power }

		#: Get the character the artifact is being made for.
		#: Not really used, but if we don't set the scopes we get errors in the feature selection
		$OWNER$ = { save_scope_as = owner }
	
		#: set_artifact_rarity_common = yes
		set_artifact_rarity_masterwork = yes
		#: set_artifact_rarity_famed = yes
		#: set_artifact_rarity_illustrious = yes
	
		###| Create the Artifact |###
		create_artifact = {	
			name = harthgate_artifact_hrodulfingr_banner_and_lexicon_name
			description = harthgate_artifact_hrodulfingr_banner_and_lexicon_description
			type = journal
			visuals = harthgate_artifact_visuals_hrodulfingr_banner_and_lexicon
			wealth = scope:wealth
			quality = scope:quality
			template = harthgate_artifact_template_historical_illustrious
			history = {
				type = created
				date = 866.1.1
				recipient = character:101_hrorikingr_hrodulfr_hrodulfingr
			}
			modifier = harthgate_artifact_modifiers_hrodulfingr_banner_and_lexicon
			#modifier = radiant_artifact_modifier_advantage_controlled_province_eaa
			#modifier = radiant_artifact_modifier_advantage_desert_eaa
			#modifier = radiant_artifact_modifier_advantage_desert_mountains_eaa
			#modifier = radiant_artifact_modifier_advantage_drylands_eaa
			#modifier = radiant_artifact_modifier_advantage_farmlands_eaa
			#modifier = radiant_artifact_modifier_advantage_floodplains_eaa
			#modifier = radiant_artifact_modifier_advantage_forest_eaa
			#modifier = radiant_artifact_modifier_advantage_hills_eaa
			#modifier = radiant_artifact_modifier_advantage_jungle_eaa
			#modifier = radiant_artifact_modifier_advantage_mountains_eaa
			#modifier = radiant_artifact_modifier_advantage_oasis_eaa
			#modifier = radiant_artifact_modifier_advantage_plains_eaa
			#modifier = radiant_artifact_modifier_advantage_steppe_eaa
			#modifier = radiant_artifact_modifier_advantage_taiga_eaa
			#modifier = radiant_artifact_modifier_advantage_tolerance_eaa
			#modifier = radiant_artifact_modifier_advantage_wetlands_eaa
			#modifier = radiant_artifact_modifier_advantage_winter_eaa
			decaying = no
			save_scope_as = newly_created_artifact
		}

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

#: harthgate_artifact_creation_effect_notes_of_agnes_hueber = Collective Notes of Agnes Hueber

harthgate_artifact_creation_effect_notes_of_agnes_hueber = {
	
	if = {
	
		limit = { has_dlc_feature = roads_to_power }

		#: Get the character the artifact is being made for.
		#: Not really used, but if we don't set the scopes we get errors in the feature selection
		$OWNER$ = { save_scope_as = owner }
	
		#: set_artifact_rarity_common = yes
		set_artifact_rarity_masterwork = yes
		#: set_artifact_rarity_famed = yes
		#: set_artifact_rarity_illustrious = yes
	
		###| Create the Artifact |###
		create_artifact = {	
			name = harthgate_artifact_notes_of_agnes_hueber_name
			description = harthgate_artifact_notes_of_agnes_hueber_description
			type = miscellaneous
			visuals = harthgate_artifact_visuals_notes_of_agnes_hueber
			wealth = scope:wealth
			quality = scope:quality
			template = harthgate_artifact_template_historical_masterwork
			history = {
				type = created
				date = 844.1.1
				creator = character:005_hueber_agnes_hueber
				recipient = character:005_hueber_agnes_hueber
			}
			modifier = harthgate_artifact_modifiers_notes_of_agnes_hueber
			decaying = no
			save_scope_as = newly_created_artifact
		}

		scope:newly_created_artifact = {
			set_variable = { name = historical_unique_artifact value = yes }
			set_variable = harthgate_artifact_notes_of_agnes_hueber
			save_scope_as = epic
			add_artifact_history = {
				artifact = this
				type = given
				date = 860.1.1
				recipient = character:010_bauer_johanna_bauer
			}
		}
	}
}