on_yearly_pulse = {
	effect = {
		bloodlust_control_effect = yes
		dishonorable_degrade_effect = yes
		tyrant_degrade_effect = yes
		peaceful_years_increment_effect = yes
		indian_caste_fix_effect = yes
		debutante_cleanup_effect = yes
	}
}

#character
on_five_year_pulse = {
	effect = {
		women_scared_beauty_effect = yes
		no_longer_should_be_hiding_effect = yes
		remove_austerity_modifier_effect = yes
	}
}

#on siege pulse
on_siege_pulse = {
	random_events = {
		100 = Plus.958 # Building sacked during siege
	}
}

# ROOT is the baby
on_birth = {
	effect = {
		assign_baby_portrait_effect = yes
		add_cousin_opinion_effect = yes
	}
}

# Sent to employers of both spouses - ROOT is employer. FROM is employers "employee". new_character is the other spouse.
on_marriage = {
	effect = {
		lowborn_marries_duke_effect = yes
	}
}

#character. Triggers when someone gets imprisoned for any reason. - ROOT is prisoner, FROM is imprisoner
on_become_imprisoned_any_reason = {
	effect = {
		siege_cleanup_prisoner_effect = yes
	}
}

# gain_title, create_title, grant_title - on_new_holder
# usurp_title - on_new_holder_usurpation
# inheritance, abdicate - on_new_holder_inheritance

# ROOT is the character, FROM is the title, FROMFROM is the old holder
on_new_holder = {
	# TODO: merge Plus's coronation system with Vanilla's more fluidly
	effect = {
		# add_uncrowned_effect = yes
		remove_uncrowned_effect = yes
		bloodlust_control_effect = yes
		remove_unworthy_crown_effect = yes
		dead_ruler_claim_effect = yes
		new_holder_province_chaos_effect = yes
		restore_title_secular_name_effect = yes
	}
}

# ROOT is the character, FROM is the title, FROMFROM is the old holder
on_new_holder_inheritance = {
	effect = {
		# add_uncrowned_effect = yes
		remove_uncrowned_effect = yes
		bloodlust_control_effect = yes
		remove_unworthy_crown_effect = yes
		dead_ruler_claim_effect = yes
		religion_head_loses_claims_effect = yes
		restore_title_secular_name_effect = yes
	}
}

# ROOT is the character, FROM is the title, FROMFROM is the old holder
on_new_holder_usurpation = {
	effect = {
		# add_uncrowned_effect = yes
		remove_uncrowned_effect = yes
		bloodlust_control_effect = yes
		remove_unworthy_crown_effect = yes
		restore_title_secular_name_effect = yes
	}
}

# Character converts religion, for whatever reason. ROOT is the character after conversion and the FROM scope has the old religion.
on_character_convert_religion = {
	effect = {
		bloodlust_control_effect = yes
	}
}

# Character converts culture, for whatever reason. ROOT is the character after conversion and the FROM scope has the old culture.
on_character_convert_culture = {
	effect = {
		bloodlust_control_effect = yes
	}
}

# From = Attacker, Root = Defender
on_war_started = {
	effect = {
		peaceful_years_reset_effect = yes
	}
}

# From = Attacker, Root = Defender
on_war_ended_victory = {
	effect = {
		FROM = {
			add_character_modifier = {
				name = victory_timer
				duration = 1
				hidden = yes
			}
			siege_cleanup_effect = yes
		}
		ROOT = {
			siege_cleanup_effect = yes
		}
	}
}

# From = Attacker, Root = Defender
on_war_ended_whitepeace = {
	effect = {
		FROM = {
			siege_cleanup_effect = yes
		}
		ROOT = {
			siege_cleanup_effect = yes
		}
	}
}

# From = Attacker, Root = Defender
on_war_ended_defeat = {
	effect = {
		ROOT = {
			add_character_modifier = {
				name = victory_timer
				duration = 1
				hidden = yes
			}
			siege_cleanup_effect = yes
		}
		FROM = {
			siege_cleanup_effect = yes
		}
	}
}

# From = Attacker, Root = Defender
on_war_ended_invalid = {
	effect = {
		FROM = {
			siege_cleanup_effect = yes
		}
		ROOT = {
			siege_cleanup_effect = yes
		}
	}
}