示例#1
0
 public EmotionalState()
 {
     Apathy_Passion       = new BoundedNumber();
     Dysphoria_Euphoria   = new BoundedNumber();
     Inward_Outward       = new BoundedNumber();
     Primitive_Controlled = new BoundedNumber();
 }
示例#2
0
 internal PersonalityTraits(BoundedNumber badGood, BoundedNumber falseHonest, BoundedNumber timidPowerful, Trait traits)
 {
     Bad_Good       = badGood;
     False_Honest   = falseHonest;
     Timid_Powerful = timidPowerful;
     Traits         = traits;
 }
示例#3
0
 public PersonalityTraits()
 {
     Bad_Good       = new BoundedNumber();
     False_Honest   = new BoundedNumber();
     Timid_Powerful = new BoundedNumber();
     Traits         = Trait.None;
 }
示例#4
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);
            }
        }
示例#5
0
 public VerbTargetInfo(ushort id, bool isYou, float relationship)
 {
     EntityID      = id;
     IsYou         = isYou;
     Relationship  = relationship;
     GetTraits     = null;
     AffectsTarget = true;
     KnowThemWell  = new BoundedNumber();
 }
示例#6
0
 public VerbTargetInfo(ushort id)
 {
     KnowThemWell  = new BoundedNumber();
     EntityID      = id;
     IsYou         = false;
     Relationship  = 0;
     GetTraits     = null;
     AffectsTarget = true;
 }
示例#7
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)
                ));
 }
示例#8
0
        public PersonalityTraits(BoundedNumber badGood, BoundedNumber falseHonest, BoundedNumber timidPowerful)
        {
            Bad_Good       = badGood;
            False_Honest   = falseHonest;
            Timid_Powerful = timidPowerful;

            Traits = Trait.None;
            if (Bad_Good.Number != 0)
            {
                Traits |= Trait.Bad_Good;
            }
            if (False_Honest.Number != 0)
            {
                Traits |= Trait.False_Honest;
            }
            if (Timid_Powerful.Number != 0)
            {
                Traits |= Trait.Timid_Powerful;
            }
        }
示例#9
0
 public Actor(string name, BoundedNumber badGood, BoundedNumber falseHonest, BoundedNumber timidPowerful) : this(name)
 {
     Bad_Good       = badGood;
     False_Honest   = falseHonest;
     Timid_Powerful = timidPowerful;
 }
示例#10
0
 public BoundedNumber SumToBounded() =>
 BoundedNumber.FromUnboundedNumber(Bad_Good + False_Honest + Timid_Powerful);
示例#11
0
 public static float BlendUnbounded(float num1, float num2, float weightingFactor) =>
 (BoundedNumber._fromUnbounded(num2) * weightingFactor) +
 (BoundedNumber._fromUnbounded(num1) * (1f - weightingFactor));