﻿set_immortal_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	desc = set_immortal_interaction_desc
	
	is_shown = {
		scope:recipient = {
			NOT = {
				has_trait = immortality
			}
		}
	
	}
	on_accept = {
		scope:recipient = {
			add_trait = immortality
			set_immortal_age = 25
		}
	}
	
	auto_accept = yes
}

set_mortal_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_mortal_interaction_desc

	is_shown = {
		scope:recipient = {
			has_trait = immortality			
		}
	
	}
	on_accept = {
		scope:recipient = {
			remove_trait = immortality			
		}
	}
	
	auto_accept = yes
}

set_super_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_super_interaction_desc

	is_shown = {
		scope:recipient = {
			NOT = { has_trait = super
			}
		}
	}
	
	on_accept = {
		scope:recipient = {
			add_trait = super
		}
	}
	
	auto_accept = yes
}

set_unsuper_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_unsuper_interaction_desc

	is_shown = {
		scope:recipient = {
		has_trait = super
		}
	}
	
	on_accept = {
		scope:recipient = {
			remove_trait = super
		}
	}
	
	auto_accept = yes
}

set_super_governor_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_super_governor_interaction_desc

	is_shown = {
		scope:recipient = {
			NOT = {
				has_trait = super_governor
			}
		}		
	}
	
	on_accept = {
		scope:recipient = {
			add_trait = super_governor
		}
	}
	
	auto_accept = yes
}

set_unsuper_governor_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_unsuper_governor_interaction_desc

	is_shown = {
		scope:recipient = {
			has_trait = super_governor
		}		
	}
	
	on_accept = {
		scope:recipient = {
			remove_trait = super_governor	
		}
	}
	
	auto_accept = yes
}

set_super_general_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_super_general_interaction_desc

	is_shown = {
		scope:recipient = {
			NOT = {
				has_trait = super_general
			}
		}		
	}
	
	on_accept = {
		scope:recipient = {
			add_trait = super_general
		}
	}
	
	auto_accept = yes
}

set_unsuper_general_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_unsuper_general_interaction_desc

	is_shown = {
		scope:recipient = {
			has_trait = super_general
		}		
	}
	
	on_accept = {
		scope:recipient = {
			remove_trait = super_general
		}
	}
	
	auto_accept = yes
}

set_all_in_one_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_all_in_one_interaction_desc

	is_shown = {
		scope:recipient = {
			NOT = {
				AND = {
					has_trait = super
					has_trait = super_general
					has_trait = super_governor										
				}
			}
		}		
	}
	
	on_accept = {
		scope:recipient = {
			add_trait = super
			add_trait = super_general
			add_trait = super_governor			
		}
	}
	auto_accept = yes
}

set_unall_in_one_interaction = {
	category = interaction_pcm_main
	common_interaction = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	desc = set_unall_in_one_interaction_desc

	is_shown = {
		scope:recipient = {
			AND = {
			has_trait = super
			has_trait = super_general
			has_trait = super_governor
			}			
		}		
	}
	
	on_accept = {
		scope:recipient = {
			remove_trait = super
			remove_trait = super_general
			remove_trait = super_governor
		}
	}
	auto_accept = yes
}

take_title_interaction = {
	category = interaction_pcm_main
	#interface_priority = 10
	
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	is_shown = {
		#debug_only = yes
		scope:recipient = { is_landed = yes }
		NOT = { scope:recipient = scope:actor }
	}
	
	auto_accept = yes
	
	on_accept = {
		create_title_and_vassal_change = {
			type = conquest
			save_scope_as = change
			add_claim_on_loss = no
		}

		scope:recipient.primary_title = {
			change_title_holder = {
				holder = scope:actor
				change = scope:change
			}
		}
		resolve_title_and_vassal_change = scope:change
	}
}

start_pregnancy_interaction = {
	category = interaction_pcm_main
	
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes

	is_shown = {
		#debug_only = yes
		scope:recipient = { is_adult = yes }
		scope:actor = { is_adult = yes }
		scope:recipient = { is_pregnant = no }
		scope:actor = { is_pregnant = no }

		OR = {
			AND = {
				scope:recipient = { is_female = yes }
				scope:actor = { is_male = yes }
			}
			AND = {
				scope:recipient = { is_male = yes }
				scope:actor = { is_female = yes }
			}
		}
	}

	on_accept = {
		scope:actor = { trigger_event = debug.0002 }
	}
	
	auto_accept = yes
}

#set_super_all_children_interaction = {
#	category = interaction_pcm_main
#	common_interaction = yes
#	use_diplomatic_range = no
#	ignores_pending_interaction_block = yes
#	
#	desc = set_super_all_children_interaction_desc
#
#	populate_recipient_list = {
#		scope:recipient = {
##			add_to_list = characters
#			every_child = {
##				limit = {
##					NOT = { is_in_list = characters }
##				}
##				add_to_list = characters
#			}
#		}
#	}
#
#	is_shown = {
#		AND = {
#			scope:actor = { is_ai = no }
#			NOT = {
#				scope:recipient = {
##					every_in_list = {
##					list = characters
#					has_trait = super
##					}	
#				}	
#			}
#		}
#	}
#	
#	on_accept = {
#		hidden_effect = {
#			scope:recipient = {
##				every_in_list = {
##					list = characters
#					add_trait = super
##				}
#			}
#		}
#	}
#	auto_accept = yes
#}
#
#set_unsuper_all_children_interaction = {
#	category = interaction_pcm_main
#	common_interaction = yes
#	use_diplomatic_range = no
#	ignores_pending_interaction_block = yes
#	
#	desc = set_super_all_children_interaction_desc
#
#	populate_recipient_list = {
#		scope:recipient = {
#			add_to_list = characters
#			every_child = {
#				limit = {
#					NOT = { is_in_list = characters }
#				}
#				add_to_list = characters
#			}
#		}
#	}
#
#	is_shown = {
#		AND = {
#			scope:actor = { is_ai = no }
#			scope:recipient = {
#				every_in_list = {
#				list = characters
#				has_trait = super
#				}	
#			}
#		}
#	}
#	
#	on_accept = {
#		hidden_effect = {
#			scope:recipient = {
#				every_in_list = {
#					list = characters
#					remove_trait = super
#				}
#			}
#		}
#	}
#	auto_accept = yes
#}