/// <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; } } }
public override bool CanUseItem(Player player) { if (player.altFunctionUse == 0) { // Short dash brings up to max default speed. ModPlayerFists mpf = player.GetModPlayer <ModPlayerFists>(); float dashSpeed = 5f; if (mpf.parryBuff) { dashSpeed = 6f; } mpf.SetDashOnMovement(dashSpeed, dashSpeed - 0.5f, 0.992f, 0.96f, true, 0); } return(true); }