decisions = {
	convert_to_harem_religion = {
		potential = {
			ai = no
			NOT = { religion_group = harem_group }
			OR = {
				trait = harem_lover
				OR = {
					any_spouse = {
						religion = harem
						hidden_tooltip = {
							is_alive = yes
						}
					}
					any_consort = {
						religion = harem
						hidden_tooltip = {
							is_alive = yes
						}
					}
				}
			}
		}
		allow = {
			#Conditions for the decision to be enabled
		}
		effect = {
			#Commands executed when taking the decision
			prestige = -50
			if = {
				limit = { higher_tier_than = BARON }
				religion_authority = {
					modifier = ruler_converted_from
				}
			}
			religion = harem
			if = {
				limit = { higher_tier_than = BARON }
				hidden_tooltip = {
					religion_authority = {
						modifier = ruler_converted_to
					}
				}
			}
			piety = 200
		}
		revoke_allowed = {
			always = no #Not used in vanilla
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	become_harem_lover = {
		potential = {
			#Conditions for the decision to appear
			NOT = { religion_group = harem_group }
			NOT = { trait = harem_lover }
		}
		allow = {
			#Conditions for the decision to be enabled
		}
		effect = {
			#Commands executed when taking the decision
			add_trait = harem_lover
			piety = -10
		}
		revoke_allowed = {
			always = no #Not used in vanilla
		}
		ai_will_do = {
			factor = 0
		}
	}
	
	# Host a Harem Rally
	harem_rally = {
		potential = {
			ai = no
			is_ruler = yes
			
			prisoner = no
			
			OR = {
				religion_group = harem_group
				trait = harem_lover
			}
			
			NOT = {
				has_character_modifier = hosting_harem_rally
			}
			NOT = {
				liege = {
					has_character_modifier = hosting_harem_rally
				}
			}			
			num_of_vassals = 1
			NOT = { has_character_flag = do_not_disturb }
		}
		allow = {
			war = no
			any_demesne_title = {
				is_occupied = no
			}
			prisoner = no
			NOT = { trait = in_hiding }
			wealth = 25
			month = 1
			NOT = {
				month = 4
			}
		}
		effect = {
			wealth = -25
			add_character_modifier = {
				name = hosting_harem_rally
				duration = 45
			}
			capital_scope = {
				add_province_modifier = {
					name = harem_rally_province
					duration = 45
				}
			}
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = harem.10999 days = 45 } } # Safety catch flag clearing
			
			hidden_tooltip = {
				character_event = {
					id = harem.10001
					days = 14
				}
				
				character_event = { 
					id = harem.10000
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 200
				}
			}
			modifier = {
				factor = 0
				trait = shy
			}
			modifier = {
				factor = 0
				NOT = { diplomacy = 10 }
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}
}
