QIN_GAN_war_category = {
	QIN_GAN_war = {
		icon = GFX_decision_generic_assault

		allowed = {
			original_tag = QIN
		}

		available = {
			AND = {
				NOT = {
					has_war_with = GAN
				}
				NOT = {
					has_country_flag = QIN_VICTORY
				}
				NOT = {
					has_country_flag = QIN_FAILURE
				}
				OR = {
					NOT = { country_exists = GAN }
					AND = {
						country_exists = GAN
						GAN = {
							has_capitulated = yes
						}
					}
				}
			}
		}

		activation = {
			has_completed_focus = QIN_their_land_their_blood
			has_war_with = GAN
			GAN = {
				exists = yes
			}
			NOT = {
				has_country_flag = QIN_VICTORY
			}
			NOT = {
				has_country_flag = QIN_FAILURE
			}
		}

		is_good = no

		days_mission_timeout = 150

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: QIN_GAN_war mission timer elapsed"
			hidden_effect = {
				if = {
					limit = {
						has_war_with = GAN
						GAN = {
							exists = yes
						}
					}
					set_country_flag = QIN_FAILURE
					country_event = { id = nwrg_military.1 hours = 1 }
					add_political_power = -100
			    	add_stability = -0.25
			    	add_war_support = -0.30
				}
			}
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision QIN_GAN_war"
			if = {
				limit = {
					NOT = { has_country_flag = QIN_VICTORY }
				}
				set_country_flag = QIN_VICTORY
				country_event = { id = nwrg_military.2 hours = 1 }
				add_political_power = 100
		    	add_stability = 0.25
				add_war_support = 0.30
			}
		}
	}
	QIN_buy_infantry_weapons = {
		icon = GFX_decision_generic_money
		cost = 30
		days_remove = 5

		allowed = {
			original_tag = QIN
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: QIN Decision buying infantry weapons"
			random_list = {
				25 = { 
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 1000
					}
				}
				25 = { 
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 1500
					}
				}
				25 = { 
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 2000
					}
				}
				25 = { 
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 2500
					}
				}
			} 
			set_temp_variable = { debt_temp = 0.043 }
			econ_national_debt_change = yes
		}
	}
	QIN_buy_artillery_weapons = {
		icon = GFX_decision_generic_money
		cost = 15
		days_remove = 5

		allowed = {
			original_tag = QIN
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: QIN Decision buying artillery weapons"
			random_list = {
				25 = { 
					add_equipment_to_stockpile = {
						type = artillery_equipment
						amount = 500
					}
				}
				25 = { 
					add_equipment_to_stockpile = {
						type = artillery_equipment
						amount = 1000
					}
				}
				25 = { 
					add_equipment_to_stockpile = {
						type = artillery_equipment
						amount = 1500
					}
				}
				25 = { 
					add_equipment_to_stockpile = {
						type = artillery_equipment
						amount = 2000
					}
				}
			}
			set_temp_variable = { debt_temp = 0.026 }
			econ_national_debt_change = yes
		}
	}
	QIN_demand_foreign_recognition = {
		icon = GFX_decision_generic_document
		cost = 10
		fire_only_once = yes

		allowed = {
			original_tag = QIN
		}

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: QIN Decision foreign recognition"
			USA = {
				country_event = { id = QIN_recognition.1 }
			}
			GER = {
				country_event = { id = QIN_recognition.1 }
			}
			ITA = {
				country_event = { id = QIN_recognition.1 }
			}
		}
	}	
}

QIN_LegYuan_vote_category = {
	# ─────────────────────────────────────────────
	# NRA SWAY — sway nationalist officers and reformists
	# ─────────────────────────────────────────────
	QIN_sway_NRA = {
		icon = GFX_decision_generic_political_pressure
		cost = 5
		days_remove = 1

		allowed = {
			original_tag = QIN
		}
		available = {
			check_variable = { var = abstain_size value = 1 compare = greater_than_or_equals }
		}
		visible = { has_country_flag = act_vote_in_progress }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: NRA sway during voting"
			
			QIN_add_one_yes_vote = yes
		}
	}

	# ─────────────────────────────────────────────
	# CRP SWAY — sway centrist republicans
	# ─────────────────────────────────────────────
	QIN_sway_CRP = {
		icon = GFX_decision_generic_political_pressure
		cost = 5
		days_remove = 1

		allowed = {
			original_tag = QIN
		}
		available = {
			check_variable = { var = abstain_size value = 1 compare = greater_than_or_equals }
		}
		visible = { has_country_flag = act_vote_in_progress }

		complete_effect = {
 		    log = "[GetDateText]: [Root.GetName]: CRP sway during voting"

    		QIN_add_one_yes_vote = yes
		}
	}

	# ─────────────────────────────────────────────
	# CPC SWAY — sway pragmatic communists
	# ─────────────────────────────────────────────
	QIN_sway_CPC = {
		icon = GFX_decision_generic_political_pressure
		cost = 5
		days_remove = 1

		allowed = {
			original_tag = QIN
		}
		available = {
			check_variable = { var = abstain_size value = 1 compare = greater_than_or_equals }
		}
		visible = { has_country_flag = act_vote_in_progress }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: CPC sway during voting"
			
    		QIN_add_one_yes_vote = yes
		}
	}

	# ─────────────────────────────────────────────
	# OTHER SWAY — sway independents and small parties
	# ─────────────────────────────────────────────
	QIN_sway_OTH = {
		icon = GFX_decision_generic_political_pressure
		cost = 5
		days_remove = 1

		allowed = {
			original_tag = QIN
		}
		available = {
			check_variable = { var = abstain_size value = 1 compare = greater_than_or_equals }
		}
		visible = { has_country_flag = act_vote_in_progress }

		complete_effect = {
			log = "[GetDateText]: [Root.GetName]: OTH sway during voting"
			
    		QIN_add_one_yes_vote = yes
		}
	}
}
