﻿# OTHER_SPOUSE = the other spouse character, may be invalid object
is_valid_grand_wedding_special_guest_trigger = {
	is_alive = yes
	is_adult = yes
	# Must be able to marry the other character if they are selected
	trigger_if = {
		limit = { exists = $OTHER_SPOUSE$ }
		can_marry_character_trigger = { CHARACTER = $OTHER_SPOUSE$ }
	}
}

has_been_promised_grand_wedding = {
	has_variable = promised_grand_wedding_by
}

has_promised_a_grand_wedding = {
	has_variable = promised_grand_wedding_marriage_countdown
}

activity_wedding_is_valid_guest = {
	age >= 3
	is_at_war = no
	is_in_army = no
	is_imprisoned = no
	NOR = {
		exists = involved_activity
		has_trait = incapable
	}
}

activity_wedding_diplomatic_intent_impressible_target = {
	top_liege = this
	any_neighboring_and_across_water_top_liege_realm_owner = { this = root }
	highest_held_title_tier < root.highest_held_title_tier
	NOT = { government_has_flag = cannot_be_vassal_or_liege }
	is_at_war = no
	save_temporary_scope_as = impress_check
	#Unop: ck3-tiger Save scopes needed by impress_intent_vassalization_acceptance_value
	root = { save_temporary_scope_as = actor }
	save_temporary_scope_as = recipient
	impress_intent_vassalization_acceptance_value > -30
	scope:host ?= root 
}

activity_is_bloody_wedding = {
	has_activity_type = activity_wedding
	has_activity_option = { 
		category = special_type 
		option = wedding_type_bloody
	}
	activity_host = {
		NOT = { has_variable = bloody_wedding_backed_down_var }
	}
}

# scope:activity and scope:host should always accessible for activity and its events
is_bloody_wedding = {
	scope:activity = {
		has_activity_type = activity_wedding
		has_activity_option = { 
			category = special_type 
			option = wedding_type_bloody
		}
	}
	scope:host = {
		NOT = { has_variable = bloody_wedding_backed_down_var }
	}
}

# scope:activity and scope:host should always accessible for activity and its events
is_successful_bloody_wedding = {
	scope:activity = {
		has_activity_option = { 
			category = special_type 
			option = wedding_type_bloody
		}
	}
	scope:host = {
		NOR = {
			has_variable = bloody_murder_fail
			has_variable = bloody_wedding_backed_down_var
		}
	}
}
