###############
#### Decyzje żmijowe
# byzsla_slav_zmij_proroctwo - Budowa labiryntu żmija
# byzsla_slav_zmij_pielgrzymka - Pielgrzymka do labiryntu
###############

decisions = {
	byzsla_slav_zmij_proroctwo = {
		potential = {
			is_playable = yes
			independent = yes
			is_adult = yes
			prisoner = no
			religion = chram_vales
			has_global_flag = bspm_proroctwo_zmija_flaga				#Proroctwo jest znane
			NOT = { has_global_flag = bspm_proroctwo_zmija_flaga1 }		#Zbudowano labirynt
			NOT = { has_global_flag = bspm_proroctwo_zmija_flaga2 }		#Labirynt się buduje
		}
		allow = {
			war = no
			completely_controls = c_moskva
			#575 = {
			#	religion = ROOT
			#}
			wealth = 1500
			piety = 1500
		}
		effect = {
			hidden_tooltip = {
				character_event = { id = byzsla_slavic_event_zmij.2 }
				575 = {	province_event = { id = byzsla_slavic_event_zmij.3 days = 1460 random = 50 }	}
			}
			set_global_flag = bspm_proroctwo_zmija_flaga2
			wealth = -1500
			prestige = 500
			piety = 500
		}
		ai_will_do = {
			factor = 1
		}
	}
	
	byzsla_slav_zmij_pielgrzymka = {
		only_playable = yes
		potential = {
			OR = {
				NOT = { has_dlc = "Way of Life" }
				has_focus = focus_theology
			}
			is_playable = yes
			religion = chram_vales
			has_global_flag = bspm_proroctwo_zmija_flaga1 		#Zbudowano labirynt
			NOT = {
				trait = pilgrim
			}
		}
		allow = {
			war = no
			in_command = no
			any_demesne_title = {
				NOT = { higher_tier_than = count }
				is_occupied = no
			}
			prisoner = no
			NOT = { is_inaccessible_trigger = yes }
			scaled_wealth = 0.2
			age = 16
			custom_tooltip = {
				text = health_travel_condition
				hidden_tooltip = {
					NOT = {	trait = pregnant }
					NOT = {	trait = incapable }
					NOT = {	trait = blinded }
					NOT = {	trait = has_tuberculosis }
					NOT = {	trait = has_typhoid_fever }
					NOT = {	trait = has_typhus }
					NOT = {	trait = has_bubonic_plague }
					NOT = {	trait = has_measles }
					NOT = {	trait = has_small_pox }
					NOT = {	trait = has_aztec_disease }
				}
			}
			custom_tooltip = {
				text = is_not_busy_trigger_tooltip
				hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
			}
		}
		effect = {
			scaled_wealth = -0.2
			set_character_flag = activated_pilgrimage
			set_character_flag = do_not_disturb
			hidden_tooltip = {
				character_event = { 
					id = byzsla_slavic_event_zmij.10
				}
			}
		}
		revoke_allowed = {
			always = no
		}
		ai_will_do = {
			factor = 1
			
			modifier = {
				factor = 0.003
			}
			modifier = {
				factor = 3
				trait = zealous
			}
			modifier = {
				factor = 0
				NOT = { wealth = 200 }
			}			
			modifier = {
				factor = 0
				NOT = { age = 30 }
			}
		}
	}
}

