add_namespace = czd_event
add_namespace = czd_economy
add_namespace = czd_diplomacy

# ============================================================================
# 独立线事件 (CZD_independence_path)
# ============================================================================

# 事件1：三一运动的回响 (对应国策：三一运动的遗产)
country_event = {
	id = czd_event.1
	title = czd_event.1.t
	desc = czd_event.1.d
	picture = GFX_report_event_korean_independence # 原版通用图，或者找个示威游行的图
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.1.a
		add_political_power = 50
		add_stability = 0.05
	}
}

# 事件2：白头山的密会 (对应国策：接触东北抗联)
country_event = {
	id = czd_event.2
	title = czd_event.2.t
	desc = czd_event.2.d
	picture = GFX_report_event_winter_warfare # 雪地图片
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.2.a
		# 这里实际获得将领的代码已经在国策里写了，这里主要为了叙事
 
	}
}

# 事件3：袭击警备队军火库 (对应国策：袭击军火库)
country_event = {
	id = czd_event.3
	title = czd_event.3.t
	desc = czd_event.3.d
	picture = GFX_report_event_night_battle
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.3.a
		add_equipment_to_stockpile = { type = infantry_equipment_0 amount = 500 } # 额外奖励
	}
}

# 事件4：普天堡的枪声 - 独立战争爆发！ (对应国策：自由与独立)
# 这是一个重要的新闻事件，全世界都能看到
news_event = {
	id = czd_event.4
	title = czd_event.4.t
	desc = czd_event.4.d
	picture = GFX_news_event_generic_war_declaration
	major = yes

	is_triggered_only = yes
	
	option = {
		name = czd_event.4.a # 其它国家的反应
		trigger = { NOT = { tag = CZD } NOT = { tag = JAP } }
	}
	
	option = {
		name = czd_event.4.b # 朝鲜的反应
		trigger = { tag = CZD }
		add_war_support = 0.1
	}
	
	option = {
		name = czd_event.4.c # 日本的反应
		trigger = { tag = JAP }
		add_war_support = 0.05
	}
}

# 事件5：制宪会议与领袖确立 (对应国策：朝鲜制宪会议)
country_event = {
	id = czd_event.5
	title = czd_event.5.t
	desc = czd_event.5.d
	picture = GFX_report_event_gathering_party
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.5.a
		add_stability = 0.1
	}
}

# 事件6：千里马运动的号角 (对应国策：千里马运动)
country_event = {
	id = czd_event.6
	title = czd_event.6.t
	desc = czd_event.6.d
	picture = GFX_report_event_industry_soviet
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.6.a
		
	}
}

# ============================================================================
# 历史线事件 (CZD_historical_path)
# ============================================================================

# 事件7：内鲜一体的宣誓 (对应国策：内鲜一体)
country_event = {
	id = czd_event.10
	title = czd_event.10.t
	desc = czd_event.10.d
	picture = GFX_report_event_japanese_politics
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.10.a
		add_opinion_modifier = { target = JAP modifier = positive_trade_relations }
	}
}

# 事件8：失去名字的日子 (对应国策：创氏改名)
country_event = {
	id = czd_event.11
	title = czd_event.11.t
	desc = czd_event.11.d
	picture = GFX_report_cjc_red_jap_1
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.11.a
		# 这是一个悲伤的事件
		add_stability = -0.05
	}
}

# 事件9：间岛特设队的阴影 (对应国策：间岛特设队)
country_event = {
	id = czd_event.12
	title = czd_event.12.t
	desc = czd_event.12.d
	picture = GFX_report_cjc_soviet_1_marching_japanese
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.12.a
		add_manpower = 2000
	}
}

# 事件10：永恒的臣民 (对应国策：光荣的帝国臣民)
country_event = {
	id = czd_event.13
	title = czd_event.13.t
	desc = czd_event.13.d
	picture = GFX_report_event_japanese_emperor
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.13.a
		# 彻底变成傀儡
		add_stability = 0.2
	}
}


# 苏联收到援助请求
country_event = {
	id = czd_diplomacy.2
	title = czd_diplomacy.2.t
	desc = czd_diplomacy.2.d
	picture = GFX_report_event_soviet_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = czd_diplomacy.2.a
		# 苏联同意援助
		add_political_power = 10
		add_opinion_modifier = { target = CZD modifier = CZD_positive_relation }
		effect_tooltip = {
			CZD = { set_country_flag = soviet_aid_received }
		}
	}
}



# 日本视角的绝望：朝鲜军队进入东京
country_event = {
	id = czd_event.20
	title = czd_event.20.t
	desc = czd_event.20.d
	picture = GFX_report_event_tokyo_burning # 或者是投降签字的图
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.20.a
		# 极大的打击
		add_stability = -0.50
		add_war_support = -0.50
		add_political_power = -500
		
		# 触发一个通知给全世界
		news_event = { id = czd_event.21 }
	}
}

# 全世界的新闻：东京陷落
news_event = {
	id = czd_event.21
	title = czd_event.21.t
	desc = czd_event.21.d
	picture = GFX_news_event_fall_of_tokyo # 原版有这个图
	major = yes
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.21.a # 中国/朝鲜的反应
		trigger = { OR = { tag = CZD tag = CHI tag = PRC } }
	}
	
	option = {
		name = czd_event.21.b # 其他国家的反应
		trigger = { NOT = { tag = CZD tag = CHI tag = PRC } }
	}
}

# 联系延安：黄土高原的盟约
country_event = {
	id = czd_event.30
	title = czd_event.30.t
	desc = czd_event.30.d
	picture = GFX_report_event_chinese_soldiers # 或者 GFX_report_event_gathering_party
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.30.a
		# 增加中国共产党的好感
		if = {
			limit = { PRC = { exists = yes } }
			add_opinion_modifier = { target = PRC modifier = CZD_positive_relation }
		}
		# 少量增加共产主义支持率，代表思想的传入
		add_popularity = { ideology = communism popularity = 0.05 }
	}
}


# 共产国际的援助：莫斯科的红星
country_event = {
	id = czd_event.31
	title = czd_event.31.t
	desc = czd_event.31.d
	picture = GFX_report_event_moscow_city # 原版有这个莫斯科城市的图
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.31.a
		add_political_power = 25
		# 增加共产主义支持率，代表正统理论的输入
		add_popularity = { ideology = communism popularity = 0.10 }
			# 6. 生成部队和事件 (保持你原来的)
			random_owned_controlled_state = {
				limit = { }
				prioritize = { 527 }
				create_unit = {
					division = "name = '第1独立师' division_template = \"朝鲜军步兵师\" start_experience_factor = 0.5"
					owner = CZD
				}
			}
			random_owned_controlled_state = {
				limit = { }
				prioritize = { 525 }
				create_unit = {
					division = "name = '第2独立师' division_template = \"朝鲜军步兵师\" start_experience_factor = 0.5"
					owner = CZD
				}
			}
			random_owned_controlled_state = {
				limit = { }
				prioritize = { 525 }
				create_unit = {
					division = "name = '第2独立师' division_template = \"朝鲜军步兵师\" start_experience_factor = 0.5"
					owner = CZD
				}
			}
			random_owned_controlled_state = {
				limit = { }
				prioritize = { 1030 }
				create_unit = {
					division = "name = '第2独立师' division_template = \"朝鲜军步兵师\" start_experience_factor = 0.5"
					owner = CZD
				}
			}
	}
}



# 庇护反日分子：深夜的敲门声
country_event = {
	id = czd_event.32
	title = czd_event.32.t
	desc = czd_event.32.d
	picture = GFX_report_event_night_battle # 夜间行动的图
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.32.a
		add_political_power = 25
		# 获得少许陆军经验（游击队战术）
		add_army_experience = 10
	}
}


# 开局介绍：半岛的黄昏与黎明
country_event = {
	id = czd_intro.1
	title = czd_intro.1.t
	desc = czd_intro.1.d
	picture = GFX_report_event_japanese_politics # 使用日本政治的图，象征总督府统治
	
	is_triggered_only = yes # 只能通过脚本触发
	
	# 这是一个只有弹窗效果的事件，通常只有一个“我知道了”的选项
	option = {
		name = czd_intro.1.a
		trigger = { tag = CZD } # 只有CZD玩家能看到这个选项
	}
}


# 迁都平壤：开国大典
country_event = {
	id = czd_event.40
	title = czd_event.40.t
	desc = czd_event.40.d
	picture = GFX_report_event_soviet_parade # 阅兵图，很有气势
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.40.a
		# 增加战争支持度，代表人民保卫新首都的决心
		add_war_support = 0.10
		# 获得一个临时的士气Buff
		add_timed_idea = { idea = CZD_revolutionary_capital_spirit days = 365 }
	}
}


# 司法改革：人民法庭的建立
country_event = {
	id = czd_event.42
	title = czd_event.42.t
	desc = czd_event.42.d
	picture = GFX_report_cjc_lenin_2
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.42.a
		add_political_power = 25
	}
}

# 建立警察机构：社会主义卫士
country_event = {
	id = czd_event.43
	title = czd_event.43.t
	desc = czd_event.43.d
	picture = GFX_report_cjc_soviet_1_parade
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.43.a
		add_stability = 0.03
	}
}

# 行政深化 - 统一治理体系
country_event = {
	id = czd_event.44
	title = czd_event.44.t
	desc = czd_event.44.d
	picture = GFX_report_cjc_redflag_paper
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.44.a
		add_stability = 0.02
	}
}

# 唤醒仇恨：愤怒的洪流
country_event = {
	id = czd_event.50
	title = czd_event.50.t
	desc = czd_event.50.d
	picture = GFX_report_event_communist_army_rise # 或者是士兵冲锋的图
	
	is_triggered_only = yes
	
	option = {
		name = czd_event.50.a
		# 瞬间补充人力，代表民众踊跃参军
		add_manpower = 10000
		add_stability = 0.10
	}
}


# 苏联：朝鲜要求归还外满洲 (408, 409, 655)
country_event = {
	id = czd_diplomacy.6
	title = czd_diplomacy.6.t
	desc = czd_diplomacy.6.d
	picture = GFX_report_event_soviet_politicians
	
	is_triggered_only = yes
	
	# 选项A：同意归还 (90%几率)
	option = {
		name = czd_diplomacy.6.a
		ai_chance = { factor = 90 }
		
		# 割让土地给 CZD
		408 = { set_state_owner = CZD add_core_of = CZD } # 符拉迪沃斯托克
		409 = { set_state_owner = CZD add_core_of = CZD } # 阿穆尔/伯力
		655 = { set_state_owner = CZD add_core_of = CZD } # 北库页岛/大陆沿岸
		560 = { set_state_owner = CZD add_core_of = CZD } 
		561 = { set_state_owner = CZD add_core_of = CZD } 
		657 = { set_state_owner = CZD add_core_of = CZD } 
		
		# 给苏联一点补偿 (比如政治点或好感)
		add_political_power = 50
		add_opinion_modifier = { target = CZD modifier = CZD_positive_relation }
		
		# 通知 CZD 成功了
		CZD = { country_event = { id = czd_diplomacy.7 } }
	}
	
	# 选项B：拒绝 (10%几率)
	option = {
		name = czd_diplomacy.6.b
		ai_chance = { factor = 10 }
		
		# 关系破裂
		add_opinion_modifier = { target = CZD modifier = CZD_broken_relation }
		
		# 通知 CZD 失败了
		CZD = { country_event = { id = czd_diplomacy.8 } }
	}
}

# CZD：苏联同意了！
country_event = {
	id = czd_diplomacy.7
	title = czd_diplomacy.7.t
	desc = czd_diplomacy.7.d
	picture = GFX_report_event_agreement_signed
	is_triggered_only = yes
	
	option = {
		name = czd_diplomacy.7.a
		add_stability = 0.10
		# 再次确认核心 (双保险)
		add_state_core = 408
		add_state_core = 409
		add_state_core = 655
		add_state_core = 560
		add_state_core = 561
		add_state_core = 657
	}
}

# CZD：苏联拒绝了！
country_event = {
	id = czd_diplomacy.8
	title = czd_diplomacy.8.t
	desc = czd_diplomacy.8.d
	picture = GFX_report_event_soviet_tanks
	is_triggered_only = yes
	
	option = {
		name = czd_diplomacy.8.a
		# 设置苏联拒绝的flag
		set_country_flag = CZD_soviet_rejected_demands
		# 获得战争借口
		create_wargoal = {
			type = take_state
			target = SOV
			generator = { 408 409 655 560 561 657 }
		}
	}
}

# 北进令 - 对苏联、蒙古、唐努图瓦宣战
country_event = {
	id = czd_diplomacy.15
	title = czd_diplomacy.15.t
	desc = czd_diplomacy.15.d
	picture = GFX_report_event_soviet_tanks
	is_triggered_only = yes
	
	option = {
		name = czd_diplomacy.15.a
		add_war_support = 0.05
		add_stability = 0.03
		
		# 播放音效或其他效果
		effect_tooltip = {
			create_wargoal = {
				type = annex_everything
				target = SOV
			}
			create_wargoal = {
				type = annex_everything
				target = MON
			}
			create_wargoal = {
				type = annex_everything
				target = TAN
			}
		}
	}
}

# 财阀反抗暴动 - 社会主义改造后触发
# 根据完成的财阀国策数量，给予不同程度的负面效果
country_event = {
	id = czd_economy.1
	title = czd_economy.1.t
	desc = czd_economy.1.d
	picture = GFX_report_cjc_poster_1
	is_triggered_only = yes
	
	# 微弱反抗 - 完成1-2个财阀国策
	option = {
		name = czd_economy.1.a
		trigger = {
			check_variable = { CZD_zaibatsu_count < 3 }
		}
		add_timed_idea = {
			idea = CZD_zaibatsu_resistance_minor
			days = 365
		}
	}
	
	# 中等反抗 - 完成3-5个财阀国策
	option = {
		name = czd_economy.1.b
		trigger = {
			check_variable = { CZD_zaibatsu_count > 2 }
			check_variable = { CZD_zaibatsu_count < 6 }
		}
		add_timed_idea = {
			idea = CZD_zaibatsu_resistance_moderate
			days = 365
		}
	}
	
	# 严重反抗 - 完成6-8个财阀国策
	option = {
		name = czd_economy.1.c
		trigger = {
			check_variable = { CZD_zaibatsu_count > 5 }
		}
		add_timed_idea = {
			idea = CZD_zaibatsu_resistance_severe
			days = 365
		}
	}
}

# 朝鲜总督更迭：南次郎上任
country_event = {
	id = czd_event.60
	title = czd_event.60.t
	desc = czd_event.60.d
	picture = GFX_report_event_japanese_politics
	
	trigger = {
		tag = CZD
		is_subject_of = JAP        # 必须还是日本附庸
		has_country_leader = { character = 宇垣一成 } # 当前是宇垣一成
		date > 1936.8.1            # 时间到了8月
	}
	
	mean_time_to_happen = {
		days = 5 # 8月初很快就会发生
	}
	
	option = {
		name = czd_event.60.a
		
		# 1. 宇垣一成退休
		retire_character = 宇垣一成
		
		# 2. 招募并提拔南次郎
		recruit_character = 南次郎
		promote_character = 南次郎
		
		# 3. 增加一点法西斯支持率 (代表高压统治开始)
		add_popularity = { ideology = fascism popularity = 0.05 }
		
		# 4. 降低稳定度 (新官上任三把火，民众不安)
		add_stability = -0.05
	}
}

# ============================================================================
# 独立运动事件链 (czd_independence.*)
# ============================================================================
add_namespace = czd_independence

# 事件1：星星之火 - 思想启蒙的开端
country_event = {
	id = czd_independence.1
	title = czd_independence.1.t
	desc = czd_independence.1.d
	picture = GFX_report_event_election_vote
	
	is_triggered_only = yes
	
	option = {
		name = czd_independence.1.a
		# 增加共产主义支持
		add_popularity = { ideology = communism popularity = 0.05 }
		# 给日本方发送警告事件
		JAP = { country_event = { id = czd_independence.4 days = 3 } }
	}
	
	option = {
		name = czd_independence.1.b
		# 增加民主主义支持
		add_popularity = { ideology = democratic popularity = 0.05 }
		# 给日本方发送警告事件
		JAP = { country_event = { id = czd_independence.4 days = 3 } }
	}
}

# 事件2：全国总罢工 - 经济瘫痪与民族觉醒
country_event = {
	id = czd_independence.2
	title = czd_independence.2.t
	desc = czd_independence.2.d
	picture = GFX_report_cjc_generic_1
	
	is_triggered_only = yes
	
	option = {
		name = czd_independence.2.a
		# 降低稳定度
		add_stability = -0.10
		# 增加战争支持
		add_war_support = 0.05
		# 给日本方发送事件
		JAP = { country_event = { id = czd_independence.5 days = 1 } }
	}
}

# 事件3：革命抗日游行 - 人民怒火
country_event = {
	id = czd_independence.3
	title = czd_independence.3.t
	desc = czd_independence.3.d
	picture = GFX_report_event_civilian_protests
	
	is_triggered_only = yes
	
	option = {
		name = czd_independence.3.a
		# 增加战争支持
		add_war_support = 0.10
		# 降低稳定度
		add_stability = -0.05
		# 给日本方发送事件
		JAP = { country_event = { id = czd_independence.6 days = 1 } }
	}
}

# 事件4：日本收到情报 - 朝鲜地下活动
country_event = {
	id = czd_independence.4
	title = czd_independence.4.t
	desc = czd_independence.4.d
	picture = GFX_report_cjc_generic_5
	
	is_triggered_only = yes
	
	option = {
		name = czd_independence.4.a
		# 增加政治点数（加强监控）
		add_political_power = -25
		# 降低朝鲜的自治度
		CZD = { add_autonomy_ratio = { value = -0.02 localization = CZD_japanese_crackdown } }
	}
	
	option = {
		name = czd_independence.4.b
		# 忽视警告
		add_stability = -0.02
	}
}

# 事件5：日本收到消息 - 朝鲜爆发大罢工
country_event = {
	id = czd_independence.5
	title = czd_independence.5.t
	desc = czd_independence.5.d
	picture = GFX_report_cjc_poster_1
	
	is_triggered_only = yes
	
	option = {
		name = czd_independence.5.a
		# 派遣军队镇压
		add_political_power = -50
		CZD = { 
			add_stability = -0.05
			add_autonomy_ratio = { value = -0.03 localization = CZD_military_suppression }
		}
	}
	
	option = {
		name = czd_independence.5.b
		# 尝试谈判
		add_political_power = -25
		CZD = { add_stability = 0.03 }
	}
}

# 事件6：日本收到消息 - 朝鲜爆发大规模游行
country_event = {
	id = czd_independence.6
	title = czd_independence.6.t
	desc = czd_independence.6.d
	picture = GFX_report_event_civilian_protests
	
	is_triggered_only = yes
	
	option = {
		name = czd_independence.6.a
		# 武力镇压
		add_political_power = -30
		add_war_support = 0.02
		CZD = { 
			add_stability = -0.08
			add_war_support = 0.05
		}
	}
	
	option = {
		name = czd_independence.6.b
		# 软化态度
		add_stability = -0.03
		CZD = { 
			add_autonomy_ratio = { value = 0.02 localization = CZD_japanese_concession }
		}
	}
}

# ============================================================================
# 共产国际援军事件 (czd_comintern.*)
# ============================================================================
add_namespace = czd_comintern

# 事件1：苏联志愿军抵达
country_event = {
	id = czd_comintern.1
	title = czd_comintern.1.t
	desc = czd_comintern.1.d
	picture = GFX_report_event_soviet_tanks
	
	is_triggered_only = yes
	
	option = {
		name = czd_comintern.1.a
		# 生成4个苏联援助的步兵师
		random_owned_controlled_state = {
			limit = { is_core_of = CZD }
			create_unit = {
				division = "name = '国际纵队第1师' division_template = '朝鲜军步兵师' start_experience_factor = 0.6"
				owner = CZD
			}
			create_unit = {
				division = "name = '国际纵队第2师' division_template = '朝鲜军步兵师' start_experience_factor = 0.6"
				owner = CZD
			}
		}
		random_owned_controlled_state = {
			limit = { is_core_of = CZD }
			create_unit = {
				division = "name = '国际纵队第3师' division_template = '朝鲜军步兵师' start_experience_factor = 0.6"
				owner = CZD
			}
			create_unit = {
				division = "name = '国际纵队第4师' division_template = '朝鲜军步兵师' start_experience_factor = 0.6"
				owner = CZD
			}
		}
		
		# 额外赠送火炮装备
		add_equipment_to_stockpile = { type = artillery_equipment amount = 200 producer = SOV }
		
		# 提升战争支持
		add_war_support = 0.10
		
		# 苏联好感度提升
		add_opinion_modifier = { target = SOV modifier = CZD_comintern_gratitude }
	}
}


