﻿#########################################################################
# EFFECT LIST															#
#########################################################################
# !!! Remember to add all new effects with a short description here !!!	#
#########################################################################


#########################################################################
# EFFECTS																#
#########################################################################

add_hook_if_possible_effect = {
	if = {
		limit = {
			can_add_hook = {
				target = $TARGET$
				type = $TYPE$
			}
		}
		add_hook = {
			target = $TARGET$
			type = $TYPE$
			years = $YEARS$
		}
	}
}

add_hook_if_possible_default_length_effect = {
	if = {
		limit = {
			can_add_hook = {
				target = $TARGET$
				type = $TYPE$
			}
		}
		add_hook = {
			target = $TARGET$
			type = $TYPE$
		}
	}
}

add_favour_hook_if_possible_simple_effect = {
	if = {
		limit = {
			can_add_hook = {
				target = $TARGET$
				type = favor_hook
			}
		}
		add_hook = {
			target = $TARGET$
			type = favor_hook
		}
	}
}

add_mutual_gendered_blood_sibling_hook_effect = {
	# First we do current scope.
	if = {
		limit = {
			$TARGET$ = { is_female = yes }
		}
		add_hook = {
			target = $TARGET$
			type = blood_sister_hook
		}
	}
	else = {
		add_hook = {
			target = $TARGET$
			type = blood_brother_hook
		}
	}
	# Then set target's.
	save_scope_as = blood_sibling_self
	$TARGET$ = {
		if = {
			limit = {
				scope:blood_sibling_self = { is_female = yes }
			}
			add_hook = {
				target = scope:blood_sibling_self
				type = blood_sister_hook
			}
		}
		else = {
			add_hook = {
				target = scope:blood_sibling_self
				type = blood_brother_hook
			}
		}
	}
	# Clean up after ourselves.
	clear_saved_scope = blood_sibling_self
}
