42566 {
42567 if (
sItem.type == 989 && Main.rand.Next(5) == 0)
42568 {
42569 int num = Main.rand.Next(3);
42571 {
42572 0 => 15,
42573 1 => 57,
42574 _ => 58,
42576 Main.dust[
num2].velocity *= 0.2f;
42577 }
42578 if (
sItem.type == 2880 && Main.rand.Next(2) == 0)
42579 {
42580 int type = Utils.SelectRandom<
int>(Main.rand, 226, 229);
42582 Main.dust[
num3].velocity *= 0.2f;
42583 Main.dust[
num3].noGravity =
true;
42584 }
42585 if ((
sItem.type == 44 ||
sItem.type == 45 ||
sItem.type == 103 ||
sItem.type == 104) && Main.rand.Next(15) == 0)
42586 {
42588 }
42589 if (
sItem.type == 46 && Main.rand.Next(15) == 0)
42590 {
42592 }
42594 {
42595 if (Main.rand.Next(5) == 0)
42596 {
42598 }
42600 Main.dust[
num4].noGravity =
true;
42601 Main.dust[
num4].velocity.X /= 2f;
42602 Main.dust[
num4].velocity.Y /= 2f;
42603 }
42604 if (
sItem.type == 723 && Main.rand.Next(2) == 0)
42605 {
42607 Main.dust[
num5].noGravity =
true;
42608 }
42609 if (
sItem.type == 65)
42610 {
42611 if (Main.rand.Next(5) == 0)
42612 {
42614 }
42615 if (Main.rand.Next(10) == 0)
42616 {
42618 }
42619 }
42620 if (
sItem.type == 3065)
42621 {
42623 Main.dust[
num6].velocity *= 0.5f;
42624 if (Main.rand.Next(8) == 0)
42625 {
42627 Main.gore[
num7].velocity *= 0.5f;
42629 }
42630 }
42631 if (
sItem.type == 190)
42632 {
42634 Main.dust[
num8].noGravity =
true;
42635 }
42636 else if (
sItem.type == 213 ||
sItem.type == 5295)
42637 {
42639 Main.dust[
num9].noGravity =
true;
42640 }
42641 if (
sItem.type == 121)
42642 {
42643 for (
int i = 0;
i < 2;
i++)
42644 {
42647 Dust.NewDustPerfect(
location, 6,
vector * 4f, 100,
default(
Color), 2.5f).noGravity =
true;
42648 }
42649 }
42651 {
42653 Main.dust[
num10].noGravity =
true;
42654 }
42655 if (
sItem.type == 155)
42656 {
42658 Main.dust[
num11].noGravity =
true;
42659 Main.dust[
num11].velocity *= 0.1f;
42660 }
42661 if (
sItem.type == 676 && Main.rand.Next(3) == 0)
42662 {
42664 Main.dust[
num12].noGravity =
true;
42665 Main.dust[
num12].velocity *= 0.2f;
42666 }
42667 if (
sItem.type == 3063)
42668 {
42670 Main.dust[
num13].color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f);
42671 Main.dust[
num13].noGravity =
true;
42672 Main.dust[
num13].velocity /= 2f;
42673 }
42674 if (
sItem.type == 3823)
42675 {
42677 dust.noGravity = true;
42678 dust.velocity *= 2f;
42679 dust.fadeIn = 0.9f;
42680 }
42681 if (
sItem.type == 724 && Main.rand.Next(5) == 0)
42682 {
42684 Main.dust[
num14].noGravity =
true;
42685 Main.dust[
num14].velocity *= 0.2f;
42686 }
42688 {
42689 for (
int j = 0;
j < 2;
j++)
42690 {
42693 Dust.NewDustPerfect(
location2, 5,
vector2 * 2f, 100,
default(
Color), 0.7f + Main.rand.NextFloat() * 0.6f);
42694 if (Main.rand.Next(20) == 0)
42695 {
42698 Main.dust[
num15].fadeIn = 1.2f;
42699 Main.dust[
num15].noGravity =
true;
42700 Main.dust[
num15].velocity *= 0.25f;
42702 }
42703 }
42704 }
42705 if (
sItem.type == 367)
42706 {
42708 if (Main.rand.Next(3) == 0)
42709 {
42711 Main.dust[
num16].noGravity =
true;
42712 Main.dust[
num16].velocity.X /= 2f;
42713 Main.dust[
num16].velocity.Y /= 2f;
42715 }
42716 if (Main.rand.Next(4) == 0)
42717 {
42719 Main.dust[
num16].velocity *= 0f;
42720 }
42721 }
42722 else if (
sItem.type != 368)
42723 {
42726 }
42728 {
42729 float num17 = 0.5f;
42730 float num18 = 0.5f;
42731 float num19 = 0.5f;
42732 if (
sItem.type == 198 ||
sItem.type == 3764)
42733 {
42737 }
42738 else if (
sItem.type == 199 ||
sItem.type == 3765)
42739 {
42743 }
42744 else if (
sItem.type == 200 ||
sItem.type == 3766)
42745 {
42749 }
42750 else if (
sItem.type == 201 ||
sItem.type == 3767)
42751 {
42755 }
42756 else if (
sItem.type == 202 ||
sItem.type == 3768)
42757 {
42761 }
42762 else if (
sItem.type == 203 ||
sItem.type == 3769)
42763 {
42767 }
42768 else if (
sItem.type == 4258 ||
sItem.type == 4259)
42769 {
42773 }
42775 }
42777 {
42779 Main.dust[
num20].noGravity =
true;
42780 Main.dust[
num20].velocity *= 0.7f;
42781 Main.dust[
num20].velocity.Y -= 0.5f;
42782 }
42784 {
42786 {
42787 if (Main.rand.Next(3) == 0)
42788 {
42790 Main.dust[
num21].noGravity =
true;
42791 Main.dust[
num21].fadeIn = 1.5f;
42792 Main.dust[
num21].velocity *= 0.25f;
42793 }
42794 }
42796 {
42797 if (Main.rand.Next(2) == 0)
42798 {
42800 Main.dust[
num22].noGravity =
true;
42801 Main.dust[
num22].velocity *= 0.7f;
42802 Main.dust[
num22].velocity.Y -= 0.5f;
42803 }
42804 }
42806 {
42807 if (Main.rand.Next(2) == 0)
42808 {
42810 Main.dust[
num23].noGravity =
true;
42811 Main.dust[
num23].velocity *= 0.7f;
42812 Main.dust[
num23].velocity.Y -= 0.5f;
42813 }
42814 }
42816 {
42818 if (Main.rand.Next(2) == 0)
42819 {
42821 Main.dust[
num24].noGravity =
true;
42822 Main.dust[
num24].velocity.X /= 2f;
42823 Main.dust[
num24].velocity.Y /= 2f;
42824 }
42825 }
42827 {
42828 if (Main.rand.Next(2) == 0)
42829 {
42832 Main.dust[
num25].velocity.Y += 0.2f;
42833 Main.dust[
num25].noGravity =
true;
42834 }
42835 }
42837 {
42838 if (Main.rand.Next(2) == 0)
42839 {
42842 Main.dust[
num26].velocity.Y += 0.2f;
42843 Main.dust[
num26].noGravity =
true;
42844 }
42845 }
42847 {
42848 if (Main.rand.Next(20) == 0)
42849 {
42850 int type2 = Main.rand.Next(139, 143);
42852 Main.dust[
num27].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
42853 Main.dust[
num27].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
42854 Main.dust[
num27].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
42855 Main.dust[
num27].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
42856 Main.dust[
num27].scale *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f;
42857 }
42858 if (Main.rand.Next(40) == 0)
42859 {
42860 int type3 = Main.rand.Next(276, 283);
42862 Main.gore[
num28].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
42863 Main.gore[
num28].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
42864 Main.gore[
num28].scale *= 1f + (float)Main.rand.Next(-20, 21) * 0.01f;
42865 Main.gore[
num28].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
42866 Main.gore[
num28].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
42867 }
42868 }
42870 {
42872 Main.dust[
num29].noGravity =
true;
42873 Main.dust[
num29].fadeIn = 1.5f;
42874 Main.dust[
num29].velocity *= 0.25f;
42875 }
42876 }
42878 {
42880 Main.dust[
num30].noGravity =
true;
42881 Main.dust[
num30].velocity.X *= 2f;
42882 Main.dust[
num30].velocity.Y *= 2f;
42883 }
42885 }
void GetPointOnSwungItemPath(float spriteWidth, float spriteHeight, float normalizedPointOnPath, float itemScale, out Vector2 location, out Vector2 outwardDirection)
float GetAdjustedItemScale(Item item)