create_small_dragon_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_famed = yes
	
	save_scope_value_as = {name = wealth value = 75}
	save_scope_value_as = {name = quality value = 75}

	# Create the artifact
	create_artifact = {
		name = small_dragon_name
		description = small_dragon_desc
		type = regalia
		visuals = small_dragon_visuals
		template = dragon_template
		wealth = scope:wealth
		quality = scope:quality
		max_durability = 50
		history = {
			type = created_before_history
		}
		modifier = small_dragon_modifier
		save_scope_as = newly_created_artifact
		decaying = yes
	}

	scope:newly_created_artifact = {
		save_scope_as = epic
		save_scope_value_as = {
			name = miscellaneous
			value = yes
		}
	}
}

create_large_dragon_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_famed = yes
	
	save_scope_value_as = {name = wealth value = 100}
	save_scope_value_as = {name = quality value = 100}

	# Create the artifact
	create_artifact = {
		name = large_dragon_name
		description = large_dragon_desc
		type = regalia
		visuals = large_dragon_visuals
		template = dragon_template
		wealth = scope:wealth
		quality = scope:quality
		max_durability = 100
		history = {
			type = created_before_history
		}
		modifier = large_dragon_modifier
		save_scope_as = newly_created_artifact
		decaying = yes
	}

	scope:newly_created_artifact = {
		save_scope_as = epic
		save_scope_value_as = {
			name = miscellaneous
			value = yes
		}
	}
}

create_black_dragon_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_famed = yes
	
	save_scope_value_as = {name = wealth value = 200}
	save_scope_value_as = {name = quality value = 200}

	# Create the artifact
	create_artifact = {
		name = black_dragon_name
		description = black_dragon_desc
		type = regalia
		visuals = black_dragon_visuals
		template = dragon_template
		wealth = scope:wealth
		quality = scope:quality
		max_durability = 200
		history = {
			type = created_before_history
		}
		modifier = black_dragon_modifier
		save_scope_as = newly_created_artifact
		decaying = yes
	}

	scope:newly_created_artifact = {
		save_scope_as = epic
		save_scope_value_as = {
			name = miscellaneous
			value = yes
		}
	}
}

#############################################
## Dragon Claiming Effects
#############################################

dragon_claim_throne_effect = {
	$TARGET$ = {
		save_scope_as = target
	}

	$CLAIMANT$ = {
		save_scope_as = claimant
	}
	
	if = {
		limit = {
			scope:target_title = title:e_the_iron_throne
		}
		scope:claimant = { # If the title is the Iron Throne, special Conqueror event!
			add_to_temporary_list = received_notification
			trigger_event = dragon_event.3005
		}
		
	}
	else = {
		scope:claimant = { # Not Iron Throne, normal event
			add_to_temporary_list = received_notification
			trigger_event = dragon_event.3004
		}
	}
	
	add_pressed_claim = scope:target_title
}