namespace = byzsla_slavic_event_mokosz

############################
#### Mokoszowe ertwa - wersja prymitywna 
#byzsla_slavic_event_mokosz.1 - Crka pyta si o pozwolenie
#byzsla_slavic_event_mokosz.2 - Crka chce wzi udzia
#byzsla_slavic_event_mokosz.3 - Rozpoczcie
#byzsla_slavic_event_mokosz.4 - Crka zostaje motylem
#byzsla_slavic_event_mokosz.5 - USUNITO
#byzsla_slavic_event_mokosz.6 - Rytua przebiega pomylnie
#byzsla_slavic_event_mokosz.7 - Rytua przebieg niepomylnie
#byzsla_slavic_event_mokosz.8 - Zamachowiec strzela do crki
#byzsla_slavic_event_mokosz.9 - Adorator
#### Mokoszowe ertwa - wersja zreformowana 
#byzsla_slavic_event_mokosz.11 - Crka pyta si o pozwolenie
#byzsla_slavic_event_mokosz.12 - Crka chce wzic udzia
#byzsla_slavic_event_mokosz.13 - Crka chce specjaln sukni
#byzsla_slavic_event_mokosz.14 - Rozpoczcie
#byzsla_slavic_event_mokosz.15 - Crka zostaje motylem
#byzsla_slavic_event_mokosz.16 - Rytua przebiega pomylnie
#byzsla_slavic_event_mokosz.17 - Rytua przebieg niepomylnie
#byzsla_slavic_event_mokosz.18 - Zamachowiec strzela do crki
#byzsla_slavic_event_mokosz.19 - USUNITO
#### Czary na podno - wersja prymitywna
#byzsla_slavic_event_mokosz.21 - Przysza wiedma Mokoszy i oferuje czary na podno
#byzsla_slavic_event_mokosz.22 - Czary-mary
#byzsla_slavic_event_mokosz.23 - Rytua przebieg bez problemw
#byzsla_slavic_event_mokosz.24 - Problemy
#byzsla_slavic_event_mokosz.25 - PUSTE
#byzsla_slavic_event_mokosz.26 - PUSTE
#byzsla_slavic_event_mokosz.27 - PUSTE
#byzsla_slavic_event_mokosz.28 - PUSTE
#byzsla_slavic_event_mokosz.29 - PUSTE
#### Czary na podno - wersja zreformowana
#byzsla_slavic_event_mokosz.31 - Problemy z podnoci (ona)
#byzsla_slavic_event_mokosz.32 - Problemy z podnoci (krlowa)
#byzsla_slavic_event_mokosz.33 - Pytanie do ercy
#byzsla_slavic_event_mokosz.34 - Odmowa udzielenia pomocy
#byzsla_slavic_event_mokosz.35 - Zgoda na udzielenie pomocy
#byzsla_slavic_event_mokosz.36 - Czary-mary tura 1
#byzsla_slavic_event_mokosz.37 - USUNITO
#byzsla_slavic_event_mokosz.38 - Wstyd
#byzsla_slavic_event_mokosz.39 - Koniec
#### Mokosz heretycka
#byzsla_slavic_event_mokosz.41 - Niszczenie ziemi
#byzsla_slavic_event_mokosz.42 - Ofiara z czowieka
#byzsla_slavic_event_mokosz.43 - Mio i nienawi motyli
############################

############################
#### Mokoszowe ertwa
#byzsla_slavic_event_mokosz.1 - zapytanie

character_event = {
	id = byzsla_slavic_event_mokosz.1
	desc = desc_byzsla_slavic_event_mokosz.1
	
	picture = GFX_evt_daughter_asking_father
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flagax
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.1	#pozwolenie
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flagax
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga
			prestige = 5
			piety = 5
			opinion = {
				modifier = byzsla_op_mod_mokosz_2
				who = ROOT
				years = 5
			}
		}
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.1	#odmowa
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flagax
			}
			prestige = -5
			piety = -5
			opinion = {
				who = ROOT
				modifier = byzsla_op_mod_mokosz_1
				years = 5
			}
		}
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
	}
}

#byzsla_slavic_event_mokosz.2 - Crka chce wzi udzia

character_event = {
	id = byzsla_slavic_event_mokosz.2
	desc = desc_byzsla_slavic_event_mokosz.2
	
	picture = GFX_evt_daughter_asking_father
	only_women = yes
	religion_group = pagan_group
	only_rulers = no
	trigger = {
		is_female = yes
		is_ruler = no
		age = 12
		NOT = { age = 16 }
		prisoner = no
		NOT = {
			month = 3
		}
		month = 2
		father = {
			any_demesne_title = {
				is_occupied = no
			}
			is_ruler = yes
			NOT = { trait = in_hiding }
			prisoner = no
			NOT = { trait = incapable }
			is_ill = no
			has_regent = no
			in_command = no
			OR = {
				religion = slavic_pagan
				religion = old_slavic_pagan
			}
			capital_scope = {
				NOT = {
					OR = {
						has_province_modifier = byzsla_mokosz_timer_1
						has_province_modifier = byzsla_mokosz_mod_1
						has_province_modifier = horda_byzsla_mokosz_mod_1
					}
				}
			}
		}
		NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga }
		OR = {
			religion = slavic_pagan
			religion = old_slavic_pagan
		}
		NOT = { trait = in_hiding }
		NOT = { trait = incapable }
		is_ill = no
	}
	
	mean_time_to_happen = {
		months = 10
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.2	#pytanko
		set_character_flag = byzsla_slavic_mokosz_start_flagax
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.2	#pytanko
	}
}

#byzsla_slavic_event_mokosz.3 - Rozpoczcie

character_event = {
	id = byzsla_slavic_event_mokosz.3
	desc = desc_byzsla_slavic_event_mokosz.3

	picture = GFX_evt_brothel
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2 }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.3	#ot ruszyo
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2 }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga2
		}
	}
}

#byzsla_slavic_event_mokosz.4 - Crka zostaje motylem

character_event = {
	id = byzsla_slavic_event_mokosz.4
	desc = desc_byzsla_slavic_event_mokosz.4

	picture = GFX_evt_brothel
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga2
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
			NOT = { trait = byzsla_motyl }
		}
	}
	
	mean_time_to_happen = {
		days = 100
		modifier = {
			factor = 0.02
			trait = fair
		}
		modifier = {
			factor = 100
			OR = {
				trait = ugly
				trait = clubfooted
				trait = harelip
				trait = hunchback
				trait = lisp
				trait = slow
				trait = inbred
				trait = weak
			}
		}
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.4	#fajno
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				NOT = { trait = byzsla_motyl }
			}
			add_trait = byzsla_motyl
			prestige = 100
			random = {
				chance = 20
				add_trait = stressed
			}
			random = {
				chance = 50
				add_trait = zealous
			}
		}
	}
}

#byzsla_slavic_event_mokosz.6 - Rytua przebiega pomylnie

character_event = {
	id = byzsla_slavic_event_mokosz.6
	desc = desc_byzsla_slavic_event_mokosz.6

	picture = GFX_evt_pagan
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga2
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.6	#No to koniec
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga3
			random = {
				chance = 30
				piety = 100
			}
		}
		prestige = 30
		random = {
			chance = 30
			piety = 30
		}
		if = {
			limit = {
				NOT = { is_nomadic = yes }
			}
			capital_scope = {
				add_province_modifier = {
					name = byzsla_mokosz_mod_1
					months = 9
				}
			}
		}
		if = {
			limit = {
				is_nomadic = yes
			}
			capital_scope = {
				add_province_modifier = {
					name = horda_byzsla_mokosz_mod_1
					months = 9
				}
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.6	#Okazja na podatek
		tooltip_info = greedy
		trigger = {
			trait = greedy
		}
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga3
			random = {
				chance = 30
				piety = 50
			}
		}
		random = {
			chance = 30
			piety = -30
		}
		treasury = 40 
		capital_scope = {
			add_province_modifier = {
				name = byzsla_mokosz_mod_1
				months = 9
			}
		}
	}
}

#byzsla_slavic_event_mokosz.7 - Rytua przebieg niepomylnie

character_event = {
	id = byzsla_slavic_event_mokosz.7
	desc = desc_byzsla_slavic_event_mokosz.7

	picture = GFX_evt_pagan
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga2
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
		}
	}
	
	mean_time_to_happen = {
		months = 3
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.7	#No to zy koniec
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga3
			random = {
				chance = 30
				piety = -50
			}
			if = {
				limit = {
					trait = byzsla_motyl
				}
				prestige = -200
			}
			random = {
				chance = 10
				add_trait = cynical
			}
			random = {
				chance = 1
				add_trait = possessed
			}
		}
		prestige = -30
		random = {
			chance = 50
			piety = -30
		}
		random = {
			chance = 10
			add_trait = cynical
		}
		any_realm_character = {
			limit = {
				religion = ROOT
				NOT = {
					is_friend = ROOT
				}
			}
			opinion = { 
				modifier = byzsla_op_mod_zertwa_fail 
				who = ROOT 
				years = 3
			}
		}
	}
}

#byzsla_slavic_event_mokosz.8 - Zamachowiec strzela do crki

character_event = {
	id = byzsla_slavic_event_mokosz.8
	desc = desc_byzsla_slavic_event_mokosz.8

	picture = GFX_evt_longbowman
	
	capable_only = yes
	only_men = yes
	
	trigger = {
		any_courtier = {
			has_plot = plot_kill_character
			plot_target_char = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
			}
		}
	}
	
	mean_time_to_happen = {
		days = 100
		modifier = {
			factor = 0
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				NOT = { plot_power = 30 }
			}
		}
		modifier = {
			factor = 0
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				trait = craven
			}
		}
		modifier = {
			factor = 0.9
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				OR = {
					trait = brave
					trait = cynical
				}
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				plot_power = 0.60
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				plot_power = 0.90
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				plot_power = 1.20
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				plot_power = 1.60
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				plot_power = 2.20
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
				}
				plot_power = 3.00
			}
		}
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.8	#mier
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3 }
			}
			death = {
				death_reason = death_murder_unknown
			}
		}
		prestige = -30
		random = {
			chance = 50
			piety = -30
		}
		random = {
			chance = 10
			add_trait = cynical
		}
		random = {
			chance = 10
			add_trait = depressed
		}
	}
}

#byzsla_slavic_event_mokosz.9 - Adorator

character_event = {
	id = byzsla_slavic_event_mokosz.9
	desc = desc_byzsla_slavic_event_mokosz.9

	picture = GFX_evt_emissary
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			OR = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2
				has_character_flag = byzsla_slavic_mokosz_start_flaga3
			}
			trait = byzsla_motyl
			NOT = { age = 23 }
		}
	}
	
	mean_time_to_happen = {
		months = 100
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.9	#Moe by
		trigger = {
			NOT = { trait = paranoid }
		}
		random = {
			chance = 50
			add_trait = trusting
		}
		random_child = {
			limit = {
				OR = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2
					has_character_flag = byzsla_slavic_mokosz_start_flaga3
				}
				trait = byzsla_motyl
				NOT = { age = 18 }
			}
			create_character = {
				dynasty = none
				religion = ROOT
				culture = ROOT
				female = no
				age = 20
			}
			new_character = {
				prestige = 10
				add_lover = PREV
			}
			prestige = -10
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.9	#Pogo go
		prestige = 1
		if = {
			limit = {
				NOT = { trait = just }
			}
			random = {
				chance = 5
				add_trait = arbitrary
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_mokosz.9	#Zabij gnoja
		tooltip_info = impaler
		trigger = {
			trait = impaler
		}
		if = {
			limit = {
				trait = stressed
			}
			random = {
				chance = 30
				remove_trait = stressed
			}
		}
		if = {
			limit = {
				trait = depressed
			}
			random = {
				chance = 30
				remove_trait = depressed
			}
		}
		if = {
			limit = {
				trait = drunkard
			}
			random = {
				chance = 30
				remove_trait = drunkard
			}
		}
		random = {
			chance = 25
			health = 1
		}
	}
}

#### Rytua motyla - wersja zreformowana 

#byzsla_slavic_event_mokosz.11 - Zapytanie

character_event = {
	id = byzsla_slavic_event_mokosz.11
	desc = desc_byzsla_slavic_event_mokosz.11
	
	picture = GFX_evt_daughter_asking_father

	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		religion = slavic_pagan_reformed
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flagax
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga_zref }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.1	#pozwolenie
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flagax
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga_zref }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga_zref
			prestige = 5
			piety = 5
			opinion = {
				modifier = byzsla_op_mod_mokosz_2
				who = ROOT
				years = 5
			}
		}
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.1	#odmowa
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flagax
			}
			prestige = -5
			piety = -5
			opinion = {
				who = ROOT
				modifier = byzsla_op_mod_mokosz_1
				years = 5
			}
		}
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
	}
}

#byzsla_slavic_event_mokosz.12 - Crka chce wzi udzia

character_event = {
	id = byzsla_slavic_event_mokosz.12
	desc = desc_byzsla_slavic_event_mokosz.2
	
	picture = GFX_evt_daughter_asking_father

	religion_group = pagan_group
	only_rulers = no
	only_women = yes
	trigger = {
		is_female = yes
		religion = slavic_pagan_reformed
		is_ruler = no
		age = 12
		NOT = { age = 16 }
		prisoner = no
		father = {
			any_demesne_title = {
				is_occupied = no
			}
			prisoner = no
			NOT = { trait = in_hiding }
			NOT = { trait = incapable }
			is_ill = no
			is_ruler = yes
			has_regent = no
			in_command = no
			religion = slavic_pagan_reformed
			capital_scope = {
				NOT = {
					OR = {
						has_province_modifier = byzsla_mokosz_timer_1
						has_province_modifier = byzsla_mokosz_mod_1
					}
				}
			}
		}
		NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga_zref }
		NOT = { trait = in_hiding }
		NOT = { trait = incapable }
		is_ill = no
	}
	
	mean_time_to_happen = {
		days = 300
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.2	#pytanko
		set_character_flag = byzsla_slavic_mokosz_start_flagax
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.2	#pytanko
	}
}

#byzsla_slavic_event_mokosz.13 - Crka chce specjaln sukni

character_event = {
	id = byzsla_slavic_event_mokosz.13
	desc = desc_byzsla_slavic_event_mokosz.13

	picture = GFX_evt_daughter_asking_father
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		religion = slavic_pagan_reformed
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga_zref
			NOT = { has_character_flag = byzsla_slavic_mokosz_suknia_flaga_zref }
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref }
		}
	}
	
	mean_time_to_happen = {
		days = 20
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.13	#Oczywicie ukochana crko
		trigger = {
			NOT = {
				trait = greedy
			}
		}
		treasury = -5
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref }
				NOT = { has_character_flag = byzsla_slavic_mokosz_suknia_flaga_zref }
			}
			prestige = 5
			if = {
				limit = {
					OR = {
						NOT = { prestige = 0 }
						trait = fair
					}
					prestige = 10
				}
			}
			set_character_flag = byzsla_slavic_mokosz_suknia_flaga_zref
			opinion = {
				who = ROOT
				modifier = opinion_family_love 
				years = 5
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.13	#Masz ju dobr sukni
		trigger = {
			NOT = {
				trait = greedy
			}
		}
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref }
				NOT = { has_character_flag = byzsla_slavic_mokosz_suknia_flaga_zref }
			}
			prestige = -10
			set_character_flag = byzsla_slavic_mokosz_suknia_flaga_zref
			opinion = {
				who = ROOT
				modifier = opinion_contempt 
				years = 5 
			}
		}
		random = {
			chance = 10
			add_trait = greedy
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.13	#Nie mam pienidzy na gupoty
		tooltip_info = greedy
		trigger = {
			trait = greedy
		}
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref }
				NOT = { has_character_flag = byzsla_slavic_mokosz_suknia_flaga_zref }
			}
			set_character_flag = byzsla_slavic_mokosz_suknia_flaga_zref
			prestige = -20
			opinion = {
				who = ROOT
				modifier = insulted
				years = 8
			}
		}
		random = {
			chance = 50
			add_trait = cynical
		}
	}
}

#byzsla_slavic_event_mokosz.14 - Rozpoczcie

character_event = {
	id = byzsla_slavic_event_mokosz.14
	desc = desc_byzsla_slavic_event_mokosz.14

	picture = GFX_evt_brothel
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		religion = slavic_pagan_reformed
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga_zref
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref }
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.14	#ot ruszyo
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
		}
	}
}

#byzsla_slavic_event_mokosz.15 - Crka zostaje motylem

character_event = {
	id = byzsla_slavic_event_mokosz.15
	desc = desc_byzsla_slavic_event_mokosz.15

	picture = GFX_evt_brothel
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		religion = slavic_pagan_reformed
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
			NOT = { trait = byzsla_motyl }
		}
	}
	
	mean_time_to_happen = {
		days = 100
		modifier = {
			factor = 0.02
			trait = fair
		}
		modifier = {
			factor = 100
			OR = {
				trait = ugly
				trait = clubfooted
				trait = harelip
				trait = hunchback
				trait = lisp
				trait = slow
				trait = inbred
				trait = weak
			}
		}
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.15	#fajno
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				NOT = { trait = byzsla_motyl }
			}
			add_trait = byzsla_motyl
			prestige = 100
			random = {
				chance = 20
				add_trait = stressed
			}
			random = {
				chance = 50
				add_trait = zealous
			}
		}
	}
}

#byzsla_slavic_event_mokosz.16 - Rytua przebiega pomylnie

character_event = {
	id = byzsla_slavic_event_mokosz.16
	desc = desc_byzsla_slavic_event_mokosz.16

	picture = GFX_evt_pagan
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
		}
		religion = slavic_pagan_reformed
	}
	
	mean_time_to_happen = {
		months = 1
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.16	#No to koniec
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga3_zref
			random = {
				chance = 30
				piety = 100
			}
			if = {
				limit = {
					prestige = 110
				}
				add_trait = proud
			}
		}
		prestige = 30
		random = {
			chance = 30
			piety = 30
		}
		capital_scope = {
			add_province_modifier = {
				name = byzsla_mokosz_mod_1
				months = 12
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.16	#Okazja na podatek
		tooltip_info = greedy
		trigger = {
			trait = greedy
		}
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga3_zref
			random = {
				chance = 30
				piety = 50
			}
			if = {
				limit = {
					prestige = 110
				}
				add_trait = proud
			}
		}
		random = {
			chance = 30
			piety = -30
		}
		treasury = 70
		capital_scope = {
			add_province_modifier = {
				name = byzsla_mokosz_mod_1
				months = 9
			}
		}
	}
}

#byzsla_slavic_event_mokosz.17 - Rytua przebieg niepomylnie

character_event = {
	id = byzsla_slavic_event_mokosz.17
	desc = desc_byzsla_slavic_event_mokosz.17

	picture = GFX_evt_pagan
	
	religion_group = pagan_group
	only_rulers = yes
	trigger = {
		any_child = {
			has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
			NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
		}
		religion = slavic_pagan_reformed
	}
	
	mean_time_to_happen = {
		months = 3
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.17	#No to zy koniec
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
			}
			set_character_flag = byzsla_slavic_mokosz_start_flaga3_zref
			random = {
				chance = 30
				piety = -50
			}
			if = {
				limit = {
					trait = byzsla_motyl
				}
				prestige = -200
			}
			random = {
				chance = 10
				add_trait = cynical
			}
			random = {
				chance = 1
				add_trait = possessed
			}
		}
		prestige = -30
		random = {
			chance = 50
			piety = -30
		}
		random = {
			chance = 10
			add_trait = cynical
		}
		any_realm_character = {
			limit = {
				religion = ROOT
				NOT = {
					is_friend = ROOT
				}
			}
			opinion = { 
				modifier = byzsla_op_mod_zertwa_fail 
				who = ROOT 
				years = 3
			}
		}
	}
}

#byzsla_slavic_event_mokosz.18 - Zamachowiec strzela do crki

character_event = {
	id = byzsla_slavic_event_mokosz.18
	desc = desc_byzsla_slavic_event_mokosz.8

	picture = GFX_evt_longbowman
	
	capable_only = yes
	only_men = yes
	
	trigger = {
		religion = slavic_pagan_reformed
		any_courtier = {
			has_plot = plot_kill_character
			plot_target_char = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
			}
		}
	}
	
	mean_time_to_happen = {
		days = 100
		modifier = {
			factor = 0
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				NOT = { plot_power = 30 }
			}
		}
		modifier = {
			factor = 0
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				trait = craven
			}
		}
		modifier = {
			factor = 0.9
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				OR = {
					trait = brave
					trait = cynical
				}
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				plot_power = 0.60
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				plot_power = 0.90
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				plot_power = 1.20
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				plot_power = 1.60
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				plot_power = 2.20
			}
		}
		modifier = {
			factor = 0.8
			any_courtier = {
				has_plot = plot_kill_character
				plot_target_char = {
					has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
					NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
				}
				plot_power = 3.00
			}
		}
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.8	#mier
		random_child = {
			limit = {
				has_character_flag = byzsla_slavic_mokosz_start_flaga2_zref
				NOT = { has_character_flag = byzsla_slavic_mokosz_start_flaga3_zref }
			}
			death = {
				death_reason = death_murder_unknown
			}
		}
		prestige = -30
		random = {
			chance = 50
			piety = -30
		}
		random = {
			chance = 10
			add_trait = cynical
		}
		random = {
			chance = 10
			add_trait = depressed
		}
	}
}

#### Czary na podno - wersja prymitywna

#byzsla_slavic_event_mokosz.21 - Przysza wiedma Mokoszy i oferuje czary na podno

character_event = {
	id = byzsla_slavic_event_mokosz.21
	desc = desc_byzsla_slavic_event_mokosz.21
	
	picture = GFX_evt_princess_byzantine
	
	religion_group = pagan_group
	trigger = {
		is_female  = no
		any_demesne_title = {
			is_occupied = no
		}
		NOT = {
			month = 8
		}
		month = 9
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_start }
		NOT = { trait = in_hiding }
		NOT = { trait = incapable }
		NOT = { trait = celibate }
		NOT = { trait = eunuch }
		is_ill = no
		has_regent = no
		in_command = no
		prisoner = no
		OR = {
			religion = slavic_pagan
			religion = old_slavic_pagan
		}
		capital_scope = {
			NOT = {
				OR = {
					has_province_modifier = byzsla_mokosz_timer_1
					has_province_modifier = byzsla_mokosz_mod_1
				}
			}
		}
		is_ruler = yes
		num_of_children = 0
		NOT = { fertility = 0.8 }
		any_spouse = {
			is_female = yes
			age = 35
			OR = {
				religion = slavic_pagan
				religion = old_slavic_pagan
			}
			prisoner = no
			NOT = { trait = in_hiding }
			NOT = { trait = incapable }
			NOT = { trait = celibate }
			is_ill = no
			num_of_children = 0
			NOT = { fertility = 0.8 }
		}
	}
	
	mean_time_to_happen = {
		days = 300
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.21	#sprbujemy
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_start
		any_spouse = {
			add_trait = byzsla_slavic_rytual
		}
		treasury = -30
		any_spouse = {
			limit = {
				trait = cynical
			}
			opinion = {
				modifier = byzsla_op_mod_mokosz_3
				who = ROOT
				years = 10
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.21	#nie wierz w czary
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
		piety = -10
		any_spouse = {
			limit = {
				trait = zealous
			}
			opinion = {
				modifier = byzsla_op_mod_mokosz_3
				who = ROOT
				years = 10
			}
		}
	}
}

#byzsla_slavic_event_mokosz.22 - Czary-mary

character_event = {
	id = byzsla_slavic_event_mokosz.22
	desc = desc_byzsla_slavic_event_mokosz.22
	
	picture = GFX_evt_garden
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.22	#czary-mary
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_kont
	}
}

#byzsla_slavic_event_mokosz.23 - Rytua przebieg bez problemw

character_event = {
	id = byzsla_slavic_event_mokosz.23
	desc = desc_byzsla_slavic_event_mokosz.23
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	picture = GFX_evt_garden
	
	mean_time_to_happen = {
		days = 2
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.23	#dziekujemy
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec
		any_spouse = {
			limit = {
				trait = byzsla_slavic_rytual
			}
			random = {
				chance = 20
				fertility = 0.2
			}
			remove_trait = byzsla_slavic_rytual
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.23	#zapro wiedm na dwr
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec
		any_spouse = {
			limit = {
				trait = byzsla_slavic_rytual
			}
			random = {
				chance = 20
				fertility = 0.2
			}
			remove_trait = byzsla_slavic_rytual
		}
		create_character = {
			dynasty = none
			religion = ROOT
			culture = ROOT
			female = yes
			age = 60
			health = 15
			trait = mastermind_theologian
			trait = mystic
			trait = celibate
			trait = ugly
			trait = hunchback
			attributes = {
				learning = 20
			}
		}
		new_character = {
			add_friend = ROOT
			treasury = 100
			ROOT = {
				add_favor = PREV
			}
		}
	}
}

#byzsla_slavic_event_mokosz.24 - Problemy

character_event = {
	id = byzsla_slavic_event_mokosz.24
	desc = desc_byzsla_slavic_event_mokosz.24
	
	picture = GFX_evt_illness
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 4
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.24	#mier
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec
		any_spouse = {
			limit = {
				trait = byzsla_slavic_rytual
			}
			piety = -100
			random_list = {
				70 = {
					death = {
						death_reason = death_accident
					}
				}
				10 = { 
					add_trait = depressed
				}
				10 = { 
					add_trait = lunatic
				}
				10 = { 
					add_trait = possessed
				}
			}
			remove_trait = byzsla_slavic_rytual
		}
		if = {
			limit = {
				trait = zealous
				NOT = { piety = 200 }
			}
			remove_trait = zealous
		}
		if = {
			limit = {
				NOT = { trait = zealous }
				NOT = { trait = cynical }
			}
			random = {
				chance = 30
				add_trait = cynical
			}
		}
	}
}

#### Czary na podno - wersja zreformowana

#byzsla_slavic_event_mokosz.31 - Problemy z podnoci (ona)

character_event = {
	id = byzsla_slavic_event_mokosz.31
	desc = desc_byzsla_slavic_event_mokosz.31
	
	picture = GFX_evt_princess_byzantine
	
	religion_group = pagan_group
	trigger = {
		is_female = no
		any_demesne_title = {
			is_occupied = no
		}
		OR = {
			AND = {
				year = 800
				NOT = { year = 801 }
			}
			AND = {
				year = 850
				NOT = { year = 851 }
			}
			AND = {
				year = 900
				NOT = { year = 901 }
			}
			AND = {
				year = 950
				NOT = { year = 951 }
			}
			AND = {
				year = 1000
				NOT = { year = 1001 }
			}
			AND = {
				year = 1050
				NOT = { year = 1051 }
			}
			AND = {
				year = 1100
				NOT = { year = 1101 }
			}
			AND = {
				year = 1150
				NOT = { year = 1151 }
			}
			AND = {
				year = 1200
				NOT = { year = 1201 }
			}
			AND = {
				year = 1250
				NOT = { year = 1251 }
			}
			AND = {
				year = 1300
				NOT = { year = 1301 }
			}
			AND = {
				year = 1350
				NOT = { year = 1351 }
			}
			AND = {
				year = 1400
				NOT = { year = 1401 }
			}
			AND = {
				year = 1450
				NOT = { year = 1451 }
			}
		}
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_start }
		NOT = { trait = in_hiding }
		NOT = { trait = incapable }
		NOT = { trait = celibate }
		NOT = { trait = eunuch }
		is_ill = no
		has_regent = no
		in_command = no
		prisoner = no
		religion = slavic_pagan_reformed
		capital_scope = {
			NOT = {
				OR = {
					has_province_modifier = byzsla_mokosz_timer_1
					has_province_modifier = byzsla_mokosz_mod_1
				}
			}
		}
		is_ruler = yes
		num_of_children = 0
		NOT = { fertility = 0.8 }
		any_spouse = {
			is_female = yes
			age = 35
			religion = slavic_pagan_reformed
			prisoner = no
			NOT = { trait = in_hiding }
			NOT = { trait = incapable }
			NOT = { trait = celibate }
			is_ill = no
			num_of_children = 0
			NOT = { fertility = 0.8 }
		}
	}
	
	mean_time_to_happen = {
		days = 700
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.21	#sprbujemy
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_start
		any_spouse = {
			add_trait = byzsla_slavic_rytual
		}
		treasury = -30
		any_spouse = {
			limit = {
				trait = cynical
			}
			opinion = {
				modifier = byzsla_op_mod_mokosz_3
				who = ROOT
				years = 10
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.21	#nie wierz w czary
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
		piety = -10
		any_spouse = {
			limit = {
				trait = zealous
			}
			opinion = {
				modifier = byzsla_op_mod_mokosz_3
				who = ROOT
				years = 10
			}
		}
	}
}

#byzsla_slavic_event_mokosz.32 - Problemy z podnoci (krlowa)

character_event = {
	id = byzsla_slavic_event_mokosz.32
	desc = desc_byzsla_slavic_event_mokosz.32
	
	picture = GFX_evt_princess_byzantine
	
	religion_group = pagan_group
	trigger = {
		is_female = yes
		age = 35
		any_demesne_title = {
			is_occupied = no
		}
		OR = {
			AND = {
				year = 800
				NOT = { year = 801 }
			}
			AND = {
				year = 850
				NOT = { year = 851 }
			}
			AND = {
				year = 900
				NOT = { year = 901 }
			}
			AND = {
				year = 950
				NOT = { year = 951 }
			}
			AND = {
				year = 1000
				NOT = { year = 1001 }
			}
			AND = {
				year = 1050
				NOT = { year = 1051 }
			}
			AND = {
				year = 1100
				NOT = { year = 1101 }
			}
			AND = {
				year = 1150
				NOT = { year = 1151 }
			}
			AND = {
				year = 1200
				NOT = { year = 1201 }
			}
			AND = {
				year = 1250
				NOT = { year = 1251 }
			}
			AND = {
				year = 1300
				NOT = { year = 1301 }
			}
			AND = {
				year = 1350
				NOT = { year = 1351 }
			}
			AND = {
				year = 1400
				NOT = { year = 1401 }
			}
			AND = {
				year = 1450
				NOT = { year = 1451 }
			}
		}
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec_reforma }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma }
		NOT = { trait = in_hiding }
		NOT = { trait = incapable }
		NOT = { trait = celibate }
		NOT = { trait = byzsla_slavic_rytual }
		is_ill = no
		has_regent = no
		in_command = no
		prisoner = no
		religion = slavic_pagan_reformed
		capital_scope = {
			NOT = {
				OR = {
					has_province_modifier = byzsla_mokosz_timer_1
					has_province_modifier = byzsla_mokosz_mod_1
				}
			}
		}
		is_ruler = yes
		num_of_children = 0
		NOT = { fertility = 0.8 }
	}
	
	mean_time_to_happen = {
		days = 700
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.21	#sprbujemy
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.21	#nie wierz w czary
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_mokosz_timer_1
				hidden = yes
				months = 60
			}
		}
		piety = -10
	}
}

#byzsla_slavic_event_mokosz.33 - Pytanie do ercy

character_event = {
	id = byzsla_slavic_event_mokosz.33
	desc = desc_byzsla_slavic_event_mokosz.33
	
	picture = GFX_evt_pagan
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma2 }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.33	#pytanko
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma
		if = {
			limit = {
				any_realm_character = {
					is_theocracy = yes 
					religion = slavic_pagan_reformed
				}
			}
			random_realm_character = {
				limit = {
					is_theocracy = yes 
					religion = slavic_pagan_reformed
				}
				set_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma_pytanko
			}
		}
	}
}

#byzsla_slavic_event_mokosz.34 - Odmowa udzielenia pomocy

character_event = {
	id = byzsla_slavic_event_mokosz.34
	desc = desc_byzsla_slavic_event_mokosz.34
	
	picture = GFX_evt_pagan
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma2 }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.34	#szkoda
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec
		random = {
			chance = 1
			add_trait = depressed
		}
		any_spouse = {
			random = {
				chance = 1
				add_trait = depressed
			}
		}
		if = {
			limit = {
				any_realm_character = {
					is_theocracy = yes 
					religion = slavic_pagan_reformed
					has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma_pytanko
				}
			}
			random_realm_character = {
				limit = {
					is_theocracy = yes 
					religion = slavic_pagan_reformed
					has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma_pytanko
				}
				clr_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma_pytanko
			}
		}
	}
}

#byzsla_slavic_event_mokosz.35 - Zgoda na udzielenie pomocy

character_event = {
	id = byzsla_slavic_event_mokosz.35
	desc = desc_byzsla_slavic_event_mokosz.35
	
	picture = GFX_evt_pagan
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma2 }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.35	#szkoda
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma2
		if = {
			limit = {
				is_female = yes
			}
			add_trait = byzsla_slavic_rytual
		}
		if = {
			limit = {
				is_female = no
			}
			any_spouse = {
				add_trait = byzsla_slavic_rytual
			}
		}
	}
}

#byzsla_slavic_event_mokosz.36 - Czary-mary tura 1

character_event = {
	id = byzsla_slavic_event_mokosz.36
	desc = desc_byzsla_slavic_event_mokosz.36
	
	picture = GFX_evt_shadow
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma2
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma3 }
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.36	#czary-mary
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma3
	}
}

#byzsla_slavic_event_mokosz.38 - Wstyd

character_event = {
	id = byzsla_slavic_event_mokosz.38
	desc = desc_byzsla_slavic_event_mokosz.38
	
	picture = GFX_evt_shadow
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma2
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma3
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 5
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.36	#wstyd
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec
		if = {
			limit = {
				trait = byzsla_slavic_rytual
			}
			random = {
				chance = 80
				fertility = 0.2
			}
			prestige = -100
			remove_trait = byzsla_slavic_rytual
			any_realm_character = {
				limit = {
					is_theocracy = yes 
					religion = slavic_pagan_reformed
					has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma_pytanko
				}
				ROOT = {
					create_character = {
						age = 0
						trait = bastard
						health = 10
						fertility = 0.8
						random_traits = no
					}
					new_character = {
						set_mother = ROOT
						set_father = PREV
						add_trait = fair
					}
				}
			}
		}
		if = {
			limit = {
				any_spouse = {
					trait = byzsla_slavic_rytual
				}
			}
			any_spouse = {
				limit = {
					trait = byzsla_slavic_rytual
				}
				random = {
					chance = 80
					fertility = 0.2
				}
				prestige = -100
				remove_trait = byzsla_slavic_rytual
				ROOT = {
					any_realm_character = {
						limit = {
						is_theocracy = yes 
						religion = slavic_pagan_reformed
						has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma_pytanko
						}
						ROOT = {
							create_character = {
								age = 0
								trait = bastard
								health = 10
								fertility = 0.8
								random_traits = no
							}
							new_character = {
								set_mother = PREVPREVPREVPREV
								set_father = PREVPREV
								add_trait = fair
							}
						}
					}
				}
			}
		}
	}
}

#byzsla_slavic_event_mokosz.39 - Koniec

character_event = {
	id = byzsla_slavic_event_mokosz.39
	desc = desc_byzsla_slavic_event_mokosz.39
	
	picture = GFX_evt_lovers
	
	religion_group = pagan_group
	trigger = {
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_start_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma2
		has_character_flag = byzsla_slavic_mokosz_czary_flaga_kont_reforma3
		NOT = { has_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec }
	}
	
	mean_time_to_happen = {
		days = 2
	}
	
	option = {
		name = optA_byzsla_slavic_event_mokosz.39	#dobrze
		set_character_flag = byzsla_slavic_mokosz_czary_flaga_koniec
		if = {
			limit = {
				trait = byzsla_slavic_rytual
			}
			random = {
				chance = 60
				fertility = 0.2
			}
			prestige = 50
			piety = 50
			remove_trait = byzsla_slavic_rytual
		}
		if = {
			limit = {
				any_spouse = {
					trait = byzsla_slavic_rytual
				}
			}
			any_spouse = {
				limit = {
					trait = byzsla_slavic_rytual
				}
				random = {
					chance = 60
					fertility = 0.2
				}
				prestige = 50
				piety = 50
				remove_trait = byzsla_slavic_rytual
			}
		}
	}
}


#### Mokosz heretycka
#byzsla_slavic_event_mokosz.41 - Niszczenie ziemi

province_event = {
	id = byzsla_slavic_event_mokosz.41
	desc = desc_byzsla_slavic_event_mokosz.41
	
	picture = GFX_evt_heretic

	trigger = {
		OR = {
			religion = chram_vales
			religion = slavic_pagan
			religion = old_slavic_pagan
			religion = slavic_pagan_reformed
			religion = chram_roda
		}
		month = 7
		NOT = {
			month = 9
		}
		owner = {
			NOT = {
				has_character_modifier = byzsla_mokosz_timer_2
			}
			capital_scope = {
				NOT = {
					has_province_modifier = byzsla_mokosz_timer_2
					has_province_modifier = byzsla_mokosz_timer_1
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 60
		modifier = {
			factor = 0.9
			religion = chram_vales
		}
	}
	immediate = {
		owner = {
			capital_scope = {
				add_province_modifier = {
					modifier = byzsla_mokosz_timer_2
					hidden = yes
					months = 60
				}
			}
		}
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.41	#zwalczaj
		trigger = {
			NOT = {
				owner = {
					religion = chram_vales
					trait = zealous
				}
			}
		}
		add_province_modifier = {
			modifier = peasants_scorned
			months = 60
		}
		owner = { 
			if = {
				limit = { is_tribal = yes } 
				wealth = -12
			}
			if = {
				limit = { NOT = { is_tribal = yes } }
				wealth = -35
			}
		}
		if = {
			limit = {
				owner = {
					NOT = {
						religion_group = pagan_group
					}
				}
			}
			owner = {
				piety = 20
			}
		}
		if = {
			limit = {
				owner = {
					religion = chram_vales
				}
			}
			owner = {
				piety = -40
			}
		}
		if = {
			limit = {
				owner = {
					trait = arbitrary
				}
			}
			owner = {
				prestige = 15
			}
		}
		if = {
			limit = {
				is_reformed_religion = yes
				NOT = { religion = chram_vales }
			}
			random = {
				chance = 5
				religion = chram_vales
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.41	#zostaw
		add_province_modifier = {
			modifier = byzsla_mokosz_timer_2
			hidden = yes
			months = 60
		}
		if = {
			limit = {
				is_reformed_religion = yes
				NOT = { religion = chram_vales }
			}
			random = {
				chance = 5
				religion = chram_vales
			}
		}
		
		if = {
			limit = {
				owner = { NOT = { is_nomadic = yes } }
			}
			add_province_modifier = {
				modifier = byzsla_mokosz_mod_2
				months = 36
			}
		}
		if = {
			limit = {
				owner = { is_nomadic = yes }
			}
			add_province_modifier = {
				modifier = horda_byzsla_mokosz_mod_2
				months = 36
			}
		}
		if = {
			limit = {
				owner = {
					NOT = {
						religion_group = pagan_group
					}
				}
			}
			owner = {
				piety = -10
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_mokosz.41	#wspieraj
		trigger = {
			owner = {
				religion = chram_vales
			}
		}
		add_province_modifier = {
			modifier = byzsla_mokosz_timer_2
			hidden = yes
			months = 60
		}
		if = {
			limit = {
				NOT = { religion = chram_vales }
			}
			religion = chram_vales
		}
		if = {
			limit = {
				owner = { NOT = { is_nomadic = yes } }
			}
			add_province_modifier = {
				modifier = byzsla_mokosz_mod_2
				months = 36
			}
		}
		if = {
			limit = {
				owner = { is_nomadic = yes }
			}
			add_province_modifier = {
				modifier = horda_byzsla_mokosz_mod_2
				months = 36
			}
		}
		owner = {
			piety = 100
			add_character_modifier = {
				modifier = stay_strong
				months = 36
			}
		}
	}
}

#byzsla_slavic_event_mokosz.42 - Ofiara z czowieka

province_event = {
	id = byzsla_slavic_event_mokosz.42
	desc = desc_byzsla_slavic_event_mokosz.42
	
	picture = GFX_evt_heretic

	trigger = {
		OR = {
			religion = chram_vales
			religion = slavic_pagan
			religion = old_slavic_pagan
		}
		month = 8
		NOT = {
			month = 9
		}
		NOR = {
			has_province_modifier = byzsla_mokosz_mod_2
			has_province_modifier = horda_byzsla_mokosz_mod_2
		}
		owner = {
			OR = {
				religion = chram_vales
				religion = slavic_pagan
				religion = old_slavic_pagan
			}
			capital_scope = {
				NOT = {
					has_province_modifier = byzsla_mokosz_timer_2
					has_province_modifier = byzsla_mokosz_timer_1
				}
			}
			num_of_prisoners = 1
		}
	}
	
	mean_time_to_happen = {
		months = 50
		modifier = {
			factor = 0.9
			religion = chram_vales
		}
	}
	option = {
		name = optA_byzsla_slavic_event_mokosz.42	#zaofiaruj
		add_province_modifier = {
			modifier = byzsla_mokosz_timer_2
			hidden = yes
			months = 60
		}
		add_province_modifier = {
			modifier = temple_corruption
			months = 12
		}
		owner = {
			random_courtier = {
				limit = {
					prisoner = yes
				}
				death = {
					killer = PREV
					death_reason = death_sacrificed
				}
				if = {
					limit = { dynasty = PREV }
					PREV = {
						add_trait = kinslayer
					}
				}
			}
		}
		if = {
			limit = {
				owner = {
					religion = chram_vales
				}
			}
			owner = {
				piety = 100
			}
		}
		if = {
			limit = {
				owner = {
					NOT = { religion = chram_vales }
				}
			}
			owner = {
				piety = 30
			}
		}
		if = {
			limit = {
				is_reformed_religion = yes
				NOT = { religion = chram_vales }
			}
			random = {
				chance = 1
				religion = chram_vales
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_mokosz.42	#odmw
		add_province_modifier = {
			modifier = byzsla_mokosz_timer_2
			hidden = yes
			months = 60
		}
		
		if = {
			limit = {
				owner = { NOT = { is_nomadic = yes } }
			}
			add_province_modifier = {
				modifier = byzsla_mokosz_mod_2
				months = 36
			}
		}
		if = {
			limit = {
				owner = { is_nomadic = yes }
			}
			add_province_modifier = {
				modifier = horda_byzsla_mokosz_mod_2
				months = 36
			}
		}
	}
}

#byzsla_slavic_event_mokosz.43 - Mio i nienawi motyli

character_event = {
	id = byzsla_slavic_event_mokosz.43
	hide_window = yes
	
	min_age = 16
	max_age = 35
	only_men = no
	capable_only = yes
	prisoner = no
	religion_group = pagan_group
	ai = yes
	
	is_triggered_only = yes
	
	trigger = {
		NOT = { 
			trait = incapable 
			trait = wounded
			is_maimed_trigger = yes
			is_ill = yes
		}
		trait = byzsla_motyl
		OR = {
			any_independent_ruler = {
				ai = yes
				trait = byzsla_motyl
				NOT = { num_of_lovers = 2 }
				NOT = { num_of_rivals = 2 }
			}
			any_independent_ruler = {
				any_realm_character = {
					ai = yes
					trait = byzsla_motyl
					NOT = { num_of_lovers = 2 }
					NOT = { num_of_rivals = 2 }
				}
			}
		}
		NOT = { num_of_lovers = 2 }
		NOT = { num_of_rivals = 2 }
	}
	immediate = {
		random_list = {
			30 = { 
				add_trait = homosexual
				random_independent_ruler = {
					limit = {
						ai = yes
						trait = byzsla_motyl
						NOT = { num_of_lovers = 2 }
						NOT = { num_of_rivals = 2 }
					}
					add_trait = homosexual
					add_lover = ROOT
				}
			}
			30 = { 
				random_independent_ruler = {
					limit = {
						ai = yes
						trait = byzsla_motyl
						NOT = { num_of_lovers = 2 }
						NOT = { num_of_rivals = 2 }
					}
					add_rival = ROOT
				}
			}
			30 = { 
				random_independent_ruler = {
					random_realm_character = {
						limit = {
							ai = yes
							trait = byzsla_motyl
							NOT = { num_of_lovers = 2 }
							NOT = { num_of_rivals = 2 }
						}
						add_rival = ROOT
					}
				}
			}
			30 = { 
				add_trait = homosexual
				random_independent_ruler = {
					random_realm_character = {
						limit = {
							ai = yes
							trait = byzsla_motyl
							NOT = { num_of_lovers = 2 }
							NOT = { num_of_rivals = 2 }
						}
						add_trait = homosexual
						add_lover = ROOT
					}
				}
			}
		}
	}
}