﻿
namespace = 0s_burgundy_decision_event

0s_burgundy_decision_event.0001 = {
	type = character_event
	title = 0s_burgundy_decision_event.0001.t
	desc = 0s_burgundy_decision_event.0001.desc
	theme = realm
	
	override_background = { reference = throne_room }

	left_portrait = {
		character = root
		animation = personality_bold
	}

	right_portrait = {
		character = scope:former_liege
		animation = shock 
	}

	immediate = {
		play_music_cue = "mx_cue_epic_sacral_moment"

		0s_burgundy_scripted_effect = yes
	}

	option = {
		name = 0s_burgundy_decision_event.0001.a
		add_prestige = 1500

		custom_tooltip = 0s_burgundy_independence_tt
		
		if = {
			limit = { exists = scope:former_liege }
			scope:former_liege = {
				trigger_event = 0s_burgundy_decision_event.0002
			}
		}
		
		# (Опционально) Можно уведомить всех игроков в регионе, как в middle_europe
		# every_player = { ... }
	}
}

0s_burgundy_decision_event.0002 = {
	type = character_event
	title = 0s_burgundy_decision_event.0002.t
	desc = 0s_burgundy_decision_event.0002.desc
	theme = war # Тема войны, так как это casus belli
	
	override_background = { reference = armory }

	left_portrait = {
		character = root 
		animation = anger
	}

	right_portrait = {
		character = scope:decision_taker
		animation = personality_arrogant
	}

	immediate = {
		play_music_cue = "mx_cue_war_declared"
	}

	option = {
		name = 0s_burgundy_decision_event.0002.a

		add_opinion = {
			target = scope:decision_taker
			modifier = 0s_burgundy_traitor_opinion
		}
		add_pressed_claim = scope:decision_taker.primary_title
	}
}

0s_burgundy_decision_event.0003 = {
	type = character_event
	title = 0s_burgundy_decision_event.0003.t
	desc = 0s_burgundy_decision_event.0003.desc
	theme = physical_health
	
	override_background = { reference = throne_room }

	left_portrait = {
		character = root
		animation = toast_goblet
	}

	right_portrait = {
		character = scope:pope
		animation = disbelief
	}

	immediate = {
		save_scope_as = decision_taker
		play_music_cue = "mx_cue_epic_sacral_moment"
		0s_burgundy_greater_scripted_effect = yes
	}
	option = {
		name = 0s_burgundy_decision_event.0003.a
		trigger = {
			scope:pope = { opinion = { target = root value >= high_positive_opinion } }
		}
		add_prestige = 2000
		scope:pope = {
			add_opinion = {
				target = root
				modifier = pleased_opinion
			}
		}
		every_ruler = {
			limit = {
				is_landed = yes
				this != root
				capital_province = {
					OR = {
						geographical_region = world_europe_west
						is_within_diplo_range = { CHARACTER = root }
					}
				}
			}
			trigger_event = 0s_burgundy_decision_event.0004
		}
	}

	option = {
		name = 0s_burgundy_decision_event.0003.b
		trigger = {
			has_strong_usable_hook = scope:pope
		}
		add_piety = 1000
		custom_tooltip = 0s_burgundy_pope_hook_consumed_tt
		every_ruler = {
			limit = {
				is_landed = yes
				this != root
				capital_province = {
					OR = {
						geographical_region = world_europe_west
						is_within_diplo_range = { CHARACTER = root }
					}
				}
			}
			trigger_event = 0s_burgundy_decision_event.0004
		}
	}

	option = {
		name = 0s_burgundy_decision_event.0003.c
		add_prestige = 1000
		every_ruler = {
			limit = {
				is_landed = yes
				this != root
				capital_province = {
					OR = {
						geographical_region = world_europe_west
						is_within_diplo_range = { CHARACTER = root }
					}
				}
			}
			trigger_event = 0s_burgundy_decision_event.0004
		}
	}
}

0s_burgundy_decision_event.0004 = {
	type = character_event
	title = 0s_burgundy_decision_event.0004.t
	desc = 0s_burgundy_decision_event.0004.desc
	theme = realm
    
	override_background = { reference = throne_room }

	left_portrait = {
		character = root
		animation = worry
	}

	right_portrait = {
		character = scope:decision_taker
		animation = personality_arrogant 
    }

	option = {
		name = 0s_burgundy_decision_event.0004.a
	add_opinion = {
		target = scope:decision_taker
		modifier = 0s_burgundy_upstart_opinion
        }
    }
}