2024-12-19 00:15:05
This commit is contained in:
537
src/common/scripted_effects/az_DOH_scripted_effects.txt
Executable file
537
src/common/scripted_effects/az_DOH_scripted_effects.txt
Executable file
@@ -0,0 +1,537 @@
|
||||
DOH_modifier_effect = {
|
||||
## 显示用
|
||||
set_variable = {
|
||||
DOH_zongjikaizhi_mtth_display = mtth:DOH_zongjikaizhi_mtth
|
||||
}
|
||||
set_variable = {
|
||||
DOH_modifier_guimoxiaoying_effect_mtth_display = mtth:DOH_modifier_guimoxiaoying_effect_mtth
|
||||
}
|
||||
set_variable = {
|
||||
DOH_guimoxiaoyin_mtth_display = mtth:DOH_guimoxiaoyin_mtth
|
||||
}
|
||||
set_variable = {
|
||||
DOH_heqishengcai_mtth_display = mtth:DOH_heqishengcai_mtth
|
||||
}
|
||||
set_variable = {
|
||||
DOH_xiaofeipingyinxiang_factor_mtth_display = mtth:DOH_xiaofeipingyinxiang_factor_mtth
|
||||
}
|
||||
## 工业目标
|
||||
set_variable = {
|
||||
var:DOH_gongyeguihua_doing_goal_display = mtth:DOH_gongyemubiao_mtth
|
||||
}
|
||||
round_variable = var:DOH_gongyeguihua_doing_goal_display
|
||||
## 核电站
|
||||
DOH = {
|
||||
every_owned_state = {
|
||||
if = {
|
||||
limit = {
|
||||
commercial_nuclear_reactor > 0
|
||||
OR = {
|
||||
is_core_of = DOH
|
||||
}
|
||||
}
|
||||
add_dynamic_modifier = {
|
||||
modifier = DOH_hedian_state_modifier
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
var:DOH_hedian_counter = 0
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
DOH = {
|
||||
all_owned_state = {
|
||||
if = {
|
||||
limit = {
|
||||
commercial_nuclear_reactor > 0
|
||||
}
|
||||
add_to_temp_variable = {
|
||||
DOH_nu_counter = -0.02
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
var:DOH_hedian_counter = DOH_nu_counter
|
||||
}
|
||||
}
|
||||
|
||||
### 以下东煌工业品
|
||||
if = {
|
||||
limit = {
|
||||
has_country_flag = DOH_auto_conv_com_arm
|
||||
check_variable = {
|
||||
var:num_equipment@doh_civ_equipment_1 > 179
|
||||
}
|
||||
}
|
||||
set_temp_variable = {
|
||||
temp_var:az_doh_clr_equ = var:num_equipment@doh_civ_equipment_1
|
||||
}
|
||||
divide_temp_variable = {
|
||||
temp_var:az_doh_clr_equ = 180
|
||||
}
|
||||
round_temp_variable = temp_var:az_doh_clr_equ
|
||||
set_temp_variable = {
|
||||
temp_var:az_doh_factroies_add = temp_var:az_doh_clr_equ
|
||||
}
|
||||
multiply_temp_variable = {
|
||||
temp_var:az_doh_clr_equ = -180
|
||||
}
|
||||
add_equipment_to_stockpile = {
|
||||
type = doh_civ_equipment_1
|
||||
amount = temp_var:az_doh_clr_equ
|
||||
}
|
||||
add_offsite_building = {
|
||||
type = arms_factory
|
||||
level = temp_var:az_doh_factroies_add
|
||||
}
|
||||
add_offsite_building = {
|
||||
type = industrial_complex
|
||||
level = temp_var:az_doh_factroies_add
|
||||
}
|
||||
add_timed_idea = {
|
||||
idea = DOH_czdswgy
|
||||
days = 10
|
||||
}
|
||||
}
|
||||
|
||||
if = {
|
||||
limit = {
|
||||
has_country_flag = DOH_auto_conv_arm
|
||||
check_variable = {
|
||||
var:num_equipment@doh_civ_equipment_1 > 71
|
||||
}
|
||||
}
|
||||
set_temp_variable = {
|
||||
temp_var:az_doh_clr_equ = var:num_equipment@doh_civ_equipment_1
|
||||
}
|
||||
divide_temp_variable = {
|
||||
temp_var:az_doh_clr_equ = 72
|
||||
}
|
||||
round_temp_variable = temp_var:az_doh_clr_equ
|
||||
set_temp_variable = {
|
||||
temp_var:az_doh_factroies_add = temp_var:az_doh_clr_equ
|
||||
}
|
||||
multiply_temp_variable = {
|
||||
temp_var:az_doh_clr_equ = -72
|
||||
}
|
||||
add_equipment_to_stockpile = {
|
||||
type = doh_civ_equipment_1
|
||||
amount = temp_var:az_doh_clr_equ
|
||||
}
|
||||
add_offsite_building = {
|
||||
type = arms_factory
|
||||
level = temp_var:az_doh_factroies_add
|
||||
}
|
||||
add_timed_idea = {
|
||||
idea = DOH_czdswgy
|
||||
days = 10
|
||||
}
|
||||
}
|
||||
### 以上东煌工业品
|
||||
|
||||
### 东煌矿业大学
|
||||
if = {
|
||||
limit = {
|
||||
DOH = {
|
||||
has_completed_focus = DOH_kuangyedaxue
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
var:DOH_minyonggongchang_counter_1 = 0
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
DOH = {
|
||||
all_owned_state = {
|
||||
if = {
|
||||
limit = {
|
||||
industrial_complex > 0
|
||||
}
|
||||
add_to_temp_variable = {
|
||||
DOH_civ_counter = building_level@industrial_complex
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
var:DOH_minyonggongchang_counter_1 = DOH_civ_counter
|
||||
}
|
||||
}
|
||||
|
||||
set_variable = {
|
||||
var:DOH_hechenglianyouchang_counter_2 = 0
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
DOH = {
|
||||
all_owned_state = {
|
||||
if = {
|
||||
limit = {
|
||||
synthetic_refinery > 0
|
||||
}
|
||||
add_to_temp_variable = { DOH_sr_counter = building_level@synthetic_refinery }
|
||||
add_to_temp_variable = { DOH_sr_counter = building_level@synthetic_refinery }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
var:DOH_hechenglianyouchang_counter_2 = DOH_sr_counter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DOH_zhichilvchengfa_effect = {
|
||||
set_variable = {
|
||||
DOH_zhichiduchengfa_t = var:DOH_zhichiduchengfa
|
||||
}
|
||||
multiply_variable = {
|
||||
DOH_zhichiduchengfa_t = -0.01
|
||||
}
|
||||
add_popularity = {
|
||||
ideology = neutrality
|
||||
popularity = var:DOH_zhichiduchengfa_t
|
||||
}
|
||||
}
|
||||
|
||||
### 以下对外输出
|
||||
DOH_duiwaishuchu_effect = {
|
||||
# 工厂数目
|
||||
set_variable = {
|
||||
DOH_has_shuchu_factroies = DOH_has_shuchu_civ
|
||||
}
|
||||
multiply_variable = {
|
||||
DOH_has_shuchu_factroies = 0.011
|
||||
}
|
||||
# 控股比例:输出工厂数占对方总工厂数之百分比
|
||||
set_variable = {
|
||||
shuchu_factor = DOH_has_shuchu_factroies
|
||||
}
|
||||
every_country = {
|
||||
if = {
|
||||
limit = {
|
||||
all_country = {
|
||||
if = {
|
||||
limit = {
|
||||
has_country_flag = DOH_shuchu_civ_target_flag
|
||||
}
|
||||
set_temp_variable = {
|
||||
target_total_factories_temp = var:num_of_factories
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
target_total_factories = target_total_factories_temp
|
||||
}
|
||||
}
|
||||
}
|
||||
multiply_variable = {
|
||||
target_total_factories = 1.45
|
||||
}
|
||||
divide_variable = {
|
||||
shuchu_factor = target_total_factories
|
||||
}
|
||||
# 股东分红
|
||||
set_variable = {
|
||||
shuchu_factor_to_doh = shuchu_factor
|
||||
}
|
||||
multiply_variable = {
|
||||
shuchu_factor_to_doh = 0.5
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
check_variable = {
|
||||
shuchu_factor_to_doh > 0.60
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
shuchu_factor_to_doh = 0.6
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
d_DOH_auto_shuchu_effect = {
|
||||
set_variable = {
|
||||
DOH_civ_num = DOH.num_equipment@doh_civ_equipment_1
|
||||
}
|
||||
DOH = {
|
||||
send_equipment = {
|
||||
type = doh_civ_equipment_1
|
||||
amount = DOH_civ_num
|
||||
target = var:DOH_shuchu_civ_target_tag
|
||||
}
|
||||
}
|
||||
add_to_variable = {
|
||||
DOH_has_shuchu_civ = DOH_civ_num
|
||||
}
|
||||
}
|
||||
|
||||
d_DOH_self_duiwaishuchu_init = {
|
||||
DOH = {
|
||||
set_variable = {
|
||||
var:DOH_has_shuchu_civ = 0
|
||||
}
|
||||
set_variable = {
|
||||
var:DOH_has_shuchu_factroies = 0
|
||||
}
|
||||
set_variable = {
|
||||
var:shuchu_factor = 0
|
||||
}
|
||||
set_variable = {
|
||||
var:shuchu_factor_to_doh = 0
|
||||
}
|
||||
clr_country_flag = DOH_shuchu_civ_doing_flag
|
||||
clr_country_flag = DOH_auto_shuchu_civ
|
||||
d_DOH_auto_shuchu_effect = yes
|
||||
DOH_duiwaishuchu_effect = yes
|
||||
}
|
||||
}
|
||||
### 以上对外输出
|
||||
|
||||
### 科学院
|
||||
doh_kexueyuan_effect = {
|
||||
# set_variable = {
|
||||
# shared_speed_factor = 0
|
||||
# }
|
||||
if = {
|
||||
limit = {
|
||||
DOH = {
|
||||
all_subject_countries = {
|
||||
if = {
|
||||
limit = {
|
||||
num_of_factories > 0
|
||||
}
|
||||
add_to_temp_variable = {
|
||||
shared_speed_factor_temp = num_of_factories
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
var:shared_speed_factor = shared_speed_factor_temp
|
||||
}
|
||||
}
|
||||
multiply_variable = {
|
||||
shared_speed_factor = 0.01
|
||||
}
|
||||
multiply_variable = {
|
||||
shared_speed_factor = 0.03
|
||||
}
|
||||
every_country = {
|
||||
if = {
|
||||
limit = {
|
||||
OR = {
|
||||
is_subject_of = DOH
|
||||
tag = DOH
|
||||
}
|
||||
NOT = {
|
||||
has_dynamic_modifier = {
|
||||
modifier = az_doh_kexueyuan_modifier
|
||||
}
|
||||
}
|
||||
}
|
||||
add_dynamic_modifier = {
|
||||
modifier = az_doh_kexueyuan_modifier
|
||||
}
|
||||
}
|
||||
if = {
|
||||
limit = {
|
||||
NOT = {
|
||||
OR = {
|
||||
is_subject_of = DOH
|
||||
tag = DOH
|
||||
}
|
||||
}
|
||||
has_dynamic_modifier = {
|
||||
modifier = az_doh_kexueyuan_modifier
|
||||
}
|
||||
}
|
||||
remove_dynamic_modifier = {
|
||||
modifier = az_doh_kexueyuan_modifier
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
### 朝贡制度
|
||||
d_DOH_fanshu_add_effect = {
|
||||
every_country = {
|
||||
limit = {
|
||||
has_autonomy_state = doh_fanshu
|
||||
NOT = {
|
||||
has_dynamic_modifier = {
|
||||
modifier = az_doh_fanshu_modifier
|
||||
}
|
||||
}
|
||||
}
|
||||
add_dynamic_modifier = {
|
||||
modifier = az_doh_fanshu_modifier
|
||||
#scope = THIS.overlord
|
||||
}
|
||||
}
|
||||
}
|
||||
d_DOH_fanshu_refresh_effect = {
|
||||
every_country = {
|
||||
limit = {
|
||||
has_dynamic_modifier = {
|
||||
modifier = az_doh_fanshu_modifier
|
||||
}
|
||||
}
|
||||
set_variable = {
|
||||
THIS.zizhichengdu = THIS.autonomy_ratio
|
||||
}
|
||||
multiply_variable = {
|
||||
THIS.zizhichengdu = -1
|
||||
}
|
||||
add_to_variable = {
|
||||
THIS.zizhichengdu = 1
|
||||
}
|
||||
multiply_variable = {
|
||||
THIS.zizhichengdu = 0.4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
d_DOH_fanshu_reload_effect = {
|
||||
every_country = {
|
||||
limit = {
|
||||
DOH = {
|
||||
has_completed_focus = DOH_chaogongtixi
|
||||
}
|
||||
is_subject_of = DOH
|
||||
NOT = {
|
||||
has_autonomy_state = doh_fanshu
|
||||
}
|
||||
}
|
||||
set_autonomy = {
|
||||
target = THIS
|
||||
autonomy_state = doh_fanshu
|
||||
}
|
||||
}
|
||||
every_country = {
|
||||
limit = {
|
||||
DOH = {
|
||||
has_completed_focus = DOH_cijichaogongzhongxin
|
||||
}
|
||||
is_subject = yes
|
||||
OVERLORD = {
|
||||
has_autonomy_state = doh_fanshu
|
||||
}
|
||||
}
|
||||
set_autonomy = {
|
||||
target = THIS
|
||||
autonomy_state = doh_fanshu
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DOH_neibufenqi_jianqin_effect = {
|
||||
multiply_variable = {
|
||||
var:DOH_zhichiduchengfa = 0.8
|
||||
}
|
||||
custom_effect_tooltip = DOH_neibufenqi_jianqin_effect_tooltip
|
||||
}
|
||||
DOH_neibufenqi_jianqin_few_effect = {
|
||||
multiply_variable = {
|
||||
var:DOH_zhichiduchengfa = 0.9
|
||||
}
|
||||
custom_effect_tooltip = DOH_neibufenqi_jianqin_few_effect_tooltip
|
||||
}
|
||||
DOH_neibufenqi_jiazhong_effect = {
|
||||
multiply_variable = {
|
||||
var:DOH_zhichiduchengfa = 2.50
|
||||
}
|
||||
custom_effect_tooltip = DOH_neibufenqi_jiazhong_effect_tooltip
|
||||
}
|
||||
|
||||
DOH_guocehejueyikaifa_effect = {
|
||||
756 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
597 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
598 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
620 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
745 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
744 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
596 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
595 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
614 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
602 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
607 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
615 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
613 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
605 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
608 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
328 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
716 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
714 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
717 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
592 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
591 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
743 = {
|
||||
set_state_flag = DOH_guocehejueyikaifa
|
||||
}
|
||||
}
|
||||
DOH_point_weekly_limit = {
|
||||
## 堵死bug
|
||||
set_variable = {
|
||||
DOH_add_touzi_weekly_limit = 0
|
||||
}
|
||||
set_variable = {
|
||||
DOH_add_gonggongkaizhi_weekly_limit = 0
|
||||
}
|
||||
set_variable = {
|
||||
DOH_add_keyanjinfei_weekly_limit = 0
|
||||
}
|
||||
set_variable = {
|
||||
DOH_add_junshijinfei_weekly_limit = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user