﻿##Rank difference##
consort_rank_value = {
	value = 0
	if = {
		limit = {
			scope:harem_liege.primary_spouse ?= this
		}
		add = 1
		if = {
			limit = {
				scope:harem_liege = {
					hp_accepts_polygamy = yes
				}
			}
			add = 1
		}
		if = {
			limit = {
				scope:harem_liege = {
					hp_accepts_concubinage = yes
				}
			}
			add = 1
		}
		if = {
			limit = {
				scope:harem_liege = {
					can_employ_high_consorts_trigger = yes
				}
			}
			add = 1
		}
	}
	else_if = {
		limit = {
			has_high_consort_position_trigger = yes
		}
		add = 1
		if = {
			limit = {
				scope:harem_liege = {
					hp_accepts_polygamy = yes
				}
			}
			add = 1
		}
		if = {
			limit = {
				scope:harem_liege = {
					hp_accepts_concubinage = yes
				}
			}
			add = 1
		}
	}
	else_if = {
		limit = {
			is_spouse_of = scope:harem_liege
		}
		add = 1
		if = {
			limit = {
				scope:harem_liege = {
					hp_accepts_concubinage = yes
				}
			}
			add = 1
		}
	}
	else_if = {
		limit = {
			is_concubine_of = scope:harem_liege
		}
		add = 1
	}
}