Esempio n. 1
0
 public override float MoodOffset()
 {
     if (ThoughtUtility.ThoughtNullified(pawn, def))
     {
         return(0f);
     }
     return(base.MoodOffset() * moodPowerFactor);
 }
 public virtual float OpinionOffset()
 {
     if (ThoughtUtility.ThoughtNullified(pawn, def))
     {
         return(0f);
     }
     if (ShouldDiscard)
     {
         return(0f);
     }
     return(opinionOffset * AgeFactor);
 }
 public override float OpinionOffset()
 {
     if (ThoughtUtility.ThoughtNullified(pawn, def))
     {
         return(0f);
     }
     if (ShouldDiscard)
     {
         return(0f);
     }
     return(Mathf.Min(opinionOffset, def.maxCumulatedOpinionOffset));
 }
Esempio n. 4
0
        public virtual float OpinionOffset()
        {
            if (ThoughtUtility.ThoughtNullified(pawn, def))
            {
                return(0f);
            }
            float num = base.CurStage.baseOpinionOffset;

            if (def.effectMultiplyingStat != null)
            {
                num *= pawn.GetStatValue(def.effectMultiplyingStat) * otherPawn.GetStatValue(def.effectMultiplyingStat);
            }
            return(num);
        }
        public override float MoodOffset()
        {
            if (ThoughtUtility.ThoughtNullified(pawn, def))
            {
                return(0f);
            }
            QuestPart_SituationalThought questPart_SituationalThought = ((ThoughtWorker_QuestPart)def.Worker).FindQuestPart(pawn);

            if (questPart_SituationalThought == null)
            {
                return(0f);
            }
            float x = (float)TicksSinceQuestUnmet(questPart_SituationalThought) / 60000f;

            return(Mathf.RoundToInt(MoodOffsetFromUnmetDaysCurve.Evaluate(x)));
        }
Esempio n. 6
0
        public override float MoodOffset()
        {
            if (ThoughtUtility.ThoughtNullified(pawn, def))
            {
                return(0f);
            }
            if (ShouldDiscard)
            {
                return(0f);
            }
            float num       = base.MoodOffset();
            float num2      = Mathf.Lerp(-1f, 1f, harmonizer.pawn.needs.mood.CurLevel);
            float statValue = harmonizer.pawn.GetStatValue(StatDefOf.PsychicSensitivity);

            return(num * num2 * statValue);
        }
        public override float OpinionOffset()
        {
            if (ThoughtUtility.ThoughtNullified(pawn, def))
            {
                return(0f);
            }
            Tale latestTale = Find.TaleManager.GetLatestTale(def.taleDef, otherPawn);

            if (latestTale != null)
            {
                float num = 1f;
                if (latestTale.def.type == TaleType.Expirable)
                {
                    float value = (float)latestTale.AgeTicks / (latestTale.def.expireDays * 60000f);
                    num = Mathf.InverseLerp(1f, def.lerpOpinionToZeroAfterDurationPct, value);
                }
                return(base.CurStage.baseOpinionOffset * num);
            }
            return(0f);
        }
Esempio n. 8
0
        public virtual float MoodOffset()
        {
            if (CurStage == null)
            {
                Log.Error("CurStage is null while ShouldDiscard is false on " + def.defName + " for " + pawn);
                return(0f);
            }
            if (ThoughtUtility.ThoughtNullified(pawn, def))
            {
                return(0f);
            }
            float num = BaseMoodOffset;

            if (def.effectMultiplyingStat != null)
            {
                num *= pawn.GetStatValue(def.effectMultiplyingStat);
            }
            if (def.Worker != null)
            {
                num *= def.Worker.MoodMultiplier(pawn);
            }
            return(num);
        }