decisions = {
	hold_jarilo2 = {
		only_playable = yes
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_adult = yes
			prisoner = no
			religion = old_slavic_pagan
			NOT = { has_character_modifier = held_jarilo_timer }
			NOT = {	has_character_flag = holding_jarilo }
		}
		allow = {
			war = no
			any_demesne_title = {
				NOT = { higher_tier_than = count }
				is_occupied = no
			}
			NOT = { month = 7 }
			month = 4
			wealth = 50
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			wealth = -50
			set_character_flag = holding_jarilo
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			hidden_tooltip = { character_event = { id = TOG.899 days = 150 } } # Safety catch flag clearing
			custom_tooltip = {
				text = prepare_jarilo
				hidden_tooltip = { 
					character_event = { id = TOG.800 } 
				}
			}
			if = {
				limit = {
					has_dlc = "Reapers"
				}
				custom_tooltip = {
					text = capital_prospers_custom_tooltip
					hidden_tooltip = {
						capital_scope = {
							change_variable = { which = prosperity_value value = 8 }
						}
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0
				NOT = {
					wealth = 300
				}
			}
			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
					}
				}
			}
		}
	}
	
	raise_defensive_unit2 = {
		only_playable = yes
		is_high_prio = yes
		is_mercenary = yes

		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_tribal = yes
			is_landed = yes
			OR = {
				religion = old_slavic_pagan
				religion = chram_vales
				religion = chram_roda
			}
		}

		allow = {
			war = yes
			
			custom_tooltip = {
				text = raise_defensive_unit_tooltip

				hidden_tooltip = {
					any_war = {
						any_defender = {
							character = ROOT
							is_primary_war_defender = yes
						}

						#Defending against heathen
						OR = {
							#Defender is finnish pagan but attacker is not
							AND = {
								ROOT = {
									religion = chram_vales
								}
								attacker = {
									NOT = { religion = chram_roda }
								}
							}
							AND = {
								ROOT = {
									religion = chram_vales
								}
								attacker = {
									NOT = { religion = chram_vales }
								}
							}
						}
					}
				}
			}
			piety = 200	
		}

		effect = {
			custom_tooltip = { text = summon_defensive_unit }
			piety = -200

			hidden_tooltip = {
				capital_scope = {
					ROOT = {
						spawn_unit = {
							owner = ROOT
							home = PREV
							province = PREV
							disband_on_peace = yes
							maintenance_multiplier = 0.25
							attrition = 1.0 

							troops = {
								archers = { 400 400 }
								light_infantry = { 1000 1000 }
								heavy_infantry = { 350 350 }
								light_cavalry = { 250 250 }
							}
						}
					}
				}
			}
		}

		revoke_allowed = {
			always = no
		}

		ai_will_do = {
			factor = 0.2
		}
	}	
	
	pick_main_deity2 = {
		only_playable = yes
		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_adult = yes
			prisoner = no
			OR = {
				religion = old_slavic_pagan
				religion = chram_vales
			}
		}
		allow = {
			piety = 25
			custom_tooltip = {
				text = pick_main_deity_timer_tooltip
				NOT = { has_character_modifier = picked_main_deity_timer }
			}
			prisoner = no
		}
		effect = {
			piety = -25
			custom_tooltip = {
				text = pick_main_deity_tooltip

				#Starts main deity events
				hidden_tooltip = {
					if = {
						limit = { has_minor_deity_trigger = no }
						character_event = { id = TOG.7100 days = 10 }		#losowanie eventu 
					}
				}
				if = {
					limit = {
						religion = chram_vales
					}
					character_event = { id = byzsla_slavic_event_kultysci.17 }
				}
				if = {
					limit = {
						religion = old_slavic_pagan
					}
					character_event = { id = TOG.7110 }
				}

				add_character_modifier = {
					name = picked_main_deity_timer
					duration = 3650
					hidden = yes
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.1
		}
	}
	
	ancestor_worship2 = {
		only_playable = yes
		is_high_prio = yes 

		potential = {
			has_dlc = "The Old Gods"
			is_playable = yes
			is_landed = yes
			is_adult = yes
			prisoner = no
			OR = {
				religion = old_slavic_pagan
				religion = chram_vales
				religion = chram_roda
			}
		}

		allow = {
			war = no
			any_demesne_title = {
				NOT = { higher_tier_than = count }
				is_occupied = no
			}
			NOT = { is_inaccessible_trigger = yes }
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
			custom_tooltip = {
				text = worship_cooldown_tooltip
				hidden_tooltip = { NOT = { has_character_modifier = worshipped_ancestors_timer } }
			}
		}

		effect = {
			set_character_flag = recent_minor_decision
			set_character_flag = do_not_disturb
			custom_tooltip = {
				text = prepare_worship_ancestors
				hidden_tooltip = { 
					character_event = { id = TOG.7000 } 
					add_character_modifier = {
						name = worshipped_ancestors_timer
						years = 10
						hidden = yes
					}
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 0.01
			
			modifier = {
				factor = 0.01
				trait = cynical
			}
			modifier = {
				factor = 5
				trait = zealous
			}	
			modifier = {
				factor = 0
				has_character_flag = recent_minor_decision
				NOT = {
					had_character_flag = {
						flag = recent_minor_decision
						days = 730
					}
				}
			}
		}
	}

}
