namespace = byzsla_slavic_event_lokalne_drobne

############################
#### 
#byzsla_slavic_event_lokalne_drobne.1 - zniszczenie bałwanów podczas okupacji
#byzsla_slavic_event_lokalne_drobne.2 - wróg zniszczył lokalne bałwany, ochotnicy
#byzsla_slavic_event_lokalne_drobne.3 - migracja Serbów (inicjacja)
#byzsla_slavic_event_lokalne_drobne.4 - migracja Serbów (zapytanie)
#byzsla_slavic_event_lokalne_drobne.5 - migracja Serbów (zakończono)
############################

long_character_event = {
	id = byzsla_slavic_event_lokalne_drobne.1
	desc = desc_byzsla_slavic_event_lokalne_drobne.1
	
	picture = GFX_evt_burning_house
	only_playable = yes
	trigger = {
		NOT = {
			is_slav_religion = yes
		}
		FROM = { 
			is_slav_religion = yes
		}
	}
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_lokalne_drobne.1	#popieraj zniszczenie
		trigger = {
			NOT = {
				trait = sympathy_pagans
			}
			trait = cruel
		}
		tooltip_info = cruel
		if = {
			limit = {
				NOT = {
					OR = {
						has_lifestyle_intrigue_trigger = yes
						has_lifestyle_diplomacy_trigger = yes
						has_lifestyle_martial_trigger = yes
						has_lifestyle_stewardship_trigger = yes
						has_lifestyle_learning_trigger = yes
					}
				}
			}
			add_trait = impaler
		}
		wealth = 30
		piety = 20
		location = {
			add_province_modifier = {
				name = burnt_the_land
				duration = 730
			}
			add_province_modifier = {
				name = balvan_zniszczony
				duration = 730
			}
			holder_scope = {
				random_courtier = {
					limit = {
						at_location = FROM
						is_priest = yes
					}
					random = {
						chance = 50
						death = {
							death_reason = death_execution_burning
							killer = ROOT
						}
						hidden_tooltip = {
							if = {
								limit = {
									is_rival = ROOT
								}
								add_artifact = rival_skull
								new_artifact = {
									set_original_owner = PREV
									transfer_artifact = {
										from = PREV
										to = ROOT
									}
								}
							}
						}
					}
				}
				if = {
					limit = {
						at_location = FROM
					}
					random = {
						chance = 10
						death = {
							killer = ROOT
							death_reason = death_execution_horses
						}
						hidden_tooltip = {
							if = {
								limit = {
									is_rival = ROOT
								}
								add_artifact = rival_skull
								new_artifact = {
									set_original_owner = PREV
									transfer_artifact = {
										from = PREV
										to = ROOT
									}
								}
							}
						}
					}
				}
			}
		}
		hidden_tooltip = {
			FROM = {
				owner = {
					if = {
						limit = { is_slav_religion = yes }
						character_event = {
							id = byzsla_slavic_event_lokalne_drobne.2
						}
					}
				}
			}
		}
	}
	option = {
		name = optB_byzsla_slavic_event_lokalne_drobne.1	#nic nie rób
		wealth = 10
		piety = 5
		hidden_tooltip = {
			location = {
				add_province_modifier = {
					name = balvan_zniszczony
					duration = 365
				}
				owner = {
					if = {
						limit = { is_slav_religion = yes }
						character_event = {
							id = byzsla_slavic_event_lokalne_drobne.2
						}
					}
				}
			}
		}
	}
	option = {
		name = optC_byzsla_slavic_event_lokalne_drobne.1	#zadośćuczynienie
		wealth = -10
		piety = -5
		add_character_modifier = {
			name = the_kind
			duration = 3650
		}
		random = {
			chance = 45
			add_trait = sympathy_pagans
		}
		change_diplomacy = 1
		random = {
			chance = 70
			change_diplomacy = 2
		}
		hidden_tooltip = {
			location = {
				add_province_modifier = {
					name = balvan_zniszczony
					duration = 365
				}
			}
		}
	}
}

#byzsla_slavic_event_lokalne_drobne.2 - wróg zniszczył lokalne bałwany, ochotnicy

character_event = {
	id = byzsla_slavic_event_lokalne_drobne.2
	desc = desc_byzsla_slavic_event_lokalne_drobne.2
	
	picture = GFX_evt_bitwa
	border = GFX_event_normal_frame_war
	
	trigger = {
		is_slav_religion = yes
		is_playable = yes
		capital_scope = {
			controlled_by = ROOT
		}
	}
	
	is_triggered_only = yes
	
	option = {
		name = optA_byzsla_slavic_event_lokalne_drobne.2
		character_event = { id = 20220 days = 365 random = 90 }
		capital_scope = {
			ROOT = {
				spawn_unit = {
					province = PREV
					home = PREV
					owner = THIS
					#leader = none
					match_character = THIS
					match_mult = 0.05
					match_min = 100
					match_max = 300
					attrition = 1.0
					earmark = tribal_build_zeal
					disband_on_peace = yes
					can_toggle_looting = no
				}
				spawn_unit = {
					province = PREV
					home = PREV
					owner = THIS
					#leader = none
					match_character = THIS
					match_mult = 0.05
					match_min = 100
					match_max = 300
					attrition = 1.0
					earmark = tribal_build_zeal
					disband_on_peace = yes
					can_toggle_looting = no
				}
				spawn_unit = {
					province = PREV
					home = PREV
					owner = THIS
					#leader = none
					match_character = THIS
					match_mult = 0.05
					match_min = 100
					match_max = 300
					attrition = 1.0
					earmark = tribal_build_zeal
					disband_on_peace = yes
					can_toggle_looting = no
				}
			}
		}
	}
}
