add_namespace = nwrg
add_namespace = nwrg_political
add_namespace = nwrg_congress
add_namespace = nwrg_military
add_namespace = legyuan

add_namespace = QIN_recognition
add_namespace = legyuan_result

country_event = {
    id = legyuan_result.1
    title = legyuan_result.1.t
    desc = legyuan_result.1.desc
    picture = GFX_report_event_QIN_party_congress
	immediate = { log = "[GetDateText]: [Root.GetName]: event legyuan_result.1" }
    is_triggered_only = yes

    option = {
        name = legyuan_result.1.a
        add_stability = 0.05
        add_political_power = 20
        hidden_effect = {
			QIN_apply_current_ordinance_effects = yes
			QIN_record_current_ordinance_passed = yes
            set_variable = { var = Act_Logo_Var value = 0 }
            set_variable = { var = QIN_current_ordinance value = 0 }
            set_variable = { var = vote_timer value = 0 }
            set_variable = { var = QIN_legyuan_days_since_last_vote value = 0 }
            clr_country_flag = act_vote_in_progress
            QIN_exit_vote_mode = yes
			clr_country_flag = QIN_LegYuan_Cooldown
			clr_country_flag = QIN_no_gray_left
			set_country_flag = QIN_LegYuan_Cooldown_2
			country_event = { id = legyuan_result.3 days = 335 }
        }
    }
}

country_event = {
    id = legyuan_result.2
    title = legyuan_result.2.t
    desc = legyuan_result.2.desc
    picture = GFX_report_event_QIN_party_congress
	immediate = { log = "[GetDateText]: [Root.GetName]: event legyuan_result.2" }
    is_triggered_only = yes

    option = {
        name = legyuan_result.2.a
        add_stability = -0.05
        add_political_power = -20
        hidden_effect = {
			QIN_record_current_ordinance_failed = yes
            set_variable = { var = Act_Logo_Var value = 0 }
            set_variable = { var = QIN_current_ordinance value = 0 }
            set_variable = { var = vote_timer value = 0 }
            set_variable = { var = QIN_legyuan_days_since_last_vote value = 0 }
            clr_country_flag = act_vote_in_progress
            QIN_exit_vote_mode = yes
			clr_country_flag = QIN_LegYuan_Cooldown
			clr_country_flag = QIN_no_gray_left
			set_country_flag = QIN_LegYuan_Cooldown_2
			country_event = { id = legyuan_result.3 days = 335 }
        }
    }
}

country_event = {
    id = legyuan_result.3
    title = legyuan_result.3.t
    desc = legyuan_result.3.desc
    picture = GFX_report_event_QIN_party_congress
	immediate = { log = "[GetDateText]: [Root.GetName]: event legyuan_result.3" }
    is_triggered_only = yes

    option = {
        name = legyuan_result.3.a
        custom_effect_tooltip = QIN_cooldown_no_more_tt
        hidden_effect = {
			set_variable = { var = QIN_legyuan_days_since_last_vote value = 335 }
			clr_country_flag = QIN_LegYuan_Cooldown_2
        }
    }
}

###

country_event = { #Last Bastion of Free China
	id = nwrg_political.1
	title = nwrg_political.1.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.1" }
	desc = nwrg_political.1.desc
	picture = GFX_report_event_QIN_free_china
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.1.a
	}
}

country_event = { #Lunar Year of the Tiger
	id = nwrg_political.2
	title = nwrg_political.2.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.2" }
	desc = nwrg_political.2.desc
	picture = GFX_report_event_QIN_lunar_year
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.2.a
	}
}

country_event = { #The Best Philosopher of Modern China
	id = nwrg_political.3
	title = nwrg_political.3.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.3" }
	desc = nwrg_political.3.desc
	picture = GFX_report_event_QIN_sun_yat_sen
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.3.a
	}
}

country_event = { #In Memory of our Generalissimo
	id = nwrg_political.4
	title = nwrg_political.4.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.4" }
	desc = nwrg_political.4.desc
	picture = GFX_report_event_QIN_chiang_kai_shek
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.4.a
	}
}

country_event = { #In the Court of Panchen Lama
	id = nwrg_political.5
	title = nwrg_political.5.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.5" }
	desc = nwrg_political.5.desc
	picture = GFX_report_event_QIN_panchen_lama
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.5.a
		hidden_effect = {
			country_event = { id = nwrg_political.6 days = 4 }
		}
	}
}

country_event = { #Our Revolution's Direction?
	id = nwrg_political.6
	title = nwrg_political.6.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.6" }
	desc = nwrg_political.6.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	immediate = {
		set_country_flag = country_has_gui
		QIN_init_ordinance_history = yes
	}

	option = { 
	    name = nwrg_political.6.a
		complete_national_focus = QIN_demons_of_factionalism
		complete_national_focus = QIN_the_academic_dilemma
	}
	
	option = { 
	    name = nwrg_political.6.b
		complete_national_focus = QIN_demons_of_factionalism
		complete_national_focus = QIN_the_economist_gambit
	}
	
	option = { 
	    name = nwrg_political.6.c
		complete_national_focus = QIN_demons_of_factionalism
		complete_national_focus = QIN_the_orthodox_line
	}
	
	option = { 
	    name = nwrg_political.6.d
		complete_national_focus = QIN_demons_of_factionalism
		complete_national_focus = QIN_the_officer_duty
	}
}

country_event = { #The Scholar's Vision
	id = nwrg_political.7
	title = nwrg_political.7.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.7" }
	desc = nwrg_political.7.desc
	picture = GFX_report_event_QIN_zhu_jiahua
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.7.a
	}
	
}

country_event = { #The Account Book and the Old Flag
	id = nwrg_political.8
	title = nwrg_political.8.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.8" }
	desc = nwrg_political.8.desc
	picture = GFX_report_event_QIN_industry
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.8.a
	}
	
}

country_event = { #Lessons Beneath the White Sun
	id = nwrg_political.9
	title = nwrg_political.9.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.9" }
	desc = nwrg_political.9.desc
	picture = GFX_report_event_QIN_chiang_kai_shek
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.9.a
	}
	
}

country_event = { #The Boy Who Saluted Twice
	id = nwrg_political.10
	title = nwrg_political.10.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.10" }
	desc = nwrg_political.10.desc
	picture = GFX_report_event_QIN_free_china_army
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.10.a
	}
	
}

country_event = { #More Factories?
	id = nwrg_political.21
	title = nwrg_political.21.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_political.21" }
	desc = nwrg_political.21.desc
	picture = GFX_report_event_QIN_industry
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_political.21.a
		add_building_construction = {
			type = arms_factory
			level = 2
		}

		add_building_construction = {
			type = thermoelectric_plant
			level = 2
		}
	}
	
	option = { 
	    name = nwrg_political.21.b
		add_building_construction = {
			type = industrial_complex
			level = 2
		}

		add_building_construction = {
			type = thermoelectric_plant
			level = 2
		}
	}
}

country_event = { #Status Quo or Reforms?
	id = nwrg_congress.4
	title = nwrg_congress.4.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.4" }
	desc = nwrg_congress.4.desc
	picture = GFX_report_event_QIN_steppe
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.4.a
		complete_national_focus = QIN_military_dictatorship
	}
	
	option = { 
	    name = nwrg_congress.4.b
		complete_national_focus = QIN_civilian_rulership
	}
}

country_event = { #Sino-Mongolian Border Question
	id = nwrg_congress.7
	title = nwrg_congress.7.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.7" }
	desc = nwrg_congress.7.desc
	picture = GFX_report_event_QIN_steppe
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.7.a
		complete_national_focus = QIN_strike_them_down
	}
	
	#option = { 
	#    name = nwrg_congress.7.b
	#	trigger = {
	#		has_completed_focus = QIN_civilian_rulership
	#	}
	#	complete_national_focus = QIN_not_worth_the_men
	#}
}

country_event = { #Striking Down the Horse Lords
	id = nwrg_congress.8
	title = nwrg_congress.8.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.8" }
	desc = nwrg_congress.8.desc
	picture = GFX_report_event_QIN_steppe
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.8.a
		add_manpower = -7250
		add_war_support = -0.10
		add_stability = -0.10
		add_equipment_to_stockpile = {
            type = infantry_equipment
            amount = -1000
		}
		MEN = {
		    add_opinion_modifier = {
                target = QIN
                modifier = QIN_fuck_CPS
            }
			country_event = {
			    id = MEN_china_relations.1
			}
		}
		QIN = {
		    add_opinion_modifier = {
                target = MEN
                modifier = QIN_fuck_CPS
            }
			transfer_state = 616
			add_state_core = 616
		}
	}
}

country_event = { #Striking Deal With the Mongolians
	id = nwrg_congress.9
	title = nwrg_congress.9.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.9" }
	desc = nwrg_congress.9.desc
	picture = GFX_report_event_QIN_steppe
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.9.a
		add_manpower = 7250
		add_war_support = 0.10
		add_stability = 0.10
		add_equipment_to_stockpile = {
            type = infantry_equipment
            amount = 1000
		}
		MEN = {
			country_event = {
			    id = MEN_china_relations.2
			}
		}
		QIN = {
		    transfer_state = 616
			add_state_core = 616
		}
	}
}

country_event = { #Congress Preparation: Credentials
	id = nwrg_congress.22
	title = nwrg_congress.22.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.22" }
	desc = nwrg_congress.22.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.22.a
		add_political_power = 5
	}
}

country_event = { #Congress Preparation: Agenda
	id = nwrg_congress.23
	title = nwrg_congress.23.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.23" }
	desc = nwrg_congress.23.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.23.a
		add_stability = 0.01
	}
}

country_event = { #Congress Preparation: Security
	id = nwrg_congress.24
	title = nwrg_congress.24.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.24" }
	desc = nwrg_congress.24.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.24.a
		add_war_support = 0.01
	}
}

country_event = { #The Ninth National Congress Convenes
	id = nwrg_congress.15
	title = nwrg_congress.15.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.15" }
	desc = nwrg_congress.15.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.15.a
		add_political_power = 10
		country_event = { id = nwrg_congress.16 hours = 12 }
	}
}

country_event = { #The Shape of China
	id = nwrg_congress.16
	title = nwrg_congress.16.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.16" }
	desc = nwrg_congress.16.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.16.a
		add_stability = 0.025
		hidden_effect = { set_country_flag = QIN_congress_china_republic }
		country_event = { id = nwrg_congress.17 hours = 12 }
	}

	option = {
	    name = nwrg_congress.16.b
		add_war_support = 0.025
		hidden_effect = { set_country_flag = QIN_congress_china_disciplined }
		country_event = { id = nwrg_congress.17 hours = 12 }
	}
}

country_event = { #Japan in the Congress Hall
	id = nwrg_congress.17
	title = nwrg_congress.17.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.17" }
	desc = nwrg_congress.17.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.17.a
		add_political_power = 10
		hidden_effect = { set_country_flag = QIN_congress_japan_justice }
		country_event = { id = nwrg_congress.18 hours = 12 }
	}

	option = {
	    name = nwrg_congress.17.b
		add_war_support = 0.025
		hidden_effect = { set_country_flag = QIN_congress_japan_retribution }
		country_event = { id = nwrg_congress.18 hours = 12 }
	}
}

country_event = { #The Far East After Empire
	id = nwrg_congress.18
	title = nwrg_congress.18.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.18" }
	desc = nwrg_congress.18.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.18.a
		add_stability = 0.025
		hidden_effect = { set_country_flag = QIN_congress_far_east_peace }
		country_event = { id = nwrg_congress.19 hours = 12 }
	}

	option = {
	    name = nwrg_congress.18.b
		add_war_support = 0.025
		hidden_effect = { set_country_flag = QIN_congress_far_east_crusade }
		country_event = { id = nwrg_congress.19 hours = 12 }
	}
}

country_event = { #The People of the Future Republic
	id = nwrg_congress.19
	title = nwrg_congress.19.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.19" }
	desc = nwrg_congress.19.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.19.a
		add_stability = 0.025
		hidden_effect = { set_country_flag = QIN_congress_citizenry_rights }
	}

	option = {
	    name = nwrg_congress.19.b
		add_war_support = 0.025
		hidden_effect = { set_country_flag = QIN_congress_citizenry_duty }
	}
}

country_event = { #The Question of Japan
	id = nwrg_congress.20
	title = nwrg_congress.20.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.20" }
	desc = nwrg_congress.20.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.20.a
		add_political_power = 15
		hidden_effect = { set_country_flag = QIN_japan_policy_trials }
	}

	option = {
	    name = nwrg_congress.20.b
		add_war_support = 0.05
		hidden_effect = { set_country_flag = QIN_japan_policy_humbled }
	}

	option = {
	    name = nwrg_congress.20.c
		add_stability = 0.025
		hidden_effect = { set_country_flag = QIN_japan_policy_reconstruction }
	}
}

country_event = { #The Fate of Collaborators
	id = nwrg_congress.21
	title = nwrg_congress.21.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.21" }
	desc = nwrg_congress.21.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = {
	    name = nwrg_congress.21.a
		add_political_power = 15
		hidden_effect = { set_country_flag = QIN_collaborator_policy_trials }
	}

	option = {
	    name = nwrg_congress.21.b
		add_war_support = 0.05
		hidden_effect = { set_country_flag = QIN_collaborator_policy_purge }
	}

	option = {
	    name = nwrg_congress.21.c
		add_stability = 0.025
		hidden_effect = { set_country_flag = QIN_collaborator_policy_clemency }
	}
}

country_event = { #Successor To Zhu Shaoliang
	id = nwrg_congress.10
	title = nwrg_congress.10.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.10" }
	desc = nwrg_congress.10.desc
	picture = GFX_report_event_QIN_steppe
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.10.a
		trigger = {
			has_completed_focus = QIN_civilian_rulership
		}
		complete_national_focus = QIN_from_crp
		country_event = { id = nwrg_congress.12 }
	}
	
	option = { 
	    name = nwrg_congress.10.b
		trigger = {
			has_completed_focus = QIN_military_dictatorship
		}
		complete_national_focus = QIN_from_nra
		country_event = { id = nwrg_congress.11 }
	}
}

country_event = { #Successor To Zhu Shaoliang - NRA
	id = nwrg_congress.11
	title = nwrg_congress.11.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.11" }
	desc = nwrg_congress.11.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.11.a
		hidden_effect = {
			set_country_flag = QIN_chen_cheng_secured
		}
	}
	
	option = { 
	    name = nwrg_congress.11.b
		hidden_effect = {
			set_country_flag = QIN_sun_weiru_secured
		}
	}

	option = { 
	    name = nwrg_congress.11.c
		hidden_effect = {
			set_country_flag = QIN_ma_jiyuan_secured
		}
	}
}

country_event = { #Successor To Zhu Shaoliang - CRP
	id = nwrg_congress.12
	title = nwrg_congress.12.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.12" }
	desc = nwrg_congress.12.desc
	picture = GFX_report_event_QIN_party_congress
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.12.a
		hidden_effect = {
			set_country_flag = QIN_zhu_jiahua_secured
		}
	}
	
	option = { 
	    name = nwrg_congress.12.b
		hidden_effect = {
			set_country_flag = QIN_chen_lifu_secured
		}
	}

	option = { 
	    name = nwrg_congress.12.c
		hidden_effect = {
			set_country_flag = QIN_he_zhonghan_secured
		}
	}
}

country_event = { #Invasion of Gansu
	id = nwrg_congress.13
	title = nwrg_congress.13.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.13" }
	desc = nwrg_congress.13.desc
	picture = GFX_report_event_QIN_steppe
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_congress.13.a
		hidden_effect = {
		    GAN = {
			    leave_faction = yes
				country_event = { id = GAN.1 days = 2 }
			}
			CHI = {
			    end_puppet = GAN
			}
		}
		QIN = { 
		    declare_war_on = {
			    type = annex_everything target = GAN
			}
			activate_mission = QIN_GAN_war
		}
	}
}

country_event = { #Death of the Generalissimo Zhu Shaoliang
	id = nwrg_congress.14
	title = nwrg_congress.14.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_congress.14" }
	desc = nwrg_congress.14.desc
	picture = GFX_report_event_QIN_free_china
	is_triggered_only = yes
	fire_only_once = yes

	option = {
		trigger = {
			has_country_flag = QIN_zhu_jiahua_secured
		}
	    name = nwrg_congress.14.a
		hidden_effect = {
			TNO_Country_Closing_Screen_Show = yes
			QIN = {
				retire_country_leader = yes
				set_politics = {
					ruling_party = paternalism
				}
			}
		}
		QIN = {
		    add_manpower = -1
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_sun_weiru_secured
		}
	    name = nwrg_congress.14.b
		hidden_effect = {
			TNO_Country_Closing_Screen_Show = yes
			QIN = {
				retire_country_leader = yes
				set_politics = {
					ruling_party = paternalism
				}
				promote_character = {
					character = QIN_sun_weiru
					ideology = paternalism_chiang_kai_shek_thought_subtype
				}
			}
		}
		QIN = {
		    add_manpower = -1
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_chen_lifu_secured
		}
	    name = nwrg_congress.14.c
		hidden_effect = {
			TNO_Country_Closing_Screen_Show = yes
			QIN = {
				retire_country_leader = yes
				promote_character = {
					character = QIN_chen_lifu
					ideology = despotism_chiang_kai_shek_thought_subtype
				}
				add_popularity = {
					ideology = despotism_1
					popularity = -1
				}
				QIN_sync_party_seats_from_popularity = yes
				set_party_name = {
					ideology = despotism
					name = QIN_despotism_1_party
					long_name = QIN_despotism_1_party_long
				}
			}
		}
		QIN = {
		    add_manpower = -1
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_chen_cheng_secured
		}
	    name = nwrg_congress.14.d
		hidden_effect = {
			TNO_Country_Closing_Screen_Show = yes
			QIN = {
				retire_country_leader = yes
				promote_character = {
					character = QIN_chen_cheng
					ideology = despotism_chiang_kai_shek_thought_subtype
				}
			}
		}
		QIN = {
		    add_manpower = -1
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_he_zhonghan_secured
		}
	    name = nwrg_congress.14.e
		hidden_effect = {
			TNO_Country_Closing_Screen_Show = yes
			QIN = {
				retire_country_leader = yes
				set_politics = {
					ruling_party = fascism
				}
			}
		}
		QIN = {
		    add_manpower = -1
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_ma_jiyuan_secured
		}
	    name = nwrg_congress.14.f
		hidden_effect = {
			TNO_Country_Closing_Screen_Show = yes
			QIN = {
				retire_country_leader = yes
				promote_character = {
					character = QIN_ma_jiyuan
					ideology = despotism_chiang_kai_shek_thought_subtype
				}
				add_popularity = {
					ideology = despotism_2
					popularity = -1
				}
				QIN_sync_party_seats_from_popularity = yes
				set_party_name = {
					ideology = despotism
					name = QIN_despotism_2_party
					long_name = QIN_despotism_2_party_long
				}
			}
		}
		QIN = {
		    add_manpower = -1
		}
	}
}


country_event = { #The Japanese Intervention...
	id = nwrg_military.1
	title = nwrg_military.1.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_military.1" }
	desc = nwrg_military.1.desc
	picture = GFX_report_event_QIN_the_end
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_military.1.a
		hidden_effect = {
		    JAP = {
			    add_to_faction = GAN
			}
		}
		JAP = { 
		    declare_war_on = {
			    type = annex_everything target = QIN
			}
		}
	}
}

country_event = { #The Japanese Defeat
	id = nwrg_military.2
	title = nwrg_military.2.t
	immediate = { log = "[GetDateText]: [Root.GetName]: event nwrg_military.2" }
	desc = nwrg_military.2.desc
	picture = GFX_report_event_QIN_victory
	is_triggered_only = yes
	fire_only_once = yes

	option = { 
	    name = nwrg_military.2.a
		add_political_power = 20
		hidden_effect = {
			QIN = {
				add_state_core = 283
				add_state_core = 1302
				add_state_core = 2423
				add_state_core = 2424
				add_state_core = 2425
				add_state_core = 2426
			}
		}
	}
}

#CIV-MIL-OPP STUFF

country_event = { # CIV
    id = legyuan.1
    title = legyuan.1.t
    desc  = legyuan.1.desc
    picture = GFX_report_event_QIN_party_congress
	immediate = { log = "[GetDateText]: [Root.GetName]: event legyuan.1" }
    is_triggered_only = yes

    option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_6_used }
		}
		name = legyuan.1.a
		hidden_effect = {
			set_country_flag = QIN_ordinance_6_used
			set_variable = { var = QIN_current_ordinance value = 6 }
			QIN_vote_align_civilian = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_7_used }
		}
		name = legyuan.1.b
		hidden_effect = {
			set_country_flag = QIN_ordinance_7_used
			set_variable = { var = QIN_current_ordinance value = 7 }
			QIN_vote_align_civilian = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_8_used }
		}
		name = legyuan.1.c
		hidden_effect = {
			set_country_flag = QIN_ordinance_8_used
			set_variable = { var = QIN_current_ordinance value = 8 }
			QIN_vote_align_civilian = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_ordinance_6_used
			has_country_flag = QIN_ordinance_7_used
			has_country_flag = QIN_ordinance_8_used
		}
		name = legyuan.no_available
	}
}

country_event = {
    id = legyuan.2 # MIL
    title = legyuan.2.t
    desc  = legyuan.2.desc
    picture = GFX_report_event_QIN_party_congress
	immediate = { log = "[GetDateText]: [Root.GetName]: event legyuan.2" }
    is_triggered_only = yes

    option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_9_used }
		}
		name = legyuan.2.a
		hidden_effect = {
			set_country_flag = QIN_ordinance_9_used
			set_variable = { var = QIN_current_ordinance value = 9 }
			QIN_vote_align_military = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_10_used }
		}
		name = legyuan.2.b
		hidden_effect = {
			set_country_flag = QIN_ordinance_10_used
			set_variable = { var = QIN_current_ordinance value = 10 }
			QIN_vote_align_military = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_11_used }
		}
		name = legyuan.2.c
		hidden_effect = {
			set_country_flag = QIN_ordinance_11_used
			set_variable = { var = QIN_current_ordinance value = 11 }
			QIN_vote_align_military = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_ordinance_9_used
			has_country_flag = QIN_ordinance_10_used
			has_country_flag = QIN_ordinance_11_used
		}
		name = legyuan.no_available
	}
}

country_event = {
    id = legyuan.3 # OPP
    title = legyuan.3.t
    desc  = legyuan.3.desc
    picture = GFX_report_event_QIN_party_congress
	immediate = { log = "[GetDateText]: [Root.GetName]: event legyuan.3" }
    is_triggered_only = yes

    option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_12_used }
		}
		name = legyuan.3.a
		hidden_effect = {
			set_country_flag = QIN_ordinance_12_used
			set_variable = { var = QIN_current_ordinance value = 12 }
			QIN_vote_align_opposition = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_13_used }
		}
		name = legyuan.3.b
		hidden_effect = {
			set_country_flag = QIN_ordinance_13_used
			set_variable = { var = QIN_current_ordinance value = 13 }
			QIN_vote_align_opposition = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			NOT = { has_country_flag = QIN_ordinance_14_used }
		}
		name = legyuan.3.c
		hidden_effect = {
			set_country_flag = QIN_ordinance_14_used
			set_variable = { var = QIN_current_ordinance value = 14 }
			QIN_vote_align_opposition = yes
			QIN_start_current_ordinance_vote = yes
		}
	}
	option = {
		trigger = {
			has_country_flag = QIN_ordinance_12_used
			has_country_flag = QIN_ordinance_13_used
			has_country_flag = QIN_ordinance_14_used
		}
		name = legyuan.no_available
	}
}

# Vote result after 30 days
country_event = {
    id = legyuan.30
    title = legyuan.30.t
    desc  = legyuan.30.desc
    picture = GFX_report_event_QIN_party_congress
	immediate = { log = "[GetDateText]: [Root.GetName]: event legyuan.30" }
    is_triggered_only = yes

    option = {
        name = legyuan.30.a
        hidden_effect = {
            if = {
                limit = {
                    check_variable = {
                        var = yes_size
                        value = 50
                        compare = greater_than
                    }
                }
                country_event = { id = legyuan_result.1 hours = 12 }
            }
            else = {
                country_event = { id = legyuan_result.2 hours = 12 }
            }
        }
    }
}

### 
country_event = {
    id = QIN_recognition.1
    title = QIN_recognition.1.t
    desc  = QIN_recognition.1.desc
    picture = GFX_report_event_QIN_free_china
	immediate = { log = "[GetDateText]: [Root.GetName]: event QIN_recognition.1" }
    is_triggered_only = yes

    option = {
        name = QIN_recognition.1.a
        add_political_power = 20
		add_stability = 0.075
		add_opinion_modifier = {
			target = QIN
			modifier = QIN_recognition_yes
		}
		ai_chance = {
			base = 45
		}
		QIN = {
			country_event = { id = QIN_recognition.2 days = 4 }
		}
    }

	option = {
        name = QIN_recognition.1.b
        add_political_power = 40
		add_stability = -0.1
		add_opinion_modifier = {
			target = QIN
			modifier = QIN_recognition_no
		}
		ai_chance = {
			base = 55
		}
		QIN = { 
			country_event = { id = QIN_recognition.3 days = 4 }
		}
    }
}

country_event = {
    id = QIN_recognition.2
    title = QIN_recognition.2.t
    desc  = QIN_recognition.2.desc
    picture = GFX_report_event_QIN_free_china
	immediate = { log = "[GetDateText]: [Root.GetName]: event QIN_recognition.2" }
    is_triggered_only = yes

    option = {
        name = QIN_recognition.2.a
        add_political_power = 25
		add_stability = 0.15
    }
}

country_event = {
    id = QIN_recognition.3
    title = QIN_recognition.3.t
    desc  = QIN_recognition.3.desc
    picture = GFX_report_event_QIN_free_china
	immediate = { log = "[GetDateText]: [Root.GetName]: event QIN_recognition.3" }
    is_triggered_only = yes

    option = {
        name = QIN_recognition.3.a
        add_political_power = -35
		add_stability = -0.125
    }
}
