Ejemplo n.º 1
0
 public EmotionalState()
 {
     Apathy_Passion       = new BoundedNumber();
     Dysphoria_Euphoria   = new BoundedNumber();
     Inward_Outward       = new BoundedNumber();
     Primitive_Controlled = new BoundedNumber();
 }
Ejemplo n.º 2
0
 internal PersonalityTraits(BoundedNumber badGood, BoundedNumber falseHonest, BoundedNumber timidPowerful, Trait traits)
 {
     Bad_Good       = badGood;
     False_Honest   = falseHonest;
     Timid_Powerful = timidPowerful;
     Traits         = traits;
 }
Ejemplo n.º 3
0
 public PersonalityTraits()
 {
     Bad_Good       = new BoundedNumber();
     False_Honest   = new BoundedNumber();
     Timid_Powerful = new BoundedNumber();
     Traits         = Trait.None;
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 5
0
 public VerbTargetInfo(ushort id, bool isYou, float relationship)
 {
     EntityID      = id;
     IsYou         = isYou;
     Relationship  = relationship;
     GetTraits     = null;
     AffectsTarget = true;
     KnowThemWell  = new BoundedNumber();
 }
Ejemplo n.º 6
0
 public VerbTargetInfo(ushort id)
 {
     KnowThemWell  = new BoundedNumber();
     EntityID      = id;
     IsYou         = false;
     Relationship  = 0;
     GetTraits     = null;
     AffectsTarget = true;
 }
Ejemplo n.º 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)
                ));
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 9
0
 public Actor(string name, BoundedNumber badGood, BoundedNumber falseHonest, BoundedNumber timidPowerful) : this(name)
 {
     Bad_Good       = badGood;
     False_Honest   = falseHonest;
     Timid_Powerful = timidPowerful;
 }
Ejemplo n.º 10
0
 public BoundedNumber SumToBounded() =>
 BoundedNumber.FromUnboundedNumber(Bad_Good + False_Honest + Timid_Powerful);
Ejemplo n.º 11
0
 public static float BlendUnbounded(float num1, float num2, float weightingFactor) =>
 (BoundedNumber._fromUnbounded(num2) * weightingFactor) +
 (BoundedNumber._fromUnbounded(num1) * (1f - weightingFactor));