namespace = byzsla_slavic_event_zmij

narrative_event = {
	id = byzsla_slavic_event_zmij.5
	title = title_byzsla_slavic_event_zmij.4
	desc = desc_byzsla_slavic_event_zmij.5
	picture = GFX_evt_byzsla_labirynt
	border = GFX_event_narrative_frame_religion
	
	is_triggered_only = yes
	
	hide_from = yes
	
	option = {
		name = optA_byzsla_slavic_event_zmij.4
		trigger = {
			religion = chram_vales
		}
	}
	option = {
		name = optC_byzsla_slavic_event_zmij.5
		trigger = {
			NOT = { religion = chram_vales }
		}
	}
}

# byzsla_slavic_event_zmij.10 - Początek pielgrzymki

character_event = {
	id = byzsla_slavic_event_zmij.10
	desc = desc_byzsla_slavic_event_zmij.10
	picture = GFX_evt_pilgrims_epic_journey
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes

	option = {
		name = optA_byzsla_slavic_event_zmij.10
		piety = 20
		add_trait = on_byzsla_pielgrzym
		set_character_flag = preparing_pilgrimage
		clr_character_flag = activated_pilgrimage
		set_character_flag = bspm_pielgrzymka_do_zmija
		hidden_tooltip = {
			if = {
				limit = {
					capital_scope = { de_jure_liege_or_above = k_rus }
				}
				character_event = { id = byzsla_slavic_event_zmij.11 days = 20 }	#dojście do celu
			}
			if = {
				limit = {
					NOT = { capital_scope = { de_jure_liege_or_above = k_rus } }
				}
				random_list = {																#problemy na trasie
					10 = { character_event = { id = SoA.5037 days = 20 } }	#choroba
					10 = { character_event = { id = SoA.5026 days = 20 } }	#pogoda
					10 = { character_event = { id = byzsla_slavic_event_zmij.14 days = 20 } }	#niedźwiedź
					10 = { character_event = { id = SoA.5027 days = 20 } }	#zagubienie
					10 = { character_event = { id = byzsla_slavic_event_zmij.16 days = 20 } }	#spotkanie szaleńca
					10 = { narrative_event = { id = SoA.5028 days = 20 } }	#pożar
					10 = { character_event = { id = SoA.5029 days = 20 } }	#bamdyci
					10 = { character_event = { id = SoA.5030 days = 20 } }	#złamany most
					10 = { character_event = { id = SoA.5031 days = 20 } }	#egzystencjalizm
					#10 = { character_event = { id = byzsla_slavic_event_zmij.21 days = 20 } }	#podróżny w potrzebie
				}
#				random_list = {																#nadnaturalne sprawy na trasie 
#					10 = { character_event = { id = byzsla_slavic_event_zmij.22 days = 20 } }	#spotkanie wilkołaka
#					10 = { character_event = { id = byzsla_slavic_event_zmij.23 days = 20 } }	#spotkanie wampira
#					10 = { character_event = { id = byzsla_slavic_event_zmij.24 days = 20 } }	#polowanie na wampira
#					10 = { character_event = { id = byzsla_slavic_event_zmij.25 days = 20 } }	#nauka na trasie
#					10 = { character_event = { id = byzsla_slavic_event_zmij.26 days = 20 } }	#kradzież czy dar
#					10 = { character_event = { id = byzsla_slavic_event_zmij.27 days = 20 } }	#objawienie czarnego nieba
#					100 = {  }
#				}
				character_event = { id = byzsla_slavic_event_zmij.11 days = 55 } 	#dojście do celu
			}
		}
	}
}

# byzsla_slavic_event_zmij.11 - Dojście do celu

character_event = {
	id = byzsla_slavic_event_zmij.11
	desc = desc_byzsla_slavic_event_zmij.11
	picture = GFX_evt_midwinter_blot_oldgods
	border = GFX_event_normal_frame_religion
	
	is_triggered_only = yes

	option = {		#idziem na market
		name = optA_byzsla_slavic_event_zmij.11
		character_event = { id = byzsla_slavic_event_zmij.28 }
	}
	option = {		#idziem do mądrych
		name = optB_byzsla_slavic_event_zmij.11
		character_event = { id = byzsla_slavic_event_zmij.29 }
	}
	option = {		#idziem się bawić
		name = optC_byzsla_slavic_event_zmij.11
		character_event = { id = byzsla_slavic_event_zmij.30 }
	}
	option = {		#idziem do labiryntu
		name = optD_byzsla_slavic_event_zmij.11
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
}

# byzsla_slavic_event_zmij.14 - Niedźwiedź

character_event = {
	id = byzsla_slavic_event_zmij.14
	desc = desc_byzsla_slavic_event_zmij.14
	picture = GFX_evt_midwinter_blot_oldgods
	
	is_triggered_only = yes

	option = {		#dać ofiarę 
		name = optA_byzsla_slavic_event_zmij.14
		piety = 20
		prestige = -20
		treasury = -5
		random = {
			chance = 30
			add_character_modifier = {
				name = minor_food_shortage
				duration = 100
			}
		}
	}
	option = {		#przegoń
		name = optB_byzsla_slavic_event_zmij.14
		trigger = {
			NOT = {
				AND = {
					trait = wounded
					trait = maimed
				}
			}
		}
		if = {
			limit = {
				NOT = { trait = brave }
				NOT = { trait = craven }
			}
			add_trait = brave
		}
		if = {
			limit = {
				trait = craven
			}
			remove_trait = craven
		}
		random_list = {
			40 = { prestige = 20 }
			50 = { 
				if = {
					limit = {
						NOT = {
							trait = wounded
						}
					}
					add_trait = wounded 
				}
				if = {
					limit = {
						trait = wounded
					}
					add_trait = maimed 
				}
			}
			10 = { death = { death_reason = death_accident_bear } }
		}
	}
	option = {		#uciec
		name = optB_byzsla_slavic_event_zmij.14
		character_event = { id = byzsla_slavic_event_zmij.29 }
		prestige = -50
		if = {
			limit = {
				NOT = { trait = brave }
				NOT = { trait = craven }
			}
			add_trait = brave
		}
		if = {
			limit = {
				trait = craven
			}
			remove_trait = craven
		}
	}
}

# byzsla_slavic_event_zmij.16 - Spotkanie szaleńca

character_event = {
	id = byzsla_slavic_event_zmij.16
	desc = desc_byzsla_slavic_event_zmij.16
	picture = GFX_evt_library
	
	is_triggered_only = yes

	option = {		#porozmawiac
		name = optA_byzsla_slavic_event_zmij.16
		random = {
			chance = 20
			change_intrigue = 1
		}
		random = {
			chance = 20
			change_learning = 1
		}
		if = {
			limit = {
				NOT = { trait = depressed }
				NOT = { trait = stressed }
				NOT = { trait = lunatic }
			}
			random = {
				chance = 10
				add_trait = stressed
			}
		}
		random_list = {
			10 = { piety = 20 }
			10 = { piety = 40 }
			10 = { piety = -40 }
			10 = { piety = -20 }
			60 = {  }
		}
	}
	option = {		#zignorowac
		name = optB_byzsla_slavic_event_zmij.16
		if = {
			limit = {
				trait = stressed
			}
			random = {
				chance = 10
				remove_trait = stressed
			}
		}
	}
}

# byzsla_slavic_event_zmij.28 - W około straganów

character_event = {
	id = byzsla_slavic_event_zmij.28
	desc = desc_byzsla_slavic_event_zmij.28
	picture = GFX_evt_market
	
	is_triggered_only = yes

	option = {		#dyskusje z kupcami
		name = optA_byzsla_slavic_event_zmij.28
		random = {
			chance = 30
			change_stewardship = 1
		}
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
	option = {		#kupić kilka błyskotek
		name = optB_byzsla_slavic_event_zmij.28
		treasury = -20
		prestige = 50
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
	option = {		#tylko pochodzić
		name = optB_byzsla_slavic_event_zmij.28
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
}

# byzsla_slavic_event_zmij.29 - W około zabawy

character_event = {
	id = byzsla_slavic_event_zmij.29
	desc = desc_byzsla_slavic_event_zmij.29
	picture = GFX_evt_dancing
	
	is_triggered_only = yes

	option = {		#Na tańce
		name = optA_byzsla_slavic_event_zmij.29
		random = {
			chance = 30
			change_diplomacy = 1
		}
		random = {
			chance = 70
			prestige = 30
		}
		random = {
			chance = 15
			add_character_modifier = {
				name = great_dancer
				duration = -1
			}
		}
		random = {
			chance = 30
			remove_trait = stressed
		}
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
	option = {		#Do burdelu
		name = optB_byzsla_slavic_event_zmij.29
		piety = -25
		treasury = -15
		if = {
			limit = { 
				trait = depressed 
				NOT = { trait = stressed }
			}
			random = {
				chance = 30
				remove_trait = depressed
			}
		}
		if = {
			limit = { 
				NOT = { trait = depressed }
				trait = stressed
			}
			random = {
				chance = 30
				remove_trait = stressed
			}
		}
		if = {
			limit = { 
				trait = depressed
				trait = stressed
			}
			random_list = {
				30 = { remove_trait = stressed }
				30 = { remove_trait = depressed }
				70 = {  }
			}
		}
		if = {
			limit = {
				has_global_flag = aztec_syphilis
			}
			random = {
				chance = 5
				add_trait = syphilitic
			}
		}
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
	option = {		#tylko pochodzić
		name = optC_byzsla_slavic_event_zmij.28
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
}

# byzsla_slavic_event_zmij.30 - W około uczonych

character_event = {
	id = byzsla_slavic_event_zmij.30
	desc = desc_byzsla_slavic_event_zmij.30
	picture = GFX_evt_library
	
	is_triggered_only = yes

	option = {		#dyskusje z mędrcami
		name = optA_byzsla_slavic_event_zmij.30
		random = {
			chance = 30
			change_learning = 1
		}
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
	option = {		#poczytaj książki
		name = optB_byzsla_slavic_event_zmij.30
		random_list = {
			20 = { change_learning = 1 }
			20 = { change_stewardship = 1 }
			20 = { change_intrigue = 1 }
			20 = { change_learning = -1 }
			20 = { change_stewardship = -1 }
			20 = { change_intrigue = -1 }
		}
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
	option = {		#wystarczy pobyt
		name = optB_byzsla_slavic_event_zmij.30
		character_event = { id = byzsla_slavic_event_zmij.31 days = 3 }
	}
}

character_event = {
	id = byzsla_slavic_event_zmij.31
	desc = desc_byzsla_slavic_event_zmij.31
	picture = GFX_evt_byzsla_labirynt
	
	is_triggered_only = yes
	
	option = {		#wchodzimy
		name = optA_byzsla_slavic_event_zmij.31
		random_list = {
			30 = { character_event = { id = byzsla_slavic_event_zmij.32 days = 6 } } # Zgubienie się w labiryncie - powrót
			30 = { character_event = { id = byzsla_slavic_event_zmij.33 days = 20 } } # Zgubienie się w labiryncie - śmierć 
			30 = { character_event = { id = byzsla_slavic_event_zmij.34 days = 20 } } # Zgubienie się w labiryncie - szaleństwo
			30 = { character_event = { id = byzsla_slavic_event_zmij.35 days = 8 } } # Dojście spokojne do końca
			30 = { character_event = { id = byzsla_slavic_event_zmij.36 days = 8 } } # Dojście szaleńcze do końca
			30 = { character_event = { id = byzsla_slavic_event_zmij.37 days = 8 } } # Dojście mistyczne do końca
		}
	}
}

# byzsla_slavic_event_zmij.32 - Zgubienie się w labiryncie - powrót

character_event = {
	id = byzsla_slavic_event_zmij.32
	desc = desc_byzsla_slavic_event_zmij.32
	picture = GFX_evt_byzsla_labirynt
	
	is_triggered_only = yes
	
	option = {		#nie udało sie
		name = optA_byzsla_slavic_event_zmij.32
		if = {
			limit = {
				trait = zealous
			}
			remove_trait = zealous
		}
		if = {
			limit = {
				NOT = { trait = cynical }
			}
			add_trait = cynical
		}
		piety = -100
		prestige = 50
		health = 1
		remove_trait = on_byzsla_pielgrzym
		add_trait = byzsla_pielgrzym
	}
}

# byzsla_slavic_event_zmij.33 - Zgubienie się w labiryncie - śmierć 

character_event = {
	id = byzsla_slavic_event_zmij.33
	desc = desc_byzsla_slavic_event_zmij.33
	picture = GFX_evt_byzsla_labirynt
	
	is_triggered_only = yes
	
	option = {		#śmierć
		name = optA_byzsla_slavic_event_zmij.33
		death = {
			death_reason = death_missing
		}
	}
}

# byzsla_slavic_event_zmij.34 - Zgubienie się w labiryncie - szaleństwo

character_event = {
	id = byzsla_slavic_event_zmij.34
	desc = desc_byzsla_slavic_event_zmij.34
	picture = GFX_evt_byzsla_labirynt
	
	is_triggered_only = yes
	
	option = {		#nie udało sie
		name = optA_byzsla_slavic_event_zmij.34
		health = 4
		change_intrigue = 3
		prestige = 50
		add_trait = lunatic
		remove_trait = on_byzsla_pielgrzym
		add_trait = byzsla_pielgrzym
	}
}

# byzsla_slavic_event_zmij.35 - Dojście spokojne do końca

character_event = {
	id = byzsla_slavic_event_zmij.35
	desc = desc_byzsla_slavic_event_zmij.35
	picture = GFX_evt_byzsla_labirynt
	
	is_triggered_only = yes
	
	option = {		#udało sie
		name = optA_byzsla_slavic_event_zmij.35
		piety = 100
		prestige = 50
		remove_trait = on_byzsla_pielgrzym
		add_trait = byzsla_pielgrzym
	}
}

# byzsla_slavic_event_zmij.36 - Dojście szaleńcze do końca

character_event = {
	id = byzsla_slavic_event_zmij.36
	desc = desc_byzsla_slavic_event_zmij.36
	picture = GFX_evt_byzsla_labirynt
	
	is_triggered_only = yes
	
	option = {		#udało sie
		name = optA_byzsla_slavic_event_zmij.36
		piety = 100
		prestige = 50
		remove_trait = on_byzsla_pielgrzym
		add_trait = byzsla_pielgrzym
		add_trait = lunatic
		health = 4
	}
}

# byzsla_slavic_event_zmij.37 - Dojście mistyczne do końca

character_event = {
	id = byzsla_slavic_event_zmij.37
	desc = desc_byzsla_slavic_event_zmij.37
	picture = GFX_evt_byzsla_labirynt
	
	is_triggered_only = yes
	
	option = {		#udało sie
		name = optA_byzsla_slavic_event_zmij.37
		piety = 100
		prestige = 50
		remove_trait = on_byzsla_pielgrzym
		add_trait = byzsla_pielgrzym
		if = {
			limit = {
				trait = detached_priest
			}
			hidden_tooltip = {
				remove_trait = detached_priest
			}
			add_trait = martial_cleric
		}
		if = {
			limit = {
				trait = martial_cleric
			}
			hidden_tooltip = {
				remove_trait = martial_cleric
			}
			add_trait = scholarly_theologian
		}
		if = {
			limit = {
				trait = scholarly_theologian
			}
			hidden_tooltip = {
				remove_trait = scholarly_theologian
			}
			add_trait = mastermind_theologian
		}
		if = {
			limit = {
				trait = mastermind_theologian
			}
			change_learning = 3
		}
		if = {
			limit = {
				NOT = { trait = holy_warrior }
			}
			random = {
				chance = 75
				add_trait = holy_warrior
			}
		}
		if = {
			limit = {
				trait = holy_warrior
			}
			random = {
				chance = 75
				change_martial = 3
			}
		}
	}
}