Ejemplo n.º 1
0
        public override bool Shoot(Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
        {
            if (!item.melee && !item.ranged && !item.magic && !item.summon && !item.thrown && item.mana > 0)            //Checking if item is a void item (possibly temporary until a more optimal check is put in place)
            {
                player.statMana += item.mana;

                int voidMana = item.mana;
                voidMana = (int)(voidMana * VoidPlayer.ModPlayer(player).voidCost);

                int    chargeInt = (int)VoidPlayer.ModPlayer(player).voidMeter;
                string text      = chargeInt.ToString();;
                //Main.NewText("Void = " + text, 195, 145, 0);

                VoidPlayer.ModPlayer(player).voidMeter -= voidMana;
                if (VoidPlayer.ModPlayer(player).voidMeter < 0)
                {
                    player.statLife -= voidMana;
                    if (player.statLife < 1)
                    {
                        player.statLife = 1;
                    }
                }

                chargeInt = (int)VoidPlayer.ModPlayer(player).voidMeter;
                text      = chargeInt.ToString();;
                //Main.NewText("Void = " + text, 195, 145, 0);
                if (item.shoot != 10)
                {
                    return(true);
                }
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
        public override void GetWeaponDamage(Item item, ref int damage)
        {
            int voidMana = item.mana;

            voidMana = (int)(voidMana * VoidPlayer.ModPlayer(player).voidCost);
        }