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); } }
internal static (Perception, Reaction) FromFirstImpression(PersonalityTraits other, Perception globalPerceptions, ushort verbID, ushort targetID, bool notTarget, float verbIntensity, TraitsVector reactorTraits) { // personaliy vs circumstance var perceptions = new Perception(other, 1 - verbIntensity); perceptions.Blend(globalPerceptions, 0.75f); perceptions.CircumferentialValues = globalPerceptions.CircumferentialValues; ++perceptions.TotalPerceptions; ++globalPerceptions.TotalPerceptions; //perceptions._personalFirstImpression = !notTarget; //perceptions._firstImpressionIntensity = verbIntensity; ObservedVerb verb = new ObservedVerb(verbID); var actionTraits = verb.GetTraits().ApplyMagnitude(verbIntensity); perceptions.AddVector(actionTraits); return( perceptions, new Reaction( (reactorTraits - actionTraits).SumToBounded(), (perceptions - actionTraits).SumToBounded(), actionTraits, 1f, verbIntensity ) ); }
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); }
public Reaction(UBoundedNumber agreement, UBoundedNumber surprise, UBoundedNumber significance, TraitsVector totalDissonance) { Agreement = agreement; Surprise = surprise; Significance = significance; TotalDissonance = totalDissonance; ExpressiveDissonance = null; CharacterDissonance = null; }
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) )); }
public Perception(PersonalityTraits other, float magnitudeOfFirstImpression = 0.25f) { TotalPerceptions = 0; ObservedActions = new SortedDictionary <ushort, ObservedVerb>(); CircumferentialValues = new SortedDictionary <ushort, PersonalityTraits>(); Timid_Powerful = other.Timid_Powerful * magnitudeOfFirstImpression; False_Honest = other.False_Honest.Blend(other.Timid_Powerful, 0.5f) * magnitudeOfFirstImpression; Bad_Good = (-Timid_Powerful).Blend(False_Honest, 0.25f) * magnitudeOfFirstImpression; Traits = Trait.All; //_traits = this; }