namespace = AFMC

character_event = {
	id = AFMC.1
	desc = DEBUG
	is_triggered_only = yes
	hide_window = yes
	
	trigger = {
		has_landed_title = k_papal_state
		NOT = {
			has_global_flag = year_set
		}
	}
	
	immediate = {
		set_global_flag = year_set
		k_papal_state = {
			holder_scope = {
				if = {
					limit = {
						year = 2380
					}
					set_variable = { which = am_year value = 604 }
				}
				if = {
					limit = {
						year = 2666
					}
					set_variable = { which = am_year value = 890 }
				}
				character_event = { id = AFMC.2 days = 365 }
			}
		}
	}
	
	option = {
		name = DEBUG
	}
}

character_event = {
	id = AFMC.2
	desc = DEBUG
	is_triggered_only = yes
	hide_window = yes
	
	trigger = {
		has_landed_title = k_papal_state
		has_global_flag = year_set
	}
	
	immediate = {
		k_papal_state = {
			holder_scope = {
				FROM = { change_variable = { which = "am_year" value = 1 } }
				character_event = { id = AFMC.2 days = 365 }
			}
		}
	}
	
	option = {
		name = DEBUG
	}
}