﻿namespace = loaa_contract_technical_event

loaa_contract_technical_event.1 = {
    type = character_event
    hidden = yes
    trigger = {
        has_variable = offered_contract
    }
    immediate = {
        if = {
            limit = { has_variable = offered_contract }
            var:offered_contract ?= {
                set_variable = {
                    name = months_spent
                    value = {
                        value = time_since_contract_taken
                        divide = 30
                        floor = yes
                    }
                }
                set_variable = {
                    name = prestige_penalty
                    value = {
                        value = root.var:offered_contract.var:months_spent
                        divide = 6
                        floor = yes
                        multiply = 250
                        min = 250
                    }
                }
            }
        }
        trigger_event = { id = loaa_contract_technical_event.1 months = 1 }
    }
}