﻿## 添加事件 
add_namespace = NEW_PRC_misc_events

# 中国共产党第七次全国代表大会 1
country_event = { 
	id = NEW_PRC_misc_events.1
	title = NEW_PRC_misc_events.1.t
	desc = NEW_PRC_misc_events.1.desc
	picture = GFX_report_event_PRC_national_congress

	trigger = {
	 	#date > 1945.1.13
	 	original_tag = PRC 
		has_completed_focus = PRC_Tokyo_Trial
	}

	mean_time_to_happen = {
	 	days = 60
	}

	fire_only_once = yes

	option = {
		name = NEW_PRC_misc_events.1.a
		add_stability = 0.05
		add_political_power = 50
	}
}


# 收复西藏要地 2
country_event = { 
	id = NEW_PRC_misc_events.2
	title = NEW_PRC_misc_events.2.t #Deliberate
	desc = NEW_PRC_misc_events.2.desc #Deliberate
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	# 索要
	option = {
		name = NEW_PRC_misc_events.2.a
		trigger = {
			not = {
				original_tag = TIB
			}
		}
		ai_chance = {
			base = 100
		}
		every_controlled_state = {
			limit = {
				is_fully_controlled_by = ROOT
				is_core_of = TIB
			}
			FROM = {
				transfer_state = PREV
			}
		}
		
		FROM = {
			country_event = { id = NEW_PRC_misc_events.3 hours = 1 }
		}
	}

	# 不从
	option = {

		name = NEW_PRC_misc_events.2.b

		trigger = {
			original_tag = TIB
		}
		ai_chance = {
			base = 100
		}
		FROM = {
			country_event = { id = NEW_PRC_misc_events.21 hours = 1 }
		}

	}

}

# 收复西藏要地成功 3
country_event = { 
	id = NEW_PRC_misc_events.3
	title = NEW_PRC_misc_events.3.t #Deliberate
	desc = NEW_PRC_misc_events.3.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	# 归还
	option = {
		trigger = {
			original_tag = PRC
		}

		name = NEW_PRC_misc_events.3.a

		# 434 = { transfer_state_to = PRC }

		# 434 = {set_state_name = PRC_zangnan}

		# set_province_name = { id = 1116 name = PRC_yitabao }

		add_opinion_modifier = {
			target = FROM
			modifier = ENG_returned_our_territory
		}

	}

}



# 敢于胜利要地 4
country_event = { 
	id = NEW_PRC_misc_events.4
	title = NEW_PRC_misc_events.2.t #Deliberate
	desc = NEW_PRC_misc_events.2.desc #Deliberate
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	# MON 蒙古回归
	option = {
		name = NEW_PRC_misc_events.4.a
		trigger = {
			original_tag = MON
			
		}
		ai_chance = {
			base = 100
			
		}
		FROM = {
			country_event = { id = NEW_PRC_misc_events.5 hours = 1 }
		}

	}
	# TAN 唐努图瓦回归
	option = {
		name = NEW_PRC_misc_events.4.a
		trigger = {
			original_tag = TAN
			
		}
		ai_chance = {
			base = 100
			
		}
		FROM = {
			country_event = { id = NEW_PRC_misc_events.5 hours = 1 }
		}

	}
	# 苏联归还领土 
	option = {
		name = NEW_PRC_misc_events.4.b

		trigger = {
			original_tag = SOV
		}
		ai_chance = {
			base = 100
			
		}
		FROM = {
			country_event = { id = NEW_PRC_misc_events.5 hours = 1 }
		}

	}



}

# 敢于胜利要地成功 5
country_event = { 
	id = NEW_PRC_misc_events.5
	title = NEW_PRC_misc_events.3.t #Deliberate
	desc = NEW_PRC_misc_events.3.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	# MON 蒙古回归
	option = {
		trigger = {
			FROM = {
				original_tag = MON
			}
			original_tag = PRC
		}
		name = NEW_PRC_misc_events.5.a
		
		annex_country = {
			target = MON
			transfer_troops = yes
		}
			

	}
	# TAN 唐努图瓦回归
	option = {
		trigger = {
			FROM = {
				original_tag = TAN
			}
			original_tag = PRC
		}
		name = NEW_PRC_misc_events.5.b
		
		annex_country = {
			target = TAN
			transfer_troops = yes
		}
		
		# 329 = {set_state_name = PRC_tnwlh}			
		# set_province_name = { id = 10627 name = PRC_tnwlh }


	}
	# 苏联归还领土 
	option = {
		trigger = {
			FROM = {
				original_tag = SOV
			}
			original_tag = PRC
		}
		name = NEW_PRC_misc_events.5.c

		655 = { transfer_state_to = PRC }
		732 = { transfer_state_to = PRC }
		586 = { transfer_state_to = PRC }
		589 = { transfer_state_to = PRC }
		588 = { transfer_state_to = PRC }
		408 = { transfer_state_to = PRC }
		409 = { transfer_state_to = PRC }
		560 = { transfer_state_to = PRC }
		657 = { transfer_state_to = PRC }
		561 = { transfer_state_to = PRC }


		if = {
			limit = { 329 = { is_controlled_by  = SOV } }
			329 = { transfer_state_to = PRC }

			# 329 = {set_state_name = PRC_tnwlh}
			# set_province_name = { id = 10627 name = PRC_tnwlh }	

		}
			

		# 655 = {set_state_name = PRC_beikuye}

		# custom_effect_tooltip = generic_skip_one_line_tt

		# 560 = {set_state_name = PRC_miaojie}

		# custom_effect_tooltip = generic_skip_one_line_tt

		# 408 = {set_state_name = PRC_haishenwai}
		# set_province_name = { id = 957 name = PRC_haishenwai }

		# custom_effect_tooltip = generic_skip_one_line_tt

		# 409 = {set_state_name = PRC_boli}
		# set_province_name = { id = 12189 name = PRC_boli }

		# custom_effect_tooltip = generic_skip_one_line_tt
			
		# 561 = {set_state_name = PRC_hailanpao}
		# set_province_name = { id = 7851 name = PRC_yakesa }

		add_opinion_modifier = {
			target = FROM
			modifier = ENG_returned_our_territory
		}
	}


}



# 铁人精神 6
country_event = { 
	id = NEW_PRC_misc_events.6
	title = NEW_PRC_misc_events.6.t 
	desc = NEW_PRC_misc_events.6.desc 
	picture = GFX_report_event_wangjx

	trigger = {
		original_tag = PRC
		PRC = {
			owns_state = 714
			controls_state = 714
		}
		714 = {has_state_flag = daqing_oil_developed_2}
    }
	
    fire_only_once = yes
  

	option = {
		name = NEW_PRC_misc_events.6.a
		add_ideas = PRC_fehuman_idea

	}
}



# 东京大审判 甲级 7
country_event = { 
	id = NEW_PRC_misc_events.7
	title = NEW_PRC_misc_events.7.t 
	desc = NEW_PRC_misc_events.7.desc 
	picture = GFX_report_event_djdsp
	
    is_triggered_only = yes
  

	option = {
		name = NEW_PRC_misc_events.7.a
		282 = { add_manpower = -28}
		ROOT = {country_event = { id = NEW_PRC_misc_events.8 days = 14 } }	


		
	}
}

# 东京大审判 乙级、丙级 8
country_event = { 
	id = NEW_PRC_misc_events.8
	title = NEW_PRC_misc_events.8.t 
	desc = NEW_PRC_misc_events.8.desc 
	picture = GFX_report_event_djdsp
	
    is_triggered_only = yes
  

	option = {
		name = NEW_PRC_misc_events.8.a
		282 = { add_manpower = -913}
		ROOT = {country_event = { id = NEW_PRC_misc_events.9 days = 4 } }	
	}
}

# 东京大审判 皇室命运 9
country_event = { 
	id = NEW_PRC_misc_events.9
	title = NEW_PRC_misc_events.9.t 
	desc = NEW_PRC_misc_events.9.desc 
	
    is_triggered_only = yes
  

	option = {
		name = NEW_PRC_misc_events.9.a
		ROOT = {country_event = { id = NEW_PRC_misc_events.10 days = 4 } }	
	}
}

# 东京大审判 枪毙裕仁 10
country_event = { 
	id = NEW_PRC_misc_events.10
	title = NEW_PRC_misc_events.10.t 
	desc = NEW_PRC_misc_events.10.desc 
	picture = GFX_report_event_yuren
	
    is_triggered_only = yes
  

	option = {
		name = NEW_PRC_misc_events.10.a
		ROOT = { add_stability = 0.1 }
		282 = { add_manpower = -1}

		
	}
		

}


# 抓捕战犯 11
country_event = { 
	id = NEW_PRC_misc_events.11
	title = NEW_PRC_misc_events.11.t 
	desc = NEW_PRC_misc_events.11.desc 
	picture = GFX_report_event_zhanfan
	
	trigger = {
		original_tag = PRC
		282 = { is_controlled_by = PRC }
		282 = { is_owned_by = JAP }
		JAP = { has_war_with = PRC }
    }
	
    fire_only_once = yes

	option = {
		name = NEW_PRC_misc_events.11.a

	}

}





# 新中国成立 12
news_event = { 
	id = NEW_PRC_misc_events.12
	title = NEW_PRC_misc_events.12.t 
	desc = NEW_PRC_misc_events.12.desc 
	picture = GFX_news_event_prc_declared
	
    is_triggered_only = yes
  

	option = {
		name = NEW_PRC_misc_events.12.a
		trigger = {
			original_tag = PRC
		}
		add_stability = 0.1		
	}
	option = {
		name = NEW_PRC_misc_events.12.b
		trigger = {
			NOT = {
				original_tag = PRC
			}
		}
	}

}



# 三大改造 13
country_event = { 
	id = NEW_PRC_misc_events.13
	title = NEW_PRC_misc_events.13.t 
	desc = NEW_PRC_misc_events.13.desc 
	picture = GFX_report_event_three
	
    is_triggered_only = yes
  

	option = {
		name = NEW_PRC_misc_events.13.a
		
		set_country_flag = PRC_three_1
		
		custom_effect_tooltip = NEW_PRC_misc_events.13.a_t
		
	}
	option = {
		name = NEW_PRC_misc_events.13.b

		set_country_flag = PRC_three_2

		ROOT = { add_stability = -0.05 }

		custom_effect_tooltip = NEW_PRC_misc_events.13.b_t

	}


}

# 建设塔克拉玛干石油基地 14
country_event = { 
	id = NEW_PRC_misc_events.14
	title = NEW_PRC_misc_events.14.t 
	desc = NEW_PRC_misc_events.14.desc 
	picture = GFX_report_event_tklmg

	trigger = {
		original_tag = PRC
       	PRC = {
		 	owns_state = 287
			controls_state = 287
		}
		287 = {has_state_flag = develop_talimu_o_deposits_flag_1}
    }
	
    fire_only_once = yes
  

	option = {
		name = NEW_PRC_misc_events.14.a
		287 = {
			add_dynamic_modifier = {
				modifier = PRC_oil_tklmg
			}
		}

	}
}


# PRC要地事件修改，百分百成功
## 敢于斗争要地 15
country_event = { 
	id = NEW_PRC_misc_events.15
	title = NEW_PRC_misc_events.2.t #Deliberate
	desc = NEW_PRC_misc_events.2.desc #Deliberate
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	# 香港
	option = {
		name = NEW_PRC_misc_events.15.a
		trigger = {
			original_tag = ENG
			326 = {
				is_controlled_by = ENG
			}
		}
		ai_chance = {
			base = 100
			
		}

		326 = { transfer_state_to = FROM }

		FROM = {
			country_event = { id = NEW_PRC_misc_events.16 hours = 1 }
		}
	}

	# 澳门
	option = {
		name = NEW_PRC_misc_events.15.b
		trigger = {
			original_tag = POR
			729 = {
				is_controlled_by = POR
			}
		}
		ai_chance = {
			base = 100
			
		}

		729 = { transfer_state_to = FROM }

		FROM = {
			country_event = { id = NEW_PRC_misc_events.16 hours = 1 }
		}
	}

	# 广州湾
	option = {
		name = NEW_PRC_misc_events.15.c
		trigger = {
			original_tag = FRA
			728 = {
				is_controlled_by = FRA
			}
		}
		ai_chance = {
			base = 100
			
		}

		728 = { transfer_state_to = FROM }

		FROM = {
			country_event = { id = NEW_PRC_misc_events.16 hours = 1 }
		}
	}

	# 所有领土
	option = {
		name = NEW_PRC_misc_events.15.d
		trigger = {
			any_controlled_state = {
				is_core_of = PRC
				is_fully_controlled_by = ROOT
				NOT = {
					is_core_of = ROOT
				}
			}
		}
		ai_chance = {
			base = 100
		}
		effect_tooltip = {
			every_controlled_state = {
				limit = {
					is_core_of = PRC
					NOT = {
						is_core_of = ROOT
					}
					is_fully_controlled_by = ROOT
				}
				FROM = {
					transfer_state = PREV
				}
			}
		}
		FROM = {
			set_country_flag = PRC_hand_over_territory_flag
			country_event = { id = NEW_PRC_misc_events.16 hours = 1 }
		}
	}

}

## 敢于斗争要地成功 16
country_event = { 
	id = NEW_PRC_misc_events.16
	title = NEW_PRC_misc_events.3.t #Deliberate
	desc = NEW_PRC_misc_events.3.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	# 香港
	option = {
		name = NEW_PRC_misc_events.16.a
		#NO NEED FOR AI CHANCE SINCE PRC WILL ONLY HAVE ACCESS TO ONE OF THESE OPTIONS AT A TIME
		trigger = {
			FROM = {
				original_tag = ENG
			}
			controls_state = 326
			NOT = {
				has_country_flag = PRC_hand_over_territory_flag
			}
		}
		effect_tooltip = {
			transfer_state = 326
		}

		add_opinion_modifier = {
			target = FROM
			modifier = ENG_returned_our_territory
		}
	}

	# 澳门
	option = {
		name = NEW_PRC_misc_events.16.b
		#NO NEED FOR AI CHANCE SINCE PRC WILL ONLY HAVE ACCESS TO ONE OF THESE OPTIONS AT A TIME
		trigger = {
			FROM = {
				original_tag = POR
			}
			controls_state = 729
			NOT = {
				has_country_flag = PRC_hand_over_territory_flag
			}
		}
		effect_tooltip = {
			transfer_state = 729
		}

		add_opinion_modifier = {
			target = FROM
			modifier = ENG_returned_our_territory
		}
	}

	# 广州湾
	option = {
		name = NEW_PRC_misc_events.16.c
		#NO NEED FOR AI CHANCE SINCE PRC WILL ONLY HAVE ACCESS TO ONE OF THESE OPTIONS AT A TIME
		trigger = {
			FROM = {
				original_tag = FRA
			}
			controls_state = 728
			NOT = {
				has_country_flag = PRC_hand_over_territory_flag
			}
		}
		effect_tooltip = {
			transfer_state = 728
		}

		add_opinion_modifier = {
			target = FROM
			modifier = ENG_returned_our_territory
		}
	}

	# 所有领土
	option = {
		name = NEW_PRC_misc_events.16.d
		trigger = {
			has_country_flag = PRC_hand_over_territory_flag
		}
		#NO NEED FOR AI CHANCE SINCE PRC WILL ONLY HAVE ACCESS TO ONE OF THESE OPTIONS AT A TIME
		# Scoping to own cores won't work if sent from Manchuria etc 
		every_state = {
			limit = {
				is_fully_controlled_by = FROM
				is_core_of = PRC 
				NOT = {
					is_core_of = FROM
				}
			}
			ROOT = {
				transfer_state = PREV
			}
		}
		add_opinion_modifier = {
			target = FROM
			modifier = ENG_returned_our_territory
		}
	}

	# 青岛
	option = {
		name = NEW_PRC_misc_events.16.e
		#NO NEED FOR AI CHANCE SINCE PRC WILL ONLY HAVE ACCESS TO ONE OF THESE OPTIONS AT A TIME
		trigger = {
			FROM = {
				original_tag = GER
			}
			controls_state = 743
			NOT = {
				has_country_flag = PRC_hand_over_territory_flag
			}
		}
		effect_tooltip = {
			transfer_state = 743
		}

		add_opinion_modifier = {
			target = FROM
			modifier = ENG_returned_our_territory
		}
	}
}


## 允许区域自治 17
country_event = { 
	id = NEW_PRC_misc_events.17
	title = NEW_PRC_misc_events.17.t
	desc = NEW_PRC_misc_events.17.desc
	picture = GFX_report_event_chinese_soldiers_running 
	is_triggered_only = yes

	option = { 
		name = NEW_PRC_misc_events.17.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = {
				is_faction_leader = yes
			}
			FROM = {
				set_faction_leader = yes
			}
		}
		FROM = {
			set_autonomy = {
				target = ROOT
				autonomous_state = autonomy_puppet
				end_wars = no
				end_civil_wars = no
			}

			country_event = {
				id = NEW_PRC_misc_events.18
				hours = 2
			}
		}
	}
}

## 允许区域自治成功 18
country_event = { 
	id = NEW_PRC_misc_events.18
	title = NEW_PRC_misc_events.18.t
	desc = NEW_PRC_misc_events.18.desc
	picture = GFX_report_event_chinese_soldiers_running 
	is_triggered_only = yes

	option = {
		name = NEW_PRC_misc_events.18.a
		effect_tooltip = {
			puppet = FROM
		}
	}
}


# 边区政府 19
country_event = {

	id = NEW_PRC_misc_events.19
	title = NEW_PRC_misc_events.19.t
	desc = NEW_PRC_misc_events.19.desc
	picture = GFX_report_event_military_planning

	trigger = {
		original_tag = PRC

		PRC = {
			is_subject = no
			not = {  has_cosmetic_tag = PRC_proclaimed_communism   }
		}
		CHI = {
			is_subject = no
		}

		or = {

			PRC = {
				is_in_faction_with = CHI
				has_faction_template = faction_template_chinese_united_front
			}

			CHI = {
				is_in_faction_with = PRC
				has_faction_template = faction_template_chinese_united_front				
			}

		}

	}
	
	fire_only_once = yes

	mean_time_to_happen = {
		days = 3
	}

	option = {
		name = NEW_PRC_misc_events.19.a
		set_cosmetic_tag = PRC_border_government
		add_stability = 0.05

	}

}

# 内战|解放区 20
country_event = {

	id = NEW_PRC_misc_events.20
	title = NEW_PRC_misc_events.20.t
	desc = NEW_PRC_misc_events.20.desc
	picture = GFX_report_event_PRC_new_fourth_army_incident_start

	trigger = {
		original_tag = PRC
		PRC = {
			has_war_with = CHI
		}
		CHI = {
			is_subject = no
		}
	}

	fire_only_once = yes

	option = {
		name = NEW_PRC_misc_events.20.a
		if = {
			limit = { 
				PRC = { 
					not = { has_cosmetic_tag = PRC_proclaimed_communism } 
				}
			}
			set_cosmetic_tag = PRC_liberated_area
		}

		add_war_support = 0.025

		add_timed_idea = {
			idea = PRC_liberate_chi
			days = 1465
		}
		
	}

}

# 欠屠的农奴主和藏传佛教 21
country_event = { 
	id = NEW_PRC_misc_events.21
	title = NEW_PRC_misc_events.21.t #Deliberate
	desc = NEW_PRC_misc_events.21.desc
	picture = GFX_report_event_military_planning

	is_triggered_only = yes

	# 开打
	option = {
		trigger = {
			original_tag = PRC
		}

		name = NEW_PRC_misc_events.21.a

		ROOT = {
			create_wargoal = {
				type = annex_everything
				target = TIB
			}
		}
		add_timed_idea = {
			idea = PRC_liberate_tib
			days = 386
		}
		
	}

}

# 非共产主义国家内战 22
country_event = { 
	id = NEW_PRC_misc_events.22
	title = NEW_PRC_misc_events.22.t
	desc = NEW_PRC_misc_events.22.desc
	picture = GFX_report_event_generic_communist_militia

	is_triggered_only = yes

	option = {
		name = NEW_PRC_misc_events.22.a
		ai_chance = {
			base = 100
		}

		start_civil_war = {
			ideology = ROOT
			ruling_party = communism
			size = 0.5 
		}

	}

}

# 邀请结盟 23
country_event = {
	id = NEW_PRC_misc_events.23
	title = NEW_PRC_misc_events.23.t
	desc = NEW_PRC_misc_events.23.desc
	picture = GFX_report_event_military_planning
	
	is_triggered_only = yes
	
	option = { 
		name = NEW_PRC_misc_events.23.a
		ai_chance = {
			base = 100
		}

		FROM = {
			country_event = {
				id = NEW_PRC_misc_events.24
				hours = 12
				random_hours = 24
			}
		}

		effect_tooltip = {
			FROM = {
				add_to_faction = ROOT
			}
		}

	}

}

# 同意结盟 24
country_event = {
	id = NEW_PRC_misc_events.24
	title = NEW_PRC_misc_events.24.t
	desc = NEW_PRC_misc_events.24.desc
	picture = GFX_report_event_military_planning
	
	is_triggered_only = yes

	option = {

		name = NEW_PRC_misc_events.24.a

		add_to_faction = FROM

	}

}

# 人类革新命运共同体成立 25
country_event = {
	id = NEW_PRC_misc_events.25
	title = NEW_PRC_misc_events.25.t
	desc = NEW_PRC_misc_events.25.desc
	picture = GFX_report_event_human
	
	is_triggered_only = yes

	option = {
		name = NEW_PRC_misc_events.25.a
	}	
}
