예제 #1
0
        ////////////////

        private static bool ApplyParasitesIf(Player player, bool sync)
        {
            if (!player.ZoneJungle || !player.wet || player.honeyWet || player.lavaWet)
            {
                return(false);
            }

            var myplayer = player.GetModPlayer <GreenHellPlayer>();

            if (myplayer.HasVerdantBlessing())
            {
                return(false);
            }

            var   config      = GreenHellConfig.Instance;
            float chance      = config.Get <float>(nameof(config.ParasiteChancePerSecond));
            bool  parasiteGet = chance > Main.rand.NextFloat();

            if (parasiteGet)
            {
                ParasitesDeBuff.GiveTo(player, sync);
            }

            return(parasiteGet);
        }
예제 #2
0
        ////

        public static void UpdateLifeEffectsIfParasites(Player player)
        {
            if (player.HasBuff(ModContent.BuffType <ParasitesDeBuff>()))
            {
                ParasitesDeBuff.UpdateLifeEffects(player);
            }
        }