fijian_missions = {
	slot = 3
	generic = no
	ai = yes
	potential = {
		OR = {
			tag = LAI
			tag = VIL
			tag = VIT
			tag = VNL
		}
	}
	has_country_shield = yes
	
	fiji_drua_builders = {
		icon = mission_polynesian_navy_build
		position = 2
		required_missions = { gain_mana }
		provinces_to_highlight = {
			owned_by = ROOT
			has_port = yes
			NOT = {
				OR = {
					has_building = shipyard
					has_building = grand_shipyard
				}
			}
			num_free_building_slots = 1
		}
		trigger = { 
			OR = {
				AND = {
					shipyard = 1
					num_of_light_ship = 5
				}
				num_of_light_ship = 15
			}
		}
		effect = {
			add_treasury = 50
		}
	}
	fiji_vunivalu = {
		icon = mission_oceania_build_army_mission
		position = 3
		required_missions = { fiji_drua_builders }
		trigger = { 
			army_tradition = 35
		}
		effect = {
			add_yearly_manpower = 0.75
		}
	}
	fiji_island_lords = {
		icon = mission_oceania_dev_capital
		position = 4
		required_missions = { fiji_vunivalu }
		provinces_to_highlight = {
			owner = {
				ROOT = {
					is_rival = PREV
				}
			}
		}
		trigger = {
			OR = {
				AND = {
					fiji_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					army_size_percentage = 1
				}
				AND = {
					OR = { 
						any_rival_country = {
							is_threat = ROOT
						}
						any_rival_country = {
							NOT = {
								land_morale = ROOT
							}
						}
					}
					all_rival_country = { 
						NOT = {
							army_strength = {
								who = ROOT
								value = 0.5
							}
						}
					}
				}
			}
		}	
		effect = {
			fiji_area = {
				add_permanent_claim = ROOT
			}
		}
	}
	fiji_one_nation = {
		icon = mission_oceania_build_army_mission
		position = 5
		required_missions = { fiji_island_lords }
		provinces_to_highlight = {
			area = fiji_area
		}
		trigger = {
			fiji_area = {
				type = all
				owned_by = ROOT
			}
		}	
		effect = {
			add_estate_loyalty = {
				estate = estate_burghers
				loyalty = 10
			}
			add_estate_loyalty = {
				estate = estate_church
				loyalty = 10
			}
			add_estate_loyalty = {
				estate = estate_nobles
				loyalty = 10
			}
			add_country_modifier = {
				name = "expansionist_country"
				duration = 9125 #25 years
			}
		}
	}
}

hawaiian_missions = {#Credits to James Beaumont
	slot = 3
	generic = no
	ai = yes
	potential = {
		OR = {
			tag = HAW
			tag = KAA
			tag = MAU
			tag = OAH
			tag = UHW
		}
	}
	has_country_shield = yes
	
	hawaii_ahupuaa_system = {
		icon = mission_oceania_royal_marriage
		position = 2
		required_missions = { gain_mana }
		trigger = { 
			if = {
				limit = {
					has_any_estates = yes
				}
				crown_land_share = 30
				if = {
					limit = {
						has_estate = estate_burghers
					}
					estate_loyalty = {
						estate = estate_burghers
						loyalty = 60
					}
				}
				if = {
					limit = {
						has_estate = estate_church
					}
					estate_loyalty = {
						estate = estate_church
						loyalty = 60
					}
				}
				if = {
					limit = {
						has_estate = estate_nobles
					}
					estate_loyalty = {
						estate = estate_nobles
						loyalty = 60
					}
				}
			}
			else = {
				stability = 2
				total_development = 30
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { stability = 3 }
				}
				add_stability = 1
				add_adm_power = 50
				add_dip_power = 50
				add_mil_power = 50
			}
			else = {
				add_adm_power = 100
				add_dip_power = 100
				add_mil_power = 100
			}
		}
	}
	hawaii_please_the_kaha = {
		icon = mission_oceania_build_army_mission
		position = 3
		required_missions = { hawaii_ahupuaa_system }
		trigger = { 
			if = {
				limit = {
					has_dlc = "Rights of Man"
				}
				num_of_generals_with_traits = 1
			}
			else = {
				num_of_generals = 2
			}
		}
		effect = {
			add_army_tradition = 15
		}
	}
	hawaii_lift_naha = {
		icon = mission_oceania_dev_capital
		position = 4
		required_missions = { hawaii_please_the_kaha}
		provinces_to_highlight = {
			OR = {
				province_id = 1240
				owner = {
					ROOT = {
						is_rival = PREV
					}
				}
			}
		}
		trigger = {
			1240 = { 
				country_or_subject_holds = ROOT 
			}
			OR = {
				calc_true_if = {
					amount = 2
					all_province = {
						area = northern_polynesia_area
						owned_by = ROOT
					}
				}
				all_rival_country = { 
					NOT = {
						army_strength = {
							who = ROOT
							value = 0.5
						}
					}
				}
			}
		}	
		effect = {
			northern_polynesia_area = {
				add_permanent_claim = ROOT
			}
		}
	}
	hawaii_prove_prowess = {
		icon = mission_gain_mana
		position = 5
		required_missions = { hawaii_lift_naha }
		provinces_to_highlight = {
			area = northern_polynesia_area
		}
		trigger = {
			northern_polynesia_area = {
				type = all
				owned_by = ROOT
			}
		}	
		effect = {
			change_adm = 1
			change_dip = 1
			change_mil = 1
		}
	}
}

maori_missions = {#Credits to James Beaumont
	slot = 3
	generic = no
	ai = yes
	potential = {
		primary_culture = maori
	}
	has_country_shield = yes
	
	maori_haka = {
		icon = mission_oceania_assemble_an_army
		position = 2
		required_missions = { }
		trigger = {
			manpower_percentage = 0.5
			army_tradition = 25
			army_size_percentage = 0.8
		}
		effect = {
			create_general = { 
				tradition = 50 
			}
			random_known_country = {
				limit = { 
					is_rival = ROOT 
					primary_culture = maori
				}
				if = { 
					limit = { 
						NOT = { 
							has_dlc = "Mandate of Heaven" 
						} 
					}
					add_casus_belli = {
						target = FROM
						type = cb_vassalize_mission
						months = 300
					}
				} 		
				else = {
					add_casus_belli = {
						target = FROM
						type = cb_force_tributary_mission
						months = 300
					}
				}
			}
		}
	}
	maori_riri = {
		icon = mission_oceania_build_army_mission
		position = 3
		required_missions = { maori_haka }
		provinces_to_highlight = {
			owner = {
				ROOT = {
					is_rival = PREV
				}
			}
		}
		trigger = { 
			OR = {
				all_rival_country = { 
					NOT = {
						army_strength = {
							who = ROOT
							value = 0.5
						}
					}
				}
				AND = {
					te_ika_a_maui_hauauru_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					te_ika_a_maui_waho_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					te_waipounamu_area = {
						type = all
						country_or_non_sovereign_subject_holds = ROOT
					}
					army_size_percentage = 1
				}
			}
		}
		effect = {
			if = {
				limit = {
					any_known_country = {
						is_rival = ROOT 
						primary_culture = maori
					}
				}
				random_known_country = {
					limit = { 
						is_rival = ROOT 
						primary_culture = maori
					}
					if = { 
						limit = { 
							NOT = { 
								has_dlc = "Mandate of Heaven" 
							} 
						}
						reverse_add_casus_belli = {
							target = ROOT
							type = cb_vassalize_mission
							months = 300
						}
					} 		
					else = {
						reverse_add_casus_belli = {
							target = ROOT
							type = cb_force_tributary_mission
							months = 300
						}
					}
				}
			}
			else = {
				add_yearly_manpower = 0.15
				add_adm_power = 100
			}
		}
	}
	maori_ka_mate = {
		icon = mission_gain_mana
		position = 4
		required_missions = { maori_riri }
		provinces_to_highlight = {
			OR = {
				area = te_ika_a_maui_hauauru_area
				area = te_ika_a_maui_waho_area
			}
		}
		trigger = { 
			OR = {
				is_at_war = yes
				had_recent_war = 10
			}
			num_of_provinces_owned_or_owned_by_non_sovereign_subjects_with = {
				value = 2
				OR = {
					area = te_ika_a_maui_hauauru_area
					area = te_ika_a_maui_waho_area
				}
			}
		}
		effect = {
			if = {
				limit = {
					NOT = { stability = 3 }
				}
				add_stability = 1
				add_adm_power = 50
				add_dip_power = 50
				add_mil_power = 50
			}
			else = {
				add_adm_power = 100
				add_dip_power = 100
				add_mil_power = 100
			}
		}
	}
	maori_colonize_southern_island = {
		icon = mission_invade_island
		position = 5
		required_missions = { maori_ka_mate }
		provinces_to_highlight = {
			OR = {
				area = te_ika_a_maui_hauauru_area
				area = te_ika_a_maui_waho_area
				area = te_waipounamu_area
			}
		}
		trigger = { 
			OR = {
				AND = {
					te_ika_a_maui_hauauru_area = { 
						type = all
						country_or_subject_holds = ROOT 
					}
					te_ika_a_maui_waho_area = { 
						type = all
						country_or_subject_holds = ROOT 
					}
				}
				AND = {
					te_waipounamu_area = { 
						country_or_subject_holds = ROOT 
					}
					OR = {
						treasury = 1000
						AND = {
							adm = 4
							dip = 4
							mil = 4
						}
					}
				}
			}
		}
		effect = {
			every_province = {
				limit = {
					area = te_waipounamu_area
					is_empty = yes
				}
				cede_province = ROOT
			}
		}
	}
}

samoan_missions = {
	slot = 3
	generic = no
	ai = yes
	potential = {
		tag = SAM
	}
	has_country_shield = yes
	
	samoa_tonga = {
		icon = mission_oceania_royal_marriage
		position = 2
		required_missions = { gain_mana }
		provinces_to_highlight = {
			province_id = 1989
		}
		trigger = { 
			OR = {
				AND = {
					TOG = {
						exists = no
					}
					1989 = {
						owned_by = SAM
					}
				}
				TOG = {
					exists = yes
					is_subject_of = SAM
				}
				AND = {
					marriage_with = TOG
					prestige = TOG
					legitimacy = TOG
					army_strength = {
						who = TOG
						value = 0.5
					}
				}				
			}
		}
		effect = {
			if = { 
				limit = { 
					NOT = { 
						has_dlc = "Mandate of Heaven" 
					} 
				}
				add_casus_belli = {
					target = TOG
					type = cb_vassalize_mission
					months = 300
				}
			} 		
			else_if = {
				limit = {
					OR = {
						AND = {
							TOG = {
								exists = no
							}
							1989 = {
								owned_by = SAM
							}
						}
						TOG = {
							exists = yes
							is_subject_of = SAM
						}
					}
				}
				add_prestige = 25
			}
			else = {
				add_prestige = 10
				add_casus_belli = {
					target = TOG
					type = cb_force_tributary_mission
					months = 300
				}
			}
		}
	}
	samoa_culture = {
		icon = mission_polynesian_grand_navy
		position = 3
		required_missions = { samoa_tonga }
		provinces_to_highlight = {
			region = oceanea_region
			is_city = yes
		}
		trigger = { 
			any_country = {
				capital_scope = {
					region = oceanea_region
				}
				NOT = {
					prestige = SAM
				}
			}
			OR = {
				artist = 2
				natural_scientist = 2
				philosopher = 2
			}
		}
		effect = {
			add_adm_power = 200
			add_dip_power = 200
			add_mil_power = 200
		}
	}
	samoa_army = {
		icon = mission_oceania_build_army_mission
		position = 4
		required_missions = { samoa_culture }
		provinces_to_highlight = {
			province_id = 1989
		}
		trigger = { 	
			1989 = {
				OR = {
					owner = {
						is_subject_of = ROOT
					}
					owned_by = ROOT
				}
			}
			army_size = 4 # modified
		}
		effect = {
			every_known_country = {
				limit = { 
					OR = {
						primary_culture = maori
						primary_culture = melanesian
						primary_culture = polynesian
					}
				}
				if = { 
					limit = { 
						NOT = { 
							has_dlc = "Mandate of Heaven" 
						} 
					}
					reverse_add_casus_belli = {
						target = ROOT
						type = cb_vassalize_mission
						months = 300
					}
				} 		
				else = {
					reverse_add_casus_belli = {
						target = ROOT
						type = cb_force_tributary_mission
						months = 300
					}
				}
			}
		}
	}
	samoa_empire = {
		icon = mission_polynesian_navy_build
		position = 5
		required_missions = { samoa_army }
		provinces_to_highlight = {
			region = oceanea_region
			is_city = yes
		}
		trigger = { 
			OR = {
				tributary_state = 6
				vassal = 4
			}
		}
		effect = {
			add_country_modifier = {
				name = "polynesian_supremacy"
				duration = -1
			}
		}
	}
}

tongan_missions = {
	slot = 3
	generic = no
	ai = yes
	potential = {
		tag = TOG
	}
	has_country_shield = yes
	
	tonga_samoa = {
		icon = mission_oceania_royal_marriage
		position = 2
		required_missions = { gain_mana }
		provinces_to_highlight = {
			province_id = 1243
		}
		trigger = { 
			OR = {
				AND = {
					SAM = {
						exists = no
					}
					1243 = {
						owned_by = TOG
					}
				}
				SAM = {
					exists = yes
					is_subject_of = TOG
				}
				AND = {
					marriage_with = SAM
					prestige = SAM
					legitimacy = SAM
					army_strength = {
						who = SAM
						value = 0.5
					}
				}
			}
		}
		effect = {
			if = { 
				limit = { 
					NOT = { 
						has_dlc = "Mandate of Heaven" 
					} 
				}
				add_casus_belli = {
					target = SAM
					type = cb_vassalize_mission
					months = 300
				}
			} 	
			else_if = {
				limit = {
					OR = {
						AND = {
							SAM = {
								exists = no
							}
							1243 = {
								owned_by = TOG
							}
						}
						SAM = {
							exists = yes
							is_subject_of = TOG
						}
					}
				}
				add_prestige = 25
			}			
			else = {
				add_prestige = 10
				add_casus_belli = {
					target = SAM
					type = cb_force_tributary_mission
					months = 300
				}
			}
		}
	}
	tonga_fijian_tributes = {
		icon = mission_gain_mana
		position = 3
		required_missions = { tonga_samoa  }
		provinces_to_highlight = {
			province_id = 1243
		}
		trigger = { 
			1243 = {
				OR = {
					owner = {
						is_subject_of = ROOT
					}
					owned_by = ROOT
				}
			}
			army_size = 4 # modified
		}
		effect = {
			every_known_country = {
				limit = { 
					OR = {
						tag = LAI
						tag = VIL
						tag = VIT
						tag = VNL
					}
				}
				if = { 
					limit = { 
						NOT = { 
							has_dlc = "Mandate of Heaven" 
						} 
					}
					reverse_add_casus_belli = {
						target = ROOT
						type = cb_vassalize_mission
						months = 300
					}
				} 		
				else = {
					reverse_add_casus_belli = {
						target = ROOT
						type = cb_force_tributary_mission
						months = 300
					}
				}
			}
			add_prestige = 10
		}
	}
	tonga_tui_tonga = {
		icon = mission_polynesian_navy_build
		position = 4
		required_missions = { tonga_fijian_tributes }
		provinces_to_highlight = {
			area = fiji_area
		}
		trigger = {
			fiji_area = {
				type = all
				OR = {
					owner = {
						is_subject_of = ROOT
					}
					owned_by = ROOT
				}
			}
		}
		effect = {
			every_known_country = {
				limit = { 
					OR = {
						primary_culture = maori
						primary_culture = melanesian
						primary_culture = polynesian
					}
					NOT = {
						is_subject_of = ROOT
					}
				}
				if = { 
					limit = { 
						NOT = { 
							has_dlc = "Mandate of Heaven" 
						} 
					}
					reverse_add_casus_belli = {
						target = ROOT
						type = cb_vassalize_mission
						months = 300
					}
				} 		
				else = {
					reverse_add_casus_belli = {
						target = ROOT
						type = cb_force_tributary_mission
						months = 300
					}
				}
			}
		}
	}
	tonga_supremacy = {
		icon = mission_oceania_dev_capital
		position = 5
		required_missions = { tonga_tui_tonga }
		provinces_to_highlight = {
			region = oceanea_region
			is_city = yes
		}
		trigger = { 
			OR = {
				tributary_state = 6
				vassal = 4
			}
		}
		effect = {
			add_country_modifier = {
				name = "polynesian_supremacy"
				duration = -1
			}
		}
	}
}