﻿on_death = {
	on_actions = { acm_c_on_death }
}

acm_c_on_death = {
	effect = {
		acm_c_transfer_to_heir_effect = yes
	}
}

yearly_global_pulse = {
	on_actions = { acm_c_yearly }
}

acm_c_yearly = {
	effect = {
		every_in_global_list = {
			variable = acm_c_fakes
			limit = { exists = this }
			change_variable = { name = acm_c_fake_years subtract = 1 }
			if = {
				limit = { var:acm_c_fake_years <= 0 }
				set_variable = acm_c_fake_found
				save_scope_as = acm_c_fake
				artifact_owner = { trigger_event = acm_commission.360 }
			}
		}
		every_in_global_list = {
			variable = acm_c_fakes
			limit = { has_variable = acm_c_fake_found }
			remove_list_global_variable = { name = acm_c_fakes target = this }
		}
	}
}
