#Events for small Russian states

namespace = FEE_Russian_Minors_Events

#The Veche
country_event = {
	id = FEE_Russian_Minors_Events.1
	title = FEE_Russian_Minors_Events.1.T
	desc = FEE_Russian_Minors_Events.1.D
	picture = CITY_VIEW_eventPicture

	trigger = {
		OR = {
			tag = RYA
			tag = YAR
			tag = PSK
			tag = TVE
		}
		NOT = { has_country_flag = fee_russian_minors_veche_flag }
		NOT = { adm_tech = 16 }
	}

	mean_time_to_happen = {
		months = 12
	}

	immediate = {
		hidden_effect = {
			set_country_flag = fee_russian_minors_veche_flag
		}
	}

	option = {
		name = FEE_Russian_Minors_Events.1.OPT1

		add_country_modifier = {
			name = fee_nov_administrative_focus_veche
			duration = 3650
		}
	}

	option = {
		name = FEE_Russian_Minors_Events.1.OPT2

		add_country_modifier = {
			name = fee_nov_diplomatic_focus_veche
			duration = 3650
		}
	}

	option = {
		name = FEE_Russian_Minors_Events.1.OPT3

		add_country_modifier = {
			name = fee_nov_military_focus_veche
			duration = 3650
		}
	}

	option = {
		name = FEE_Russian_Minors_Events.1.OPT4

		add_country_modifier = {
			name = fee_nov_no_focus_veche
			duration = 3650
		}
	}
}

#Seek Lithuanian Protection
country_event = {
	id = FEE_Russian_Minors_Events.2
	title = FEE_Russian_Minors_Events.2.T
	desc = FEE_Russian_Minors_Events.2.D
	picture = DIPLOMACY_eventPicture

	trigger = {
		OR = {
			tag = TVE
			tag = RYA
			tag = PSK
		}
		is_free_or_tributary_trigger = yes
		NOT = { has_country_flag = fee_russian_minors_lithuanian_protection }
		LIT = {
			is_free_or_tributary_trigger = yes
			NOT = { alliance_with = ROOT }
		}
		NOT = { num_of_cities = 5 }
		any_neighbor_country = {
			tag = MOS
		}
		is_year = 1450
	}

	mean_time_to_happen = {
		months = 300
	}

	immediate = {
		hidden_effect = {
			set_country_flag = fee_russian_minors_lithuanian_protection
		}
	}

	option = {
		name = FEE_Russian_Minors_Events.2.OPT1

		add_mil_power = 25
	}

	option = {
		name = FEE_Russian_Minors_Events.2.OPT2

		add_years_of_income = -1
		if = {
			limit = {
				LIT = {
					ai = yes
				}
			}
			create_alliance = LIT
		}
		if = {
			limit = {
				LIT = {
					ai = no
				}
			}
			country_event = {
				id = FEE_Russian_Minors_Events.3
				days = 5
			}
		}
	}
}

#Lithuania is offered to protect the kids
country_event = {
	id = FEE_Russian_Minors_Events.3
	title = FEE_Russian_Minors_Events.3.T
	desc = FEE_Russian_Minors_Events.3.D
	picture = CONQUEST_eventPicture

	is_triggered_only = yes

	option = {
		name = FEE_Russian_Minors_Events.3.OPT1
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				NOT = { num_of_free_diplomatic_relations = 0 }
			}
		}

		create_alliance = FROM
		add_years_of_income = 0.5
		add_dip_power = 10
	}

	option = {
		name = FEE_Russian_Minors_Events.3.OPT2

		FROM = {
			add_years_of_income = 1
		}
		add_adm_power = 25
	}
}

#The Pskovian Economy
country_event = {
	id = FEE_Russian_Minors_Events.4
	title = FEE_Russian_Minors_Events.4.T
	desc = FEE_Russian_Minors_Events.4.D
	picture = ECONOMY_eventPicture

	fire_only_once = yes

	trigger = {
		tag = PSK
		is_year = 1450
		owns = 274
	}

	mean_time_to_happen = {
		months = 60
	}

	option = {
		name = FEE_Russian_Minors_Events.4.OPT1

		274 = { change_trade_goods = fish }
	}

	option = {
		name = FEE_Russian_Minors_Events.4.OPT2

		274 = { add_base_production = 1 }
	}

	option = {
		name = FEE_Russian_Minors_Events.4.OPT3

		274 = { add_base_tax = 1 }
	}

	option = {
		name = FEE_Russian_Minors_Events.4.OPT4

		274 = { add_base_manpower = 1 }
	}
}

#The Legal Code of Pskov
country_event = {
	id = FEE_Russian_Minors_Events.5
	title = FEE_Russian_Minors_Events.5.T
	desc = FEE_Russian_Minors_Events.5.D
	picture = BIG_BOOK_eventPicture

	fire_only_once = yes

	trigger = {
		tag = PSK
		is_year = 1445
	}

	mean_time_to_happen = {
	 months = 24
	}
	option = {
		name = FEE_Russian_Minors_Events.5.OPT1

		add_country_modifier = {
			name = fee_psk_legal_code_of_pskov
			duration = -1
		}
	}
}