﻿# Kidnap Expedition values. These are intentionally transparent rather than astronomical.

# Tier-I equivalents. Albino, Fecund and Pure-Blooded remain explicitly desirable markers by design.
# They count as tier-I equivalents for the raid-quality threshold rather than silently becoming tier-II.
ddm_kidnap_tier1_marker_value = {
    value = 0
    if = { limit = { has_trait = intellect_good_1 } add = 1 }
    if = { limit = { has_trait = physique_good_1 } add = 1 }
    if = { limit = { has_trait = beauty_good_1 } add = 1 }
    if = { limit = { has_trait = fecund } add = 1 }
    if = { limit = { has_trait = pure_blooded } add = 1 }
    if = { limit = { has_trait = albino } add = 1 }
}

ddm_kidnap_tier2_marker_value = {
    value = 0
    if = { limit = { has_trait = intellect_good_2 } add = 1 }
    if = { limit = { has_trait = physique_good_2 } add = 1 }
    if = { limit = { has_trait = beauty_good_2 } add = 1 }
}

ddm_kidnap_tier3_marker_value = {
    value = 0
    if = { limit = { has_trait = intellect_good_3 } add = 1 }
    if = { limit = { has_trait = physique_good_3 } add = 1 }
    if = { limit = { has_trait = beauty_good_3 } add = 1 }
}

# Constructive personality traits used only as a quality gate for automatically selected/generated brides.
# The player can still manually target anyone through the right-click interaction.
ddm_kidnap_good_personality_value = {
    value = 0
    if = { limit = { has_trait = diligent } add = 1 }
    if = { limit = { has_trait = patient } add = 1 }
    if = { limit = { has_trait = brave } add = 1 }
    if = { limit = { has_trait = calm } add = 1 }
    if = { limit = { has_trait = temperate } add = 1 }
    if = { limit = { has_trait = just } add = 1 }
    if = { limit = { has_trait = honest } add = 1 }
    if = { limit = { has_trait = compassionate } add = 1 }
    if = { limit = { has_trait = generous } add = 1 }
    if = { limit = { has_trait = gregarious } add = 1 }
}

# Backwards-compatible aggregate marker retained for any older save/script references.
ddm_kidnap_good_stock_marker_value = {
    value = ddm_kidnap_tier1_marker_value
    add = { value = ddm_kidnap_tier2_marker_value multiply = 2 }
    add = { value = ddm_kidnap_tier3_marker_value multiply = 3 }
}

# Used to pick the three best additional women from the strict eligible pool. Hereditary quality remains
# the main component; fertility, personality, competence and noble standing break ties.
ddm_kidnap_bride_quality_value = {
    value = ddm_quality_trait_value
    add = { value = ddm_kidnap_tier1_marker_value multiply = 55 }
    add = { value = ddm_kidnap_tier2_marker_value multiply = 115 }
    add = { value = ddm_kidnap_tier3_marker_value multiply = 220 }
    add = { value = ddm_kidnap_good_personality_value multiply = 25 }
    add = { value = fertility multiply = 100 }
    add = { value = diplomacy multiply = 1.5 }
    add = martial
    add = { value = stewardship multiply = 1.5 }
    add = { value = intrigue multiply = 1.5 }
    add = learning
    add = prowess
    if = { limit = { exists = dynasty } add = 40 }
    if = { limit = { prestige_level >= 2 } add = 30 }
    if = { limit = { prestige_level >= 4 } add = 40 }
}

# Human/AI target desirability. AI uses this only after a nearby realm has been chosen.
ddm_kidnap_ai_target_value = {
    value = ddm_kidnap_bride_quality_value
    if = { limit = { is_close_or_extended_family_of = scope:ddm_kidnap_local_ruler } add = 180 }
    if = { limit = { is_heir_of = scope:ddm_kidnap_local_ruler } add = 220 }
}
