コード例 #1
0
        public override void AI()
        {
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);

            if (player.dead)
            {
                modPlayer.BloodSlime = false;
            }
            if (modPlayer.BloodSlime)
            {
                projectile.timeLeft = 2;
            }

            TrailCounter++;
            if (TrailCounter >= 15)
            {
                Vector2 velVect  = new Vector2(projectile.velocity.X / 2, projectile.velocity.Y / 2);
                Vector2 velVect2 = velVect.RotatedBy(MathHelper.ToRadians(Main.rand.Next(-25, 25)));

                int p = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, velVect2.X, velVect2.Y, mod.ProjectileType("BloodTrail"), projectile.damage, projectile.knockBack, projectile.owner);
                ProjectileID.Sets.MinionShot[Main.projectile[p].type] = true;
                TrailCounter = 0;
            }

            Lighting.AddLight(projectile.Center, 0.5f, 0.2f, 0f);
        }
コード例 #2
0
        public override void AI()
        {
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);

            if (modPlayer.slimeGuard)
            {
                projectile.timeLeft = 2;
            }
            else
            {
                projectile.Kill();
            }
        }
コード例 #3
0
        public override void CheckActive()
        {
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);

            if (player.dead)
            {
                modPlayer.BlightstoneDragon = false;
            }
            if (modPlayer.BlightstoneDragon)
            {
                projectile.timeLeft = 2;
            }
        }
コード例 #4
0
        public override void AI()
        {
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = (TgemPlayer)player.GetModPlayer(mod, "TgemPlayer");

            if (player.dead)
            {
                modPlayer.EaterMinion = false;
            }
            if (modPlayer.EaterMinion)
            {
                projectile.timeLeft = 2;
            }
        }
コード例 #5
0
        public override void Update(Player player, ref int buffIndex)
        {
            TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);

            if (player.ownedProjectileCounts[mod.ProjectileType("ShadowflameSpirit")] > 0)
            {
                modPlayer.ShadowflameSpirit = true;
            }
            if (!modPlayer.ShadowflameSpirit)
            {
                player.DelBuff(buffIndex);
                buffIndex--;
            }
            else
            {
                player.buffTime[buffIndex] = 18000;
            }
        }
コード例 #6
0
        public override void Update(Player player, ref int buffIndex)
        {
            TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);

            if (player.ownedProjectileCounts[mod.ProjectileType("BlightstoneDragon")] > 0)
            {
                modPlayer.BlightstoneDragon = true;
            }
            if (!modPlayer.BlightstoneDragon)
            {
                player.DelBuff(buffIndex);
                buffIndex--;
            }
            else
            {
                player.buffTime[buffIndex] = 18000;
            }
        }
コード例 #7
0
        public override void AI()
        {
            bool       flag64    = projectile.type == mod.ProjectileType("Servant");
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);

            if (flag64)
            {
                if (player.dead)
                {
                    modPlayer.Servant = false;
                }
                if (modPlayer.Servant)
                {
                    projectile.timeLeft = 2;
                }
            }
        }
コード例 #8
0
        public override void AI()
        {
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = (TgemPlayer)player.GetModPlayer(mod, "TgemPlayer");

            for (int k = 0; k < 200; k++)
            {
                if (Main.projectile[k].active && Main.projectile[k].type == mod.ProjectileType("BlightOrb") && Main.projectile[k].owner == projectile.owner)
                {
                    projectile.Center = Main.projectile[k].Center;
                }
            }

            projectile.rotation += 0.1f;

            if (modPlayer.BlightOrb)
            {
                projectile.timeLeft = 2;
            }
        }
コード例 #9
0
        public override void AI()
        {
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = (TgemPlayer)player.GetModPlayer(mod, "TgemPlayer");

            if (player.dead)
            {
                modPlayer.ShadowflameSpirit = false;
            }
            if (modPlayer.ShadowflameSpirit)
            {
                projectile.timeLeft = 2;
            }
            for (int i = 0; i <= 3; i++)
            {
                int dust;
                dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
                Main.dust[dust].scale = 0.7f;
            }
        }
コード例 #10
0
        public override void AI()
        {
            projectile.velocity = Vector2.Zero;
            float num1069 = 1000f;

            {
                projectile.alpha -= 5;
                if (projectile.alpha < 0)
                {
                    projectile.alpha = 0;
                }
                if (projectile.direction == 0)
                {
                    projectile.direction = Main.player[projectile.owner].direction;
                }
                int num3 = projectile.frameCounter + 1;
                projectile.frameCounter = num3;
                if (num3 >= 3)
                {
                    projectile.frameCounter = 0;
                    num3             = projectile.frame + 1;
                    projectile.frame = num3;
                    if (num3 >= Main.projFrames[projectile.type])
                    {
                        projectile.frame = 0;
                    }
                }
                if (projectile.alpha == 0 && Main.rand.Next(15) == 0)
                {
                    Dust dust128 = Main.dust[Dust.NewDust(projectile.Top, 0, 0, 135, 0f, 0f, 100, default(Color), 1f)];
                    dust128.velocity.X = 0f;
                    dust128.noGravity  = true;
                    dust128.fadeIn     = 1f;
                    dust128.position   = projectile.Center + Vector2.UnitY.RotatedByRandom(6.2831854820251465) * (4f * Main.rand.NextFloat() + 26f);
                    dust128.scale      = 0.5f;
                }
                projectile.localAI[0] += 1f;
                if (projectile.localAI[0] >= 60f)
                {
                    projectile.localAI[0] = 0f;
                }
            }
            if (projectile.ai[0] < 0f)
            {
                projectile.ai[0] += 1f;
                //if (flag69)
                //{
                projectile.ai[1] -= (float)projectile.direction * 0.3926991f / 50f;
                //}
            }
            if (projectile.ai[0] == 0f)
            {
                int   num1071 = -1;
                float num1072 = num1069;
                NPC   ownerMinionAttackTargetNPC6 = projectile.OwnerMinionAttackTargetNPC;
                if (ownerMinionAttackTargetNPC6 != null && ownerMinionAttackTargetNPC6.CanBeChasedBy(this, false))
                {
                    float num1073 = projectile.Distance(ownerMinionAttackTargetNPC6.Center);
                    if (num1073 < num1072 && Collision.CanHitLine(projectile.Center, 0, 0, ownerMinionAttackTargetNPC6.Center, 0, 0))
                    {
                        num1072 = num1073;
                        num1071 = ownerMinionAttackTargetNPC6.whoAmI;
                    }
                }
                if (num1071 < 0)
                {
                    int num3;
                    for (int num1074 = 0; num1074 < 200; num1074 = num3 + 1)
                    {
                        NPC nPC16 = Main.npc[num1074];
                        if (nPC16.CanBeChasedBy(this, false))
                        {
                            float num1075 = projectile.Distance(nPC16.Center);
                            if (num1075 < num1072 && Collision.CanHitLine(projectile.Center, 0, 0, nPC16.Center, 0, 0))
                            {
                                num1072 = num1075;
                                num1071 = num1074;
                            }
                        }
                        num3 = num1074;
                    }
                }
                if (num1071 != -1)
                {
                    projectile.ai[0]     = 1f;
                    projectile.ai[1]     = (float)num1071;
                    projectile.netUpdate = true;
                    return;
                }
            }
            if (projectile.ai[0] > 0f)
            {
                int num1076 = (int)projectile.ai[1];
                if (!Main.npc[num1076].CanBeChasedBy(this, false))
                {
                    projectile.ai[0]     = 0f;
                    projectile.ai[1]     = 0f;
                    projectile.netUpdate = true;
                    return;
                }
                projectile.ai[0] += 1f;
                float num1077 = 30f;
                if (projectile.ai[0] >= num1077)
                {
                    Vector2 vector152 = projectile.DirectionTo(Main.npc[num1076].Center);
                    if (vector152.HasNaNs())
                    {
                        vector152 = Vector2.UnitY;
                    }
                    float num1078 = vector152.ToRotation();
                    int   num1079 = (vector152.X > 0f) ? 1 : -1;
                    projectile.direction = num1079;
                    projectile.ai[0]     = -60f;
                    projectile.ai[1]     = num1078 + (float)num1079 * 3.14159274f / 16f;
                    projectile.netUpdate = true;
                    Player     player    = Main.player[projectile.owner];
                    Mod        mod       = ModLoader.GetMod("ForgottenMemories");
                    TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);
                    if (projectile.owner == Main.myPlayer && modPlayer.cryotine1 == true)
                    {
                        int p = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector152.X * 4, vector152.Y * 4, mod.ProjectileType("PermafrostThing"), (int)(projectile.damage * 1.2), projectile.knockBack, projectile.owner, 0f, (float)projectile.whoAmI);
                        Main.projectile[p].GetGlobalProjectile <Info>(mod).FrostCrystal = true;
                        Main.projectile[p].GetGlobalProjectile <Info>(mod).Shroom       = true;
                        //Main.projectile[p].extraUpdates = 2;
                        Main.projectile[p].height = 4;
                        Main.projectile[p].width  = 4;
                    }

                    else if (projectile.owner == Main.myPlayer)
                    {
                        int p = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector152.X * 3, vector152.Y * 3, mod.ProjectileType("PermafrostThing"), projectile.damage, projectile.knockBack, projectile.owner, 0f, (float)projectile.whoAmI);
                        Main.projectile[p].GetGlobalProjectile <Info>(mod).FrostCrystal = true;
                        Main.projectile[p].height = 4;
                        Main.projectile[p].width  = 4;
                    }
                }
            }
        }
コード例 #11
0
        public override void AI()
        {
            Player     player    = Main.player[projectile.owner];
            TgemPlayer modPlayer = player.GetModPlayer <TgemPlayer>(mod);

            if (player.dead)
            {
                modPlayer.BlightOrb = false;
            }
            if (modPlayer.BlightOrb)
            {
                projectile.timeLeft = 2;
            }

            Lighting.AddLight(projectile.Center, 0.4f, 0.4f, 0f);
            if ((double)projectile.localAI[1] > 0.0)
            {
                --projectile.localAI[1];
            }


            if ((double)projectile.ai[0] == 2.0)
            {
                --projectile.ai[1];
                projectile.tileCollide = false;
                if ((double)projectile.ai[1] > 3.0)
                {
                    if (projectile.numUpdates < 20)
                    {
                        for (int index = 0; index < 3; ++index)
                        {
                            Dust dust = Main.dust[Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, 0.0f, 0.0f, 0, new Color(), 1f)];
                            dust.noGravity = true;
                            dust.position  = projectile.Center;
                            dust.velocity *= 3f;
                            dust.velocity += projectile.velocity * 3f;
                            dust.fadeIn    = 1f;
                        }
                    }

                    float num1 = (float)(2.0 - (double)projectile.numUpdates / 30.0);
                    if ((double)projectile.scale > 0.0)
                    {
                        float num2 = 2f;
                        for (int index = 0; (double)index < (double)num2; ++index)
                        {
                            Dust dust = Main.dust[Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, 0.0f, 0.0f, 0, new Color(), 1f)];
                            dust.noGravity = true;
                            dust.position  = projectile.Center + Vector2.UnitY.RotatedBy((double)projectile.numUpdates * 0.104719758033752 + (double)projectile.whoAmI * 0.785398185253143 + 1.57079637050629, new Vector2()) * (float)(projectile.height / 2) - projectile.velocity * ((float)index / num2);
                            dust.velocity  = projectile.velocity / 3f;
                            dust.fadeIn    = num1 / 2f;
                            dust.scale     = num1;
                        }
                    }
                }

                if ((double)projectile.ai[1] != 0.0)
                {
                    return;
                }
                projectile.ai[1] = 30f;
                projectile.ai[0] = 0.0f;
                Vector2 vector2 = projectile.velocity / 5f;
                projectile.velocity     = vector2;
                projectile.velocity.Y   = 0.0f;
                projectile.extraUpdates = 0;
                projectile.numUpdates   = 0;
                projectile.netUpdate    = true;
                float num = 15f;
                for (int index = 0; (double)index < (double)num; ++index)
                {
                    Dust dust = Main.dust[Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, 0.0f, 0.0f, 0, new Color(), 1f)];
                    dust.noGravity = true;
                    dust.position  = projectile.Center - projectile.velocity * 5f;
                    dust.velocity *= 3f;
                    dust.velocity += projectile.velocity * 3f;
                    dust.fadeIn    = 1f;
                    if (Main.rand.Next(3) != 0)
                    {
                        dust.fadeIn    = 2f;
                        dust.scale     = 2f;
                        dust.velocity /= 8f;
                    }
                }
                for (int index = 0; (double)index < (double)num; ++index)
                {
                    Dust dust = Main.dust[Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, 0.0f, 0.0f, 0, new Color(), 1f)];
                    dust.noGravity = true;
                    dust.position  = projectile.Center;
                    dust.velocity *= 3f;
                    dust.velocity += projectile.velocity * 3f;
                    dust.fadeIn    = 1f;
                    if (Main.rand.Next(3) != 0)
                    {
                        dust.fadeIn    = 2f;
                        dust.scale     = 2f;
                        dust.velocity /= 8f;
                    }
                }
                projectile.extraUpdates = 0;
                projectile.numUpdates   = 0;
            }
            if (projectile.extraUpdates > 1)
            {
                projectile.extraUpdates = 0;
            }
            if (projectile.numUpdates > 1)
            {
                projectile.numUpdates = 0;
            }

            if ((double)projectile.localAI[0] > 0.0)
            {
                --projectile.localAI[0];
            }

            float num3  = 0.05f;
            float width = (float)projectile.width;

            for (int index = 0; index < 1000; ++index)
            {
                if (index != projectile.whoAmI && Main.projectile[index].active && (Main.projectile[index].owner == projectile.owner && Main.projectile[index].type == projectile.type) && (double)Math.Abs(projectile.position.X - Main.projectile[index].position.X) + (double)Math.Abs(projectile.position.Y - Main.projectile[index].position.Y) < (double)width)
                {
                    if ((double)projectile.position.X < (double)Main.projectile[index].position.X)
                    {
                        projectile.velocity.X -= num3;
                    }
                    else
                    {
                        projectile.velocity.X += num3;
                    }
                    if ((double)projectile.position.Y < (double)Main.projectile[index].position.Y)
                    {
                        projectile.velocity.Y -= num3;
                    }
                    else
                    {
                        projectile.velocity.Y += num3;
                    }
                }
            }
            Vector2 vector2_1 = projectile.position;
            float   num4      = 300f;
            bool    flag      = false;
            int     num5      = -1;

            projectile.tileCollide = true;

            Vector2 center                = Main.player[projectile.owner].Center;
            Vector2 vector2_2             = new Vector2(0.5f);
            NPC     minionAttackTargetNpc = projectile.OwnerMinionAttackTargetNPC;

            if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object)this, false))
            {
                Vector2 vector2_3 = minionAttackTargetNpc.position + minionAttackTargetNpc.Size * vector2_2;
                float   num1      = Vector2.Distance(vector2_3, center);
                if (((double)Vector2.Distance(center, vector2_1) > (double)num1 && (double)num1 < (double)num4 || !flag) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, minionAttackTargetNpc.position, minionAttackTargetNpc.width, minionAttackTargetNpc.height))
                {
                    num4      = num1;
                    vector2_1 = vector2_3;
                    flag      = true;
                    num5      = minionAttackTargetNpc.whoAmI;
                }
            }
            if (!flag)
            {
                for (int index = 0; index < 200; ++index)
                {
                    NPC npc = Main.npc[index];
                    if (npc.CanBeChasedBy((object)this, false))
                    {
                        Vector2 vector2_3 = npc.position + npc.Size * vector2_2;
                        float   num1      = Vector2.Distance(vector2_3, center);
                        if (((double)Vector2.Distance(center, vector2_1) > (double)num1 && (double)num1 < (double)num4 || !flag) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
                        {
                            num4      = num1;
                            vector2_1 = vector2_3;
                            flag      = true;
                            num5      = index;
                        }
                    }
                }
            }

            int num6 = 1350;

            if ((double)Vector2.Distance(player.Center, projectile.Center) > (double)num6)
            {
                projectile.ai[0]     = 1f;
                projectile.netUpdate = true;
            }
            if ((double)projectile.ai[0] == 1.0)
            {
                projectile.tileCollide = false;
            }
            if (flag && (double)projectile.ai[0] == 0.0)
            {
                vector2_2 = vector2_1 - projectile.Center;
                float num1 = vector2_2.Length();
                vector2_2.Normalize();

                Vector2 vector2_3 = vector2_1;
                Vector2 vector2_4 = projectile.Center - vector2_3;
                if (vector2_4 == Vector2.Zero)
                {
                    vector2_4 = -Vector2.UnitY;
                }
                vector2_4.Normalize();
                Vector2 vector2_5 = vector2_3 + vector2_4 * 60f;
                int     index     = (int)vector2_5.Y / 16;
                if (index < 0)
                {
                    index = 0;
                }
                Tile tile1 = Main.tile[(int)vector2_5.X / 16, index];
                if (tile1 != null && tile1.active() && (Main.tileSolid[(int)tile1.type] && !Main.tileSolidTop[(int)tile1.type]))
                {
                    vector2_5 += Vector2.UnitY * 16f;
                    Tile tile2 = Main.tile[(int)vector2_5.X / 16, (int)vector2_5.Y / 16];
                    if (tile2 != null && tile2.active() && (Main.tileSolid[(int)tile2.type] && !Main.tileSolidTop[(int)tile2.type]))
                    {
                        vector2_5 += Vector2.UnitY * 16f;
                    }
                }
                vector2_2 = vector2_5 - projectile.Center;
                num1      = vector2_2.Length();
                vector2_2.Normalize();
                if ((double)num1 > 400.0 && (double)num1 <= 800.0 && (double)projectile.localAI[0] == 0.0)
                {
                    projectile.ai[0]        = 2f;
                    projectile.ai[1]        = (float)(int)((double)num1 / 10.0);
                    projectile.extraUpdates = (int)projectile.ai[1];
                    projectile.velocity     = vector2_2 * 10f;
                    projectile.localAI[0]   = 60f;
                    return;
                }


                if ((double)num1 > 200.0)
                {
                    float num2 = 6f;
                    vector2_3             = vector2_2 * num2;
                    projectile.velocity.X = (float)(((double)projectile.velocity.X * 40.0 + (double)vector2_3.X) / 41.0);
                    projectile.velocity.Y = (float)(((double)projectile.velocity.Y * 40.0 + (double)vector2_3.Y) / 41.0);
                }

                else
                {
                    if ((double)num1 > 70.0 && (double)num1 < 130.0)
                    {
                        float num2 = 7f;
                        if ((double)num1 < 100.0)
                        {
                            num2 = -3f;
                        }
                        vector2_3           = vector2_2 * num2;
                        projectile.velocity = (projectile.velocity * 20f + vector2_3) / 21f;
                        if ((double)Math.Abs(vector2_3.X) > (double)Math.Abs(vector2_3.Y))
                        {
                            projectile.velocity.X = (float)(((double)projectile.velocity.X * 10.0 + (double)vector2_3.X) / 11.0);
                        }
                    }
                    else
                    {
                        vector2_3           = projectile.velocity * 0.97f;
                        projectile.velocity = vector2_3;
                    }
                }
            }

            else
            {
                if (!Collision.CanHitLine(projectile.Center, 1, 1, Main.player[projectile.owner].Center, 1, 1))
                {
                    projectile.ai[0] = 1f;
                }
                float num1 = 6f;
                if ((double)projectile.ai[0] == 1.0)
                {
                    num1 = 15f;
                }
                vector2_2 = player.Center - projectile.Center + new Vector2(0.0f, -60f);
                float num7 = vector2_2.Length();
                if ((double)num7 > 200.0 && (double)num1 < 9.0)
                {
                    num1 = 9f;
                }
                if ((double)num7 < 100.0 && (double)projectile.ai[0] == 1.0 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height))
                {
                    projectile.ai[0]     = 0.0f;
                    projectile.netUpdate = true;
                }
                if ((double)num7 > 2000.0)
                {
                    projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
                    projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.width / 2);
                }

                if ((double)num7 > 70.0)
                {
                    vector2_2.Normalize();
                    vector2_2          *= num1;
                    projectile.velocity = (projectile.velocity * 20f + vector2_2) / 21f;
                }

                else
                {
                    if ((double)projectile.velocity.X == 0.0 && (double)projectile.velocity.Y == 0.0)
                    {
                        projectile.velocity.X = -0.15f;
                        projectile.velocity.Y = -0.05f;
                    }
                    Vector2 vector2_3 = projectile.velocity * 1.01f;
                    projectile.velocity = vector2_3;
                }
            }

            //num1 = 3;

            if ((double)projectile.velocity.X > 0.0)
            {
                projectile.spriteDirection = projectile.direction = -1;
            }
            else if ((double)projectile.velocity.X < 0.0)
            {
                projectile.spriteDirection = projectile.direction = 1;
            }

            if ((double)projectile.ai[1] > 0.0)
            {
                ++projectile.ai[1];
                if (Main.rand.Next(3) != 0)
                {
                    ++projectile.ai[1];
                }
            }
            if ((double)projectile.ai[1] > 60.0)
            {
                projectile.ai[1]     = 0.0f;
                projectile.netUpdate = true;
            }

            if ((double)projectile.ai[0] != 0.0)
            {
                return;
            }
            float num8 = 14f;
            int   Type = mod.ProjectileType("BlightOrbShoot");

            if (!flag)
            {
                return;
            }

            if ((double)projectile.ai[1] == 0.0)
            {
                if ((double)(vector2_1 - projectile.Center).Length() > 500.0 || (double)projectile.ai[1] != 0.0)
                {
                    return;
                }
                ++projectile.ai[1];
                if (Main.myPlayer == projectile.owner)
                {
                    vector2_2 = vector2_1 - projectile.Center;
                    vector2_2.Normalize();
                    Vector2 vector2_3 = vector2_2 * num8;
                    int     index     = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, vector2_3.X, vector2_3.Y, Type, projectile.damage, 0.0f, Main.myPlayer, 0.0f, (float)num5);
                    Main.projectile[index].timeLeft  = 300;
                    Main.projectile[index].netUpdate = true;
                    Vector2 vector2_4 = projectile.velocity - vector2_3 / 3f;
                    projectile.velocity  = vector2_4;
                    projectile.netUpdate = true;
                }

                for (int index1 = 0; index1 < 5; ++index1)
                {
                    int num1 = projectile.width / 4;
                    vector2_2 = ((float)Main.rand.NextDouble() * 6.283185f).ToRotationVector2() * (float)Main.rand.Next(24, 41) / 8f;
                    int     index2    = Dust.NewDust(projectile.Center - Vector2.One * (float)num1, num1 * 2, num1 * 2, 173, 0.0f, 0.0f, 0, new Color(), 1f);
                    Dust    dust      = Main.dust[index2];
                    Vector2 vector2_3 = Vector2.Normalize(dust.position - projectile.Center);
                    dust.position = projectile.Center + vector2_3 * (float)num1 * projectile.scale - new Vector2(4f);
                    dust.velocity = index1 >= 30 ? 2f * vector2_3 * (float)Main.rand.Next(45, 91) / 10f : vector2_3 *dust.velocity.Length() * 2f;

                    dust.noGravity = true;
                    dust.scale     = 0.7f + Main.rand.NextFloat();
                }
            }
        }