dvg_annex_ainu_protectorate = {
	is_shown = {
		exists = c:JAP
		exists = c:AIN
		c:JAP = THIS
	}

	possible = {
		c:JAP = {
			has_diplomatic_pact = {
				who = c:AIN
				type = vassal
				is_initiator = yes
			}
		}
		year >= 1860
		NOT = {
			c:AIN = {
				is_player = yes
			}
		}
	}

	when_taken = {
		annex = c:AIN
		hidden_effect = {
			if = {
				limit = {
					c:JAP = {
						is_player = no
					}
				}
				activate_law = law_type:law_colonial_resettlement
			}
		}
	}

	ai_chance = {
		base = 100
	}
}

dvg_ai_westernize_japan = {
	is_shown = {
		exists = c:JAP
		c:JAP = THIS
		c:JAP = {
			is_player = no
		}
		NOT = {
			has_variable = dvg_japan_event_recognized
		}
	}

	possible = {
		year >= 1865
		c:JAP = {
			is_player = no
		}
	}

	when_taken = {
		set_country_type = recognized
		hidden_effect = {
			set_variable = dvg_japan_event_recognized
		}
	}

	ai_chance = {
		base = 100
	}
}
