namespace = byzsla_slavic_event_interakcje

############################
#byzsla_slavic_event_interakcje.1 - usunięcie klątwy pytanie
#byzsla_slavic_event_interakcje.2 - usunięcie klątwy TAK
#byzsla_slavic_event_interakcje.3 - usunięcie klątwy NIE
#byzsla_slavic_event_interakcje.4 - usunięcie kinslayera pytanie
#byzsla_slavic_event_interakcje.5 - usunięcie kinslayera TAK ale rań się
#byzsla_slavic_event_interakcje.6 - usunięcie kinslayera NIE
#byzsla_slavic_event_interakcje.7 - wyrzucenie korony pytanie
#byzsla_slavic_event_interakcje.8 - nabicie na pal
#byzsla_slavic_event_interakcje.9 - odstresowałeś się
#byzsla_slavic_event_interakcje.10 - nie pomogło
#byzsla_slavic_event_interakcje.11 - szaleństwo
#byzsla_slavic_event_interakcje.12 - mrok wydaje się być OK
############################

#byzsla_slavic_event_interakcje.1 - usunięcie klątwy pytanie

character_event = {
	id = byzsla_slavic_event_interakcje.1
	desc = desc_byzsla_slavic_event_spec.1
	picture = GFX_evt_cathedral_pagan_group
	
	is_triggered_only = yes
	
	immediate = {
		wealth = 100
	}
	
	option = {
		name = optA_byzsla_slavic_event_spec.1
		any_liege = {
			limit = {
				has_character_flag = byzsla_interakcje_1
			}
			character_event = { id = byzsla_slavic_event_interakcje.2 }
			opinion = { 
				modifier = byzsla_op_mod_klatwa_supp 
				who = ROOT 
				years = 5 
			}
		}
		ai_chance = {
			factor = 10
		}
	}
	option = {
		name = optB_byzsla_slavic_event_spec.1
		any_liege = {
			limit = {
				has_character_flag = byzsla_interakcje_1
			}
			character_event = { id = byzsla_slavic_event_interakcje.3 }
			opinion = { 
				modifier = byzsla_op_mod_klatwa_Ksupp 
				who = ROOT 
				years = 5 
			}
		}
		ai_chance = {
			factor = 5
			modifier = {
				factor = 0
				ROOT = { owes_favor_to = THIS }
			}
		}
	}
}

#byzsla_slavic_event_interakcje.2 - usunięcie klątwy TAK

character_event = {
	id = byzsla_slavic_event_interakcje.2
	desc = desc_byzsla_slavic_event_interakcje.2
	
	picture = GFX_evt_cathedral_pagan_group
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.2
		if = {
			limit = {
				trait = cynical
			}
			random = {
				chance = 25
				remove_trait = cynical
			}
		}
		if = {
			limit = { has_character_modifier = perun_curse }
			remove_character_modifier = perun_curse
		}
		if = {
			limit = { has_character_modifier = mokosz_curse }
			remove_character_modifier = mokosz_curse
		}
		if = {
			limit = { has_character_modifier = rod_curse }
			remove_character_modifier = rod_curse
		}
		if = {
			limit = { has_character_modifier = svarog_curse }
			remove_character_modifier = svarog_curse
		}
		if = {
			limit = { has_character_modifier = jarilo_curse }
			remove_character_modifier = jarilo_curse
		}
		if = {
			limit = { has_character_modifier = dadzbog_curse }
			remove_character_modifier = dadzbog_curse
		}
		if = {
			limit = { has_character_modifier = lada_curse }
			remove_character_modifier = lada_curse
		}
		clr_character_flag = byzsla_interakcje_1
	}
}

#byzsla_slavic_event_interakcje.3 - usunięcie klątwy NIE

character_event = {
	id = byzsla_slavic_event_interakcje.3
	desc = desc_byzsla_slavic_event_interakcje.3
	
	picture = GFX_evt_cathedral_pagan_group
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.3
		prestige = -50
		if = {
			limit = {
				trait = zealous
			}
			random = {
				chance = 25
				remove_trait = zealous
			}
		}
		clr_character_flag = byzsla_interakcje_1
	}
}

#byzsla_slavic_event_interakcje.4 - usunięcie kinslayera pytanie

character_event = {
	id = byzsla_slavic_event_interakcje.4
	desc = desc_byzsla_slavic_event_spec.4
	
	picture = GFX_evt_cathedral_pagan_group
	
	is_triggered_only = yes
	
	immediate = {
		wealth = 100
	}
	
	option = {
		name = optA_byzsla_slavic_event_spec.1
		any_liege = {
			limit = {
				has_character_flag = byzsla_interakcje_1
			}
			character_event = { id = byzsla_slavic_event_interakcje.5 }
		}
		ai_chance = {
			factor = 2
		}
	}
	option = {
		name = optB_byzsla_slavic_event_spec.1
		any_liege = {
			limit = {
				has_character_flag = byzsla_interakcje_1
			}
			character_event = { id = byzsla_slavic_event_interakcje.6 }
			opinion = { 
				modifier = byzsla_op_mod_klatwa_Ksupp 
				who = ROOT 
				years = 5 
			}
		}
		ai_chance = {
			factor = 3
		}
	}
}

#byzsla_slavic_event_interakcje.5 - usunięcie kinslayera TAK ale rań się
character_event = {
	id = byzsla_slavic_event_interakcje.5
	desc = desc_byzsla_slavic_event_spec.5
	
	picture = GFX_evt_cathedral_pagan_group
	
	is_triggered_only = yes
	option = {
		name = optA_byzsla_slavic_event_spec.5
		if = {
			limit = { 
				has_dlc = "Reapers" 
				NOT = { trait = one_handed }
			}
			add_trait = one_handed
		}
		if = {
			limit = { 
				NOT = { has_dlc = "Reapers" } 
				NOT = { trait = maimed }
			}
			add_trait = maimed
		}
		if = {
			limit = {
				OR = {
					trait = maimed
					trait = one_handed
				}
				health = -2
			}
		}
		remove_trait = kinslayer
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = optB_byzsla_slavic_event_spec.1
		trigger = {
			demesne_size = 3
			OR = {
				religion = slavic_pagan_reformed
				religion = chram_vales
			}
		}
		remove_trait = kinslayer
		if = {
			limit = {
				religion = chram_vales
				is_title_active = d_great_volhv
			}
			d_great_volhv = {
				ROOT = {
					random_demesne_title = {
						limit = {
							tier = COUNT
						}
						usurp_title = PREVPREV
					}
				}
			}
		}
		if = {
			limit = {
				religion = slavic_pagan_reformed
				is_title_active = d_slavic_pagan_reformed
			}
			d_slavic_pagan_reformed = {
				ROOT = {
					random_demesne_title = {
						limit = {
							tier = COUNT
						}
						usurp_title = PREVPREV
					}
				}
			}
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = optC_byzsla_slavic_event_spec.5
		ai_chance = {
			factor = 0
		}
	}
}

#byzsla_slavic_event_interakcje.6 - usunięcie kinslayera NIE

character_event = {
	id = byzsla_slavic_event_interakcje.6
	desc = byzsla_slavic_event_interakcje.6
	
	picture = GFX_evt_cathedral_pagan_group
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.3
		prestige = -50
		if = {
			limit = {
				trait = zealous
			}
			random = {
				chance = 25
				remove_trait = zealous
			}
		}
		clr_character_flag = byzsla_interakcje_1
	}
}


#byzsla_slavic_event_interakcje.7 - wyrzucenie korony pytanie

character_event = {
	id = byzsla_slavic_event_interakcje.7
	desc = desc_byzsla_slavic_event_interakcje.7
	
	picture = GFX_evt_heretic
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.7
		destroy_artifact = bspm_peknieta_korona
		prestige = -100
		random_realm_character = {
			limit = {
				has_character_flag = byzsla_interakcje_korona_chorsa
				is_rival = ROOT
			}
			remove_rival = ROOT
		}
		if = {
			limit = {
				religion = chram_roda
			}
			add_character_modifier = {
				name = rod_curse
				duration = 1825
			}
		}
		if = {
			limit = {
				OR = {
					religion = slavic_pagan_reformed
					religion = slavic_pagan
					religion = old_slavic_pagan
				}
			}
			add_character_modifier = {
				name = perun_bless
				duration = 1825
			}
		}
		if = {
			limit = {
				religion = chram_vales
			}
			add_character_modifier = {
				name = the_prude
				duration = 1825
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_spec.7
		piety = -100
		random_realm_character = {
			limit = {
				has_character_flag = byzsla_interakcje_korona_chorsa
				NOT = { is_rival = ROOT }
			}
			add_rival = ROOT
		}
		if = {
			limit = {
				OR = {
					religion = old_slavic_pagan
					religion = slavic_pagan
					religion = slavic_pagan_reformed
				}
			}
			remove_character_modifier = {
				name = perun_curse
			}
			add_character_modifier = {
				name = perun_curse
				duration = 1825
			}
		}
		if = {
			limit = {
				NOT = {
					religion = old_slavic_pagan
					religion = slavic_pagan
					religion = slavic_pagan_reformed
				}
			}
			add_character_modifier = {
				name = foolish_behavior
				duration = 1825
			}
		}
	}
}

#byzsla_slavic_event_interakcje.8 - nabicie na pal

character_event = {
	id = byzsla_slavic_event_interakcje.8
	desc = desc_byzsla_slavic_event_interakcje.8
	
	picture = GFX_evt_torture
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.8
		death = {
			death_reason = death_execution_impaling
			killer = FROM
		}
	}
}

#byzsla_slavic_event_interakcje.9 - odstresowałeś się

character_event = {
	id = byzsla_slavic_event_interakcje.9
	desc = desc_byzsla_slavic_event_interakcje.9
	
	picture = GFX_evt_torture
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.9
		if = {
			limit = { trait = stressed }
			remove_trait = stressed
		}
		if = {
			limit = { trait = depressed }
			remove_trait = depressed
		}
		if = {
			limit = { NOT = { lifestyle_traits = 1 } }
			random = {
				chance = 30
				add_trait = impaler
			}
		}
	}
}

#byzsla_slavic_event_interakcje.10 - nie pomogło

character_event = {
	id = byzsla_slavic_event_interakcje.10
	desc = desc_byzsla_slavic_event_interakcje.10
	
	picture = GFX_evt_torture
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.10
		if = {
			limit = { NOT = { lifestyle_traits = 1 } }
			random = {
				chance = 5
				add_trait = impaler
			}
		}
	}
}

#byzsla_slavic_event_interakcje.11 - szaleństwo


character_event = {
	id = byzsla_slavic_event_interakcje.11
	desc = desc_byzsla_slavic_event_interakcje.11
	
	picture = GFX_evt_torture
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_spec.11
		if = {
			limit = { trait = stressed }
			remove_trait = stressed
		}
		if = {
			limit = { trait = depressed }
			remove_trait = depressed
		}
		random_list = {
			50 = { add_trait = lunatic }
			50 = { add_trait = possessed }
		}
		if = {
			limit = { NOT = { lifestyle_traits = 1 } }
			add_trait = impaler
		}
	}
}

#byzsla_slavic_event_interakcje.13 - antypapież

character_event = {
	id = byzsla_slavic_event_interakcje.12
	desc = desc_byzsla_slavic_event_interakcje.12
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		d_slavic_pagan_reformed = {
			add_claim = ROOT
		}
	}
}