﻿domcom_alpha_event_final_chance_value = {
    value = 50
    if = {
        limit = { exists = scope:domcom_alpha_target scope:domcom_alpha_target = { has_variable = domcom_alpha_event_base_chance } }
        value = scope:domcom_alpha_target.var:domcom_alpha_event_base_chance
    }
    if = { limit = { has_variable = domcom_alpha_event_score } add = { value = var:domcom_alpha_event_score multiply = 8 } }
    min = 5
    max = 95
    round = yes
}

domcom_test_devotion_chance_value = {
    value = 25
    if = {
        limit = { exists = scope:domcom_communion_target scope:domcom_communion_target = { has_variable = domcom_obedience } }
        add = { value = scope:domcom_communion_target.var:domcom_obedience multiply = 0.06 }
    }
    if = { limit = { scope:domcom_communion_target = { has_relation_soulmate = root } } add = 10 }
    if = { limit = { scope:domcom_communion_target = { has_trait = trusting } } add = 8 }
    if = { limit = { scope:domcom_communion_target = { has_trait = content } } add = 6 }
    if = { limit = { scope:domcom_communion_target = { has_trait = craven } } add = 5 }
    if = { limit = { scope:domcom_communion_target = { has_trait = stubborn } } add = -10 }
    if = { limit = { scope:domcom_communion_target = { has_trait = brave } } add = -7 }
    if = { limit = { scope:domcom_communion_target = { has_trait = arrogant } } add = -5 }
    min = 15
    max = 95
    round = yes
}

domcom_test_devotion_failure_weight_value = {
    value = 100
    add = { value = domcom_test_devotion_chance_value multiply = -1 }
    min = 5
    max = 85
    round = yes
}

domcom_claim_pet_chance_value = {
    value = 70
    if = { limit = { scope:domcom_communion_target = { has_relation_soulmate = root } } add = 15 }
    if = { limit = { scope:domcom_communion_target = { has_trait = trusting } } add = 8 }
    if = { limit = { scope:domcom_communion_target = { has_trait = content } } add = 6 }
    if = { limit = { scope:domcom_communion_target = { has_trait = craven } } add = 4 }
    if = { limit = { scope:domcom_communion_target = { has_trait = stubborn } } add = -8 }
    if = { limit = { scope:domcom_communion_target = { has_trait = arrogant } } add = -6 }
    if = { limit = { scope:domcom_communion_target = { has_trait = brave } } add = -4 }
    min = 50
    max = 95
    round = yes
}


domcom_claim_pet_failure_weight_value = {
    value = 100
    add = { value = domcom_claim_pet_chance_value multiply = -1 }
    min = 5
    max = 50
    round = yes
}
