﻿# Culture on actions.

# Happens when a character changes culture
# Root = character
on_character_culture_change = {
	first_valid_on_action = {
		calyver_on_character_culture_change
	}
}

# Happens when a culture gains a tradition
# Root = culture
# scope:tradition = flag for the tradition added
on_tradition_added = {
	first_valid_on_action = {
		calyver_on_tradition_change
	}
}

# Happens when a culture is created through hybridization or divergence
# Root = The new culture
# scope:founder = The founder of the new culture
on_culture_created = {
	first_valid_on_action = {
		calyver_on_tradition_change
	}
}
calyver_on_character_culture_change = {
	effect = {
		assign_di_child_trait_to_all_children_effect = yes
	}
}
calyver_on_tradition_change = {
	effect = {
		if = {
			limit = {
				has_cultural_parameter = dishu_system
			}
			every_ruler = {
				limit = {
					culture = root
					is_dishu_parent_trigger = yes
				}
				assign_di_child_trait_to_all_children_effect = yes
			}

		}
	}
}