﻿# Hand-maintained exceptional behavior for dynamically spawned court positions.
DI_court_position_post_spawn_effect = {
    switch = {
        trigger = $COURT_POSITION$
        court_position_type:court_physician_court_position = {
            add_trait_xp = { trait = lifestyle_physician value = 100 }
            add_trait_xp = { trait = lifestyle_mystic value = 100 }
        }
        court_position_type:antiquarian_court_position = { create_inspiration = book_inspiration }
        court_position_type:travel_leader_court_position = {
            DI_add_commander_traits_effect = yes
            add_trait_xp = { trait = lifestyle_traveler track = travel value = 100 }
            add_trait_xp = { trait = lifestyle_traveler track = danger value = 100 }
            learn_language = language_arabic
            learn_language = language_greek
            learn_language = language_latin
            learn_language = language_norse
        }
        court_position_type:master_of_hunt_court_position = {
            add_trait_xp = { trait = lifestyle_hunter track = hunter value = 100 }
        }
        court_position_type:bodyguard_court_position = { add_trait_xp = { trait = lifestyle_blademaster value = 100 } }
        court_position_type:champion_court_position = { add_trait_xp = { trait = lifestyle_blademaster value = 100 } }
        court_position_type:court_artificer_court_position = { create_inspiration = { type = weapon_inspiration gold = 0 } }
        court_position_type:cultural_emissary_court_position = {
            learn_language = language_arabic
            learn_language = language_greek
            learn_language = language_latin
            learn_language = language_norse
        }
        court_position_type:keeper_of_swans_court_position = {
            add_trait_xp = { trait = lifestyle_hunter track = hunter value = 100 }
        }
        court_position_type:garuda_court_position = { add_trait_xp = { trait = lifestyle_blademaster value = 100 } }
        court_position_type:cave_hermit_court_position = { add_trait_xp = { trait = lifestyle_mystic value = 50 } }
        court_position_type:master_assassin_court_position = { add_trait_xp = { trait = lifestyle_blademaster value = 100 } }
        court_position_type:court_scholar_court_position = { add_trait_xp = { trait = lifestyle_physician value = 100 } }
        court_position_type:charioteer_court_position = {
            if = { limit = { has_trait = charioteer_blue } add_trait_xp = { trait = charioteer_blue value = 100 } }
            else_if = { limit = { has_trait = charioteer_green } add_trait_xp = { trait = charioteer_green value = 100 } }
            else_if = { limit = { has_trait = charioteer_red } add_trait_xp = { trait = charioteer_red value = 100 } }
            else_if = { limit = { has_trait = charioteer_white } add_trait_xp = { trait = charioteer_white value = 100 } }
        }
        fallback = { }
    }
}
