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