﻿add_namespace = parfir


# velikaya persia
country_event = {
	id = parfir.1
	title = parfir.1.t
	desc = parfir.1.d
	picture = GFX_report_event_chamberlain_announce
	is_triggered_only = yes	
	option = {
		name = parfir.1.a		
		set_cosmetic_tag = ZPA_IMPER
		remove_ideas = revansizm_zpe
		add_ideas = zpe_imperia_1
		add_timed_idea = {
			idea = paternalismdrift
			days = 365
		}
		every_state = {
			limit = { is_core_of = ZKS }
			add_core_of = ZPA							
		}
#		every_state = {
#			limit = { is_core_of = ZHU }
#			add_core_of = ZPA							
#		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.504 }
		}
	}
}

# rezervisty
country_event = {
	id = parfir.2
	title = parfir.2.t
	desc = parfir.2.d
	picture = GFX_report_event_chinese_soldiers_running
	is_triggered_only = yes	
	option = {
		name = parfir.2.a
		custom_effect_tooltip = parfir.2.a.tt
		hidden_effect =  {
			ZPA = {
				load_oob = "ZPA_rezerv"	
			}
		}		
	}
}

# perevorot
country_event = {
	id = parfir.3
	title = parfir.3.t
	desc = parfir.3.d
	picture = GFX_report_event_crowd_in_prague
	is_triggered_only = yes	
	option = {
		name = parfir.3.a
		if = {
			limit = {
				has_government = neutrality
			}
			kill_country_leader = yes
		}		
		add_popularity = { ideology = fascism popularity = 0.45 }	
		set_politics = {
			ruling_party = fascism
			last_election = "1986.2.2"			
			elections_allowed = no
		}		
		hidden_effect = {
			country_event = {
				days = 1
				id = ar_news.502
			}
		}
	}
}


# prisoedinenie парса
country_event = {
	id = parfir.4
	title = parfir.4.t
	desc = parfir.4.d
	picture = GFX_report_event_hitler_parade	
	is_triggered_only = yes	
	option = { # da
		name = parfir.4.a
		ai_chance = {
			factor = 5			
		}
		ZPA = {
			country_event = { hours = 2 id = parfir.5 }
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
	option = { # net spasibo
		name = parfir.4.b
		ai_chance = {
			factor = 2	
			modifier = {
				factor = 3
				strength_ratio = { tag = ZPA ratio > 0.8 }
			}
			modifier = {
				factor = 20
				is_in_faction = yes
			}
			modifier = {
				factor = 20
				has_completed_focus = zhu_fravaihiiskoe_dvijenie
			}
		}
		ZPA = {
			add_opinion_modifier = { target = ROOT modifier = zpa_per_otkaz }
			country_event = { hours = 2 id = parfir.6 }			
		}
	}
}

# pars soglasilsa
country_event = {
	id = parfir.5
	title = parfir.5.t
	desc = parfir.5.d
	picture = GFX_report_event_german_speech	
	is_triggered_only = yes	
	option = {
		name = parfir.5.a
		412 = {
			if = {
				limit = { is_owned_by = ZHU }
				add_core_of = ZPA
			}
		}
		413 = {
			if = {
				limit = { is_owned_by = ZHU }
				add_core_of = ZPA
			}
		}
		410 = {
			if = {
				limit = { is_owned_by = ZHU }
				add_core_of = ZPA
			}
		}
		888 = {
			if = {
				limit = { is_owned_by = ZHU }
				add_core_of = ZPA
			}
		}
		annex_country = { 
			target = ZHU
			transfer_troops = yes
		}
		hidden_effect = {
		news_event = { hours = 3 id = ar_news.503 }
		}
	}
}

# pars otkazal
country_event = {
	id = parfir.6
	title = parfir.6.t
	desc = parfir.6.d
	picture = GFX_report_event_german_troops	
	is_triggered_only = yes	
	option = {
		name = parfir.6.a
		ai_chance = {
			base = 5			
		}
		add_state_claim = 412
		add_state_claim = 413
		add_state_claim = 410
		add_state_claim = 888
		create_wargoal = {
			type = take_state_focus
			target = ZHU
			generator = { 412 413 410 }
		}
	}
	option = {
		name = parfir.6.b
		ai_chance = {
			base = 25			
		}
		add_state_claim = 412
		add_state_claim = 413
		add_state_claim = 410
		declare_war_on = {
			type = annex_everything
			target = ZHU			
		}
		hidden_effect = {
			if = {
				limit = {					
					ZVZ = {
						exists = yes
						NOT = {
							has_war_with = ZPA
							has_war_with = ZHU
						}
					}
					ZHU = {
						exists = yes
						has_idea = zhu_dogovor_s_romeei_boost
						NOT = {
							has_war_with = ZPA
							has_war_with = ZVZ
						}
					}
				}
				ZVZ = {
					country_event = { days = 1 id = pars.72 }
				}
			}
			country_event = { days = 5 id = parfir.26 }
		}
	}
}

# gornye brigady
country_event = {
	id = parfir.7
	title = parfir.7.t
	desc = parfir.7.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.7.a
		custom_effect_tooltip = parfir.7.a.tt
		hidden_effect =  {
			ZPA = {
				load_oob = "ZPA_gornye"	
			}
		}		
	}
}

# revolt to afgan
country_event = {
	id = parfir.8
	title = parfir.8.t
	desc = parfir.8.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.8.a #revol
		ai_chance = {
			base = 100			
		}			
		# AFG = {
			# set_country_flag = revolut_afgan
			# add_popularity = { ideology = fascism popularity = 0.70 }	
			# set_politics = {
			# ruling_party = fascism
			# last_election = "1986.2.2"			
			# elections_allowed = no
			# }
			# start_civil_war = {
				# ideology = neutrality
				# size = 0.4			
			# }
		# }			
	}
	option = {
		name = parfir.8.b  #otkaz ne dlya bota
		ai_chance = {
			base = 0			
		}
		# AFG = {	
			# add_timed_idea = {
				# idea = antirevolt_afg
				# days = 365
			# }
			# add_opinion_modifier = {
					# target = ZPA
					# modifier = vmesh_v_politiku
			# }	
		# }	
	}
}

# afgan puppet
country_event = {
	id = parfir.9
	title = parfir.9.t
	desc = parfir.9.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.9.a
		ZPA = {	
#			puppet = AFG
			add_named_threat = { threat = 3 name = afg_marion }	
			hidden_effect = {
			news_event = { hours = 3 id = ar_news.505 }
			}
		}		
	}
}

# afgan ne puppet
country_event = {
	id = parfir.10
	title = parfir.10.t
	desc = parfir.10.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = parfir.10.a
		ZPA = {	
			# create_wargoal = {
						# type = annex_everything
						# target = AFG
			# }
			hidden_effect = {
			news_event = { hours = 3 id = ar_news.506 }
			}
		}					
	}
}

# afgan end civilwar
#country_event = {
#	id = parfir.11
#	title = parfir.11.t
#	desc = parfir.11.d
#	picture = GFX_report_event_soviet_army_greeted	
#	is_triggered_only = yes	
#	trigger = {
#		tag = ZPA
#		AFG = {
#			has_country_flag = revolut_afgan
#			has_civil_war = no
#			has_government = fascism
#		}
#	}
#	mean_time_to_happen = {
#		days = 3
#	}
#	option = {
#		name = parfir.11.a
#		AFG = {
#			clr_country_flag = revolut_afgan
#		}
#		ZPA = {	
#			puppet = AFG
#			add_named_threat = { threat = 2 name = afg_marion }	
#			news_event = { hours = 3 id = ar_news.505 }
#		}							
#	}
#}

# irans general
country_event = {
	id = parfir.12
	title = parfir.12.t
	desc = parfir.12.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = parfir.12.a
		custom_effect_tooltip = per_iran_generaly_tt
		ZPA = {	
			# create_corps_commander = {
						# name = "Рамин Хиаби"
						# gfx = "gfx/leaders/arabia/Portrait_Arab_Generic_land_4.tga"
						# traits = {  desert_fox }
						# skill = 3
						# attack_skill = 3
						# defense_skill = 3
						# planning_skill = 2
						# logistics_skill = 2
			# }
			add_corps_commander_role = {
				character = ZPA_ramin_hiabi
				traits = {  desert_fox }
				skill = 3
				attack_skill = 3
				defense_skill = 3
				planning_skill = 2
				logistics_skill = 2
			}
			# create_corps_commander = {
					# name = "Эбрагим Ширази"
					# gfx = "gfx/leaders/arabia/Portrait_Arab_Generic_land_3.tga"
					# traits = {  desert_fox }
					# skill = 3
					# attack_skill = 3
					# defense_skill = 3
					# planning_skill = 2
					# logistics_skill = 2
			# }
			add_corps_commander_role = {
				character = ZPA_ebragim_shirazi
				traits = {  desert_fox }
				skill = 3
				attack_skill = 3
				defense_skill = 3
				planning_skill = 2
				logistics_skill = 2
			}
			# create_corps_commander = {
					# name = "Фаршид Шашмири"
					# gfx = "gfx/leaders/arabia/Portrait_Arab_Generic_land_5.tga"
						# traits = {  desert_fox }
						# skill = 3
						# attack_skill = 3
						# defense_skill = 3
						# planning_skill = 2
						# logistics_skill = 2
			# }
			add_corps_commander_role = {
				character = ZPA_farshid_shashmiri
				traits = {  desert_fox }
				skill = 3
				attack_skill = 3
				defense_skill = 3
				planning_skill = 2
				logistics_skill = 2
			}
		}					
	}
}

# zpa go go afrika 1
country_event = {
	id = parfir.13
	title = parfir.13.t
	desc = parfir.13.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = parfir.13.a
		ZPA = {			
			453 = { add_core_of = ZPA }
			446 = { add_core_of = ZPA }
			456 = { add_core_of = ZPA }
			457 = { add_core_of = ZPA }
			447 = { add_core_of = ZPA }
			452 = { add_core_of = ZPA }
			552 = { add_core_of = ZPA }
			451 = { add_core_of = ZPA }
			663 = { add_core_of = ZPA }
			450 = { add_core_of = ZPA }
			449 = { add_core_of = ZPA }
			662 = { add_core_of = ZPA }
			273 = { add_core_of = ZPA }
			661 = { add_core_of = ZPA }
			448 = { add_core_of = ZPA }
			665 = { add_core_of = ZPA }
			458 = { add_core_of = ZPA }
			551 = { add_core_of = ZPA }
			550 = { add_core_of = ZPA }
			268 = { add_core_of = ZPA }
			hidden_effect =  {
				add_state_claim = 453
				add_state_claim = 446
				add_state_claim = 456
				add_state_claim = 457
				add_state_claim = 447
				add_state_claim = 452
				add_state_claim = 552
				add_state_claim = 451
				add_state_claim = 663
				add_state_claim = 450
				add_state_claim = 449
				add_state_claim = 662
				add_state_claim = 273
				add_state_claim = 661
				add_state_claim = 448
				add_state_claim = 665
				add_state_claim = 458
				add_state_claim = 551
				add_state_claim = 550
				add_state_claim = 268
			}
			if = {
				limit = {
						country_exists = EGY							
				}
					create_wargoal = {
						type = annex_everything
						target = EGY
					}
			}
		}					
	}
}

# warrrr
country_event = {
	id = parfir.14
	title = parfir.14.t
	desc = parfir.14.d
	picture = GFX_report_event_generic_conference
	fire_only_once = yes
	trigger = {
		tag = ZPA
		country_exists = ZRI
		ZPA = {
			has_war_with = ZRI					
		}
	}
	mean_time_to_happen = {
		days = 1
	}
	option = {
		name = parfir.14.a
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.570 }
			if = {
				limit = {
					ZRI = { has_government = fascism }
				}
				ZRI = {
					country_event = { days = 1 id = parfir.18 }
				}
			}			
		}
	}
}

# new engine
country_event = {
	id = parfir.15
	title = parfir.15.t
	desc = parfir.15.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = parfir.15.a
		add_timed_idea = {
			idea = we_recorderss
			days = 180
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.572 }
		}		
	}
}

# oborona berega
country_event = {
	id = parfir.16
	title = parfir.16.t
	desc = parfir.16.d
	picture = GFX_report_event_generic_conference	
	is_triggered_only = yes	
	option = {
		name = parfir.16.a
		custom_effect_tooltip = parfir.16.a.tt	
		hidden_effect =  {
			if = {
				limit = { 
					controls_state = 412 
				}
				412 = {						
					add_building_construction = {
						type = coastal_bunker
						province = {
							all_provinces = yes
							limit_to_coastal = yes
						}
						level = 2
						instant_build = yes
					}
				}
			}
			if = {
				limit = { 
					controls_state = 410 
				}
				410 = {						
					add_building_construction = {
						type = coastal_bunker
						province = {
							all_provinces = yes
							limit_to_coastal = yes
						}
						level = 2
						instant_build = yes
					}
				}
			}
			if = {
				limit = { 
					controls_state = 413 
				}
				413 = {						
					add_building_construction = {
						type = coastal_bunker
						province = {
							all_provinces = yes
							limit_to_coastal = yes
						}
						level = 2
						instant_build = yes
					}
				}
			}			
		}	
	}
}
# revansisty v ilhanate
country_event = {
	id = parfir.17
	title = parfir.17.t
	desc = parfir.17.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.17.a
		add_stability = -0.02
		ZRI = {
			news_event = { hours = 3 id = ar_news.618 }
		}
	}
}
# mojem povtorit - event to ZRI
country_event = {
	id = parfir.18
	title = parfir.18.t
	desc = parfir.18.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.18.a
		add_war_support = 0.1
	}
}

# эвент для горцев о том что персы предлагают договор о ненападении
country_event = {
	id = parfir.19
	title = parfir.19.t
	desc = parfir.19.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.19.a
		ai_chance = {
			factor = 10			
		}
		add_opinion_modifier = {
			target = ZPA
			modifier = diplomat_20
		}
		effect_tooltip = {
			ZPA = {
				diplomatic_relation = {
					country = ZGO
					relation = non_aggression_pact
					active = yes
				}
			}
		}
		ZPA = {
			country_event = { id = parfir.20 }
		}
	}
	option = {
		name = parfir.19.b
		ai_chance = {
			factor = 5			
		}
		add_stability = 0.05
		add_war_support = 0.05
		ZPA = {
			country_event = { id = parfir.21 }
		}
	}
}

# горцы соглашаются подписать договор о ненападении
country_event = {
	id = parfir.20
	title = parfir.20.t
	desc = parfir.20.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.20.a
		diplomatic_relation = {
			country = ZGO
			relation = non_aggression_pact
			active = yes
		}
		add_opinion_modifier = {
			target = ZGO
			modifier = diplomat_20
		}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.821 }
		}
	}
}

# горцы отказались подписать договор о ненападении
country_event = {
	id = parfir.21
	title = parfir.21.t
	desc = parfir.21.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.21.a
		ai_chance = {
			factor = 5			
		}
		add_political_power = 10
	}
	option = {
		name = parfir.21.b
		ai_chance = {
			factor = 7			
		}
		every_state = {
			limit = {
				is_core_of = ZGO
				NOT = {
					is_owned_by = ZPA
				}
			}			
			add_claim_by = ZPA
		}
		add_named_threat = { threat = 4 name = parfir.21.threattt }
	}
}

#флот парса
country_event = {
	id = parfir.22
	title = parfir.22.t
	desc = parfir.22.d
	picture = GFX_report_event_generic_read_write	
	is_triggered_only = yes	
	option = {
		name = parfir.22.a			
		add_stability = 0.02
		custom_effect_tooltip = parfir.22.a.tt		
		hidden_effect =  {				
			if = {
				limit = {
					not = { has_dlc = "Man the Guns" }
				}	
				ZPA = {
					set_technology = {		
						early_destroyer = 1		
						transport = 1
					}
					create_equipment_variant = {
						name = "DD 1"
						type = destroyer_1
						upgrades = {
							ship_torpedo_upgrade = 1
							destroyer_engine_upgrade = 1
							ship_ASW_upgrade = 1
							ship_anti_air_upgrade = 1
						}
					}
					load_oob = "ZPA_pars_flot"	
				}	
			}
			if = {
				limit = {
					has_dlc = "Man the Guns" 
				}	
				ZPA = {
					set_technology = {		
						early_ship_hull_light = 1		
						basic_battery = 1
						basic_light_battery = 1		
						mtg_transport = 1		
					}
					create_equipment_variant = {
						name = "DD 1"	
						type = ship_hull_light_1
						parent_version = 0
						modules = {
							fixed_ship_battery_slot = ship_light_battery_1
							fixed_ship_anti_air_slot = empty
							fixed_ship_fire_control_system_slot = empty
							fixed_ship_radar_slot = empty
							fixed_ship_engine_slot = light_ship_engine_1
							fixed_ship_torpedo_slot = empty
							mid_1_custom_slot = empty
							rear_1_custom_slot = empty
						}		
					}
					load_oob = "ZPA_pars_flot_mtg"	
				}	
			}
		}		
	}	
}

#### эвент Шапуридам - Дели. Персия зовёт нас в свой военный блок. Снова... опять как во времена великой войны? Это хорошо или ну нафиг их?
country_event = {
	id = parfir.23
	title = parfir.23.t
	desc = parfir.23.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.23.a	# мы в деле
		ai_chance = {
			factor = 7
			modifier = {
				factor = 1.2					
				has_government = fascism				
			}
			modifier = {
				factor = 1.2
				tag = ZKD
			}
			modifier = {
				factor = 1.3
				num_faction_members > 2
			}
			modifier = {
				factor = 1.3
				num_divisions > 35
			}
			modifier = {
				factor = 1.5
				has_opinion = {
					target = ZPA
					value > 20
				}
			}
		}
		ZPA = {
			effect_tooltip = {
				add_to_faction = ROOT
			}
			country_event = { id = parfir.24 }
		}	
	}
	option = {
		name = parfir.23.b
		ai_chance = {
			factor = 7	
			modifier = {
				factor = 1.2
				has_opinion = {
					target = ZPA
					value < 0
				}
			}
			modifier = {
				factor = 1.2
				tag = ZDE
			}
			modifier = {
				factor = 1.2
				OR = {	
					has_government = communism
					has_government = democratic
				}
			}
		}
		ZPA = {			
			country_event = { id = parfir.25 }
		}
	}
}

### эвент персии что [FROM.GetNameDef] присоединились к нашему альянсу. Как в старые добрые времена
country_event = {
	id = parfir.24
	title = parfir.24.t
	desc = parfir.24.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.24.a
		add_stability = 0.02
		add_war_support = 0.02		
		add_to_faction = FROM		
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.92 }
		}
	}	
}

### эвент персии что [FROM.GetNameDef] НЕ присоединились к нашему альянсу. зассали видимо
country_event = {
	id = parfir.25
	title = parfir.25.t
	desc = parfir.25.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.25.a
		add_stability = -0.02
		add_war_support = -0.02
	}	
}

### эвент персии 
country_event = {
	id = parfir.26
	title = parfir.26.t
	desc = parfir.26.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	option = {
		name = parfir.26.a
		add_stability = -0.05		
		add_timed_idea = {
			idea = zpa_zabastovka_ot_voiny_zhu
			days = 150
		}
		hidden_effect = {
			country_event = { days = 22 id = parfir.27 }
		}
	}	
}

### эвент персии 
country_event = {
	id = parfir.27
	title = parfir.27.t
	desc = parfir.27.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	trigger = {
		has_war_with = ZHU
	}
	option = {
		name = parfir.27.a
		add_stability = -0.05
		add_war_support = -0.10
		hidden_effect = {
			country_event = { days = 45 id = parfir.28 }
		}
	}	
}

### эвент персии 
country_event = {
	id = parfir.28
	title = parfir.28.t
	desc = parfir.28.d
	picture = GFX_report_event_soviet_army_greeted	
	is_triggered_only = yes	
	trigger = {
		has_war = yes
	}
	option = {
		name = parfir.28.a
		add_stability = -0.05
		add_war_support = -0.10		
	}	
}