decisions = {
	sayyidfb_forge = {
		# Make it high priority
		is_high_prio = yes
		
		# AI checking cycle every 3 months
		ai_check_interval = 3
		
		# Conditions to show the forge decision
		potential = {
			# Check if they have sword of islam
			has_dlc = "The Sword of Islam"
			
			# Check if not AI or game rule allows AI to use this decision
			sayyidfb_access = yes
			
			# Check if the character doesn't own a forged sayyid bloodline
			sayyidfb_bloodline = yes
			
			# Only show for male muslims without sayyid trait
			sayyidfb_muslim = yes
			
			# Has not abandoned this before
			#NOT = { has_character_modifier = found_sayyid_lineage_abandon }
			
			# Has not failed
			#NOT = { has_character_modifier = found_sayyid_lineage_slandered_the_prophet_worse }
			#NOT = { has_character_modifier = found_sayyid_lineage_slandered_the_prophet }
			
			# Is not currently doing
			#NOT = { has_character_modifier = found_sayyid_lineage_good }
			#NOT = { has_character_modifier = found_sayyid_lineage_bad }
			
			# No Children
			#age = 16
			
			# Must Be Capable
			#capable_only = yes
			
			# No Prisoners
			#prisoner = no
			
			# Peace
			#war = no
		}
		
		# Conditions to allow to forge the sayyid trait and bloodline
		allow = {
			# 2k piety or 1k if Emperor
			OR = {
				piety = 2000
				AND = {
					primary_title = {
						higher_tier_than = KING
					}
					piety = 1000
				}
			}
			# 10k prestige or 5k if emperor
			OR = {
				prestige = 10000
				AND = {
					primary_title = {
						higher_tier_than = KING
					}
					prestige = 5000
				}
			}
		}
		
		effect = {
			narrative_event = {
				id = SAYYIDSUBMOD.1
				days = 1
			}		
		}
		
		ai_will_do = {
			factor = 1
			
			# If zealous
			modifier = {
				factor = 2.0
				trait = zealous
			}
			
			# If cynical
			modifier = {
				factor = 0
				trait = cynical
			}
			
			# If AI zeal is low
			modifier = {
				factor = 1.25
				ai_zeal = 25
			}
			
			# If AI zeal is medium
			modifier = {
				factor = 1.75
				ai_zeal = 50
			}
			
			# If AI zeal is high
			modifier = {
				factor = 2.5
				ai_zeal = 75
			}
		}
	}
}