Пример #1
0
        ////

        private static bool CanSpiritWalkWithMana(Player player)
        {
            if (SpiritWalkLogic.ManaCostDuration > 0)
            {
                return(true);
            }

            var config       = SpiritWalkingConfig.Instance;
            int manaCostRate = config.Get <int>(nameof(config.PerRateSpiritWalkManaCost));

            return(SpiritWalkLogic.HasMana(player, manaCostRate, out string _));
        }
Пример #2
0
        private static bool ApplyActivateManaCostIf(Player player)
        {
            var config   = SpiritWalkingConfig.Instance;
            int manaCost = config.Get <int>(nameof(config.InitialSpiritWalkManaCost));

            if (!SpiritWalkLogic.HasMana(player, manaCost, out string status))
            {
                Main.NewText(status, Color.Yellow);

                return(false);
            }

            SpiritWalkLogic.EmulatedMana = player.statMana;

            SpiritWalkLogic.ApplyManaDraw(player, manaCost);

            return(true);
        }