﻿# More Doctrines: set a doctrine on a faith (scope: faith). CK3 1.20 no longer replaces a doctrine of the same group
# with add_doctrine, and logs an error for removing a doctrine the faith lacks or adding one it already has.
# Each effect removes the other doctrines of the group (if present) and then adds the doctrine (if missing).

md_set_doctrine_aeonic = {
	if = { limit = { has_doctrine = doctrine_ethereal } remove_doctrine = doctrine_ethereal }
	if = { limit = { has_doctrine = doctrine_ethereal_immortal } remove_doctrine = doctrine_ethereal_immortal }
	if = { limit = { has_doctrine = doctrine_immortal } remove_doctrine = doctrine_immortal }
	if = { limit = { has_doctrine = doctrine_personal } remove_doctrine = doctrine_personal }
	if = { limit = { has_doctrine = doctrine_spiritual } remove_doctrine = doctrine_spiritual }
	if = { limit = { NOT = { has_doctrine = doctrine_aeonic } } add_doctrine = doctrine_aeonic }
}

md_set_doctrine_almsgiving_none = {
	if = { limit = { has_doctrine = doctrine_encouraged_alms } remove_doctrine = doctrine_encouraged_alms }
	if = { limit = { has_doctrine = doctrine_mandatory_alms } remove_doctrine = doctrine_mandatory_alms }
	if = { limit = { NOT = { has_doctrine = doctrine_almsgiving_none } } add_doctrine = doctrine_almsgiving_none }
}

md_set_doctrine_anointed_deliverer = {
	if = { limit = { has_doctrine = doctrine_avatars } remove_doctrine = doctrine_avatars }
	if = { limit = { has_doctrine = doctrine_divine_guidance_none } remove_doctrine = doctrine_divine_guidance_none }
	if = { limit = { has_doctrine = doctrine_enlightened_monks } remove_doctrine = doctrine_enlightened_monks }
	if = { limit = { has_doctrine = doctrine_gurus } remove_doctrine = doctrine_gurus }
	if = { limit = { has_doctrine = doctrine_prophets } remove_doctrine = doctrine_prophets }
	if = { limit = { NOT = { has_doctrine = doctrine_anointed_deliverer } } add_doctrine = doctrine_anointed_deliverer }
}

md_set_doctrine_apocalypse = {
	if = { limit = { has_doctrine = doctrine_eschatology_none } remove_doctrine = doctrine_eschatology_none }
	if = { limit = { has_doctrine = doctrine_judgement_day } remove_doctrine = doctrine_judgement_day }
	if = { limit = { has_doctrine = doctrine_promised_deliverer } remove_doctrine = doctrine_promised_deliverer }
	if = { limit = { NOT = { has_doctrine = doctrine_apocalypse } } add_doctrine = doctrine_apocalypse }
}

md_set_doctrine_archangels = {
	if = { limit = { has_doctrine = doctrine_aspects } remove_doctrine = doctrine_aspects }
	if = { limit = { has_doctrine = doctrine_deities_none } remove_doctrine = doctrine_deities_none }
	if = { limit = { has_doctrine = doctrine_demigods } remove_doctrine = doctrine_demigods }
	if = { limit = { has_doctrine = doctrine_spirits } remove_doctrine = doctrine_spirits }
	if = { limit = { NOT = { has_doctrine = doctrine_archangels } } add_doctrine = doctrine_archangels }
}

md_set_doctrine_aspects = {
	if = { limit = { has_doctrine = doctrine_archangels } remove_doctrine = doctrine_archangels }
	if = { limit = { has_doctrine = doctrine_deities_none } remove_doctrine = doctrine_deities_none }
	if = { limit = { has_doctrine = doctrine_demigods } remove_doctrine = doctrine_demigods }
	if = { limit = { has_doctrine = doctrine_spirits } remove_doctrine = doctrine_spirits }
	if = { limit = { NOT = { has_doctrine = doctrine_aspects } } add_doctrine = doctrine_aspects }
}

md_set_doctrine_atonement_none = {
	if = { limit = { has_doctrine = doctrine_encouraged_atone } remove_doctrine = doctrine_encouraged_atone }
	if = { limit = { has_doctrine = doctrine_mandatory_atone } remove_doctrine = doctrine_mandatory_atone }
	if = { limit = { NOT = { has_doctrine = doctrine_atonement_none } } add_doctrine = doctrine_atonement_none }
}

md_set_doctrine_autonomous = {
	if = { limit = { has_doctrine = doctrine_obligatory } remove_doctrine = doctrine_obligatory }
	if = { limit = { has_doctrine = doctrine_paramount } remove_doctrine = doctrine_paramount }
	if = { limit = { has_doctrine = doctrine_recommended } remove_doctrine = doctrine_recommended }
	if = { limit = { NOT = { has_doctrine = doctrine_autonomous } } add_doctrine = doctrine_autonomous }
}

md_set_doctrine_avatars = {
	if = { limit = { has_doctrine = doctrine_anointed_deliverer } remove_doctrine = doctrine_anointed_deliverer }
	if = { limit = { has_doctrine = doctrine_divine_guidance_none } remove_doctrine = doctrine_divine_guidance_none }
	if = { limit = { has_doctrine = doctrine_enlightened_monks } remove_doctrine = doctrine_enlightened_monks }
	if = { limit = { has_doctrine = doctrine_gurus } remove_doctrine = doctrine_gurus }
	if = { limit = { has_doctrine = doctrine_prophets } remove_doctrine = doctrine_prophets }
	if = { limit = { NOT = { has_doctrine = doctrine_avatars } } add_doctrine = doctrine_avatars }
}

md_set_doctrine_bastardry_legitimization = {
	if = { limit = { has_doctrine = doctrine_bastardry_all } remove_doctrine = doctrine_bastardry_all }
	if = { limit = { has_doctrine = doctrine_bastardry_none } remove_doctrine = doctrine_bastardry_none }
	if = { limit = { NOT = { has_doctrine = doctrine_bastardry_legitimization } } add_doctrine = doctrine_bastardry_legitimization }
}

md_set_doctrine_bastardry_none = {
	if = { limit = { has_doctrine = doctrine_bastardry_all } remove_doctrine = doctrine_bastardry_all }
	if = { limit = { has_doctrine = doctrine_bastardry_legitimization } remove_doctrine = doctrine_bastardry_legitimization }
	if = { limit = { NOT = { has_doctrine = doctrine_bastardry_none } } add_doctrine = doctrine_bastardry_none }
}

md_set_doctrine_chaos_into_world = {
	if = { limit = { has_doctrine = doctrine_cyclic } remove_doctrine = doctrine_cyclic }
	if = { limit = { has_doctrine = doctrine_dualistic } remove_doctrine = doctrine_dualistic }
	if = { limit = { has_doctrine = doctrine_eternal } remove_doctrine = doctrine_eternal }
	if = { limit = { has_doctrine = doctrine_theistic_creation } remove_doctrine = doctrine_theistic_creation }
	if = { limit = { NOT = { has_doctrine = doctrine_chaos_into_world } } add_doctrine = doctrine_chaos_into_world }
}

md_set_doctrine_concubines = {
	if = { limit = { has_doctrine = doctrine_bigamy } remove_doctrine = doctrine_bigamy }
	if = { limit = { has_doctrine = doctrine_monogamy } remove_doctrine = doctrine_monogamy }
	if = { limit = { has_doctrine = doctrine_polygamy } remove_doctrine = doctrine_polygamy }
	if = { limit = { has_doctrine = doctrine_trigamy } remove_doctrine = doctrine_trigamy }
	if = { limit = { NOT = { has_doctrine = doctrine_concubines } } add_doctrine = doctrine_concubines }
}

md_set_doctrine_consanguinity_aunt_nephew_and_uncle_niece = {
	if = { limit = { has_doctrine = doctrine_consanguinity_cousins } remove_doctrine = doctrine_consanguinity_cousins }
	if = { limit = { has_doctrine = doctrine_consanguinity_dynastic } remove_doctrine = doctrine_consanguinity_dynastic }
	if = { limit = { has_doctrine = doctrine_consanguinity_restricted } remove_doctrine = doctrine_consanguinity_restricted }
	if = { limit = { has_doctrine = doctrine_consanguinity_unrestricted } remove_doctrine = doctrine_consanguinity_unrestricted }
	if = { limit = { NOT = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } } add_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
}

md_set_doctrine_consanguinity_cousins = {
	if = { limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
	if = { limit = { has_doctrine = doctrine_consanguinity_dynastic } remove_doctrine = doctrine_consanguinity_dynastic }
	if = { limit = { has_doctrine = doctrine_consanguinity_restricted } remove_doctrine = doctrine_consanguinity_restricted }
	if = { limit = { has_doctrine = doctrine_consanguinity_unrestricted } remove_doctrine = doctrine_consanguinity_unrestricted }
	if = { limit = { NOT = { has_doctrine = doctrine_consanguinity_cousins } } add_doctrine = doctrine_consanguinity_cousins }
}

md_set_doctrine_consanguinity_restricted = {
	if = { limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
	if = { limit = { has_doctrine = doctrine_consanguinity_cousins } remove_doctrine = doctrine_consanguinity_cousins }
	if = { limit = { has_doctrine = doctrine_consanguinity_dynastic } remove_doctrine = doctrine_consanguinity_dynastic }
	if = { limit = { has_doctrine = doctrine_consanguinity_unrestricted } remove_doctrine = doctrine_consanguinity_unrestricted }
	if = { limit = { NOT = { has_doctrine = doctrine_consanguinity_restricted } } add_doctrine = doctrine_consanguinity_restricted }
}

md_set_doctrine_consanguinity_unrestricted = {
	if = { limit = { has_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece } remove_doctrine = doctrine_consanguinity_aunt_nephew_and_uncle_niece }
	if = { limit = { has_doctrine = doctrine_consanguinity_cousins } remove_doctrine = doctrine_consanguinity_cousins }
	if = { limit = { has_doctrine = doctrine_consanguinity_dynastic } remove_doctrine = doctrine_consanguinity_dynastic }
	if = { limit = { has_doctrine = doctrine_consanguinity_restricted } remove_doctrine = doctrine_consanguinity_restricted }
	if = { limit = { NOT = { has_doctrine = doctrine_consanguinity_unrestricted } } add_doctrine = doctrine_consanguinity_unrestricted }
}

md_set_doctrine_cyclic = {
	if = { limit = { has_doctrine = doctrine_chaos_into_world } remove_doctrine = doctrine_chaos_into_world }
	if = { limit = { has_doctrine = doctrine_dualistic } remove_doctrine = doctrine_dualistic }
	if = { limit = { has_doctrine = doctrine_eternal } remove_doctrine = doctrine_eternal }
	if = { limit = { has_doctrine = doctrine_theistic_creation } remove_doctrine = doctrine_theistic_creation }
	if = { limit = { NOT = { has_doctrine = doctrine_cyclic } } add_doctrine = doctrine_cyclic }
}

md_set_doctrine_deities_none = {
	if = { limit = { has_doctrine = doctrine_archangels } remove_doctrine = doctrine_archangels }
	if = { limit = { has_doctrine = doctrine_aspects } remove_doctrine = doctrine_aspects }
	if = { limit = { has_doctrine = doctrine_demigods } remove_doctrine = doctrine_demigods }
	if = { limit = { has_doctrine = doctrine_spirits } remove_doctrine = doctrine_spirits }
	if = { limit = { NOT = { has_doctrine = doctrine_deities_none } } add_doctrine = doctrine_deities_none }
}

md_set_doctrine_demigods = {
	if = { limit = { has_doctrine = doctrine_archangels } remove_doctrine = doctrine_archangels }
	if = { limit = { has_doctrine = doctrine_aspects } remove_doctrine = doctrine_aspects }
	if = { limit = { has_doctrine = doctrine_deities_none } remove_doctrine = doctrine_deities_none }
	if = { limit = { has_doctrine = doctrine_spirits } remove_doctrine = doctrine_spirits }
	if = { limit = { NOT = { has_doctrine = doctrine_demigods } } add_doctrine = doctrine_demigods }
}

md_set_doctrine_ditheistic = {
	if = { limit = { has_doctrine = doctrine_agnostic } remove_doctrine = doctrine_agnostic }
	if = { limit = { has_doctrine = doctrine_dihenotheistic } remove_doctrine = doctrine_dihenotheistic }
	if = { limit = { has_doctrine = doctrine_henotheistic } remove_doctrine = doctrine_henotheistic }
	if = { limit = { has_doctrine = doctrine_kathenotheistic } remove_doctrine = doctrine_kathenotheistic }
	if = { limit = { has_doctrine = doctrine_monotheist } remove_doctrine = doctrine_monotheist }
	if = { limit = { has_doctrine = doctrine_polytheist } remove_doctrine = doctrine_polytheist }
	if = { limit = { has_doctrine = doctrine_trihenotheistic } remove_doctrine = doctrine_trihenotheistic }
	if = { limit = { has_doctrine = doctrine_tritheistic } remove_doctrine = doctrine_tritheistic }
	if = { limit = { NOT = { has_doctrine = doctrine_ditheistic } } add_doctrine = doctrine_ditheistic }
}

md_set_doctrine_divine_guidance_none = {
	if = { limit = { has_doctrine = doctrine_anointed_deliverer } remove_doctrine = doctrine_anointed_deliverer }
	if = { limit = { has_doctrine = doctrine_avatars } remove_doctrine = doctrine_avatars }
	if = { limit = { has_doctrine = doctrine_enlightened_monks } remove_doctrine = doctrine_enlightened_monks }
	if = { limit = { has_doctrine = doctrine_gurus } remove_doctrine = doctrine_gurus }
	if = { limit = { has_doctrine = doctrine_prophets } remove_doctrine = doctrine_prophets }
	if = { limit = { NOT = { has_doctrine = doctrine_divine_guidance_none } } add_doctrine = doctrine_divine_guidance_none }
}

md_set_doctrine_divorce_allowed = {
	if = { limit = { has_doctrine = doctrine_divorce_approval } remove_doctrine = doctrine_divorce_approval }
	if = { limit = { has_doctrine = doctrine_divorce_disallowed } remove_doctrine = doctrine_divorce_disallowed }
	if = { limit = { NOT = { has_doctrine = doctrine_divorce_allowed } } add_doctrine = doctrine_divorce_allowed }
}

md_set_doctrine_divorce_approval = {
	if = { limit = { has_doctrine = doctrine_divorce_allowed } remove_doctrine = doctrine_divorce_allowed }
	if = { limit = { has_doctrine = doctrine_divorce_disallowed } remove_doctrine = doctrine_divorce_disallowed }
	if = { limit = { NOT = { has_doctrine = doctrine_divorce_approval } } add_doctrine = doctrine_divorce_approval }
}

md_set_doctrine_divorce_disallowed = {
	if = { limit = { has_doctrine = doctrine_divorce_allowed } remove_doctrine = doctrine_divorce_allowed }
	if = { limit = { has_doctrine = doctrine_divorce_approval } remove_doctrine = doctrine_divorce_approval }
	if = { limit = { NOT = { has_doctrine = doctrine_divorce_disallowed } } add_doctrine = doctrine_divorce_disallowed }
}

md_set_doctrine_dualistic = {
	if = { limit = { has_doctrine = doctrine_chaos_into_world } remove_doctrine = doctrine_chaos_into_world }
	if = { limit = { has_doctrine = doctrine_cyclic } remove_doctrine = doctrine_cyclic }
	if = { limit = { has_doctrine = doctrine_eternal } remove_doctrine = doctrine_eternal }
	if = { limit = { has_doctrine = doctrine_theistic_creation } remove_doctrine = doctrine_theistic_creation }
	if = { limit = { NOT = { has_doctrine = doctrine_dualistic } } add_doctrine = doctrine_dualistic }
}

md_set_doctrine_encouraged_alms = {
	if = { limit = { has_doctrine = doctrine_almsgiving_none } remove_doctrine = doctrine_almsgiving_none }
	if = { limit = { has_doctrine = doctrine_mandatory_alms } remove_doctrine = doctrine_mandatory_alms }
	if = { limit = { NOT = { has_doctrine = doctrine_encouraged_alms } } add_doctrine = doctrine_encouraged_alms }
}

md_set_doctrine_encouraged_atone = {
	if = { limit = { has_doctrine = doctrine_atonement_none } remove_doctrine = doctrine_atonement_none }
	if = { limit = { has_doctrine = doctrine_mandatory_atone } remove_doctrine = doctrine_mandatory_atone }
	if = { limit = { NOT = { has_doctrine = doctrine_encouraged_atone } } add_doctrine = doctrine_encouraged_atone }
}

md_set_doctrine_enlightened_monks = {
	if = { limit = { has_doctrine = doctrine_anointed_deliverer } remove_doctrine = doctrine_anointed_deliverer }
	if = { limit = { has_doctrine = doctrine_avatars } remove_doctrine = doctrine_avatars }
	if = { limit = { has_doctrine = doctrine_divine_guidance_none } remove_doctrine = doctrine_divine_guidance_none }
	if = { limit = { has_doctrine = doctrine_gurus } remove_doctrine = doctrine_gurus }
	if = { limit = { has_doctrine = doctrine_prophets } remove_doctrine = doctrine_prophets }
	if = { limit = { NOT = { has_doctrine = doctrine_enlightened_monks } } add_doctrine = doctrine_enlightened_monks }
}

md_set_doctrine_eschatology_none = {
	if = { limit = { has_doctrine = doctrine_apocalypse } remove_doctrine = doctrine_apocalypse }
	if = { limit = { has_doctrine = doctrine_judgement_day } remove_doctrine = doctrine_judgement_day }
	if = { limit = { has_doctrine = doctrine_promised_deliverer } remove_doctrine = doctrine_promised_deliverer }
	if = { limit = { NOT = { has_doctrine = doctrine_eschatology_none } } add_doctrine = doctrine_eschatology_none }
}

md_set_doctrine_eternal = {
	if = { limit = { has_doctrine = doctrine_chaos_into_world } remove_doctrine = doctrine_chaos_into_world }
	if = { limit = { has_doctrine = doctrine_cyclic } remove_doctrine = doctrine_cyclic }
	if = { limit = { has_doctrine = doctrine_dualistic } remove_doctrine = doctrine_dualistic }
	if = { limit = { has_doctrine = doctrine_theistic_creation } remove_doctrine = doctrine_theistic_creation }
	if = { limit = { NOT = { has_doctrine = doctrine_eternal } } add_doctrine = doctrine_eternal }
}

md_set_doctrine_eternal_feast = {
	if = { limit = { has_doctrine = doctrine_paradise } remove_doctrine = doctrine_paradise }
	if = { limit = { has_doctrine = doctrine_paradise_and_underworld } remove_doctrine = doctrine_paradise_and_underworld }
	if = { limit = { has_doctrine = doctrine_underworld } remove_doctrine = doctrine_underworld }
	if = { limit = { NOT = { has_doctrine = doctrine_eternal_feast } } add_doctrine = doctrine_eternal_feast }
}

md_set_doctrine_ethereal = {
	if = { limit = { has_doctrine = doctrine_aeonic } remove_doctrine = doctrine_aeonic }
	if = { limit = { has_doctrine = doctrine_ethereal_immortal } remove_doctrine = doctrine_ethereal_immortal }
	if = { limit = { has_doctrine = doctrine_immortal } remove_doctrine = doctrine_immortal }
	if = { limit = { has_doctrine = doctrine_personal } remove_doctrine = doctrine_personal }
	if = { limit = { has_doctrine = doctrine_spiritual } remove_doctrine = doctrine_spiritual }
	if = { limit = { NOT = { has_doctrine = doctrine_ethereal } } add_doctrine = doctrine_ethereal }
}

md_set_doctrine_ethereal_immortal = {
	if = { limit = { has_doctrine = doctrine_aeonic } remove_doctrine = doctrine_aeonic }
	if = { limit = { has_doctrine = doctrine_ethereal } remove_doctrine = doctrine_ethereal }
	if = { limit = { has_doctrine = doctrine_immortal } remove_doctrine = doctrine_immortal }
	if = { limit = { has_doctrine = doctrine_personal } remove_doctrine = doctrine_personal }
	if = { limit = { has_doctrine = doctrine_spiritual } remove_doctrine = doctrine_spiritual }
	if = { limit = { NOT = { has_doctrine = doctrine_ethereal_immortal } } add_doctrine = doctrine_ethereal_immortal }
}

md_set_doctrine_gurus = {
	if = { limit = { has_doctrine = doctrine_anointed_deliverer } remove_doctrine = doctrine_anointed_deliverer }
	if = { limit = { has_doctrine = doctrine_avatars } remove_doctrine = doctrine_avatars }
	if = { limit = { has_doctrine = doctrine_divine_guidance_none } remove_doctrine = doctrine_divine_guidance_none }
	if = { limit = { has_doctrine = doctrine_enlightened_monks } remove_doctrine = doctrine_enlightened_monks }
	if = { limit = { has_doctrine = doctrine_prophets } remove_doctrine = doctrine_prophets }
	if = { limit = { NOT = { has_doctrine = doctrine_gurus } } add_doctrine = doctrine_gurus }
}

md_set_doctrine_henotheistic = {
	if = { limit = { has_doctrine = doctrine_agnostic } remove_doctrine = doctrine_agnostic }
	if = { limit = { has_doctrine = doctrine_dihenotheistic } remove_doctrine = doctrine_dihenotheistic }
	if = { limit = { has_doctrine = doctrine_ditheistic } remove_doctrine = doctrine_ditheistic }
	if = { limit = { has_doctrine = doctrine_kathenotheistic } remove_doctrine = doctrine_kathenotheistic }
	if = { limit = { has_doctrine = doctrine_monotheist } remove_doctrine = doctrine_monotheist }
	if = { limit = { has_doctrine = doctrine_polytheist } remove_doctrine = doctrine_polytheist }
	if = { limit = { has_doctrine = doctrine_trihenotheistic } remove_doctrine = doctrine_trihenotheistic }
	if = { limit = { has_doctrine = doctrine_tritheistic } remove_doctrine = doctrine_tritheistic }
	if = { limit = { NOT = { has_doctrine = doctrine_henotheistic } } add_doctrine = doctrine_henotheistic }
}

md_set_doctrine_immortal = {
	if = { limit = { has_doctrine = doctrine_aeonic } remove_doctrine = doctrine_aeonic }
	if = { limit = { has_doctrine = doctrine_ethereal } remove_doctrine = doctrine_ethereal }
	if = { limit = { has_doctrine = doctrine_ethereal_immortal } remove_doctrine = doctrine_ethereal_immortal }
	if = { limit = { has_doctrine = doctrine_personal } remove_doctrine = doctrine_personal }
	if = { limit = { has_doctrine = doctrine_spiritual } remove_doctrine = doctrine_spiritual }
	if = { limit = { NOT = { has_doctrine = doctrine_immortal } } add_doctrine = doctrine_immortal }
}

md_set_doctrine_judgement_day = {
	if = { limit = { has_doctrine = doctrine_apocalypse } remove_doctrine = doctrine_apocalypse }
	if = { limit = { has_doctrine = doctrine_eschatology_none } remove_doctrine = doctrine_eschatology_none }
	if = { limit = { has_doctrine = doctrine_promised_deliverer } remove_doctrine = doctrine_promised_deliverer }
	if = { limit = { NOT = { has_doctrine = doctrine_judgement_day } } add_doctrine = doctrine_judgement_day }
}

md_set_doctrine_kathenotheistic = {
	if = { limit = { has_doctrine = doctrine_agnostic } remove_doctrine = doctrine_agnostic }
	if = { limit = { has_doctrine = doctrine_dihenotheistic } remove_doctrine = doctrine_dihenotheistic }
	if = { limit = { has_doctrine = doctrine_ditheistic } remove_doctrine = doctrine_ditheistic }
	if = { limit = { has_doctrine = doctrine_henotheistic } remove_doctrine = doctrine_henotheistic }
	if = { limit = { has_doctrine = doctrine_monotheist } remove_doctrine = doctrine_monotheist }
	if = { limit = { has_doctrine = doctrine_polytheist } remove_doctrine = doctrine_polytheist }
	if = { limit = { has_doctrine = doctrine_trihenotheistic } remove_doctrine = doctrine_trihenotheistic }
	if = { limit = { has_doctrine = doctrine_tritheistic } remove_doctrine = doctrine_tritheistic }
	if = { limit = { NOT = { has_doctrine = doctrine_kathenotheistic } } add_doctrine = doctrine_kathenotheistic }
}

md_set_doctrine_mandatory_alms = {
	if = { limit = { has_doctrine = doctrine_almsgiving_none } remove_doctrine = doctrine_almsgiving_none }
	if = { limit = { has_doctrine = doctrine_encouraged_alms } remove_doctrine = doctrine_encouraged_alms }
	if = { limit = { NOT = { has_doctrine = doctrine_mandatory_alms } } add_doctrine = doctrine_mandatory_alms }
}

md_set_doctrine_mandatory_atone = {
	if = { limit = { has_doctrine = doctrine_atonement_none } remove_doctrine = doctrine_atonement_none }
	if = { limit = { has_doctrine = doctrine_encouraged_atone } remove_doctrine = doctrine_encouraged_atone }
	if = { limit = { NOT = { has_doctrine = doctrine_mandatory_atone } } add_doctrine = doctrine_mandatory_atone }
}

md_set_doctrine_monogamy = {
	if = { limit = { has_doctrine = doctrine_bigamy } remove_doctrine = doctrine_bigamy }
	if = { limit = { has_doctrine = doctrine_concubines } remove_doctrine = doctrine_concubines }
	if = { limit = { has_doctrine = doctrine_polygamy } remove_doctrine = doctrine_polygamy }
	if = { limit = { has_doctrine = doctrine_trigamy } remove_doctrine = doctrine_trigamy }
	if = { limit = { NOT = { has_doctrine = doctrine_monogamy } } add_doctrine = doctrine_monogamy }
}

md_set_doctrine_monotheist = {
	if = { limit = { has_doctrine = doctrine_agnostic } remove_doctrine = doctrine_agnostic }
	if = { limit = { has_doctrine = doctrine_dihenotheistic } remove_doctrine = doctrine_dihenotheistic }
	if = { limit = { has_doctrine = doctrine_ditheistic } remove_doctrine = doctrine_ditheistic }
	if = { limit = { has_doctrine = doctrine_henotheistic } remove_doctrine = doctrine_henotheistic }
	if = { limit = { has_doctrine = doctrine_kathenotheistic } remove_doctrine = doctrine_kathenotheistic }
	if = { limit = { has_doctrine = doctrine_polytheist } remove_doctrine = doctrine_polytheist }
	if = { limit = { has_doctrine = doctrine_trihenotheistic } remove_doctrine = doctrine_trihenotheistic }
	if = { limit = { has_doctrine = doctrine_tritheistic } remove_doctrine = doctrine_tritheistic }
	if = { limit = { NOT = { has_doctrine = doctrine_monotheist } } add_doctrine = doctrine_monotheist }
}

md_set_doctrine_none_marriage = {
	if = { limit = { has_doctrine = doctrine_sacred_marriage } remove_doctrine = doctrine_sacred_marriage }
	if = { limit = { has_doctrine = doctrine_worldly_marriage } remove_doctrine = doctrine_worldly_marriage }
	if = { limit = { NOT = { has_doctrine = doctrine_none_marriage } } add_doctrine = doctrine_none_marriage }
}

md_set_doctrine_obligatory = {
	if = { limit = { has_doctrine = doctrine_autonomous } remove_doctrine = doctrine_autonomous }
	if = { limit = { has_doctrine = doctrine_paramount } remove_doctrine = doctrine_paramount }
	if = { limit = { has_doctrine = doctrine_recommended } remove_doctrine = doctrine_recommended }
	if = { limit = { NOT = { has_doctrine = doctrine_obligatory } } add_doctrine = doctrine_obligatory }
}

md_set_doctrine_paradise = {
	if = { limit = { has_doctrine = doctrine_eternal_feast } remove_doctrine = doctrine_eternal_feast }
	if = { limit = { has_doctrine = doctrine_paradise_and_underworld } remove_doctrine = doctrine_paradise_and_underworld }
	if = { limit = { has_doctrine = doctrine_underworld } remove_doctrine = doctrine_underworld }
	if = { limit = { NOT = { has_doctrine = doctrine_paradise } } add_doctrine = doctrine_paradise }
}

md_set_doctrine_paradise_and_underworld = {
	if = { limit = { has_doctrine = doctrine_eternal_feast } remove_doctrine = doctrine_eternal_feast }
	if = { limit = { has_doctrine = doctrine_paradise } remove_doctrine = doctrine_paradise }
	if = { limit = { has_doctrine = doctrine_underworld } remove_doctrine = doctrine_underworld }
	if = { limit = { NOT = { has_doctrine = doctrine_paradise_and_underworld } } add_doctrine = doctrine_paradise_and_underworld }
}

md_set_doctrine_paramount = {
	if = { limit = { has_doctrine = doctrine_autonomous } remove_doctrine = doctrine_autonomous }
	if = { limit = { has_doctrine = doctrine_obligatory } remove_doctrine = doctrine_obligatory }
	if = { limit = { has_doctrine = doctrine_recommended } remove_doctrine = doctrine_recommended }
	if = { limit = { NOT = { has_doctrine = doctrine_paramount } } add_doctrine = doctrine_paramount }
}

md_set_doctrine_personal = {
	if = { limit = { has_doctrine = doctrine_aeonic } remove_doctrine = doctrine_aeonic }
	if = { limit = { has_doctrine = doctrine_ethereal } remove_doctrine = doctrine_ethereal }
	if = { limit = { has_doctrine = doctrine_ethereal_immortal } remove_doctrine = doctrine_ethereal_immortal }
	if = { limit = { has_doctrine = doctrine_immortal } remove_doctrine = doctrine_immortal }
	if = { limit = { has_doctrine = doctrine_spiritual } remove_doctrine = doctrine_spiritual }
	if = { limit = { NOT = { has_doctrine = doctrine_personal } } add_doctrine = doctrine_personal }
}

md_set_doctrine_polygamy = {
	if = { limit = { has_doctrine = doctrine_bigamy } remove_doctrine = doctrine_bigamy }
	if = { limit = { has_doctrine = doctrine_concubines } remove_doctrine = doctrine_concubines }
	if = { limit = { has_doctrine = doctrine_monogamy } remove_doctrine = doctrine_monogamy }
	if = { limit = { has_doctrine = doctrine_trigamy } remove_doctrine = doctrine_trigamy }
	if = { limit = { NOT = { has_doctrine = doctrine_polygamy } } add_doctrine = doctrine_polygamy }
}

md_set_doctrine_polytheist = {
	if = { limit = { has_doctrine = doctrine_agnostic } remove_doctrine = doctrine_agnostic }
	if = { limit = { has_doctrine = doctrine_dihenotheistic } remove_doctrine = doctrine_dihenotheistic }
	if = { limit = { has_doctrine = doctrine_ditheistic } remove_doctrine = doctrine_ditheistic }
	if = { limit = { has_doctrine = doctrine_henotheistic } remove_doctrine = doctrine_henotheistic }
	if = { limit = { has_doctrine = doctrine_kathenotheistic } remove_doctrine = doctrine_kathenotheistic }
	if = { limit = { has_doctrine = doctrine_monotheist } remove_doctrine = doctrine_monotheist }
	if = { limit = { has_doctrine = doctrine_trihenotheistic } remove_doctrine = doctrine_trihenotheistic }
	if = { limit = { has_doctrine = doctrine_tritheistic } remove_doctrine = doctrine_tritheistic }
	if = { limit = { NOT = { has_doctrine = doctrine_polytheist } } add_doctrine = doctrine_polytheist }
}

md_set_doctrine_promised_deliverer = {
	if = { limit = { has_doctrine = doctrine_apocalypse } remove_doctrine = doctrine_apocalypse }
	if = { limit = { has_doctrine = doctrine_eschatology_none } remove_doctrine = doctrine_eschatology_none }
	if = { limit = { has_doctrine = doctrine_judgement_day } remove_doctrine = doctrine_judgement_day }
	if = { limit = { NOT = { has_doctrine = doctrine_promised_deliverer } } add_doctrine = doctrine_promised_deliverer }
}

md_set_doctrine_prophets = {
	if = { limit = { has_doctrine = doctrine_anointed_deliverer } remove_doctrine = doctrine_anointed_deliverer }
	if = { limit = { has_doctrine = doctrine_avatars } remove_doctrine = doctrine_avatars }
	if = { limit = { has_doctrine = doctrine_divine_guidance_none } remove_doctrine = doctrine_divine_guidance_none }
	if = { limit = { has_doctrine = doctrine_enlightened_monks } remove_doctrine = doctrine_enlightened_monks }
	if = { limit = { has_doctrine = doctrine_gurus } remove_doctrine = doctrine_gurus }
	if = { limit = { NOT = { has_doctrine = doctrine_prophets } } add_doctrine = doctrine_prophets }
}

md_set_doctrine_recommended = {
	if = { limit = { has_doctrine = doctrine_autonomous } remove_doctrine = doctrine_autonomous }
	if = { limit = { has_doctrine = doctrine_obligatory } remove_doctrine = doctrine_obligatory }
	if = { limit = { has_doctrine = doctrine_paramount } remove_doctrine = doctrine_paramount }
	if = { limit = { NOT = { has_doctrine = doctrine_recommended } } add_doctrine = doctrine_recommended }
}

md_set_doctrine_sacred_marriage = {
	if = { limit = { has_doctrine = doctrine_none_marriage } remove_doctrine = doctrine_none_marriage }
	if = { limit = { has_doctrine = doctrine_worldly_marriage } remove_doctrine = doctrine_worldly_marriage }
	if = { limit = { NOT = { has_doctrine = doctrine_sacred_marriage } } add_doctrine = doctrine_sacred_marriage }
}

md_set_doctrine_spirits = {
	if = { limit = { has_doctrine = doctrine_archangels } remove_doctrine = doctrine_archangels }
	if = { limit = { has_doctrine = doctrine_aspects } remove_doctrine = doctrine_aspects }
	if = { limit = { has_doctrine = doctrine_deities_none } remove_doctrine = doctrine_deities_none }
	if = { limit = { has_doctrine = doctrine_demigods } remove_doctrine = doctrine_demigods }
	if = { limit = { NOT = { has_doctrine = doctrine_spirits } } add_doctrine = doctrine_spirits }
}

md_set_doctrine_spiritual = {
	if = { limit = { has_doctrine = doctrine_aeonic } remove_doctrine = doctrine_aeonic }
	if = { limit = { has_doctrine = doctrine_ethereal } remove_doctrine = doctrine_ethereal }
	if = { limit = { has_doctrine = doctrine_ethereal_immortal } remove_doctrine = doctrine_ethereal_immortal }
	if = { limit = { has_doctrine = doctrine_immortal } remove_doctrine = doctrine_immortal }
	if = { limit = { has_doctrine = doctrine_personal } remove_doctrine = doctrine_personal }
	if = { limit = { NOT = { has_doctrine = doctrine_spiritual } } add_doctrine = doctrine_spiritual }
}

md_set_doctrine_theistic_creation = {
	if = { limit = { has_doctrine = doctrine_chaos_into_world } remove_doctrine = doctrine_chaos_into_world }
	if = { limit = { has_doctrine = doctrine_cyclic } remove_doctrine = doctrine_cyclic }
	if = { limit = { has_doctrine = doctrine_dualistic } remove_doctrine = doctrine_dualistic }
	if = { limit = { has_doctrine = doctrine_eternal } remove_doctrine = doctrine_eternal }
	if = { limit = { NOT = { has_doctrine = doctrine_theistic_creation } } add_doctrine = doctrine_theistic_creation }
}

md_set_doctrine_tritheistic = {
	if = { limit = { has_doctrine = doctrine_agnostic } remove_doctrine = doctrine_agnostic }
	if = { limit = { has_doctrine = doctrine_dihenotheistic } remove_doctrine = doctrine_dihenotheistic }
	if = { limit = { has_doctrine = doctrine_ditheistic } remove_doctrine = doctrine_ditheistic }
	if = { limit = { has_doctrine = doctrine_henotheistic } remove_doctrine = doctrine_henotheistic }
	if = { limit = { has_doctrine = doctrine_kathenotheistic } remove_doctrine = doctrine_kathenotheistic }
	if = { limit = { has_doctrine = doctrine_monotheist } remove_doctrine = doctrine_monotheist }
	if = { limit = { has_doctrine = doctrine_polytheist } remove_doctrine = doctrine_polytheist }
	if = { limit = { has_doctrine = doctrine_trihenotheistic } remove_doctrine = doctrine_trihenotheistic }
	if = { limit = { NOT = { has_doctrine = doctrine_tritheistic } } add_doctrine = doctrine_tritheistic }
}

md_set_doctrine_underworld = {
	if = { limit = { has_doctrine = doctrine_eternal_feast } remove_doctrine = doctrine_eternal_feast }
	if = { limit = { has_doctrine = doctrine_paradise } remove_doctrine = doctrine_paradise }
	if = { limit = { has_doctrine = doctrine_paradise_and_underworld } remove_doctrine = doctrine_paradise_and_underworld }
	if = { limit = { NOT = { has_doctrine = doctrine_underworld } } add_doctrine = doctrine_underworld }
}

md_set_doctrine_worldly_marriage = {
	if = { limit = { has_doctrine = doctrine_none_marriage } remove_doctrine = doctrine_none_marriage }
	if = { limit = { has_doctrine = doctrine_sacred_marriage } remove_doctrine = doctrine_sacred_marriage }
	if = { limit = { NOT = { has_doctrine = doctrine_worldly_marriage } } add_doctrine = doctrine_worldly_marriage }
}
