# QY More Personality+ — scripted effects
# Adds/Removes vanilla personality traits with simple guardrails.
# This intentionally avoids heavy overrides to keep compatibility strong.

qy_add_random_personality_trait = {
    # pick a random trait from each opposed pair; only add if neither member present
    random_list = {
        1 = { if = { limit = { NOT = { has_trait = brave } NOT = { has_trait = craven } } add_trait = brave } }
        1 = { if = { limit = { NOT = { has_trait = brave } NOT = { has_trait = craven } } add_trait = craven } }

        1 = { if = { limit = { NOT = { has_trait = calm } NOT = { has_trait = wrathful } } add_trait = calm } }
        1 = { if = { limit = { NOT = { has_trait = calm } NOT = { has_trait = wrathful } } add_trait = wrathful } }

        1 = { if = { limit = { NOT = { has_trait = chaste } NOT = { has_trait = lustful } } add_trait = chaste } }
        1 = { if = { limit = { NOT = { has_trait = chaste } NOT = { has_trait = lustful } } add_trait = lustful } }

        1 = { if = { limit = { NOT = { has_trait = content } NOT = { has_trait = ambitious } } add_trait = content } }
        1 = { if = { limit = { NOT = { has_trait = content } NOT = { has_trait = ambitious } } add_trait = ambitious } }

        1 = { if = { limit = { NOT = { has_trait = compassionate } NOT = { has_trait = callous } } add_trait = compassionate } }
        1 = { if = { limit = { NOT = { has_trait = compassionate } NOT = { has_trait = callous } } add_trait = callous } }

        1 = { if = { limit = { NOT = { has_trait = deceitful } NOT = { has_trait = honest } } add_trait = deceitful } }
        1 = { if = { limit = { NOT = { has_trait = deceitful } NOT = { has_trait = honest } } add_trait = honest } }

        1 = { if = { limit = { NOT = { has_trait = diligent } NOT = { has_trait = lazy } } add_trait = diligent } }
        1 = { if = { limit = { NOT = { has_trait = diligent } NOT = { has_trait = lazy } } add_trait = lazy } }

        1 = { if = { limit = { NOT = { has_trait = forgiving } NOT = { has_trait = vengeful } } add_trait = forgiving } }
        1 = { if = { limit = { NOT = { has_trait = forgiving } NOT = { has_trait = vengeful } } add_trait = vengeful } }

        1 = { if = { limit = { NOT = { has_trait = generous } NOT = { has_trait = greedy } } add_trait = generous } }
        1 = { if = { limit = { NOT = { has_trait = generous } NOT = { has_trait = greedy } } add_trait = greedy } }

        1 = { if = { limit = { NOT = { has_trait = gregarious } NOT = { has_trait = shy } } add_trait = gregarious } }
        1 = { if = { limit = { NOT = { has_trait = gregarious } NOT = { has_trait = shy } } add_trait = shy } }

        1 = { if = { limit = { NOT = { has_trait = humble } NOT = { has_trait = arrogant } } add_trait = humble } }
        1 = { if = { limit = { NOT = { has_trait = humble } NOT = { has_trait = arrogant } } add_trait = arrogant } }

        1 = { if = { limit = { NOT = { has_trait = just } NOT = { has_trait = arbitrary } } add_trait = just } }
        1 = { if = { limit = { NOT = { has_trait = just } NOT = { has_trait = arbitrary } } add_trait = arbitrary } }

        1 = { if = { limit = { NOT = { has_trait = patient } NOT = { has_trait = impatient } } add_trait = patient } }
        1 = { if = { limit = { NOT = { has_trait = patient } NOT = { has_trait = impatient } } add_trait = impatient } }

        1 = { if = { limit = { NOT = { has_trait = temperate } NOT = { has_trait = gluttonous } } add_trait = temperate } }
        1 = { if = { limit = { NOT = { has_trait = temperate } NOT = { has_trait = gluttonous } } add_trait = gluttonous } }

        1 = { if = { limit = { NOT = { has_trait = trusting } NOT = { has_trait = paranoid } } add_trait = trusting } }
        1 = { if = { limit = { NOT = { has_trait = trusting } NOT = { has_trait = paranoid } } add_trait = paranoid } }
    }
}

qy_remove_random_personality_trait = {
    random_list = {
        1 = { if = { limit = { has_trait = brave }      remove_trait = brave } }
        1 = { if = { limit = { has_trait = craven }     remove_trait = craven } }
        1 = { if = { limit = { has_trait = calm }       remove_trait = calm } }
        1 = { if = { limit = { has_trait = wrathful }   remove_trait = wrathful } }
        1 = { if = { limit = { has_trait = chaste }     remove_trait = chaste } }
        1 = { if = { limit = { has_trait = lustful }    remove_trait = lustful } }
        1 = { if = { limit = { has_trait = content }    remove_trait = content } }
        1 = { if = { limit = { has_trait = ambitious }  remove_trait = ambitious } }
        1 = { if = { limit = { has_trait = compassionate } remove_trait = compassionate } }
        1 = { if = { limit = { has_trait = callous }    remove_trait = callous } }
        1 = { if = { limit = { has_trait = deceitful }  remove_trait = deceitful } }
        1 = { if = { limit = { has_trait = honest }     remove_trait = honest } }
        1 = { if = { limit = { has_trait = diligent }   remove_trait = diligent } }
        1 = { if = { limit = { has_trait = lazy }       remove_trait = lazy } }
        1 = { if = { limit = { has_trait = forgiving }  remove_trait = forgiving } }
        1 = { if = { limit = { has_trait = vengeful }   remove_trait = vengeful } }
        1 = { if = { limit = { has_trait = generous }   remove_trait = generous } }
        1 = { if = { limit = { has_trait = greedy }     remove_trait = greedy } }
        1 = { if = { limit = { has_trait = gregarious } remove_trait = gregarious } }
        1 = { if = { limit = { has_trait = shy }        remove_trait = shy } }
        1 = { if = { limit = { has_trait = humble }     remove_trait = humble } }
        1 = { if = { limit = { has_trait = arrogant }   remove_trait = arrogant } }
        1 = { if = { limit = { has_trait = just }       remove_trait = just } }
        1 = { if = { limit = { has_trait = arbitrary }  remove_trait = arbitrary } }
        1 = { if = { limit = { has_trait = patient }    remove_trait = patient } }
        1 = { if = { limit = { has_trait = impatient }  remove_trait = impatient } }
        1 = { if = { limit = { has_trait = temperate }  remove_trait = temperate } }
        1 = { if = { limit = { has_trait = gluttonous } remove_trait = gluttonous } }
        1 = { if = { limit = { has_trait = trusting }   remove_trait = trusting } }
        1 = { if = { limit = { has_trait = paranoid }   remove_trait = paranoid } }
    }
}
