/// <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; } }
/// <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; } }
/// <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); } }
// Hit Impact Effect public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) { // Impact Dust d; for (int i = 0; i < 1 + damage / 20; i++) { d = Main.dust[Dust.NewDust((player.Center + target.Center) / 2, 0, 0, 159, -target.velocity.X, target.velocity.Y, 100, default(Color), 0.5f)]; d.velocity = (3f * d.velocity) + (3f * ModPlayerFists.GetFistVelocity(player)); } }
/// <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 ^^^^^^^^^^^^^^^^^^^ // } }
// 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; } }
// 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; } }
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; } }
// 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; } }
// 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; } }
/// <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 ^^^^^^^^^^^^^^^^^^^ // } }
// 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 } }
// 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 } }
// 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; } }
/// <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; } }
// 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; } } }
// 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; } } }
/// <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; } } }
// 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; } }
/// <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; } }
/// <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 ^^^^^^^^^^^^^^^^^^^ // } }
/// <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 ^^^^^^^^^^^^^^^^^^^ // } }