# set_adoption
# Your adoptee will be move to your court.
# If the adoptor is byzantine_group culture, adoptee gets unpressed claims for all titles from adoptor.
# there's no remove adoptee

set_adoption = {
	scope:adoptee = {
		# set relation and move adoptee
		set_relation_adoptor = scope:adoptor
		if = {
			limit = {
				scope:adoptor = { is_ruler = yes }
				scope:adoptee = { is_ruler = no }
				NOT = {
					scope:adoptor.court_owner = scope:adoptee.host
				}
			}
			visit_court_of = scope:adoptor.court_owner
		}
		# set house to adoptor's house if lowborn
		if = {
			limit = {
				scope:adoptee = { is_lowborn = yes }
			}
			set_house = scope:adoptor.house
		}
	}
	scope:adoptor = {
		set_relation_adoptee = scope:adoptee
		# grant unpressed claims if byzantine
		if = {
			limit = {
				has_culture_group = culture_group:byzantine_group
			}
			every_held_title = {
				scope:adoptee = {
					add_unpressed_claim = prev
				}
			}
		}
	}
}


