﻿###########################
# ganza Events
###########################

add_namespace = ganza

# мы перехватываем власть в ганзе
country_event = {
	id = ganza.1
	title = ganza.1.t
	desc = ganza.1.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			set_faction_leader = yes
			set_global_flag = vybory_end_flag
			activate_targeted_decision = { target = ROOT decision = gansa_vybory_1 }
			country_event = { days = 51 id = ganza.2 }
		}	
	}
	option = {
		name = ganza.1.a				
		every_other_country = {
			limit = {
				has_idea = gansa_idea_bonus
				exists = yes
			}
			country_event = { id = ganza.4 }	
		}
	}
}
# эвент на удаление флага по таймерк
country_event = {
	id = ganza.2
	Hidden = yes
	is_triggered_only = yes	
	immediate = {
		clr_global_flag = vybory_end_flag
	}
}
#триггеры для событий самого ЛЮБЕКА. эвент запустить через стартовый эвент 
country_event = {
	id = ganza.3
	Hidden = yes
	is_triggered_only = yes
	trigger = {	
		tag = ZLU
		has_idea = gansa_idea_bonus
	}
	immediate = {
		random_list = {
			30 = { 				
				country_event = { id = ganza.7 days = 15 random = 10 } #немного в плюс
			}
			40 = { 				
				country_event = { id = ganza.8 days = 15 random = 10 } #немного в минус
			}
			8 = { 				
				country_event = { id = ganza.9 days = 15 random = 10 } #много в плюс
			}
			12 = { 				
				country_event = { id = ganza.10 days = 15 random = 10 } #много в минус
			}
		}
	}
}
#эвент учасникам ганзы о том что есть новый лидер
country_event = {
	id = ganza.4
	title = ganza.4.t
	desc = ganza.4.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			activate_targeted_decision = { target = ROOT decision = gansa_vybory_1 }
		}	
		if = {
			limit = {
				ZLU = {
					is_faction_leader = yes
				}	
			}
			custom_effect_tooltip = gansa_lubek_perehvat_tt 
		}	
		if = {
			limit = {
				ZFR = {
					is_faction_leader = yes
				}	
			}
			custom_effect_tooltip = gansa_frisia_perehvat_tt 
		}
		if = {
			limit = {
				ZHM = {
					is_faction_leader = yes
				}	
			}
			custom_effect_tooltip = gansa_hamburg_perehvat_tt 
		}
		if = {
			limit = {
				ZJT = {
					is_faction_leader = yes
				}	
			}
			custom_effect_tooltip = gansa_jutland_perehvat_tt 
		}
	}
	option = {
		name = ganza.4.a
		
	}
}
#стартовый эвент любеку что он пока лидер ганзы
country_event = {
	id = ganza.5
	title = ganza.5.t
	desc = ganza.5.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = ganza.5.a
		add_political_power = 20
		hidden_effect = {
			country_event = { id = ganza.3 }
			ZFR = {
				country_event = { id = ganza.6 }
#				country_event = { id = ganza.11 }
			}
			ZHM = {
				country_event = { id = ganza.6 }
#				country_event = { id = ganza.16 }
			}
			ZJT = {
				country_event = { id = ganza.6 }
#				country_event = { id = ganza.21 }
			}
		}
	}
}
#стартовый эвент другим ганзейцам о том что любек лидер, а мы можем посоревноваться
country_event = {
	id = ganza.6
	title = ganza.6.t
	desc = ganza.6.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = ganza.6.a
		add_political_power = 25		
	}
}
##немного в плюс ЛЮБЕКА
country_event = {
	id = ganza.7
	title = ganza.7.t
	desc = ganza.7.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZLU
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.7.a
		zlu_influence_add_1_lubek = yes
		hidden_effect = {
			country_event = { id = ganza.3 days = 20 random = 12 }
		}
	}
}
##немного в минус ЛЮБЕКА
country_event = {
	id = ganza.8
	title = ganza.8.t
	desc = ganza.8.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZLU
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.8.a
		zlu_influence_subtract_1_lubek = yes
		hidden_effect = {
			country_event = { id = ganza.3 days = 20 random = 12 }
		}
	}
}
##много в плюс ЛЮБЕКА
country_event = {
	id = ganza.9
	title = ganza.9.t
	desc = ganza.9.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZLU
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.9.a
		zlu_influence_add_3_lubek = yes
		hidden_effect = {
			country_event = { id = ganza.3 days = 20 random = 12 }
		}
	}
}
##много в минус ЛЮБЕКА
country_event = {
	id = ganza.10
	title = ganza.10.t
	desc = ganza.10.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZLU
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.10.a
		zlu_influence_subtract_3_lubek = yes
		hidden_effect = {
			country_event = { id = ganza.3 days = 20 random = 12 }
		}
	}
}
#триггеры для событий самого ФРИЗИИ. эвент запустить через стартовый эвент 
country_event = {
	id = ganza.11
	Hidden = yes
	is_triggered_only = yes
	trigger = {	
		tag = ZFR
		has_idea = gansa_idea_bonus
	}
	immediate = {
		random_list = {
			30 = { 				
				country_event = { id = ganza.12 days = 15 random = 10 } #немного в плюс
			}
			40 = { 				
				country_event = { id = ganza.13 days = 15 random = 10 } #немного в минус
			}
			8 = { 				
				country_event = { id = ganza.14 days = 15 random = 10 } #много в плюс
			}
			12 = { 				
				country_event = { id = ganza.15 days = 15 random = 10 } #много в минус
			}
		}
	}
}
##немного в плюс ФРИЗИИ
country_event = {
	id = ganza.12
	title = ganza.12.t
	desc = ganza.12.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZFR
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.12.a
		zfr_influence_add_1_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.11 days = 20 random = 12 }
		}
	}
}
##немного в минус ФРИЗИИ
country_event = {
	id = ganza.13
	title = ganza.13.t
	desc = ganza.13.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZFR
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.13.a
		zfr_influence_subtract_1_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.11 days = 20 random = 12 }
		}
	}
}
##много в плюс ФРИЗИИ
country_event = {
	id = ganza.14
	title = ganza.14.t
	desc = ganza.14.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZFR
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.14.a
		zfr_influence_add_3_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.11 days = 20 random = 12 }
		}
	}
}
##много в минус ФРИЗИИ
country_event = {
	id = ganza.15
	title = ganza.15.t
	desc = ganza.15.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZFR
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.15.a
		zfr_influence_subtract_3_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.11 days = 20 random = 12 }
		}
	}
}
#триггеры для событий самого ГАМБУРГА. эвент запустить через стартовый эвент 
country_event = {
	id = ganza.16
	Hidden = yes
	is_triggered_only = yes
	trigger = {	
		tag = ZHM
		has_idea = gansa_idea_bonus
	}
	immediate = {
		random_list = {
			30 = { 				
				country_event = { id = ganza.17 days = 15 random = 10 } #немного в плюс
			}
			40 = { 				
				country_event = { id = ganza.18 days = 15 random = 10 } #немного в минус
			}
			8 = { 				
				country_event = { id = ganza.19 days = 15 random = 10 } #много в плюс
			}
			12 = { 				
				country_event = { id = ganza.20 days = 15 random = 10 } #много в минус
			}
		}
	}
}
##немного в плюс ГАМБУРГА
country_event = {
	id = ganza.17
	title = ganza.17.t
	desc = ganza.17.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZHM
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.17.a
		zhm_influence_add_1_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.16 days = 20 random = 12 }
		}
	}
}
##немного в минус ГАМБУРГА
country_event = {
	id = ganza.18
	title = ganza.18.t
	desc = ganza.18.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZHM
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.18.a
		zhm_influence_subtract_1_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.16 days = 20 random = 12 }
		}
	}
}
##много в плюс ГАМБУРГА
country_event = {
	id = ganza.19
	title = ganza.19.t
	desc = ganza.19.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZHM
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.19.a
		zhm_influence_add_3_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.16 days = 20 random = 12 }
		}
	}
}
##много в минус ГАМБУРГА
country_event = {
	id = ganza.20
	title = ganza.20.t
	desc = ganza.20.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZHM
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.20.a
		zhm_influence_subtract_3_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.16 days = 20 random = 12 }
		}
	}
}
#триггеры для событий самого ЮТЛАНДИИ КОПЕНГАГЕНА. эвент запустить через стартовый эвент 
country_event = {
	id = ganza.21
	Hidden = yes
	is_triggered_only = yes
	trigger = {	
		tag = ZJT
		has_idea = gansa_idea_bonus
	}
	immediate = {
		random_list = {
			30 = { 				
				country_event = { id = ganza.22 days = 15 random = 10 } #немного в плюс
			}
			40 = { 				
				country_event = { id = ganza.23 days = 15 random = 10 } #немного в минус
			}
			8 = { 				
				country_event = { id = ganza.24 days = 15 random = 10 } #много в плюс
			}
			12 = { 				
				country_event = { id = ganza.25 days = 15 random = 10 } #много в минус
			}
		}
	}
}
##немного в плюс ЮТЛАНДИИ
country_event = {
	id = ganza.22
	title = ganza.22.t
	desc = ganza.22.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZJT
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.22.a
		zjt_influence_add_1_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.21 days = 20 random = 12 }
		}
	}
}
##немного в минус ЮТЛАНДИИ
country_event = {
	id = ganza.23
	title = ganza.23.t
	desc = ganza.23.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZJT
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.23.a
		zjt_influence_subtract_1_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.21 days = 20 random = 12 }
		}
	}
}
##много в плюс ЮТЛАНДИИ
country_event = {
	id = ganza.24
	title = ganza.24.t
	desc = ganza.24.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZJT
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.24.a
		zjt_influence_add_3_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.21 days = 20 random = 12 }
		}
	}
}
##много в минус ЮТЛАНДИИ
country_event = {
	id = ganza.25
	title = ganza.25.t
	desc = ganza.25.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	trigger = {
		tag = ZJT
		has_idea = gansa_idea_bonus
	}
	option = {
		name = ganza.25.a
		zjt_influence_subtract_3_frisia = yes
		hidden_effect = {
			country_event = { id = ganza.21 days = 20 random = 12 }
		}
	}
}
###########
# Конгресс стран Ганзы основан
country_event = {
	id = ganza.26
	title = ganza.26.t
	desc = ganza.26.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			set_global_flag = ganza_ref_1_flag
			set_global_flag = ganza_reforming_end
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
			country_event = { days = 101 id = ganza.37 }
		}
	}	
	option = {
		name = ganza.26.a			
		every_other_country = {
			limit = {
				has_idea = gansa_idea_bonus
				exists = yes
			}
			country_event = { id = ganza.27 }	
		}
	}
}
# Конгресс стран Ганзы основан для всех эвент
country_event = {
	id = ganza.27
	title = ganza.27.t
	desc = ganza.27.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
		}	
	}	
	option = {
		name = ganza.27.a		
		
	}
}
# Экономико-правовая политика
country_event = {
	id = ganza.28
	title = ganza.28.t
	desc = ganza.28.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			set_global_flag = ganza_ref_2_flag
			set_global_flag = ganza_reforming_end
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
			country_event = { days = 101 id = ganza.37 }
		}	
	}	
	option = {
		name = ganza.28.a	
		
		every_other_country = {
			limit = {
				has_idea = gansa_idea_bonus
				exists = yes
			}
			country_event = { id = ganza.29 }	
		}
	}
}
# Экономико-правовая политика для всех эвент
country_event = {
	id = ganza.29
	title = ganza.29.t
	desc = ganza.29.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes		
	immediate = {
		hidden_effect = {
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
		}
	}
	option = {
		name = ganza.29.a		
		
	}
}
# Взаимоинтеграционные реформы
country_event = {
	id = ganza.30
	title = ganza.30.t
	desc = ganza.30.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			set_global_flag = ganza_ref_3_flag
			set_global_flag = ganza_reforming_end
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
			country_event = { days = 101 id = ganza.37 }
		}	
	}	
	option = {
		name = ganza.30.a	
		
		every_other_country = {
			limit = {
				has_idea = gansa_idea_bonus
				exists = yes
			}
			country_event = { id = ganza.31 }	
		}
	}
}
# Взаимоинтеграционные реформы для всех эвент
country_event = {
	id = ganza.31
	title = ganza.31.t
	desc = ganza.31.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
		}	
	}
	option = {
		name = ganza.31.a	
		
	}
}
# Созыв единого парламента Ганзы
country_event = {
	id = ganza.32
	title = ganza.32.t
	desc = ganza.32.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {	
		hidden_effect = {
			set_global_flag = ganza_ref_4_flag
			set_global_flag = ganza_reforming_end
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
			country_event = { days = 101 id = ganza.37 }
		}	
	}	
	option = {
		name = ganza.32.a		
		every_other_country = {
			limit = {
				has_idea = gansa_idea_bonus
				exists = yes
			}
			country_event = { id = ganza.33 }	
		}
	}
}
# Созыв единого парламента Ганзы для всех эвент
country_event = {
	id = ganza.33
	title = ganza.33.t
	desc = ganza.33.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
		}
	}
	option = {
		name = ganza.33.a			
	}
}
# Конституция Ганзы
country_event = {
	id = ganza.34
	title = ganza.34.t
	desc = ganza.34.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {	
		hidden_effect = {
			set_global_flag = ganza_ref_5_flag
			set_global_flag = ganza_reforming_end
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
			country_event = { days = 101 id = ganza.37 }
		}	
	}	
	option = {
		name = ganza.34.a			
		every_other_country = {
			limit = {
				has_idea = gansa_idea_bonus
				exists = yes
			}
			country_event = { id = ganza.35 }	
		}
	}
}
# Конституция Ганзы для всех эвент
country_event = {
	id = ganza.35
	title = ganza.35.t
	desc = ganza.35.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		hidden_effect = {
			activate_targeted_decision = { target = ROOT decision = gansa_timaout_posle_reform }
		}	
	}	
	option = {
		name = ganza.35.a			
	}
}
# Федерализация (марионетим)
country_event = {
	id = ganza.36
	title = ganza.36.t
	desc = ganza.36.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		set_global_flag = ganza_ref_6_flag
		set_global_flag = ganza_reforming_end
	}	
	option = {
		name = ganza.36.a
		remove_ideas = gansa_idea_bonus	
		set_country_flag = strana_stolitsa_ganzy
		set_cosmetic_tag = ZGN_FEDRAT
		hidden_effect = {
			every_other_country = {
				limit = {
					has_idea = gansa_idea_bonus
					is_in_faction_with = ROOT
					tag = ZLU				
				}			
				set_cosmetic_tag = ZLU_FEDRAT
			}
			every_other_country = {
				limit = {
					has_idea = gansa_idea_bonus
					is_in_faction_with = ROOT
					tag = ZHM				
				}			
				set_cosmetic_tag = ZHM_FEDRAT
			}
			every_other_country = {
				limit = {
					has_idea = gansa_idea_bonus
					is_in_faction_with = ROOT
					tag = ZFR				
				}			
				set_cosmetic_tag = ZFR_FEDRAT
			}
			every_other_country = {
				limit = {
					has_idea = gansa_idea_bonus
					is_in_faction_with = ROOT
					tag = ZJT				
				}			
				set_cosmetic_tag = ZJT_FEDRAT
			}
			every_other_country = {
				limit = {
					has_idea = gansa_idea_bonus
					is_in_faction_with = ROOT
					NOT = {
						is_puppet_of = ROOT
					}				
				}			
				ROOT = { puppet = PREV }
				remove_ideas = gansa_idea_bonus	
				country_event = { id = ganza.42 }
			}	
		}
#		if = {
#			limit = {
#				is_faction_leader = yes
#			}
#			dismantle_faction = yes
#		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.759 }
		}
	}
}
# эвент на удажение флага по таймерк
country_event = {
	id = ganza.37
	Hidden = yes
	is_triggered_only = yes	
	immediate = {
		clr_global_flag = ganza_reforming_end
	}
}
# эвент что мы скоро всех кушоть будем
country_event = {
	id = ganza.38
	title = ganza.38.t
	desc = ganza.38.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		set_global_flag = ganza_budet_annexit_flag
	}	
	option = {
		name = ganza.38.a		
		every_other_country = {
			limit = {
				is_puppet_of = ROOT			
			}			
			country_event = { id = ganza.39 }
		}
	}
}
# эвент марионеткам что их скоро скушают, просрали свой шанс
country_event = {
	id = ganza.39
	title = ganza.39.t
	desc = ganza.39.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	immediate = {
		
	}	
	option = {
		name = ganza.39.a
		
	}
}
# эвент стране что его скушоли
country_event = {
	id = ganza.40
	title = ganza.40.t
	desc = ganza.40.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes			
	option = {
		name = ganza.40.a
		FROM = {
			annex_country = {
				target = ROOT
				transfer_troops = yes
			}
			country_event = { id = ganza.41 }
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
}
# эвент от страны которую скушоли
country_event = {
	id = ganza.41
	title = ganza.41.t
	desc = ganza.41.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes			
	option = {
		name = ganza.41.a
		
	}
}
# эвент для всех мы в федерации (мы марионетки)
country_event = {
	id = ganza.42
	title = ganza.42.t
	desc = ganza.42.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes			
	option = {
		name = ganza.42.a
		
	}
}

