Exemplo n.º 1
0
        public override void GetWeaponKnockback(Player player, ref float knockback)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            knockback += modPlayer.alchemicalKbAddition;
            knockback *= modPlayer.alchemicalKbMult;
        }
Exemplo n.º 2
0
        public override void GetWeaponDamage(Player player, ref int damage)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            // We want to multiply the damage we do by our alchemicalDamage modifier.
            // todo: ? do we want magic damage to also have effect here?
            damage = (int)(damage * modPlayer.alchemicalDamage + 5E-06f);
        }
Exemplo n.º 3
0
        public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            if (modPlayer.glove)
            {
                for (int i = 0; i < 1; ++i)
                {
                    if (player.FindBuffIndex(mod.BuffType("BottledSpirit")) != -1)
                    {
                        Projectile.NewProjectile(position.X, position.Y, speedX + 2, speedY + 2, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                    }
                    if (player.FindBuffIndex(mod.BuffType("BigBottledSpirit")) != -1)
                    {
                        Projectile.NewProjectile(position.X, position.Y, speedX + 3, speedY + 3, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX + 2, speedY + 2, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX - 2, speedY - 2, 297, damage, knockBack, Main.myPlayer);
                    }
                    Projectile.NewProjectile(position.X, position.Y, speedX + 1, speedY + 1, type, damage, knockBack, Main.myPlayer);
                    int k = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, Main.myPlayer);
                    Main.projectile[k].friendly = true;
                }
                return(false);
            }
            if (player.FindBuffIndex(mod.BuffType("BottledSpirit")) != -1 && !modPlayer.glove)
            {
                for (int i = 0; i < 1; ++i)
                {
                    Projectile.NewProjectile(position.X, position.Y, speedX + 1, speedY + 1, 297, damage, knockBack, Main.myPlayer);
                    int k = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                    Main.projectile[k].friendly = true;
                }
                return(false);
            }
            if (player.FindBuffIndex(mod.BuffType("BigBottledSpirit")) != -1 && !modPlayer.glove)
            {
                for (int i = 0; i < 1; ++i)
                {
                    Projectile.NewProjectile(position.X, position.Y, speedX + 2, speedY + 2, 297, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX + 1, speedY + 1, 297, damage, knockBack, Main.myPlayer);
                    int k = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX - 2, speedY - 2, 297, damage, knockBack, Main.myPlayer);
                    Main.projectile[k].friendly = true;
                }
                return(false);
            }
            return(true);
        }
Exemplo n.º 4
0
        // todo: borked, tml requires update, manual work still needed
        public override void GetWeaponCrit(Player player, ref int crit)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            crit += modPlayer.alchemicalCrit;
        }
Exemplo n.º 5
0
        public override bool ConsumeItem(Item item, Player player)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            if (modPlayer.novaChestplate)
            {
                if (player.FindBuffIndex(mod.BuffType("SuperFlask")) != -1)
                {
                    if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                         item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                         item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                         item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                         item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                         item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                         item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                         item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.65f)
                    {
                        return(false);
                    }
                }
                if (player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) != -1)
                {
                    if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                         item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                         item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                         item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                         item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                         item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                         item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                         item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.85f)
                    {
                        return(false);
                    }
                }
                if (player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) < 1 && player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) < 1)
                {
                    if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                         item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                         item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                         item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                         item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                         item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                         item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                         item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.4f)
                    {
                        return(false);
                    }
                }
            }
            if (player.FindBuffIndex(mod.BuffType("SuperFlask")) != -1)
            {
                if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                     item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                     item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                     item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                     item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                     item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                     item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                     item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.25f)
                {
                    return(false);
                }
            }
            if (player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) != -1 && modPlayer.novaAura)
            {
                if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                     item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                     item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                     item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                     item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                     item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                     item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                     item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.45f)
                {
                    return(false);
                }
            }
            return(base.ConsumeItem(item, player));
        }