###########################################################
# 核心圈国策自动执行事件
# 基于德国内圈机制，使用 activate_shine_on_focus 和 unlock_national_focus
###########################################################

add_namespace = czd_circle_auto

# 常量定义（天数）
# 国策 cost = 25 周 = 175 天
# flag 比事件多 1 天，以匹配倒计时显示
@inner_circle_time = 175
@inner_circle_time_flag = 176

# =========================================================
# 第一席：政治核心（崔庸健 / 朴宪永 / 南日）
# =========================================================

# ---------------------------------------------------------
# 崔庸健线 (事件 1, 100, 2, 101)
# ---------------------------------------------------------

# 崔庸健 - 开始执行第二个国策 (CZD_choe_yong_gon_primary)
country_event = {
	id = czd_circle_auto.1
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_choe_yong_gon_primary }
			}
			activate_shine_on_focus = CZD_choe_yong_gon_primary
			set_country_flag = { flag = CZD_choe_yong_gon_primary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.100 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 崔庸健第二国策完成
country_event = {
	id = czd_circle_auto.100
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_choe_yong_gon_primary
			}
			deactivate_shine_on_focus = CZD_choe_yong_gon_primary
			clr_country_flag = CZD_choe_yong_gon_primary_in_progress
			unlock_national_focus = CZD_choe_yong_gon_primary
			country_event = { id = czd_circle_auto.2 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 崔庸健 - 开始执行第三个国策 (CZD_choe_yong_gon_tertiary)
country_event = {
	id = czd_circle_auto.2
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_choe_yong_gon_tertiary }
			}
			activate_shine_on_focus = CZD_choe_yong_gon_tertiary
			set_country_flag = { flag = CZD_choe_yong_gon_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.101 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 崔庸健第三国策完成
country_event = {
	id = czd_circle_auto.101
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_choe_yong_gon_tertiary
			}
			deactivate_shine_on_focus = CZD_choe_yong_gon_tertiary
			clr_country_flag = CZD_choe_yong_gon_tertiary_in_progress
			unlock_national_focus = CZD_choe_yong_gon_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# ---------------------------------------------------------
# 朴宪永线 (事件 11, 110, 12, 111)
# ---------------------------------------------------------

# 朴宪永 - 开始执行第二个国策 (CZD_pak_hon_yong_primary)
country_event = {
	id = czd_circle_auto.11
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_pak_hon_yong_primary }
			}
			activate_shine_on_focus = CZD_pak_hon_yong_primary
			set_country_flag = { flag = CZD_pak_hon_yong_primary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.110 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 朴宪永第二国策完成
country_event = {
	id = czd_circle_auto.110
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_pak_hon_yong_primary
			}
			deactivate_shine_on_focus = CZD_pak_hon_yong_primary
			clr_country_flag = CZD_pak_hon_yong_primary_in_progress
			unlock_national_focus = CZD_pak_hon_yong_primary
			country_event = { id = czd_circle_auto.12 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 朴宪永 - 开始执行第三个国策 (CZD_pak_hon_yong_tertiary)
country_event = {
	id = czd_circle_auto.12
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_pak_hon_yong_tertiary }
			}
			activate_shine_on_focus = CZD_pak_hon_yong_tertiary
			set_country_flag = { flag = CZD_pak_hon_yong_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.111 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 朴宪永第三国策完成
country_event = {
	id = czd_circle_auto.111
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_pak_hon_yong_tertiary
			}
			deactivate_shine_on_focus = CZD_pak_hon_yong_tertiary
			clr_country_flag = CZD_pak_hon_yong_tertiary_in_progress
			unlock_national_focus = CZD_pak_hon_yong_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# ---------------------------------------------------------
# 南日线 (事件 21, 210, 22, 211)
# ---------------------------------------------------------

# 南日 - 开始执行第二个国策 (CZD_nam_il_primary)
country_event = {
	id = czd_circle_auto.21
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_nam_il_primary }
			}
			activate_shine_on_focus = CZD_nam_il_primary
			set_country_flag = { flag = CZD_nam_il_primary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.210 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 南日第二国策完成
country_event = {
	id = czd_circle_auto.210
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_nam_il_primary
			}
			deactivate_shine_on_focus = CZD_nam_il_primary
			clr_country_flag = CZD_nam_il_primary_in_progress
			unlock_national_focus = CZD_nam_il_primary
			country_event = { id = czd_circle_auto.22 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 南日 - 开始执行第三个国策 (CZD_nam_il_tertiary)
country_event = {
	id = czd_circle_auto.22
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_nam_il_tertiary }
			}
			activate_shine_on_focus = CZD_nam_il_tertiary
			set_country_flag = { flag = CZD_nam_il_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.211 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 南日第三国策完成
country_event = {
	id = czd_circle_auto.211
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_nam_il_tertiary
			}
			deactivate_shine_on_focus = CZD_nam_il_tertiary
			clr_country_flag = CZD_nam_il_tertiary_in_progress
			unlock_national_focus = CZD_nam_il_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# =========================================================
# 第二席：军事核心（崔贤 / 武亭 / 吴振宇）
# =========================================================

# ---------------------------------------------------------
# 崔贤线 (事件 31, 310, 32, 311)
# 国策触发：country_event = { id = czd_circle_auto.31 days = 1 }
# ---------------------------------------------------------

# 崔贤 - 开始执行第二个国策 (CZD_choe_hyon_primary)
country_event = {
	id = czd_circle_auto.31
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_choe_hyon_primary }
			}
			activate_shine_on_focus = CZD_choe_hyon_primary
			set_country_flag = { flag = CZD_choe_hyon_primary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.310 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 崔贤第二国策完成
country_event = {
	id = czd_circle_auto.310
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_choe_hyon_primary
			}
			deactivate_shine_on_focus = CZD_choe_hyon_primary
			clr_country_flag = CZD_choe_hyon_primary_in_progress
			unlock_national_focus = CZD_choe_hyon_primary
			country_event = { id = czd_circle_auto.32 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 崔贤 - 开始执行第三个国策 (CZD_choe_hyon_tertiary)
country_event = {
	id = czd_circle_auto.32
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_choe_hyon_tertiary }
			}
			activate_shine_on_focus = CZD_choe_hyon_tertiary
			set_country_flag = { flag = CZD_choe_hyon_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.311 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 崔贤第三国策完成
country_event = {
	id = czd_circle_auto.311
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_choe_hyon_tertiary
			}
			deactivate_shine_on_focus = CZD_choe_hyon_tertiary
			clr_country_flag = CZD_choe_hyon_tertiary_in_progress
			unlock_national_focus = CZD_choe_hyon_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# ---------------------------------------------------------
# 武亭线 (事件 41, 410, 42, 411)
# 国策触发：country_event = { id = czd_circle_auto.41 days = 1 }
# ---------------------------------------------------------

# 武亭 - 开始执行第二个国策 (CZD_mu_jeong_primary)
country_event = {
	id = czd_circle_auto.41
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_mu_jeong_primary }
			}
			activate_shine_on_focus = CZD_mu_jeong_primary
			set_country_flag = { flag = CZD_mu_jeong_primary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.410 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 武亭第二国策完成
country_event = {
	id = czd_circle_auto.410
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_mu_jeong_primary
			}
			deactivate_shine_on_focus = CZD_mu_jeong_primary
			clr_country_flag = CZD_mu_jeong_primary_in_progress
			unlock_national_focus = CZD_mu_jeong_primary
			country_event = { id = czd_circle_auto.42 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 武亭 - 开始执行第三个国策 (CZD_mu_jeong_tertiary)
country_event = {
	id = czd_circle_auto.42
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_mu_jeong_tertiary }
			}
			activate_shine_on_focus = CZD_mu_jeong_tertiary
			set_country_flag = { flag = CZD_mu_jeong_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.411 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 武亭第三国策完成
country_event = {
	id = czd_circle_auto.411
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_mu_jeong_tertiary
			}
			deactivate_shine_on_focus = CZD_mu_jeong_tertiary
			clr_country_flag = CZD_mu_jeong_tertiary_in_progress
			unlock_national_focus = CZD_mu_jeong_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# ---------------------------------------------------------
# 吴振宇线 (事件 51, 510, 52, 511)
# 国策触发：country_event = { id = czd_circle_auto.51 days = 1 }
# 国策ID: CZD_military_industry (第二国策), CZD_o_jin_u_tertiary (第三国策)
# ---------------------------------------------------------

# 吴振宇 - 开始执行第二个国策 (CZD_military_industry)
country_event = {
	id = czd_circle_auto.51
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_military_industry }
			}
			activate_shine_on_focus = CZD_military_industry
			set_country_flag = { flag = CZD_military_industry_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.510 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 吴振宇第二国策完成
country_event = {
	id = czd_circle_auto.510
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_military_industry
			}
			deactivate_shine_on_focus = CZD_military_industry
			clr_country_flag = CZD_military_industry_in_progress
			unlock_national_focus = CZD_military_industry
			country_event = { id = czd_circle_auto.52 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 吴振宇 - 开始执行第三个国策 (CZD_o_jin_u_tertiary)
country_event = {
	id = czd_circle_auto.52
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_o_jin_u_tertiary }
			}
			activate_shine_on_focus = CZD_o_jin_u_tertiary
			set_country_flag = { flag = CZD_o_jin_u_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.511 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 吴振宇第三国策完成
country_event = {
	id = czd_circle_auto.511
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_o_jin_u_tertiary
			}
			deactivate_shine_on_focus = CZD_o_jin_u_tertiary
			clr_country_flag = CZD_o_jin_u_tertiary_in_progress
			unlock_national_focus = CZD_o_jin_u_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# =========================================================
# 第三席：工业与参谋（金策 / 姜健）
# =========================================================

# ---------------------------------------------------------
# 金策线 (事件 61, 610, 62, 611)
# 国策触发：country_event = { id = czd_circle_auto.61 days = 1 }
# 国策ID: CZD_industrial_organization (第二国策), CZD_kim_chaek_tertiary (第三国策)
# ---------------------------------------------------------

# 金策 - 开始执行第二个国策 (CZD_industrial_organization)
country_event = {
	id = czd_circle_auto.61
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_industrial_organization }
			}
			activate_shine_on_focus = CZD_industrial_organization
			set_country_flag = { flag = CZD_industrial_organization_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.610 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 金策第二国策完成
country_event = {
	id = czd_circle_auto.610
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_industrial_organization
			}
			deactivate_shine_on_focus = CZD_industrial_organization
			clr_country_flag = CZD_industrial_organization_in_progress
			unlock_national_focus = CZD_industrial_organization
			country_event = { id = czd_circle_auto.62 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 金策 - 开始执行第三个国策 (CZD_kim_chaek_tertiary)
country_event = {
	id = czd_circle_auto.62
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_kim_chaek_tertiary }
			}
			activate_shine_on_focus = CZD_kim_chaek_tertiary
			set_country_flag = { flag = CZD_kim_chaek_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.611 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 金策第三国策完成
country_event = {
	id = czd_circle_auto.611
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_kim_chaek_tertiary
			}
			deactivate_shine_on_focus = CZD_kim_chaek_tertiary
			clr_country_flag = CZD_kim_chaek_tertiary_in_progress
			unlock_national_focus = CZD_kim_chaek_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# ---------------------------------------------------------
# 姜健线 (事件 71, 710, 72, 711)
# 国策触发：country_event = { id = czd_circle_auto.71 days = 1 }
# ---------------------------------------------------------

# 姜健 - 开始执行第二个国策 (CZD_kang_kon_primary)
country_event = {
	id = czd_circle_auto.71
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_kang_kon_primary }
			}
			activate_shine_on_focus = CZD_kang_kon_primary
			set_country_flag = { flag = CZD_kang_kon_primary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.710 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 姜健第二国策完成
country_event = {
	id = czd_circle_auto.710
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_kang_kon_primary
			}
			deactivate_shine_on_focus = CZD_kang_kon_primary
			clr_country_flag = CZD_kang_kon_primary_in_progress
			unlock_national_focus = CZD_kang_kon_primary
			country_event = { id = czd_circle_auto.72 days = 1 }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 姜健 - 开始执行第三个国策 (CZD_kang_kon_tertiary)
country_event = {
	id = czd_circle_auto.72
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = CZD_kang_kon_tertiary }
			}
			activate_shine_on_focus = CZD_kang_kon_tertiary
			set_country_flag = { flag = CZD_kang_kon_tertiary_in_progress days = @inner_circle_time_flag value = 1 }
			country_event = { id = czd_circle_auto.711 days = @inner_circle_time }
		}
	}
	
	option = { name = czd_circle_auto.a }
}

# 姜健第三国策完成
country_event = {
	id = czd_circle_auto.711
	hidden = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = CZD_kang_kon_tertiary
			}
			deactivate_shine_on_focus = CZD_kang_kon_tertiary
			clr_country_flag = CZD_kang_kon_tertiary_in_progress
			unlock_national_focus = CZD_kang_kon_tertiary
		}
	}
	
	option = { name = czd_circle_auto.a }
}
