﻿#CFP compatch
#Edited to deal with Christian beards for new religions. This is from CFP itself.

# Make sure the weights here match up best as possible with the custom_beards set
cfp_beards = {

	usage = game

    selection_behavior = weighted_random

    cfp_has_no_beard = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = beards
                template = no_beard
                range = { 0 1 } # For the randomness to work correctly
            }
        }   
        weight = {
            base = 0
            modifier = {
                add = 101
                exists = this
				AND ={
					OR = {
						religion = religion:buddhism_religion
						religion = religion:bon_religion
					}
					OR = {
						is_theocratic_lessee = yes
						AND = { is_ruler = yes government_has_flag = government_is_theocracy }
						has_council_position = councillor_court_chaplain
						portrait_has_trait_trigger = { TRAIT = devoted }
					}
				}
            }
			
            modifier = {
                add = 101 # catholics are shaved
                exists = this
				AND ={
					religion = religion:christianity_religion
					NOR = {
						
						faith = faith:messalian
						faith = faith:bogomilist
						faith = faith:paulician
						faith = faith:nestorian
						
						#Orthodox Faiths
						faith = faith:orthodox
						faith = faith:melkite
						faith = faith:alexandrian_melkite
						faith = faith:jerusalem_melkite
						faith = faith:irenopolis_melkite
						faith = faith:romagyris_melkite
						#Oriental Faiths
						faith = faith:armenian_apostolic
						faith = faith:albanian_apostolic
						faith = faith:coptic
						faith = faith:jacobite
						faith = faith:maphrianate
						faith = faith:nubian_orthodox
						faith = faith:ethiopian_orthodox
						#Autocephalous Faiths
						faith = faith:baltic_orthodox
						faith = faith:bulgarian_orthodox
						faith = faith:cyprus_orthodox
						faith = faith:georgian_orthodox
						faith = faith:finnish_orthodox
						faith = faith:serbian_orthodox
						#faith = faith:russian_orthodox
						faith = faith:slavic_orthodox #Deprecated
						faith = faith:vlach_orthodox
					
					}
					OR = {
						is_theocratic_lessee = yes
						AND = { is_ruler = yes government_has_flag = government_is_theocracy }
						has_council_position = councillor_court_chaplain
						portrait_has_trait_trigger = { TRAIT = devoted }
					}
				}
            }
        }
    }

}
