#special decisions to create the religious heads for the new Better Gender Law heresies

decisions = {
	create_lilithian_papacy = {
		
		is_high_prio = yes
	
		potential = {
			religion = lilithian
			NOT = { is_title_active = d_lilithian }
			#has_dlc = "Sons of Abraham"
		}
		
		allow = {
			piety = 1000
			OR = {
				owns = 802 # Alexandria
				any_realm_lord = {
					owns = 802
				}
			}
		}
		
		effect = {
			activate_title = { title = d_lilithian status = yes }
			hidden_tooltip = {
				create_random_priest = {
					dynasty = none
					female = yes
					random_traits = no
					culture = ROOT
					religion = ROOT
					age = 26
					attributes = {
						martial = 3
						diplomacy = 8
						stewardship = 6
						intrigue = 4
						learning = 5
					}
					health = 6
					fertility = 0.5
					trait = mastermind_theologian
					trait = fair
					trait = strong
					trait = diligent
					trait = kind
					trait = content
					trait = zealous
				}
				new_character = {
					d_lilithian = {
						grant_title = PREV
					}
					wealth = 500
					piety = 150
					prestige = 50
					opinion = {
						who = ROOT
						modifier = opinion_creator_of_rel_heal
					}
				}
				
				religion_authority = {
					modifier = papacy_instituted
					years = 20
				}
			}
			piety = 1000
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
		}
	}
	
	restore_lilithian_pope_in_alexandria = {
	
		is_high_prio = yes
	
		potential = {
			is_playable = yes
			independent = yes
			#has_dlc = "Sons of Abraham"
			
			OR = {
				religion = lilithian
				is_title_active = d_lilithian
			}
			
			controls_religion = no
			
			b_alexandria = {
				holder_scope = {
					OR = {
						character = ROOT
						is_liege_or_above = ROOT
					}
					ROOT = { religion = lilithian }
					d_lilithian = {
						holder_scope = {
							NOT = { character = PREVPREV }
							NOT = { is_vassal_or_below = PREVPREV }
						}
					}
				}
			}
		}
		
		effect = {
			piety = 1000
			
			d_lilithian = {
				holder_scope = {
					b_alexandria = {
						grant_title = PREV
					}
					opinion = {
						who = ROOT
						modifier = opinion_restored_to_alexandria
					}
				}
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
		}
	}
	
	create_maryite_matriarchy = {
		
		is_high_prio = yes
	
		potential = {
			is_playable = yes
			religion = maryite
			NOT = { is_title_active = d_maryite }
			#has_dlc = "Sons of Abraham"
		}
		
		allow = {
			independent = yes
			war = no
		}
		
		effect = {
			activate_title = { title = d_maryite status = yes }
			hidden_tooltip = {
				create_random_priest = {
					dynasty = none
					female = yes
					random_traits = no
					culture = ROOT
					religion = ROOT
					age = 40
					attributes = {
						martial = 5
						diplomacy = 12
						stewardship = 2
						intrigue = 1
						learning = 6
					}
					health = 6
					fertility = 0.5
					trait = mastermind_theologian
					trait = charitable
					trait = strong
					trait = chaste
					trait = trusting
					trait = humble
					trait = zealous
				}
				new_character = {
					d_maryite = {
						grant_title = PREV
					}
					wealth = 500
					piety = 150
					prestige = 50
				}
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
		}
	}
}