﻿# Wedding Activity Intents
# The purpose of the diplomatic intent is to gain an alliance, or have the target swear fealty. Gain opinion and gain a hook should be more likely but should not complete the intent.
# Use activity_wedding_diplomatic_intent_impressible_target = yes to check if the target can be annexed
diplomatic_intent = {
	icon = intent_diplomacy
	on_invalidated = {
		trigger_event = activity_system.0090
	}

	ai_targets = {
		ai_recipients = liege
		ai_recipients = head_of_faith
	}
	ai_targets = {
		ai_recipients = vassals
		max = 10
	}
	ai_targets = {
		ai_recipients = activity_guests
		max = 5
	}

	# Handle target character invalidation
	is_target_valid = {
		NOT = { this = scope:target } #Unop Prevent selecting yourself as intent target
		scope:target ?= {
			is_ai = yes
			is_playable_character = yes
			OR = {
				activity_wedding_diplomatic_intent_impressible_target = yes
				NOT = { is_allied_to = root }
			}		
		}
	}

	on_target_invalidated = {
		trigger_event = unop.0091 #Unop
	}

	ai_will_do = {
		value = 80
	}

	ai_target_score = {
		value = 1
	}

	scripted_animation = {
		animation = chancellor
	}
}

matchmaking_intent = {
	icon = intent_matchmaking
	on_invalidated = {
		trigger_event = activity_system.0090
	}

	ai_targets = {
		ai_recipients = family
		max = 10
	}
	ai_target_quick_trigger = {
		adult = yes
	}

	# Handle target character invalidation
	is_target_valid = {
		NOT = { this = scope:target } #Unop Prevent selecting yourself as intent target
		scope:target = {
			is_ai = yes
			is_close_or_extended_family_of = root
			can_marry_trigger = yes
			is_betrothed = no
		}
	}

	on_target_invalidated = {
		trigger_event = unop.0091 #Unop
	}

	ai_will_do = {
		value = 50
	}

	ai_target_score = {
		value = 1
	}

	scripted_animation = {
		animation = wedding_happy_cry
	}
}

banquet_mischief_intent = {
	icon = intent_crash_wedding
	on_invalidated = { trigger_event = activity_system.0090 }

	is_shown = {
		has_dlc_feature = advanced_activities
	}

	ai_will_do = {
		value = 20
	}

	scripted_animation = {
		animation = eyeroll
	}
}
