#Embrace Everpreg
embrace_everpreg_decision_1 = {
	ai_check_interval = 0
	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
	desc = embrace_everpreg_decision_1_desc
	selection_tooltip = embrace_everpreg_decision_1_tooltip

	is_shown = {
		debug_only = yes
		age >= 18
		NOR = {
			has_trait = everpreg_1
			has_trait = everpreg_2
			has_trait = everpreg_3
			is_female = no
			is_ai = yes
		}
	}

	is_valid = {
		age >= 18
		NOR = {
			has_trait = everpreg_1
			has_trait = everpreg_2
			has_trait = everpreg_3
			is_female = no
			is_ai = yes
		}
	}

	effect = {
		add_trait = everpreg_1
		add_gold = 1000
		#set_immortal_age = 18
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}

embrace_everpreg_decision_2 = {
	ai_check_interval = 0
	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
	desc = embrace_everpreg_decision_2_desc
	selection_tooltip = embrace_everpreg_decision_2_tooltip

	is_shown = {
		debug_only = yes
		has_trait = everpreg_1
		age >= 18
		NOR = {
			has_trait = everpreg_2
			has_trait = everpreg_3
			is_female = no
			is_ai = yes
		}
	}

	is_valid = {
		age >= 18
		has_trait = everpreg_1
		NOR = {
			has_trait = everpreg_2
			has_trait = everpreg_3
			is_female = no
			is_ai = yes
		}
	}

	effect = {
		remove_trait = everpreg_1
		add_trait = everpreg_2
		#set_immortal_age = 18
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}

embrace_everpreg_decision_3 = {
	ai_check_interval = 0
	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
	desc = embrace_everpreg_decision_3_desc
	selection_tooltip = embrace_everpreg_decision_3_tooltip

	is_shown = {
		debug_only = yes
		has_trait = everpreg_2
		age >= 18
		NOR = {
			is_female = no
			has_trait = everpreg_1
			has_trait = everpreg_3
			is_ai = yes
		}
	}

	is_valid = {
		has_trait = everpreg_2
		age >= 18
		NOR = {
			#has_trait = everpreg_1
			#has_trait = everpreg_3
			is_female = no
			is_ai = yes
		}
	}

	effect = {
		remove_trait = everpreg_2
		add_trait = everpreg_3
		#set_immortal_age = 18
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}

### Cure everpreg
abandon_everpreg_decision = {
	ai_check_interval = 0
	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_misc.dds"
	}
	desc = abandon_everpreg_decision_desc
	selection_tooltip = abandon_everpreg_decision_tooltip

	is_shown = {
		debug_only = yes
		OR = {
			has_trait = everpreg_1
			has_trait = everpreg_2
			has_trait = everpreg_3
		}
	}

	is_valid = {
		OR = {
			has_trait = everpreg_1
			has_trait = everpreg_2
			has_trait = everpreg_3
		}
	}

	effect = {
		remove_trait = everpreg_1
		remove_trait = everpreg_2
		remove_trait = everpreg_3
		# immortal = no
	}

	ai_potential = {
		always = no
	}

	ai_will_do = {
		base = 0
	}
}


###Go on everpreg pilgrimage (how you go up in hpreg rank

###go_on_everpreg_pilgrimage_decision = {
###	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
###	ai_check_interval = 24

###	desc = go_on_everpreg_pilgrimage_decision_desc
###	selection_tooltip = go_on_everpreg_pilgrimage_decision_tooltip

###	cooldown = { years = everpreg_pilgrimage_cooldown_year_amount }

###	is_shown = {
###		#is_landed = yes
###		is_female = yes
###		age >= 18

###		# Also we must have an actual holy site we can visit.
###		faith = {
###			has_doctrine_parameter = tenet_everpreg_holywomb
###			any_holy_site = {
###				exists = this
###			}
###		}
###	}

###	is_valid_showing_failures_only = {
###		is_available_adult = yes
###		#is_at_war = no
###	}

###	effect = {
###		custom_tooltip = pilgrimage_effect_1
###		custom_tooltip = pilgrimage_effect_2
###		if = { #What is the minimum you will have to pay?
###			limit = {
###				faith = {
###					any_holy_site = {
###						squared_distance = {
###							target = root.capital_province
###							value <= short_everpreg_pilgrimage_max_length
###						}
###					}
###				}
###			}
###			custom_tooltip = pilgrimage_effect_3
###		}
###		else_if = {
###			limit = {
###				faith = {
###					any_holy_site = {
###						squared_distance = {
###							target = root.capital_province
###							value <= medium_everpreg_pilgrimage_max_length
###						}
###					}
###				}
###			}
###			custom_tooltip = pilgrimage_effect_4
###		}
###		else_if = {
###			limit = {
###				faith = {
###					any_holy_site = {
###						squared_distance = {
###							target = root.capital_province
###							value <= long_everpreg_pilgrimage_max_length
###						}
###					}
###				}
###			}
###			custom_tooltip = pilgrimage_effect_5
###		}
###		else = {
###			custom_tooltip = pilgrimage_effect_6
###		}
###		if = {
###			limit = { has_trait = ill }
###			custom_tooltip = line_break
###			custom_tooltip = pilgrimage_illness_warning
###		}
###		if = {
###			limit = { is_ai = yes }
###			trigger_event = everpreg_pilgrimage.0999
###		}
###		else = {
###			trigger_event = everpreg_pilgrimage.0001
###		}
###	}

###	ai_potential = {
###		always = yes
###	}

###	ai_will_do = {
###		base = 100
###		#modifier = {
###		#	add = -100
###		#	NOT = { short_term_gold >= everpreg_pilgrimage_medium_extra_cost }
###		#}
###		modifier = {
###			add = 30
###			short_term_gold >= everpreg_pilgrimage_long_extra_cost
###		}
###		modifier = {
###			add = 20
###			piety_level <= 2
###		}
###		modifier = {
###			add = 20
###			has_trait = zealous
###		}
###		modifier = {
###			add = 20
###			has_trait = lustful
###		}
###		modifier = {
###			add = 20
###			has_trait = zealous
###			NOT = { has_trait = pilgrim }
###		}
###		#modifier = {
###		#	add = -30
###		#	has_trait = cynical
###		#}
###		#modifier = {
###		#	add = -30
###		#	has_trait = pilgrim
###		#}
###	}
###}

#########Delve into classics equivalent decision here##########
everpreg_delve_into_the_classics_decision = { #by Someone at Paradox, Reintroduced by Cappuccino James, shamelessly stolen and repurposed by hpreganon.
	picture =  {
		reference = "gfx/interface/illustrations/decisions/everpreg_decision_delveinclassics.dds"
	}
	decision_group_type = major
	desc = everpreg_delve_into_the_classics_decision_desc

	ai_check_interval = 60

	is_shown = {
		#is_ai = no
		is_landed = yes
		age >= 18
		OR = {
			completely_controls = title:c_naxos
			completely_controls = title:c_kerch
			completely_controls = title:c_astrakhan
			completely_controls = title:c_chernigov
			completely_controls = title:c_kholmogory
			completely_controls = title:c_vodi
			completely_controls = title:c_odessa
		}
		#has_title = {
		#	OR = {
		#
		#		de_jure_liege = title:c_naxos
		#		de_jure_liege.de_jure_liege = title:c_naxos
		#		de_jure_liege.de_jure_liege.de_jure_liege = title:c_naxos
		#		de_jure_liege = title:c_kerch
		#		de_jure_liege.de_jure_liege = title:c_kerch
		#		de_jure_liege.de_jure_liege.de_jure_liege = title:c_kerch
		#		de_jure_liege = title:c_astrakhan
		#		de_jure_liege.de_jure_liege = title:c_astrakhan
		#		de_jure_liege.de_jure_liege.de_jure_liege = title:c_astrakhan
		#		de_jure_liege = title:c_chernigov
		#		de_jure_liege.de_jure_liege = title:c_chernigov
		#		de_jure_liege.de_jure_liege.de_jure_liege = title:c_chernigov
		#		de_jure_liege = title:c_kholmogory
		#		de_jure_liege.de_jure_liege = title:c_kholmogory
		#		de_jure_liege.de_jure_liege.de_jure_liege = title:c_kholmogory
		#	}
		#}
		#has_trait = deviant
		NOR = {
			has_religion = religion:everpreg_antideleuvianism_religion
			has_character_modifier = studying_everpreg_classics_religion_modifier
			has_character_modifier = studying_everpreg_classics_war_modifier
			has_character_modifier = studying_everpreg_classics_government_modifier
			has_character_modifier = studying_everpreg_classics_orations_modifier
			has_character_modifier = studied_everpreg_classics_religion_modifier
			has_character_modifier = studied_everpreg_classics_war_modifier
			has_character_modifier = studied_everpreg_classics_government_modifier
			has_character_modifier = studied_everpreg_classics_orations_modifier
		}
	}

	is_valid = {
		is_adult = yes
		is_imprisoned = no
		#diplomacy >= 15
	}

	#cost = {}

	effect = {
		trigger_event = everpreg_classics.001
		save_scope_as = actor
	}

	ai_will_do = {
		base = 05
	}
}



###Awaken Atalantia
embrace_everpregatalantian_culture_decision = {
	picture =  {
		reference = "gfx/interface/illustrations/decisions/everpreg_roman_culture_decision.dds"
	}
	major = yes
	ai_check_interval = 36
	desc = embrace_everpregatalantian_culture_decision_desc

	is_shown = {
			has_religion = religion:everpreg_antideleuvianism_religion

		NOT = {
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:embrace_everpregatalantian_culture_decision
			}
		}
	}

	is_valid = {
			NOT = {
				exists = title:e_everpreg_atalantea_empire.holder
			}
			has_religion = religion:everpreg_antideleuvianism_religion
			completely_controls = title:d_aegean_islands
			completely_controls = title:d_azov
			completely_controls = title:d_khazaria
			completely_controls = title:d_chernigov
			completely_controls = title:d_levedia
			completely_controls = title:d_don_valley
			completely_controls = title:d_yedisan
			completely_controls = title:d_pereyaslavl
			completely_controls = title:d_kiev
			completely_controls = title:d_crimea
			###add these back in after testing.
			prestige_level >= 4
			prestige >= 500
			capital_county = title:c_naxos
	}

	is_valid_showing_failures_only = {
		is_imprisoned = no
		is_available_adult = yes
	}

	cost = {
		gold = 1000
		prestige = 500
	}

	effect = {

		#set_culture = everpreg_atalantean
		#every_close_family_member = { set_culture = everpreg_atalantean }

		add_to_global_variable_list = {
			name = unavailable_unique_decisions
			target = flag:embrace_everpregatalantian_culture_decision
		}
		show_as_tooltip = {
			embrace_everpreg_atalantian_culture_effect = yes
			establish_everpreg_atalantea_empire_effect = yes
		}
		save_scope_as = founder
		#culture = { save_scope_as = founder_former_culture }

		hidden_effect = { # Moved here from embrace_roman_culture_decision
			#Send event to other players
			every_player = {
				limit = {
					NOT = { this = root }
					#is_vassal_of = scope:founder
					#has_religion = religion:everpreg_antideleuvianism_religion
				}
				trigger_event = everpreg_atalantian_culture.1002
			}
		}

		trigger_event = everpreg_atalantian_culture.001
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 30
	}
}





##########
#Become Everpreg Chakravarti
# adopted from the event by Petter Vilberg
become_everpreg_chakravarti_decision = {
	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
	decision_group_type = major
	desc = become_everpreg_chakravarti_decision_desc

	ai_check_interval = 120

	is_shown = {
		exists = title:e_everpreg_atalantea_empire.holder
		OR = {
			religion = religion:everpreg_antideleuvianism_religion
		}
		highest_held_title_tier >= tier_kingdom
		NOT = {
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:become_everpreg_chakravarti_decision
			}
		}
	}

	is_valid = {
		primary_title = title:e_everpreg_atalantea_empire

		completely_controls = title:k_bjarmaland
		completely_controls = title:k_novgorod
		completely_controls = title:k_opolye
		completely_controls = title:k_white_rus
		completely_controls = title:k_ruthenia
		completely_controls = title:k_galicia-volhynia
		completely_controls = title:k_caucasus
		completely_controls = title:k_caspian_steppe
		completely_controls = title:k_pontic_steppe

		#completely_controls = title:e_everpreg_atalantea_empire
		#completely_controls = title:e_russia
		#completely_controls = title:e_caspian-pontic_steppe
		#completely_controls = title:d_aegean_islands
		completely_controls = title:c_karasjohka
		#religion:everpreg_antideleuvianism_religion = { religious_head = root }
		faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
		faith.religious_head = root
		has_trait = everpreg_3
		is_female = yes
		piety_level >= 5
	}

	is_valid_showing_failures_only = {
		is_adult = yes
		is_available = yes
		is_independent_ruler = yes
	}

	cost = {
		piety = {
			value = massive_piety_value
		}
		gold = {
			value = massive_gold_value
		}
	}

	effect = {
		#Can only happen once
		add_to_global_variable_list = {
			name = unavailable_unique_decisions
			target = flag:become_everpreg_chakravarti_decision
		}

		custom_tooltip = become_everpreg_chakravarti_decision_atlantian_empire_unites_effect
		custom_tooltip = become_everpreg_chakravarti_decision_new_primary_title_effect
		show_as_tooltip = {
			add_trait = everpreg_saoshyant
			add_prestige = massive_prestige_value
			add_prestige_level = 2
			faith = {
				add_doctrine = divine_destiny_doctrine
				change_fervor = {
					value = major_fervor_gain
					desc = everpreg_fervor_gain_become_chakravarti
				}
			}
		}

		save_scope_as = everpreg_chakravarti

		trigger_event = everpreg_chakravarti_event.0001 #I became the Chakravarti
		add_to_temporary_list = received_notification

		every_vassal_or_below = {
			if = {
				limit = {
					OR = {
						faith.religion = faith:everpreg_antideleuvianism.religion
					}
				}
				trigger_event = everpreg_chakravarti_event.0002 #My ruler became the everpreg Chakravarti
			}
			else = {
				trigger_event = everpreg_chakravarti_event.0003 #My ruler became the everpreg Chakravarti - convert?
			}
			add_to_temporary_list = received_notification
		}

		every_ruler = {
			limit = {
				NOT = {
					is_in_list = received_notification
				}
			}

			trigger_event = everpreg_chakravarti_event.0004 #Someone has become the Chakravarti
		}
	}

	ai_will_do = {
		base = 100
	}
}

host_everpreg_witch_ritual_decision = {
	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_major_religion.dds"
	}
	ai_check_interval = 60

	cost = { gold = 50 }

	cooldown = { days = 3650 }

	desc = host_everpreg_witch_ritual_decision_desc
	selection_tooltip = host_everpreg_witch_ritual_decision_tooltip

	is_shown = {
		is_everpreg_witch_trigger = yes
		exists = house
		house = { has_house_modifier = everpreg_witch_coven }
	}

	is_valid_showing_failures_only = {
		is_available_adult = yes
		is_landed = yes
		OR = {
			has_trait = everpreg_1
			has_trait = everpreg_2
			has_trait = everpreg_3
		}
	}

	effect = {
		capital_province = {
			spawn_activity = {
				type = activity_everpreg_witch_ritual
				owner = root
			}
		}
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 0

		modifier = {
			add = 50
			short_term_gold > 150
		}
	}
}

###found_everpreg_witch_coven_decision = {
###	picture = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
###	decision_group_type = major
###	ai_check_interval = 36
###	desc = found_everpreg_witch_coven_decision_desc

###	is_shown = {
###		OR = {
###			has_trait = everpreg_3
###			has_trait = everpreg_2
###			has_trait = everpreg_1
###			any_secret = { secret_type = secret_everpreg_witch }
###		}
###		exists = house
###		NOT = { house = { has_house_modifier = everpreg_witch_coven } }
###	}

###	is_valid = {
###		is_house_head = yes
###		#trigger_if = {
###		#	limit = {
###		#		exists = player_heir
###		#		player_heir = {
###		#			is_child_of = root
###		#			house = root.house
###		#		}
###		#	}
###			#player_heir = {
###			#	OR = {
###			#		has_trait = everpreg_1
###			#		has_trait = everpreg_2
###			#		has_trait = everpreg_3
###			#		#any_secret = { secret_type = secret_everpreg_witch }
###			#	}
###			#	faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
###			#	#is_everpreg_witch_trigger = { CHARACTER = root }
###			#}
###		#}
###		#We want a certain % to be witches but also a minimum amount. So if the house is small, we use a minimum number, and if the house is larger we use %
###		trigger_if = {
###			limit = {
###				house = {
###					any_adult_house_member = {
###						is_female = yes
###						always = yes
###						count <= 10
###					}
###				}
###			}
###			house = {
###				any_adult_house_member = {
###					is_female = yes
###					count >= 1
###					OR = {
###						has_trait = everpreg_1
###						has_trait = everpreg_2
###						has_trait = everpreg_3
###						#any_secret = { secret_type = secret_everpreg_witch }
###					}
###					faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
###					#is_everpreg_witch_trigger = { CHARACTER = root }
###				}
###			}
###		}
###		trigger_else = {
###			house = {
###				any_adult_house_member = {
###					is_female = yes
###					count >= 2
###					OR = {
###						has_trait = everpreg_1
###						has_trait = everpreg_2
###						has_trait = everpreg_3
###						#any_secret = { secret_type = secret_everpreg_witch }
###					}
###					faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
###					#is_everpreg_witch_trigger = { CHARACTER = root }
###				}
###			}
###		}
###	}

###	is_valid_showing_failures_only = {
###	}

###	effect = {
###		found_everpreg_witch_coven_decision_effects = yes
###	}
###}



summon_everpreg_giant_cecaelias_decision = {
	picture = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	decision_group_type = major
	ai_check_interval = 36+

	desc = summon_everpreg_giant_cecaelias_decision_desc

	is_shown = {
		is_lowborn = no
		NOT = {
			house = {
				has_house_modifier = everpreg_giant_cecaelias_modifier
			}
		}
		faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
		highest_held_title_tier >= tier_kingdom
	}

	is_valid = {
		has_trait = everpreg_3
		dynasty = {
			any_dynasty_member = {
				count >= 5
				is_independent_ruler = yes
				faith = { has_doctrine_parameter = tenet_everpreg_holywomb }
				highest_held_title_tier >= tier_duchy
			}
		}
	}


	effect = {
		save_scope_as = everpreg_cecaelias
		show_as_tooltip = {
			everpreg_giant_cecaelias_effects = yes
			spawn_everpreg_giant_cecaelias_troops_effect = yes
		}

		###
		trigger_event = everpreg_giant_cecaelias_event.001

		every_player = {
			limit = {
				NOT = {
					this = root
				}
				dynasty = root.dynasty
			}
			send_interface_toast = {
				title = everpreg_giant_cecaelias
				show_as_tooltip = {
					everpreg_giant_cecaelias_effects = yes
				}
			}
		}
	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 100
	}

	is_valid_showing_failures_only = {
	}

}







everpreg_gather_trade_goods = {
	picture =  {
		reference = "gfx/interface/illustrations/decisions/decision_personal_religious.dds"
	}
	decision_group_type = major
	ai_check_interval = 1
	desc = everpreg_gather_trade_goods_desc

	cooldown = { years = 10 }

	is_shown = {
		#is_everpreg_witch_trigger = yes
		exists = house
		house = { has_house_modifier = everpreg_witch_coven }

	}

	is_valid = {
		is_available = yes
		is_landed = yes
		#OR = {
		#	has_trait = everpreg_1
		#	has_trait = everpreg_2
		#	has_trait = everpreg_3
		#}
	}


	effect = {
		###

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_desert_temple_01
							has_building = everpreg_desert_temple_02
							has_building = everpreg_desert_temple_03
							has_building = everpreg_desert_temple_04
							has_building = everpreg_desert_temple_05
							has_building = everpreg_desert_temple_06
							has_building = everpreg_desert_temple_07
							has_building = everpreg_desert_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_deserttemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_desertmountains_temple_01
							has_building = everpreg_desertmountains_temple_02
							has_building = everpreg_desertmountains_temple_03
							has_building = everpreg_desertmountains_temple_04
							has_building = everpreg_desertmountains_temple_05
							has_building = everpreg_desertmountains_temple_06
							has_building = everpreg_desertmountains_temple_07
							has_building = everpreg_desertmountains_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_desertmountainstemple_modifier
				years = 10
			}
		}


		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_drylands_temple_01
							has_building = everpreg_drylands_temple_02
							has_building = everpreg_drylands_temple_03
							has_building = everpreg_drylands_temple_04
							has_building = everpreg_drylands_temple_05
							has_building = everpreg_drylands_temple_06
							has_building = everpreg_drylands_temple_07
							has_building = everpreg_drylands_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_drylandstemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_farmlands_temple_01
							has_building = everpreg_farmlands_temple_02
							has_building = everpreg_farmlands_temple_03
							has_building = everpreg_farmlands_temple_04
							has_building = everpreg_farmlands_temple_05
							has_building = everpreg_farmlands_temple_06
							has_building = everpreg_farmlands_temple_07
							has_building = everpreg_farmlands_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_farmlandstemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_floodplains_temple_01
							has_building = everpreg_floodplains_temple_02
							has_building = everpreg_floodplains_temple_03
							has_building = everpreg_floodplains_temple_04
							has_building = everpreg_floodplains_temple_05
							has_building = everpreg_floodplains_temple_06
							has_building = everpreg_floodplains_temple_07
							has_building = everpreg_floodplains_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_floodplainstemple_modifier
				years = 10
			}
		}


		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_forest_temple_01
							has_building = everpreg_forest_temple_02
							has_building = everpreg_forest_temple_03
							has_building = everpreg_forest_temple_04
							has_building = everpreg_forest_temple_05
							has_building = everpreg_forest_temple_06
							has_building = everpreg_forest_temple_07
							has_building = everpreg_forest_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_foresttemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_hills_temple_01
							has_building = everpreg_hills_temple_02
							has_building = everpreg_hills_temple_03
							has_building = everpreg_hills_temple_04
							has_building = everpreg_hills_temple_05
							has_building = everpreg_hills_temple_06
							has_building = everpreg_hills_temple_07
							has_building = everpreg_hills_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_hillstemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_jungle_temple_01
							has_building = everpreg_jungle_temple_02
							has_building = everpreg_jungle_temple_03
							has_building = everpreg_jungle_temple_04
							has_building = everpreg_jungle_temple_05
							has_building = everpreg_jungle_temple_06
							has_building = everpreg_jungle_temple_07
							has_building = everpreg_jungle_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_jungletemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_mountains_temple_01
							has_building = everpreg_mountains_temple_02
							has_building = everpreg_mountains_temple_03
							has_building = everpreg_mountains_temple_04
							has_building = everpreg_mountains_temple_05
							has_building = everpreg_mountains_temple_06
							has_building = everpreg_mountains_temple_07
							has_building = everpreg_mountains_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_mountainstemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_oasis_temple_01
							has_building = everpreg_oasis_temple_02
							has_building = everpreg_oasis_temple_03
							has_building = everpreg_oasis_temple_04
							has_building = everpreg_oasis_temple_05
							has_building = everpreg_oasis_temple_06
							has_building = everpreg_oasis_temple_07
							has_building = everpreg_oasis_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_oasistemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_plains_temple_01
							has_building = everpreg_plains_temple_02
							has_building = everpreg_plains_temple_03
							has_building = everpreg_plains_temple_04
							has_building = everpreg_plains_temple_05
							has_building = everpreg_plains_temple_06
							has_building = everpreg_plains_temple_07
							has_building = everpreg_plains_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_plainstemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_steppe_temple_01
							has_building = everpreg_steppe_temple_02
							has_building = everpreg_steppe_temple_03
							has_building = everpreg_steppe_temple_04
							has_building = everpreg_steppe_temple_05
							has_building = everpreg_steppe_temple_06
							has_building = everpreg_steppe_temple_07
							has_building = everpreg_steppe_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_steppetemple_modifier
				years = 10
			}
		}


		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_taiga_temple_01
							has_building = everpreg_taiga_temple_02
							has_building = everpreg_taiga_temple_03
							has_building = everpreg_taiga_temple_04
							has_building = everpreg_taiga_temple_05
							has_building = everpreg_taiga_temple_06
							has_building = everpreg_taiga_temple_07
							has_building = everpreg_taiga_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_taigatemple_modifier
				years = 10
			}
		}

		if = {
			limit = {
				#highest_held_title_tier >= tier_duchy
				any_sub_realm_barony = {
					title_province = {
						OR = {
							has_building = everpreg_wetlands_temple_01
							has_building = everpreg_wetlands_temple_02
							has_building = everpreg_wetlands_temple_03
							has_building = everpreg_wetlands_temple_04
							has_building = everpreg_wetlands_temple_05
							has_building = everpreg_wetlands_temple_06
							has_building = everpreg_wetlands_temple_07
							has_building = everpreg_wetlands_temple_08
						}
					}
				}
			}
			add_character_modifier = {
				modifier = everpreg_wetlandstemple_modifier
				years = 10
			}
		}


		trigger_event = everpreg_trade_festival.001
		save_scope_as = actor

	}

	ai_potential = {
		always = yes
	}

	ai_will_do = {
		base = 1000
	}

	is_valid_showing_failures_only = {
	}

}
