﻿#Scope
# 目标范围 1=true, 0=false
qing_htool_main_scope_value = {
    value = 0

    # 直辖领地
    if = {
        limit = {
            scope:gui_holding = {
                province_owner = root
            }
        }
        value = 1
    }
    # 直属封臣（vassals 及以上）
    else_if = {
        limit = {
            OR = {
                has_game_rule = qing_htool_main_scope_vassals
                has_game_rule = qing_htool_main_scope_subvassals
                has_game_rule = qing_htool_main_scope_all
            }
            root = {
                any_vassal = {
                    this = scope:gui_holding.province_owner
                }
            }
        }
        value = 1
    }
    # 间接封臣（subvassals 及以上）
    else_if = {
        limit = {
            OR = {
                has_game_rule = qing_htool_main_scope_subvassals
                has_game_rule = qing_htool_main_scope_all
            }
            root = {
                any_vassal = {
                    any_vassal = {
                        this = scope:gui_holding.province_owner
                    }
                }
            }
        }
        value = 1
    }
    # 其他领主（all）
    else_if = {
        limit = {
            has_game_rule = qing_htool_main_scope_all
        }
        value = 1
    }
}