﻿#Slot
# 新增建筑槽基础花费
qing_htool_building_slot_add_cost_value = {
    value = 0

    if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_100 }
        add = 100
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_150 }
        add = 150
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_200 }
        add = 200
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_250 }
        add = 250
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_300 }
        add = 300
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_400 }
        add = 400
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_500 }
        add = 500
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_600 }
        add = 600
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_800 }
        add = 800
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_1000 }
        add = 1000
    }
}

# 新增建筑槽递增花费
qing_htool_building_slot_add_cost_extra_value = {
    value = 0

    if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_100 }
        add = 100
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_150 }
        add = 150
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_200 }
        add = 200
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_250 }
        add = 250
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_300 }
        add = 300
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_400 }
        add = 400
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_500 }
        add = 500
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_600 }
        add = 600
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_800 }
        add = 800
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cost_extra_1000 }
        add = 1000
    }
}

# 总花费
qing_htool_building_slot_cost_total = {
    value = qing_htool_building_slot_add_cost_value

    if = {
        limit = {
            scope:gui_holding = {
                has_variable = qing_htool_building_slot_information_count
                var:qing_htool_building_slot_information_count > 0
            }
        }
        add = {
            value = qing_htool_building_slot_add_cost_extra_value
            multiply = scope:gui_holding.var:qing_htool_building_slot_information_count
        }
    }
}

# 新增建筑槽冷却
qing_htool_building_slot_add_cooldown_value = {
    value = 0

    if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cooldown_3 }
        add = 3
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cooldown_6 }
        add = 6
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cooldown_12 }
        add = 12
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cooldown_24 }
        add = 24
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_cooldown_36 }
        add = 36
    }
}

# 新增建筑槽上限
qing_htool_building_slot_add_max_value = {
    value = 0

    if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_3 }
        value = 3
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_5 }
        value = 5
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_8 }
        value = 8
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_10 }
        value = 10
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_12 }
        value = 12
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_15 }
        value = 15
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_20 }
        value = 20
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_30 }
        value = 30
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_50 }
        value = 50
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_100 }
        value = 100
    }
}

# 新增建筑槽上限
qing_htool_building_slot_add_max_value = {
    value = 0

    if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_3 }
        value = 3
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_5 }
        value = 5
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_8 }
        value = 8
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_10 }
        value = 10
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_12 }
        value = 12
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_15 }
        value = 15
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_20 }
        value = 20
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_30 }
        value = 30
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_50 }
        value = 50
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_max_100 }
        value = 100
    }
}

# 每多少发展度新增建筑槽
qing_htool_building_slot_add_development_level_value = {
    value = 0

    if = {
        limit = { has_game_rule = qing_htool_building_slot_add_development_level_5 }
        value = 5
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_development_level_10 }
        value = 10
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_development_level_20 }
        value = 20
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_development_level_25 }
        value = 25
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_development_level_50 }
        value = 50
    }
    else_if = {
        limit = { has_game_rule = qing_htool_building_slot_add_development_level_100 }
        value = 100
    }
}

# 随发展度新增建筑槽总数
qing_htool_building_slot_add_development_count_value = {
    value = scope:target_county.development_level
    divide = qing_htool_building_slot_add_development_level_value
    floor = yes
}