コード例 #1
0
ファイル: KnucklesDungeon.cs プロジェクト: Milliath/WeaponOut
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 20;
                player.velocity.X    = 0;
                player.velocity.Y    = player.velocity.Y == 0f ? 0f : -5.5f;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
            }
            // Charging
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, 20);

            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charge effect
                for (int i = 0; i < 3; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 172, 0, 0, 0, default(Color), 0.7f)];
                    d.fadeIn    = 1.2f;
                    d.position -= d.velocity * 20f;
                    d.velocity *= 1.5f;
                    d.noGravity = true;
                }
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                player.AddBuff(buffID, 60, false);
            }
        }
コード例 #2
0
ファイル: KnucklesMeteor.cs プロジェクト: Milliath/WeaponOut
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 12;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
            }
            // Charging
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, 20);

            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charge effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 6, 0, 0, 100, default(Color), 2f)];
                d.velocity /= 2;
                d.noGravity = true;
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(SoundID.Item88, (int)player.position.X, (int)player.position.Y);
                player.itemTime = 0;
            }
            else
            {
                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 6, 0, 0, 100, default(Color), 1.3f)];
                d.velocity  = 1.4f * ModPlayerFists.GetFistVelocity(player);
                d.noGravity = true;
            }
        }
コード例 #3
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (player.attackCD > 0)
            {
                return;
            }
            ModPlayerFists mpf = player.GetModPlayer <ModPlayerFists>();

            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 10;
                player.velocity.X    = 0;
                player.velocity.Y    = player.velocity.Y == 0f ? 0f : -5.5f;
            }
            if (player.itemAnimation < player.itemAnimationMax && mpf.specialMove == 0)
            {
                mpf.SetDashOnMovement(18, 24f, 0.992f, 0.96f, true, 0);
            }
            // Charging
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, 20);

            if (player.itemAnimation > player.itemAnimationMax)
            {
                Color color = new Color(255, 0, 0);
                // Charge effect
                for (int i = 0; i < 3; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 267, 0, 0, 0, new Color(0, 255, 100), 0.7f)];
                    d.fadeIn    = 1.2f;
                    d.position -= d.velocity * 20f;
                    d.velocity *= 1.5f;
                    d.noGravity = true;
                }
            }
        }
コード例 #4
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 20;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
            }
            // Charging
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, 45);

            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charge effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, DustID.t_Martian, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 10f;
                d.velocity /= 2;
                d.noGravity = true;
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                player.itemTime = 0;
            }
            else
            {
                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, DustID.t_Martian, 3, 3, 100, default(Color), 1f)];
                d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);
                d.noGravity = true;
            }
        }
コード例 #5
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 20;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
            }
            // Charging
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, 45);

            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charge effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 31, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 10f;
                d.velocity /= 2;
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                // Allow dash
                player.GetModPlayer <ModPlayerFists>().
                SetDashOnMovement(3f, 12f, 0.992f, 0.96f, true, 0);
            }
            else
            {
                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 31, 3, 3, 100, default(Color), 1f)];
                d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);
            }
        }
コード例 #6
0
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r     = ModPlayerFists.UseItemGraphicbox(player, 16, 24);
            Vector2   pVelo = (player.position - player.oldPosition);

            Dust d = Main.dust[Dust.NewDust(r.TopLeft(), r.Width, r.Height, 152,
                                            pVelo.X, pVelo.Y, 120, default(Color), 1.2f)];

            d.noGravity = true;
        }
コード例 #7
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + comboDelay;      // Set initial combo animation delay
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;  // Hardmode combos reset uppercut
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position); // Combo activation sound
            }
            // Charging (Advanced)
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, altHitboxSize);

            player.GetModPlayer <PlayerFX>().reflectingProjectilesForce = true; // Reflect projectiles
            if (player.itemAnimation > player.itemAnimationMax)
            {
                // =================== BEHAVIOURS =================== //

                // Charge effect
                for (int i = 0; i < 2; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 174, 0, 0, 100, default(Color), 1.4f)];
                    d.position -= d.velocity * 10f;
                    d.velocity /= 2;
                    d.noGravity = true;
                }

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                player.itemTime = 0; // Fire projectile
                // =================== BEHAVIOURS =================== //



                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            else
            {
                // =================== BEHAVIOURS =================== //

                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 174, 3, 3, 100, default(Color), 1f)];
                d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);
                d.noGravity = true;

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
        }
コード例 #8
0
ファイル: KnucklesMeteor.cs プロジェクト: Milliath/WeaponOut
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 4, 20);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player);
            Vector2   pVelo    = (player.position - player.oldPosition);

            for (int i = 0; i < 2; i++)
            {
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), r.Width, r.Height, 174,
                                                velocity.X * -4f + pVelo.X, velocity.Y * -4f + pVelo.Y)];
                d.noGravity = true;
                d.velocity /= 2;
            }
        }
コード例 #9
0
ファイル: FistsHokuto.cs プロジェクト: ASGNeoN/WeaponOut
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 4, fistHitboxSize);
            Vector2   pVelo    = (player.position - player.oldPosition);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player) * -3f + pVelo * 0.5f;
            Dust      d;

            for (int i = 0; i < 6; i++)
            {
                d = Main.dust[Dust.NewDust(r.TopLeft(), r.Width, r.Height, 173,
                                           velocity.X, velocity.Y)];
                d.velocity *= 1f;
                d.noGravity = true;
                d.scale    *= 1.2f;
            }
        }
コード例 #10
0
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 1, 8);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player);
            Vector2   pVelo    = (player.position - player.oldPosition);

            for (int y = -1; y < 2; y++)
            {
                Dust d = Dust.NewDustPerfect(r.TopLeft() + velocity.RotatedBy(1.25 * y) * 3, 267, null, 0, new Color(0, 255, 100), 1f);
                d.velocity  = new Vector2(velocity.X * -2, velocity.Y * -2);
                d.position -= d.velocity * 8;
                d.velocity += pVelo;
                d.fadeIn    = 0.7f;
                d.noGravity = true;
            }
        }
コード例 #11
0
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 4, 20);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player);
            Vector2   pVelo    = (player.position - player.oldPosition) * -2f + velocity * 0.5f;
            Dust      d;

            for (int i = 0; i < 5; i++)
            {
                // Light spore
                d           = Main.dust[Dust.NewDust(r.TopLeft(), r.Width, r.Height, 44, velocity.X * 3, velocity.Y * 3, 0, default(Color), 0.6f)];
                d.noGravity = true;
                // Grass
                d           = Main.dust[Dust.NewDust(r.TopLeft(), r.Width, r.Height, 39, velocity.X * 1.2f, velocity.Y * 1.2f)];
                d.noGravity = true;
            }
        }
コード例 #12
0
ファイル: FistsForbidden.cs プロジェクト: heloman1/WeaponOut
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 16, 26);
            Vector2   pVelo    = (player.position - player.oldPosition);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player) * -3f + pVelo * 0.5f;
            Dust      d;

            Vector2 pos = r.TopLeft();

            for (int i = 0; i < 2; i++)
            {
                d = Main.dust[Dust.NewDust(pos, r.Width, r.Height, DustID.Sandnado,
                                           velocity.X * -1.5f, velocity.Y * -1.5f, 100, default(Color), 0.2f)];
                d.noGravity = true;
                d.fadeIn    = 0.4f;
            }
        }
コード例 #13
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 10;
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
            }

            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, altHitboxSize);

            player.statDefense += player.itemAnimation; // Bonus defence during special
            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charging
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, DustID.GrassBlades, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 20f;
                d.velocity *= 1.5f;
                d.velocity += player.position - player.oldPosition;
                d.noGravity = true;
            }
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Create a shield of leaves
                Main.PlaySound(SoundID.Grass, player.position);
                if (player.whoAmI == Main.myPlayer)
                {
                    foreach (Projectile p in Main.projectile)
                    {
                        if (p.active && p.owner == Main.myPlayer && p.type == leafID)
                        {
                            p.Kill();
                        }
                    }
                    for (int i = 0; i < 4; i++)
                    {
                        Projectile.NewProjectile(player.Center, new Vector2(), leafID, 100, 1f, Main.myPlayer, player.direction, MathHelper.PiOver2 * i);
                    }
                }
            }
            else
            {
                // Punch effect
            }
        }
コード例 #14
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + comboDelay;      // Set initial combo animation delay
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position); // Combo activation sound
            }
            // Charging (Pre-Hard)
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, altHitboxSize);

            if (player.itemAnimation > player.itemAnimationMax)
            {
                // =================== BEHAVIOURS =================== //

                // Charge effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 31, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 10f;
                d.velocity /= 2;

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                // =================== BEHAVIOURS =================== //

                // Allow dash
                player.GetModPlayer <ModPlayerFists>().
                SetDashOnMovement(altDashSpeed, altDashThresh, 0.992f, 0.96f, true, 0);

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            else
            {
                // =================== BEHAVIOURS =================== //

                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 31, 3, 3, 100, default(Color), 1f)];
                d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
        }
コード例 #15
0
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 12, 26);
            Vector2   pVelo    = (player.position - player.oldPosition);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player) * -3f + pVelo * 0.5f;
            Dust      d;

            Vector2 pos = r.TopLeft();

            for (int i = 0; i < 4; i++)
            {
                d = Main.dust[Dust.NewDust(pos, r.Width, r.Height, 135,
                                           velocity.X, velocity.Y, 100, default(Color), 1.2f + player.itemAnimation * 0.05f)];
                d.velocity *= 2f;
                d.noGravity = true;
                pos        -= pVelo / 5; // trail better at high speeds
            }
        }
コード例 #16
0
ファイル: KnucklesIchor.cs プロジェクト: Milliath/WeaponOut
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r             = ModPlayerFists.UseItemGraphicbox(player, 1, 8);
            Vector2   velocity      = ModPlayerFists.GetFistVelocity(player);
            Vector2   perpendicular = velocity.RotatedBy(Math.PI / 2);
            Vector2   pVelo         = (player.position - player.oldPosition);

            // Claw like effect
            for (int y = -1; y < 2; y++)
            {
                Dust d = Dust.NewDustPerfect(r.TopLeft() + perpendicular * y * 7, 170, null, 0, default(Color), 0.6f);
                d.velocity  = new Vector2(velocity.X * -2, velocity.Y * -2);
                d.position -= d.velocity * 8;
                d.velocity += pVelo;
                d.fadeIn    = 0.7f;
                d.noGravity = true;
            }
        }
コード例 #17
0
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 12, fistHitboxSize);
            Vector2   pVelo    = (player.position - player.oldPosition);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player) * 2f + pVelo * 0.5f;
            Dust      d;

            Vector2 pos = r.TopLeft();

            for (int i = 0; i < 3; i++)
            {
                d = Main.dust[Dust.NewDust(pos, r.Width, r.Height, DustID.t_Martian,
                                           0, 0, 0, default(Color), 0.75f)];
                d.velocity  = velocity;
                d.noGravity = true;
                pos        -= d.velocity * 4 + pVelo / 5; // trail better at high speeds
            }
        }
コード例 #18
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                Main.PlaySound(SoundID.Item9, player.position);
                player.itemAnimation = player.itemAnimationMax + 20;
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
            }

            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 4, altHitboxSize);

            player.statDefense += player.itemAnimation; // Bonus defence during special
            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charging
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 4, 4, 88, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 10f;
                d.velocity *= 1f;
                d.velocity += player.position - player.oldPosition;
                d.noGravity = true;
            }
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                Main.PlaySound(SoundID.Shatter, player.position);
                Dust    d;
                Vector2 center = player.Center - new Vector2(4, 4);
                for (int i = 0; i < 15; i++)
                {
                    d           = Main.dust[Dust.NewDust(center, 8, 8, DustID.Ice, 0, -1, 100, default(Color), 1.5f)];
                    d.velocity *= 3f;
                    d.noGravity = true;
                    d           = Main.dust[Dust.NewDust(center, 8, 8, 88, 0, -1, 100, default(Color), 0.5f)];
                    d.velocity *= 2f;
                    d.fadeIn    = 1f;
                    d.noGravity = true;
                }

                player.itemTime = 0;
            }
            else
            {
                // Punch effect
            }
        }
コード例 #19
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 10;
                Main.PlaySound(SoundID.Item73);
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
            }

            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 8, altHitboxSize);

            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charging
                Dust.NewDust(r.TopLeft(), r.Width, r.Height, 21, 0f, 0f, 0, default(Color), 0.5f);
            }
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                Main.PlaySound(SoundID.Item71, player.position);
                // Force dash
                player.GetModPlayer <ModPlayerFists>().
                SetDash(altDashSpeed, altDashThresh, 0.992f, 0.96f, true, 0);

                for (int i = 0; i < 64; i++)
                {
                    double angle = Main.time + i / 10.0;
                    Dust   d     = Dust.NewDustPerfect(player.Center, 21,
                                                       new Vector2((float)(5.0 * Math.Sin(angle)), (float)(5.0 * Math.Cos(angle))));
                }
            }
            else
            {
                player.yoraiz0rEye = Math.Max(2, player.yoraiz0rEye);
                if (player.attackCD > 2)
                {
                    player.attackCD = 2;                     // Attack more things
                }
                for (int i = 0; i < 5; i++)
                {
                    int d = Dust.NewDust(r.TopLeft(), r.Width, r.Height, 27, player.velocity.X * -0.5f, player.velocity.Y * -0.5f, 180);
                    Main.dust[d].noGravity = true;
                }
            }
        }
コード例 #20
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                item.useAmmo         = AmmoID.None;
                player.itemAnimation = player.itemAnimationMax + comboDelay;      // Set initial combo animation delay
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;  // Hardmode combos reset uppercut
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position); // Combo activation sound
            }

            // Charging (Hardmode)
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, altHitboxSize);

            player.statDefense += player.itemAnimation; // Bonus defence during special

            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charge effect
                for (int i = 0; i < 2; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 174, 0, 0, 100, default(Color), 1.4f)];
                    d.position -= d.velocity * 10f;
                    d.velocity /= 2;
                    d.noGravity = true;
                }
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                item.useAmmo    = AmmoID.Bullet;
                player.itemTime = 0; // Fire projectile
            }
            else
            {
                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 174, 3, 3, 100, default(Color), 1f)];
                d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);
                d.noGravity = true;
            }
        }
コード例 #21
0
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r             = ModPlayerFists.UseItemGraphicbox(player, 1, 4);
            Vector2   velocity      = ModPlayerFists.GetFistVelocity(player);
            Vector2   perpendicular = velocity.RotatedBy(Math.PI / 2);
            Vector2   pVelo         = (player.position - player.oldPosition);

            // Claw like effect
            for (int y = -1; y < 2; y++)
            {
                for (int i = 0; i < 4; i++)
                {
                    Dust d = Dust.NewDustPerfect(r.TopLeft() + perpendicular * y * 4, 75, null, 0, default(Color), 0.7f);
                    d.velocity  = new Vector2(velocity.X * -i, velocity.Y * -i);
                    d.position += velocity * fistHitboxSize / 2;
                    d.velocity += pVelo;
                    d.noGravity = true;
                }
            }
        }
コード例 #22
0
ファイル: KnucklesDungeon.cs プロジェクト: Milliath/WeaponOut
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r             = ModPlayerFists.UseItemGraphicbox(player, 2, 22);
            Vector2   velocity      = ModPlayerFists.GetFistVelocity(player);
            Vector2   perpendicular = velocity.RotatedBy(Math.PI / 2);
            Vector2   pVelo         = (player.position - player.oldPosition);

            // Claw like effect
            for (int y = -1; y < 2; y++)
            {
                for (int i = 0; i < 2; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft() + perpendicular * y * 5, r.Width, r.Height, 172,
                                                    0, 0, 0, default(Color), 0.7f)];
                    d.velocity /= 8;
                    d.velocity += new Vector2(velocity.X, velocity.Y) + pVelo;
                    d.noGravity = true;
                }
            }
        }
コード例 #23
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 18;
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
            }

            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 12, altHitboxSize);

            player.statDefense += player.itemAnimation; // Bonus defence during special
            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charging
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 12, 12, 170, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 20f;
                d.velocity *= 1.5f;
                d.velocity += player.position - player.oldPosition;
                d.noGravity = true;
            }
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                // Allow dash
                player.GetModPlayer <ModPlayerFists>().
                SetDashOnMovement(altDashSpeed, altDashThresh, 0.992f, 0.96f, true, 0);
            }
            else
            {
                // Punch effect
                Dust d;
                for (int i = 0; i < 3; i++)
                {
                    d           = Main.dust[Dust.NewDust(r.TopLeft(), 12, 12, 232, 3, 3, 100, default(Color), 1f)];
                    d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);
                    d.noGravity = true;
                }
            }
        }
コード例 #24
0
ファイル: KnucklesDuke.cs プロジェクト: Milliath/WeaponOut
        // Melee Effect
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            Rectangle r        = ModPlayerFists.UseItemGraphicbox(player, 12, 26);
            Vector2   pVelo    = (player.position - player.oldPosition);
            Vector2   velocity = ModPlayerFists.GetFistVelocity(player) * -3f + pVelo * 0.5f;
            Dust      d;

            int dustID = 33; if (player.wet)
            {
                dustID = 34;
            }
            Vector2 pos = r.TopLeft();

            for (int i = 0; i < 3; i++)
            {
                d = Main.dust[Dust.NewDust(pos, r.Width, r.Height, dustID,
                                           velocity.X, 0f, 0, default(Color), 1f + player.itemAnimation * 0.05f)];
                d.velocity.Y += velocity.Y - 1f;
                d.velocity   *= 2f;
            }
        }
コード例 #25
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 30;
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
            }
            // Charging
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 20, 45);

            player.statDefense += player.itemAnimation; // Bonus defence during special
            if (player.itemAnimation > player.itemAnimationMax)
            {
                for (int i = 0; i < 2; i++)
                {
                    // Charge effect
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, DustID.t_Martian, 0, 0, 100, default(Color), 1.4f)];
                    d.position -= d.velocity * 10f;
                    d.velocity /= 2;
                    d.noGravity = true;
                }
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                player.itemTime = 0;
            }
            else
            {
                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, DustID.t_Martian, 3, 3, 100, default(Color), 1f)];
                d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);
                d.noGravity = true;
            }
        }
コード例 #26
0
ファイル: KnucklesIchor.cs プロジェクト: Milliath/WeaponOut
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + 18;
                player.AddBuff(buffID, 60 * 6);
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position);
            }

            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 10, altHitboxSize);

            player.statDefense += player.itemAnimation; // Bonus defence during special
            if (player.itemAnimation > player.itemAnimationMax)
            {
                // Charging
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, DustID.Blood, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 20f;
                d.velocity *= 1.5f;
                d.velocity += player.position - player.oldPosition;
                d.noGravity = true;
            }
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Lower pitch
                Main.PlaySound(4, (int)player.position.X, (int)player.position.Y, 12, 1f, -0.2f);
                if (player.whoAmI == Main.myPlayer)
                {
                    PlayerDeathReason pdr = PlayerDeathReason.LegacyDefault();
                    switch (Main.rand.Next(3))
                    {
                    case 1:
                        pdr.SourceCustomReason = WeaponOut.GetTranslationTextValue("KnucklesIchorSuicide1")
                                                 .Replace("$NAME", player.name);
                        break;

                    case 2:
                        pdr.SourceCustomReason = WeaponOut.GetTranslationTextValue("KnucklesIchorSuicide2")
                                                 .Replace("$NAME", player.name).Replace("$ITEM", item.Name);
                        break;

                    default:
                        pdr.SourceCustomReason = WeaponOut.GetTranslationTextValue("KnucklesIchorSuicide3")
                                                 .Replace("$NAME", player.name);
                        break;
                    }
                    player.immune = false;
                    player.Hurt(pdr, 100 + player.statDefense / 2, player.direction, false, false, false, -1);
                }

                for (int i = 0; i < 30; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, DustID.Blood, 0, -0.5f, 0, default(Color), 2f)];
                    d.velocity.X *= 2f;
                }

                // Allow dash
                player.GetModPlayer <ModPlayerFists>().
                SetDashOnMovement(altDashSpeed, altDashThresh, 0.992f, 0.96f, true, 0);
            }
            else
            {
                // Punch effect
            }
        }
コード例 #27
0
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.itemAnimation = player.itemAnimationMax + comboDelay;      // Set initial combo animation delay
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;  // Hardmode combos reset uppercut
                Main.PlaySound(SoundID.DD2_SkyDragonsFurySwing, player.position); // Combo activation sound
            }
            // Charging (Hardmode)
            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 16, altHitboxSize);

            player.statDefense += player.itemAnimation; // Bonus defence during special
            if (player.itemAnimation > player.itemAnimationMax)
            {
                // =================== BEHAVIOURS =================== //

                // Charge effect
                for (int i = 0; i < 2; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 162, 0, 0, 0, default(Color), 1.5f)];
                    d.position -= d.velocity * 10f;
                    d.velocity /= 2;
                    d.noGravity = true;
                }

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                // Higher pitch
                Main.PlaySound(42, (int)player.position.X, (int)player.position.Y, 184, 1f, 0.5f);
                player.GetModPlayer <ModPlayerFists>().SetDash(
                    altDashSpeed * 1.1f, altDashThresh * 1.1f, 0.992f, 0.96f, true,
                    dashEffect); // set to 0 to use default attackCD (or just not to hit all enemies)
                // =================== BEHAVIOURS =================== //

                // Swag dust ring
                for (int i = 0; i < 64; i++)
                {
                    double angle = Main.time + i / 10.0;
                    Dust   d     = Dust.NewDustPerfect(player.Center, i % 2 == 0 ? 92 : 90,
                                                       new Vector2((float)(5.0 * Math.Sin(angle)), (float)(5.0 * Math.Cos(angle))));
                    d.noGravity = true;
                    d.fadeIn    = 1.3f;
                }

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            else
            {
                // =================== BEHAVIOURS =================== //

                // Punch effect
                Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 173, 3, 3, 0, default(Color), 1f)];
                d.velocity *= 0.6f * ModPlayerFists.GetFistVelocity(player);
                d.noGravity = true;

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
        }
コード例 #28
0
ファイル: KnucklesDuke.cs プロジェクト: Milliath/WeaponOut
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.immuneTime   += 2;
                player.velocity     /= 2;
                player.itemAnimation = player.itemAnimationMax + 8;
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;
                Main.PlaySound(SoundID.Item21, player.position);
            }

            Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 10, altHitboxSize);
            Dust      d;

            if (player.itemAnimation > player.itemAnimationMax)
            {
                player.immune = true;
                player.immuneTime++;

                // Charging
                d           = Main.dust[Dust.NewDust(r.TopLeft(), 10, 10, 217, 0, 0, 100, default(Color), 1.2f)];
                d.position -= d.velocity * 40f;
                d.velocity *= 2f;
                d.velocity += player.position - player.oldPosition;
                d.noGravity = true;
            }
            else if (player.itemAnimation == player.itemAnimationMax - 1)
            {
                // Bubble Noise
                Main.PlaySound(SoundID.Item86, player.position);

                // Allow dash
                if (player.controlLeft && player.direction > 0)
                {
                    player.direction = -1;
                }
                else if (player.controlRight && player.direction < 0)
                {
                    player.direction = 1;
                }
                player.GetModPlayer <ModPlayerFists>().
                SetDashOnMovement(altDashSpeed, altDashThresh, 0.992f, 0.96f, true, 0);

                if (player.whoAmI == Main.myPlayer)
                {
                    if (Main.myPlayer == player.whoAmI)
                    {
                        Vector2 telePos;
                        telePos.X = (float)Main.mouseX + Main.screenPosition.X;
                        if (player.gravDir == 1f)
                        {
                            telePos.Y = (float)Main.mouseY + Main.screenPosition.Y - (float)player.height;
                        }
                        else
                        {
                            telePos.Y = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY;
                        }
                        telePos.X -= (float)(player.width / 2);

                        if (telePos.X > 50f && telePos.X < (float)(Main.maxTilesX * 16 - 50) &&
                            telePos.Y > 50f && telePos.Y < (float)(Main.maxTilesY * 16 - 50))
                        {
                            int num246 = (int)(telePos.X / 16f);
                            int num247 = (int)(telePos.Y / 16f);
                            if ((Main.tile[num246, num247].wall != 87 || (double)num247 <= Main.worldSurface || NPC.downedPlantBoss) && !Collision.SolidCollision(telePos, player.width, player.height))
                            {
                                player.Teleport(telePos, -1, 0);
                                NetMessage.SendData(MessageID.Teleport, -1, -1, null, -1, (float)player.whoAmI, telePos.X, telePos.Y, 0, 0, 0);
                            }

                            float num2 = Vector2.Distance(player.position, telePos);
                            if (num2 < new Vector2((float)Main.screenWidth, (float)Main.screenHeight).Length() / 2f + 100f)
                            {
                                Main.SetCameraLerp(0.1f, 0);
                            }
                            else
                            {
                                Main.BlackFadeIn = 255;
                                Lighting.BlackOut();
                                Main.screenLastPosition = Main.screenPosition;
                                Main.screenPosition.X   = player.position.X + (float)(player.width / 2) - (float)(Main.screenWidth / 2);
                                Main.screenPosition.Y   = player.position.Y + (float)(player.height / 2) - (float)(Main.screenHeight / 2);
                                Main.quickBG            = 10;
                            }
                        }
                    }
                }
                if (ModPlayerFists.Get(player).specialMove == 0)
                {
                    player.velocity.Y = -player.gravDir;
                }
            }
            else
            {
                // Teledust
                d           = Main.dust[Dust.NewDust(player.position, player.width, player.height, 217, 0, 0, 100, default(Color), 1.2f)];
                d.velocity *= 2f;
                d.velocity += player.position - player.oldPosition;
                d.noGravity = true;
                for (int i = 0; i < 10; i++)
                {
                    d           = Main.dust[Dust.NewDust(player.position, player.width, player.height, 185, 0, 0, 100, default(Color), 1.2f)];
                    d.velocity *= 3f;
                    d.velocity += player.position - player.oldPosition;
                    d.noGravity = true;
                }
            }
        }
コード例 #29
0
        public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit)
        {
            ModPlayerFists mpf = player.GetModPlayer <ModPlayerFists>();

            if (player.controlUp && (player.oldVelocity.Y == 0 || mpf.jumpAgainUppercut))
            {
                target.velocity.Y -= (target.noGravity?6.5f:11.4f) * Max(target.knockBackResist, 0.1f);
            }
            mpf.jumpAgainUppercut = true;
            EpikGlobalNPC EGN = target.GetGlobalNPC <EpikGlobalNPC>();

            if (EGN.jaded)
            {
                target.life = 0;
                target.checkDead();
                Main.PlaySound(SoundID.Shatter, (int)target.Center.X, (int)target.Center.Y, pitchOffset: -0.15f);
                Rectangle r = ModPlayerFists.UseItemGraphicbox(player, 1, 8);
                for (int i = 9; i-- > 0;)
                {
                    Vector2 pos = target.TopLeft + new Vector2(Main.rand.Next(target.width), Main.rand.Next(target.height));
                    Vector2 vel = pos - r.Center();
                    vel.Normalize();
                    vel *= 8;
                    int p = Projectile.NewProjectile(
                        r.Center(), vel.RotatedByRandom(0.5f),
                        ProjectileID.CrystalStorm,
                        damage / 6,
                        knockBack / 9,
                        player.whoAmI);
                    Main.projectile[p].penetrate += 2;
                    Main.projectile[p].extraUpdates++;
                    Main.projectile[p].timeLeft /= 2;
                    Main.projectile[p].GetGlobalProjectile <EpikGlobalProjectile>().jade = true;
                }
            }
            if (mpf.ComboEffectAbs == comboEffect)
            {
                bool flag = target.noGravity;
                ModPlayerFists.provideImmunity(player, player.itemAnimation);
                Point origin = target.Center.ToTileCoordinates();
                if (!flag && !WorldUtils.Find(origin, Searches.Chain(new Searches.Down(4), new Conditions.IsSolid()), out Point _))
                {
                    flag = true;
                }
                if (flag)
                {
                    player.velocity    = target.velocity;
                    player.velocity.X -= player.direction * 8f + player.direction * player.HeldItem.knockBack * 0.1f;
                    player.velocity.Y -= player.gravDir * 0.125f * player.itemAnimationMax;
                    player.fallStart   = (int)(player.position.Y / 16f);
                }
                else
                {
                    player.velocity  = new Vector2(-player.direction * (2f + player.HeldItem.knockBack * 0.5f) + target.velocity.X * 0.5f, target.velocity.Y * 1.5f * target.knockBackResist);
                    player.fallStart = (int)(player.position.Y / 16f);
                }
                //ManagePlayerComboMovement.Invoke(mpf,new object[]{target});
                mpf.dashSpeed             = 0f;
                mpf.dashMaxSpeedThreshold = 0f;
                mpf.dashMaxFriction       = 0f;
                mpf.dashMinFriction       = 0f;
                mpf.dashEffect            = 0;
                player.dash          = 0;
                player.attackCD      = player.itemAnimationMax;
                player.itemAnimation = 1;
                switch (target.type)
                {
                case 139:
                case 315:
                case 325:
                case 329:
                case 439:
                case 533:
                case 423:
                case 478:
                case 471:
                    target.buffImmune[BuffID.MoonLeech] = false;
                    break;

                default:
                    break;
                }
                float combomult = 20f - player.GetModPlayer <ModPlayerFists>().comboCounterMaxBonus;
                combomult /= Math.Max(0.5f, 2 - item.scale);
                if (target.life > 0 && target.life < (mpf.ComboCounter + item.tileBoost) * combomult && !target.immortal && !target.buffImmune[BuffID.MoonLeech])
                {
                    EGN.jaded       = true;
                    EGN.freezeFrame = target.frame;
                    mpf.ModifyComboCounter(-mpf.ComboCounter);
                    target.velocity.X += knockBack * player.direction;
                }
            }
        }
コード例 #30
0
ファイル: FistsHokuto.cs プロジェクト: ASGNeoN/WeaponOut
        /// <summary> The method called during a combo. Use for ongoing dust and gore effects. </summary>
        public static void ComboEffects(Player player, Item item, bool initial)
        {
            if (initial)
            {
                player.AddBuff(buffID, flurryDuration + flurryEndDelay + comboDelay, false); // Flurry
                player.itemAnimation = player.itemAnimationMax + comboDelay;                 // Set initial combo animation delay
                player.GetModPlayer <ModPlayerFists>().jumpAgainUppercut = true;             // Hardmode combos reset uppercut
                Main.PlaySound(WeaponOut.mod.GetLegacySoundSlot
                                   (SoundType.Item, "Sounds/Item/HokutoActivate").WithPitchVariance(0f),
                               player.position);
            }
            // Charging (Hardmode)
            int       bIdx = player.FindBuffIndex(buffID);
            Rectangle r    = ModPlayerFists.UseItemGraphicbox(player, 16, altHitboxSize);

            player.statDefense += player.itemAnimation; // Bonus defence during special
            if (player.itemAnimation > player.itemAnimationMax)
            {
                // =================== BEHAVIOURS =================== //

                // Charge effect
                for (int i = 0; i < 2; i++)
                {
                    Dust d = Main.dust[Dust.NewDust(r.TopLeft(), 16, 16, 175, 0, 0, 0, default(Color), 1.5f)];
                    d.position -= d.velocity * 10f;
                    d.velocity /= 2;
                    d.noGravity = true;
                }

                // Final punch effect
                if (bIdx >= 0 && player.buffTime[bIdx] <= flurryEndDelay)
                {
                    player.velocity.Y -= player.gravity;
                    // Move towards mouse
                    if (player.whoAmI == Main.myPlayer && player.buffTime[bIdx] % 3 == 0)
                    {
                        Vector2 velo = Main.MouseWorld - player.Center;
                        velo.Normalize();
                        velo           *= altDashSpeed * 2f;
                        player.velocity = (player.velocity * 3 + velo) / 4;
                        NetMessage.SendData(MessageID.SyncPlayer, -1, player.whoAmI, null, player.whoAmI);
                    }
                }

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            // Initial throw
            else if (player.itemAnimation == player.itemAnimationMax)
            {
                if (bIdx >= 0 && player.buffTime[bIdx] > flurryEndDelay)
                {
                    // Higher pitch for initiate
                    Main.PlaySound(WeaponOut.mod.GetLegacySoundSlot
                                       (SoundType.Item, "Sounds/Item/HokutoFlurry").WithPitchVariance(0f));
                }
                else
                {
                    // Boost otherwise
                    Vector2 velo = Main.MouseWorld - player.Center;
                    velo.Normalize();
                    velo           *= altDashSpeed;
                    player.velocity = velo;
                    NetMessage.SendData(MessageID.SyncPlayer, -1, player.whoAmI, null, player.whoAmI);
                }

                // =================== BEHAVIOURS =================== //

                // Swag dust ring
                for (int i = 0; i < 64; i++)
                {
                    double angle = Main.time + i / 10.0;
                    Dust   d     = Dust.NewDustPerfect(player.Center, i % 2 == 0 ? 173 : 162,
                                                       new Vector2((float)(5.0 * Math.Sin(angle)), (float)(5.0 * Math.Cos(angle))));
                    d.noGravity = true;
                    d.fadeIn    = 1.3f;
                    d.velocity *= 2f;
                }

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
            else
            {
                // =================== BEHAVIOURS =================== //

                // Reset
                bool bigPunch = false;
                if (bIdx >= 0)
                {
                    if (player.buffTime[bIdx] > flurryEndDelay)
                    {
                        if (player.itemAnimation <= player.itemAnimationMax / 2)
                        {
                            // Reset in flurry
                            player.itemAnimation = player.itemAnimationMax;
                            ModPlayerFists.Get(player).specialMove = 0;

                            // Move towards mouse
                            if (player.whoAmI == Main.myPlayer)
                            {
                                Vector2 velo = Main.MouseWorld - player.Center;
                                velo.Normalize();
                                velo           *= altDashSpeed;
                                player.velocity = (player.velocity * 2 + velo) / 3;
                                NetMessage.SendData(MessageID.SyncPlayer, -1, player.whoAmI, null, player.whoAmI);
                            }
                        }
                    }
                    else
                    {
                        if (player.buffTime[bIdx] == flurryEndDelay)
                        {
                            // Higher pitch for initiate
                            Main.PlaySound(WeaponOut.mod.GetLegacySoundSlot
                                               (SoundType.Item, "Sounds/Item/HokutoEnd").WithPitchVariance(0f));
                        }

                        // Last punch, double hitbox
                        player.itemAnimation = player.buffTime[bIdx] + 1;
                        r        = ModPlayerFists.UseItemGraphicbox(player, 16, altHitboxSize * 2);
                        bigPunch = true;
                    }
                }

                Vector2 pVelo    = (player.position - player.oldPosition);
                Vector2 velocity = ModPlayerFists.GetFistVelocity(player) * -3f + pVelo * 0.5f;
                Dust    d;

                for (int i = 0; i < 8; i++)
                {
                    d = Main.dust[Dust.NewDust(r.TopLeft(), r.Width, r.Height, 173,
                                               velocity.X, velocity.Y)];
                    d.velocity *= bigPunch ? 3f : 2f;
                    d.noGravity = true;
                    d.scale    *= bigPunch ? 4f : 1.5f;
                }

                // ^^^^^^^^^^^^^^^^^^^ BEHAVIOURS ^^^^^^^^^^^^^^^^^^^ //
            }
        }