﻿
add_namespace = weapon_market


##############
### DONT USE БОЛЬШЕ
#
#buy slavianic weapon
country_event = {
	id = weapon_market.1
	title = weapon_market.1.t
	desc = weapon_market.1.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.1.a
		trigger = {
			ZSL = {
				has_equipment = {
					infantry_equipment > 299
				}
			}
		}
		effect_tooltip = {
			custom_effect_tooltip = esli_oni_odobryat
			ZSL = {
				send_equipment = {
					target = ROOT
					type = infantry_equipment
					amount = 200
				}
			}
			add_political_power = -50
			add_named_threat = { threat = 1 name = kupil_orujie_threat }
		}
		hidden_effect = {
			ZSL = {
				country_event = {
					id = weapon_market.2
				}
			}
		}	
	}
	option = { 
		name = weapon_market.1.b
		ai_chance = { 
			factor = 100 
		}	
	}	
}

#send slavianic weapon
country_event = {
	id = weapon_market.2
	title = weapon_market.2.t
	desc = weapon_market.2.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.2.a
		ai_chance = { 
			factor = 100 
		}
		if = {
			limit = {
				has_equipment = {
					infantry_equipment > 299
				}
			}
			send_equipment = {
				target = FROM
				type = infantry_equipment
				amount = 300
			}
			FROM = {
				country_event = {
					id = weapon_market.3
				}
			}
		}
	}
	option = { 
		name = weapon_market.2.b
		FROM = {
				country_event = {
					id = weapon_market.4
				}
			}		
	}	
}

#eeee slavianic weapon
country_event = {
	id = weapon_market.3
	title = weapon_market.3.t
	desc = weapon_market.3.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.3.a
		add_political_power = -50
		add_named_threat = { threat = 1 name = kupil_orujie_threat }
		effect_tooltip = {
			custom_effect_tooltip = my_polichili_orujie
			FROM = {
				send_equipment = {
					target = ROOT
					type = infantry_equipment
					amount = 300
				}
			}			
		}
	}		
}
#NOOOOOO slavianic weapon
country_event = {
	id = weapon_market.4
	title = weapon_market.4.t
	desc = weapon_market.4.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.4.a		
	}		
}

#buy roman weapon
country_event = {
	id = weapon_market.5
	title = weapon_market.5.t
	desc = weapon_market.5.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.1.a
		trigger = {
			ZRI = {
				has_equipment = {
					infantry_equipment > 299
				}
			}
		}
		effect_tooltip = {
			custom_effect_tooltip = esli_oni_odobryat
			ZRI = {
				send_equipment = {
					target = ROOT
					type = infantry_equipment
					amount = 300
				}
			}
			add_political_power = -50
			add_named_threat = { threat = 1 name = kupil_orujie_threat }
		}
		hidden_effect = {
			ZRI = {
				country_event = {
					id = weapon_market.2
				}
			}
		}	
	}
	option = { 
		name = weapon_market.1.b
		ai_chance = { 
			factor = 100 
		}	
	}	
}
#buy hanchina weapon
country_event = {
	id = weapon_market.6
	title = weapon_market.6.t
	desc = weapon_market.6.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.1.a
		trigger = {
			ZRI = {
				has_equipment = {
					infantry_equipment > 299
				}
			}
		}
		effect_tooltip = {
			custom_effect_tooltip = esli_oni_odobryat
			ZRI = {
				send_equipment = {
					target = ROOT
					type = infantry_equipment
					amount = 300
				}
			}
			add_political_power = -50
			add_named_threat = { threat = 1 name = kupil_orujie_threat }
		}
		hidden_effect = {
			ZRI = {
				country_event = {
					id = weapon_market.2
				}
			}
		}	
	}
	option = { 
		name = weapon_market.1.b
		ai_chance = { 
			factor = 100 
		}	
	}	
}
#buy persia weapon
country_event = {
	id = weapon_market.7
	title = weapon_market.7.t
	desc = weapon_market.6.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.1.a
		trigger = {
			ZPA = {
				has_equipment = {
					infantry_equipment > 299
				}
			}
		}
		effect_tooltip = {
			custom_effect_tooltip = esli_oni_odobryat
			ZPA = {
				send_equipment = {
					target = ROOT
					type = infantry_equipment
					amount = 300
				}
			}
			add_political_power = -50
			add_named_threat = { threat = 1 name = kupil_orujie_threat }
		}
		hidden_effect = {
			ZPA = {
				country_event = {
					id = weapon_market.2
				}
			}
		}	
	}
	option = { 
		name = weapon_market.1.b
		ai_chance = { 
			factor = 100 
		}	
	}	
}
##############################
###  ЭТО АКТАУЛЬНО
#############################

#zapros  weapons
country_event = {
	id = weapon_market.100
	title = weapon_market.100.t
	desc = weapon_market.100.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.100.a
		ai_chance = { 
			factor = 100 
		}
		trigger = {			
			has_equipment = {
				infantry_equipment > 299
			}			
		}
		if = {
			limit = {
				has_equipment = {
					infantry_equipment > 299
				}
			}
			send_equipment = {
				target = FROM
				type = infantry_equipment
				amount = 300
			}
			FROM = {
				country_event = {
					id = weapon_market.101
				}
			}
		}
		add_political_power = 30
		if = {
			limit = {				
				has_idea = weaponmarketboost				
			}
			modify_timed_idea  = {
				idea = weaponmarketboost
				days = 45
			}
		}
		else_if = {
			limit = {
				NOT = {
					has_idea = weaponmarketboost
				}	
			}
			add_timed_idea = {
				idea = weaponmarketboost
				days = 45
			}
		}
	}
	option = { 
		name = weapon_market.100.b
		ai_chance = { 
			factor = 1 
		}
		FROM = {
			country_event = {
				id = weapon_market.102
			}
		}		
	}	
}
#eeee weapon
country_event = {
	id = weapon_market.101
	title = weapon_market.101.t
	desc = weapon_market.101.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.101.a
		add_political_power = -40
		add_named_threat = { threat = 1 name = kupil_orujie_threat }
		effect_tooltip = {
			custom_effect_tooltip = my_polichili_orujie
			FROM = {
				send_equipment = {
					target = ROOT
					type = infantry_equipment
					amount = 300
				}
			}			
		}
	}		
}
#NOOOOOO weapon
country_event = {
	id = weapon_market.102
	title = weapon_market.102.t
	desc = weapon_market.102.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.102.a		
	}		
}
#############################################################################################################################################
#############################################################################################################################################
#скрытый эвент который возвращает от продавана на покупателя
country_event = {
	id = weapon_market.103
	hidden = yes
	title = weapon_market.103.t
	desc = weapon_market.103.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	immediate = {		
		FROM = {
			country_event = {
				id = weapon_market.104
			}			
		}
	}
	option = { 
		name = weapon_market.103.a		
	}		
}
#эвент для покупателя с прейскурантом от барыги
country_event = {
	id = weapon_market.104
	title = weapon_market.104.t
	desc = weapon_market.104.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	immediate = {
		custom_effect_tooltip = weapmarket_chto_est_v_nalichii
		if = {
			limit = {
				FROM = {
					has_equipment = {
						infantry_equipment > 299
					}
					has_equipment = {
						infantry_equipment < 700
					}
				}
			}
			custom_effect_tooltip = weapmarket_est_nemnogo_strelkovki
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						infantry_equipment > 701
					}					
				}
			}
			custom_effect_tooltip = weapmarket_est_ochen_mnogo_strelkovki
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						support_equipment > 100
					}					
				}
			}
			custom_effect_tooltip = weapmarket_est_support_na_prodaju			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						support_equipment < 100
					}					
				}
			}
			custom_effect_tooltip = weapmarket_net_support_na_prodaju			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						motorized_equipment > 50
					}					
				}
			}
			custom_effect_tooltip = weapmarket_est_motorized_equipment_na_prodaju			
		}
		if = {
			limit = {
				FROM = {
					has_equipment = {
						motorized_equipment < 50
					}					
				}
			}
			custom_effect_tooltip = weapmarket_net_motorized_equipment_na_prodaju			
		}
	}
	option = { 
		name = weapon_market.104.a
		ai_chance = { 
			factor = 100
		}
		custom_effect_tooltip = weapmarket_40_pp
		FROM = {
			country_event = {
				id = weapon_market.100
			}
		}
	}
	option = { 
		name = weapon_market.104.b
		trigger = {			
			FROM = {
				has_equipment = {
					support_equipment > 100
				}
			}
		}
		ai_chance = { 
			factor = 10
		}
		custom_effect_tooltip = weapmarket_25_pp
		FROM = {
			country_event = {
				id = weapon_market.105
			}
		}
	}
	option = { 
		name = weapon_market.104.e
		trigger = {			
			FROM = {
				has_equipment = {
					motorized_equipment > 50
				}
			}
		}
		ai_chance = { 
			factor = 10
		}
		custom_effect_tooltip = weapmarket_30_pp
		FROM = {
			country_event = {
				id = weapon_market.108
			}
		}
	}	
	option = { 
		name = weapon_market.104.f
		ai_chance = { 
			factor = 10
		}	
		custom_effect_tooltip = weapon_market.104.f.tt
		add_political_power = 5
	}		
}
###########
######################
#zapros  support eq
country_event = {
	id = weapon_market.105
	title = weapon_market.105.t
	desc = weapon_market.105.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.105.a
		ai_chance = { 
			factor = 100 
		}
		trigger = {			
			has_equipment = {
				support_equipment > 100
			}			
		}
		if = {
			limit = {
				has_equipment = {
					support_equipment > 100
				}
			}
			send_equipment = {
				target = FROM
				type = support_equipment
				amount = 100
			}
			FROM = {
				country_event = {
					id = weapon_market.106
				}
			}
		}
		add_political_power = 15
		if = {
			limit = {				
				has_idea = weaponmarketboost				
			}
			modify_timed_idea  = {
				idea = weaponmarketboost
				days = 35
			}
		}
		else_if = {
			limit = {
				NOT = {
					has_idea = weaponmarketboost
				}	
			}
			add_timed_idea = {
				idea = weaponmarketboost
				days = 35
			}
		}
	}
	option = { 
		name = weapon_market.105.b
		ai_chance = { 
			factor = 1 
		}
		FROM = {
			country_event = {
				id = weapon_market.107
			}
		}		
	}	
}
#eeee support eq
country_event = {
	id = weapon_market.106
	title = weapon_market.106.t
	desc = weapon_market.106.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.106.a
		add_political_power = -25
		add_named_threat = { threat = 0.5 name = kupil_orujie_threat }
		effect_tooltip = {
			custom_effect_tooltip = my_polichili_orujie
			FROM = {
				send_equipment = {
					target = ROOT
					type = support_equipment
					amount = 100
				}
			}			
		}
	}		
}
#NOOOOOO support eq
country_event = {
	id = weapon_market.107
	title = weapon_market.107.t
	desc = weapon_market.107.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.107.a		
	}		
}
#####################
######################
#zapros  motorized_equipment
country_event = {
	id = weapon_market.108
	title = weapon_market.108.t
	desc = weapon_market.108.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.108.a
		ai_chance = { 
			factor = 100 
		}
		trigger = {			
			has_equipment = {
				motorized_equipment > 50
			}			
		}
		if = {
			limit = {
				has_equipment = {
					motorized_equipment > 50
				}
			}
			send_equipment = {
				target = FROM
				type = motorized_equipment
				amount = 50
			}
			FROM = {
				country_event = {
					id = weapon_market.109
				}
			}
		}
		add_political_power = 25
		if = {
			limit = {				
				has_idea = weaponmarketboost				
			}
			modify_timed_idea  = {
				idea = weaponmarketboost
				days = 35
			}
		}
		else_if = {
			limit = {
				NOT = {
					has_idea = weaponmarketboost
				}	
			}
			add_timed_idea = {
				idea = weaponmarketboost
				days = 35
			}
		}
	}
	option = { 
		name = weapon_market.108.b
		ai_chance = { 
			factor = 1 
		}
		FROM = {
			country_event = {
				id = weapon_market.110
			}
		}		
	}	
}
#eeee motorized_equipment
country_event = {
	id = weapon_market.109
	title = weapon_market.109.t
	desc = weapon_market.109.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.109.a
		add_political_power = -30
		add_named_threat = { threat = 0.7 name = kupil_orujie_threat }
		effect_tooltip = {
			custom_effect_tooltip = my_polichili_orujie
			FROM = {
				send_equipment = {
					target = ROOT
					type = motorized_equipment
					amount = 50
				}
			}			
		}
	}		
}
#NOOOOOO motorized_equipment
country_event = {
	id = weapon_market.110
	title = weapon_market.110.t
	desc = weapon_market.110.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.110.a		
	}		
}
######################
#ЧИТ ЭВЕНТ ДЛЯ ТЕСТА ТОРГОВЛИ
country_event = {
	id = weapon_market.111
	title = weapon_market.111.t
	desc = weapon_market.111.d
	picture = GFX_report_event_generic_factory
	is_triggered_only = yes
	option = { 
		name = weapon_market.111.a	
		ZSL = {
			add_equipment_to_stockpile = {
				type = infantry_equipment_0
				amount = 50000
				producer = ZSL
			}
			add_equipment_to_stockpile = {
				type = support_equipment_1
				amount = 50000
				producer = ZSL
			}
			add_equipment_to_stockpile = {
				type = motorized_equipment_1
				amount = 50000
				producer = ZSL
			}
		}		
	}		
}