# ============================================================================
# 妞诡剙鍘犻幀婵呭瘜娑斿鏂傚▽鑽ょ病濞村骸顒熺化鑽ょ埠 - 閼存碍婀伴崠鏍ㄦ櫏閺?
# ============================================================================

# ========== 閸掓繂顫愰崠鏍ㄦ杺濞岃崵绮″ù搴☆劅缁崵绮?==========
CZD_initialize_political_economy = {
	# 鐠佸墽鐤嗙化鑽ょ埠鐟欙綁鏀lag
	set_country_flag = CZD_political_economy_unlocked
	
	# 閸掓繂顫愰崠鏍病濞村孩鏂傜粵鏍у綁闁?(0-100, 50娑撹桨鑵戦梻?
	set_variable = { CZD_agriculture_policy = 45 }
	set_variable = { CZD_heavy_industry_policy = 45 }
	set_variable = { CZD_light_industry_policy = 50 }
	set_variable = { CZD_commerce_policy = 50 }
	set_variable = { CZD_military_economy_policy = 45 }
	set_variable = { CZD_military_policy = 45 }
	
	# 閸掓繂顫愰崠鏍ㄦ烦缁濂栭崫宥呭 (閸氬牐顓?00)
	set_variable = { CZD_yanan_influence = 25 }
	set_variable = { CZD_soviet_influence = 25 }
	set_variable = { CZD_kapsan_influence = 25 }
	set_variable = { CZD_domestic_influence = 25 }
	
	set_variable = { CZD_yanan_influence = 25 }
	set_variable = { CZD_soviet_influence = 25 }
	set_variable = { CZD_kapsan_influence = 25 }
	set_variable = { CZD_domestic_influence = 25 }
	
	# 閸掓繂顫愰崠鏍х暭閸嶆岸妯佺仦?(閸氬牐顓?00) - 鐢?_power 閸氬海绱戦惃鍕綁闁插繒鏁ゆ禍宥║I閺勫墽銇?
	set_variable = { CZD_petty_officials_power = 55 }
	set_variable = { CZD_technocrats_power = 20 }
	set_variable = { CZD_bureaucratic_bourgeoisie_power = 20 }
	set_variable = { CZD_power_core_power = 5 }
	
	# 閸氬本妞傞崚婵嗩潗閸栨牔绗夌敮锕€鎮楃紓鈧惃鍕綁闁插骏绱欓崗鐓庮啇閺冦儲绱?
	set_variable = { CZD_petty_officials = 55 }
	set_variable = { CZD_technocrats = 20 }
	set_variable = { CZD_bureaucratic_bourgeoisie = 20 }
	set_variable = { CZD_power_core = 5 }
	
	# 閸掓繂顫愰崠鏍︽叏濮濓絼瀵屾稊澶娾枆閼?
	set_variable = { CZD_revisionism_level = 30 }
	
	# 閸掓繂顫愰崠鏍病濞村骸鈧儳鎮?
	set_variable = { CZD_economic_tendency = 0 }
	
	# 閺囧瓨鏌婇幍鈧張澶嬫櫏閺?
	CZD_update_economic_effects = yes
}

# ========== 閺囧瓨鏌婇幍鈧張澶岀病濞村孩鏅ラ弸?- 缂佺厧鎮庣拫鍐暏 ==========
CZD_update_economic_effects = {
	# 1. 閺囧瓨鏌婄紒蹇旂ス閸╄櫣顢呴崝銊︹偓浣锋叏濮?
	CZD_update_economic_modifiers = yes
	
	# 2. 鐠侊紕鐣荤紒蹇旂ス閸婃儳鎮?
	CZD_calculate_economic_tendency = yes
	
	# 3. 閺囧瓨鏌婃稉濠傜湴瀵よ櫣鐡氶崝銊︹偓浣锋叏濮?
	CZD_update_political_modifiers = yes
	
	# 4. 閺囧瓨鏌婄€规ê鍎﹂梼璺虹湴
	CZD_update_bureaucracy = yes
	
	# 5. 鐠侊紕鐣绘穱顔筋劀娑撹绠熸繛浣藉剨
	CZD_calculate_revisionism = yes
	
	# 6. 鐠侯垳鍤庢稉宥呭晙閼奉亜濮╅崚鍥ㄥ床閿涘瞼鏁遍悳鈺侇啀閹靛濮╅柅澶嬪
	# CZD_determine_political_line = yes
	
	# 7. 鎼存梻鏁ゅ〒鍛婂灆閺佸牊鐏?
	CZD_apply_political_economy_effects = yes
}

# ========== 娑撴槒顓哥粻妤佹櫏閺?- 濮ｅ繑顐奸幐澶愭尦閻愮懓鍤崥搴ょ殶閻?==========
CZD_update_political_economy = {
	# 1. 閺囧瓨鏌婄紒蹇旂ス閸╄櫣顢呴崝銊︹偓浣锋叏濮?
	CZD_update_economic_modifiers = yes
	
	# 2. 鐠侊紕鐣荤紒蹇旂ス閸婃儳鎮?
	CZD_calculate_economic_tendency = yes
	
	# 3. 閺囧瓨鏌婃稉濠傜湴瀵よ櫣鐡氶崝銊︹偓浣锋叏濮?
	CZD_update_political_modifiers = yes
	
	# 4. 閺囧瓨鏌婄€规ê鍎﹂梼璺虹湴
	CZD_update_bureaucracy = yes
	
	# 5. 鐠侯垳鍤庢稉宥呭晙閼奉亜濮╅崚鍥ㄥ床閿涘瞼鏁遍悳鈺侇啀閹靛濮╅柅澶嬪
	# CZD_determine_political_line = yes
}

# ========== 閺囧瓨鏌婄紒蹇旂ス閸╄櫣顢呴崝銊︹偓浣锋叏濮?==========
CZD_update_economic_modifiers = {
	# 閸愭粈绗熼弨璺ㄧ摜 (0-100, 50娑撹桨鑵戦梻?
	# 瀹?0): 闂嗗棔缍嬮崠?- 娴滃搫濮?25%, 濞戝牐鍨傞崫?10%
	# 閸?100): 缁変焦婀侀崠?- 娴滃搫濮?25%, 濞戝牐鍨傞崫?10%
	set_variable = { CZD_econ_agriculture_pop_var = CZD_agriculture_policy }
	subtract_from_variable = { CZD_econ_agriculture_pop_var = 50 }
	multiply_variable = { CZD_econ_agriculture_pop_var = -0.005 }
	
	set_variable = { CZD_econ_agriculture_consumer_var = CZD_agriculture_policy }
	subtract_from_variable = { CZD_econ_agriculture_consumer_var = 50 }
	multiply_variable = { CZD_econ_agriculture_consumer_var = -0.002 }
	
	# 闁插秴浼愭稉姘杺缁?(0-100, 50娑撹桨鑵戦梻?
	# 瀹?0): 閸ヨ姤婀侀崠?- 閸愭稑浼?15%, 濮樻垹鏁?15%
	# 閸?100): 鐢倸婧€閸?- 閸愭稑浼?15%, 濮樻垹鏁?15%
	set_variable = { CZD_econ_heavy_military_var = CZD_heavy_industry_policy }
	subtract_from_variable = { CZD_econ_heavy_military_var = 50 }
	multiply_variable = { CZD_econ_heavy_military_var = -0.003 }
	
	set_variable = { CZD_econ_heavy_civilian_var = CZD_heavy_industry_policy }
	subtract_from_variable = { CZD_econ_heavy_civilian_var = 50 }
	multiply_variable = { CZD_econ_heavy_civilian_var = 0.003 }
	
	# 鏉炶浼愭稉姘杺缁?(0-100, 50娑撹桨鑵戦梻?
	# 瀹?0): 鐠佲€冲灊缂佸繑绁?- 瀵ゆ椽鈧娀鈧喎瀹?20%, 娴溠冨毉-20%
	# 閸?100): 鐢倸婧€缂佸繑绁?- 瀵ゆ椽鈧娀鈧喎瀹?20%, 娴溠冨毉+20%
	set_variable = { CZD_econ_light_build_var = CZD_light_industry_policy }
	subtract_from_variable = { CZD_econ_light_build_var = 50 }
	multiply_variable = { CZD_econ_light_build_var = -0.004 }
	
	set_variable = { CZD_econ_light_output_var = CZD_light_industry_policy }
	subtract_from_variable = { CZD_econ_light_output_var = 50 }
	multiply_variable = { CZD_econ_light_output_var = 0.004 }
	
	# 閸熷棔绗熼弨璺ㄧ摜 (0-100, 50娑撹桨鑵戦梻?
	# 瀹?0): 閸ュ€熸儉閸ㄥ嫭鏌?- 鐠у嫭绨?20%, 鐠愬憡妲?20%
	# 閸?100): 閼奉亞鏁辩敮鍌氭簚 - 鐠у嫭绨?20%, 鐠愬憡妲?20%
	set_variable = { CZD_econ_commerce_resource_var = CZD_commerce_policy }
	subtract_from_variable = { CZD_econ_commerce_resource_var = 50 }
	multiply_variable = { CZD_econ_commerce_resource_var = -0.004 }
	
	set_variable = { CZD_econ_commerce_trade_var = CZD_commerce_policy }
	subtract_from_variable = { CZD_econ_commerce_trade_var = 50 }
	multiply_variable = { CZD_econ_commerce_trade_var = 0.004 }
	
	# 閸愭稐绨ㄧ紒蹇旂ス閺€璺ㄧ摜 (0-100, 50娑撹桨鑵戦梻?
	# 瀹?0): 閸愭稑浼愭导妯哄帥 - 闂勫棗鍟楃紒鍕矏鎼?15%, 缁嬪啿鐣?15%
	# 閸?100): 濮樻垹鏁ゆ导妯哄帥 - 闂勫棗鍟楃紒鍕矏鎼?15%, 缁嬪啿鐣?15%
	set_variable = { CZD_econ_military_army_var = CZD_military_policy }
	subtract_from_variable = { CZD_econ_military_army_var = 50 }
	multiply_variable = { CZD_econ_military_army_var = -0.003 }
	
	set_variable = { CZD_econ_military_stability_var = CZD_military_policy }
	subtract_from_variable = { CZD_econ_military_stability_var = 50 }
	multiply_variable = { CZD_econ_military_stability_var = 0.003 }
}

# ========== 鐠侊紕鐣荤紒蹇旂ス閸婃儳鎮?==========
# 缁犳纭? 鏉炶浼愭稉姘嫲閸熷棔绗熼弶鍐櫢閺囨潙銇?
# 缂佸繑绁归崐鎯ф倻 = 閸愭粈绗?0.15 + 闁插秴浼愭稉?0.15 + 鏉炶浼愭稉?0.25 + 閸熷棔绗?0.25 + 閸愭稐绨?0.20 - 50
# 缂佹挻鐏夐懠鍐ㄦ纯: -50 (閺嬩礁涔忕拋鈥冲灊缂佸繑绁? 閸?+50 (閺嬩礁褰哥敮鍌氭簚缂佸繑绁?
CZD_calculate_economic_tendency = {
	# 閸掓繂顫愰崠?
	set_variable = { CZD_economic_tendency = 0 }
	
	# 閸愭粈绗?(閺夊啴鍣?5%)
	set_variable = { CZD_temp_calc = CZD_agriculture_policy }
	multiply_variable = { CZD_temp_calc = 0.15 }
	add_to_variable = { CZD_economic_tendency = CZD_temp_calc }
	
	# 闁插秴浼愭稉?(閺夊啴鍣?5%)
	set_variable = { CZD_temp_calc = CZD_heavy_industry_policy }
	multiply_variable = { CZD_temp_calc = 0.15 }
	add_to_variable = { CZD_economic_tendency = CZD_temp_calc }
	
	# 鏉炶浼愭稉?(閺夊啴鍣?5% - 閺囨潙銇囪ぐ鍗炴惙)
	set_variable = { CZD_temp_calc = CZD_light_industry_policy }
	multiply_variable = { CZD_temp_calc = 0.25 }
	add_to_variable = { CZD_economic_tendency = CZD_temp_calc }
	
	# 閸熷棔绗?(閺夊啴鍣?5% - 閺囨潙銇囪ぐ鍗炴惙)
	set_variable = { CZD_temp_calc = CZD_commerce_policy }
	multiply_variable = { CZD_temp_calc = 0.25 }
	add_to_variable = { CZD_economic_tendency = CZD_temp_calc }
	
	# 閸愭稐绨?(閺夊啴鍣?0%)
	set_variable = { CZD_temp_calc = CZD_military_policy }
	multiply_variable = { CZD_temp_calc = 0.20 }
	add_to_variable = { CZD_economic_tendency = CZD_temp_calc }
	
	# 閸戝繐骞?0瀵版鍩?-50 閸?+50 閻ㄥ嫯瀵栭崶?
	subtract_from_variable = { CZD_economic_tendency = 50 }
	
	# 閸ユ稖鍨楁禍鏂垮弳閸掔増鏆ｉ弫?
	round_variable = CZD_economic_tendency
}

# ========== 閺囧瓨鏌婃稉濠傜湴瀵よ櫣鐡氶崝銊︹偓浣锋叏濮?==========
CZD_update_political_modifiers = {
	# 瀵よ泛鐣ㄥú鎯у閸?(0-100)
	# 閺€鎸庝笉閻愯鏆? 0閸?0.15
	set_variable = { CZD_pol_yanan_pp_var = CZD_yanan_influence }
	multiply_variable = { CZD_pol_yanan_pp_var = 0.0015 }
	# 閹板繗鐦戣ぐ銏♀偓浣圭磽缁夊妲诲? 0閸?0.20
	set_variable = { CZD_pol_yanan_drift_var = CZD_yanan_influence }
	multiply_variable = { CZD_pol_yanan_drift_var = 0.002 }
	
	# 閼诲繗浠堝ú鎯у閸?(0-100)
	# 缁夋垹鐖洪柅鐔峰: 0閸?0.10
	set_variable = { CZD_pol_soviet_research_var = CZD_soviet_influence }
	multiply_variable = { CZD_pol_soviet_research_var = 0.001 }
	
	# 閻㈡彃鍖楀ú鎯у閸?(0-100)
	# 閹跺灚濮夐崝娑楁縺鐎? 0閸?0.20
	set_variable = { CZD_pol_kapsan_resistance_var = CZD_kapsan_influence }
	multiply_variable = { CZD_pol_kapsan_resistance_var = 0.002 }
	# 婢诡偅鐨? 0閸?0.10
	set_variable = { CZD_pol_kapsan_morale_var = CZD_kapsan_influence }
	multiply_variable = { CZD_pol_kapsan_morale_var = 0.001 }
	
	# 閸ヨ棄鍞村ú鎯у閸?(0-100)
	# 缁嬪啿鐣? 0閸?0.10
	set_variable = { CZD_pol_domestic_stability_var = CZD_domestic_influence }
	multiply_variable = { CZD_pol_domestic_stability_var = 0.001 }
	# 瀵ゆ椽鈧娀鈧喎瀹? 0閸?0.10
	set_variable = { CZD_pol_domestic_build_var = CZD_domestic_influence }
	multiply_variable = { CZD_pol_domestic_build_var = 0.001 }
	
	# 鐎规ê鍎﹂梼璺虹湴瑜板崬鎼?
	# 閸╁搫鐪伴獮鏌ュ劥 - 瀵颁礁鍙? 0閸?0.10
	set_variable = { CZD_pol_petty_conscript_var = CZD_petty_officials }
	multiply_variable = { CZD_pol_petty_conscript_var = 0.001 }
	
	# 閹垛偓閺堫垰鐣奸崓?- 閺佸牏宸? 0閸?0.15
	set_variable = { CZD_pol_technocrat_efficiency_var = CZD_technocrats }
	multiply_variable = { CZD_pol_technocrat_efficiency_var = 0.0015 }
	
	# 鐎规ê鍎︾挧鍕獓闂冨墎楠?- 閺€鎸庝笉閻愯鏆? 0閸?0.10
	set_variable = { CZD_pol_bourgeois_pp_var = CZD_bureaucratic_bourgeoisie }
	multiply_variable = { CZD_pol_bourgeois_pp_var = 0.001 }
}

# ========== 濞撳懘娅庨幍鈧張澶庣熅缁剧浮lag ==========
CZD_clear_all_line_flags = {
	clr_country_flag = CZD_current_line_proletariat
	clr_country_flag = CZD_current_line_democracy
	clr_country_flag = CZD_current_line_technocracy
	clr_country_flag = CZD_current_line_revisionism
	clr_country_flag = CZD_current_line_militarism
	clr_country_flag = CZD_current_line_bureaucratic
	clr_country_flag = CZD_current_line_syndicalism
}

# ========== 閹靛濮╅崚鍥ㄥ床鐠侯垳鍤庨弫鍫熺亯 ==========
CZD_select_line_proletariat = {
	CZD_clear_all_line_flags = yes
	set_country_flag = CZD_current_line_proletariat
	set_variable = { CZD_current_line_id = 1 }
	set_country_flag = { flag = CZD_line_change_cooldown days = 90 value = 1 }
	CZD_apply_political_economy_effects = yes
}

CZD_select_line_democracy = {
	CZD_clear_all_line_flags = yes
	set_country_flag = CZD_current_line_democracy
	set_variable = { CZD_current_line_id = 2 }
	set_country_flag = { flag = CZD_line_change_cooldown days = 90 value = 1 }
	CZD_apply_political_economy_effects = yes
}

CZD_select_line_technocracy = {
	CZD_clear_all_line_flags = yes
	set_country_flag = CZD_current_line_technocracy
	set_variable = { CZD_current_line_id = 3 }
	set_country_flag = { flag = CZD_line_change_cooldown days = 90 value = 1 }
	CZD_apply_political_economy_effects = yes
}

CZD_select_line_revisionism = {
	CZD_clear_all_line_flags = yes
	set_country_flag = CZD_current_line_revisionism
	set_variable = { CZD_current_line_id = 4 }
	set_country_flag = { flag = CZD_line_change_cooldown days = 90 value = 1 }
	CZD_apply_political_economy_effects = yes
}

CZD_select_line_militarism = {
	CZD_clear_all_line_flags = yes
	set_country_flag = CZD_current_line_militarism
	set_variable = { CZD_current_line_id = 5 }
	set_country_flag = { flag = CZD_line_change_cooldown days = 90 value = 1 }
	CZD_apply_political_economy_effects = yes
}

CZD_select_line_bureaucratic = {
	CZD_clear_all_line_flags = yes
	set_country_flag = CZD_current_line_bureaucratic
	set_variable = { CZD_current_line_id = 6 }
	set_country_flag = { flag = CZD_line_change_cooldown days = 90 value = 1 }
	CZD_apply_political_economy_effects = yes
}

CZD_select_line_syndicalism = {
	CZD_clear_all_line_flags = yes
	set_country_flag = CZD_current_line_syndicalism
	set_variable = { CZD_current_line_id = 7 }
	set_country_flag = { flag = CZD_line_change_cooldown days = 90 value = 1 }
	CZD_apply_political_economy_effects = yes
}

# ========== 閸掋倕鐣捐ぐ鎾冲閺€鎸庝笉鐠侯垳鍤庨敍鍫滅矌閻劋绨崚婵嗩潗閸栨牭绱?==========
# 缂佺厧鎮庣紒蹇旂ス閸婃儳鎮滈崪灞肩瑐鐏炲倸缂撶粵鎴炴殶閸婄厧鍨界€规碍娓剁紒鍫ｇ熅缁?
CZD_determine_political_line = {
	# 濞撳懘娅庨幍鈧張澶庣熅缁剧浮lag
	clr_country_flag = CZD_current_line_proletariat
	clr_country_flag = CZD_current_line_democracy
	clr_country_flag = CZD_current_line_technocracy
	clr_country_flag = CZD_current_line_revisionism
	clr_country_flag = CZD_current_line_militarism
	clr_country_flag = CZD_current_line_bureaucratic
	clr_country_flag = CZD_current_line_syndicalism
	
	# 鐠侊紕鐣荤紒鐓庢値閺€鎸庝笉閸婃儳鎮滈崐?
	# 閸╄櫣顢?= 缂佸繑绁归崐鎯ф倻 (-50 閸?+50)
	set_variable = { CZD_political_score = CZD_economic_tendency }
	
	# 瀵よ泛鐣ㄥú鎯у閸?- 閹恒劌鎮滃锔捐€?
	set_variable = { CZD_temp_calc = CZD_yanan_influence }
	subtract_from_variable = { CZD_temp_calc = 25 }
	multiply_variable = { CZD_temp_calc = -0.3 }
	add_to_variable = { CZD_political_score = CZD_temp_calc }
	
	# 閼诲繗浠堝ú鎯у閸?- 閹恒劌鎮滃锔捐€冩担鍡椾焊閹垛偓閺?
	set_variable = { CZD_temp_calc = CZD_soviet_influence }
	subtract_from_variable = { CZD_temp_calc = 25 }
	multiply_variable = { CZD_temp_calc = -0.2 }
	add_to_variable = { CZD_political_score = CZD_temp_calc }
	
	# 閸ヨ棄鍞村ú鎯у閸?- 閹恒劌鎮滄稉顓㈡？閸嬪繐褰?
	set_variable = { CZD_temp_calc = CZD_domestic_influence }
	subtract_from_variable = { CZD_temp_calc = 25 }
	multiply_variable = { CZD_temp_calc = 0.2 }
	add_to_variable = { CZD_political_score = CZD_temp_calc }
	
	# 閸掋倕鐣剧捄顖滃殠 (閹稿绱崗鍫㈤獓閿涘本娣崇化缁樻蒋娴犺埖娲挎稉銉︾壐閿涙俺顩﹀Ч鍌濐嚉濞插墽閮村В鏂垮従娴犳牔绗佸ú楣冨厴婢?
	
	# 1. 閸愭稑娴楁稉璁崇疅: 閸愭稐绨ㄧ紒蹇旂ス<30 娑?閻㈡彃鍖楀ú鍙ヨ礋婢舵碍鏆熷ú?
	if = {
		limit = {
			check_variable = { CZD_military_policy < 30 }
			check_variable = { CZD_kapsan_influence > CZD_yanan_influence }
			check_variable = { CZD_kapsan_influence > CZD_soviet_influence }
			check_variable = { CZD_kapsan_influence > CZD_domestic_influence }
		}
		set_country_flag = CZD_current_line_militarism
		set_variable = { CZD_current_line_id = 5 }
	}
	# 2. 鐎规ê鍎︾挧鍕獓闂冨墎楠囨稉鎾存杺: 鐎规ê鍎︾挧鍕獓闂冨墎楠?40 娑?缂佸繑绁归崐鎯ф倻>15 娑?閸ヨ棄鍞村ú鍙ヨ礋婢舵碍鏆熷ú?
	else_if = {
		limit = {
			check_variable = { CZD_bureaucratic_bourgeoisie > 40 }
			check_variable = { CZD_political_score > 15 }
			check_variable = { CZD_domestic_influence > CZD_yanan_influence }
			check_variable = { CZD_domestic_influence > CZD_soviet_influence }
			check_variable = { CZD_domestic_influence > CZD_kapsan_influence }
		}
		set_country_flag = CZD_current_line_bureaucratic
		set_variable = { CZD_current_line_id = 6 }
	}
	# 3. 娣囶喗顒滄稉璁崇疅(娴犮儳绮″ù搴″絺鐏炴洑璐熸稉顓炵妇): 缂佸繑绁归崐鎯ф倻>20 娑?閺冪姵妲戦弰鐐烦缁瀵岀€?
	else_if = {
		limit = {
			check_variable = { CZD_political_score > 20 }
		}
		set_country_flag = CZD_current_line_revisionism
		set_variable = { CZD_current_line_id = 4 }
	}
	# 4. 閹垛偓閺堫垰鐣奸崓姘瘜鐎? 閹垛偓閺堫垰鐣奸崓?45 娑?閼诲繗浠堝ú鍙ヨ礋婢舵碍鏆熷ú?
	else_if = {
		limit = {
			check_variable = { CZD_technocrats > 45 }
			check_variable = { CZD_soviet_influence > CZD_yanan_influence }
			check_variable = { CZD_soviet_influence > CZD_kapsan_influence }
			check_variable = { CZD_soviet_influence > CZD_domestic_influence }
		}
		set_country_flag = CZD_current_line_technocracy
		set_variable = { CZD_current_line_id = 3 }
	}
	# 5. 瀹搞儱娲熸稉璁崇疅: 鏉炶浼愭稉?閸熷棔绗熼獮鍐叉綆>60 娑?缂佸繑绁归崐鎯ф倻閸?10閸?10娑斿妫?娑?閸ヨ棄鍞村ú鍙ヨ礋婢舵碍鏆熷ú?
	else_if = {
		limit = {
			check_variable = { CZD_light_industry_policy > 55 }
			check_variable = { CZD_commerce_policy > 55 }
			check_variable = { CZD_political_score > -10 }
			check_variable = { CZD_political_score < 10 }
			check_variable = { CZD_domestic_influence > CZD_yanan_influence }
			check_variable = { CZD_domestic_influence > CZD_soviet_influence }
			check_variable = { CZD_domestic_influence > CZD_kapsan_influence }
		}
		set_country_flag = CZD_current_line_syndicalism
		set_variable = { CZD_current_line_id = 7 }
	}
	# 6. 閺冪姳楠囬梼鍓侀獓娑撴挻鏂? 缂佸繑绁归崐鎯ф倻<-20 娑?瀵よ泛鐣ㄥú鍙ヨ礋婢舵碍鏆熷ú?
	else_if = {
		limit = {
			check_variable = { CZD_political_score < -20 }
			check_variable = { CZD_yanan_influence > CZD_soviet_influence }
			check_variable = { CZD_yanan_influence > CZD_kapsan_influence }
			check_variable = { CZD_yanan_influence > CZD_domestic_influence }
		}
		set_country_flag = CZD_current_line_proletariat
		set_variable = { CZD_current_line_id = 1 }
	}
	# 7. 娴滅儤鐨鎴滃瘜娑撴挻鏂? 姒涙顓绘稉顓㈡？鐠侯垳鍤?
	else = {
		set_country_flag = CZD_current_line_democracy
		set_variable = { CZD_current_line_id = 2 }
	}
}

# ========== 閸掓繂顫愰崠鏍ㄦ杺濞岃崵绮″ù搴☆劅閸欐﹢鍣?==========
	CZD_update_bureaucracy = yes
	
	# 鐠侊紕鐣绘穱顔筋劀娑撹绠熸繛浣藉剨
	CZD_calculate_revisionism = yes
	
	# 鎼存梻鏁ゅ〒鍛婂灆閺佸牊鐏?
	CZD_apply_political_economy_effects = yes
}

# 缂佸繑绁归崺铏诡攨瑜板崬鎼锋稉濠傜湴瀵よ櫣鐡氶敍鍫熸烦缁紮绱?
CZD_economic_base_affects_factions = {
	# 閸愭粈绗熼弨璺ㄧ摜瑜板崬鎼?
	# 闂嗗棔缍嬮崠鏍р偓鎯ф倻閸掆晙绨璺虹暔濞叉儳鎷伴崶钘夊敶濞?
	if = {
		limit = { check_variable = { CZD_agriculture_policy < -2 } }
		add_to_variable = { CZD_yanan_influence = 0.5 }
		add_to_variable = { CZD_domestic_influence = 0.3 }
		subtract_from_variable = { CZD_soviet_influence = 0.3 }
	}
	# 缁変焦婀侀崠鏍р偓鎯ф倻閸掆晙绨懟蹇氫粓濞叉拝绱欐穱顔筋劀娑撹绠熼敍?
	if = {
		limit = { check_variable = { CZD_agriculture_policy > 2 } }
		add_to_variable = { CZD_soviet_influence = 0.5 }
		subtract_from_variable = { CZD_yanan_influence = 0.3 }
		subtract_from_variable = { CZD_kapsan_influence = 0.2 }
	}
	
	# 闁插秴浼愭稉姘杺缁涙牕濂栭崫?
	# 閸ヨ姤婀侀崠鏍у焺娴滃氦瀚冮懕鏃€娣抽敍鍫熸焿婢堆勭亜濡€崇础閿?
	if = {
		limit = { check_variable = { CZD_heavy_industry_policy < -2 } }
		add_to_variable = { CZD_soviet_influence = 0.5 }
		add_to_variable = { CZD_kapsan_influence = 0.2 }
	}
	# 鐢倸婧€閸栨牕鍩勬禍搴℃禇閸愬懏娣抽崪灞惧Η閺堫垰鐣奸崓?
	if = {
		limit = { check_variable = { CZD_heavy_industry_policy > 2 } }
		add_to_variable = { CZD_domestic_influence = 0.5 }
		subtract_from_variable = { CZD_soviet_influence = 0.3 }
	}
	
	# 閸愭盯妲﹂弨璺ㄧ摜瑜板崬鎼?
	# 娴滅儤鐨崘娑㈡Е閸掆晙绨璺虹暔濞?
	if = {
		limit = { check_variable = { CZD_military_policy < -2 } }
		add_to_variable = { CZD_yanan_influence = 0.5 }
		add_to_variable = { CZD_kapsan_influence = 0.3 }
	}
	# 閼卞奔绗熼崘娑㈡Е閸掆晙绨懟蹇氫粓濞?
	if = {
		limit = { check_variable = { CZD_military_policy > 2 } }
		add_to_variable = { CZD_soviet_influence = 0.5 }
		subtract_from_variable = { CZD_yanan_influence = 0.3 }
	}
	
	# 绾喕绻氬ú鍓ч兇瑜板崬鎼烽崝娑樻躬0-100娑斿妫?
	clamp_variable = { var = CZD_yanan_influence min = 0 max = 100 }
	clamp_variable = { var = CZD_soviet_influence min = 0 max = 100 }
	clamp_variable = { var = CZD_kapsan_influence min = 0 max = 100 }
	clamp_variable = { var = CZD_domestic_influence min = 0 max = 100 }
	
	# 瑜版帊绔撮崠鏍电礄閹鎷版穱婵囧瘮100閿?
	CZD_normalize_factions = yes
}

# 濞插墽閮磋ぐ鍗炴惙閸旀稑缍婃稉鈧崠?
CZD_normalize_factions = {
	set_variable = { CZD_faction_total = 0 }
	add_to_variable = { CZD_faction_total = CZD_yanan_influence }
	add_to_variable = { CZD_faction_total = CZD_soviet_influence }
	add_to_variable = { CZD_faction_total = CZD_kapsan_influence }
	add_to_variable = { CZD_faction_total = CZD_domestic_influence }
	
	if = {
		limit = { check_variable = { CZD_faction_total > 0 } }
		set_variable = { CZD_normalize_factor = 100 }
		divide_variable = { CZD_normalize_factor = CZD_faction_total }
		
		multiply_variable = { CZD_yanan_influence = CZD_normalize_factor }
		multiply_variable = { CZD_soviet_influence = CZD_normalize_factor }
		multiply_variable = { CZD_kapsan_influence = CZD_normalize_factor }
		multiply_variable = { CZD_domestic_influence = CZD_normalize_factor }
	}
}

# 閺囧瓨鏌婄€规ê鍎﹂梼璺虹湴
CZD_update_bureaucracy = {
	# 妫ｆ牕鍘涙禒搴濈瑝鐢箑鎮楃紓鈧惃鍕綁闁插繐鎮撳銉ュ煂鐢箑鎮楃紓鈧惃鍕綁闁?
	# 鏉╂瑦鐗遍梼鍓侀獓閺傛ぞ绨ょ粵澶夌皑娴犳湹鎱ㄩ弨鍦畱閸欐﹢鍣洪崣顖欎簰閸氬本顒為崚鐧嶶I閺勫墽銇?
	set_variable = { CZD_petty_officials_power = CZD_petty_officials }
	set_variable = { CZD_technocrats_power = CZD_technocrats }
	set_variable = { CZD_bureaucratic_bourgeoisie_power = CZD_bureaucratic_bourgeoisie }
	set_variable = { CZD_power_core_power = CZD_power_core }
	
	# 缂佸繑绁归崣鍐测偓鎯у焺娴滃骸鐣奸崓姘崇カ娴溠囨▉缁?
	if = {
		limit = { check_variable = { CZD_economic_tendency > 1 } }
		add_to_variable = { CZD_bureaucratic_bourgeoisie_power = 0.5 }
		add_to_variable = { CZD_technocrats_power = 0.3 }
		subtract_from_variable = { CZD_petty_officials_power = 0.3 }
		subtract_from_variable = { CZD_power_core_power = 0.2 }
	}
	
	# 缂佸繑绁瑰锕€鈧儳鍩勬禍搴㈢壋韫囧啯娼堥崝娑樼湴閸滃苯鐨崥?
	if = {
		limit = { check_variable = { CZD_economic_tendency < -1 } }
		add_to_variable = { CZD_power_core_power = 0.5 }
		add_to_variable = { CZD_petty_officials_power = 0.3 }
		subtract_from_variable = { CZD_bureaucratic_bourgeoisie_power = 0.5 }
		subtract_from_variable = { CZD_technocrats_power = 0.2 }
	}
	
	# 闁插秴浼愭稉姘絺鐏炴洖鍩勬禍搴㈠Η閺堫垰鐣奸崓?
	if = {
		limit = { check_variable = { CZD_heavy_industry_policy < -1 } }
		add_to_variable = { CZD_technocrats_power = 0.3 }
	}
	
	# 绾喕绻氶崷?-100娑斿妫?
	clamp_variable = { var = CZD_petty_officials_power min = 5 max = 60 }
	clamp_variable = { var = CZD_technocrats_power min = 5 max = 50 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie_power min = 0 max = 85 }
	clamp_variable = { var = CZD_power_core_power min = 10 max = 60 }
	
	# 瑜版帊绔撮崠?
	CZD_normalize_bureaucracy = yes
	
	# 检测官僚资产阶级危机
	CZD_check_bureaucracy_crisis = yes
}

# 鐎规ê鍎﹂梼璺虹湴瑜版帊绔撮崠?
CZD_normalize_bureaucracy = {
	set_variable = { CZD_bureaucracy_total = 0 }
	add_to_variable = { CZD_bureaucracy_total = CZD_petty_officials_power }
	add_to_variable = { CZD_bureaucracy_total = CZD_technocrats_power }
	add_to_variable = { CZD_bureaucracy_total = CZD_bureaucratic_bourgeoisie_power }
	add_to_variable = { CZD_bureaucracy_total = CZD_power_core_power }
	
	if = {
		limit = { check_variable = { CZD_bureaucracy_total > 0 } }
		set_variable = { CZD_bureaucracy_normalize = 100 }
		divide_variable = { CZD_bureaucracy_normalize = CZD_bureaucracy_total }
		
		multiply_variable = { CZD_petty_officials_power = CZD_bureaucracy_normalize }
		multiply_variable = { CZD_technocrats_power = CZD_bureaucracy_normalize }
		multiply_variable = { CZD_bureaucratic_bourgeoisie_power = CZD_bureaucracy_normalize }
		multiply_variable = { CZD_power_core_power = CZD_bureaucracy_normalize }
	}
	
	# 鐏忓棗鐢崥搴ｇ磻閻ㄥ嫬褰夐柌蹇撴倱濮濄儱娲栨稉宥呯敨閸氬海绱戦惃鍕綁闁插骏绱欐穱婵囧瘮閸欏苯鎮滈崥灞绢劄閿?
	set_variable = { CZD_petty_officials = CZD_petty_officials_power }
	set_variable = { CZD_technocrats = CZD_technocrats_power }
	set_variable = { CZD_bureaucratic_bourgeoisie = CZD_bureaucratic_bourgeoisie_power }
	set_variable = { CZD_power_core = CZD_power_core_power }
}

# 鐠侊紕鐣绘穱顔筋劀娑撹绠熸繛浣藉剨
CZD_calculate_revisionism = {
	set_variable = { CZD_revisionism_level = 10 }
	
	# 缂佸繑绁归崣鍐测偓鎯ь杻閸旂姳鎱ㄥ锝勫瘜娑斿鈻夐懗?
	if = {
		limit = { check_variable = { CZD_economic_tendency > 0 } }
		set_variable = { CZD_temp_revisionism = CZD_economic_tendency }
		multiply_variable = { CZD_temp_revisionism = 5 }
		add_to_variable = { CZD_revisionism_level = CZD_temp_revisionism }
	}
	
	# 鐎规ê鍎︾挧鍕獓闂冨墎楠囨晶鐐插娣囶喗顒滄稉璁崇疅婵炰浇鍎?
	set_variable = { CZD_temp_bourgeoisie = CZD_bureaucratic_bourgeoisie_power }
	multiply_variable = { CZD_temp_bourgeoisie = 0.5 }
	add_to_variable = { CZD_revisionism_level = CZD_temp_bourgeoisie }
	
	# 閼诲繗浠堝ú鎹愮箖瀵搫顤冮崝鐘辨叏濮濓絼瀵屾稊澶娾枆閼充緤绱欑挧顐︾灳閺呮挸銇嬫穱顔筋劀娑撹绠熼敍?
	if = {
		limit = { check_variable = { CZD_soviet_influence > 40 } }
		set_variable = { CZD_temp_soviet = CZD_soviet_influence }
		subtract_from_variable = { CZD_temp_soviet = 40 }
		multiply_variable = { CZD_temp_soviet = 0.3 }
		add_to_variable = { CZD_revisionism_level = CZD_temp_soviet }
	}
	
	# 瀵よ泛鐣ㄥú鎯ф嫲閻㈡彃鍖楀ú鎯у櫤鐏忔垳鎱ㄥ锝勫瘜娑斿鈻夐懗?
	set_variable = { CZD_temp_anti_rev = CZD_yanan_influence }
	add_to_variable = { CZD_temp_anti_rev = CZD_kapsan_influence }
	multiply_variable = { CZD_temp_anti_rev = 0.1 }
	subtract_from_variable = { CZD_revisionism_level = CZD_temp_anti_rev }
	
	# 閺嶇绺鹃弶鍐ㄥ鐏炲倸鍣虹亸鎴滄叏濮濓絼瀵屾稊澶娾枆閼?
	set_variable = { CZD_temp_core = CZD_power_core_power }
	multiply_variable = { CZD_temp_core = 0.15 }
	subtract_from_variable = { CZD_revisionism_level = CZD_temp_core }
	
	clamp_variable = { var = CZD_revisionism_level min = 0 max = 100 }
}

# 鎼存梻鏁ゅ〒鍛婂灆閺佸牊鐏?
CZD_apply_political_economy_effects = {
	# 缁夊娅庨弮褎鏅ラ弸婊愮礄娴犲懎缍嬮幏銉︽箒閺冭埖澧犵粔濠氭珟閿涘矂浼╅崗宄祇oltip閺勫墽銇氭稉宥呯箑鐟曚胶娈戞穱鈩冧紖閿?
	if = {
		limit = { has_idea = CZD_political_economy_leftist }
		remove_ideas = CZD_political_economy_leftist
	}
	if = {
		limit = { has_idea = CZD_political_economy_centrist }
		remove_ideas = CZD_political_economy_centrist
	}
	if = {
		limit = { has_idea = CZD_political_economy_rightist }
		remove_ideas = CZD_political_economy_rightist
	}
	if = {
		limit = { has_idea = CZD_revisionism_crisis }
		remove_ideas = CZD_revisionism_crisis
	}
	
	# 閺嶈宓佺紒蹇旂ス閸婃儳鎮滄惔鏃傛暏閸ヨ姤鐨划鍓ь殻
	if = {
		limit = { check_variable = { CZD_economic_tendency < -2 } }
		add_ideas = CZD_political_economy_leftist
	}
	else_if = {
		limit = { check_variable = { CZD_economic_tendency > 2 } }
		add_ideas = CZD_political_economy_rightist
	}
	else = {
		add_ideas = CZD_political_economy_centrist
	}
	
	# 娣囶喗顒滄稉璁崇疅閸楄鲸婧€
	if = {
		limit = { check_variable = { CZD_revisionism_level > 60 } }
		add_ideas = CZD_revisionism_crisis
	}
	
	# 鐟欙箑褰傞惄绋垮彠娴滃娆?
	if = {
		limit = { check_variable = { CZD_revisionism_level > 80 } }
		country_event = { id = czd_political_economy.50 days = 30 }
	}
}

# 娑撳﹤鐪板铏圭摎閸欏秳缍旈悽銊ょ艾缂佸繑绁归崺铏诡攨
CZD_superstructure_affects_base = {
	# 閼诲繗浠堝ú鍙ュ瘜鐎靛吋甯归崝銊╁櫢瀹搞儰绗熼崶鑺ユ箒閸?
	if = {
		limit = { check_variable = { CZD_soviet_influence > 40 } }
		if = {
			limit = { check_variable = { CZD_heavy_industry_policy > -5 } }
			subtract_from_variable = { CZD_heavy_industry_policy = 0.1 }
		}
	}
	
	# 鐎规ê鍎︾挧鍕獓闂冨墎楠囨稉璇差嚤閹恒劌濮╃敮鍌氭簚閸?
	if = {
		limit = { check_variable = { CZD_bureaucratic_bourgeoisie_power > 25 } }
		if = {
			limit = { check_variable = { CZD_commerce_policy < 5 } }
			add_to_variable = { CZD_commerce_policy = 0.1 }
		}
		if = {
			limit = { check_variable = { CZD_light_industry_policy < 5 } }
			add_to_variable = { CZD_light_industry_policy = 0.1 }
		}
	}
	
	# 瀵よ泛鐣ㄥú鍙ュ瘜鐎靛吋甯归崝銊ュ晿娑撴岸娉︽担鎾冲
	if = {
		limit = { check_variable = { CZD_yanan_influence > 35 } }
		if = {
			limit = { check_variable = { CZD_agriculture_policy > -5 } }
			subtract_from_variable = { CZD_agriculture_policy = 0.1 }
		}
	}
	
	# 閻㈡彃鍖楀ú鍙ュ瘜鐎佃偐娣幎銈堝殰娑撴槒鐭剧痪?
	if = {
		limit = { check_variable = { CZD_kapsan_influence > 30 } }
		# 閸戝繐鐨弸浣侯伂閸婃儳鎮滈敍宀冭泲閸氭垳鑵戦梻?
		if = {
			limit = { check_variable = { CZD_economic_tendency > 1 } }
			subtract_from_variable = { CZD_agriculture_policy = 0.05 }
			subtract_from_variable = { CZD_commerce_policy = 0.05 }
		}
		if = {
			limit = { check_variable = { CZD_economic_tendency < -1 } }
			add_to_variable = { CZD_agriculture_policy = 0.05 }
			add_to_variable = { CZD_commerce_policy = 0.05 }
		}
	}
}

# 闂冨墎楠囬弬妞剧挨閺佸牊鐏?
CZD_class_struggle_effect = {
	# 閹垫挸鍤€规ê鍎︾挧鍕獓闂冨墎楠?
	subtract_from_variable = { CZD_bureaucratic_bourgeoisie_power = 10 }
	add_to_variable = { CZD_petty_officials_power = 5 }
	add_to_variable = { CZD_power_core_power = 5 }
	
	# 閸戝繐鐨穱顔筋劀娑撹绠熸繛浣藉剨
	subtract_from_variable = { CZD_revisionism_level = 15 }
	
	# 閺€鎸庝笉閹存劖婀?
	add_stability = -0.05
	
	CZD_normalize_bureaucracy = yes
	clamp_variable = { var = CZD_revisionism_level min = 0 max = 100 }
}

# 閺佹挳顥撴潻鎰З閺佸牊鐏?
CZD_rectification_effect = {
	# 閹垫挸鍤ú鍓ч兇
	if = {
		limit = { check_variable = { CZD_soviet_influence > 30 } }
		subtract_from_variable = { CZD_soviet_influence = 10 }
	}
	if = {
		limit = { check_variable = { CZD_domestic_influence > 25 } }
		subtract_from_variable = { CZD_domestic_influence = 5 }
	}
	
	# 閸旂姴宸遍弽绋跨妇閺夊啫濮忕仦?
	add_to_variable = { CZD_power_core_power = 10 }
	add_to_variable = { CZD_yanan_influence = 10 }
	
	# 閸戝繐鐨穱顔筋劀娑撹绠熸繛浣藉剨
	subtract_from_variable = { CZD_revisionism_level = 20 }
	
	# 缂佸繑绁归崥鎴濅箯鐠嬪啯鏆?
	if = {
		limit = { check_variable = { CZD_agriculture_policy > -3 } }
		subtract_from_variable = { CZD_agriculture_policy = 1 }
	}
	if = {
		limit = { check_variable = { CZD_commerce_policy > -3 } }
		subtract_from_variable = { CZD_commerce_policy = 1 }
	}
	
	# 閺€鎸庝笉閹存劖婀?
	add_stability = -0.1
	add_war_support = 0.05
	
	CZD_normalize_factions = yes
	CZD_normalize_bureaucracy = yes
	clamp_variable = { var = CZD_revisionism_level min = 0 max = 100 }
}

# ========== 鐎规ê鍎︾挧鍕獓闂冨墎楠囬崡杈ㄦ簚閺堝搫鍩?==========
# 閹笛嗩攽閸ヨ棄顔嶆潻鎰З鐎佃壈鍤х€规ê鍎︾挧鍕獓闂冨墎楠囬懚銊ㄥ剦閿涘牆鐨獮鍜冪礆
CZD_bureaucratic_expansion_small = {
	add_to_variable = { CZD_bureaucratic_bourgeoisie = 2 }
	add_to_variable = { CZD_bureaucratic_bourgeoisie_power = 2 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie min = 0 max = 100 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie_power min = 0 max = 100 }
	CZD_normalize_bureaucracy = yes
	custom_effect_tooltip = CZD_bureaucratic_expansion_small_tt
}

# 閹笛嗩攽閸ヨ棄顔嶆潻鎰З鐎佃壈鍤х€规ê鍎︾挧鍕獓闂冨墎楠囬懚銊ㄥ剦閿涘牅鑵戦獮鍜冪礆
CZD_bureaucratic_expansion_medium = {
	add_to_variable = { CZD_bureaucratic_bourgeoisie = 4 }
	add_to_variable = { CZD_bureaucratic_bourgeoisie_power = 4 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie min = 0 max = 100 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie_power min = 0 max = 100 }
	CZD_normalize_bureaucracy = yes
	custom_effect_tooltip = CZD_bureaucratic_expansion_medium_tt
}

# 閹笛嗩攽閸ヨ棄顔嶆潻鎰З鐎佃壈鍤х€规ê鍎︾挧鍕獓闂冨墎楠囬懚銊ㄥ剦閿涘牆銇囬獮鍜冪礆
CZD_bureaucratic_expansion_large = {
	add_to_variable = { CZD_bureaucratic_bourgeoisie = 6 }
	add_to_variable = { CZD_bureaucratic_bourgeoisie_power = 6 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie min = 0 max = 100 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie_power min = 0 max = 100 }
	CZD_normalize_bureaucracy = yes
	custom_effect_tooltip = CZD_bureaucratic_expansion_large_tt
}

# 缁€鍙ョ窗娑撹绠熸潻鎰З鐎佃壈鍤х€规ê鍎︾挧鍕獓闂冨墎楠囪ぐ鍗炴惙閸旀稐绗傞崡鍥风礄閻劋绨崶鐣岀摜鐎瑰本鍨氭總鏍уС閿?
CZD_socialist_campaign_bureaucracy_effect = {
	# 閼诲繐绱＄粈鍙ョ窗娑撹绠熸潻鎰З闂団偓鐟曚礁鐣奸崓姘⒔鐞涘矉绱濈€佃壈鍤х€规ê鍎︾挧鍕獓闂冨墎楠囪ぐ鍗炴惙閸旀稐绗傞崡?
	add_to_variable = { CZD_bureaucratic_bourgeoisie_power = 8 }
	add_to_variable = { CZD_bureaucratic_bourgeoisie = 8 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie_power min = 0 max = 100 }
	clamp_variable = { var = CZD_bureaucratic_bourgeoisie min = 0 max = 100 }
	CZD_normalize_bureaucracy = yes
	custom_effect_tooltip = CZD_bureaucracy_rise_from_campaign_tt
	
	# 检测是否触发危机
	CZD_check_bureaucracy_crisis = yes
}

# 检测官僚资产阶级危机并触发相应事件和buff
CZD_check_bureaucracy_crisis = {
	# 80%+ 最高警报 - 官僚资产阶级专政
	if = {
		limit = {
			check_variable = { CZD_bureaucratic_bourgeoisie_power > 80 }
			NOT = { has_idea = CZD_bureaucracy_crisis_critical }
		}
		country_event = { id = czd_bureaucracy_crisis.3 }
	}
	# 60-80% 紧急警报 - 官僚资产阶级危机
	else_if = {
		limit = {
			check_variable = { CZD_bureaucratic_bourgeoisie_power > 60 }
			NOT = { has_idea = CZD_bureaucracy_crisis_severe }
			NOT = { has_idea = CZD_bureaucracy_crisis_critical }
		}
		country_event = { id = czd_bureaucracy_crisis.2 }
	}
	# 40-60% 警告 - 官僚主义倾向
	else_if = {
		limit = {
			check_variable = { CZD_bureaucratic_bourgeoisie_power > 40 }
			NOT = { has_idea = CZD_bureaucracy_crisis_mild }
			NOT = { has_idea = CZD_bureaucracy_crisis_severe }
			NOT = { has_idea = CZD_bureaucracy_crisis_critical }
		}
		country_event = { id = czd_bureaucracy_crisis.1 }
	}
	# 低于40% 移除所有危机buff
	else_if = {
		limit = {
			check_variable = { CZD_bureaucratic_bourgeoisie_power < 40 }
			OR = {
				has_idea = CZD_bureaucracy_crisis_mild
				has_idea = CZD_bureaucracy_crisis_severe
				has_idea = CZD_bureaucracy_crisis_critical
			}
		}
		if = {
			limit = { has_idea = CZD_bureaucracy_crisis_mild }
			remove_ideas = CZD_bureaucracy_crisis_mild
		}
		if = {
			limit = { has_idea = CZD_bureaucracy_crisis_severe }
			remove_ideas = CZD_bureaucracy_crisis_severe
		}
		if = {
			limit = { has_idea = CZD_bureaucracy_crisis_critical }
			remove_ideas = CZD_bureaucracy_crisis_critical
		}
	}
	# 60%以下但有严重危机时降级
	else_if = {
		limit = {
			check_variable = { CZD_bureaucratic_bourgeoisie_power < 60 }
			check_variable = { CZD_bureaucratic_bourgeoisie_power > 40 }
			OR = {
				has_idea = CZD_bureaucracy_crisis_severe
				has_idea = CZD_bureaucracy_crisis_critical
			}
		}
		if = {
			limit = { has_idea = CZD_bureaucracy_crisis_severe }
			swap_ideas = {
				remove_idea = CZD_bureaucracy_crisis_severe
				add_idea = CZD_bureaucracy_crisis_mild
			}
		}
		if = {
			limit = { has_idea = CZD_bureaucracy_crisis_critical }
			swap_ideas = {
				remove_idea = CZD_bureaucracy_crisis_critical
				add_idea = CZD_bureaucracy_crisis_mild
			}
		}
	}
	# 80%以下但有最严重危机时降级
	else_if = {
		limit = {
			check_variable = { CZD_bureaucratic_bourgeoisie_power < 80 }
			check_variable = { CZD_bureaucratic_bourgeoisie_power > 60 }
			has_idea = CZD_bureaucracy_crisis_critical
		}
		swap_ideas = {
			remove_idea = CZD_bureaucracy_crisis_critical
			add_idea = CZD_bureaucracy_crisis_severe
		}
	}
}

