﻿
add_namespace = ar_weapon_market



### тестовый эвент, отправляемый целевой стране из окна торговли, он у нас от [FROM.GetNameDef]
country_event = {
	id = ar_weapon_market.1
	title = ar_weapon_market.1.t
	desc = ar_weapon_market.1.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.1.a	
		FROM = {
			country_event = { id = ar_weapon_market.2 }
		}		
	}		
}

### тестовый эвент, который мы получаем от [FROM.GetNameDef] в ответ
country_event = {
	id = ar_weapon_market.2
	title = ar_weapon_market.2.t
	desc = ar_weapon_market.2.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.2.a					
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 300 единиц стрелкового воружения.
country_event = {
	id = ar_weapon_market.3
	title = ar_weapon_market.3.t
	desc = ar_weapon_market.3.d
	picture = GFX_report_event_generic_rifles
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.3.a	
		trigger = {			
			has_equipment = {
				infantry_equipment > 300
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					infantry_equipment > 25000
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					infantry_equipment > 300
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = infantry_equipment
				amount = 300
			}
			FROM = {
				country_event = {
					id = ar_weapon_market.4	
				}
			}
			log = "[GetDateText]: [Root.GetName] ([Root.GetTag]): We sold the product "
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 300 }
				country_event = { id = ar_weapon_market.6 }	# ВОЗВРАТ 300 ИБНИ!!!!
			}
		}
	}
	option = { 
		name = ar_weapon_market.3.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 300 }
			country_event = {
				id = ar_weapon_market.5	# ВОЗВРАТ 300 ИБНИ!!!!
			}
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 300 ед стрелкового вооружения
country_event = {
	id = ar_weapon_market.4
	title = ar_weapon_market.4.t
	desc = ar_weapon_market.4.d
	picture = GFX_report_event_generic_rifles
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.4.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = infantry_equipment
					amount = 300
				}
			}			
		}
	}		
}

### эвент о том что [FROM.GetNameDef] отказали нам в поставках вооружения без объяснения причин
country_event = {
	id = ar_weapon_market.5
	title = ar_weapon_market.5.t
	desc = ar_weapon_market.5.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes	
	option = { 
		name = ar_weapon_market.5.a	
		custom_effect_tooltip = ar_weapon_market_300_deneg_vernuli_tt	
	}		
}

### эвент о том что [FROM.GetNameDef] отказали нам в поставках вооружения сославшись на отсутствие запрашиваемого снаряжения на складе
country_event = {
	id = ar_weapon_market.6
	title = ar_weapon_market.6.t
	desc = ar_weapon_market.6.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes	
	option = { 
		name = ar_weapon_market.6.a	
		custom_effect_tooltip = ar_weapon_market_300_deneg_vernuli_tt	
	}		
}

### ТЕСТОВЫЙ эвент, назначающий всяким странам продавца и дающий им пехотку
country_event = {
	id = ar_weapon_market.7
	title = ar_weapon_market.7.t
	desc = ar_weapon_market.7.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.7.a
		# every_other_country = {
			# limit = { 
				# OR = {
					# tag = MON tag = PER tag = ENG tag = GER tag = SOV tag = BRA tag = ITA tag = LAT tag = MEX tag = TIB tag = IRE tag = EST
				# }
			# }				
			# set_country_flag = 	ar_weapon_seller_country_flag
		# }
		# BRA = {			
			# add_equipment_to_stockpile = {
				# type = infantry_equipment_0
				# amount = 45000
				# producer = BRA
			# }
			# add_equipment_to_stockpile = {
				# type = support_equipment_1
				# amount = 10000
				# producer = BRA
			# }
			# add_equipment_to_stockpile = {
				# type = artillery_equipment_1
				# amount = 5000
				# producer = BRA
			# }
			# add_equipment_to_stockpile = {
				# type = anti_air_equipment_1
				# amount = 5000
				# producer = BRA
			# }
		# }
	}		
}

### СКРЫТЫЙ эвент стране-продавцу на запрос выдачи прейскуранта по арте
country_event = {
	id = ar_weapon_market.8
	hidden = yes
	is_triggered_only = yes
	immediate = {
		FROM = {
			country_event = { id = ar_weapon_market.9 }
		}
	}
	option = { 
		name = ar_weapon_market.8.a			
	}		
}

### эвент от [FROM.GetNameDef] на прейскурант их артиллерии в продаже. любезно предоставленный по нашему запросу
country_event = {
	id = ar_weapon_market.9
	title = ar_weapon_market.9.t
	desc = ar_weapon_market.9.d
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	immediate = {
		custom_effect_tooltip = ar_weapon_market.9.imed.tt
		if = {
			limit = {
				FROM = {
					has_equipment = {
						artillery_equipment > 100
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_artu_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						anti_air_equipment > 100
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_zenitki_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						anti_tank_equipment > 100
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_anti_tank_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						artillery_equipment < 101
					}
					has_equipment = {
						anti_air_equipment < 101
					}
					has_equipment = {
						anti_tank_equipment < 101
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_nichego_net_na_prodaju_tt			
		}
	}
	option = { 
		name = ar_weapon_market.9.a	
		trigger = {			
			FROM = {
				has_equipment = {
					artillery_equipment > 100
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
#		add_to_variable = { ar_weap_deneg_var = -300 }
		custom_effect_tooltip = ar_weapon_market.9.a.tt 
		FROM = {
			country_event = { id = ar_weapon_market.10 }
		}
	}
	option = { 
		name = ar_weapon_market.9.b	
		trigger = {			
			FROM = {
				has_equipment = {
					anti_air_equipment > 100
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
#		add_to_variable = { ar_weap_deneg_var = -300 }	
		custom_effect_tooltip = ar_weapon_market.9.b.tt 
		FROM = {
			country_event = { id = ar_weapon_market.12 }
		}	
	}
	option = { 
		name = ar_weapon_market.9.c	
		trigger = {			
			FROM = {
				has_equipment = {
					anti_tank_equipment > 100
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
#		add_to_variable = { ar_weap_deneg_var = -300 }	
		custom_effect_tooltip = ar_weapon_market.9.c.tt 
		FROM = {
			country_event = { id = ar_weapon_market.14 }
		}			
	}
	option = { 
		name = ar_weapon_market.9.e	
		ai_chance = { 
			factor = 20 			
		}	
		custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt
		add_to_variable = { ar_weap_deneg_var = 300 }
	}	
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 100 единиц дальнобойной арты
country_event = {
	id = ar_weapon_market.10
	title = ar_weapon_market.10.t
	desc = ar_weapon_market.10.d
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.10.a	
		trigger = {			
			has_equipment = {
				artillery_equipment > 100
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					artillery_equipment > 6000
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					artillery_equipment > 100
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = artillery_equipment
				amount = 100
			}
			FROM = {
				country_event = { id = ar_weapon_market.11 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 300 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.10.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 300 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 100 ед дальнобойной арты
country_event = {
	id = ar_weapon_market.11
	title = ar_weapon_market.11.t
	desc = ar_weapon_market.11.d
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.11.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = artillery_equipment
					amount = 100
				}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 100 единиц арты ПВО
country_event = {
	id = ar_weapon_market.12
	title = ar_weapon_market.12.t
	desc = ar_weapon_market.12.d
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.12.a	
		trigger = {			
			has_equipment = {
				anti_air_equipment > 100
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					anti_air_equipment > 2500
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					anti_air_equipment > 100
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = anti_air_equipment
				amount = 100
			}
			FROM = {
				country_event = { id = ar_weapon_market.13 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				country_event = { id = ar_weapon_market.6 } # общий отказ	 ВОЗВРАТ 300 ИБНИ!!!!
			}
		}
	}
	option = { 
		name = ar_weapon_market.12.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			country_event = { id = ar_weapon_market.5 }	# общий отказ	ВОЗВРАТ 300 ИБНИ!!!!
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 100 ед арты ПВО
country_event = {
	id = ar_weapon_market.13
	title = ar_weapon_market.13.t
	desc = ar_weapon_market.13.d
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.13.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = anti_air_equipment
					amount = 100
				}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 100 единиц ПТ пушек
country_event = {
	id = ar_weapon_market.14
	title = ar_weapon_market.14.t
	desc = ar_weapon_market.14.d
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.14.a	
		trigger = {			
			has_equipment = {
				anti_tank_equipment > 100
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					anti_tank_equipment > 2500
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					anti_tank_equipment > 100
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = anti_tank_equipment
				amount = 100
			}
			FROM = {
				country_event = { id = ar_weapon_market.15 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				country_event = { id = ar_weapon_market.6 } # общий отказ	ВОЗВРАТ 300 ИБНИ!!!!
			}
		}
	}
	option = { 
		name = ar_weapon_market.14.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			country_event = { id = ar_weapon_market.5 }	# общий отказ		ВОЗВРАТ 300 ИБНИ!!!!
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 100 ед ПТ пушек
country_event = {
	id = ar_weapon_market.15
	title = ar_weapon_market.15.t
	desc = ar_weapon_market.15.d
	picture = GFX_report_event_british_artillery
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.15.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = anti_tank_equipment
					amount = 100
				}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 200 единиц снаряжения.
country_event = {
	id = ar_weapon_market.16
	title = ar_weapon_market.16.t
	desc = ar_weapon_market.16.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.16.a	
		trigger = {			
			has_equipment = {
				support_equipment > 200
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					support_equipment > 3500
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					support_equipment > 200
				}
			}
			add_to_variable = { ar_weap_deneg_var = 200 }
			custom_effect_tooltip = ar_weapon_market_poluchim_200_deneg_tt 
			send_equipment = {
				target = FROM
				type = support_equipment
				amount = 200
			}
			FROM = {
				country_event = {
					id = ar_weapon_market.17	
				}
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 200 }
				country_event = { id = ar_weapon_market.6 }	
			}
		}
	}
	option = { 
		name = ar_weapon_market.16.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 200 }
			country_event = {
				id = ar_weapon_market.5	
			}
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 200 ед снаряжения
country_event = {
	id = ar_weapon_market.17
	title = ar_weapon_market.17.t
	desc = ar_weapon_market.17.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.17.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = support_equipment
					amount = 200
				}
			}			
		}
	}		
}

### СКРЫТЫЙ эвент стране-продавцу на запрос выдачи прейскуранта по мототехнике
country_event = {
	id = ar_weapon_market.18
	hidden = yes
	is_triggered_only = yes
	immediate = {
		FROM = {
			country_event = { id = ar_weapon_market.19 }
		}
	}
	option = { 
		name = ar_weapon_market.18.a			
	}		
}

### эвент от [FROM.GetNameDef] на прейскурант их мототехники в продаже. любезно предоставленный по нашему запросу
country_event = {
	id = ar_weapon_market.19
	title = ar_weapon_market.19.t
	desc = ar_weapon_market.19.d
	picture = GFX_report_event_china_ledo_road
	is_triggered_only = yes
	immediate = {
		custom_effect_tooltip = ar_weapon_market.9.imed.tt	# У них в продаже имеется
		if = {
			limit = {
				FROM = {
					has_equipment = {
						motorized_equipment > 100
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_moto_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						mechanized_equipment > 50
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_btr_na_prodaju_tt			
		}
		if = {
			limit = {
				has_dlc = "La Resistance"
				FROM = {
					has_equipment = {
						armored_car_equipment > 40
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_bronevik_na_prodaju_tt			
		}
		if = {
			limit = {				
				FROM = {
					has_equipment = {
						train_equipment > 10
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_parovoziki_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						motorized_equipment < 101
					}
					has_equipment = {
						mechanized_equipment < 51
					}
					has_equipment = {
						armored_car_equipment < 41
					}
					has_equipment = {
						train_equipment < 11
					}
				}
			}
			custom_effect_tooltip = ar_weapon_market_nichego_net_na_prodaju_tt			
		}
	}
	option = { 
		name = ar_weapon_market.19.a	
		trigger = {			
			FROM = {
				has_equipment = {
					motorized_equipment > 100
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
#		add_to_variable = { ar_weap_deneg_var = -300 }
		custom_effect_tooltip = ar_weapon_market.19.a.tt 
		FROM = {
			country_event = { id = ar_weapon_market.20 }
		}
	}
	option = { 
		name = ar_weapon_market.19.b	
		trigger = {			
			FROM = {
				has_equipment = {
					mechanized_equipment > 50
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
#		add_to_variable = { ar_weap_deneg_var = -300 }	
		custom_effect_tooltip = ar_weapon_market.19.b.tt 
		FROM = {
			country_event = { id = ar_weapon_market.22 }
		}	
	}
	option = { 
		name = ar_weapon_market.19.c	
		trigger = {	
			has_dlc = "La Resistance"
			FROM = {
				has_equipment = {
					armored_car_equipment > 40
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
#		add_to_variable = { ar_weap_deneg_var = -300 }	
		custom_effect_tooltip = ar_weapon_market.19.c.tt 
		FROM = {
			country_event = { id = ar_weapon_market.24 }
		}			
	}
	option = { 
		name = ar_weapon_market.19.f	
		trigger = {				
			FROM = {
				has_equipment = {
					train_equipment > 10
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
#		add_to_variable = { ar_weap_deneg_var = -300 }	
		custom_effect_tooltip = ar_weapon_market.19.f.tt 
		FROM = {
			country_event = { id = ar_weapon_market.46 }
		}			
	}
	option = { 
		name = ar_weapon_market.19.e	
		ai_chance = { 
			factor = 20 			
		}
		custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt
		add_to_variable = { ar_weap_deneg_var = 300 }		
	}	
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 100 единиц грузовиков
country_event = {
	id = ar_weapon_market.20
	title = ar_weapon_market.20.t
	desc = ar_weapon_market.20.d
	picture = GFX_report_event_generic_truck
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.20.a	
		trigger = {			
			has_equipment = {
				motorized_equipment > 100
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					motorized_equipment > 2500
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					motorized_equipment > 100
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = motorized_equipment
				amount = 100
			}
			FROM = {
				country_event = { id = ar_weapon_market.21 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 300 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.20.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 300 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 100 ед грузовиков
country_event = {
	id = ar_weapon_market.21
	title = ar_weapon_market.21.t
	desc = ar_weapon_market.21.d
	picture = GFX_report_event_generic_truck
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.21.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = motorized_equipment
					amount = 100
				}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 50 единиц БТР
country_event = {
	id = ar_weapon_market.22
	title = ar_weapon_market.22.t
	desc = ar_weapon_market.22.d
	picture = report_event_generic_panzer_attack
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.22.a	
		trigger = {			
			has_equipment = {
				mechanized_equipment > 50
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					mechanized_equipment > 1800
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					mechanized_equipment > 50
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = mechanized_equipment
				amount = 50
			}
			FROM = {
				country_event = { id = ar_weapon_market.23 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 300 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.22.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 300 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 50 ед БТР
country_event = {
	id = ar_weapon_market.23
	title = ar_weapon_market.23.t
	desc = ar_weapon_market.23.d
	picture = report_event_generic_panzer_attack
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.23.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = mechanized_equipment
					amount = 50
				}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 40 единиц броневиков
country_event = {
	id = ar_weapon_market.24
	title = ar_weapon_market.24.t
	desc = ar_weapon_market.24.d
	picture = GFX_report_event_south_africa_patrol
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.24.a	
		trigger = {			
			has_equipment = {
				armored_car_equipment > 40
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					armored_car_equipment > 1400
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					armored_car_equipment > 40
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = armored_car_equipment
				amount = 40
			}
			FROM = {
				country_event = { id = ar_weapon_market.25 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 300 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.24.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 300 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 40 ед броневиков
country_event = {
	id = ar_weapon_market.25
	title = ar_weapon_market.25.t
	desc = ar_weapon_market.25.d
	picture = GFX_report_event_south_africa_patrol
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.25.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = armored_car_equipment
					amount = 40
				}
			}			
		}
	}		
}

### СКРЫТЫЙ эвент стране-продавцу на запрос выдачи прейскуранта по танкам
country_event = {
	id = ar_weapon_market.26
	hidden = yes
	is_triggered_only = yes
	immediate = {
		FROM = {
			country_event = { id = ar_weapon_market.27 }
		}
	}
	option = { 
		name = ar_weapon_market.26.a			
	}		
}

### эвент от [FROM.GetNameDef] на прейскурант их ТАНКИ в продаже. любезно предоставленный по нашему запросу
country_event = {
	id = ar_weapon_market.27
	title = ar_weapon_market.27.t
	desc = ar_weapon_market.27.d
	picture = GFX_report_event_bul_ff_troops_panzer
	is_triggered_only = yes
	immediate = {
		custom_effect_tooltip = ar_weapon_market.9.imed.tt	# У них в продаже имеется
		if = {
			limit = {
				FROM = {
					has_equipment = {
						light_tank_chassis > 100
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_light_tank_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						medium_tank_chassis > 50
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_medium_tank_na_prodaju_tt			
		}
		if = {
			limit = {				
				FROM = {
					has_equipment = {
						heavy_tank_chassis > 40
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_heavy_tank_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						light_tank_chassis < 101
					}
					has_equipment = {
						medium_tank_chassis < 51
					}
					has_equipment = {
						heavy_tank_chassis < 41
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_nichego_net_na_prodaju_tt			
		}
	}
	option = { 
		name = ar_weapon_market.27.a	
		trigger = {			
			FROM = {
				has_equipment = {
					light_tank_chassis > 100
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
		custom_effect_tooltip = ar_weapon_market.27.a.tt 
		FROM = {
			country_event = { id = ar_weapon_market.28 }
		}
	}
	option = { 
		name = ar_weapon_market.27.b	
		trigger = {			
			FROM = {
				has_equipment = {
					medium_tank_chassis > 70
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
		custom_effect_tooltip = ar_weapon_market.27.b.tt 
		FROM = {
			country_event = { id = ar_weapon_market.30 }
		}	
	}
	option = { 
		name = ar_weapon_market.27.c	
		trigger = {			
			FROM = {
				has_equipment = {
					heavy_tank_chassis > 30
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}	
		custom_effect_tooltip = ar_weapon_market.27.c.tt 
		FROM = {
			country_event = { id = ar_weapon_market.32 }
		}			
	}
	option = { 
		name = ar_weapon_market.27.e	
		ai_chance = { 
			factor = 20 			
		}
		custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt
		add_to_variable = { ar_weap_deneg_var = 1000 }		
	}	
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 100 единиц легких танков за 1000 ибни
country_event = {
	id = ar_weapon_market.28
	title = ar_weapon_market.28.t
	desc = ar_weapon_market.28.d
	picture = GFX_report_event_generic_lend_lease
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.28.a	
		trigger = {			
			has_equipment = {
				light_tank_chassis > 100
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					light_tank_chassis > 1300
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					light_tank_chassis > 100
				}
			}
			add_to_variable = { ar_weap_deneg_var = 1000 }
			custom_effect_tooltip = ar_weapon_market_poluchim_1000_deneg_tt 
			# if = {
				# limit = {
					# NOT = { has_dlc = "No Step Back" }
				# }
				# send_equipment = {
					# target = FROM
					# type = light_tank_equipment
					# amount = 100
				# }
			# }
			# else = {
				send_equipment = {
					target = FROM
					type = light_tank_chassis
					amount = 100
				}
			#}
			# send_equipment = {
				# target = FROM
				# type = light_tank_equipment
				# amount = 100
			# }
			FROM = {
				country_event = { id = ar_weapon_market.29 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 1000 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.28.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 1000 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 100 ед легких танков
country_event = {
	id = ar_weapon_market.29
	title = ar_weapon_market.29.t
	desc = ar_weapon_market.29.d
	picture = GFX_report_event_generic_lend_lease
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.29.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				# send_equipment = {
					# target = ROOT
					# type = light_tank_equipment
					# amount = 100
				# }
				# if = {
					# limit = {
						# NOT = { has_dlc = "No Step Back" }
					# }
					# send_equipment = {
						# target = FROM
						# type = light_tank_equipment
						# amount = 100
					# }
				# }
				#else = {
					send_equipment = {
						target = FROM
						type = light_tank_chassis
						amount = 100
					}
				#}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 70 единиц средних танков за 1000 ибни
country_event = {
	id = ar_weapon_market.30
	title = ar_weapon_market.30.t
	desc = ar_weapon_market.30.d
	picture = GFX_report_event_polish_tanks_01
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.30.a	
		trigger = {			
			has_equipment = {
				medium_tank_chassis > 70
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					medium_tank_chassis > 1200
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					medium_tank_chassis > 70
				}
			}
			add_to_variable = { ar_weap_deneg_var = 1000 }
			custom_effect_tooltip = ar_weapon_market_poluchim_1000_deneg_tt 
			# send_equipment = {
				# target = FROM
				# type = medium_tank_equipment
				# amount = 70
			# }
			# if = {
				# limit = {
					# NOT = { has_dlc = "No Step Back" }
				# }
				# send_equipment = {
					# target = FROM
					# type = medium_tank_equipment
					# amount = 70
				# }
			# }
			# else = {
				send_equipment = {
					target = FROM
					type = medium_tank_chassis
					amount = 70
				}
			# }
			FROM = {
				country_event = { id = ar_weapon_market.31 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 1000 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.30.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 1000 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 70 ед средних танков
country_event = {
	id = ar_weapon_market.31
	title = ar_weapon_market.31.t
	desc = ar_weapon_market.31.d
	picture = GFX_report_event_polish_tanks_01
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.31.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				# send_equipment = {
					# target = ROOT
					# type = medium_tank_equipment
					# amount = 70
				# }
				# if = {
					# limit = {
						# NOT = { has_dlc = "No Step Back" }
					# }
					# send_equipment = {
						# target = FROM
						# type = medium_tank_equipment
						# amount = 70
					# }
				# }
				# else = {
					send_equipment = {
						target = FROM
						type = medium_tank_chassis
						amount = 70
					}
				# }
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 30 единиц тяжелых танков за 1000 ибни
country_event = {
	id = ar_weapon_market.32
	title = ar_weapon_market.32.t
	desc = ar_weapon_market.32.d
	picture = GFX_report_event_glorious_vehicle
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.32.a	
		trigger = {			
			has_equipment = {
				heavy_tank_chassis > 30
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					heavy_tank_chassis > 600
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					heavy_tank_chassis > 30
				}
			}
			add_to_variable = { ar_weap_deneg_var = 1000 }
			custom_effect_tooltip = ar_weapon_market_poluchim_1000_deneg_tt 
			# send_equipment = {
				# target = FROM
				# type = heavy_tank_equipment
				# amount = 30
			# }
			# if = {
				# limit = {
					# NOT = { has_dlc = "No Step Back" }
				# }
				# send_equipment = {
					# target = FROM
					# type = heavy_tank_equipment
					# amount = 30
				# }
			# }
			# else = {
				send_equipment = {
					target = FROM
					type = heavy_tank_chassis
					amount = 30
				}
			# }
			FROM = {
				country_event = { id = ar_weapon_market.33 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 1000 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.32.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 1000 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 30 ед тяжелых танков
country_event = {
	id = ar_weapon_market.33
	title = ar_weapon_market.33.t
	desc = ar_weapon_market.33.d
	picture = GFX_report_event_glorious_vehicle
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.33.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				# send_equipment = {
					# target = ROOT
					# type = heavy_tank_equipment
					# amount = 30
				# }
				# if = {
					# limit = {
						# NOT = { has_dlc = "No Step Back" }
					# }
					# send_equipment = {
						# target = FROM
						# type = heavy_tank_equipment
						# amount = 30
					# }
				# }
				# else = {
					send_equipment = {
						target = FROM
						type = heavy_tank_chassis
						amount = 30
					}
				# }
			}			
		}
	}		
}

### СКРЫТЫЙ эвент стране-продавцу на запрос выдачи прейскуранта по самолетам
country_event = {
	id = ar_weapon_market.34
	hidden = yes
	is_triggered_only = yes
	immediate = {
		FROM = {
			country_event = { id = ar_weapon_market.35 }
		}
	}
	option = { 
		name = ar_weapon_market.34.a			
	}		
}

### эвент от [FROM.GetNameDef] на прейскурант их САМОЛЕТЫ в продаже. любезно предоставленный по нашему запросу
country_event = {
	id = ar_weapon_market.35
	title = ar_weapon_market.35.t
	desc = ar_weapon_market.35.d
	picture = GFX_report_event_fighters
	is_triggered_only = yes
	immediate = {
		custom_effect_tooltip = ar_weapon_market.9.imed.tt	# У них в продаже имеется
		if = {
			limit = {
				FROM = {
					has_equipment = {
						small_plane_airframe > 70
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_fighter_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						medium_plane_airframe > 55
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_CAS_na_prodaju_tt			
		}
		if = {
			limit = {				
				FROM = {
					has_equipment = {
						large_plane_airframe > 20
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_imeet_tac_bomber_na_prodaju_tt			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						small_plane_airframe < 71
					}
					has_equipment = {
						medium_plane_airframe < 56
					}
					has_equipment = {
						large_plane_airframe < 21
					}					
				}
			}
			custom_effect_tooltip = ar_weapon_market_nichego_net_na_prodaju_tt			
		}
	}
	option = { 
		name = ar_weapon_market.35.a	
		trigger = {			
			FROM = {
				has_equipment = {
					small_plane_airframe > 70
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
		custom_effect_tooltip = ar_weapon_market.35.a.tt 
		FROM = {
			country_event = { id = ar_weapon_market.36 }
		}
	}
	option = { 
		name = ar_weapon_market.35.b	
		trigger = {			
			FROM = {
				has_equipment = {
					medium_plane_airframe > 55
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}
		custom_effect_tooltip = ar_weapon_market.35.b.tt 
		FROM = {
			country_event = { id = ar_weapon_market.38 }
		}	
	}
	option = { 
		name = ar_weapon_market.35.c	
		trigger = {			
			FROM = {
				has_equipment = {
					large_plane_airframe > 20
				}
			}
		}
		ai_chance = { 
			factor = 2 			
		}	
		custom_effect_tooltip = ar_weapon_market.35.c.tt 
		FROM = {
			country_event = { id = ar_weapon_market.40 }
		}			
	}
	option = { 
		name = ar_weapon_market.35.e	
		ai_chance = { 
			factor = 20 			
		}
		custom_effect_tooltip = ar_weapon_market_poluchim_500_deneg_tt
		add_to_variable = { ar_weap_deneg_var = 500 }		
	}	
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 70 единиц истребителей за 500 ибни
country_event = {
	id = ar_weapon_market.36
	title = ar_weapon_market.36.t
	desc = ar_weapon_market.36.d
	picture = GFX_report_event_fighters
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.36.a	
		trigger = {			
			has_equipment = {
				small_plane_airframe > 70
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					small_plane_airframe > 1500
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					small_plane_airframe > 70
				}
			}
			add_to_variable = { ar_weap_deneg_var = 500 }
			custom_effect_tooltip = ar_weapon_market_poluchim_500_deneg_tt 
			send_equipment = {
				target = FROM
				type = small_plane_airframe
				amount = 70
			}
			FROM = {
				country_event = { id = ar_weapon_market.37 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 500 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.36.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 500 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 70 ед истребителей
country_event = {
	id = ar_weapon_market.37
	title = ar_weapon_market.37.t
	desc = ar_weapon_market.37.d
	picture = GFX_report_event_fighters
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.37.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = small_plane_airframe
					amount = 70
				}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 55 единиц штурмовиков за 500 ибни
country_event = {
	id = ar_weapon_market.38
	title = ar_weapon_market.38.t
	desc = ar_weapon_market.38.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.38.a	
		trigger = {			
			has_equipment = {
				medium_plane_airframe > 55
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					medium_plane_airframe > 1200
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					medium_plane_airframe > 55
				}
			}
			add_to_variable = { ar_weap_deneg_var = 500 }
			custom_effect_tooltip = ar_weapon_market_poluchim_500_deneg_tt 
			send_equipment = {
				target = FROM
				type = medium_plane_airframe
				amount = 55
			}
			FROM = {
				country_event = { id = ar_weapon_market.39 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 500 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.38.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 500 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 55 ед штурмовиков
country_event = {
	id = ar_weapon_market.39
	title = ar_weapon_market.39.t
	desc = ar_weapon_market.39.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.39.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = medium_plane_airframe
					amount = 55
				}
			}			
		}
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 20 единиц тактикбомберов за 500 ибни
country_event = {
	id = ar_weapon_market.40
	title = ar_weapon_market.40.t
	desc = ar_weapon_market.40.d
	picture = GFX_report_event_bul_aircraft_repairs
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.40.a	
		trigger = {			
			has_equipment = {
				large_plane_airframe > 20
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					large_plane_airframe > 800
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					large_plane_airframe > 20
				}
			}
			add_to_variable = { ar_weap_deneg_var = 500 }
			custom_effect_tooltip = ar_weapon_market_poluchim_500_deneg_tt 
			send_equipment = {
				target = FROM
				type = large_plane_airframe
				amount = 20
			}
			FROM = {
				country_event = { id = ar_weapon_market.41 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 500 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.40.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 500 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 20 ед тактикбомберов
country_event = {
	id = ar_weapon_market.41
	title = ar_weapon_market.41.t
	desc = ar_weapon_market.41.d
	picture = GFX_report_event_bul_aircraft_repairs
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.41.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = large_plane_airframe
					amount = 20
				}
			}			
		}
	}		
}

### рандомный эвент стране-омнику, о том что народу не особо нравится что мы вкладываемся во всякое вооружение и переводим народные денежки в какие то ибни
country_event = {
	id = ar_weapon_market.42
	title = ar_weapon_market.42.t
	desc = ar_weapon_market.42.d
	picture = GFX_report_event_bul_aircraft_repairs
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.42.a	
		add_stability = -0.01
	}		
}

### рандомный эвент стране, которая через рынок оружия продала один из своих заводов. Народу это не понравилось, ходяк слухи всякие. Мы теряем стабку
country_event = {
	id = ar_weapon_market.43
	title = ar_weapon_market.43.t
	desc = ar_weapon_market.43.d
	picture = GFX_report_event_bul_aircraft_repairs
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.43.a	
		add_stability = -0.01
	}		
}

### рандомный эвент стране, которая через рынок оружия продала один из своих заводов. Народу это не понравилось, кто-то даже вышел на антивоенные митинги. Мы теряем стабку и поддержка омников увеличилась
country_event = {
	id = ar_weapon_market.44
	title = ar_weapon_market.44.t
	desc = ar_weapon_market.44.d
	picture = GFX_report_event_bul_aircraft_repairs
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.44.a	
		add_stability = -0.01
		add_popularity = {
			ideology = communism
			popularity = 0.02
		}
	}		
}

### рандомный эвент стране-патерналисту. Офицеры прознали что мы толкаем оружие с военных складов непонятно кому. Они считают что винтовки достанутся бандитам и очень из-за этого расстраиваются (lol). Мы теряем немного варсаппорта
country_event = {
	id = ar_weapon_market.45
	title = ar_weapon_market.45.t
	desc = ar_weapon_market.45.d
	picture = GFX_report_event_bul_aircraft_repairs
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.45.a	
		add_war_support = -0.03
	}		
}

### эвент для страны-продавца. [FROM.GetNameDef] желает приобрести у нас 10 единиц паровоз
country_event = {
	id = ar_weapon_market.46
	title = ar_weapon_market.46.t
	desc = ar_weapon_market.46.d
	picture = GFX_report_event_south_africa_patrol
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.46.a	
		trigger = {			
			has_equipment = {
				train_equipment > 10
			}
			NOT = {
				has_war_with = FROM
			}			
		}	
		ai_chance = { 
			factor = 40 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value > 50
				}
			}
			modifier = {
				factor = 4
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 1.2
				has_equipment = {
					train_equipment > 250
				}
			}
		}
		if = {
			limit = {
				has_equipment = {
					train_equipment > 10
				}
			}
			add_to_variable = { ar_weap_deneg_var = 300 }
			custom_effect_tooltip = ar_weapon_market_poluchim_300_deneg_tt 
			send_equipment = {
				target = FROM
				type = train_equipment
				amount = 10
			}
			FROM = {
				country_event = { id = ar_weapon_market.47 }
			}
		}
		else = {
			custom_effect_tooltip = ar_weapon_market.3.a.tt	# Странно, но у нас нет ничего на продажу... ВОЗВРАТ 300 ИБНИ!!!!
			FROM = {
				add_to_variable = { ar_weap_deneg_var = 300 }
				country_event = { id = ar_weapon_market.6 } # общий отказ	
			}
		}
	}
	option = { 
		name = ar_weapon_market.46.b	
		ai_chance = { 
			factor = 2 
			modifier = {
				factor = 4
				has_opinion = {
					target = FROM
					value < -20
				}
			}
			modifier = {
				factor = 5
				FROM = {
					has_added_tension_amount > 30
				}
			}
			modifier = {
				factor = 30
				has_war = yes
			}
		}
		FROM = {
			add_to_variable = { ar_weap_deneg_var = 300 }
			country_event = { id = ar_weapon_market.5 }	# общий отказ	
		}	
	}
}

### эвент о том что [FROM.GetNameDef] прислала нам 10  ед поездов
country_event = {
	id = ar_weapon_market.47
	title = ar_weapon_market.47.t
	desc = ar_weapon_market.47.d
	picture = GFX_report_event_south_africa_patrol
	is_triggered_only = yes
	option = { 
		name = ar_weapon_market.47.a	
		effect_tooltip = {
			custom_effect_tooltip = ar_weapon_market_voorujenie_polucheno_tt
			FROM = {
				send_equipment = {
					target = ROOT
					type = train_equipment
					amount = 10
				}
			}			
		}
	}		
}