﻿eliminate_&_replace_faith_effect = {
	if = {
		limit = {
			exists = $TARGET_FAITH$.religious_head_title
			exists = $TARGET_FAITH$.religious_head_title.holder
			NOT = { $TARGET_FAITH$.religious_head_title = $REPLACEMENT_FAITH$.religious_head_title }
		}

		$TARGET_FAITH$.religious_head_title.holder = {
			destroy_title = $TARGET_FAITH$.religious_head_title
		}
	}
	every_county = {
		limit = { faith = $TARGET_FAITH$ }
		set_variable = {
			name = forbid_crypto_reconversion
			value = yes
			days = 30
		}
		set_county_faith = $REPLACEMENT_FAITH$
	}
	$TARGET_FAITH$ = {
		every_faith_character = {
			set_variable = {
				name = forbid_crypto_reconversion
				value = yes
				days = 30
			}
			set_character_faith = $REPLACEMENT_FAITH$
		}
	}
}
