﻿# Compatibility override point; keep this path stable.

domcom_preseed_endowment_effect = {
    if = {
        limit = { domcom_should_express_endowment_trigger = yes age >= 18 }

        # A Dominion tier can only be explicitly selected/added (never random- created or
        # vanilla-inherited), so it is the strongest evidence of a Ruler Designer choice and wins even
        # during startup ordering.
        if = {
            limit = {
                OR = {
                    has_trait = domcom_endowment_micro
                    has_trait = domcom_endowment_small
                    has_trait = domcom_endowment_average
                    has_trait = domcom_endowment_big
                    has_trait = domcom_endowment_hung
                    has_trait = domcom_endowment_massive
                }
            }
            domcom_seed_from_own_trait_effect = yes
        }
        else_if = {
            limit = {
                is_ai = no
                has_game_rule = carn_dt_enabled
                OR = { has_trait = dick_big_good_3 has_trait = dick_big_bad_3 }
            }
            domcom_seed_tier_massive_effect = yes
        }
        else_if = {
            limit = {
                is_ai = no
                has_game_rule = carn_dt_enabled
                OR = { has_trait = dick_big_good_2 has_trait = dick_big_bad_2 }
            }
            domcom_seed_tier_hung_effect = yes
        }
        else_if = {
            limit = {
                is_ai = no
                has_game_rule = carn_dt_enabled
                OR = { has_trait = dick_big_good_1 has_trait = dick_big_bad_1 }
            }
            domcom_seed_tier_big_effect = yes
        }
        else_if = {
            limit = {
                is_ai = no
                has_game_rule = carn_dt_enabled
                OR = { has_trait = dick_small_good_3 has_trait = dick_small_bad_3 }
            }
            domcom_seed_tier_micro_effect = yes
        }
        else_if = {
            limit = {
                is_ai = no
                has_game_rule = carn_dt_enabled
                OR = {
                    has_trait = dick_small_good_2
                    has_trait = dick_small_bad_2
                    has_trait = dick_small_good_1
                    has_trait = dick_small_bad_1
                }
            }
            domcom_seed_tier_small_effect = yes
        }
    }
}
