add_namespace = NFEvents

country_event = {
	id = NFEvents.1
	title = "Alliance Offer"
	desc = "We have been invited to an alliance with Vanga. Should we accept the invitation?"
	picture = news_event_generic_sign_treaty1

	is_triggered_only = yes

	option = {
		name = "Yes"
		W38 = {
			add_ai_strategy = {
				type = alliance
				id = "W73"
				value = 200
			}
			dismantle_faction = yes
		}
		if = {
			limit = {
				W73 = {
					is_in_faction = no
				}
			}
			W73 = {
				create_faction = "Vanga"
			}
		}
		W73 = {
			add_to_faction = W38
		}
		hidden_effect = {
			news_event = { id = news.237 }
		}
	}

	option = {
		name = "No"
		ai_chance = { factor = 0 }
		hidden_effect = {
			news_event = { id = news.238 }
		}
	}
}

country_event = {
	id = NFEvents.2
	title = "Alliance Offer"
	desc = "We have been invited to an alliance with Paris. Should we accept the invitation?"
	picture = news_event_generic_sign_treaty1

	is_triggered_only = yes

	option = {
		name = "Yes"
		W25 = {
			add_ai_strategy = {
				type = alliance
				id = "W90"
				value = 200
			}
			dismantle_faction = yes
		}
		if = {
			limit = {
				W90 = {
					is_in_faction = no
				}
			}
			W90 = {
				create_faction = "Paris"
			}
		}
		W90 = {
			add_to_faction = W25
		}
		hidden_effect = {
			news_event = { id = news.239 }
		}
	}

	option = {
		name = "No"
		ai_chance = { factor = 0 }
		hidden_effect = {
			news_event = { id = news.240 }
		}
	}
}

country_event = {
	id = NFEvents.3
	title = "Alliance Offer"
	desc = "We have been invited to an alliance with Paris. Should we accept the invitation?"
	picture = news_event_generic_sign_treaty1

	is_triggered_only = yes

	option = {
		name = "Yes"
		W89 = {
			add_ai_strategy = {
				type = alliance
				id = "W90"
				value = 200
			}
			dismantle_faction = yes
		}
		if = {
			limit = {
				W90 = {
					is_in_faction = no
				}
			}
			W90 = {
				create_faction = "Paris"
			}
		}
		W90 = {
			add_to_faction = W89
		}
		hidden_effect = {
			news_event = { id = news.241 }
		}
	}

	option = {
		name = "No"
		ai_chance = { factor = 0 }
		hidden_effect = {
			news_event = { id = news.242 }
		}
	}
}

country_event = {
	id = NFEvents.4
	title = "Trade Incident"
	desc = "One of our convoys was sunk by Iroquois"
	picture = GFX_report_event_chinese_soldiers_fighting

	is_triggered_only = yes

	trigger = {
		has_country_flag = established_traders
		NOT = { has_country_flag = established_traders_activated }
	}

	option = {
		name = "They will Pay!"
		ai_chance = { factor = 85 }
		effect_tooltip = {
			X24 = {
				set_country_flag = established_traders_activated
				create_wargoal = {
					type = annex_everything
					target = X62
				}
			}
		}
	}
}
