conquer_champa = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		tag = DAI
		is_subject = no
		exists = CHA
	}
	abort = {
		OR = {
			is_subject = yes
			CHA = { is_subject = yes }
			NOT = { exists = CHA }
		}
	}
	success = {
		owns = 607
                NOT = { exists = CHA }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		add_claim = 610
		add_claim = 1022
		add_claim = 607
		add_claim = 606
                add_army_tradition = 15
	}
	abort_effect = {
		remove_claim = 610
		remove_claim = 1022
		remove_claim = 607
		remove_claim = 606
                add_army_tradition = -15
	}
	effect = {
		add_prestige = 5
	}
}

conquer_srivijaya = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		tag = ATJ
		is_subject = no
		exists = SRI
	}
	abort = {
		OR = {
			is_subject = yes
			SRI = { is_subject = yes }
			NOT = { exists = SRI }
		}
	}
	success = {
		owns = 622
                NOT = { exists = SRI }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		add_claim = 619
		add_claim = 620
		add_claim = 622
		add_claim = 659
                add_army_tradition = 15
	}
	abort_effect = {
		remove_claim = 619
		remove_claim = 620
		remove_claim = 622
		remove_claim = 659
                add_army_tradition = -15
	}
	effect = {
		add_prestige = 5
	}
}

conquer_lampung = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		tag = ATJ
		is_subject = no
		LAM = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			LAM = { is_subject = yes }
			NOT = { exists = LAM }
		}
	}
	success = {
		owns = 623
                NOT = { exists = LAM }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		add_claim = 623
		add_claim = 621
                add_army_tradition = 15
	}
	abort_effect = {
		remove_claim = 623
		remove_claim = 621
                add_army_tradition = -15
	}
	effect = {
		add_prestige = 5
	}
}

conquer_kutei = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
                is_year = 1400
		tag = BEI
		is_subject = no
		religion = sunni
		KUT = {
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			KUT = { is_subject = yes }
			NOT = { exists = KUT }
		}
	}
	success = {
		owns = 638
                NOT = { exists = KUT }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		add_claim = 638
		add_claim = 639
	}
	abort_effect = {
		remove_claim = 638
		remove_claim = 639
	}
	effect = {
		add_prestige = 5
	}
}

conquer_sukadana = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
                is_year = 1400
		tag = BEI
		religion = sunni
		is_subject = no
		SDN = {
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			SDN = { is_subject = yes }
			NOT = { exists = SDN }
		}
	}
	success = {
		owns = 640
                NOT = { exists = SDN }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}	
	}
	immediate = {
		add_claim = 640
	}
	abort_effect = {
		remove_claim = 640
	}
	effect = {
		add_prestige = 5
	}
}

conquer_shan = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = SST
	}
	allow = {
		tag = TAU
		is_subject = no
		SST = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = SST }
			any_target_province = {
				NOT = { owned_by = SST }
			}
		}
	}
	success = {
		NOT = { exists = SST }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

conquer_pegu = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = PEG
	}
	allow = {
		tag = TAU
		is_subject = no
		PEG = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = PEG }
			any_target_province = {
				NOT = { owned_by = PEG }
			}
		}
	}
	success = {
		NOT = { exists = PEG }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

conquer_arakan = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = ARK
	}
	allow = {
		tag = TAU
		is_subject = no
		ARK = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = ARK }
			any_target_province = {
				NOT = { owned_by = ARK }
			}
		}
	}
	success = {
		NOT = { exists = ARK }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

conquer_kachar = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = KAC
	}
	allow = {
		tag = TAU
		is_subject = no
		KAC = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = KAC }
			any_target_province = {
				NOT = { owned_by = KAC }
			}
		}
	}
	success = {
		NOT = { exists = KAC }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

conquer_lanna = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = LNA
	}
	allow = {
		tag = TAU
		is_subject = no
		LNA = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = LNA }
			any_target_province = {
				NOT = { owned_by = LNA }
			}
		}
	}
	success = {
		NOT = { exists = LNA }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

conquer_sukhothai = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = SUK
	}
	allow = {
		tag = TAU
		is_subject = no
		SUK = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = SUK }
			any_target_province = {
				NOT = { owned_by = SUK }
			}
		}
	}
	success = {
		NOT = { exists = SUK }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

conquer_ayutthaya = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = AYU
	}
	allow = {
		tag = TAU
		is_subject = no
		AYU = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = AYU }
			any_target_province = {
				NOT = { owned_by = AYU }
			}
		}
	}
	success = {
		NOT = { exists = AYU }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

conquer_lanxang = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	target_provinces = {
		owned_by = LXA
	}
	allow = {
		tag = TAU
		is_subject = no
		LXA = {
			is_neighbor_of = ROOT
			NOT = { is_subject_of = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = LXA }
			any_target_province = {
				NOT = { owned_by = LXA }
			}
		}
	}
	success = {
		NOT = { exists = LXA }
		all_target_province = {
			owned_by = ROOT
		}
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			mil = 4
		}
	}
	immediate = {
		every_target_province = {
			add_claim = ROOT
		}
	}
	abort_effect = {
		every_target_province = {
			remove_claim = ROOT
		}
	}
	effect = {
		add_prestige = 5
	}
}

vassalize_khmer = {
	
	type = country

	category = MIL
	ai_mission = yes
	
	allow = {
		tag = AYU
		exists = KHM
		is_subject = no
		KHM = {
			is_subject = no
			is_neighbor_of = ROOT
			NOT = { num_of_cities = ROOT }
		}
	}
	abort = {
		OR = {
			is_subject = yes
			NOT = { exists = KHM }
			KHM = { is_subject = yes }
		}
	}
	success = {
		KHM = { vassal_of = AYU }
	}
	chance = {
		factor = 1000
		modifier = {
			factor = 2
			has_opinion = { who = KHM value = -25 }
		}
	}
	immediate = {
		add_casus_belli = {
			type = cb_vassalize_mission
			months = 240
			target = KHM
		}
	}
	abort_effect = {
		remove_casus_belli = {
			type = cb_vassalize_mission
			target = KHM
		}
	}
	effect = {
		add_prestige = 10
		hidden_effect = {
			remove_casus_belli = {
				type = cb_vassalize_mission
				target = KHM
			}
		}
	}
}
