namespace = byzsla_slavic_event_potwory

############################
#### Wampirza histeria
#byzsla_slavic_event_potwory.1 - Wampirza histeria początek
#byzsla_slavic_event_potwory.2 - Redukcja strachu przez list
#byzsla_slavic_event_potwory.3 - List nic nie pomógł
#byzsla_slavic_event_potwory.4 - Napaść na świątynię
#byzsla_slavic_event_potwory.5 - Rzeź w mieście
#byzsla_slavic_event_potwory.6 - Oskarżenie władcy o wampiryzm
#byzsla_slavic_event_potwory.7 - porwanie dziecka przez utopca (inicjacja)
#byzsla_slavic_event_potwory.8 - porwanie dziecka przez utopca (ping)
#byzsla_slavic_event_potwory.9 - dziecko nieodnalezione
#byzsla_slavic_event_potwory.10 - dziecko odnalezione, ze skazą (przerażone, okrutne)
#byzsla_slavic_event_potwory.11 - dziecko odnalezione, bez skazy
#byzsla_slavic_event_potwory.12 - dziecko ze skazą wariuje (lunatyzm)
#byzsla_slavic_event_potwory.13 - zwariowane dziecko ze skazą idzie do wodnego świata
#byzsla_slavic_event_potwory.14 - powrót zwariowanego dziecka ze skazą jako nieśmiertelnego lorda potworów
#byzsla_slavic_event_potwory.15 - pożeranie, ping
#byzsla_slavic_event_potwory.16 - brak efektu
#byzsla_slavic_event_potwory.17 - wzrost mocy
#byzsla_slavic_event_potwory.18 - szaleństwo
############################

character_event = {
	id = byzsla_slavic_event_potwory.1
	desc = desc_byzsla_slavic_event_potwory.1
	
	picture = GFX_evt_bad_news
	
	only_playable = yes
	trigger = {
		any_demesne_province = {
			OR = {
				culture_group = east_slavic 
				culture_group = west_slavic
				culture_group = south_slavic
				is_slav_religion = yes
			}
			NOT = {
				has_province_modifier = byzsla_potwory_timer
			}
		}
	}
	
	mean_time_to_happen = {
		months = 650
		modifier = {
			factor = 0.8
			ai = no
		}
		modifier = {
			factor = 0.7
			any_demesne_province = {
				is_slav_religion = yes
				OR = {
					culture_group = east_slavic 
					culture_group = west_slavic
					culture_group = south_slavic
				}
			}
		}
	}
	
	immediate = {
		random_demesne_province = {
			limit = {
				OR = {
					culture_group = east_slavic 
					culture_group = west_slavic
					culture_group = south_slavic
					is_slav_religion = yes
				}
				NOT = {
					has_province_modifier = byzsla_potwory_timer
				}
			}
			add_province_modifier = {
				modifier = byzsla_potwory_timer
				hidden = yes
				duration = 4320
			}
		}
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_ogolny_timer
				hidden = yes
				duration = 150
			}
		}
	}
	
	option = {
		name = optA_byzsla_slavic_event_potwory.1	#Brak akcji
		if = {
			limit = {
				NOT = { is_nomadic = yes }
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = byzsla_wampiry
					duration = 360
				}
			}
		}
		if = {
			limit = {
				is_nomadic = yes
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = horda_byzsla_wampiry
					duration = 360
				}
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_potwory.1	#Ogarnia mnie strach
		custom_tooltip = {
			text = byzsla_potwory_TT_1
		}
		if = {
			limit = {
				NOT = { is_nomadic = yes }
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = byzsla_wampiry
					duration = 420
				}
			}
		}
		if = {
			limit = {
				is_nomadic = yes
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = horda_byzsla_wampiry
					duration = 420
				}
			}
		}
		set_character_flag = byzsla_niewampir
		if = {
			limit = {
				NOT = { is_nomadic = yes }
			}
			add_province_modifier = {
				name = byzsla_wampiry
				duration = 420
			}
		}
		prestige = -20
		any_vassal = {
			opinion = { 
				modifier = byzsla_op_mod_strachajlo
				who = ROOT 
				days = 3650
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_potwory.1	#oficjalne pismo, że wampiry nie istnieją
		trigger = {
			NOT = {
				trait = paranoid
				trait = craven
			}
			OR = {
				trait = cynical
				NOT = { is_slav_religion = yes }
			}
		}
		custom_tooltip = { text = byzsla_potwory_TT_1 }
		treasury = -20
		hidden_tooltip = {
			random_list = {
				50 = { character_event = { id = byzsla_slavic_event_potwory.3 days = 7 } }
				20 = { character_event = { id = byzsla_slavic_event_potwory.2 days = 7 } }
			}
		}
	}
	
}

#byzsla_slavic_event_potwory.2 - Redukcja strachu przez list

character_event = {
	id = byzsla_slavic_event_potwory.2
	desc = desc_byzsla_slavic_event_potwory.2
	
	picture = GFX_evt_garden
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_potwory.2
		prestige = 20
	}
}

#byzsla_slavic_event_potwory.3 - List nic nie pomógł

character_event = {
	id = byzsla_slavic_event_potwory.3
	desc = desc_byzsla_slavic_event_potwory.3
	
	picture = GFX_evt_bad_news
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_potwory.3
		random_demesne_province = {
			limit = {
				has_province_modifier = byzsla_potwory_timer
				NOT = { has_province_modifier = byzsla_wampiry }
			}
			add_province_modifier = {
				modifier = byzsla_wampiry
				months = 48
			}
		}
		add_character_modifier = {
			modifier = disloyal_peasantry 
			months = 48
		}
		prestige = -50
		any_vassal = {
			opinion = {
				modifier = byzsla_op_mod_nieudolnosc
				who = ROOT
				months = 36
			}
		}
	}
}

#byzsla_slavic_event_potwory.4 - Napaść na świątynię

province_event = {
	id = byzsla_slavic_event_potwory.4
	desc = desc_byzsla_slavic_event_potwory.4
	
	picture = GFX_evt_bad_news
	
	trigger = {
		has_province_modifier = byzsla_wampiry
		any_province_holding = {
			holding_type = temple
		}
	}
	
	mean_time_to_happen = {
		months = 50
	}
	option = {
		name = optA_byzsla_slavic_event_potwory.4
		any_province_holding = {
			limit = {
				holding_type = temple
			}
			destroy_random_building = yes
			owner = {
				random = {
					chance = 40
					death = {
						death_reason = death_rabble
					}
				}
			}
		}
		add_province_modifier = {
			modifier = burnt_the_land
			duration = 720
		}
		 owner = {
			piety = -50
			prestige = -50
			religion_authority = {
				modifier = temple_looted
				years = 3
			}
		 }
	}
}

#byzsla_slavic_event_potwory.5 - Rzeź w mieście

province_event = {
	id = byzsla_slavic_event_potwory.5
	desc = desc_byzsla_slavic_event_potwory.5
	
	picture = GFX_evt_bad_news
	
	trigger = {
		has_province_modifier = byzsla_wampiry
		any_province_holding = {
			holding_type = city
		}
	}
	
	mean_time_to_happen = {
		months = 50
	}
	option = {
		name = optA_byzsla_slavic_event_potwory.5
		any_province_holding = {
			limit = {
				holding_type = city
			}
			destroy_random_building = yes
			owner = {
				random = {
					chance = 40
					death = {
						death_reason = death_rabble
					}
				}
				treasury = -100
			}
		}
		add_province_modifier = {
			name = merchants_unhappy
			duration = 1500
		}
		 owner = {
			prestige = -50
		 }
	}
}

#byzsla_slavic_event_potwory.6 - Oskarżenie władcy o wampiryzm


character_event = {
	id = byzsla_slavic_event_potwory.6
	desc = desc_byzsla_slavic_event_potwory.6
	
	picture = GFX_evt_bad_news
	
	min_age = 20
	only_rulers = yes
	
	trigger = {
		NOT = {
			has_character_flag = byzsla_niewampir
		}
		any_demesne_province = {
			has_province_modifier = byzsla_wampiry
		}
	}
	is_triggered_only = yes
	option = {
		name = optA_byzsla_slavic_event_potwory.5
		random = {
			chance = 33
			give_nickname = nick_the_black
		}
		prestige = -100
		piety = -100
		add_character_modifier = {
			name = byzsla_wampiry2
			duration = 1500
		}
	}
}

#byzsla_slavic_event_potwory.7 - porwanie dziecka przez utopca (inicjacja)

character_event = {
	id = byzsla_slavic_event_potwory.7
	desc = desc_byzsla_slavic_event_potwory.7
	hide_window = yes
	
	picture = GFX_evt_byzsla_topielica
	
	max_age = 15
	
	trigger = {
		is_slav_religion = yes
		any_close_relative = { 
			ROOT = { is_child_of = PREV }
			is_ruler = yes 
			is_slav_religion = yes
			any_child = {
				NOT = { has_character_flag = byzsl_utopiec_flaga }
			}
		}
	}
	is_triggered_only = yes
	immediate = {
		random_close_relative = {
			limit = {
				ROOT = { is_child_of = PREV }
				is_ruler = yes 
				is_slav_religion = yes
			}
			character_event = {
				id = byzsla_slavic_event_potwory.8
				set_character_flag = byzsl_utopiec_flaga
			}
		}
		add_trait = byzsla_topielec_porwany
	}
}

#byzsla_slavic_event_potwory.8 - porwanie dziecka przez utopca (ping)

character_event = {
	id = byzsla_slavic_event_potwory.8
	desc = desc_byzsla_slavic_event_potwory.8
	
	picture = GFX_evt_byzsla_topielica
	
	is_triggered_only = yes
	option = {
		name = optA_byzsla_slavic_event_potwory.8
		custom_tooltip = { text = TT_utopiec_lowy_1 }
		hidden_tooltip = {
			random = {
				chance = 15
				give_ill_effect = yes
			}
			if = {
				limit = { 
					NOT = { intrigue = 5 }
				}
				random_list = {
					70 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10} }
					20 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					10 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
			if = {
				limit = { 
					intrigue = 5
					NOT = { intrigue = 10 }
				}
				random_list = {
					50 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					25 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					25 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
			if = {
				limit = { 
					intrigue = 10
					NOT = { intrigue = 20 }
				}
				random_list = {
					40 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					35 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					25 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
			if = {
				limit = { 
					intrigue = 20
				}
				random_list = {
					30 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					35 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					35 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_potwory.8
		custom_tooltip = { text = TT_utopiec_lowy_2 }
		scaled_wealth = -0.05
		prestige = -75
		hidden_tooltip = {
			random_list = {
				50 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
				25 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
				25 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_potwory.8
		custom_tooltip = { text = TT_utopiec_lowy_3 }
		if = {
			limit = { government = nomadic_government  }
			add_character_modifier = {
				name = horda_byzsla_topielce_lowy
				duration = -1
			}
			manpower = -250 
		}
		if = {
			limit = { NOT = { government = nomadic_government  } }
			add_character_modifier = {
				name = byzsla_topielce_lowy
				duration = -1
			}
			prestige = -250
		}
		hidden_tooltip = {
			if = {
				limit = { 
					NOT = { realm_martial = 10 }
				}
				random_list = {
					60 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					20 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					20 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
			if = {
				limit = { 
					realm_martial =  10
					NOT = { realm_martial = 40 }
				}
				random_list = {
					30 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					35 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					35 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
			if = {
				limit = { 
					realm_martial = 40
				}
				random_list = {
					20 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					40 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					40 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
		}
	}
	option = {
		name = optD_byzsla_slavic_event_potwory.8
		custom_tooltip = { text = TT_utopiec_lowy_4 }
		trigger = {
			OR = {
				AND = {
					religion = slavic_pagan_reformed 
					is_title_active = d_slavic_pagan_reformed 
				}
				AND = {
					religion = chram_vales
					is_title_active = d_great_volhv 
				}
			}
		}
		transfer_scaled_wealth = {
			to = religion_head
			value = 0.1
			min = 10
			max = 30
		}
		hidden_tooltip = {
			if = {
				limit = { 
					 religion_head = { NOT = { piety = 250 } } 
				}
				random_list = {
					60 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					20 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					20 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
			if = {
				limit = { 
					religion_head = { 
						piety = 250
						NOT = { piety = 600 } 
					} 
				}
				random_list = {
					30 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					35 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					35 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
			if = {
				limit = { 
					religion_head = { 
						piety = 600
					} 
				}
				random_list = {
					20 = { character_event = { id = byzsla_slavic_event_potwory.9 days = 10 random = 10 } }
					40 = { character_event = { id = byzsla_slavic_event_potwory.10 days = 10 random = 10 } }
					40 = { character_event = { id = byzsla_slavic_event_potwory.11 days = 10 random = 10 } }
				}
			}
		}
	}
}

#byzsla_slavic_event_potwory.9 - dziecko odnalezione martwe

character_event = {
	id = byzsla_slavic_event_potwory.9
	desc = desc_byzsla_slavic_event_potwory.9
	
	picture = GFX_evt_byzsla_topielica
	 show_from_from = YES
	
	is_triggered_only = yes
	immediate = {
		FROMFROM = { 
			death = { death_reason = death_accident_drowning } 
			remove_trait = byzsla_topielec_porwany
		}
	}
	option = {
		name = optA_byzsla_slavic_event_potwory.9
		hidden_tooltip = {
			random = {
				chance = 60
				add_trait_depressed_effect = yes
			}
		}
		add_character_modifier = {
			name = byzsla_gniew
			duration = 3000
		}
	}
	option = {
		name = optB_byzsla_slavic_event_potwory.9
		wealth = -100
		piety = 50
		prestige = 50
		hidden_tooltip = {
			random = {
				chance = 30
				add_trait_depressed_effect = yes
			}
		}
		hidden_tooltip = {
			if = {
				limit = {
					any_vassal = {
						government = theocracy_government
					}
				}
				random_vassal = {
					limit = { government = theocracy_government }
					wealth = 100
					change_learning = 1
					change_diplomacy = 1
				}
			}
			if = {
				limit = {
					NOT = {
						any_vassal = {
							government = theocracy_government
						}
					}
				}
				random_courtier = {
					limit = { has_job_title = job_spiritual }
					wealth = 100
					change_learning = 2
					change_diplomacy = 2
					add_trait = ambitious
				}
			}
		}
		capital_scope = {
			add_province_modifier = {
				name = byzsla_topielce_oczyszczenie
				duration = 3000
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_potwory.9
		trigger = {
			NOT = { religion = chram_vales }
		}
		hidden_tooltip = {
			random = {
				chance = 55
				add_trait_depressed_effect = yes
			}
		}
		if = {
			limit = { trait = zealous }
			remove_trait = zealous
		}
		if = {
			limit = { NOT = { trait = zealous } }
			add_trait = cynical
		}
		if = {
			limit = {
				is_slav_religion_reformed = yes
			}
			set_secret_religion = chram_vales
		}
		random = {
			chance = 60
			change_intrigue = 2
		}
		random = {
			chance = 60
			change_martial = 2
		}
		random = {
			chance = 75
			change_diplomacy = -2
		}
	}
	option = {
		name = optD_byzsla_slavic_event_potwory.9
		trigger = {
			religion = chram_vales
		}
		piety = 100
		if = {
			limit = {
				NOT = { lifestyle_traits = 1 } 
			}
			add_trait = cannibal_trait
		}
		if = {
			limit = {
				lifestyle_traits = 1
				NOT = { trait = cannibal_trait }
			}
			add_character_modifier = {
				name = cannibal
				duration = 3500
			}
		}
		if = {
			limit = {
				trait = cannibal_trait
			}
			add_character_modifier = {
				name = well_fed
				duration = 3000
			}
		}
		hidden_tooltip = {
			FROMFROM = { character_event = { id = byzsla_slavic_event_potwory.15 } }
		}
		custom_tooltip = { text = start_jesc_tt }
	}
	option = {
		name = optE_byzsla_slavic_event_potwory.9
		trigger = {
			secret_religion = chram_vales
		}
		piety = 50
		hidden_tooltip = {
			FROMFROM = { character_event = { id = byzsla_slavic_event_potwory.15 } }
		}
		add_character_modifier = {
			name = under_suspicion
			duration = 720
		}
		if = {
			limit = {
				society_member_of = secret_religious_cult
			}
			add_society_currency_minor_effect = yes
		}
		custom_tooltip = { text = start_jesc_tt }
	}
	option = {
		name = optE_byzsla_slavic_event_potwory.9
		trigger = {
			religion = chram_roda
			diplomacy = 8
			learning = 4
		}
		tooltip_info = diplomacy
		any_realm_character = {
			limit = {
				dynasty = ROOT
			}
			add_character_modifier = {
				name = one_celibate
				duration = 750
			}
			piety = 50
			random = {
				chance = 40
				change_learning = 1
			}
		}
		piety = 100
		random = {
			chance = 40
			change_diplomacy = 1
		}
	}
}

#byzsla_slavic_event_potwory.10 - dziecko odnalezione, ze skazą (przerażone, okrutne)

character_event = {
	id = byzsla_slavic_event_potwory.10
	desc = desc_byzsla_slavic_event_potwory.10
	
	picture = GFX_evt_byzsla_topielica
	show_from_from = YES
	
	is_triggered_only = yes
	immediate = {
		FROMFROM = {
			add_trait = craven
			add_trait = cruel
			change_learning = -2
			set_character_flag = byzsla_utopiec_dziecko
			remove_trait = byzsla_topielec_porwany
		}
	}
	option = {
		name = optA_byzsla_slavic_event_potwory.10
		if = {
			limit = {
				trait = stressed
			}
			random = {
				chance = 55
				remove_trait = stressed
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_potwory.10
		prestige = -75
		FROMFROM = {
			prestige = -100
			add_trait = byzsla_child_chors
		}
	}
	option = {
		name = optC_byzsla_slavic_event_potwory.10
		capital_scope = {
			add_province_modifier = {
				name = blessed_lands
				duration = 1000
			}
		}
		piety = 50
		FROMFROM = {
			add_character_modifier = {
				name = the_content
				duration = 2500
			}
		}
	}
}

#byzsla_slavic_event_potwory.11 - dziecko odnalezione, bez skazy

character_event = {
	id = byzsla_slavic_event_potwory.11
	desc = desc_byzsla_slavic_event_potwory.11
	
	picture = GFX_evt_byzsla_topielica
	show_from_from = YES
	
	is_triggered_only = yes
	immediate = {
		FROMFROM = {
			change_learning = 1
			change_stewardship = 1
			set_character_flag = byzsla_utopiec_dziecko
			remove_trait = byzsla_topielec_porwany
		}
	}
	option = {
		name = optA_byzsla_slavic_event_potwory.10
		if = {
			limit = {
				trait = stressed
			}
			random = {
				chance = 75
				remove_trait = stressed
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_potwory.10
		capital_scope = {
			add_province_modifier = {
				name = blessed_lands
				duration = 1000
			}
		}
		piety = -120
		FROMFROM = {
			add_character_modifier = {
				name = the_content
				duration = 2500
			}
		}
	}
}

#byzsla_slavic_event_potwory.12 - dziecko ze skazą wariuje (lunatyzm)

character_event = {
	id = byzsla_slavic_event_potwory.12
	desc = desc_byzsla_slavic_event_potwory.12
	
	picture = GFX_evt_lunatic
	
	trigger = {
		has_character_flag = byzsla_utopiec_dziecko
		years = 18
		NOT = {
			any_demesne_province = {
				has_province_modifier = horda_byzsla_topielce_oczyszczenie
			}
			any_demesne_province = {
				has_province_modifier = byzsla_topielce_oczyszczenie
			}
			has_character_flag = byzsla_utopiec_dziecko_szalony
		}
	}
	
	is_triggered_only = yes
	option = {
		name = optA_byzsla_slavic_event_potwory.12
		add_trait = possessed
		set_character_flag = byzsla_utopiec_dziecko_szalony
	}
	option = {
		name = optB_byzsla_slavic_event_potwory.12
		trigger = {
			religion = chram_vales
			trait = zealous
			NOT = {
				trait = one_eyed
			}
		}
		tooltip_info = zealous
		add_trait = one_eyed
		random = {
			chance = 15 
			add_trait = possessed
		}
		piety = 30
		prestige = -60
		set_character_flag = byzsla_utopiec_dziecko_szalony
	}
	option = {
		name = optC_byzsla_slavic_event_potwory.12
		trigger = {
			religion = chram_roda
			trait = zealous
		}
		tooltip_info = zealous
		random = {
			chance = 15 
			add_trait = possessed
		}
		piety = -50
		prestige = -50
		add_trait = swiatlo_nocy
		remove_trait = swiatlo_dnia
		add_character_modifier = {
			name = in_meditation
			duration = 120
		}
		set_character_flag = byzsla_utopiec_dziecko_szalony
	}
}

#byzsla_slavic_event_potwory.13 - zwariowane dziecko ze skazą idzie do wodnego świata

character_event = {
	id = byzsla_slavic_event_potwory.13
	desc = desc_byzsla_slavic_event_potwory.13
	
	picture = GFX_evt_byzsla_topielica
	
	trigger = {
		has_character_flag = byzsla_utopiec_dziecko
		trait = possessed
	}
	
	is_triggered_only = yes
	option = {
		name = optA_byzsla_slavic_event_potwory.13
		abdicate = yes
		add_trait = byzsla_topielec_porwany
		
		any_demesne_province = {
			random = {
				chance = 75
				add_province_modifier = {
					name = peasants_scorned
					duration = 75
				}
			}
		}
	}
}

#byzsla_slavic_event_potwory.14 - powrót zwariowanego dziecka ze skazą jako nieśmiertelnego lorda potworów

character_event = {
	id = byzsla_slavic_event_potwory.14
	hide_window = yes
	
	picture = GFX_evt_peasants
	
	trigger = {
		has_character_flag = byzsla_utopiec_dziecko
		trait = possessed
		trait = byzsla_topielec_porwany
		
	}
	
	is_triggered_only = yes
	immediate = {
		remove_trait = byzsla_topielec_porwany
		add_trait = genius
		add_trait = immortal
		add_trait = aggressive_leader
		change_martial = 10
		change_diplomacy = -10
		give_nickname = byzsla_lord_potworow
		wealth = 500
		top_liege = {
			ROOT = {
				set_defacto_liege = ROOT
				create_title = {
					tier = DUKE
					landless = yes
					temporary = yes
					culture = ROOT
					name = "CLAIMANT_ADVENTURE"
					holder = ROOT
				}
				spawn_unit = {
					province = 4375
					troops =
					{
						light_cavalry = { 5000 1600 }
						light_infantry = { 30000 1000 }
					}
				}
				unsafe_war = {
					target = PREV
					casus_belli = duchy_adventure
					thirdparty_title = PREV
					tier = duke
				}
			}
			any_claim = {
				add_claim = ROOT
			}
			character_event = {
				id = byzsla_slavic_event_potwory.19
			}
		}
	}
}

#byzsla_slavic_event_potwory.15 - pożeranie, ping
#byzsla_slavic_event_potwory.16 - brak efektu
#byzsla_slavic_event_potwory.17 - wzrost mocy
#byzsla_slavic_event_potwory.18 - szaleństwo
#byzsla_slavic_event_potwory.19 - ping powrotu szaleńcza

character_event = {
	id = byzsla_slavic_event_potwory.19
	desc = desc_byzsla_slavic_event_potwory.19
	
	picture = GFX_evt_peasants
	
	is_triggered_only = yes
	option = {
		name = optA_byzsla_slavic_event_potwory.13
	}
}
#20 - event dla wampyringu
character_event = {
	id = byzsla_slavic_event_potwory.20
	desc = desc_byzsla_slavic_event_potwory.1
	
	picture = GFX_evt_bad_news
	
	is_triggered_only = yes
	
	immediate = {
		random_demesne_province = {
			limit = {
				OR = {
					culture_group = east_slavic 
					culture_group = west_slavic
					culture_group = south_slavic
					is_slav_religion = yes
				}
				NOT = {
					has_province_modifier = byzsla_potwory_timer
				}
			}
			add_province_modifier = {
				modifier = byzsla_potwory_timer
				hidden = yes
				duration = 4320
			}
		}
		capital_scope = {
			add_province_modifier = {
				modifier = byzsla_ogolny_timer
				hidden = yes
				duration = 150
			}
		}
	}
	
	option = {
		name = optA_byzsla_slavic_event_potwory.1	#Brak akcji
		if = {
			limit = {
				NOT = { is_nomadic = yes }
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = byzsla_wampiry
					duration = 360
				}
			}
		}
		if = {
			limit = {
				is_nomadic = yes
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = horda_byzsla_wampiry
					duration = 360
				}
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_potwory.1	#Ogarnia mnie strach
		custom_tooltip = {
			text = byzsla_potwory_TT_1
		}
		if = {
			limit = {
				NOT = { is_nomadic = yes }
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = byzsla_wampiry
					duration = 420
				}
			}
		}
		if = {
			limit = {
				is_nomadic = yes
			}
			random_demesne_province = {
				limit = {
					has_province_modifier = byzsla_potwory_timer
				}
				add_province_modifier = {
					name = horda_byzsla_wampiry
					duration = 420
				}
			}
		}
		set_character_flag = byzsla_niewampir
		if = {
			limit = {
				NOT = { is_nomadic = yes }
			}
			add_province_modifier = {
				name = byzsla_wampiry
				duration = 420
			}
		}
		prestige = -20
		any_vassal = {
			opinion = { 
				modifier = byzsla_op_mod_strachajlo
				who = ROOT 
				days = 3650
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_potwory.1	#oficjalne pismo, że wampiry nie istnieją
		trigger = {
			NOT = {
				trait = paranoid
				trait = craven
			}
			OR = {
				trait = cynical
				NOT = { is_slav_religion = yes }
			}
		}
		custom_tooltip = { text = byzsla_potwory_TT_1 }
		treasury = -20
		hidden_tooltip = {
			random_list = {
				50 = { character_event = { id = byzsla_slavic_event_potwory.3 days = 7 } }
				20 = { character_event = { id = byzsla_slavic_event_potwory.2 days = 7 } }
			}
		}
	}
	
}
