option = {
	name = grand_archive.4105.3.$SELECTED_RELIC$
	trigger = {
		$TRIGGER$_$CATEGORY$ = yes
		has_country_flag = selected_relic_$SELECTED_RELIC$
		event_target:curator_enclave_country = {
			NOT = { has_country_flag = gave_relic_$SELECTED_RELIC$ }
		}
	}
	allow = {
		has_resource = { type = energy amount >= @curator_stage_3_price }
		custom_tooltip = {
			fail_text = "give_relic_edgecase_tt"
			event_target:curator_enclave_country = {
				NOT = { has_country_flag = gave_relic_$RELIC$ }
			}
		}
	}
	add_resource = { energy = @curator_stage_3_price mult = -1 }
	add_relic = {
		key = $SELECTED_RELIC$
		full_description = yes
	}
	hidden_effect = {
		event_target:curator_enclave_country = {
			set_country_flag = gave_relic_$SELECTED_RELIC$
		}
		set_country_flag = received_collection_stage_3_reward_$CATEGORY$
		# Cleanup
		remove_country_flag = selected_relic_$SELECTED_RELIC$
		if = {
			limit = { has_country_flag = selected_relic_$OTHER_RELIC_1$ }
			remove_country_flag = selected_relic_$OTHER_RELIC_1$
		}
		else_if = {
			limit = { has_country_flag = selected_relic_$OTHER_RELIC_2$ }
			remove_country_flag = selected_relic_$OTHER_RELIC_2$
		}
		else_if = {
			limit = { has_country_flag = selected_relic_$OTHER_RELIC_3$ }
			remove_country_flag = selected_relic_$OTHER_RELIC_3$
		}
		else_if = {
			limit = { has_country_flag = selected_relic_$OTHER_RELIC_4$ }
			remove_country_flag = selected_relic_$OTHER_RELIC_4$
		}
	}
}
