コード例 #1
0
        /*private void FirstImpression(Personality other, float magnitude)
         * {
         *  Perceptions perceptionsOfOther = new Perceptions();
         *  perceptionsOfOther.Timid_Powerful = other.Timid_Powerful;
         *  perceptionsOfOther.False_Honest = other.False_Honest.Blend(other.Timid_Powerful, 0.5f) * magnitude;
         *  perceptionsOfOther.Bad_Good = (-Timid_Powerful).Blend(perceptionsOfOther.False_Honest, 0.25f) * magnitude;
         * }*/

        public void ResetEmotionalState()
        {
            if (DefaultEmotionalState == null)
            {
                var globalPerceptions = Perceptions[0];
                var selfEsteem        = Perceptions[EntityID];
                DefaultEmotionalState = new EmotionalState();

                DefaultEmotionalState.Dysphoria_Euphoria = selfEsteem.Bad_Good.BlendToBounded(globalPerceptions.Bad_Good);

                // if you see the world as helpless sheep, you'll expect less to get done
                DefaultEmotionalState.Apathy_Passion = globalPerceptions.Timid_Powerful.BlendToBounded(
                    Bad_Good.BlendToBounded(globalPerceptions.Bad_Good), -Timid_Powerful
                    ).Suppress();

                DefaultEmotionalState.Inward_Outward = Timid_Powerful.BlendToBounded(
                    False_Honest.BlendToBounded(globalPerceptions.False_Honest), 0.33f
                    );

                DefaultEmotionalState.Primitive_Controlled = (-DefaultEmotionalState.Inward_Outward).BlendToBounded(
                    -DefaultEmotionalState.Dysphoria_Euphoria.Significance(), 0.66f
                    );
            }
            else
            {
                DefaultEmotionalState.Dysphoria_Euphoria   = DefaultEmotionalState.Dysphoria_Euphoria.BlendToBounded(Emotions.Dysphoria_Euphoria, Constants.EMOTIONAL_INSTABILITY);
                DefaultEmotionalState.Apathy_Passion       = DefaultEmotionalState.Apathy_Passion.BlendToBounded(Emotions.Apathy_Passion, Constants.EMOTIONAL_INSTABILITY);
                DefaultEmotionalState.Inward_Outward       = DefaultEmotionalState.Inward_Outward.BlendToBounded(Emotions.Inward_Outward, Constants.EMOTIONAL_INSTABILITY);
                DefaultEmotionalState.Primitive_Controlled = DefaultEmotionalState.Primitive_Controlled.BlendToBounded(Emotions.Primitive_Controlled, Constants.EMOTIONAL_INSTABILITY);
            }

            Emotions = DefaultEmotionalState.Clone();
        }
コード例 #2
0
        internal void Blend(PersonalityTraits other, BoundedNumber weight, bool assertSecondaryHigher = false)
        {
            //if (Traits.HasFlag(Trait.All))

            if (assertSecondaryHigher)
            {
                Bad_Good = Bad_Good.BlendToBounded(
                    other.Bad_Good,
                    other.Bad_Good > Bad_Good ?
                    weight : -weight
                    );
                False_Honest = False_Honest.BlendToBounded(
                    other.False_Honest,
                    other.False_Honest > False_Honest ?
                    weight : -weight
                    );
                Timid_Powerful = Timid_Powerful.BlendToBounded(
                    other.Timid_Powerful,
                    other.Timid_Powerful > Timid_Powerful ?
                    weight : -weight
                    );
            }
            else
            {
                Bad_Good       = Bad_Good.BlendToBounded(other.Bad_Good, weight);
                False_Honest   = False_Honest.BlendToBounded(other.False_Honest, weight);
                Timid_Powerful = Timid_Powerful.BlendToBounded(other.Timid_Powerful, weight);
            }
        }
コード例 #3
0
        internal void Blend(PersonalityTraits other, float weight)
        {
            //if (Traits.HasFlag(Trait.All))

            Bad_Good       = Bad_Good.BlendToBounded(other.Bad_Good, weight);
            False_Honest   = False_Honest.BlendToBounded(other.False_Honest, weight);
            Timid_Powerful = Timid_Powerful.BlendToBounded(other.Timid_Powerful, weight);
        }
コード例 #4
0
 internal PersonalityTraits BlendToBounded(PersonalityTraits other, BoundedNumber weight)
 {
     //if (Traits.HasFlag(Trait.All))
     return(new PersonalityTraits(
                Bad_Good.BlendToBounded(other.Bad_Good, weight),
                False_Honest.BlendToBounded(other.False_Honest, weight),
                Timid_Powerful.BlendToBounded(other.Timid_Powerful, weight)
                ));
 }