﻿####################
# ALLIANCE INTERACTIONS
####################

namespace = call_ally

# Notification that you have been automatically called
call_ally.0001 = {
	type = letter_event
	opening = {
		desc = call_ally.0001.opening
	}
	desc = call_ally.0001.desc
	sender = scope:actor

	option = {
		name = call_ally.0001.a
		play_music_cue = mx_cue_combat_stinger
	}
}

# Call to War Response: Accepted
call_ally.0100 = {
	type = letter_event
	opening = {
		desc = call_ally.0100.opening
	}
	desc = call_ally.0100.desc
	sender = {
		character = scope:recipient
		animation = anger
	}

	immediate = {
		#What tooltip to we want to show?
		show_as_tooltip = {
			if = {
				limit = {
					exists = scope:call_dynasty_member_to_war_interaction
				}
				call_dynasty_member_to_war_interaction_effect = yes
			}
			else_if = {
				limit = {
					exists = scope:call_ally_interaction
				}
				call_ally_interaction_event_effect = yes
			}
			else_if = {
				limit = {
					exists = scope:call_house_member_to_war_interaction
				}
				call_house_member_to_war_interaction_effect = yes
			}
			else = {
				if = {
					limit = {
						NOT = {
							scope:actor = { has_relation_blood_brother = scope:recipient }
						}
					}
					scope:actor = {
						if = {
							limit = {
								scope:recipient.primary_title.tier = tier_county
							}
							add_prestige = minor_prestige_loss
						}
						else_if = {
							limit = {
								scope:recipient.primary_title.tier = tier_duchy
							}
							add_prestige = medium_prestige_loss
						}
						else_if = {
							limit = {
								scope:recipient.primary_title.tier = tier_kingdom
							}
							add_prestige = major_prestige_loss
						}
						else = {
							add_prestige = massive_prestige_loss
						}
					}
				}
			}
		}
	}

	option = {
		name = EXCELLENT
	}
}

# Call to War Response: Refused
call_ally.0101 = {
	type = letter_event
	opening = {
		desc = call_ally.0100.opening
	}
	desc = call_ally.0101.desc
	sender = {
		character = scope:recipient
		animation = dismissal
	}

	immediate = {
		show_as_tooltip = {
			if = {
				limit = {
					exists = scope:call_dynasty_member_to_war_interaction
				}
				scope:actor.dynasty = {
					add_dynasty_prestige = medium_dynasty_prestige_loss
				}
			}
			
			# If we're a clan this interaction affects unity - Let's show that in the tooltip
			refuse_call_to_arms_add_clan_unity_effect = yes
		}
	}

	option = {
		name = call_ally.0101.a
	}
}
