Example #1
0
        public override void UpdateInventory(Player player)
        {
            Huntsman_Player modPlayer = Main.player[Main.myPlayer].GetModPlayer <Huntsman_Player>(mod);

            if (modPlayer.glyphInhibitor == false)
            {
                item.toolTip = "Off";
            }
            else
            {
                item.toolTip = "On";
            }
        }
Example #2
0
        public override bool CanUseItem(Player player)
        {
            Huntsman_Player modPlayer = Main.player[Main.myPlayer].GetModPlayer <Huntsman_Player>(mod);

            if (player.altFunctionUse == 2)
            {
                modPlayer.glyphInhibitor = true;
            }
            else
            {
                modPlayer.glyphInhibitor = false;
            }

            return(base.CanUseItem(player));
        }
Example #3
0
        public override void NearbyEffects(int i, int j, bool closer)
        {
            Huntsman_Player modPlayer = Main.player[Main.myPlayer].GetModPlayer <Huntsman_Player>(mod);
            Player          player    = Main.player[Main.myPlayer];

            if ((player.position.X / 16 <= i + 2) && (player.position.X / 16 >= i - 2) &&
                (player.position.Y / 16 <= j + 5) && (player.position.Y / 16 <= j - 5) &&
                !(modPlayer.glyphInhibitor))
            {
                if (player.velocity.Y > 0.0f)
                {
                    player.velocity.Y += 1.0f;
                }
                else if (player.velocity.Y < 0.0f)
                {
                    player.velocity.Y -= 1.0f;
                }
            }
        }
Example #4
0
        public override void Update(Player player, ref int buffIndex)
        {
            const int       manaLoss  = 4;
            Huntsman_Player modPlayer = Main.player[Main.myPlayer].GetModPlayer <Huntsman_Player>(mod);

            if (player.statMana >= (player.statManaMax / 4))
            {
                modPlayer.canRegen = true;
            }
            if (player.statMana == 0)
            {
                modPlayer.canRegen = false;
            }

            if ((player.statLife < player.statLifeMax) && (player.statMana >= manaLoss) && (modPlayer.canRegen == true))
            {
                player.statMana -= manaLoss;
                player.statLife += 1;
            }
        }