Example #1
0
        public void ReceiveWorship(Pawn preacher)
        {
            int preacherSoc = preacher.skills.GetSkill(SkillDefOf.Social).Level;
            List <Pawn>
            congregation =
                CultTracker.Get.PlayerCult
                .members;         //preacher.Map.GetComponent<MapComponent_LocalCultTracker>().LocalCultMembers;

            if (preacher == null)
            {
                Log.Error("Preacher is null.");
            }
            if (congregation == null)
            {
                Log.Error("Congregation is null");
            }
            float value = (float)Math.Max(1, (preacherSoc));

            if (value != 0)
            {
                value /= (20 * ((float)((int)PlayerTier + 1)));
            }
            bool perfect           = false;
            bool sacrificialDagger = false;

            value += CultUtility.CongregationBonus(congregation, this, out perfect, out sacrificialDagger);
            Cthulhu.Utility.DebugReport("Worship Value: " + value.ToString());
            AffectFavor(value);
        }
Example #2
0
        public void ReceiveSacrifice(Pawn sacrifice, Map map, bool favorSpell = false, bool starsAreRight = false,
                                     bool starsAreWrong = false)
        {
            var tracker = map.GetComponent <MapComponent_SacrificeTracker>();
            var value   =
                (sacrifice.MarketValue + SacrificeBonus(sacrifice, map, favorSpell, starsAreRight, starsAreWrong)) /
                DIVIDER_HUMAN;

            value += CultUtility.CongregationBonus(tracker.lastUsedAltar.SacrificeData.Congregation, this, out _,
                                                   out _);
            Utility.DebugReport("Sacrifice Value: " + value);
            AffectFavor(value);
        }
Example #3
0
        public void ReceiveSacrifice(Pawn sacrifice, Map map, bool favorSpell = false, bool starsAreRight = false,
                                     bool starsAreWrong = false)
        {
            MapComponent_SacrificeTracker tracker = map.GetComponent <MapComponent_SacrificeTracker>();
            float value =
                (sacrifice.MarketValue + SacrificeBonus(sacrifice, map, favorSpell, starsAreRight, starsAreWrong)) /
                DIVIDER_HUMAN;
            bool perfect           = false;
            bool sacrificialDagger = false;

            value += CultUtility.CongregationBonus(tracker.lastUsedAltar.SacrificeData.Congregation, this, out perfect,
                                                   out sacrificialDagger);
            Cthulhu.Utility.DebugReport("Sacrifice Value: " + value.ToString());
            AffectFavor(value);
        }
Example #4
0
        public void ReceiveWorship(Pawn preacher)
        {
            var preacherSoc = preacher.skills.GetSkill(SkillDefOf.Social).Level;
            var
                congregation =
                CultTracker.Get.PlayerCult
                .members;         //preacher.Map.GetComponent<MapComponent_LocalCultTracker>().LocalCultMembers;

            if (congregation == null)
            {
                Log.Error("Congregation is null");
            }

            var value = (float)Math.Max(1, preacherSoc);

            if (value != 0)
            {
                value /= 20 * (float)((int)PlayerTier + 1);
            }

            value += CultUtility.CongregationBonus(congregation, this, out _, out _);
            Utility.DebugReport("Worship Value: " + value);
            AffectFavor(value);
        }