Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Kill()

void Terraria.Projectile.Kill ( )
inline

Definition at line 59438 of file Projectile.cs.

59439 {
59440 //IL_011e: Unknown result type (might be due to invalid IL or missing references)
59441 //IL_2d70: Unknown result type (might be due to invalid IL or missing references)
59442 //IL_2d90: Unknown result type (might be due to invalid IL or missing references)
59443 //IL_2dad: Unknown result type (might be due to invalid IL or missing references)
59444 //IL_d1f4: Unknown result type (might be due to invalid IL or missing references)
59445 //IL_d1f9: Unknown result type (might be due to invalid IL or missing references)
59446 //IL_159ed: Unknown result type (might be due to invalid IL or missing references)
59447 if (!active)
59448 {
59449 return;
59450 }
59451 Main.projectileIdentity[owner, identity] = -1;
59452 int num = timeLeft;
59453 timeLeft = 0;
59454 bool flag = true;
59456 {
59457 flag = false;
59458 }
59459 if (owner == Main.myPlayer && flag)
59460 {
59461 Main.player[owner].TryCancelChannel(this);
59462 }
59463 if (Main.getGoodWorld && aiStyle == 16)
59464 {
59466 }
59467 if (Main.netMode != 1 && Main.getGoodWorld)
59468 {
59469 if (type == 472)
59470 {
59471 SpawnWebs();
59472 }
59473 if (type == 99)
59474 {
59476 }
59477 }
59478 if (type == 1020)
59479 {
59480 if (position.Y - (float)height <= (float)(16 * Main.offScreenRange) && owner == Main.myPlayer)
59481 {
59482 Main.Achievements.GetCondition("TO_INFINITY_AND_BEYOND", "Do").Complete();
59483 }
59487 for (int i = 0; i < 15; i++)
59488 {
59489 Dust dust = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent, 0.8f);
59490 dust.fadeIn = 0f;
59491 Dust dust2 = dust;
59492 dust2.velocity *= 0.5f;
59493 }
59494 for (int j = 0; j < 5; j++)
59495 {
59496 Dust dust3 = Dust.NewDustDirect(position, width, height, 228, 0f, 0f, 100, transparent, 2.5f);
59497 dust3.noGravity = true;
59498 Dust dust2 = dust3;
59499 dust2.velocity *= 2.5f;
59500 dust3 = Dust.NewDustDirect(position, width, height, 228, 0f, 0f, 100, transparent, 1.1f);
59501 dust2 = dust3;
59502 dust2.velocity *= 2f;
59503 dust3.noGravity = true;
59504 }
59505 for (int k = 0; k < 3; k++)
59506 {
59507 Dust dust4 = Dust.NewDustDirect(position, width, height, 226, 0f, 0f, 100, transparent, 1.1f);
59508 Dust dust2 = dust4;
59509 dust2.velocity *= 2f;
59510 dust4.noGravity = true;
59511 }
59512 for (int l = -1; l <= 1; l += 2)
59513 {
59514 for (int m = -1; m <= 1; m += 2)
59515 {
59516 if (Main.rand.Next(5) == 0)
59517 {
59518 Gore gore = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
59519 Gore gore2 = gore;
59520 gore2.velocity *= 0.2f;
59521 gore2 = gore;
59522 gore2.scale *= 0.65f;
59523 gore2 = gore;
59524 gore2.velocity += new Vector2(l, m) * 0.5f;
59525 }
59526 }
59527 }
59528 }
59529 else if (type == 949)
59530 {
59532 int num2 = (int)ai[0];
59533 float num3 = 20f;
59534 for (float num4 = 0f; num4 < num3; num4++)
59535 {
59537 int num5 = Dust.NewDust(vector, 4, 4, num2, 0f, 0f, 100);
59538 if (Main.rand.Next(3) != 0)
59539 {
59540 Main.dust[num5].noGravity = true;
59541 }
59542 Dust dust2 = Main.dust[num5];
59543 dust2.velocity *= 0.8f;
59544 if (num2 == 66)
59545 {
59546 Main.dust[num5].color = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
59547 Main.dust[num5].noGravity = true;
59548 }
59549 }
59550 }
59551 else if (type == 985)
59552 {
59553 if (localAI[1] != 1f)
59554 {
59555 Color value = new Color(64, 220, 96);
59556 Color value2 = new Color(15, 84, 125);
59557 for (int n = 0; n < 20; n++)
59558 {
59559 float num6 = Main.rand.NextFloatDirection();
59560 float num7 = 1f - Math.Abs(num6);
59561 float f = rotation + num6 * ((float)Math.PI / 2f) * 0.9f;
59562 Vector2 vector2 = base.Center + f.ToRotationVector2() * Utils.Remap(Main.rand.NextFloat(), 0f, 1f, 60f, 85f) * scale;
59563 float num8 = Main.rand.NextFloat();
59564 vector2 -= rotation.ToRotationVector2() * num8 * 70f * scale;
59566 value3 = Color.Lerp(value3, Color.White, 0.5f);
59567 Color.Lerp(value3, Color.White, Main.rand.NextFloat() * 0.3f);
59568 Dust dust5 = Dust.NewDustPerfect(vector2, 107, velocity.RotatedBy(num6 * ((float)Math.PI / 4f)) * 0.2f * Main.rand.NextFloat(), 100, default(Color), 1.4f * num7);
59569 Dust dust2 = dust5;
59570 dust2.position -= dust5.velocity * Main.rand.NextFloat() * 3f;
59571 dust2 = dust5;
59572 dust2.scale *= 1f - num8;
59573 }
59574 for (int num9 = 0; num9 < 10; num9++)
59575 {
59576 float num10 = Main.rand.NextFloatDirection();
59577 float num11 = 1f - Math.Abs(num10);
59578 float f2 = rotation + num10 * ((float)Math.PI / 2f) * 0.9f;
59579 Vector2 vector3 = base.Center + f2.ToRotationVector2() * Utils.Remap(Main.rand.NextFloat(), 0f, 1f, 70f, 85f) * scale;
59580 float num12 = Main.rand.NextFloat() * 0.25f;
59581 vector3 -= rotation.ToRotationVector2() * (0.2f + num12) * 70f * scale;
59582 Color value4 = Color.Lerp(value2, value, 0.66f);
59583 value4 = Color.Lerp(value4, Color.White, 0.33f);
59584 Color.Lerp(value4, Color.White, Main.rand.NextFloat() * 0.3f);
59585 Dust dust6 = Dust.NewDustPerfect(vector3, 107, velocity.RotatedBy(num10 * ((float)Math.PI / 4f)) * 0.2f * Main.rand.NextFloat(), 100, default(Color), 1.4f * num11);
59586 Dust dust2 = dust6;
59587 dust2.position -= dust6.velocity * Main.rand.NextFloat() * 3f;
59588 dust2 = dust6;
59589 dust2.scale *= 1f - num12;
59590 }
59591 for (int num13 = 0; num13 < 10; num13++)
59592 {
59593 float num14 = Main.rand.NextFloatDirection();
59594 float num15 = 1f - Math.Abs(num14);
59595 float f3 = rotation + num14 * ((float)Math.PI / 2f) * 0.9f;
59596 Vector2 vector4 = base.Center + f3.ToRotationVector2() * Utils.Remap(Main.rand.NextFloat(), 0f, 1f, 60f, 75f) * scale;
59597 float num16 = Main.rand.NextFloat() * 0.25f;
59598 vector4 -= rotation.ToRotationVector2() * (0.5f + num16) * 70f * scale;
59599 Color value5 = Color.Lerp(value2, value, 0.33f);
59600 value5 = Color.Lerp(value5, Color.White, 0.16f);
59601 Color.Lerp(value5, Color.White, Main.rand.NextFloat() * 0.3f);
59602 Dust dust7 = Dust.NewDustPerfect(vector4, 107, velocity.RotatedBy(num14 * ((float)Math.PI / 4f)) * 0.2f * Main.rand.NextFloat(), 100, default(Color), 1.4f * num15);
59603 Dust dust2 = dust7;
59604 dust2.position -= dust7.velocity * Main.rand.NextFloat() * 3f;
59605 dust2 = dust7;
59606 dust2.scale *= 1f - num16;
59607 }
59608 }
59609 }
59610 else if (type == 756)
59611 {
59612 for (float num17 = 0f; num17 < 1f; num17 += 0.025f)
59613 {
59614 Dust dust8 = Dust.NewDustPerfect(base.Center + Main.rand.NextVector2Circular(16f, 16f) * scale + velocity.SafeNormalize(Vector2.UnitY) * num17 * 200f * scale, 5, Main.rand.NextVector2Circular(3f, 3f));
59615 dust8.velocity.Y += -0.3f;
59616 Dust dust2 = dust8;
59617 dust2.velocity += velocity * 0.2f;
59618 dust8.scale = 1f;
59619 dust8.alpha = 100;
59620 }
59621 }
59622 else if (type == 961)
59623 {
59624 for (float num18 = 0f; num18 < 1f; num18 += 0.25f)
59625 {
59626 Dust dust9 = Dust.NewDustPerfect(base.Center + Main.rand.NextVector2Circular(16f, 16f) * scale + velocity.SafeNormalize(Vector2.UnitY) * num18 * 200f * scale, 16, Main.rand.NextVector2Circular(3f, 3f));
59627 dust9.velocity.Y += -0.3f;
59628 Dust dust2 = dust9;
59629 dust2.velocity += velocity * 0.2f;
59630 dust9.scale = 1f;
59631 dust9.alpha = 100;
59632 }
59633 }
59634 else if (type == 962)
59635 {
59636 for (int num19 = 0; num19 < 20; num19++)
59637 {
59638 Dust dust10 = Dust.NewDustPerfect(base.Center + Main.rand.NextVector2Circular(16f, 16f) * scale, 16, Main.rand.NextVector2Circular(2f, 2f));
59639 Dust dust2 = dust10;
59640 dust2.velocity += velocity * 0.1f;
59641 dust10.scale = 1f;
59642 dust10.alpha = 100;
59643 }
59644 }
59645 else if (type == 932)
59646 {
59649 Vector2 target = base.Center;
59650 Main.rand.NextFloat();
59651 int num20 = 10;
59652 for (int num21 = 0; num21 < num20; num21++)
59653 {
59655 int num22 = Main.rand.Next(1, 3);
59656 float num23 = MathHelper.Lerp(0.3f, 1f, Utils.GetLerpValue(num20, 0f, num21, clamped: true));
59657 if ((float)num21 >= (float)oldPos.Length * 0.3f)
59658 {
59659 num22--;
59660 }
59661 if ((float)num21 >= (float)oldPos.Length * 0.75f)
59662 {
59663 num22 -= 2;
59664 }
59665 vector5.DirectionTo(target).SafeNormalize(Vector2.Zero);
59666 target = vector5;
59667 for (float num24 = 0f; num24 < (float)num22; num24++)
59668 {
59669 int num25 = Dust.NewDust(vector5, width, height, 267, 0f, 0f, 0, fairyQueenWeaponsColor);
59670 Dust dust2 = Main.dust[num25];
59671 dust2.velocity *= Main.rand.NextFloat() * 0.8f;
59672 Main.dust[num25].noGravity = true;
59673 Main.dust[num25].scale = 0.9f + Main.rand.NextFloat() * 1.2f;
59674 Main.dust[num25].fadeIn = Main.rand.NextFloat() * 1.2f * num23;
59675 dust2 = Main.dust[num25];
59676 dust2.scale *= num23;
59677 if (num25 != 6000)
59678 {
59679 Dust dust11 = Dust.CloneDust(num25);
59680 dust2 = dust11;
59681 dust2.scale /= 2f;
59682 dust2 = dust11;
59683 dust2.fadeIn *= 0.85f;
59684 dust11.color = new Color(255, 255, 255, 255);
59685 }
59686 }
59687 }
59688 }
59689 else if (type == 931)
59690 {
59693 Vector2 target2 = base.Center;
59694 Main.rand.NextFloat();
59695 for (int num26 = 0; num26 < oldPos.Length; num26++)
59696 {
59698 if (vector6 == Vector2.Zero)
59699 {
59700 break;
59701 }
59702 int num27 = Main.rand.Next(1, 3);
59703 float num28 = MathHelper.Lerp(0.3f, 1f, Utils.GetLerpValue(oldPos.Length, 0f, num26, clamped: true));
59704 if ((float)num26 >= (float)oldPos.Length * 0.3f)
59705 {
59706 num27--;
59707 }
59708 if ((float)num26 >= (float)oldPos.Length * 0.75f)
59709 {
59710 num27 -= 2;
59711 }
59712 vector6.DirectionTo(target2).SafeNormalize(Vector2.Zero);
59713 target2 = vector6;
59714 for (float num29 = 0f; num29 < (float)num27; num29++)
59715 {
59716 int num30 = Dust.NewDust(vector6, width, height, 267, 0f, 0f, 0, fairyQueenWeaponsColor2);
59717 Dust dust2 = Main.dust[num30];
59718 dust2.velocity *= Main.rand.NextFloat() * 0.8f;
59719 Main.dust[num30].noGravity = true;
59720 Main.dust[num30].scale = 0.9f + Main.rand.NextFloat() * 1.2f;
59721 Main.dust[num30].fadeIn = Main.rand.NextFloat() * 1.2f * num28;
59722 dust2 = Main.dust[num30];
59723 dust2.scale *= num28;
59724 if (num30 != 6000)
59725 {
59726 Dust dust12 = Dust.CloneDust(num30);
59727 dust2 = dust12;
59728 dust2.scale /= 2f;
59729 dust2 = dust12;
59730 dust2.fadeIn *= 0.85f;
59731 dust12.color = new Color(255, 255, 255, 255);
59732 }
59733 }
59734 }
59735 }
59736 else if (type == 79)
59737 {
59738 int newWidth = width;
59739 int newHeight = height;
59740 Resize(128, 128);
59741 maxPenetrate = -1;
59742 penetrate = -1;
59743 Damage();
59746 Vector2 target3 = base.Center;
59747 float num31 = Main.rand.NextFloat();
59748 for (int num32 = 0; num32 < oldPos.Length; num32++)
59749 {
59751 if (vector7 == Vector2.Zero)
59752 {
59753 break;
59754 }
59755 Color newColor = Main.hslToRgb((num31 + Utils.GetLerpValue(oldPos.Length, 0f, num32, clamped: true)) % 1f, 1f, 0.65f);
59756 int num33 = Main.rand.Next(1, 4);
59757 float lerpValue = Utils.GetLerpValue(oldPos.Length, 0f, num32, clamped: true);
59758 float num34 = MathHelper.Lerp(0.3f, 1f, lerpValue);
59759 if ((float)num32 >= (float)oldPos.Length * 0.3f)
59760 {
59761 num33--;
59762 }
59763 if ((float)num32 >= (float)oldPos.Length * 0.65f)
59764 {
59765 num33 -= 2;
59766 }
59767 if ((float)num32 >= (float)oldPos.Length * 0.85f)
59768 {
59769 num33 -= 3;
59770 }
59771 Vector2 vector8 = vector7.DirectionTo(target3).SafeNormalize(Vector2.Zero);
59772 target3 = vector7;
59773 Vector2 vector9 = base.Size / 2f;
59774 for (float num35 = 0f; num35 < (float)num33; num35++)
59775 {
59776 int num36 = Dust.NewDust(vector7, width, height, 267, 0f, 0f, 0, newColor);
59777 Dust dust2 = Main.dust[num36];
59778 dust2.velocity *= Main.rand.NextFloat() * 0.8f;
59779 Main.dust[num36].noGravity = true;
59780 Main.dust[num36].scale = 0.9f + Main.rand.NextFloat() * 1.2f;
59781 Main.dust[num36].fadeIn = Main.rand.NextFloat() * 1.2f * num34;
59782 dust2 = Main.dust[num36];
59783 dust2.velocity += vector8 * 6f;
59784 dust2 = Main.dust[num36];
59785 dust2.scale *= num34;
59786 Main.dust[num36].position = Vector2.Lerp(vector7 + vector9, Main.dust[num36].position, lerpValue);
59787 if (num36 != 6000)
59788 {
59789 Dust dust13 = Dust.CloneDust(num36);
59790 dust2 = dust13;
59791 dust2.scale /= 2f;
59792 dust2 = dust13;
59793 dust2.fadeIn *= 0.85f;
59794 dust13.color = new Color(255, 255, 255, 255);
59795 }
59796 }
59797 }
59798 for (float num37 = 0f; num37 < 0.5f; num37 += 0.25f)
59799 {
59801 {
59802 PositionInWorld = base.Center,
59803 MovementVector = Vector2.UnitX.RotatedBy(num37 * ((float)Math.PI * 2f)) * 16f
59804 }, owner);
59805 }
59806 for (int num38 = 0; num38 < 14; num38++)
59807 {
59808 int num39 = Dust.NewDust(position, width, height, 66, 0f, 0f, 100, Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f), 1.7f);
59809 Main.dust[num39].noGravity = true;
59810 Dust dust2 = Main.dust[num39];
59811 dust2.velocity *= 3f;
59812 }
59813 }
59814 else if (type == 16)
59815 {
59816 int newWidth2 = width;
59817 int newHeight2 = height;
59818 Resize(128, 128);
59819 maxPenetrate = -1;
59820 penetrate = -1;
59821 Damage();
59824 Vector2 target4 = base.Center;
59825 for (int num40 = 0; num40 < oldPos.Length; num40++)
59826 {
59828 if (vector10 == Vector2.Zero)
59829 {
59830 break;
59831 }
59832 Color newColor2 = Main.hslToRgb(4f / 9f + Main.rand.NextFloat() * (2f / 9f), 1f, 0.65f);
59833 int num41 = Main.rand.Next(1, 4);
59834 float num42 = MathHelper.Lerp(0.3f, 1f, Utils.GetLerpValue(oldPos.Length, 0f, num40, clamped: true));
59835 if ((float)num40 >= (float)oldPos.Length * 0.3f)
59836 {
59837 num41--;
59838 }
59839 if ((float)num40 >= (float)oldPos.Length * 0.75f)
59840 {
59841 num41 -= 2;
59842 }
59843 Vector2 vector11 = vector10.DirectionTo(target4).SafeNormalize(Vector2.Zero);
59844 target4 = vector10;
59845 for (float num43 = 0f; num43 < (float)num41; num43++)
59846 {
59847 if (Main.rand.Next(3) == 0)
59848 {
59849 int num44 = Dust.NewDust(vector10, width, height, 267, 0f, 0f, 0, newColor2);
59850 Dust dust2 = Main.dust[num44];
59851 dust2.velocity *= Main.rand.NextFloat() * 0.8f;
59852 Main.dust[num44].noGravity = true;
59853 Main.dust[num44].scale = Main.rand.NextFloat() * 0.8f;
59854 Main.dust[num44].fadeIn = Main.rand.NextFloat() * 1.2f * num42;
59855 dust2 = Main.dust[num44];
59856 dust2.velocity += vector11 * 6f;
59857 dust2 = Main.dust[num44];
59858 dust2.scale *= num42;
59859 if (num44 != 6000)
59860 {
59861 Dust dust14 = Dust.CloneDust(num44);
59862 dust2 = dust14;
59863 dust2.scale /= 2f;
59864 dust2 = dust14;
59865 dust2.fadeIn /= 2f;
59866 dust14.color = new Color(255, 255, 255, 255);
59867 }
59868 }
59869 else
59870 {
59871 Dust dust15 = Dust.NewDustDirect(vector10, width, height, 15, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100);
59872 Main.rand.Next(2);
59873 dust15.noGravity = true;
59874 Dust dust2 = dust15;
59875 dust2.velocity *= 2f;
59876 dust2 = dust15;
59877 dust2.velocity += vector11 * 9f;
59878 dust2 = dust15;
59879 dust2.scale *= num42;
59880 dust15.fadeIn = (0.6f + Main.rand.NextFloat() * 0.4f) * num42;
59881 dust15.noLightEmittence = (dust15.noLight = true);
59882 }
59883 }
59884 }
59885 for (int num45 = 0; num45 < 20; num45++)
59886 {
59887 Dust dust16 = Dust.NewDustDirect(position, width, height, 15);
59888 dust16.noGravity = true;
59889 dust16.velocity = Main.rand.NextVector2Circular(1f, 1f) * 1.5f;
59890 dust16.scale = 1.2f + Main.rand.NextFloat() * 0.5f;
59891 dust16.noLightEmittence = (dust16.noLight = true);
59892 Dust dust2 = dust16;
59893 dust2.velocity += velocity * 0.01f;
59894 dust2 = dust16;
59895 dust2.position += dust16.velocity * Main.rand.Next(1, 16);
59896 dust16 = Dust.NewDustDirect(position, width, height, 15, 0f, 0f, 100);
59897 dust2 = dust16;
59898 dust2.velocity *= 1.2f;
59899 dust16.noLightEmittence = (dust16.noLight = true);
59900 dust2 = dust16;
59901 dust2.velocity += velocity * 0.01f;
59902 dust2 = dust16;
59903 dust2.scale *= 0.8f + Main.rand.NextFloat() * 0.2f;
59904 dust2 = dust16;
59905 dust2.position += dust16.velocity * Main.rand.Next(1, 16);
59906 }
59907 }
59908 else if (type == 34)
59909 {
59910 int newWidth3 = width;
59911 int newHeight3 = height;
59912 Resize(96, 96);
59913 maxPenetrate = -1;
59914 penetrate = -1;
59915 Damage();
59918 Vector2 target5 = base.Center;
59919 for (int num46 = 0; num46 < oldPos.Length; num46++)
59920 {
59922 if (vector12 == Vector2.Zero)
59923 {
59924 break;
59925 }
59926 Color newColor3 = Main.hslToRgb(Main.rand.NextFloat() * (1f / 9f), 1f, 0.5f);
59927 int num47 = Main.rand.Next(1, 5);
59928 float num48 = MathHelper.Lerp(0.3f, 1f, Utils.GetLerpValue(oldPos.Length, 0f, num46, clamped: true));
59929 if ((float)num46 >= (float)oldPos.Length * 0.3f)
59930 {
59931 num47--;
59932 }
59933 if ((float)num46 >= (float)oldPos.Length * 0.75f)
59934 {
59935 num47 -= 2;
59936 }
59937 Vector2 vector13 = vector12.DirectionTo(target5).SafeNormalize(Vector2.Zero);
59938 target5 = vector12;
59939 for (float num49 = 0f; num49 < (float)num47; num49++)
59940 {
59941 if (Main.rand.Next(3) == 0)
59942 {
59943 int num50 = Dust.NewDust(vector12, width, height, 267, 0f, 0f, 0, newColor3);
59944 Dust dust2 = Main.dust[num50];
59945 dust2.velocity *= Main.rand.NextFloat() * 0.8f;
59946 Main.dust[num50].noGravity = true;
59947 Main.dust[num50].scale = Main.rand.NextFloat() * 1f;
59948 Main.dust[num50].fadeIn = Main.rand.NextFloat() * 2f;
59949 dust2 = Main.dust[num50];
59950 dust2.velocity += vector13 * 8f;
59951 dust2 = Main.dust[num50];
59952 dust2.scale *= num48;
59953 if (num50 != 6000)
59954 {
59955 Dust dust17 = Dust.CloneDust(num50);
59956 dust2 = dust17;
59957 dust2.scale /= 2f;
59958 dust2 = dust17;
59959 dust2.fadeIn /= 2f;
59960 dust17.color = new Color(255, 255, 255, 255);
59961 }
59962 }
59963 else
59964 {
59965 Dust dust18 = Dust.NewDustDirect(vector12, width, height, 6, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100);
59966 Dust dust2;
59967 if (Main.rand.Next(2) == 0)
59968 {
59969 dust18.noGravity = true;
59970 dust2 = dust18;
59971 dust2.scale *= 2.5f;
59972 }
59973 dust2 = dust18;
59974 dust2.velocity *= 2f;
59975 dust2 = dust18;
59976 dust2.velocity += vector13 * 6f;
59977 dust2 = dust18;
59978 dust2.scale *= num48;
59979 dust18.noLightEmittence = (dust18.noLight = true);
59980 }
59981 }
59982 }
59983 for (int num51 = 0; num51 < 20; num51++)
59984 {
59985 Dust dust19 = Dust.NewDustDirect(position, width, height, 6, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100);
59986 dust19.noGravity = true;
59987 dust19.velocity = Main.rand.NextVector2Circular(1f, 1f) * 6f;
59988 dust19.scale = 1.6f;
59989 dust19.fadeIn = 1.3f + Main.rand.NextFloat() * 1f;
59990 dust19.noLightEmittence = (dust19.noLight = true);
59991 Dust dust2 = dust19;
59992 dust2.velocity += velocity * 0.1f;
59993 dust19 = Dust.NewDustDirect(position, width, height, 6, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100);
59994 dust2 = dust19;
59995 dust2.velocity *= 2f;
59996 dust19.noLightEmittence = (dust19.noLight = true);
59997 dust2 = dust19;
59998 dust2.velocity += velocity * 0.1f;
59999 }
60000 }
60001 if (type == 873)
60002 {
60003 int num52 = 20;
60004 float num53 = (float)Math.PI * 2f / (float)num52;
60005 float num54 = velocity.ToRotation();
60007 for (int num55 = 0; num55 < num52; num55++)
60008 {
60009 Dust dust20 = Dust.NewDustPerfect(base.Center, 267);
60010 dust20.fadeIn = 1f;
60011 dust20.noGravity = true;
60012 dust20.alpha = 100;
60013 dust20.color = Color.Lerp(value6, Color.White, Main.rand.NextFloat() * 0.4f);
60014 if (num55 % 4 == 0)
60015 {
60016 dust20.velocity = num54.ToRotationVector2() * 3.2f;
60017 dust20.scale = 2.3f;
60018 }
60019 else if (num55 % 2 == 0)
60020 {
60021 dust20.velocity = num54.ToRotationVector2() * 1.8f;
60022 dust20.scale = 1.9f;
60023 }
60024 else
60025 {
60026 dust20.velocity = num54.ToRotationVector2();
60027 dust20.scale = 1.6f;
60028 }
60029 num54 += num53;
60030 Dust dust2 = dust20;
60031 dust2.velocity += velocity * Main.rand.NextFloat() * 0.5f;
60032 }
60033 }
60034 _ = type;
60035 _ = 857;
60036 if (type == 1012)
60037 {
60038 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
60039 for (int num56 = 0; num56 < 40; num56++)
60040 {
60041 Vector2 vector14 = Vector2.UnitY.RotatedBy((float)num56 * ((float)Math.PI * 2f)) * (2f + Main.rand.NextFloat() * 0.5f);
60042 vector14 += velocity * Main.rand.NextFloat();
60044 if (Main.rand.Next(3) == 0)
60045 {
60046 Dust dust21 = Dust.NewDustDirect(newColor: Main.rand.Next(3) switch
60047 {
60048 0 => new Color(226, 116, 56),
60049 1 => new Color(243, 175, 93),
60050 2 => new Color(254, 210, 146),
60051 _ => new Color(176, 64, 36),
60052 }, Position: position + Main.rand.NextVector2Circular(18f, 18f) * scale, Width: 2, Height: 2, Type: 284, SpeedX: vector14.X, SpeedY: vector14.Y, Alpha: 0, Scale: Main.rand.NextFloat() * 1f + 1f);
60053 Dust dust2 = dust21;
60054 dust2.position -= velocity;
60055 dust21.fadeIn = 1f;
60056 }
60057 else
60058 {
60059 vector14 *= 0.3f;
60060 Dust dust22 = Dust.NewDustDirect(position + Main.rand.NextVector2Circular(18f, 18f) * scale, 2, 2, 138, vector14.X, vector14.Y, 0, default(Color), Main.rand.NextFloat() * 0.3f + 0.6f);
60061 Dust dust2 = dust22;
60062 dust2.position -= velocity;
60063 }
60064 }
60065 }
60066 if (type == 920)
60067 {
60068 for (int num57 = 0; num57 < 6; num57++)
60069 {
60070 Vector2 vector15 = Vector2.UnitY.RotatedBy((float)num57 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (2f + Main.rand.NextFloat() * 0.5f);
60071 int num58 = Dust.NewDust(position + base.Size * Main.rand.NextVector2Square(0f, 1f), 4, 4, 4, vector15.X, vector15.Y, 80, new Color(78, 136, 255, 150), 1.5f);
60072 Main.dust[num58].noGravity = true;
60073 }
60074 }
60075 if (type == 921)
60076 {
60077 for (int num59 = 0; num59 < 12; num59++)
60078 {
60079 Vector2 vector16 = Vector2.UnitY.RotatedBy((float)num59 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (3f + Main.rand.NextFloat() * 0.5f);
60080 int num60 = Dust.NewDust(position + base.Size * Main.rand.NextVector2Square(0f, 1f), 6, 6, 243, vector16.X, vector16.Y, 80, default(Color), 1.5f);
60081 Main.dust[num60].noGravity = true;
60082 }
60083 }
60084 if (type == 926)
60085 {
60086 for (int num61 = 0; num61 < 22; num61++)
60087 {
60088 Vector2 vector17 = Vector2.UnitY.RotatedBy((float)num61 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (3f + Main.rand.NextFloat() * 0.5f);
60089 int num62 = Dust.NewDust(position - new Vector2(8f, 8f), width + 16, height + 16, 31, vector17.X, vector17.Y, 40, NPC.AI_121_QueenSlime_GetDustColor(), 1.5f);
60090 Main.dust[num62].noGravity = true;
60091 }
60092 }
60093 if (type == 937)
60094 {
60095 for (int num63 = 0; num63 < 12; num63++)
60096 {
60097 Vector2 vector18 = Vector2.UnitY.RotatedBy((float)num63 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (3f + Main.rand.NextFloat() * 0.5f);
60098 int num64 = Dust.NewDust(position - new Vector2(8f, 8f), width + 16, height + 16, 31, vector18.X, vector18.Y, 40, NPC.AI_121_QueenSlime_GetDustColor(), 1.5f);
60099 Main.dust[num64].noGravity = true;
60100 }
60101 }
60102 if (type == 818)
60103 {
60104 for (float num65 = 0f; num65 < 1f; num65 += 0.34f)
60105 {
60106 Dust.NewDustPerfect(position + base.Size * Main.rand.NextVector2Square(0f, 1f), 278, Vector2.UnitY.RotatedBy(num65 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (2f + Main.rand.NextFloat() * 0.5f), 150, Color.Lerp(Color.White, Color.Gold, Main.rand.NextFloat()), 0.4f).noGravity = true;
60107 }
60108 for (float num66 = 0f; num66 < 1f; num66 += 0.34f)
60109 {
60110 Dust.NewDustPerfect(position + base.Size * Main.rand.NextVector2Square(0f, 1f), 278, Vector2.UnitY.RotatedBy(num66 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (1f + Main.rand.NextFloat() * 0.5f), 150, Color.Lerp(Color.White, Main.OurFavoriteColor, Main.rand.NextFloat()), 0.7f).noGravity = true;
60111 }
60112 }
60113 if (type == 856)
60114 {
60115 for (int num67 = 0; num67 < 6; num67++)
60116 {
60117 Dust.NewDust(position, width, height, 58, 0f, 0f, 150, default(Color), 0.8f);
60118 }
60119 for (float num68 = 0f; num68 < 1f; num68 += 0.34f)
60120 {
60121 Dust.NewDustPerfect(base.Center, 278, Vector2.UnitY.RotatedBy(num68 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (4f + Main.rand.NextFloat() * 2f), 150, Color.Lerp(Color.White, Color.HotPink, Main.rand.NextFloat() * 0.5f + 0.5f)).noGravity = true;
60122 }
60123 for (float num69 = 0f; num69 < 1f; num69 += 0.34f)
60124 {
60125 Dust.NewDustPerfect(base.Center, 278, Vector2.UnitY.RotatedBy(num69 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * ((float)Math.PI * 2f) * 0.5f) * (2f + Main.rand.NextFloat() * 1f), 150, Color.Lerp(Color.White, Color.Orange, Main.rand.NextFloat() * 0.5f + 0.5f)).noGravity = true;
60126 }
60127 Vector2 vector19 = new Vector2(Main.screenWidth, Main.screenHeight);
60128 if (base.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition + vector19 / 2f, vector19 + new Vector2(400f))))
60129 {
60130 for (int num70 = 0; num70 < 1; num70++)
60131 {
60132 Gore.NewGore(position, Main.rand.NextVector2CircularEdge(0.5f, 0.5f) * 3f, Utils.SelectRandom<int>(Main.rand, 16));
60133 }
60134 }
60136 {
60137 PositionInWorld = base.Center
60138 }, owner);
60139 position = base.Center;
60140 width = (height = 128);
60141 base.Center = position;
60142 maxPenetrate = -1;
60143 penetrate = -1;
60144 Damage();
60145 }
60146 if (type == 818)
60147 {
60148 Damage();
60149 }
60150 if (type == 686)
60151 {
60153 }
60154 else if (type == 711)
60155 {
60157 }
60158 else if (type == 704)
60159 {
60161 if (activeSound != null)
60162 {
60163 activeSound.Volume = 0f;
60164 activeSound.Stop();
60165 }
60166 }
60167 if (type == 710)
60168 {
60169 ai[1] = -1f;
60170 position = base.Center;
60171 width = (height = 40);
60172 base.Center = position;
60173 Damage();
60175 for (int num71 = 0; num71 < 2; num71++)
60176 {
60177 int num72 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
60178 Main.dust[num72].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60179 }
60180 for (int num73 = 0; num73 < 10; num73++)
60181 {
60182 int num74 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 0, default(Color), 2.5f);
60183 Main.dust[num74].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60184 Main.dust[num74].noGravity = true;
60185 Dust dust2 = Main.dust[num74];
60186 dust2.velocity *= 2f;
60187 }
60188 for (int num75 = 0; num75 < 5; num75++)
60189 {
60190 int num76 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
60191 Main.dust[num76].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
60192 Main.dust[num76].noGravity = true;
60193 Dust dust2 = Main.dust[num76];
60194 dust2.velocity *= 2f;
60195 }
60196 }
60197 else if (type == 711)
60198 {
60199 Rectangle hitbox = base.Hitbox;
60200 for (int num77 = 0; num77 < oldPos.Length / 2; num77 += 2)
60201 {
60202 hitbox.X = (int)oldPos[num77].X;
60203 hitbox.Y = (int)oldPos[num77].Y;
60204 for (int num78 = 0; num78 < 2; num78++)
60205 {
60206 int num79 = Utils.SelectRandom<int>(Main.rand, 6, 55, 158);
60207 int num80 = Dust.NewDust(hitbox.TopLeft(), width, height, num79, direction, -2.5f);
60208 Main.dust[num80].alpha = 200;
60209 Dust dust2 = Main.dust[num80];
60210 dust2.velocity *= 2.4f;
60211 dust2 = Main.dust[num80];
60212 dust2.scale += Main.rand.NextFloat();
60213 dust2 = Main.dust[num80];
60214 dust2.scale -= 0.5f;
60215 if (Main.dust[num80].type == 55)
60216 {
60217 Main.dust[num80].color = Color.Lerp(new Color(128, 0, 180, 128), Color.Gold, Main.rand.NextFloat());
60218 }
60219 Main.dust[num80].noLight = true;
60220 }
60221 }
60222 for (int num81 = 10; num81 < oldPos.Length; num81 += 2)
60223 {
60224 hitbox.X = (int)oldPos[num81].X;
60225 hitbox.Y = (int)oldPos[num81].Y;
60226 for (int num82 = 0; num82 < 2; num82++)
60227 {
60228 if (Main.rand.Next(3) != 0)
60229 {
60230 int num83 = Utils.SelectRandom<int>(Main.rand, 55);
60231 int num84 = Dust.NewDust(hitbox.TopLeft(), width, height, num83, direction, -2.5f);
60232 Main.dust[num84].alpha = 120;
60233 Dust dust2 = Main.dust[num84];
60234 dust2.velocity *= 2.4f;
60235 dust2 = Main.dust[num84];
60236 dust2.scale += Main.rand.NextFloat() * 0.7f;
60237 dust2 = Main.dust[num84];
60238 dust2.scale -= 0.5f;
60239 if (Main.dust[num84].type == 55)
60240 {
60241 Main.dust[num84].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat());
60242 }
60243 Main.dust[num84].noLight = true;
60244 }
60245 }
60246 }
60247 for (int num85 = 5; num85 < oldPos.Length; num85++)
60248 {
60249 hitbox.X = (int)oldPos[num85].X;
60250 hitbox.Y = (int)oldPos[num85].Y;
60251 for (int num86 = 0; num86 < 1; num86++)
60252 {
60253 if (Main.rand.Next(3) != 0)
60254 {
60255 int num87 = Utils.SelectRandom<int>(Main.rand, 55);
60256 int num88 = Dust.NewDust(hitbox.TopLeft(), width, height, num87, direction, -2.5f);
60257 Main.dust[num88].alpha = 80;
60258 Dust dust2 = Main.dust[num88];
60259 dust2.velocity *= 0.3f;
60260 dust2 = Main.dust[num88];
60261 dust2.velocity += velocity * 0.5f;
60262 dust2 = Main.dust[num88];
60263 dust2.scale += Main.rand.NextFloat() * 0.7f;
60264 dust2 = Main.dust[num88];
60265 dust2.scale -= 0.5f;
60266 if (Main.dust[num88].type == 55)
60267 {
60268 Main.dust[num88].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat());
60269 }
60270 Main.dust[num88].noLight = true;
60271 }
60272 }
60273 }
60274 for (int num89 = 0; num89 < 20; num89++)
60275 {
60276 if (Main.rand.Next(3) != 0)
60277 {
60278 int num90 = 228;
60279 Dust dust23 = Main.dust[Dust.NewDust(position, width, height, num90)];
60280 dust23.noGravity = true;
60281 dust23.scale = 1.25f + Main.rand.NextFloat();
60282 dust23.fadeIn = 1.5f;
60283 Dust dust2 = dust23;
60284 dust2.velocity *= 6f;
60285 dust23.noLight = true;
60286 }
60287 }
60288 for (int num91 = 0; num91 < 20; num91++)
60289 {
60290 if (Main.rand.Next(3) != 0)
60291 {
60292 int num92 = 55;
60293 Dust dust24 = Main.dust[Dust.NewDust(position, width, height, num92)];
60294 dust24.noGravity = true;
60295 dust24.scale = 1.25f + Main.rand.NextFloat();
60296 dust24.fadeIn = 1.5f;
60297 Dust dust2 = dust24;
60298 dust2.velocity *= 6f;
60299 dust24.noLight = true;
60300 dust24.color = new Color(0, 0, 220, 128);
60301 }
60302 }
60303 if (owner == Main.myPlayer)
60304 {
60305 position = base.Center;
60306 base.Size = new Vector2(140f);
60307 base.Center = position;
60308 penetrate = -1;
60309 usesLocalNPCImmunity = true;
60311 Damage();
60312 }
60313 }
60314 else if (type == 662 || type == 685)
60315 {
60316 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
60317 Vector2 vector20 = oldVelocity.SafeNormalize(Vector2.Zero);
60319 for (int num93 = 0; num93 < 16; num93++)
60320 {
60321 if (Main.rand.Next(2) == 0)
60322 {
60323 vector21 -= vector20 * 8f;
60324 continue;
60325 }
60326 Dust dust25 = Dust.NewDustDirect(vector21, width, height, 11);
60327 dust25.position = (dust25.position + base.Center) / 2f;
60328 Dust dust2 = dust25;
60329 dust2.velocity += oldVelocity * 0.4f;
60330 dust2 = dust25;
60331 dust2.velocity *= 0.5f;
60332 dust25.noGravity = true;
60333 vector21 -= vector20 * 8f;
60334 }
60335 }
60336 if (type == 680)
60337 {
60338 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
60339 Vector2 vector22 = oldVelocity.SafeNormalize(Vector2.Zero);
60341 for (int num94 = 0; num94 < 16; num94++)
60342 {
60343 if (Main.rand.Next(2) == 0)
60344 {
60345 vector23 -= vector22 * 8f;
60346 continue;
60347 }
60348 Dust dust26 = Dust.NewDustDirect(vector23, width, height, 11);
60349 dust26.position = (dust26.position + base.Center) / 2f;
60350 Dust dust2 = dust26;
60351 dust2.velocity += oldVelocity * 0.4f;
60352 dust2 = dust26;
60353 dust2.velocity *= 0.5f;
60354 dust26.noGravity = true;
60355 vector23 -= vector22 * 8f;
60356 }
60357 Dust.NewDustDirect(position, width, height, 11, 0f, 0f, 0, Color.Red, 1.6f).noGravity = true;
60358 }
60359 if (type == 664 || type == 666 || type == 668 || type == 706)
60360 {
60361 int num95 = 4;
60362 int num96 = 20;
60363 int num97 = 10;
60364 int num98 = 20;
60365 int num99 = 20;
60366 int num100 = 4;
60367 float num101 = 1.5f;
60368 int num102 = 6;
60369 int num103 = 6;
60370 if (Main.player[owner].setApprenticeT3)
60371 {
60372 num95 += 4;
60373 num99 += 10;
60374 num96 += 20;
60375 num98 += 30;
60376 num97 /= 2;
60377 num100 += 4;
60378 num101 += 0.5f;
60379 num102 += 7;
60380 num103 = 270;
60381 }
60382 position = base.Center;
60383 width = (height = 16 * num102);
60384 base.Center = position;
60385 Damage();
60387 for (int num104 = 0; num104 < num95; num104++)
60388 {
60389 int num105 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
60390 Main.dust[num105].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60391 }
60392 for (int num106 = 0; num106 < num96; num106++)
60393 {
60394 Dust dust27 = Dust.NewDustDirect(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 200, default(Color), 2.5f);
60395 dust27.position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 10f;
60396 Dust dust2 = dust27;
60397 dust2.velocity *= 16f;
60398 if (dust27.velocity.Y > -2f)
60399 {
60400 dust27.velocity.Y *= -0.4f;
60401 }
60402 dust27.noLight = true;
60403 dust27.noGravity = true;
60404 }
60405 for (int num107 = 0; num107 < num98; num107++)
60406 {
60407 Dust dust28 = Dust.NewDustDirect(new Vector2(position.X, position.Y), width, height, num103, 0f, 0f, 100, default(Color), 1.5f);
60408 dust28.position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60409 Dust dust2 = dust28;
60410 dust2.velocity *= 2f;
60411 dust28.noGravity = true;
60412 dust28.fadeIn = num101;
60413 }
60414 for (int num108 = 0; num108 < num97; num108++)
60415 {
60416 int num109 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 0, default(Color), 2.7f);
60417 Main.dust[num109].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
60418 Main.dust[num109].noGravity = true;
60419 Dust dust2 = Main.dust[num109];
60420 dust2.velocity *= 3f;
60421 }
60422 for (int num110 = 0; num110 < num99; num110++)
60423 {
60424 int num111 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
60425 Main.dust[num111].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
60426 Main.dust[num111].noGravity = true;
60427 Dust dust2 = Main.dust[num111];
60428 dust2.velocity *= 3f;
60429 }
60430 for (int num112 = 0; num112 < num100; num112++)
60431 {
60432 int num113 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
60433 Main.gore[num113].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60434 Gore gore2 = Main.gore[num113];
60435 gore2.position -= Vector2.One * 16f;
60436 if (Main.rand.Next(2) == 0)
60437 {
60438 Main.gore[num113].position.Y -= 30f;
60439 }
60440 gore2 = Main.gore[num113];
60441 gore2.velocity *= 0.3f;
60442 Main.gore[num113].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
60443 Main.gore[num113].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
60444 }
60445 }
60446 else if (type == 681)
60447 {
60448 position.X += width / 2;
60449 position.Y += height / 2;
60451 width = 22;
60452 height = 22;
60453 position.X -= width / 2;
60454 position.Y -= height / 2;
60455 for (int num114 = 0; num114 < 10; num114++)
60456 {
60457 int num115 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
60458 Dust dust2 = Main.dust[num115];
60459 dust2.velocity *= 1.4f;
60460 num115 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
60461 dust2 = Main.dust[num115];
60462 dust2.velocity *= 1.4f;
60463 Main.dust[num115].noGravity = true;
60464 Main.dust[num115].fadeIn = 2f;
60465 }
60466 for (int num116 = 0; num116 < 10; num116++)
60467 {
60468 int num117 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
60469 Main.dust[num117].noGravity = true;
60470 Dust dust2 = Main.dust[num117];
60471 dust2.velocity *= 5f;
60472 num117 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
60473 dust2 = Main.dust[num117];
60474 dust2.velocity *= 3f;
60475 }
60476 int num118 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
60477 Gore gore2 = Main.gore[num118];
60478 gore2.velocity *= 0.4f;
60479 Main.gore[num118].velocity.X += 1f;
60480 Main.gore[num118].velocity.Y += 1f;
60481 num118 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
60482 gore2 = Main.gore[num118];
60483 gore2.velocity *= 0.4f;
60484 Main.gore[num118].velocity.X -= 1f;
60485 Main.gore[num118].velocity.Y += 1f;
60486 num118 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
60487 gore2 = Main.gore[num118];
60488 gore2.velocity *= 0.4f;
60489 Main.gore[num118].velocity.X += 1f;
60490 Main.gore[num118].velocity.Y -= 1f;
60491 num118 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
60492 gore2 = Main.gore[num118];
60493 gore2.velocity *= 0.4f;
60494 Main.gore[num118].velocity.X -= 1f;
60495 Main.gore[num118].velocity.Y -= 1f;
60496 position.X += width / 2;
60497 position.Y += height / 2;
60498 width = 80;
60499 height = 80;
60500 position.X -= width / 2;
60501 position.Y -= height / 2;
60502 Damage();
60503 }
60504 if (type == 669)
60505 {
60506 SoundEngine.PlaySound(13, (int)position.X, (int)position.Y);
60507 Vector2 vector24 = new Vector2(20f, 20f);
60508 for (int num119 = 0; num119 < 10; num119++)
60509 {
60510 Dust dust29 = Dust.NewDustDirect(base.Center - vector24 / 2f, (int)vector24.X, (int)vector24.Y, 4, 0f, 0f, 100, new Color(255, 255, 255, 110), 1.1f);
60511 Dust dust2 = dust29;
60512 dust2.velocity *= 1.4f;
60513 }
60514 for (int num120 = 0; num120 < 40; num120++)
60515 {
60516 Dust dust30 = Dust.NewDustDirect(base.Center - vector24 / 2f, (int)vector24.X, (int)vector24.Y, 4, 0f, 0f, 50, new Color(245, 200, 30, 155), 1.2f);
60517 dust30.noGravity = true;
60518 Dust dust2 = dust30;
60519 dust2.velocity *= 4f;
60520 dust30 = Dust.NewDustDirect(base.Center - vector24 / 2f, (int)vector24.X, (int)vector24.Y, 4, 0f, 0f, 50, new Color(245, 200, 30, 155), 0.8f);
60521 dust2 = dust30;
60522 dust2.velocity *= 2f;
60523 }
60524 }
60525 if (Main.myPlayer == owner && bobber)
60526 {
60527 PopupText.ClearSonarText();
60528 if (ai[1] > 0f && ai[1] < (float)ItemID.Count)
60529 {
60530 AI_061_FishingBobber_GiveItemToPlayer(Main.player[owner], (int)ai[1]);
60531 }
60532 ai[1] = 0f;
60533 }
60534 if (type == 634 || type == 635)
60535 {
60536 int num121 = Utils.SelectRandom<int>(Main.rand, 242, 73, 72, 71, 255);
60537 int num122 = 255;
60538 int num123 = 255;
60539 int num124 = 50;
60540 float num125 = 1.7f;
60541 float num126 = 0.8f;
60542 float num127 = 2f;
60543 Vector2 vector25 = (rotation - (float)Math.PI / 2f).ToRotationVector2();
60545 if (type == 635)
60546 {
60547 num122 = 88;
60548 num123 = 88;
60549 num121 = Utils.SelectRandom<int>(Main.rand, 242, 59, 88);
60550 num125 = 3.7f;
60551 num126 = 1.5f;
60552 num127 = 2.2f;
60553 vector26 *= 0.5f;
60554 }
60556 position = base.Center;
60557 width = (height = num124);
60558 base.Center = position;
60559 maxPenetrate = -1;
60560 penetrate = -1;
60561 Damage();
60562 for (int num128 = 0; num128 < 40; num128++)
60563 {
60564 num121 = Utils.SelectRandom<int>(Main.rand, 242, 73, 72, 71, 255);
60565 if (type == 635)
60566 {
60567 num121 = Utils.SelectRandom<int>(Main.rand, 242, 59, 88);
60568 }
60569 int num129 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num121, 0f, 0f, 200, default(Color), num125);
60570 Main.dust[num129].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60571 Main.dust[num129].noGravity = true;
60572 Dust dust2 = Main.dust[num129];
60573 dust2.velocity *= 3f;
60574 dust2 = Main.dust[num129];
60575 dust2.velocity += vector26 * Main.rand.NextFloat();
60576 num129 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num122, 0f, 0f, 100, default(Color), num126);
60577 Main.dust[num129].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60578 dust2 = Main.dust[num129];
60579 dust2.velocity *= 2f;
60580 Main.dust[num129].noGravity = true;
60581 Main.dust[num129].fadeIn = 1f;
60582 Main.dust[num129].color = Color.Crimson * 0.5f;
60583 dust2 = Main.dust[num129];
60584 dust2.velocity += vector26 * Main.rand.NextFloat();
60585 }
60586 for (int num130 = 0; num130 < 20; num130++)
60587 {
60588 int num131 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num123, 0f, 0f, 0, default(Color), num127);
60589 Main.dust[num131].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 3f;
60590 Main.dust[num131].noGravity = true;
60591 Dust dust2 = Main.dust[num131];
60592 dust2.velocity *= 0.5f;
60593 dust2 = Main.dust[num131];
60594 dust2.velocity += vector26 * (0.6f + 0.6f * Main.rand.NextFloat());
60595 }
60596 }
60597 else if (type == 651)
60598 {
60599 if (localAI[0] == 1f && owner == Main.myPlayer)
60600 {
60601 Player master = Main.player[owner];
60602 Point ps = new Vector2(ai[0], ai[1]).ToPoint();
60603 Point pe = base.Center.ToTileCoordinates();
60604 if (Main.netMode == 1)
60605 {
60606 NetMessage.SendData(109, -1, -1, null, ps.X, ps.Y, pe.X, pe.Y, (int)WiresUI.Settings.ToolMode);
60607 }
60608 else
60609 {
60610 Wiring.MassWireOperation(ps, pe, master);
60611 }
60612 }
60613 }
60614 else if (type == 641)
60615 {
60616 if (owner == Main.myPlayer)
60617 {
60618 for (int num132 = 0; num132 < 1000; num132++)
60619 {
60620 if (Main.projectile[num132].active && Main.projectile[num132].owner == owner && Main.projectile[num132].type == 642)
60621 {
60622 Main.projectile[num132].Kill();
60623 }
60624 }
60625 }
60626 }
60627 else if (type == 643)
60628 {
60629 if (owner == Main.myPlayer)
60630 {
60631 for (int num133 = 0; num133 < 1000; num133++)
60632 {
60633 if (Main.projectile[num133].active && Main.projectile[num133].owner == owner && Main.projectile[num133].type == 644)
60634 {
60635 Main.projectile[num133].Kill();
60636 }
60637 }
60638 }
60639 }
60640 else if (type == 645)
60641 {
60642 bool flag2 = WorldGen.SolidTile(Framing.GetTileSafely((int)position.X / 16, (int)position.Y / 16));
60643 for (int num134 = 0; num134 < 4; num134++)
60644 {
60645 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
60646 }
60647 for (int num135 = 0; num135 < 4; num135++)
60648 {
60649 int num136 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 0, default(Color), 2.5f);
60650 Main.dust[num136].noGravity = true;
60651 Dust dust2 = Main.dust[num136];
60652 dust2.velocity *= 3f;
60653 if (flag2)
60654 {
60655 Main.dust[num136].noLight = true;
60656 }
60657 num136 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 100, default(Color), 1.5f);
60658 dust2 = Main.dust[num136];
60659 dust2.velocity *= 2f;
60660 Main.dust[num136].noGravity = true;
60661 if (flag2)
60662 {
60663 Main.dust[num136].noLight = true;
60664 }
60665 }
60666 for (int num137 = 0; num137 < 1; num137++)
60667 {
60668 int num138 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
60669 Gore gore2 = Main.gore[num138];
60670 gore2.velocity *= 0.3f;
60671 Main.gore[num138].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
60672 Main.gore[num138].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
60673 }
60674 }
60675 else if (type == 636)
60676 {
60677 Rectangle hitbox2 = base.Hitbox;
60678 for (int num139 = 0; num139 < 6; num139 += 3)
60679 {
60680 hitbox2.X = (int)oldPos[num139].X;
60681 hitbox2.Y = (int)oldPos[num139].Y;
60682 for (int num140 = 0; num140 < 5; num140++)
60683 {
60684 int num141 = Utils.SelectRandom<int>(Main.rand, 6, 259, 158);
60685 int num142 = Dust.NewDust(hitbox2.TopLeft(), width, height, num141, 2.5f * (float)direction, -2.5f);
60686 Main.dust[num142].alpha = 200;
60687 Dust dust2 = Main.dust[num142];
60688 dust2.velocity *= 2.4f;
60689 dust2 = Main.dust[num142];
60690 dust2.scale += Main.rand.NextFloat();
60691 }
60692 }
60693 if (Main.myPlayer == owner)
60694 {
60695 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 953, damage, 10f, owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
60696 }
60697 }
60698 else if (type == 614)
60699 {
60700 for (int num143 = 0; num143 < 10; num143++)
60701 {
60702 Dust dust31 = Main.dust[Dust.NewDust(position, width, height, 229)];
60703 dust31.noGravity = true;
60704 Dust dust2 = dust31;
60705 dust2.velocity *= 3f;
60706 }
60707 }
60708 if (type == 644)
60709 {
60711 if (Main.myPlayer == owner)
60712 {
60713 friendly = true;
60714 int num144 = width;
60715 int num145 = height;
60716 int num146 = penetrate;
60717 position = base.Center;
60718 width = (height = 60);
60719 base.Center = position;
60720 penetrate = -1;
60721 maxPenetrate = -1;
60722 Damage();
60723 penetrate = num146;
60724 position = base.Center;
60725 width = num144;
60726 height = num145;
60727 base.Center = position;
60728 }
60729 }
60730 if (type == 608)
60731 {
60732 maxPenetrate = -1;
60733 penetrate = -1;
60734 Damage();
60736 for (int num147 = 0; num147 < 4; num147++)
60737 {
60738 int num148 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
60739 Main.dust[num148].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60740 }
60741 for (int num149 = 0; num149 < 30; num149++)
60742 {
60743 int num150 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 200, default(Color), 3.7f);
60744 Main.dust[num150].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60745 Main.dust[num150].noGravity = true;
60746 Dust dust2 = Main.dust[num150];
60747 dust2.velocity *= 3f;
60748 Main.dust[num150].shader = GameShaders.Armor.GetSecondaryShader(Main.player[owner].ArmorSetDye(), Main.player[owner]);
60749 num150 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
60750 Main.dust[num150].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60751 dust2 = Main.dust[num150];
60752 dust2.velocity *= 2f;
60753 Main.dust[num150].noGravity = true;
60754 Main.dust[num150].fadeIn = 2.5f;
60755 Main.dust[num150].shader = GameShaders.Armor.GetSecondaryShader(Main.player[owner].ArmorSetDye(), Main.player[owner]);
60756 }
60757 for (int num151 = 0; num151 < 10; num151++)
60758 {
60759 int num152 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 0, default(Color), 2.7f);
60760 Main.dust[num152].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
60761 Main.dust[num152].noGravity = true;
60762 Dust dust2 = Main.dust[num152];
60763 dust2.velocity *= 3f;
60764 Main.dust[num152].shader = GameShaders.Armor.GetSecondaryShader(Main.player[owner].ArmorSetDye(), Main.player[owner]);
60765 }
60766 for (int num153 = 0; num153 < 10; num153++)
60767 {
60768 int num154 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
60769 Main.dust[num154].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
60770 Main.dust[num154].noGravity = true;
60771 Dust dust2 = Main.dust[num154];
60772 dust2.velocity *= 3f;
60773 }
60774 for (int num155 = 0; num155 < 2; num155++)
60775 {
60776 int num156 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
60777 Main.gore[num156].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60778 Gore gore2 = Main.gore[num156];
60779 gore2.velocity *= 0.3f;
60780 Main.gore[num156].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
60781 Main.gore[num156].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
60782 }
60783 }
60784 else if (type == 661)
60785 {
60786 position = base.Center;
60787 width = (height = 160);
60788 base.Center = position;
60789 maxPenetrate = -1;
60790 penetrate = -1;
60791 Damage();
60793 Vector2 vector27 = base.Center + Vector2.One * -20f;
60794 int num157 = 40;
60795 int num158 = num157;
60796 for (int num159 = 0; num159 < 4; num159++)
60797 {
60798 int num160 = Dust.NewDust(vector27, num157, num158, 240, 0f, 0f, 100, default(Color), 1.5f);
60799 Main.dust[num160].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * num157 / 2f;
60800 }
60801 for (int num161 = 0; num161 < 20; num161++)
60802 {
60803 int num162 = Dust.NewDust(vector27, num157, num158, 62, 0f, 0f, 200, default(Color), 3.7f);
60804 Main.dust[num162].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * num157 / 2f;
60805 Main.dust[num162].noGravity = true;
60806 Main.dust[num162].noLight = true;
60807 Dust dust2 = Main.dust[num162];
60808 dust2.velocity *= 3f;
60809 dust2 = Main.dust[num162];
60810 dust2.velocity += DirectionTo(Main.dust[num162].position) * (2f + Main.rand.NextFloat() * 4f);
60811 num162 = Dust.NewDust(vector27, num157, num158, 62, 0f, 0f, 100, default(Color), 1.5f);
60812 Main.dust[num162].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * num157 / 2f;
60813 dust2 = Main.dust[num162];
60814 dust2.velocity *= 2f;
60815 Main.dust[num162].noGravity = true;
60816 Main.dust[num162].fadeIn = 1f;
60817 Main.dust[num162].color = Color.Crimson * 0.5f;
60818 Main.dust[num162].noLight = true;
60819 dust2 = Main.dust[num162];
60820 dust2.velocity += DirectionTo(Main.dust[num162].position) * 8f;
60821 }
60822 for (int num163 = 0; num163 < 20; num163++)
60823 {
60824 int num164 = Dust.NewDust(vector27, num157, num158, 62, 0f, 0f, 0, default(Color), 2.7f);
60825 Main.dust[num164].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * num157 / 2f;
60826 Main.dust[num164].noGravity = true;
60827 Main.dust[num164].noLight = true;
60828 Dust dust2 = Main.dust[num164];
60829 dust2.velocity *= 3f;
60830 dust2 = Main.dust[num164];
60831 dust2.velocity += DirectionTo(Main.dust[num164].position) * 2f;
60832 }
60833 for (int num165 = 0; num165 < 70; num165++)
60834 {
60835 int num166 = Dust.NewDust(vector27, num157, num158, 240, 0f, 0f, 0, default(Color), 1.5f);
60836 Main.dust[num166].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * num157 / 2f;
60837 Main.dust[num166].noGravity = true;
60838 Dust dust2 = Main.dust[num166];
60839 dust2.velocity *= 3f;
60840 dust2 = Main.dust[num166];
60841 dust2.velocity += DirectionTo(Main.dust[num166].position) * 3f;
60842 }
60843 }
60844 else if (type == 617)
60845 {
60846 position = base.Center;
60847 width = (height = 176);
60848 base.Center = position;
60849 maxPenetrate = -1;
60850 penetrate = -1;
60851 Damage();
60853 for (int num167 = 0; num167 < 4; num167++)
60854 {
60855 int num168 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 240, 0f, 0f, 100, default(Color), 1.5f);
60856 Main.dust[num168].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60857 }
60858 for (int num169 = 0; num169 < 30; num169++)
60859 {
60860 int num170 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 62, 0f, 0f, 200, default(Color), 3.7f);
60861 Main.dust[num170].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60862 Main.dust[num170].noGravity = true;
60863 Dust dust2 = Main.dust[num170];
60864 dust2.velocity *= 3f;
60865 num170 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 90, 0f, 0f, 100, default(Color), 1.5f);
60866 Main.dust[num170].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60867 dust2 = Main.dust[num170];
60868 dust2.velocity *= 2f;
60869 Main.dust[num170].noGravity = true;
60870 Main.dust[num170].fadeIn = 1f;
60871 Main.dust[num170].color = Color.Crimson * 0.5f;
60872 }
60873 for (int num171 = 0; num171 < 10; num171++)
60874 {
60875 int num172 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 62, 0f, 0f, 0, default(Color), 2.7f);
60876 Main.dust[num172].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
60877 Main.dust[num172].noGravity = true;
60878 Dust dust2 = Main.dust[num172];
60879 dust2.velocity *= 3f;
60880 }
60881 for (int num173 = 0; num173 < 10; num173++)
60882 {
60883 int num174 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 240, 0f, 0f, 0, default(Color), 1.5f);
60884 Main.dust[num174].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
60885 Main.dust[num174].noGravity = true;
60886 Dust dust2 = Main.dust[num174];
60887 dust2.velocity *= 3f;
60888 }
60889 for (int num175 = 0; num175 < 2; num175++)
60890 {
60891 int num176 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
60892 Main.gore[num176].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
60893 Gore gore2 = Main.gore[num176];
60894 gore2.velocity *= 0.3f;
60895 Main.gore[num176].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
60896 Main.gore[num176].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
60897 }
60898 if (Main.myPlayer == owner)
60899 {
60900 for (int num177 = 0; num177 < 1000; num177++)
60901 {
60902 if (Main.projectile[num177].active && Main.projectile[num177].type == 618 && Main.projectile[num177].ai[1] == (float)whoAmI)
60903 {
60904 Main.projectile[num177].Kill();
60905 }
60906 }
60907 int num178 = Main.rand.Next(5, 9);
60908 int num179 = Main.rand.Next(5, 9);
60909 int num180 = Utils.SelectRandom<int>(Main.rand, 86, 90);
60910 int num181 = ((num180 == 86) ? 90 : 86);
60911 for (int num182 = 0; num182 < num178; num182++)
60912 {
60913 Vector2 vector28 = base.Center + Utils.RandomVector2(Main.rand, -30f, 30f);
60914 Vector2 vector29 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
60915 while (vector29.X == 0f && vector29.Y == 0f)
60916 {
60917 vector29 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
60918 }
60919 vector29.Normalize();
60920 if (vector29.Y > 0.2f)
60921 {
60922 vector29.Y *= -1f;
60923 }
60924 vector29 *= (float)Main.rand.Next(70, 101) * 0.1f;
60925 NewProjectile(GetProjectileSource_FromThis(), vector28.X, vector28.Y, vector29.X, vector29.Y, 620, (int)((double)damage * 0.65), knockBack * 0.8f, owner, num180);
60926 }
60927 for (int num183 = 0; num183 < num179; num183++)
60928 {
60929 Vector2 vector30 = base.Center + Utils.RandomVector2(Main.rand, -30f, 30f);
60930 Vector2 vector31 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
60931 while (vector31.X == 0f && vector31.Y == 0f)
60932 {
60933 vector31 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
60934 }
60935 vector31.Normalize();
60936 if (vector31.Y > 0.4f)
60937 {
60938 vector31.Y *= -1f;
60939 }
60940 vector31 *= (float)Main.rand.Next(40, 81) * 0.1f;
60941 NewProjectile(GetProjectileSource_FromThis(), vector30.X, vector30.Y, vector31.X, vector31.Y, 620, (int)((double)damage * 0.65), knockBack * 0.8f, owner, num181);
60942 }
60943 }
60944 }
60945 else if (type == 658)
60946 {
60947 for (int num184 = 0; num184 < 10; num184++)
60948 {
60949 int num185 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 269, velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.5f);
60950 Dust dust2;
60951 if (Main.rand.Next(3) == 0)
60952 {
60953 Main.dust[num185].fadeIn = 0.75f + (float)Main.rand.Next(-10, 11) * 0.01f;
60954 Main.dust[num185].scale = 0.25f + (float)Main.rand.Next(-10, 11) * 0.005f;
60955 dust2 = Main.dust[num185];
60956 dust2.type++;
60957 }
60958 else
60959 {
60960 Main.dust[num185].scale = 1f + (float)Main.rand.Next(-10, 11) * 0.01f;
60961 }
60962 Main.dust[num185].noGravity = true;
60963 dust2 = Main.dust[num185];
60964 dust2.velocity *= 1.25f;
60965 dust2 = Main.dust[num185];
60966 dust2.velocity -= oldVelocity / 10f;
60967 }
60968 }
60969 else if (type == 620 || type == 618)
60970 {
60971 if (type == 618)
60972 {
60973 ai[0] = 86f;
60974 }
60975 for (int num186 = 0; num186 < 10; num186++)
60976 {
60977 int num187 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, (int)ai[0], velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.5f);
60978 Dust dust2;
60979 if (Main.rand.Next(3) == 0)
60980 {
60981 Main.dust[num187].fadeIn = 0.75f + (float)Main.rand.Next(-10, 11) * 0.01f;
60982 Main.dust[num187].scale = 0.25f + (float)Main.rand.Next(-10, 11) * 0.005f;
60983 dust2 = Main.dust[num187];
60984 dust2.type++;
60985 }
60986 else
60987 {
60988 Main.dust[num187].scale = 1f + (float)Main.rand.Next(-10, 11) * 0.01f;
60989 }
60990 Main.dust[num187].noGravity = true;
60991 dust2 = Main.dust[num187];
60992 dust2.velocity *= 1.25f;
60993 dust2 = Main.dust[num187];
60994 dust2.velocity -= oldVelocity / 10f;
60995 }
60996 }
60997 else if (type == 619)
60998 {
61000 for (int num188 = 0; num188 < 20; num188++)
61001 {
61002 int num189 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, (int)ai[0], velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.5f);
61003 Dust dust2;
61004 if (Main.rand.Next(3) == 0)
61005 {
61006 Main.dust[num189].fadeIn = 1.1f + (float)Main.rand.Next(-10, 11) * 0.01f;
61007 Main.dust[num189].scale = 0.35f + (float)Main.rand.Next(-10, 11) * 0.01f;
61008 dust2 = Main.dust[num189];
61009 dust2.type++;
61010 }
61011 else
61012 {
61013 Main.dust[num189].scale = 1.2f + (float)Main.rand.Next(-10, 11) * 0.01f;
61014 }
61015 Main.dust[num189].noGravity = true;
61016 dust2 = Main.dust[num189];
61017 dust2.velocity *= 2.5f;
61018 dust2 = Main.dust[num189];
61019 dust2.velocity -= oldVelocity / 10f;
61020 }
61021 if (Main.myPlayer == owner)
61022 {
61023 int num190 = Main.rand.Next(3, 6);
61024 for (int num191 = 0; num191 < num190; num191++)
61025 {
61026 Vector2 vector32 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
61027 while (vector32.X == 0f && vector32.Y == 0f)
61028 {
61029 vector32 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
61030 }
61031 vector32.Normalize();
61032 vector32 *= (float)Main.rand.Next(70, 101) * 0.1f;
61033 NewProjectile(GetProjectileSource_FromThis(), oldPosition.X + (float)(width / 2), oldPosition.Y + (float)(height / 2), vector32.X, vector32.Y, 620, (int)((double)damage * 0.8), knockBack * 0.8f, owner, ai[0]);
61034 }
61035 }
61036 }
61037 if (type == 601)
61038 {
61040 Color color = portalColor;
61041 color.A = byte.MaxValue;
61042 for (int num192 = 0; num192 < 6; num192++)
61043 {
61044 Vector2 vector33 = Vector2.UnitY.RotatedByRandom(6.2831854820251465) * (3f * Main.rand.NextFloat());
61045 Dust dust32 = Main.dust[Dust.NewDust(base.Center, 0, 0, 263)];
61046 dust32.position = base.Center;
61047 dust32.velocity = vector33 + velocity / 5f;
61048 dust32.color = color;
61049 dust32.scale = 2f;
61050 dust32.noLight = true;
61051 dust32.noGravity = true;
61052 }
61053 }
61054 if (type == 596)
61055 {
61056 position = base.Center;
61057 width = (height = 60);
61058 base.Center = position;
61059 int num193 = 30;
61060 if (Main.expertMode)
61061 {
61062 num193 = 22;
61063 }
61064 damage = num193;
61065 Damage();
61067 for (int num194 = 0; num194 < 4; num194++)
61068 {
61069 int num195 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
61070 Main.dust[num195].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61071 }
61072 for (int num196 = 0; num196 < 20; num196++)
61073 {
61074 int num197 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 27, 0f, 0f, 0, default(Color), 2.5f);
61075 Main.dust[num197].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61076 Main.dust[num197].noGravity = true;
61077 Dust dust2 = Main.dust[num197];
61078 dust2.velocity *= 2f;
61079 }
61080 for (int num198 = 0; num198 < 10; num198++)
61081 {
61082 int num199 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
61083 Main.dust[num199].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
61084 Main.dust[num199].noGravity = true;
61085 Dust dust2 = Main.dust[num199];
61086 dust2.velocity *= 2f;
61087 }
61088 }
61089 if (type == 659)
61090 {
61091 if (ai[0] >= 0f)
61092 {
61093 int num200 = 80;
61094 position = base.Center;
61095 width = (height = num200);
61096 base.Center = position;
61097 Damage();
61099 int num201 = 15;
61100 int num202 = num201 + 15;
61101 for (int num203 = 0; num203 < num202; num203++)
61102 {
61103 int num204 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 27, 0f, 0f, 0, default(Color), 2f + Main.rand.NextFloat() * 0.5f);
61104 Main.dust[num204].noGravity = true;
61105 if (num203 < num201)
61106 {
61107 float num205 = (float)(num203 + 1) / (float)num201 * ((float)Math.PI * 2f);
61108 Main.dust[num204].fadeIn = 1.5f + Main.rand.NextFloat() * 0.5f;
61109 Main.dust[num204].position = base.Center;
61110 Main.dust[num204].velocity = Vector2.UnitY.RotatedBy(num205) * (5f + Main.rand.NextFloat() * 1.5f);
61111 }
61112 else
61113 {
61114 Main.dust[num204].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * Main.rand.NextFloat() * width / 3f;
61115 Main.dust[num204].fadeIn = 0.5f + Main.rand.NextFloat() * 0.5f;
61116 Dust dust2 = Main.dust[num204];
61117 dust2.velocity *= 2f;
61118 }
61119 }
61120 for (int num206 = 0; num206 < 10; num206++)
61121 {
61122 int num207 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
61123 Main.dust[num207].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 3f;
61124 Main.dust[num207].fadeIn = 0.5f + Main.rand.NextFloat() * 0.5f;
61125 Main.dust[num207].noGravity = true;
61126 Dust dust2 = Main.dust[num207];
61127 dust2.velocity *= 1.5f;
61128 }
61129 }
61130 }
61131 else if (type >= 625 && type <= 628)
61132 {
61133 for (int num208 = 0; num208 < 6; num208++)
61134 {
61135 int num209 = Dust.NewDust(position, width, height, 135, 0f, 0f, 100, default(Color), 2f);
61136 Main.dust[num209].noGravity = true;
61137 Main.dust[num209].noLight = true;
61138 }
61139 }
61140 if (type == 631)
61141 {
61142 int num210 = Main.rand.Next(5, 10);
61143 for (int num211 = 0; num211 < num210; num211++)
61144 {
61145 int num212 = Dust.NewDust(base.Center, 0, 0, 229, 0f, 0f, 100);
61146 Dust dust2 = Main.dust[num212];
61147 dust2.velocity *= 1.6f;
61148 Main.dust[num212].velocity.Y -= 1f;
61149 dust2 = Main.dust[num212];
61150 dust2.position -= Vector2.One * 4f;
61151 Main.dust[num212].position = Vector2.Lerp(Main.dust[num212].position, base.Center, 0.5f);
61152 Main.dust[num212].noGravity = true;
61153 }
61154 }
61155 if (type == 539)
61156 {
61157 position = base.Center;
61158 width = (height = 80);
61159 base.Center = position;
61160 Damage();
61161 SoundEngine.PlaySound(4, (int)position.X, (int)position.Y, 7);
61162 for (int num213 = 0; num213 < 4; num213++)
61163 {
61164 int num214 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
61165 Main.dust[num214].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61166 }
61167 for (int num215 = 0; num215 < 20; num215++)
61168 {
61169 int num216 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 176, 0f, 0f, 200, default(Color), 3.7f);
61170 Main.dust[num216].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61171 Main.dust[num216].noGravity = true;
61172 Dust dust2 = Main.dust[num216];
61173 dust2.velocity *= 3f;
61174 }
61175 for (int num217 = 0; num217 < 20; num217++)
61176 {
61177 int num218 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 180, 0f, 0f, 0, default(Color), 2.7f);
61178 Main.dust[num218].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
61179 Main.dust[num218].noGravity = true;
61180 Dust dust2 = Main.dust[num218];
61181 dust2.velocity *= 3f;
61182 }
61183 for (int num219 = 0; num219 < 10; num219++)
61184 {
61185 int num220 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
61186 Main.dust[num220].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
61187 Main.dust[num220].noGravity = true;
61188 Dust dust2 = Main.dust[num220];
61189 dust2.velocity *= 3f;
61190 }
61191 }
61192 else if (type == 585)
61193 {
61194 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y, 27);
61195 for (int num221 = 0; num221 < 20; num221++)
61196 {
61197 int num222 = Dust.NewDust(position, width, height, 26, 0f, 0f, 100);
61198 Main.dust[num222].noGravity = true;
61199 Dust dust2 = Main.dust[num222];
61200 dust2.velocity *= 1.2f;
61201 Main.dust[num222].scale = 1.3f;
61202 dust2 = Main.dust[num222];
61203 dust2.velocity -= oldVelocity * 0.3f;
61204 num222 = Dust.NewDust(new Vector2(position.X + 4f, position.Y + 4f), width - 8, height - 8, 27, 0f, 0f, 100, default(Color), 2f);
61205 Main.dust[num222].noGravity = true;
61206 dust2 = Main.dust[num222];
61207 dust2.velocity *= 3f;
61208 }
61209 }
61210 else if (type == 590)
61211 {
61212 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y, 27);
61213 int num223 = 165;
61214 if (ai[2] == 1f)
61215 {
61216 num223 = 31;
61217 }
61218 for (int num224 = 0; num224 < 10; num224++)
61219 {
61220 int num225 = Dust.NewDust(position, width, height, num223, 0f, 0f, 50, default(Color), 1.5f);
61221 Dust dust2 = Main.dust[num225];
61222 dust2.velocity *= 2f;
61223 Main.dust[num225].noGravity = true;
61224 }
61225 float num226 = 0.6f + Main.rand.NextFloat() * 0.4f;
61226 int num227 = 375;
61227 if (ai[2] == 1f)
61228 {
61229 num227 = 61;
61230 }
61231 int num228 = Gore.NewGore(position, Vector2.Zero, num227, num226);
61232 Gore gore2 = Main.gore[num228];
61233 gore2.velocity *= 0.3f;
61234 num228 = Gore.NewGore(position, Vector2.Zero, num227 + 1, num226);
61235 gore2 = Main.gore[num228];
61236 gore2.velocity *= 0.3f;
61237 num228 = Gore.NewGore(position, Vector2.Zero, num227 + 2, num226);
61238 gore2 = Main.gore[num228];
61239 gore2.velocity *= 0.3f;
61240 }
61241 else if (type == 587)
61242 {
61243 Color newColor5 = Main.hslToRgb(ai[1], 1f, 0.5f);
61244 newColor5.A = 200;
61245 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
61246 for (int num229 = 0; num229 < 10; num229++)
61247 {
61248 int num230 = Dust.NewDust(position, width, height, 76, 0f, 0f, 0, newColor5);
61249 Main.dust[num230].noGravity = true;
61250 Dust dust2 = Main.dust[num230];
61251 dust2.velocity *= 1.2f;
61252 Main.dust[num230].scale = 0.9f;
61253 dust2 = Main.dust[num230];
61254 dust2.velocity -= oldVelocity * 0.3f;
61255 num230 = Dust.NewDust(new Vector2(position.X + 4f, position.Y + 4f), width - 8, height - 8, 76, 0f, 0f, 0, newColor5, 1.1f);
61256 Main.dust[num230].noGravity = true;
61257 dust2 = Main.dust[num230];
61258 dust2.velocity *= 2f;
61259 }
61260 }
61261 else if (type == 572)
61262 {
61263 for (int num231 = 0; num231 < 15; num231++)
61264 {
61265 int num232 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 40, velocity.X * 0.1f, velocity.Y * 0.1f, 100);
61266 Dust dust2 = Main.dust[num232];
61267 dust2.velocity *= 3f;
61268 Main.dust[num232].noGravity = true;
61269 Main.dust[num232].scale = 1.25f;
61270 Main.dust[num232].position = (base.Center + position) / 2f;
61271 }
61272 }
61273 else if (type == 581)
61274 {
61275 for (int num233 = 0; num233 < 30; num233++)
61276 {
61277 int num234 = Utils.SelectRandom<int>(Main.rand, 229, 229, 161);
61278 Dust dust33 = Main.dust[Dust.NewDust(position, width, height, num234)];
61279 dust33.noGravity = true;
61280 dust33.scale = 1.25f + Main.rand.NextFloat();
61281 dust33.fadeIn = 0.25f;
61282 Dust dust2 = dust33;
61283 dust2.velocity *= 2f;
61284 dust33.noLight = true;
61285 }
61286 }
61287 else if (type == 671)
61288 {
61289 for (int num235 = 0; num235 < 30; num235++)
61290 {
61291 int num236 = Utils.SelectRandom<int>(Main.rand, 27, 27, 62);
61292 Dust dust34 = Main.dust[Dust.NewDust(position, width, height, num236)];
61293 dust34.noGravity = true;
61294 dust34.scale = 1.25f + Main.rand.NextFloat();
61295 dust34.fadeIn = 0.25f;
61296 Dust dust2 = dust34;
61297 dust2.velocity *= 2f;
61298 dust34.noLight = true;
61299 }
61300 }
61301 else if (type == 811 || type == 814)
61302 {
61303 for (int num237 = 0; num237 < 30; num237++)
61304 {
61305 Dust dust35 = Main.dust[Dust.NewDust(position, width, height, 5)];
61306 dust35.scale = 1.25f + Main.rand.NextFloat();
61307 Dust dust2 = dust35;
61308 dust2.velocity *= 2f;
61309 }
61310 }
61311 else if (type == 819)
61312 {
61313 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
61314 for (int num238 = 0; num238 < 20; num238++)
61315 {
61316 Dust dust36 = Main.dust[Dust.NewDust(position, width, height, 5)];
61317 dust36.scale = 1f + Main.rand.NextFloat() * 0.5f;
61318 Dust dust2 = dust36;
61319 dust2.velocity *= 1.5f;
61320 }
61321 }
61322 else if (type == 675)
61323 {
61324 for (int num239 = 0; num239 < 40; num239++)
61325 {
61326 int num240 = Utils.SelectRandom<int>(Main.rand, 27, 242, 73, 72, 71, 255, 255, 255);
61327 Dust dust37 = Main.dust[Dust.NewDust(position, width, height, num240)];
61328 dust37.noGravity = true;
61329 dust37.scale = 1.25f + Main.rand.NextFloat();
61330 dust37.fadeIn = 0.25f;
61331 Dust dust2 = dust37;
61332 dust2.velocity *= 3f;
61333 dust37.noLight = true;
61334 }
61335 }
61336 else if (type == 676)
61337 {
61338 for (int num241 = 0; num241 < 120; num241++)
61339 {
61340 int num242 = Utils.SelectRandom<int>(Main.rand, 4, 256);
61341 Dust dust38 = Main.dust[Dust.NewDust(position, width, height, num242, 0f, 0f, 100)];
61342 dust38.scale = 0.8f + Main.rand.NextFloat() * 0.6f;
61343 dust38.fadeIn = 0.5f;
61344 Dust dust2 = dust38;
61345 dust2.velocity *= 4.5f;
61346 dust38.noLight = true;
61347 if (dust38.velocity.Y > 0f)
61348 {
61349 dust2 = dust38;
61350 dust2.velocity *= -0.5f;
61351 }
61352 if (dust38.type == 4)
61353 {
61354 dust38.color = new Color(80, 170, 40, 120);
61355 }
61356 }
61357 for (int num243 = 0; num243 < 10; num243++)
61358 {
61359 Gore.NewGoreDirect(base.Center, new Vector2(MathHelper.Lerp(-5f, 5f, Main.rand.NextFloat()), (0f - Main.rand.NextFloat()) * 5f), 1024);
61360 }
61361 for (int num244 = 0; num244 < 10; num244++)
61362 {
61363 Gore.NewGoreDirect(base.Center, new Vector2(MathHelper.Lerp(-5f, 5f, Main.rand.NextFloat()), (0f - Main.rand.NextFloat()) * 5f), 1025);
61364 }
61365 for (int num245 = 0; num245 < 10; num245++)
61366 {
61367 Gore.NewGoreDirect(base.Center, new Vector2(MathHelper.Lerp(-5f, 5f, Main.rand.NextFloat()), (0f - Main.rand.NextFloat()) * 5f), 1026);
61368 }
61369 for (int num246 = 0; num246 < 20; num246++)
61370 {
61371 Gore.NewGoreDirect(base.Center, new Vector2(MathHelper.Lerp(-0.5f, 0.5f, Main.rand.NextFloat()), (0f - Main.rand.NextFloat()) * 2f), 1026);
61372 }
61373 if (Main.netMode != 2)
61374 {
61375 Player player = Main.player[Main.myPlayer];
61376 if (!player.dead && player.active && (player.Center - base.Center).Length() < 300f && !player.creativeGodMode)
61377 {
61378 player.AddBuff(197, 900, quiet: false);
61379 }
61380 }
61381 }
61382 else if (type == 686)
61383 {
61384 Rectangle hitbox3 = base.Hitbox;
61385 for (int num247 = 0; num247 < oldPos.Length / 2; num247 += 2)
61386 {
61387 hitbox3.X = (int)oldPos[num247].X;
61388 hitbox3.Y = (int)oldPos[num247].Y;
61389 for (int num248 = 0; num248 < 3; num248++)
61390 {
61391 int num249 = Utils.SelectRandom<int>(Main.rand, 6, 55, 158);
61392 int num250 = Dust.NewDust(hitbox3.TopLeft(), width, height, num249, direction, -2.5f);
61393 Main.dust[num250].alpha = 200;
61394 Dust dust2 = Main.dust[num250];
61395 dust2.velocity *= 2.4f;
61396 dust2 = Main.dust[num250];
61397 dust2.scale += Main.rand.NextFloat();
61398 dust2 = Main.dust[num250];
61399 dust2.scale -= 0.5f;
61400 if (Main.dust[num250].type == 55)
61401 {
61402 Main.dust[num250].color = Color.Lerp(Color.Red, Color.Gold, Main.rand.NextFloat());
61403 }
61404 Main.dust[num250].noLight = true;
61405 }
61406 }
61407 for (int num251 = 10; num251 < oldPos.Length; num251 += 2)
61408 {
61409 hitbox3.X = (int)oldPos[num251].X;
61410 hitbox3.Y = (int)oldPos[num251].Y;
61411 for (int num252 = 0; num252 < 2; num252++)
61412 {
61413 int num253 = Utils.SelectRandom<int>(Main.rand, 55);
61414 int num254 = Dust.NewDust(hitbox3.TopLeft(), width, height, num253, direction, -2.5f);
61415 Main.dust[num254].alpha = 120;
61416 Dust dust2 = Main.dust[num254];
61417 dust2.velocity *= 2.4f;
61418 dust2 = Main.dust[num254];
61419 dust2.scale += Main.rand.NextFloat() * 0.7f;
61420 dust2 = Main.dust[num254];
61421 dust2.scale -= 0.5f;
61422 if (Main.dust[num254].type == 55)
61423 {
61424 Main.dust[num254].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat());
61425 }
61426 Main.dust[num254].noLight = true;
61427 }
61428 }
61429 for (int num255 = 5; num255 < oldPos.Length; num255++)
61430 {
61431 hitbox3.X = (int)oldPos[num255].X;
61432 hitbox3.Y = (int)oldPos[num255].Y;
61433 for (int num256 = 0; num256 < 1; num256++)
61434 {
61435 int num257 = Utils.SelectRandom<int>(Main.rand, 55);
61436 int num258 = Dust.NewDust(hitbox3.TopLeft(), width, height, num257, direction, -2.5f);
61437 Main.dust[num258].alpha = 80;
61438 Dust dust2 = Main.dust[num258];
61439 dust2.velocity *= 0.3f;
61440 dust2 = Main.dust[num258];
61441 dust2.velocity += velocity * 0.5f;
61442 dust2 = Main.dust[num258];
61443 dust2.scale += Main.rand.NextFloat() * 0.7f;
61444 dust2 = Main.dust[num258];
61445 dust2.scale -= 0.5f;
61446 if (Main.dust[num258].type == 55)
61447 {
61448 Main.dust[num258].color = Color.Lerp(Color.Purple, Color.Black, Main.rand.NextFloat());
61449 }
61450 Main.dust[num258].noLight = true;
61451 }
61452 }
61453 for (int num259 = 0; num259 < 30; num259++)
61454 {
61455 int num260 = 228;
61456 Dust dust39 = Main.dust[Dust.NewDust(position, width, height, num260)];
61457 dust39.noGravity = true;
61458 dust39.scale = 1.25f + Main.rand.NextFloat();
61459 dust39.fadeIn = 1.5f;
61460 Dust dust2 = dust39;
61461 dust2.velocity *= 6f;
61462 dust39.noLight = true;
61463 }
61464 }
61465 if (type == 405)
61466 {
61468 _ = base.Center;
61469 for (int num261 = 0; num261 < 20; num261++)
61470 {
61471 int num262 = 10;
61472 int num263 = Dust.NewDust(base.Center - Vector2.One * num262, num262 * 2, num262 * 2, 212);
61473 Dust dust40 = Main.dust[num263];
61474 Vector2 vector34 = Vector2.Normalize(dust40.position - base.Center);
61475 dust40.position = base.Center + vector34 * num262 * scale;
61476 if (num261 < 30)
61477 {
61478 dust40.velocity = vector34 * dust40.velocity.Length();
61479 }
61480 else
61481 {
61482 dust40.velocity = vector34 * Main.rand.Next(45, 91) / 10f;
61483 }
61484 dust40.color = Main.hslToRgb((float)(0.4000000059604645 + Main.rand.NextDouble() * 0.20000000298023224), 0.9f, 0.5f);
61485 dust40.color = Color.Lerp(dust40.color, Color.White, 0.3f);
61486 dust40.noGravity = true;
61487 dust40.scale = 0.7f;
61488 }
61489 }
61490 if (type == 501)
61491 {
61492 SoundEngine.PlaySound(13, (int)position.X, (int)position.Y);
61493 int num264 = 20;
61494 position.X -= num264;
61495 position.Y -= num264;
61496 width += num264 * 2;
61497 height += num264 * 2;
61498 num264 += 20;
61499 for (int num265 = 0; num265 < 20; num265++)
61500 {
61501 int num266 = Dust.NewDust(position, width, height, 188, 0f, 0f, 100, default(Color), 1.5f);
61502 Dust dust2 = Main.dust[num266];
61503 dust2.velocity *= 0.5f;
61504 }
61505 for (int num267 = 0; num267 < 5; num267++)
61506 {
61507 int num268 = Gore.NewGore(new Vector2(position.X + (float)Main.rand.Next(width), position.Y + (float)Main.rand.Next(height)), default(Vector2), Main.rand.Next(435, 438));
61508 Gore gore2 = Main.gore[num268];
61509 gore2.velocity *= 0.5f;
61510 switch (num267)
61511 {
61512 case 0:
61513 Main.gore[num268].velocity.X += 1f;
61514 Main.gore[num268].velocity.Y += 1f;
61515 break;
61516 case 1:
61517 Main.gore[num268].velocity.X -= 1f;
61518 Main.gore[num268].velocity.Y += 1f;
61519 break;
61520 case 2:
61521 Main.gore[num268].velocity.X += 1f;
61522 Main.gore[num268].velocity.Y -= 1f;
61523 break;
61524 default:
61525 Main.gore[num268].velocity.X -= 1f;
61526 Main.gore[num268].velocity.Y -= 1f;
61527 break;
61528 }
61529 gore2 = Main.gore[num268];
61530 gore2.velocity *= 0.5f;
61531 }
61532 position.X -= num264;
61533 position.Y -= num264;
61534 width += num264 * 2;
61535 height += num264 * 2;
61536 Damage();
61537 }
61538 if (type == 410)
61539 {
61541 _ = base.Center;
61542 for (int num269 = 0; num269 < 10; num269++)
61543 {
61544 int num270 = (int)(10f * ai[1]);
61545 int num271 = Dust.NewDust(base.Center - Vector2.One * num270, num270 * 2, num270 * 2, 212);
61546 Dust dust41 = Main.dust[num271];
61547 Vector2 vector35 = Vector2.Normalize(dust41.position - base.Center);
61548 dust41.position = base.Center + vector35 * num270 * scale;
61549 if (num269 < 30)
61550 {
61551 dust41.velocity = vector35 * dust41.velocity.Length();
61552 }
61553 else
61554 {
61555 dust41.velocity = vector35 * Main.rand.Next(45, 91) / 10f;
61556 }
61557 dust41.color = Main.hslToRgb((float)(0.4000000059604645 + Main.rand.NextDouble() * 0.20000000298023224), 0.9f, 0.5f);
61558 dust41.color = Color.Lerp(dust41.color, Color.White, 0.3f);
61559 dust41.noGravity = true;
61560 dust41.scale = 0.7f;
61561 }
61562 }
61563 if (type == 629 && Main.netMode != 1)
61564 {
61565 switch (Main.npc[(int)ai[0]].type)
61566 {
61567 case 517:
61568 if (NPC.ShieldStrengthTowerSolar != 0)
61569 {
61570 Main.npc[(int)ai[0]].ai[3] = 1f;
61571 }
61572 NPC.ShieldStrengthTowerSolar = (int)MathHelper.Clamp(NPC.ShieldStrengthTowerSolar - 1, 0f, NPC.ShieldStrengthTowerMax);
61573 break;
61574 case 422:
61575 if (NPC.ShieldStrengthTowerVortex != 0)
61576 {
61577 Main.npc[(int)ai[0]].ai[3] = 1f;
61578 }
61579 NPC.ShieldStrengthTowerVortex = (int)MathHelper.Clamp(NPC.ShieldStrengthTowerVortex - 1, 0f, NPC.ShieldStrengthTowerMax);
61580 break;
61581 case 507:
61582 if (NPC.ShieldStrengthTowerNebula != 0)
61583 {
61584 Main.npc[(int)ai[0]].ai[3] = 1f;
61585 }
61586 NPC.ShieldStrengthTowerNebula = (int)MathHelper.Clamp(NPC.ShieldStrengthTowerNebula - 1, 0f, NPC.ShieldStrengthTowerMax);
61587 break;
61588 case 493:
61589 if (NPC.ShieldStrengthTowerStardust != 0)
61590 {
61591 Main.npc[(int)ai[0]].ai[3] = 1f;
61592 }
61593 NPC.ShieldStrengthTowerStardust = (int)MathHelper.Clamp(NPC.ShieldStrengthTowerStardust - 1, 0f, NPC.ShieldStrengthTowerMax);
61594 break;
61595 }
61596 Main.npc[(int)ai[0]].netUpdate = true;
61597 NetMessage.SendData(101);
61598 }
61599 if (aiStyle == 105 && owner == Main.myPlayer && ai[1] == 0f)
61600 {
61601 Vector2 vector36 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
61602 vector36.Normalize();
61603 vector36 *= 0.3f;
61604 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, vector36.X, vector36.Y, Main.rand.Next(569, 572), damage, 0f, owner);
61605 }
61606 if (type == 452)
61607 {
61608 SoundEngine.PlaySound(29, (int)position.X, (int)position.Y, 103);
61609 position = base.Center;
61610 width = (height = 144);
61611 position.X -= width / 2;
61612 position.Y -= height / 2;
61613 for (int num272 = 0; num272 < 4; num272++)
61614 {
61615 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
61616 }
61617 for (int num273 = 0; num273 < 40; num273++)
61618 {
61619 int num274 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 0, default(Color), 2.5f);
61620 Main.dust[num274].noGravity = true;
61621 Dust dust2 = Main.dust[num274];
61622 dust2.velocity *= 3f;
61623 num274 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 100, default(Color), 1.5f);
61624 dust2 = Main.dust[num274];
61625 dust2.velocity *= 2f;
61626 Main.dust[num274].noGravity = true;
61627 }
61628 for (int num275 = 0; num275 < 1; num275++)
61629 {
61630 int num276 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
61631 Gore gore2 = Main.gore[num276];
61632 gore2.velocity *= 0.3f;
61633 Main.gore[num276].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
61634 Main.gore[num276].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
61635 }
61636 Damage();
61637 }
61638 if (type == 454)
61639 {
61640 SoundEngine.PlaySound(4, (int)position.X, (int)position.Y, 6);
61641 position = base.Center;
61642 width = (height = 208);
61643 position.X -= width / 2;
61644 position.Y -= height / 2;
61645 for (int num277 = 0; num277 < 7; num277++)
61646 {
61647 int num278 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
61648 Main.dust[num278].position = new Vector2(width / 2, 0f).RotatedBy(6.2831854820251465 * Main.rand.NextDouble()) * (float)Main.rand.NextDouble() + base.Center;
61649 }
61650 for (int num279 = 0; num279 < 60; num279++)
61651 {
61652 int num280 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 0, default(Color), 2.5f);
61653 Main.dust[num280].position = new Vector2(width / 2, 0f).RotatedBy(6.2831854820251465 * Main.rand.NextDouble()) * (float)Main.rand.NextDouble() + base.Center;
61654 Main.dust[num280].noGravity = true;
61655 Dust dust2 = Main.dust[num280];
61656 dust2.velocity *= 1f;
61657 num280 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 100, default(Color), 1.5f);
61658 Main.dust[num280].position = new Vector2(width / 2, 0f).RotatedBy(6.2831854820251465 * Main.rand.NextDouble()) * (float)Main.rand.NextDouble() + base.Center;
61659 dust2 = Main.dust[num280];
61660 dust2.velocity *= 1f;
61661 Main.dust[num280].noGravity = true;
61662 }
61663 for (int num281 = 0; num281 < 3; num281++)
61664 {
61665 int num282 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
61666 Gore gore2 = Main.gore[num282];
61667 gore2.velocity *= 0.3f;
61668 Main.gore[num282].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
61669 Main.gore[num282].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
61670 }
61671 Damage();
61672 }
61673 if (type == 467)
61674 {
61675 position = base.Center;
61676 width = (height = 176);
61677 base.Center = position;
61678 Damage();
61680 for (int num283 = 0; num283 < 4; num283++)
61681 {
61682 int num284 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
61683 Main.dust[num284].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61684 }
61685 for (int num285 = 0; num285 < 30; num285++)
61686 {
61687 int num286 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 200, default(Color), 3.7f);
61688 Main.dust[num286].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61689 Main.dust[num286].noGravity = true;
61690 Dust dust2 = Main.dust[num286];
61691 dust2.velocity *= 3f;
61692 num286 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
61693 Main.dust[num286].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61694 dust2 = Main.dust[num286];
61695 dust2.velocity *= 2f;
61696 Main.dust[num286].noGravity = true;
61697 Main.dust[num286].fadeIn = 2.5f;
61698 }
61699 for (int num287 = 0; num287 < 10; num287++)
61700 {
61701 int num288 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 0, default(Color), 2.7f);
61702 Main.dust[num288].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
61703 Main.dust[num288].noGravity = true;
61704 Dust dust2 = Main.dust[num288];
61705 dust2.velocity *= 3f;
61706 }
61707 for (int num289 = 0; num289 < 10; num289++)
61708 {
61709 int num290 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
61710 Main.dust[num290].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
61711 Main.dust[num290].noGravity = true;
61712 Dust dust2 = Main.dust[num290];
61713 dust2.velocity *= 3f;
61714 }
61715 for (int num291 = 0; num291 < 2; num291++)
61716 {
61717 int num292 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
61718 Main.gore[num292].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61719 Gore gore2 = Main.gore[num292];
61720 gore2.velocity *= 0.3f;
61721 Main.gore[num292].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
61722 Main.gore[num292].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
61723 }
61724 }
61725 if (type == 468)
61726 {
61727 position = base.Center;
61728 width = (height = 176);
61729 base.Center = position;
61730 Damage();
61732 for (int num293 = 0; num293 < 4; num293++)
61733 {
61734 int num294 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
61735 Main.dust[num294].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61736 }
61737 for (int num295 = 0; num295 < 20; num295++)
61738 {
61739 int num296 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 27, 0f, 0f, 200, default(Color), 3.7f);
61740 Main.dust[num296].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61741 Main.dust[num296].noGravity = true;
61742 Dust dust2 = Main.dust[num296];
61743 dust2.velocity *= 3f;
61744 num296 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 27, 0f, 0f, 100, default(Color), 1.5f);
61745 Main.dust[num296].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61746 dust2 = Main.dust[num296];
61747 dust2.velocity *= 2f;
61748 Main.dust[num296].noGravity = true;
61749 Main.dust[num296].fadeIn = 2.5f;
61750 }
61751 for (int num297 = 0; num297 < 10; num297++)
61752 {
61753 int num298 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 27, 0f, 0f, 0, default(Color), 2.7f);
61754 Main.dust[num298].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
61755 Main.dust[num298].noGravity = true;
61756 Dust dust2 = Main.dust[num298];
61757 dust2.velocity *= 3f;
61758 }
61759 for (int num299 = 0; num299 < 10; num299++)
61760 {
61761 int num300 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 0, default(Color), 1.5f);
61762 Main.dust[num300].position = base.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(velocity.ToRotation()) * width / 2f;
61763 Main.dust[num300].noGravity = true;
61764 Dust dust2 = Main.dust[num300];
61765 dust2.velocity *= 3f;
61766 }
61767 for (int num301 = 0; num301 < 2; num301++)
61768 {
61769 int num302 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
61770 Main.gore[num302].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * width / 2f;
61771 Gore gore2 = Main.gore[num302];
61772 gore2.velocity *= 0.3f;
61773 Main.gore[num302].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
61774 Main.gore[num302].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
61775 }
61776 }
61777 if (type == 485)
61778 {
61779 for (int num303 = 0; num303 < 15; num303++)
61780 {
61781 int num304 = Dust.NewDust(position, width, height, 6);
61782 Main.dust[num304].noGravity = true;
61783 Dust dust2 = Main.dust[num304];
61784 dust2.velocity -= oldVelocity * Main.rand.Next(20, 60) * 0.01f;
61785 }
61786 }
61787 else if (type == 484)
61788 {
61789 for (int num305 = 0; num305 < 5; num305++)
61790 {
61791 int num306 = Dust.NewDust(position, width, height, 78);
61792 Main.dust[num306].noGravity = true;
61793 Dust dust2 = Main.dust[num306];
61794 dust2.velocity -= oldVelocity / 5f;
61795 Main.dust[num306].scale = 0.85f;
61796 }
61797 }
61798 else if (type == 483)
61799 {
61801 if (owner == Main.myPlayer)
61802 {
61803 int num307 = Main.rand.Next(4, 8);
61804 int[] array = new int[num307];
61805 int num308 = 0;
61806 for (int num309 = 0; num309 < 200; num309++)
61807 {
61808 if (!Main.npc[num309].CanBeChasedBy(this, ignoreDontTakeDamage: true))
61809 {
61810 continue;
61811 }
61812 float num310 = Distance(Main.npc[num309].Center);
61813 if (!(num310 > 2000f) && Collision.CanHitLine(position, width, height, Main.npc[num309].position, Main.npc[num309].width, Main.npc[num309].height))
61814 {
61815 array[num308] = num309;
61816 num308++;
61817 if (num308 == num307)
61818 {
61819 break;
61820 }
61821 }
61822 }
61823 if (num308 > 1)
61824 {
61825 for (int num311 = 0; num311 < 100; num311++)
61826 {
61827 int num312 = Main.rand.Next(num308);
61828 int num313;
61829 for (num313 = num312; num313 == num312; num313 = Main.rand.Next(num308))
61830 {
61831 }
61832 int num314 = array[num312];
61834 array[num313] = num314;
61835 }
61836 }
61837 Vector2 vector37 = new Vector2(-1f, -1f);
61838 for (int num315 = 0; num315 < num308; num315++)
61839 {
61840 Vector2 vector38 = Main.npc[array[num315]].Center - base.Center;
61841 vector38.Normalize();
61842 vector37 += vector38;
61843 }
61844 vector37.Normalize();
61845 for (int num316 = 0; num316 < num307; num316++)
61846 {
61847 float num317 = Main.rand.Next(8, 15);
61848 Vector2 vector39 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
61849 vector39.Normalize();
61850 if (num308 > 0)
61851 {
61852 vector39 += vector37;
61853 vector39.Normalize();
61854 }
61855 vector39 *= num317;
61856 if (num308 > 0)
61857 {
61858 num308--;
61859 vector39 = Main.npc[array[num308]].Center - base.Center;
61860 vector39.Normalize();
61861 vector39 *= num317;
61862 }
61863 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, vector39.X, vector39.Y, 484, (int)((double)damage * 0.7), knockBack * 0.7f, owner);
61864 }
61865 }
61866 for (int num318 = 0; num318 < 20; num318++)
61867 {
61868 int num319 = Dust.NewDust(position, width, height, 78);
61869 Main.dust[num319].noGravity = true;
61870 Dust dust2 = Main.dust[num319];
61871 dust2.velocity *= 4f;
61872 }
61873 for (int num320 = 0; num320 < 7; num320++)
61874 {
61875 int num321 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
61876 Dust dust2 = Main.dust[num321];
61877 dust2.velocity *= 0.9f;
61878 Main.dust[num321].scale = 0.9f;
61879 }
61880 for (int num322 = 0; num322 < 3; num322++)
61881 {
61882 int num323 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
61883 Main.dust[num323].noGravity = true;
61884 Dust dust2 = Main.dust[num323];
61885 dust2.velocity *= 3f;
61886 num323 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
61887 dust2 = Main.dust[num323];
61888 dust2.velocity *= 2f;
61889 }
61890 int num324 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
61891 Gore gore2 = Main.gore[num324];
61892 gore2.velocity *= 0.3f;
61893 Main.gore[num324].velocity.X += Main.rand.Next(-1, 2);
61894 Main.gore[num324].velocity.Y += Main.rand.Next(-1, 2);
61895 if (owner == Main.myPlayer)
61896 {
61897 int num325 = 100;
61898 position.X -= num325 / 2;
61899 position.Y -= num325 / 2;
61900 width += num325;
61901 height++;
61902 penetrate = -1;
61903 Damage();
61904 }
61905 }
61906 if (type == 523)
61907 {
61909 for (int num326 = 0; num326 < 25; num326++)
61910 {
61911 int num327 = Dust.NewDust(position, width, height, 256);
61912 Main.dust[num327].noGravity = true;
61913 Main.dust[num327].position = (Main.dust[num327].position + position) / 2f;
61914 Main.dust[num327].velocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
61915 Main.dust[num327].velocity.Normalize();
61916 Dust dust2 = Main.dust[num327];
61917 dust2.velocity *= (float)Main.rand.Next(1, 30) * 0.1f;
61918 Main.dust[num327].alpha = alpha;
61919 }
61920 }
61921 else if (type == 522)
61922 {
61924 for (int num328 = 0; num328 < 10; num328++)
61925 {
61926 int num329 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 254, velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.5f);
61927 Dust dust2;
61928 if (Main.rand.Next(3) == 0)
61929 {
61930 Main.dust[num329].fadeIn = 0.75f + (float)Main.rand.Next(-10, 11) * 0.01f;
61931 Main.dust[num329].scale = 0.25f + (float)Main.rand.Next(-10, 11) * 0.005f;
61932 dust2 = Main.dust[num329];
61933 dust2.type++;
61934 }
61935 else
61936 {
61937 Main.dust[num329].scale = 1f + (float)Main.rand.Next(-10, 11) * 0.01f;
61938 }
61939 Main.dust[num329].noGravity = true;
61940 dust2 = Main.dust[num329];
61941 dust2.velocity *= 1.25f;
61942 dust2 = Main.dust[num329];
61943 dust2.velocity -= oldVelocity / 10f;
61944 }
61945 }
61946 else if (type == 521)
61947 {
61949 for (int num330 = 0; num330 < 20; num330++)
61950 {
61951 int num331 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 254, velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.5f);
61952 Dust dust2;
61953 if (Main.rand.Next(3) == 0)
61954 {
61955 Main.dust[num331].fadeIn = 1.1f + (float)Main.rand.Next(-10, 11) * 0.01f;
61956 Main.dust[num331].scale = 0.35f + (float)Main.rand.Next(-10, 11) * 0.01f;
61957 dust2 = Main.dust[num331];
61958 dust2.type++;
61959 }
61960 else
61961 {
61962 Main.dust[num331].scale = 1.2f + (float)Main.rand.Next(-10, 11) * 0.01f;
61963 }
61964 Main.dust[num331].noGravity = true;
61965 dust2 = Main.dust[num331];
61966 dust2.velocity *= 2.5f;
61967 dust2 = Main.dust[num331];
61968 dust2.velocity -= oldVelocity / 10f;
61969 }
61970 if (Main.myPlayer == owner)
61971 {
61972 int num332 = Main.rand.Next(3, 6);
61973 for (int num333 = 0; num333 < num332; num333++)
61974 {
61975 Vector2 vector40 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
61976 while (vector40.X == 0f && vector40.Y == 0f)
61977 {
61978 vector40 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
61979 }
61980 vector40.Normalize();
61981 vector40 *= (float)Main.rand.Next(70, 101) * 0.1f;
61982 NewProjectile(GetProjectileSource_FromThis(), oldPosition.X + (float)(width / 2), oldPosition.Y + (float)(height / 2), vector40.X, vector40.Y, 522, (int)((double)damage * 0.8), knockBack * 0.8f, owner);
61983 }
61984 }
61985 }
61986 if (type == 520)
61987 {
61989 for (int num334 = 0; num334 < 10; num334++)
61990 {
61991 int num335 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 252, velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.75f);
61992 Main.dust[num335].noGravity = true;
61993 Dust dust2 = Main.dust[num335];
61994 dust2.velocity -= oldVelocity / 3f;
61995 }
61996 }
61997 if (type == 459 || type == 709)
61998 {
61999 int num336 = 3;
62000 int num337 = 10;
62001 int num338 = 0;
62002 if (scale >= 1f)
62003 {
62004 position = base.Center;
62005 width = (height = 144);
62006 base.Center = position;
62007 num336 = 7;
62008 num337 = 30;
62009 num338 = 2;
62010 Damage();
62011 }
62012 for (int num339 = 0; num339 < num336; num339++)
62013 {
62014 int num340 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
62015 Main.dust[num340].position = new Vector2(width / 2, 0f).RotatedBy(6.2831854820251465 * Main.rand.NextDouble()) * (float)Main.rand.NextDouble() + base.Center;
62016 }
62017 for (int num341 = 0; num341 < num337; num341++)
62018 {
62019 int num342 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 226, 0f, 0f, 0, default(Color), 1.5f);
62020 Main.dust[num342].position = new Vector2(width / 2, 0f).RotatedBy(6.2831854820251465 * Main.rand.NextDouble()) * (float)Main.rand.NextDouble() + base.Center;
62021 Main.dust[num342].noGravity = true;
62022 Dust dust2 = Main.dust[num342];
62023 dust2.velocity *= 1f;
62024 }
62025 for (int num343 = 0; num343 < num338; num343++)
62026 {
62027 int num344 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
62028 Gore gore2 = Main.gore[num344];
62029 gore2.velocity *= 0.3f;
62030 Main.gore[num344].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
62031 Main.gore[num344].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
62032 }
62033 if (type == 709 && Main.myPlayer == owner)
62034 {
62035 Rectangle value7 = new Rectangle((int)base.Center.X - 40, (int)base.Center.Y - 40, 80, 80);
62036 for (int num345 = 0; num345 < 1000; num345++)
62037 {
62038 if (num345 != whoAmI && Main.projectile[num345].active && Main.projectile[num345].owner == owner && Main.projectile[num345].type == 443 && Main.projectile[num345].getRect().Intersects(value7))
62039 {
62040 Main.projectile[num345].ai[1] = 1f;
62041 Main.projectile[num345].velocity = (base.Center - Main.projectile[num345].Center) / 5f;
62042 Main.projectile[num345].netUpdate = true;
62043 }
62044 }
62045 int num346 = NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 443, damage, 0f, owner);
62046 Main.projectile[num346].timeLeft = 30 * Main.rand.Next(2, 6);
62047 float[] array2 = Main.projectile[num346].localAI;
62049 array2[0] = ((SlotId)(ref val)).ToFloat();
62050 }
62051 }
62052 if (owner != Main.myPlayer && type == 453 && Main.player[owner].mount.AbilityActive)
62053 {
62054 Main.player[owner].mount.UseAbility(Main.player[owner], position, toggleOn: false);
62055 }
62056 if (type == 441)
62057 {
62058 Main.player[owner].mount.StopAbilityCharge();
62059 }
62060 if (type == 444)
62061 {
62063 int num347 = Main.rand.Next(5, 9);
62064 for (int num348 = 0; num348 < num347; num348++)
62065 {
62066 int num349 = Dust.NewDust(base.Center, 0, 0, 171, 0f, 0f, 100, default(Color), 1.4f);
62067 Dust dust2 = Main.dust[num349];
62068 dust2.velocity *= 0.8f;
62069 Main.dust[num349].position = Vector2.Lerp(Main.dust[num349].position, base.Center, 0.5f);
62070 Main.dust[num349].noGravity = true;
62071 }
62072 if (owner == Main.myPlayer)
62073 {
62074 Vector2 vector41 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY);
62075 if (Main.player[owner].gravDir == -1f)
62076 {
62077 vector41.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y;
62078 }
62080 vector42 *= localAI[1];
62082 }
62083 }
62084 if (type == 472)
62085 {
62086 for (int num350 = 0; num350 < 20; num350++)
62087 {
62088 int num351 = Dust.NewDust(position, width, height, 30);
62089 Main.dust[num351].noGravity = true;
62090 Dust dust2 = Main.dust[num351];
62091 dust2.velocity *= 0.45f;
62092 dust2 = Main.dust[num351];
62093 dust2.velocity += velocity * 0.9f;
62094 }
62095 }
62096 if (type == 639 || type == 640)
62097 {
62098 int num352 = Main.rand.Next(5, 10);
62099 for (int num353 = 0; num353 < num352; num353++)
62100 {
62101 int num354 = Dust.NewDust(base.Center, 0, 0, 220, 0f, 0f, 100, default(Color), 0.5f);
62102 Dust dust2 = Main.dust[num354];
62103 dust2.velocity *= 1.6f;
62104 Main.dust[num354].velocity.Y -= 1f;
62105 Main.dust[num354].position = Vector2.Lerp(Main.dust[num354].position, base.Center, 0.5f);
62106 Main.dust[num354].noGravity = true;
62107 }
62108 if (owner == Main.myPlayer && type == 639)
62109 {
62110 int num355 = num + 1;
62111 int nextSlot = GetNextSlot();
62112 if (Main.ProjectileUpdateLoopIndex < nextSlot && Main.ProjectileUpdateLoopIndex != -1)
62113 {
62114 num355++;
62115 }
62116 Vector2 vector43 = new Vector2(ai[0], ai[1]);
62118 }
62119 }
62120 if (type == 684)
62121 {
62122 int num356 = Main.rand.Next(15, 25);
62123 for (int num357 = 0; num357 < num356; num357++)
62124 {
62125 int num358 = Dust.NewDust(base.Center, 0, 0, 60, 0f, 0f, 100, new Color(255, 255, 255, 0), 1.3f);
62126 Dust dust2 = Main.dust[num358];
62127 dust2.velocity *= 8f * (0.3f + 0.7f * Main.rand.NextFloat());
62128 Main.dust[num358].fadeIn = 1.3f + Main.rand.NextFloat() * 0.2f;
62129 Main.dust[num358].noLight = true;
62130 Main.dust[num358].noGravity = true;
62131 dust2 = Main.dust[num358];
62132 dust2.position += Main.dust[num358].velocity * 4f;
62133 }
62134 }
62135 if (type == 435)
62136 {
62137 int num359 = Main.rand.Next(5, 10);
62138 for (int num360 = 0; num360 < num359; num360++)
62139 {
62140 int num361 = Dust.NewDust(base.Center, 0, 0, 226, 0f, 0f, 100, default(Color), 0.5f);
62141 Dust dust2 = Main.dust[num361];
62142 dust2.velocity *= 1.6f;
62143 Main.dust[num361].velocity.Y -= 1f;
62144 Main.dust[num361].position = Vector2.Lerp(Main.dust[num361].position, base.Center, 0.5f);
62145 Main.dust[num361].noGravity = true;
62146 }
62147 }
62148 if (type == 732)
62149 {
62150 int num362 = Main.rand.Next(5, 10);
62151 for (int num363 = 0; num363 < num362; num363++)
62152 {
62153 int num364 = Dust.NewDust(base.Center, 0, 0, 226, 0f, 0f, 100, default(Color), 0.5f);
62154 Dust dust2 = Main.dust[num364];
62155 dust2.velocity *= 1.6f;
62156 Main.dust[num364].velocity.Y -= 1f;
62157 Main.dust[num364].velocity = Main.dust[num364].velocity * 0.5f + velocity * ((float)num363 / (float)num362) * 0.7f;
62158 Main.dust[num364].position = Vector2.Lerp(Main.dust[num364].position, base.Center, 0.5f);
62159 Main.dust[num364].noGravity = true;
62160 }
62161 }
62162 if (type == 682)
62163 {
62164 int num365 = 22;
62165 for (int num366 = 0; num366 < num365; num366++)
62166 {
62167 int num367 = Dust.NewDust(base.Center, 0, 0, 272, 0f, 0f, 0, default(Color), 0.5f);
62168 Dust dust2 = Main.dust[num367];
62169 dust2.velocity *= 1.6f;
62170 Main.dust[num367].velocity.Y -= 1f;
62171 Main.dust[num367].position = Vector2.Lerp(Main.dust[num367].position, base.Center, 0.5f);
62172 }
62173 }
62174 if (type == 436)
62175 {
62176 int num368 = Main.rand.Next(5, 10);
62177 for (int num369 = 0; num369 < num368; num369++)
62178 {
62179 int num370 = Dust.NewDust(base.Center, 0, 0, 220, 0f, 0f, 100, default(Color), 0.5f);
62180 Dust dust2 = Main.dust[num370];
62181 dust2.velocity *= 1.6f;
62182 Main.dust[num370].velocity.Y -= 1f;
62183 Main.dust[num370].position = Vector2.Lerp(Main.dust[num370].position, base.Center, 0.5f);
62184 Main.dust[num370].noGravity = true;
62185 }
62186 }
62187 if (type == 462)
62188 {
62189 int num371 = Main.rand.Next(5, 10);
62190 for (int num372 = 0; num372 < num371; num372++)
62191 {
62192 int num373 = Dust.NewDust(base.Center, 0, 0, 229, 0f, 0f, 100, default(Color), 0.5f);
62193 Dust dust2 = Main.dust[num373];
62194 dust2.velocity *= 1.6f;
62195 Main.dust[num373].velocity.Y -= 1f;
62196 dust2 = Main.dust[num373];
62197 dust2.position -= Vector2.One * 4f;
62198 Main.dust[num373].position = Vector2.Lerp(Main.dust[num373].position, base.Center, 0.5f);
62199 Main.dust[num373].noGravity = true;
62200 }
62201 }
62202 if (type == 442)
62203 {
62205 int num374 = Main.rand.Next(3, 7);
62206 for (int num375 = 0; num375 < num374; num375++)
62207 {
62208 int num376 = Dust.NewDust(position, width, height, 135, 0f, 0f, 100, default(Color), 2.1f);
62209 Dust dust2 = Main.dust[num376];
62210 dust2.velocity *= 2f;
62211 Main.dust[num376].noGravity = true;
62212 }
62213 if (Main.myPlayer == owner)
62214 {
62215 Rectangle value8 = new Rectangle((int)base.Center.X - 40, (int)base.Center.Y - 40, 80, 80);
62216 for (int num377 = 0; num377 < 1000; num377++)
62217 {
62218 if (num377 != whoAmI && Main.projectile[num377].active && Main.projectile[num377].owner == owner && Main.projectile[num377].type == 443 && Main.projectile[num377].getRect().Intersects(value8))
62219 {
62220 Main.projectile[num377].ai[1] = 1f;
62221 Main.projectile[num377].velocity = (base.Center - Main.projectile[num377].Center) / 5f;
62222 Main.projectile[num377].netUpdate = true;
62223 }
62224 }
62225 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 443, damage, 0f, owner);
62226 }
62227 }
62228 if (type == 440)
62229 {
62230 int num378 = Main.rand.Next(3, 7);
62231 for (int num379 = 0; num379 < num378; num379++)
62232 {
62233 int num380 = Dust.NewDust(base.Center - velocity / 2f, 0, 0, 135, 0f, 0f, 100, default(Color), 2.1f);
62234 Dust dust2 = Main.dust[num380];
62235 dust2.velocity *= 2f;
62236 Main.dust[num380].noGravity = true;
62237 }
62238 }
62239 if (type == 606)
62240 {
62241 int num381 = Main.rand.Next(3, 7);
62242 for (int num382 = 0; num382 < num381; num382++)
62243 {
62244 int num383 = Dust.NewDust(base.Center - velocity / 2f, 0, 0, 182, 0f, 0f, 100, default(Color), 1.6f);
62245 Dust dust2 = Main.dust[num383];
62246 dust2.velocity *= 1.5f;
62247 Main.dust[num383].noGravity = true;
62248 }
62249 }
62250 if (type == 449)
62251 {
62252 int num384 = Main.rand.Next(3, 7);
62253 for (int num385 = 0; num385 < num384; num385++)
62254 {
62255 int num386 = Dust.NewDust(base.Center - velocity / 2f, 0, 0, 228, 0f, 0f, 100, default(Color), 2.1f);
62256 Dust dust2 = Main.dust[num386];
62257 dust2.velocity *= 2f;
62258 Main.dust[num386].noGravity = true;
62259 }
62260 }
62261 if (type == 495)
62262 {
62263 for (int num387 = 0; num387 < 15; num387++)
62264 {
62265 int num388 = Dust.NewDust(base.Center, 10, 10, 27);
62266 Main.dust[num388].noGravity = true;
62267 Dust dust2 = Main.dust[num388];
62268 dust2.velocity -= oldVelocity * 0.3f;
62269 }
62270 }
62271 if (type == 497)
62272 {
62273 for (int num389 = 0; num389 < 15; num389++)
62274 {
62275 int num390 = Dust.NewDust(base.Center, 10, 10, 27);
62276 Main.dust[num390].noGravity = true;
62277 Dust dust2 = Main.dust[num390];
62278 dust2.velocity *= 2f;
62279 dust2 = Main.dust[num390];
62280 dust2.velocity -= oldVelocity * 0.3f;
62281 dust2 = Main.dust[num390];
62282 dust2.scale += (float)Main.rand.Next(150) * 0.001f;
62283 }
62284 }
62285 if (type == 448)
62286 {
62288 position = base.Center;
62289 width = (height = 112);
62290 position.X -= width / 2;
62291 position.Y -= height / 2;
62292 for (int num391 = 0; num391 < 4; num391++)
62293 {
62294 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
62295 }
62296 for (int num392 = 0; num392 < 40; num392++)
62297 {
62298 int num393 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 228, 0f, 0f, 0, default(Color), 2.5f);
62299 Main.dust[num393].noGravity = true;
62300 Dust dust2 = Main.dust[num393];
62301 dust2.velocity *= 3f;
62302 num393 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 228, 0f, 0f, 100, default(Color), 1.5f);
62303 dust2 = Main.dust[num393];
62304 dust2.velocity *= 2f;
62305 Main.dust[num393].noGravity = true;
62306 }
62307 for (int num394 = 0; num394 < 1; num394++)
62308 {
62309 int num395 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
62310 Gore gore2 = Main.gore[num395];
62311 gore2.velocity *= 0.3f;
62312 Main.gore[num395].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
62313 Main.gore[num395].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
62314 }
62315 Damage();
62316 }
62317 else if (type == 715 || type == 716 || type == 717 || type == 718)
62318 {
62320 position = base.Center;
62321 width = (height = 128);
62322 if (type == 717 || type == 718)
62323 {
62324 width = (height = 240);
62325 }
62326 position.X -= width / 2;
62327 position.Y -= height / 2;
62328 Damage();
62330 }
62331 if (type == 616)
62332 {
62334 position = base.Center;
62335 width = (height = 80);
62336 position.X -= width / 2;
62337 position.Y -= height / 2;
62338 for (int num396 = 0; num396 < 4; num396++)
62339 {
62340 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
62341 }
62342 for (int num397 = 0; num397 < 40; num397++)
62343 {
62344 int num398 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 200, default(Color), 2.5f);
62345 Main.dust[num398].noGravity = true;
62346 Dust dust2 = Main.dust[num398];
62347 dust2.velocity *= 2f;
62348 num398 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 229, 0f, 0f, 200, default(Color), 1.5f);
62349 dust2 = Main.dust[num398];
62350 dust2.velocity *= 1.2f;
62351 Main.dust[num398].noGravity = true;
62352 }
62353 for (int num399 = 0; num399 < 1; num399++)
62354 {
62355 int num400 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
62356 Gore gore2 = Main.gore[num400];
62357 gore2.velocity *= 0.3f;
62358 Main.gore[num400].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
62359 Main.gore[num400].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
62360 }
62361 Damage();
62362 }
62363 if (type == 502)
62364 {
62365 Vector2 vector44 = new Vector2(width, height) / 2f;
62366 for (int num401 = 0; num401 < oldPos.Length; num401++)
62367 {
62368 if (!(oldPos[num401] == Vector2.Zero))
62369 {
62370 int num402 = Dust.NewDust(oldPos[num401] + vector44, 0, 0, 66, 0f, 0f, 150, Color.Transparent, 0.7f);
62371 Main.dust[num402].color = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f);
62372 Main.dust[num402].noGravity = true;
62373 }
62374 }
62375 }
62376 if (type == 510)
62377 {
62379 Gore.NewGore(base.Center, -oldVelocity * 0.2f, 704);
62380 Gore.NewGore(base.Center, -oldVelocity * 0.2f, 705);
62381 if (owner == Main.myPlayer)
62382 {
62383 int num403 = Main.rand.Next(20, 31);
62384 for (int num404 = 0; num404 < num403; num404++)
62385 {
62386 Vector2 vector45 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
62387 vector45.Normalize();
62388 vector45 *= (float)Main.rand.Next(10, 201) * 0.01f;
62389 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, vector45.X, vector45.Y, 511 + Main.rand.Next(3), damage, 1f, owner);
62390 }
62391 }
62392 }
62393 if (type == 868 || type == 869 || type == 996)
62394 {
62396 for (int num405 = 0; num405 < 15; num405++)
62397 {
62398 Dust.NewDust(position, width, height, 13, 0f, -2f, 0, default(Color), 1.5f);
62399 }
62400 if (Main.netMode != 1)
62401 {
62402 switch (type)
62403 {
62404 case 868:
62405 WorldGen.TreeTops.RandomizeTreeStyleBasedOnWorldPosition(Main.rand, base.Center);
62406 break;
62407 case 869:
62408 WorldGen.RandomizeBackgroundBasedOnPlayer(Main.rand, Main.player[owner]);
62409 break;
62410 case 996:
62411 WorldGen.RandomizeMoonState(Main.rand, garenteeNewStyle: true);
62412 break;
62413 }
62414 NetMessage.SendData(7);
62415 }
62416 }
62417 else if (type == 836)
62418 {
62419 for (int num406 = 0; num406 < 3; num406++)
62420 {
62421 int num407 = Dust.NewDust(position, width, height, 31, 0f, 0f, 50, Color.White, 0.8f);
62422 Dust dust2 = Main.dust[num407];
62423 dust2.velocity *= 0.5f;
62424 Main.dust[num407].noGravity = true;
62425 }
62426 }
62427 if (type == 408)
62428 {
62429 for (int num408 = 0; num408 < 15; num408++)
62430 {
62431 int num409 = Dust.NewDust(base.Center - Vector2.One * 10f, 50, 50, 5, 0f, -2f);
62432 Dust dust2 = Main.dust[num409];
62433 dust2.velocity /= 2f;
62434 }
62435 int num410 = 0;
62436 int num411 = 10;
62437 num410 = Gore.NewGore(base.Center, velocity * 0.8f, 584);
62438 Gore gore2 = Main.gore[num410];
62439 gore2.timeLeft /= num411;
62440 num410 = Gore.NewGore(base.Center, velocity * 0.9f, 585);
62441 gore2 = Main.gore[num410];
62442 gore2.timeLeft /= num411;
62443 num410 = Gore.NewGore(base.Center, velocity * 1f, 586);
62444 gore2 = Main.gore[num410];
62445 gore2.timeLeft /= num411;
62446 }
62447 if (type == 385)
62448 {
62449 SoundEngine.PlaySound(4, (int)base.Center.X, (int)base.Center.Y, 19);
62450 int num412 = 36;
62451 for (int num413 = 0; num413 < num412; num413++)
62452 {
62453 Vector2 spinningpoint = Vector2.Normalize(velocity) * new Vector2((float)width / 2f, height) * 0.75f;
62454 spinningpoint = spinningpoint.RotatedBy((float)(num413 - (num412 / 2 - 1)) * ((float)Math.PI * 2f) / (float)num412) + base.Center;
62456 int num414 = Dust.NewDust(spinningpoint + vector46, 0, 0, 172, vector46.X * 2f, vector46.Y * 2f, 100, default(Color), 1.4f);
62457 Main.dust[num414].noGravity = true;
62458 Main.dust[num414].noLight = true;
62459 Main.dust[num414].velocity = vector46;
62460 }
62461 if (owner == Main.myPlayer)
62462 {
62463 if (ai[1] < 1f)
62464 {
62465 int num415 = (Main.expertMode ? 25 : 40);
62466 int num416 = NewProjectile(GetProjectileSource_FromThis(), base.Center.X - (float)(direction * 30), base.Center.Y - 4f, (float)(-direction) * 0.01f, 0f, 384, num415, 4f, owner, 16f, 15f);
62467 Main.projectile[num416].netUpdate = true;
62468 }
62469 else
62470 {
62471 int num417 = (int)(base.Center.Y / 16f);
62472 int num418 = (int)(base.Center.X / 16f);
62473 int num419 = 100;
62474 if (num418 < 10)
62475 {
62476 num418 = 10;
62477 }
62478 if (num418 > Main.maxTilesX - 10)
62479 {
62480 num418 = Main.maxTilesX - 10;
62481 }
62482 if (num417 < 10)
62483 {
62484 num417 = 10;
62485 }
62486 if (num417 > Main.maxTilesY - num419 - 10)
62487 {
62488 num417 = Main.maxTilesY - num419 - 10;
62489 }
62490 int num420 = num417 + num419;
62491 int num421 = num417 + 15;
62492 for (int num422 = num417; num422 < num420; num422++)
62493 {
62494 Tile tile = Main.tile[num418, num422];
62495 if (tile.active() && (Main.tileSolid[tile.type] || tile.liquid != 0))
62496 {
62497 num421 = num422;
62498 break;
62499 }
62500 }
62501 num417 = num421;
62502 int num423 = (Main.expertMode ? 50 : 80);
62503 int num424 = NewProjectile(GetProjectileSource_FromThis(), num418 * 16 + 8, num417 * 16 - 24, 0f, 0f, 386, num423, 4f, Main.myPlayer, 16f, 24f);
62504 Main.projectile[num424].netUpdate = true;
62505 }
62506 }
62507 }
62508 else if (type >= 424 && type <= 426)
62509 {
62511 position.X += width / 2;
62512 position.Y += height / 2;
62513 width = (int)(128f * scale);
62514 height = (int)(128f * scale);
62515 position.X -= width / 2;
62516 position.Y -= height / 2;
62517 for (int num425 = 0; num425 < 8; num425++)
62518 {
62519 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
62520 }
62521 for (int num426 = 0; num426 < 32; num426++)
62522 {
62523 int num427 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
62524 Main.dust[num427].noGravity = true;
62525 Dust dust2 = Main.dust[num427];
62526 dust2.velocity *= 3f;
62527 num427 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
62528 dust2 = Main.dust[num427];
62529 dust2.velocity *= 2f;
62530 Main.dust[num427].noGravity = true;
62531 }
62532 for (int num428 = 0; num428 < 2; num428++)
62533 {
62534 int num429 = Gore.NewGore(position + new Vector2((float)(width * Main.rand.Next(100)) / 100f, (float)(height * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64));
62535 Gore gore2 = Main.gore[num429];
62536 gore2.velocity *= 0.3f;
62537 Main.gore[num429].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
62538 Main.gore[num429].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
62539 }
62540 if (owner == Main.myPlayer)
62541 {
62542 localAI[1] = -1f;
62543 maxPenetrate = 0;
62544 Damage();
62545 }
62546 for (int num430 = 0; num430 < 5; num430++)
62547 {
62548 int num431 = Utils.SelectRandom<int>(Main.rand, 6, 259, 158);
62549 int num432 = Dust.NewDust(position, width, height, num431, 2.5f * (float)direction, -2.5f);
62550 Main.dust[num432].alpha = 200;
62551 Dust dust2 = Main.dust[num432];
62552 dust2.velocity *= 2.4f;
62553 dust2 = Main.dust[num432];
62554 dust2.scale += Main.rand.NextFloat();
62555 }
62556 }
62557 if (type == 399)
62558 {
62559 SoundEngine.PlaySound(13, (int)position.X, (int)position.Y);
62560 Vector2 vector47 = new Vector2(20f, 20f);
62561 for (int num433 = 0; num433 < 5; num433++)
62562 {
62563 Dust.NewDust(base.Center - vector47 / 2f, (int)vector47.X, (int)vector47.Y, 12, 0f, 0f, 0, Color.Red);
62564 }
62565 for (int num434 = 0; num434 < 10; num434++)
62566 {
62567 int num435 = Dust.NewDust(base.Center - vector47 / 2f, (int)vector47.X, (int)vector47.Y, 31, 0f, 0f, 100, default(Color), 1.5f);
62568 Dust dust2 = Main.dust[num435];
62569 dust2.velocity *= 1.4f;
62570 }
62571 for (int num436 = 0; num436 < 20; num436++)
62572 {
62573 int num437 = Dust.NewDust(base.Center - vector47 / 2f, (int)vector47.X, (int)vector47.Y, 6, 0f, 0f, 100, default(Color), 2.5f);
62574 Main.dust[num437].noGravity = true;
62575 Dust dust2 = Main.dust[num437];
62576 dust2.velocity *= 5f;
62577 num437 = Dust.NewDust(base.Center - vector47 / 2f, (int)vector47.X, (int)vector47.Y, 6, 0f, 0f, 100, default(Color), 1.5f);
62578 dust2 = Main.dust[num437];
62579 dust2.velocity *= 3f;
62580 }
62581 if (Main.myPlayer == owner)
62582 {
62583 for (int num438 = 0; num438 < 6; num438++)
62584 {
62585 float num439 = (0f - velocity.X) * (float)Main.rand.Next(20, 50) * 0.01f + (float)Main.rand.Next(-20, 21) * 0.4f;
62586 float num440 = (0f - Math.Abs(velocity.Y)) * (float)Main.rand.Next(30, 50) * 0.01f + (float)Main.rand.Next(-20, 5) * 0.4f;
62587 NewProjectile(GetProjectileSource_FromThis(), base.Center.X + num439, base.Center.Y + num440, num439, num440, 400 + Main.rand.Next(3), (int)((double)damage * 0.5), 0f, owner);
62588 }
62589 }
62590 }
62591 if (type == 384 || type == 386)
62592 {
62593 for (int num441 = 0; num441 < 20; num441++)
62594 {
62595 int num442 = Dust.NewDust(position, width, height, 212, direction * 2, 0f, 100, default(Color), 1.4f);
62596 Dust dust42 = Main.dust[num442];
62597 dust42.color = Color.CornflowerBlue;
62598 dust42.color = Color.Lerp(dust42.color, Color.White, 0.3f);
62599 dust42.noGravity = true;
62600 }
62601 }
62602 if (type == 507 || type == 508)
62603 {
62604 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
62607 vector49.Normalize();
62608 vector48 += vector49 * 16f;
62609 for (int num443 = 0; num443 < 20; num443++)
62610 {
62611 int num444 = Dust.NewDust(vector48, width, height, 81);
62612 Main.dust[num444].position = (Main.dust[num444].position + base.Center) / 2f;
62613 Dust dust2 = Main.dust[num444];
62614 dust2.velocity += oldVelocity * 0.4f;
62615 dust2 = Main.dust[num444];
62616 dust2.velocity *= 0.5f;
62617 Main.dust[num444].noGravity = true;
62618 vector48 -= vector49 * 8f;
62619 }
62620 }
62621 if (type == 598)
62622 {
62623 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
62625 Vector2 vector51 = (rotation - (float)Math.PI / 2f).ToRotationVector2();
62626 vector50 += vector51 * 16f;
62627 for (int num445 = 0; num445 < 20; num445++)
62628 {
62629 int num446 = Dust.NewDust(vector50, width, height, 81);
62630 Main.dust[num446].position = (Main.dust[num446].position + base.Center) / 2f;
62631 Dust dust2 = Main.dust[num446];
62632 dust2.velocity += vector51 * 2f;
62633 dust2 = Main.dust[num446];
62634 dust2.velocity *= 0.5f;
62635 Main.dust[num446].noGravity = true;
62636 vector50 -= vector51 * 8f;
62637 }
62638 }
62639 if (type == 971)
62640 {
62642 Vector2 vector53 = (rotation - (float)Math.PI / 2f).ToRotationVector2();
62643 vector52 += vector53 * 8f;
62644 for (int num447 = 0; num447 < 6; num447++)
62645 {
62646 int num448 = Dust.NewDust(vector52, width, height, 4);
62647 Main.dust[num448].color = new Color(10, 10, 10, 150);
62648 Main.dust[num448].position = (Main.dust[num448].position + base.Center) / 2f;
62649 Dust dust2 = Main.dust[num448];
62650 dust2.velocity += vector53;
62651 dust2 = Main.dust[num448];
62652 dust2.velocity *= 0.5f;
62653 Main.dust[num448].noGravity = true;
62654 vector52 -= vector53 * 4f;
62655 }
62656 }
62657 if (type == 1 || type == 81 || type == 98 || type == 980)
62658 {
62659 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
62660 for (int num449 = 0; num449 < 10; num449++)
62661 {
62662 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 7);
62663 }
62664 }
62665 if (type == 336 || type == 345)
62666 {
62667 for (int num450 = 0; num450 < 6; num450++)
62668 {
62669 int num451 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 196);
62670 Main.dust[num451].noGravity = true;
62671 Main.dust[num451].scale = scale;
62672 }
62673 }
62674 if (type == 358)
62675 {
62676 velocity = oldVelocity * 0.2f;
62677 for (int num452 = 0; num452 < 100; num452++)
62678 {
62679 int num453 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 211, 0f, 0f, 75, default(Color), 1.2f);
62680 Dust dust2;
62681 if (Main.rand.Next(2) == 0)
62682 {
62683 dust2 = Main.dust[num453];
62684 dust2.alpha += 25;
62685 }
62686 if (Main.rand.Next(2) == 0)
62687 {
62688 dust2 = Main.dust[num453];
62689 dust2.alpha += 25;
62690 }
62691 if (Main.rand.Next(2) == 0)
62692 {
62693 dust2 = Main.dust[num453];
62694 dust2.alpha += 25;
62695 }
62696 if (Main.rand.Next(2) == 0)
62697 {
62698 Main.dust[num453].scale = 0.6f;
62699 }
62700 else
62701 {
62702 Main.dust[num453].noGravity = true;
62703 }
62704 dust2 = Main.dust[num453];
62705 dust2.velocity *= 0.3f;
62706 dust2 = Main.dust[num453];
62707 dust2.velocity += velocity;
62708 dust2 = Main.dust[num453];
62709 dust2.velocity *= 1f + (float)Main.rand.Next(-100, 101) * 0.01f;
62710 Main.dust[num453].velocity.X += (float)Main.rand.Next(-50, 51) * 0.015f;
62711 Main.dust[num453].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.015f;
62712 Main.dust[num453].position = base.Center;
62713 }
62714 }
62715 if (type == 406)
62716 {
62717 int num454 = 175;
62718 Color newColor6 = new Color(0, 80, 255, 100);
62719 velocity = oldVelocity * 0.2f;
62720 for (int num455 = 0; num455 < 40; num455++)
62721 {
62722 int num456 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 4, 0f, 0f, num454, newColor6, 1.6f);
62723 Dust dust2;
62724 if (Main.rand.Next(2) == 0)
62725 {
62726 dust2 = Main.dust[num456];
62727 dust2.alpha += 25;
62728 }
62729 if (Main.rand.Next(2) == 0)
62730 {
62731 dust2 = Main.dust[num456];
62732 dust2.alpha += 25;
62733 }
62734 if (Main.rand.Next(2) == 0)
62735 {
62736 dust2 = Main.dust[num456];
62737 dust2.alpha += 25;
62738 }
62739 if (Main.rand.Next(2) == 0)
62740 {
62741 Main.dust[num456].scale = 0.6f;
62742 }
62743 else
62744 {
62745 Main.dust[num456].noGravity = true;
62746 }
62747 dust2 = Main.dust[num456];
62748 dust2.velocity *= 0.3f;
62749 dust2 = Main.dust[num456];
62750 dust2.velocity += velocity;
62751 dust2 = Main.dust[num456];
62752 dust2.velocity *= 1f + (float)Main.rand.Next(-100, 101) * 0.01f;
62753 Main.dust[num456].velocity.X += (float)Main.rand.Next(-50, 51) * 0.015f;
62754 Main.dust[num456].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.015f;
62755 Main.dust[num456].position = base.Center;
62756 }
62757 }
62758 if (type == 344)
62759 {
62760 for (int num457 = 0; num457 < 8; num457++)
62761 {
62762 int num458 = Dust.NewDust(position, width, height, 197, 0f, 0f, 50);
62763 Main.dust[num458].noGravity = true;
62764 Main.dust[num458].velocity.X *= 0.75f;
62765 Main.dust[num458].velocity.Y *= 0.75f;
62766 Dust dust2 = Main.dust[num458];
62767 dust2.velocity -= velocity * 0.025f;
62768 }
62769 }
62770 else if (type == 343)
62771 {
62773 for (int num459 = 4; num459 < 31; num459++)
62774 {
62775 float num460 = oldVelocity.X * (30f / (float)num459);
62776 float num461 = oldVelocity.Y * (30f / (float)num459);
62777 int num462 = Dust.NewDust(new Vector2(oldPosition.X - num460, oldPosition.Y - num461), 8, 8, 197, oldVelocity.X, oldVelocity.Y, 100, default(Color), 1.2f);
62778 Main.dust[num462].noGravity = true;
62779 Dust dust2 = Main.dust[num462];
62780 dust2.velocity *= 0.5f;
62781 }
62782 }
62783 else if (type == 349)
62784 {
62786 for (int num463 = 0; num463 < 3; num463++)
62787 {
62788 int num464 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 76);
62789 Main.dust[num464].noGravity = true;
62790 Main.dust[num464].noLight = true;
62791 Main.dust[num464].scale = 0.7f;
62792 }
62793 }
62794 if (type == 323)
62795 {
62796 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
62797 for (int num465 = 0; num465 < 20; num465++)
62798 {
62799 int num466 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 7);
62800 if (Main.rand.Next(2) == 0)
62801 {
62802 Main.dust[num466].noGravity = true;
62803 Main.dust[num466].scale = 1.3f;
62804 Dust dust2 = Main.dust[num466];
62805 dust2.velocity *= 1.5f;
62806 dust2 = Main.dust[num466];
62807 dust2.velocity -= oldVelocity * 0.5f;
62808 dust2 = Main.dust[num466];
62809 dust2.velocity *= 1.5f;
62810 }
62811 else
62812 {
62813 Dust dust2 = Main.dust[num466];
62814 dust2.velocity *= 0.75f;
62815 dust2 = Main.dust[num466];
62816 dust2.velocity -= oldVelocity * 0.25f;
62817 Main.dust[num466].scale = 0.8f;
62818 }
62819 }
62820 }
62821 if (type == 589)
62822 {
62825 if (ai[1] == 1f)
62826 {
62828 }
62829 if (ai[1] == 2f)
62830 {
62832 }
62833 if (ai[1] == 3f)
62834 {
62836 }
62837 if (ai[1] == 4f)
62838 {
62840 }
62841 newColor7.A = 100;
62842 for (int num467 = 0; num467 < 30; num467++)
62843 {
62844 int num468 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 11, 0f, 0f, 0, newColor7);
62845 Dust dust2 = Main.dust[num468];
62846 dust2.velocity *= 1f + Main.rand.NextFloat() * 1f;
62847 if (num467 < 10)
62848 {
62849 Main.dust[num468].noGravity = true;
62850 dust2 = Main.dust[num468];
62851 dust2.velocity *= 0.5f;
62852 }
62853 }
62854 }
62855 if (type == 346)
62856 {
62858 for (int num469 = 0; num469 < 20; num469++)
62859 {
62860 int num470 = 10;
62861 if (ai[1] == 1f)
62862 {
62863 num470 = 4;
62864 }
62865 int num471 = Dust.NewDust(position, width, height, num470);
62866 Main.dust[num471].noGravity = true;
62867 }
62868 }
62869 if (type == 335)
62870 {
62872 for (int num472 = 0; num472 < 20; num472++)
62873 {
62874 int num473 = 90 - (int)ai[1];
62875 int num474 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num473);
62876 Main.dust[num474].noLight = true;
62877 Main.dust[num474].scale = 0.8f;
62878 }
62879 }
62880 if (type == 318)
62881 {
62882 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
62883 for (int num475 = 0; num475 < 10; num475++)
62884 {
62885 int num476 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 30);
62886 if (Main.rand.Next(2) == 0)
62887 {
62888 Main.dust[num476].noGravity = true;
62889 }
62890 }
62891 }
62892 if (type == 378)
62893 {
62894 for (int num477 = 0; num477 < 10; num477++)
62895 {
62896 int num478 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 30);
62897 if (Main.rand.Next(2) == 0)
62898 {
62899 Main.dust[num478].noGravity = true;
62900 }
62901 }
62902 }
62903 else if (type == 311)
62904 {
62905 for (int num479 = 0; num479 < 5; num479++)
62906 {
62907 int num480 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 189);
62908 Main.dust[num480].scale = 0.85f;
62909 Main.dust[num480].noGravity = true;
62910 Dust dust2 = Main.dust[num480];
62911 dust2.velocity += velocity * 0.5f;
62912 }
62913 }
62914 else if (type == 316)
62915 {
62916 for (int num481 = 0; num481 < 5; num481++)
62917 {
62918 int num482 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 195);
62919 Main.dust[num482].scale = 0.85f;
62920 Main.dust[num482].noGravity = true;
62921 Dust dust2 = Main.dust[num482];
62922 dust2.velocity += velocity * 0.5f;
62923 }
62924 }
62925 else if (type == 184 || type == 195)
62926 {
62927 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
62928 for (int num483 = 0; num483 < 5; num483++)
62929 {
62930 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 7);
62931 }
62932 }
62933 else if (type == 275 || type == 276)
62934 {
62935 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
62936 for (int num484 = 0; num484 < 5; num484++)
62937 {
62938 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 7);
62939 }
62940 }
62941 else if (type == 291)
62942 {
62943 if (owner == Main.myPlayer)
62944 {
62945 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 292, damage, knockBack, owner);
62946 }
62947 }
62948 else if (type == 295)
62949 {
62950 if (owner == Main.myPlayer)
62951 {
62952 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 296, (int)((double)damage * 0.75), knockBack, owner);
62953 }
62954 }
62955 else if (type == 270 || type == 837)
62956 {
62957 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y, 27);
62958 if (type == 270)
62959 {
62960 for (int num485 = 0; num485 < 20; num485++)
62961 {
62962 int num486 = Dust.NewDust(position, width, height, 26, 0f, 0f, 100);
62963 Main.dust[num486].noGravity = true;
62964 Dust dust2 = Main.dust[num486];
62965 dust2.velocity *= 1.2f;
62966 Main.dust[num486].scale = 1.3f;
62967 dust2 = Main.dust[num486];
62968 dust2.velocity -= oldVelocity * 0.3f;
62969 num486 = Dust.NewDust(new Vector2(position.X + 4f, position.Y + 4f), width - 8, height - 8, 5, 0f, 0f, 100, default(Color), 1.5f);
62970 Main.dust[num486].noGravity = true;
62971 dust2 = Main.dust[num486];
62972 dust2.velocity *= 3f;
62973 }
62974 }
62975 else
62976 {
62977 for (int num487 = 0; num487 < 20; num487++)
62978 {
62979 int num488 = Dust.NewDust(position, width, height, 26, 0f, 0f, 100);
62980 Main.dust[num488].noGravity = true;
62981 Dust dust2 = Main.dust[num488];
62982 dust2.velocity *= 1.2f;
62983 Main.dust[num488].scale = 1.3f;
62984 dust2 = Main.dust[num488];
62985 dust2.velocity -= oldVelocity * 0.3f;
62986 num488 = Dust.NewDust(new Vector2(position.X + 4f, position.Y + 4f), width - 8, height - 8, 6, 0f, 0f, 100, default(Color), 2f);
62987 Main.dust[num488].noGravity = true;
62988 dust2 = Main.dust[num488];
62989 dust2.velocity *= 3f;
62990 }
62991 }
62992 }
62993 else if (type == 265)
62994 {
62995 for (int num489 = 0; num489 < 15; num489++)
62996 {
62997 int num490 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 163, 0f, 0f, 100, default(Color), 1.2f);
62998 Main.dust[num490].noGravity = true;
62999 Dust dust2 = Main.dust[num490];
63000 dust2.velocity *= 1.2f;
63001 dust2 = Main.dust[num490];
63002 dust2.velocity -= oldVelocity * 0.3f;
63003 }
63004 }
63005 else if (type == 355)
63006 {
63007 for (int num491 = 0; num491 < 15; num491++)
63008 {
63009 int num492 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 205, 0f, 0f, 100, default(Color), 1.2f);
63010 Main.dust[num492].noGravity = true;
63011 Dust dust2 = Main.dust[num492];
63012 dust2.velocity *= 1.2f;
63013 dust2 = Main.dust[num492];
63014 dust2.velocity -= oldVelocity * 0.3f;
63015 }
63016 }
63017 else if (type == 304)
63018 {
63019 for (int num493 = 0; num493 < 3; num493++)
63020 {
63021 int num494 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 182, 0f, 0f, 100, default(Color), 0.8f);
63022 Main.dust[num494].noGravity = true;
63023 Dust dust2 = Main.dust[num494];
63024 dust2.velocity *= 1.2f;
63025 dust2 = Main.dust[num494];
63026 dust2.velocity -= oldVelocity * 0.3f;
63027 }
63028 }
63029 else if (type == 263)
63030 {
63032 for (int num495 = 0; num495 < 15; num495++)
63033 {
63034 int num496 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 92, velocity.X, velocity.Y, Main.rand.Next(0, 101), default(Color), 1f + (float)Main.rand.Next(40) * 0.01f);
63035 Main.dust[num496].noGravity = true;
63036 Dust dust2 = Main.dust[num496];
63037 dust2.velocity *= 2f;
63038 }
63039 }
63040 else if (type == 261)
63041 {
63042 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63043 for (int num497 = 0; num497 < 15; num497++)
63044 {
63045 Dust dust43 = Dust.NewDustDirect(new Vector2(position.X, position.Y), width, height, 148);
63046 Dust dust2 = dust43;
63047 dust2.velocity *= 2f;
63048 dust43.velocity.Y -= 0.4f;
63049 }
63050 for (int num498 = 0; num498 < 3; num498++)
63051 {
63052 Dust dust44 = Dust.NewDustDirect(new Vector2(position.X, position.Y), width, height, 228);
63053 Dust dust2 = dust44;
63054 dust2.velocity *= 2f;
63055 dust44.noLight = true;
63056 dust2 = dust44;
63057 dust2.scale *= 0.8f;
63058 dust44.velocity.Y -= 0.3f;
63059 }
63060 }
63061 else if (type == 928)
63062 {
63063 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63064 for (int num499 = 0; num499 < 25; num499++)
63065 {
63066 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 5, velocity.X, velocity.Y, 0, Color.White, 1.3f);
63067 }
63068 }
63069 else if (type == 229)
63070 {
63071 for (int num500 = 0; num500 < 25; num500++)
63072 {
63073 int num501 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 157);
63074 Main.dust[num501].noGravity = true;
63075 Dust dust2 = Main.dust[num501];
63076 dust2.velocity *= 1.5f;
63077 Main.dust[num501].scale = 1.5f;
63078 }
63079 }
63080 else if (type == 239)
63081 {
63082 if (velocity.Y > 0f)
63083 {
63084 int num502 = Dust.NewDust(new Vector2(position.X, position.Y + (float)height - 2f), 2, 2, 154);
63085 Main.dust[num502].position.X -= 2f;
63086 Main.dust[num502].alpha = 38;
63087 Dust dust2 = Main.dust[num502];
63088 dust2.velocity *= 0.1f;
63089 dust2 = Main.dust[num502];
63090 dust2.velocity += -oldVelocity * 0.25f;
63091 Main.dust[num502].scale = 0.95f;
63092 }
63093 }
63094 else if (type == 245)
63095 {
63096 if (velocity.Y > 0f)
63097 {
63098 int num503 = Dust.NewDust(new Vector2(position.X, position.Y + (float)height - 2f), 2, 2, 114);
63099 Main.dust[num503].noGravity = true;
63100 Main.dust[num503].position.X -= 2f;
63101 Main.dust[num503].alpha = 38;
63102 Dust dust2 = Main.dust[num503];
63103 dust2.velocity *= 0.1f;
63104 dust2 = Main.dust[num503];
63105 dust2.velocity += -oldVelocity * 0.25f;
63106 Main.dust[num503].scale = 0.95f;
63107 }
63108 }
63109 else if (type == 264)
63110 {
63111 if (velocity.Y > 0f)
63112 {
63113 int num504 = Dust.NewDust(new Vector2(position.X, position.Y + (float)height - 2f), 2, 2, 54);
63114 Main.dust[num504].noGravity = true;
63115 Main.dust[num504].position.X -= 2f;
63116 Main.dust[num504].alpha = 38;
63117 Dust dust2 = Main.dust[num504];
63118 dust2.velocity *= 0.1f;
63119 dust2 = Main.dust[num504];
63120 dust2.velocity += -oldVelocity * 0.25f;
63121 Main.dust[num504].scale = 0.95f;
63122 }
63123 }
63124 else if (type == 206 || type == 225)
63125 {
63126 SoundEngine.PlaySound(6, (int)position.X, (int)position.Y);
63127 for (int num505 = 0; num505 < 5; num505++)
63128 {
63129 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 40);
63130 }
63131 }
63132 else if (type == 227)
63133 {
63134 SoundEngine.PlaySound(6, (int)position.X, (int)position.Y);
63135 for (int num506 = 0; num506 < 15; num506++)
63136 {
63137 int num507 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 157);
63138 Main.dust[num507].noGravity = true;
63139 Dust dust2 = Main.dust[num507];
63140 dust2.velocity += oldVelocity * Main.rand.NextFloat();
63141 Main.dust[num507].scale = 1.5f;
63142 }
63143 }
63144 else if (type == 237 && owner == Main.myPlayer)
63145 {
63146 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 238, damage, knockBack, owner);
63147 }
63148 else if (type == 243 && owner == Main.myPlayer)
63149 {
63150 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 244, damage, knockBack, owner);
63151 }
63152 else if (type == 120)
63153 {
63154 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63155 for (int num508 = 0; num508 < 10; num508++)
63156 {
63157 int num509 = Dust.NewDust(new Vector2(position.X - velocity.X, position.Y - velocity.Y), width, height, 67, velocity.X, velocity.Y, 100);
63158 if (num508 < 5)
63159 {
63160 Main.dust[num509].noGravity = true;
63161 }
63162 Dust dust2 = Main.dust[num509];
63163 dust2.velocity *= 0.2f;
63164 }
63165 }
63166 else if (type == 181 || type == 189 || type == 566)
63167 {
63168 for (int num510 = 0; num510 < 6; num510++)
63169 {
63170 int num511 = Dust.NewDust(position, width, height, 150, velocity.X, velocity.Y, 50);
63171 Main.dust[num511].noGravity = true;
63172 Main.dust[num511].scale = 1f;
63173 }
63174 }
63175 else if (type == 178)
63176 {
63177 for (int num512 = 0; num512 < 85; num512++)
63178 {
63179 int num513 = Main.rand.Next(139, 143);
63180 int num514 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num513, velocity.X, velocity.Y, 0, default(Color), 1.2f);
63181 Main.dust[num514].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
63182 Main.dust[num514].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
63183 Main.dust[num514].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63184 Main.dust[num514].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63185 Main.dust[num514].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
63186 Main.dust[num514].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
63187 Dust dust2 = Main.dust[num514];
63188 dust2.scale *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f;
63189 }
63190 for (int num515 = 0; num515 < 40; num515++)
63191 {
63192 int num516 = Main.rand.Next(276, 283);
63193 int num517 = Gore.NewGore(position, velocity, num516);
63194 Main.gore[num517].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
63195 Main.gore[num517].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
63196 Main.gore[num517].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63197 Main.gore[num517].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63198 Gore gore2 = Main.gore[num517];
63199 gore2.scale *= 1f + (float)Main.rand.Next(-20, 21) * 0.01f;
63200 Main.gore[num517].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
63201 Main.gore[num517].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
63202 }
63203 }
63204 else if (type == 289)
63205 {
63206 for (int num518 = 0; num518 < 30; num518++)
63207 {
63208 int num519 = Main.rand.Next(139, 143);
63209 int num520 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num519, velocity.X, velocity.Y, 0, default(Color), 1.2f);
63210 Main.dust[num520].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
63211 Main.dust[num520].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
63212 Main.dust[num520].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63213 Main.dust[num520].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63214 Main.dust[num520].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
63215 Main.dust[num520].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
63216 Dust dust2 = Main.dust[num520];
63217 dust2.scale *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f;
63218 }
63219 for (int num521 = 0; num521 < 15; num521++)
63220 {
63221 int num522 = Main.rand.Next(276, 283);
63222 int num523 = Gore.NewGore(position, velocity, num522);
63223 Main.gore[num523].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
63224 Main.gore[num523].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
63225 Main.gore[num523].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63226 Main.gore[num523].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
63227 Gore gore2 = Main.gore[num523];
63228 gore2.scale *= 1f + (float)Main.rand.Next(-20, 21) * 0.01f;
63229 Main.gore[num523].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
63230 Main.gore[num523].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
63231 }
63232 }
63233 else if (type == 475 || type == 505 || type == 506)
63234 {
63235 if (ai[1] == 0f)
63236 {
63237 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63238 }
63239 if (ai[1] < 10f)
63240 {
63241 Vector2 vector54 = new Vector2(position.X + (float)width * 0.5f, position.Y + (float)height * 0.5f);
63242 float num524 = 0f - velocity.X;
63243 float num525 = 0f - velocity.Y;
63244 float num526 = 1f;
63245 if (ai[0] <= 17f)
63246 {
63247 num526 = ai[0] / 17f;
63248 }
63249 int num527 = (int)(30f * num526);
63250 float num528 = 1f;
63251 if (ai[0] <= 30f)
63252 {
63253 num528 = ai[0] / 30f;
63254 }
63255 float num529 = 0.4f * num528;
63256 float num530 = num529;
63257 num525 += num530;
63258 for (int num531 = 0; num531 < num527; num531++)
63259 {
63260 float num532 = (float)Math.Sqrt(num524 * num524 + num525 * num525);
63261 float num533 = 5.6f;
63262 if (Math.Abs(num524) + Math.Abs(num525) < 1f)
63263 {
63264 num533 *= Math.Abs(num524) + Math.Abs(num525) / 1f;
63265 }
63266 num532 = num533 / num532;
63267 num524 *= num532;
63268 num525 *= num532;
63270 int num534 = 3;
63271 if (type == 506)
63272 {
63273 num534 = 30;
63274 }
63275 if (type == 505)
63276 {
63277 num534 = 239;
63278 }
63279 if ((float)num531 > ai[1])
63280 {
63281 for (int num535 = 0; num535 < 4; num535++)
63282 {
63283 int num536 = Dust.NewDust(vector54, width, height, num534);
63284 Main.dust[num536].noGravity = true;
63285 Dust dust2 = Main.dust[num536];
63286 dust2.velocity *= 0.3f;
63287 }
63288 }
63289 vector54.X += num524;
63290 vector54.Y += num525;
63291 num524 = 0f - velocity.X;
63292 num525 = 0f - velocity.Y;
63293 num530 += num529;
63294 num525 += num530;
63295 }
63296 }
63297 }
63298 else if (type == 171)
63299 {
63300 if (ai[1] == 0f)
63301 {
63302 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63303 }
63304 if (ai[1] < 10f)
63305 {
63306 Vector2 vector55 = new Vector2(position.X + (float)width * 0.5f, position.Y + (float)height * 0.5f);
63307 float num537 = 0f - velocity.X;
63308 float num538 = 0f - velocity.Y;
63309 float num539 = 1f;
63310 if (ai[0] <= 17f)
63311 {
63312 num539 = ai[0] / 17f;
63313 }
63314 int num540 = (int)(30f * num539);
63315 float num541 = 1f;
63316 if (ai[0] <= 30f)
63317 {
63318 num541 = ai[0] / 30f;
63319 }
63320 float num542 = 0.4f * num541;
63321 float num543 = num542;
63322 num538 += num543;
63323 for (int num544 = 0; num544 < num540; num544++)
63324 {
63325 float num545 = (float)Math.Sqrt(num537 * num537 + num538 * num538);
63326 float num546 = 5.6f;
63327 if (Math.Abs(num537) + Math.Abs(num538) < 1f)
63328 {
63329 num546 *= Math.Abs(num537) + Math.Abs(num538) / 1f;
63330 }
63331 num545 = num546 / num545;
63332 num537 *= num545;
63333 num538 *= num545;
63335 if ((float)num544 > ai[1])
63336 {
63337 for (int num547 = 0; num547 < 4; num547++)
63338 {
63339 int num548 = Dust.NewDust(vector55, width, height, 129);
63340 Main.dust[num548].noGravity = true;
63341 Dust dust2 = Main.dust[num548];
63342 dust2.velocity *= 0.3f;
63343 }
63344 }
63345 vector55.X += num537;
63346 vector55.Y += num538;
63347 num537 = 0f - velocity.X;
63348 num538 = 0f - velocity.Y;
63349 num543 += num542;
63350 num538 += num543;
63351 }
63352 }
63353 }
63354 else if (type == 117)
63355 {
63356 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63357 for (int num549 = 0; num549 < 10; num549++)
63358 {
63359 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 26);
63360 }
63361 }
63362 else if (type == 166)
63363 {
63365 for (int num550 = 0; num550 < 10; num550++)
63366 {
63367 int num551 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 76);
63368 Main.dust[num551].noGravity = true;
63369 Dust dust2 = Main.dust[num551];
63370 dust2.velocity -= oldVelocity * 0.25f;
63371 }
63372 }
63373 else if (type == 158)
63374 {
63375 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63376 for (int num552 = 0; num552 < 10; num552++)
63377 {
63378 int num553 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 9);
63379 Main.dust[num553].noGravity = true;
63380 Dust dust2 = Main.dust[num553];
63381 dust2.velocity -= velocity * 0.5f;
63382 }
63383 }
63384 else if (type == 159)
63385 {
63386 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63387 for (int num554 = 0; num554 < 10; num554++)
63388 {
63389 int num555 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 11);
63390 Main.dust[num555].noGravity = true;
63391 Dust dust2 = Main.dust[num555];
63392 dust2.velocity -= velocity * 0.5f;
63393 }
63394 }
63395 else if (type == 160)
63396 {
63397 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63398 for (int num556 = 0; num556 < 10; num556++)
63399 {
63400 int num557 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 19);
63401 Main.dust[num557].noGravity = true;
63402 Dust dust2 = Main.dust[num557];
63403 dust2.velocity -= velocity * 0.5f;
63404 }
63405 }
63406 else if (type == 161)
63407 {
63408 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63409 for (int num558 = 0; num558 < 10; num558++)
63410 {
63411 int num559 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 11);
63412 Main.dust[num559].noGravity = true;
63413 Dust dust2 = Main.dust[num559];
63414 dust2.velocity -= velocity * 0.5f;
63415 }
63416 }
63417 else if (type >= 191 && type <= 194)
63418 {
63419 int num560 = Gore.NewGore(new Vector2(position.X - (float)(width / 2), position.Y - (float)(height / 2)), new Vector2(0f, 0f), Main.rand.Next(61, 64), scale);
63420 Gore gore2 = Main.gore[num560];
63421 gore2.velocity *= 0.1f;
63422 }
63423 else if (!Main.projPet[type])
63424 {
63425 if (type == 93)
63426 {
63427 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63428 for (int num561 = 0; num561 < 10; num561++)
63429 {
63430 int num562 = Dust.NewDust(position, width, height, 57, 0f, 0f, 100);
63431 Main.dust[num562].noGravity = true;
63432 Main.dust[num562].fadeIn = 1f;
63433 Main.dust[num562].velocity.X *= 2f;
63434 Main.dust[num562].velocity.Y *= 2f;
63435 Main.dust[num562].velocity.Y -= Main.rand.NextFloat() * 1.5f;
63436 }
63437 }
63438 else if (type == 99 || type == 1013 || type == 727 || type == 1014 || type == 1021)
63439 {
63440 short num563 = 1;
63441 num563 = type switch
63442 {
63443 1013 => 243,
63444 727 => 40,
63445 1014 => 12,
63446 1021 => 323,
63447 _ => 1,
63448 };
63449 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63450 for (int num564 = 0; num564 < 30; num564++)
63451 {
63452 int num565 = Dust.NewDust(position, width, height, num563);
63453 if (Main.rand.Next(2) == 0)
63454 {
63455 Dust dust2 = Main.dust[num565];
63456 dust2.scale *= 1.4f;
63457 }
63458 velocity *= 1.9f;
63459 }
63460 if (type == 1014 && owner == Main.myPlayer)
63461 {
63462 int number = Item.NewItem(new EntitySource_Loot(this), position, base.Size, 29);
63463 if (Main.netMode == 1)
63464 {
63465 NetMessage.SendData(21, -1, -1, null, number, 1f);
63466 }
63467 }
63468 }
63469 else if (type == 1005)
63470 {
63471 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63472 for (int num566 = 0; num566 < 10; num566++)
63473 {
63474 int num567 = Dust.NewDust(position, width, height, 1);
63475 if (Main.rand.Next(2) == 0)
63476 {
63477 Dust dust2 = Main.dust[num567];
63478 dust2.scale *= 1.1f;
63479 }
63480 velocity *= 1.6f;
63481 }
63482 }
63483 else if (type == 772)
63484 {
63485 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63486 for (int num568 = 0; num568 < 6; num568++)
63487 {
63488 Dust.NewDust(position, width, height, 1);
63489 velocity *= 1.9f;
63490 }
63491 for (int num569 = 0; num569 < 20; num569++)
63492 {
63493 Dust dust45 = Dust.NewDustDirect(position, width, height, Main.rand.NextFromList<int>(86, 87, 88, 89, 90), 0f, 0f, 0, default(Color), 0.7f);
63494 dust45.noGravity = true;
63495 Dust dust2 = dust45;
63496 dust2.velocity *= 2.9f;
63497 dust45.velocity.Y *= 0.8f;
63498 dust45.fadeIn = 1.1f;
63499 }
63500 for (int num570 = 0; num570 < 7; num570++)
63501 {
63502 Dust dust46 = Dust.NewDustDirect(position, width, height, Main.rand.NextFromList<int>(86, 87, 88, 89, 90), 0f, 0f, 0, default(Color), 0.7f);
63503 dust46.noGravity = true;
63504 Dust dust2 = dust46;
63505 dust2.velocity *= 2.9f;
63506 dust46.velocity.Y *= 0.8f;
63507 dust46.fadeIn = 1.1f;
63508 dust46.noLight = true;
63509 }
63510 if (owner == Main.myPlayer)
63511 {
63512 DropGeodeGems();
63513 }
63514 }
63515 else if (type == 763)
63516 {
63517 for (int num571 = 0; num571 < 4; num571++)
63518 {
63519 int num572 = Dust.NewDust(position, width, height, 40);
63520 if (Main.rand.Next(2) == 0)
63521 {
63522 Dust dust2 = Main.dust[num572];
63523 dust2.scale *= 0.8f;
63524 }
63525 Main.dust[num572].noGravity = true;
63526 velocity *= 1.9f;
63527 }
63528 }
63529 else if (type == 655)
63530 {
63531 SoundEngine.PlaySound(4, (int)position.X, (int)position.Y);
63532 for (int num573 = 0; num573 < 30; num573++)
63533 {
63534 int num574 = Dust.NewDust(position, width, height, 147);
63535 if (Main.rand.Next(2) == 0)
63536 {
63537 Dust dust2 = Main.dust[num574];
63538 dust2.scale *= 1.4f;
63539 }
63540 velocity *= 1.9f;
63541 }
63542 if (Main.netMode != 1 && !wet)
63543 {
63544 int num575 = 2;
63545 if (Main.rand.Next(3) == 0)
63546 {
63547 num575++;
63548 }
63549 if (Main.rand.Next(3) == 0)
63550 {
63551 num575++;
63552 }
63553 if (Main.rand.Next(3) == 0)
63554 {
63555 num575++;
63556 }
63557 int availableAmountOfNPCsToSpawnUpToSlot = NPC.GetAvailableAmountOfNPCsToSpawnUpToSlot(num575);
63559 {
63560 int num577 = Main.rand.Next(210, 212);
63561 int num578 = NPC.NewNPC(GetNPCSource_FromThis(), (int)base.Center.X, (int)base.Center.Y, num577, 1);
63562 Main.npc[num578].velocity.X = (float)Main.rand.Next(-200, 201) * 0.002f;
63563 Main.npc[num578].velocity.Y = (float)Main.rand.Next(-200, 201) * 0.002f;
63564 Main.npc[num578].netUpdate = true;
63565 }
63566 }
63567 }
63568 else if (type == 728)
63569 {
63571 for (int num579 = 0; num579 < 7; num579++)
63572 {
63573 Dust.NewDust(position, width, height, 58, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 0.8f);
63574 }
63575 for (float num580 = 0f; num580 < 1f; num580 += 0.125f)
63576 {
63577 Dust.NewDustPerfect(base.Center, 278, Vector2.UnitY.RotatedBy(num580 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * 0.5f) * (4f + Main.rand.NextFloat() * 4f), 150, Color.CornflowerBlue).noGravity = true;
63578 }
63579 for (float num581 = 0f; num581 < 1f; num581 += 0.25f)
63580 {
63581 Dust.NewDustPerfect(base.Center, 278, Vector2.UnitY.RotatedBy(num581 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * 0.5f) * (2f + Main.rand.NextFloat() * 3f), 150, Color.Gold).noGravity = true;
63582 }
63583 Vector2 vector56 = new Vector2(Main.screenWidth, Main.screenHeight);
63584 if (base.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition + vector56 / 2f, vector56 + new Vector2(400f))))
63585 {
63586 for (int num582 = 0; num582 < 7; num582++)
63587 {
63588 Gore.NewGore(position, Main.rand.NextVector2CircularEdge(0.5f, 0.5f) * velocity.Length(), Utils.SelectRandom<int>(Main.rand, 16, 17, 17, 17, 17, 17, 17, 17));
63589 }
63590 }
63591 }
63592 else if (type == 729)
63593 {
63595 for (int num583 = 0; num583 < 10; num583++)
63596 {
63597 Dust dust47 = Dust.NewDustDirect(position, width, height, 279, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 1.2f);
63598 dust47.noGravity = true;
63599 dust47.velocity.X *= 2f;
63600 }
63601 }
63602 else if (type == 723 || type == 724 || type == 725 || type == 726 || type == 907)
63603 {
63604 if (type == 723)
63605 {
63607 for (int num584 = 0; num584 < 10; num584++)
63608 {
63609 Dust dust48 = Dust.NewDustDirect(position, width, height, 88, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 1.2f);
63610 dust48.noGravity = true;
63611 dust48.velocity.X *= 2f;
63612 }
63613 for (int num585 = 0; num585 < 3; num585++)
63614 {
63615 Gore gore3 = Gore.NewGoreDirect(position, new Vector2(velocity.X * 0.05f, velocity.Y * 0.05f), Utils.SelectRandom<int>(Main.rand, 16, 17, 17));
63616 Gore gore2 = gore3;
63617 gore2.velocity *= 2f;
63618 }
63619 if (owner == Main.myPlayer && Main.player[owner].starCloakCooldown == 0)
63620 {
63621 Main.player[owner].starCloakCooldown = 60;
63622 int number2 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 4143);
63623 if (Main.netMode == 1)
63624 {
63625 NetMessage.SendData(21, -1, -1, null, number2, 1f);
63626 }
63627 }
63628 }
63629 else
63630 {
63631 if (type == 907)
63632 {
63634 }
63635 else
63636 {
63638 }
63639 for (int num586 = 0; num586 < 10; num586++)
63640 {
63641 Dust dust49 = Main.dust[Dust.NewDust(position, width, height, 58, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 1.2f)];
63642 if (type == 907)
63643 {
63644 Dust dust2 = dust49;
63645 dust2.velocity *= 0.75f;
63646 }
63647 }
63648 for (int num587 = 0; num587 < 3; num587++)
63649 {
63650 Gore gore4 = Main.gore[Gore.NewGore(position, new Vector2(velocity.X * 0.05f, velocity.Y * 0.05f), Main.rand.Next(16, 18))];
63651 if (type == 907)
63652 {
63653 Gore gore2 = gore4;
63654 gore2.velocity *= 0.5f;
63655 }
63656 }
63657 }
63658 }
63659 else if (type == 91 || type == 92)
63660 {
63662 for (int num588 = 0; num588 < 10; num588++)
63663 {
63664 Dust.NewDust(position, width, height, 58, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 1.2f);
63665 }
63666 for (int num589 = 0; num589 < 3; num589++)
63667 {
63668 Gore.NewGore(position, new Vector2(velocity.X * 0.05f, velocity.Y * 0.05f), Main.rand.Next(16, 18));
63669 }
63670 if ((type == 91 || (type == 92 && ai[0] > 0f)) && owner == Main.myPlayer)
63671 {
63672 float x = position.X + (float)Main.rand.Next(-400, 400);
63673 float y = position.Y - (float)Main.rand.Next(600, 900);
63674 Vector2 vector57 = new Vector2(x, y);
63675 float num590 = position.X + (float)(width / 2) - vector57.X;
63676 float num591 = position.Y + (float)(height / 2) - vector57.Y;
63677 int num592 = 22;
63678 float num593 = (float)Math.Sqrt(num590 * num590 + num591 * num591);
63679 num593 = (float)num592 / num593;
63680 num590 *= num593;
63681 num591 *= num593;
63682 int num594 = damage;
63683 if (type == 91)
63684 {
63685 num594 /= 3;
63686 }
63688 if (type == 91)
63689 {
63690 Main.projectile[num595].ai[1] = position.Y;
63691 Main.projectile[num595].ai[0] = 1f;
63692 }
63693 else
63694 {
63695 Main.projectile[num595].ai[1] = position.Y;
63696 }
63697 }
63698 }
63699 else if (type == 89)
63700 {
63701 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63702 for (int num596 = 0; num596 < 5; num596++)
63703 {
63704 int num597 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 68);
63705 Main.dust[num597].noGravity = true;
63706 Dust dust2 = Main.dust[num597];
63707 dust2.velocity *= 1.5f;
63708 dust2 = Main.dust[num597];
63709 dust2.scale *= 0.9f;
63710 }
63711 if (type == 89 && owner == Main.myPlayer)
63712 {
63713 for (int num598 = 0; num598 < 2; num598++)
63714 {
63715 float num599 = (0f - velocity.X) * (float)Main.rand.Next(40, 70) * 0.01f + (float)Main.rand.Next(-20, 21) * 0.4f;
63716 float num600 = (0f - velocity.Y) * (float)Main.rand.Next(40, 70) * 0.01f + (float)Main.rand.Next(-20, 21) * 0.4f;
63718 }
63719 }
63720 }
63721 else if (type == 967)
63722 {
63724 for (int num601 = 0; num601 < 20; num601++)
63725 {
63726 int num602 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 219, velocity.X, velocity.Y, 0, default(Color), 0.5f + (float)Main.rand.Next(-20, 40) * 0.01f);
63727 Main.dust[num602].noGravity = true;
63728 Main.dust[num602].velocity = Main.rand.NextVector2Circular(6f, 6f);
63729 }
63730 }
63731 else if (type == 969)
63732 {
63734 if (activeSound2 != null)
63735 {
63736 activeSound2.Volume = 0f;
63737 activeSound2.Stop();
63738 }
63739 }
63740 else if (type == 177)
63741 {
63742 for (int num603 = 0; num603 < 20; num603++)
63743 {
63744 int num604 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 137, 0f, 0f, Main.rand.Next(0, 101), default(Color), 1f + (float)Main.rand.Next(-20, 40) * 0.01f);
63745 Dust dust2 = Main.dust[num604];
63746 dust2.velocity -= oldVelocity * 0.2f;
63747 if (Main.rand.Next(3) == 0)
63748 {
63749 dust2 = Main.dust[num604];
63750 dust2.scale *= 0.8f;
63751 dust2 = Main.dust[num604];
63752 dust2.velocity *= 0.5f;
63753 }
63754 else
63755 {
63756 Main.dust[num604].noGravity = true;
63757 }
63758 }
63759 }
63760 else if (type == 119 || type == 118 || type == 128 || type == 359)
63761 {
63762 int num605 = 10;
63763 if (type == 119 || type == 359)
63764 {
63765 num605 = 20;
63766 }
63768 for (int num606 = 0; num606 < num605; num606++)
63769 {
63770 int num607 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 92);
63771 if (Main.rand.Next(3) != 0)
63772 {
63773 Dust dust2 = Main.dust[num607];
63774 dust2.velocity *= 2f;
63775 Main.dust[num607].noGravity = true;
63776 dust2 = Main.dust[num607];
63777 dust2.scale *= 1.75f;
63778 }
63779 else
63780 {
63781 Dust dust2 = Main.dust[num607];
63782 dust2.scale *= 0.5f;
63783 }
63784 }
63785 }
63786 else if (type == 309)
63787 {
63788 int num608 = 10;
63790 for (int num609 = 0; num609 < num608; num609++)
63791 {
63792 int num610 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 185);
63793 if (Main.rand.Next(2) == 0)
63794 {
63795 Dust dust2 = Main.dust[num610];
63796 dust2.velocity *= 2f;
63797 Main.dust[num610].noGravity = true;
63798 dust2 = Main.dust[num610];
63799 dust2.scale *= 1.75f;
63800 }
63801 }
63802 }
63803 else if (type == 308)
63804 {
63805 int num611 = 80;
63807 for (int num612 = 0; num612 < num611; num612++)
63808 {
63809 int num613 = Dust.NewDust(new Vector2(position.X, position.Y + 16f), width, height - 16, 185);
63810 Dust dust2 = Main.dust[num613];
63811 dust2.velocity *= 2f;
63812 Main.dust[num613].noGravity = true;
63813 dust2 = Main.dust[num613];
63814 dust2.scale *= 1.15f;
63815 }
63816 }
63817 else if (aiStyle == 29 && type <= 126)
63818 {
63819 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63820 int num614 = type - 121 + 86;
63821 for (int num615 = 0; num615 < 15; num615++)
63822 {
63823 int num616 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num614, oldVelocity.X, oldVelocity.Y, 50, default(Color), 1.2f);
63824 Main.dust[num616].noGravity = true;
63825 Dust dust2 = Main.dust[num616];
63826 dust2.scale *= 1.25f;
63827 dust2 = Main.dust[num616];
63828 dust2.velocity *= 0.5f;
63829 }
63830 }
63831 else if (type == 597)
63832 {
63833 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63834 for (int num617 = 0; num617 < 15; num617++)
63835 {
63836 int num618 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 262, oldVelocity.X, oldVelocity.Y, 50, default(Color), 1.2f);
63837 Main.dust[num618].noGravity = true;
63838 Dust dust2 = Main.dust[num618];
63839 dust2.scale *= 1.25f;
63840 dust2 = Main.dust[num618];
63841 dust2.velocity *= 0.5f;
63842 }
63843 }
63844 else if (type == 731)
63845 {
63846 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63847 for (int num619 = 0; num619 < 15; num619++)
63848 {
63849 Dust dust50 = Dust.NewDustDirect(position, width, height, 226, oldVelocity.X * 0.5f, oldVelocity.Y * 0.5f, 50, default(Color), 0.5f);
63850 if (Main.rand.Next(3) != 0)
63851 {
63852 dust50.noGravity = true;
63853 Dust dust2 = dust50;
63854 dust2.scale *= 1.5f;
63855 dust2 = dust50;
63856 dust2.velocity *= 0.5f;
63857 }
63858 }
63859 }
63860 else if (type == 337)
63861 {
63863 for (int num620 = 0; num620 < 10; num620++)
63864 {
63865 int num621 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 197);
63866 Main.dust[num621].noGravity = true;
63867 }
63868 }
63869 else if (type == 379 || type == 377)
63870 {
63871 for (int num622 = 0; num622 < 5; num622++)
63872 {
63873 int num623 = Dust.NewDust(position, width, height, 171, 0f, 0f, 100);
63874 Main.dust[num623].scale = (float)Main.rand.Next(1, 10) * 0.1f;
63875 Main.dust[num623].noGravity = true;
63876 Main.dust[num623].fadeIn = 1.5f;
63877 Dust dust2 = Main.dust[num623];
63878 dust2.velocity *= 0.75f;
63879 }
63880 }
63881 else if (type == 80)
63882 {
63883 if (ai[0] >= 0f)
63884 {
63886 for (int num624 = 0; num624 < 10; num624++)
63887 {
63888 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 67);
63889 }
63890 }
63891 int num625 = (int)position.X / 16;
63892 int num626 = (int)position.Y / 16;
63893 if (Main.tile[num625, num626] == null)
63894 {
63895 Main.tile[num625, num626] = new Tile();
63896 }
63897 if (Main.tile[num625, num626].type == 127 && Main.tile[num625, num626].active())
63898 {
63899 WorldGen.KillTile(num625, num626);
63900 }
63901 }
63902 else if (type == 76 || type == 77 || type == 78)
63903 {
63904 for (int num627 = 0; num627 < 5; num627++)
63905 {
63906 int num628 = Dust.NewDust(position, width, height, 27, 0f, 0f, 80, default(Color), 1.5f);
63907 Main.dust[num628].noGravity = true;
63908 }
63909 }
63910 else if (type == 55 || type == 719)
63911 {
63912 for (int num629 = 0; num629 < 5; num629++)
63913 {
63914 int num630 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 18, 0f, 0f, 0, default(Color), 1.5f);
63915 Main.dust[num630].noGravity = true;
63916 }
63917 }
63918 else if (type == 51 || type == 267)
63919 {
63920 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63921 for (int num631 = 0; num631 < 5; num631++)
63922 {
63923 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 0, 0f, 0f, 0, default(Color), 0.7f);
63924 }
63925 }
63926 else if (type == 478)
63927 {
63928 if (owner == Main.myPlayer)
63929 {
63930 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, 0f, 0f, 480, (int)((double)damage * 0.8), knockBack * 0.5f, owner);
63931 }
63932 }
63933 else if (type == 477 || type == 479)
63934 {
63935 for (int num632 = 0; num632 < 5; num632++)
63936 {
63937 }
63938 Collision.HitTiles(position, velocity, width, height);
63939 }
63940 else if (type == 2 || type == 82)
63941 {
63942 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63943 for (int num633 = 0; num633 < 10; num633++)
63944 {
63945 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100);
63946 }
63947 }
63948 else if (type == 474)
63949 {
63950 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63951 for (int num634 = 0; num634 < 20; num634++)
63952 {
63953 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 26, 0f, 0f, 0, default(Color), 0.9f);
63954 }
63955 }
63956 else if (type == 172)
63957 {
63958 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63959 for (int num635 = 0; num635 < 20; num635++)
63960 {
63961 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 135, 0f, 0f, 100);
63962 }
63963 }
63964 else if (type == 103)
63965 {
63966 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63967 for (int num636 = 0; num636 < 20; num636++)
63968 {
63969 int num637 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 75, 0f, 0f, 100);
63970 if (Main.rand.Next(2) == 0)
63971 {
63972 Dust dust2 = Main.dust[num637];
63973 dust2.scale *= 2.5f;
63974 Main.dust[num637].noGravity = true;
63975 dust2 = Main.dust[num637];
63976 dust2.velocity *= 5f;
63977 }
63978 }
63979 }
63980 else if (type == 278)
63981 {
63982 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63983 for (int num638 = 0; num638 < 20; num638++)
63984 {
63985 int num639 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 169, 0f, 0f, 100);
63986 if (Main.rand.Next(2) == 0)
63987 {
63988 Dust dust2 = Main.dust[num639];
63989 dust2.scale *= 1.5f;
63990 Main.dust[num639].noGravity = true;
63991 dust2 = Main.dust[num639];
63992 dust2.velocity *= 5f;
63993 }
63994 }
63995 }
63996 else if (type == 3 || type == 48 || type == 54 || type == 599 || type == 909)
63997 {
63998 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
63999 for (int num640 = 0; num640 < 10; num640++)
64000 {
64001 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 1, velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.75f);
64002 }
64003 }
64004 else if (type == 330)
64005 {
64006 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64007 for (int num641 = 0; num641 < 10; num641++)
64008 {
64009 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 0, velocity.X * 0.4f, velocity.Y * 0.4f, 0, default(Color), 0.75f);
64010 }
64011 }
64012 else if (type == 4)
64013 {
64014 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64015 for (int num642 = 0; num642 < 10; num642++)
64016 {
64017 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 14, 0f, 0f, 150, default(Color), 1.1f);
64018 }
64019 }
64020 else if (type == 5)
64021 {
64023 for (int num643 = 0; num643 < 60; num643++)
64024 {
64025 int num644 = Main.rand.Next(3);
64026 Dust.NewDust(position, width, height, num644 switch
64027 {
64028 0 => 15,
64029 1 => 57,
64030 _ => 58,
64031 }, velocity.X * 0.5f, velocity.Y * 0.5f, 150, default(Color), 1.5f);
64032 }
64033 }
64034 else if (type == 9 || type == 12 || type == 503 || type == 955)
64035 {
64037 if (type == 12 || type == 955)
64038 {
64040 if (Main.tenthAnniversaryWorld && (type == 12 || type == 955))
64041 {
64043 newColor8.A /= 2;
64044 }
64045 for (int num645 = 0; num645 < 7; num645++)
64046 {
64047 Dust.NewDust(position, width, height, 58, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 0.8f);
64048 }
64049 for (float num646 = 0f; num646 < 1f; num646 += 0.125f)
64050 {
64051 Dust.NewDustPerfect(base.Center, 278, Vector2.UnitY.RotatedBy(num646 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * 0.5f) * (4f + Main.rand.NextFloat() * 4f), 150, newColor8).noGravity = true;
64052 }
64053 for (float num647 = 0f; num647 < 1f; num647 += 0.25f)
64054 {
64055 Dust.NewDustPerfect(base.Center, 278, Vector2.UnitY.RotatedBy(num647 * ((float)Math.PI * 2f) + Main.rand.NextFloat() * 0.5f) * (2f + Main.rand.NextFloat() * 3f), 150, Color.Gold).noGravity = true;
64056 }
64057 Vector2 vector58 = new Vector2(Main.screenWidth, Main.screenHeight);
64058 if (base.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition + vector58 / 2f, vector58 + new Vector2(400f))))
64059 {
64060 for (int num648 = 0; num648 < 7; num648++)
64061 {
64062 Gore.NewGore(position, Main.rand.NextVector2CircularEdge(0.5f, 0.5f) * velocity.Length(), Utils.SelectRandom<int>(Main.rand, 16, 17, 17, 17, 17, 17, 17, 17));
64063 }
64064 }
64065 }
64066 else
64067 {
64068 int num649 = 10;
64069 int num650 = 3;
64070 if (type == 503)
64071 {
64072 num649 = 40;
64073 num650 = 2;
64074 velocity /= 2f;
64075 }
64076 for (int num651 = 0; num651 < num649; num651++)
64077 {
64078 Dust.NewDust(position, width, height, 58, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 1.2f);
64079 }
64080 for (int num652 = 0; num652 < num650; num652++)
64081 {
64082 int num653 = Main.rand.Next(16, 18);
64083 if (type == 503)
64084 {
64085 num653 = 16;
64086 }
64087 Gore.NewGore(position, new Vector2(velocity.X * 0.05f, velocity.Y * 0.05f), num653);
64088 }
64089 if (type == 12 && damage < 100)
64090 {
64091 for (int num654 = 0; num654 < 10; num654++)
64092 {
64093 Dust.NewDust(position, width, height, 57, velocity.X * 0.1f, velocity.Y * 0.1f, 150, default(Color), 1.2f);
64094 }
64095 for (int num655 = 0; num655 < 3; num655++)
64096 {
64097 Gore.NewGore(position, new Vector2(velocity.X * 0.05f, velocity.Y * 0.05f), Main.rand.Next(16, 18));
64098 }
64099 }
64100 }
64101 }
64102 else if (type == 281)
64103 {
64104 if (ai[0] != -3f)
64105 {
64106 SoundEngine.PlaySound(4, (int)position.X, (int)position.Y);
64107 int num656 = Gore.NewGore(position, new Vector2((float)Main.rand.Next(-20, 21) * 0.2f, (float)Main.rand.Next(-20, 21) * 0.2f), 76);
64108 Gore gore2 = Main.gore[num656];
64109 gore2.velocity -= velocity * 0.5f;
64110 num656 = Gore.NewGore(new Vector2(position.X, position.Y), new Vector2((float)Main.rand.Next(-20, 21) * 0.2f, (float)Main.rand.Next(-20, 21) * 0.2f), 77);
64111 gore2 = Main.gore[num656];
64112 gore2.velocity -= velocity * 0.5f;
64114 for (int num657 = 0; num657 < 20; num657++)
64115 {
64116 int num658 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
64117 Dust dust2 = Main.dust[num658];
64118 dust2.velocity *= 1.4f;
64119 }
64120 for (int num659 = 0; num659 < 10; num659++)
64121 {
64122 int num660 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
64123 Main.dust[num660].noGravity = true;
64124 Dust dust2 = Main.dust[num660];
64125 dust2.velocity *= 5f;
64126 num660 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
64127 dust2 = Main.dust[num660];
64128 dust2.velocity *= 3f;
64129 }
64130 num656 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64131 gore2 = Main.gore[num656];
64132 gore2.velocity *= 0.4f;
64133 Main.gore[num656].velocity.X += 1f;
64134 Main.gore[num656].velocity.Y += 1f;
64135 num656 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64136 gore2 = Main.gore[num656];
64137 gore2.velocity *= 0.4f;
64138 Main.gore[num656].velocity.X -= 1f;
64139 Main.gore[num656].velocity.Y += 1f;
64140 num656 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64141 gore2 = Main.gore[num656];
64142 gore2.velocity *= 0.4f;
64143 Main.gore[num656].velocity.X += 1f;
64144 Main.gore[num656].velocity.Y -= 1f;
64145 num656 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64146 gore2 = Main.gore[num656];
64147 gore2.velocity *= 0.4f;
64148 Main.gore[num656].velocity.X -= 1f;
64149 Main.gore[num656].velocity.Y -= 1f;
64150 if (damage > 0)
64151 {
64152 position.X += width / 2;
64153 position.Y += height / 2;
64154 width = 128;
64155 height = 128;
64156 position.X -= width / 2;
64157 position.Y -= height / 2;
64158 if (ai[0] == -2f)
64159 {
64160 hostile = true;
64161 }
64162 Damage();
64163 }
64164 }
64165 }
64166 else if (type == 162)
64167 {
64169 for (int num661 = 0; num661 < 20; num661++)
64170 {
64171 int num662 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
64172 Dust dust2 = Main.dust[num662];
64173 dust2.velocity *= 1.4f;
64174 }
64175 for (int num663 = 0; num663 < 10; num663++)
64176 {
64177 int num664 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
64178 Main.dust[num664].noGravity = true;
64179 Dust dust2 = Main.dust[num664];
64180 dust2.velocity *= 5f;
64181 num664 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
64182 dust2 = Main.dust[num664];
64183 dust2.velocity *= 3f;
64184 }
64185 int num665 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64186 Gore gore2 = Main.gore[num665];
64187 gore2.velocity *= 0.4f;
64188 Main.gore[num665].velocity.X += 1f;
64189 Main.gore[num665].velocity.Y += 1f;
64190 num665 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64191 gore2 = Main.gore[num665];
64192 gore2.velocity *= 0.4f;
64193 Main.gore[num665].velocity.X -= 1f;
64194 Main.gore[num665].velocity.Y += 1f;
64195 num665 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64196 gore2 = Main.gore[num665];
64197 gore2.velocity *= 0.4f;
64198 Main.gore[num665].velocity.X += 1f;
64199 Main.gore[num665].velocity.Y -= 1f;
64200 num665 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64201 gore2 = Main.gore[num665];
64202 gore2.velocity *= 0.4f;
64203 Main.gore[num665].velocity.X -= 1f;
64204 Main.gore[num665].velocity.Y -= 1f;
64205 position.X += width / 2;
64206 position.Y += height / 2;
64207 width = 128;
64208 height = 128;
64209 position.X -= width / 2;
64210 position.Y -= height / 2;
64211 Damage();
64212 }
64213 else if (type == 240)
64214 {
64216 for (int num666 = 0; num666 < 20; num666++)
64217 {
64218 int num667 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
64219 Dust dust2 = Main.dust[num667];
64220 dust2.velocity *= 1.4f;
64221 }
64222 for (int num668 = 0; num668 < 10; num668++)
64223 {
64224 int num669 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
64225 Main.dust[num669].noGravity = true;
64226 Dust dust2 = Main.dust[num669];
64227 dust2.velocity *= 5f;
64228 num669 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
64229 dust2 = Main.dust[num669];
64230 dust2.velocity *= 3f;
64231 }
64232 int num670 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64233 Gore gore2 = Main.gore[num670];
64234 gore2.velocity *= 0.4f;
64235 Main.gore[num670].velocity.X += 1f;
64236 Main.gore[num670].velocity.Y += 1f;
64237 num670 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64238 gore2 = Main.gore[num670];
64239 gore2.velocity *= 0.4f;
64240 Main.gore[num670].velocity.X -= 1f;
64241 Main.gore[num670].velocity.Y += 1f;
64242 num670 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64243 gore2 = Main.gore[num670];
64244 gore2.velocity *= 0.4f;
64245 Main.gore[num670].velocity.X += 1f;
64246 Main.gore[num670].velocity.Y -= 1f;
64247 num670 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64248 gore2 = Main.gore[num670];
64249 gore2.velocity *= 0.4f;
64250 Main.gore[num670].velocity.X -= 1f;
64251 Main.gore[num670].velocity.Y -= 1f;
64252 position.X += width / 2;
64253 position.Y += height / 2;
64254 width = 96;
64255 height = 96;
64256 position.X -= width / 2;
64257 position.Y -= height / 2;
64258 Damage();
64259 }
64260 else
64261 {
64262 _ = type;
64263 _ = 162;
64264 if (type == 283 || type == 282)
64265 {
64267 for (int num671 = 0; num671 < 10; num671++)
64268 {
64269 int num672 = Dust.NewDust(position, width, height, 171, 0f, 0f, 100);
64270 Main.dust[num672].scale = (float)Main.rand.Next(1, 10) * 0.1f;
64271 Main.dust[num672].noGravity = true;
64272 Main.dust[num672].fadeIn = 1.5f;
64273 Dust dust2 = Main.dust[num672];
64274 dust2.velocity *= 0.75f;
64275 }
64276 }
64277 else if (type == 284)
64278 {
64279 for (int num673 = 0; num673 < 10; num673++)
64280 {
64281 int num674 = Main.rand.Next(139, 143);
64282 int num675 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num674, (0f - velocity.X) * 0.3f, (0f - velocity.Y) * 0.3f, 0, default(Color), 1.2f);
64283 Main.dust[num675].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
64284 Main.dust[num675].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
64285 Main.dust[num675].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
64286 Main.dust[num675].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
64287 Main.dust[num675].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
64288 Main.dust[num675].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
64289 Dust dust2 = Main.dust[num675];
64290 dust2.scale *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f;
64291 }
64292 for (int num676 = 0; num676 < 5; num676++)
64293 {
64294 int num677 = Main.rand.Next(276, 283);
64295 int num678 = Gore.NewGore(position, -velocity * 0.3f, num677);
64296 Main.gore[num678].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
64297 Main.gore[num678].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
64298 Main.gore[num678].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
64299 Main.gore[num678].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
64300 Gore gore2 = Main.gore[num678];
64301 gore2.scale *= 1f + (float)Main.rand.Next(-20, 21) * 0.01f;
64302 Main.gore[num678].velocity.X += (float)Main.rand.Next(-50, 51) * 0.05f;
64303 Main.gore[num678].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.05f;
64304 }
64305 }
64306 else if (type == 286)
64307 {
64309 for (int num679 = 0; num679 < 7; num679++)
64310 {
64311 int num680 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
64312 }
64313 for (int num681 = 0; num681 < 3; num681++)
64314 {
64315 int num682 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
64316 Main.dust[num682].noGravity = true;
64317 Dust dust2 = Main.dust[num682];
64318 dust2.velocity *= 3f;
64319 num682 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
64320 dust2 = Main.dust[num682];
64321 dust2.velocity *= 2f;
64322 }
64323 int num683 = Gore.NewGore(new Vector2(position.X - 10f, position.Y - 10f), default(Vector2), Main.rand.Next(61, 64));
64324 Gore gore2 = Main.gore[num683];
64325 gore2.velocity *= 0.3f;
64326 Main.gore[num683].velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
64327 Main.gore[num683].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
64328 if (owner == Main.myPlayer)
64329 {
64330 localAI[1] = -1f;
64331 maxPenetrate = 0;
64332 position.X += width / 2;
64333 position.Y += height / 2;
64334 width = 80;
64335 height = 80;
64336 position.X -= width / 2;
64337 position.Y -= height / 2;
64338 Damage();
64339 }
64340 }
64341 else if (type == 14 || type == 20 || type == 36 || type == 83 || type == 84 || type == 389 || type == 104 || type == 279 || type == 100 || type == 110 || type == 180 || type == 207 || type == 357 || type == 242 || type == 302 || type == 257 || type == 259 || type == 285 || type == 287 || type == 576 || type == 577 || type == 876 || type == 968)
64342 {
64343 Collision.HitTiles(position, velocity, width, height);
64345 }
64346 else if (type == 981)
64347 {
64348 Collision.HitTiles(position, velocity, width, height);
64351 {
64352 PositionInWorld = base.Center,
64353 MovementVector = Vector2.Zero
64354 }, owner);
64355 }
64356 else if (type == 1006)
64357 {
64358 Collision.HitTiles(position, velocity, width, height);
64360 float num684 = Main.rand.NextFloat() * ((float)Math.PI * 2f);
64361 for (float num685 = 0f; num685 < 1f; num685 += 1f)
64362 {
64363 float num686 = num684 + (float)Math.PI * 2f * num685;
64364 Vector2 vector59 = Vector2.UnitX.RotatedBy(num686);
64365 Vector2 center = base.Center;
64366 float num687 = 0.4f;
64368 {
64369 PositionInWorld = center,
64370 MovementVector = vector59 * num687
64371 }, owner);
64372 }
64373 }
64374 else if (type == 660)
64375 {
64376 Collision.HitTiles(position, velocity, width, height);
64378 int num688 = Main.rand.Next(4, 10);
64379 for (int num689 = 0; num689 < num688; num689++)
64380 {
64381 int num690 = Dust.NewDust(base.Center, 0, 0, 180, 0f, 0f, 100);
64382 Dust dust2 = Main.dust[num690];
64383 dust2.velocity *= 1.6f;
64384 Main.dust[num690].velocity.Y -= 1f;
64385 dust2 = Main.dust[num690];
64386 dust2.velocity += -velocity * (Main.rand.NextFloat() * 2f - 1f) * 0.5f;
64387 Main.dust[num690].scale = 2f;
64388 Main.dust[num690].fadeIn = 0.5f;
64389 Main.dust[num690].noGravity = true;
64390 }
64391 }
64392 else if (type == 761 || type == 762)
64393 {
64395 if (owner == Main.myPlayer && !noDropItem)
64396 {
64397 int num691 = 4343;
64398 if (type == 762)
64399 {
64400 num691 = 4344;
64401 }
64402 int num692 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, num691);
64403 Main.item[num692].noGrabDelay = 0;
64404 if (Main.netMode == 1 && num692 >= 0)
64405 {
64406 NetMessage.SendData(21, -1, -1, null, num692, 1f);
64407 }
64408 }
64409 }
64410 else if (type == 712)
64411 {
64412 Collision.HitTiles(position, velocity, width, height);
64414 int num693 = Main.rand.Next(6, 12);
64415 for (int num694 = 0; num694 < num693; num694++)
64416 {
64417 int num695 = Dust.NewDust(base.Center, 0, 0, 15, 0f, 0f, 100);
64418 Dust dust2 = Main.dust[num695];
64419 dust2.velocity *= 1.6f;
64420 Main.dust[num695].velocity.Y -= 1f;
64421 dust2 = Main.dust[num695];
64422 dust2.velocity += -velocity * (Main.rand.NextFloat() * 2f - 1f) * 0.5f;
64423 Main.dust[num695].scale = 1f;
64424 Main.dust[num695].fadeIn = 1.5f;
64425 Main.dust[num695].noGravity = true;
64426 Main.dust[num695].color = new Color(255, 255, 255, 0) * 0.3f;
64427 dust2 = Main.dust[num695];
64428 dust2.velocity *= 0.7f;
64429 dust2 = Main.dust[num695];
64430 dust2.position += Main.dust[num695].velocity * 5f;
64431 }
64432 for (int num696 = 0; num696 < 3; num696++)
64433 {
64434 Gore gore5 = Gore.NewGoreDirect(position, Vector2.Zero, 1008, 1f + Main.rand.NextFloatDirection() * 0.2f);
64435 Gore gore2 = gore5;
64436 gore2.velocity *= 4f;
64437 }
64438 }
64439 else if (type == 638)
64440 {
64441 Collision.HitTiles(position, velocity, width, height);
64443 int num697 = Main.rand.Next(2, 5);
64444 for (int num698 = 0; num698 < num697; num698++)
64445 {
64446 int num699 = Dust.NewDust(base.Center, 0, 0, 229, 0f, 0f, 100);
64447 Dust dust2 = Main.dust[num699];
64448 dust2.velocity *= 1.6f;
64449 Main.dust[num699].velocity.Y -= 1f;
64450 dust2 = Main.dust[num699];
64451 dust2.position -= Vector2.One * 4f;
64452 Main.dust[num699].position = Vector2.Lerp(Main.dust[num699].position, base.Center, 0.5f);
64453 Main.dust[num699].noGravity = true;
64454 }
64455 }
64456 else if (type == 15 || type == 321)
64457 {
64459 for (int num700 = 0; num700 < 20; num700++)
64460 {
64461 int num701 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100, default(Color), 2f);
64462 Main.dust[num701].noGravity = true;
64463 Dust dust2 = Main.dust[num701];
64464 dust2.velocity *= 2f;
64465 num701 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100);
64466 dust2 = Main.dust[num701];
64467 dust2.velocity *= 2f;
64468 }
64469 }
64470 else if (type == 253)
64471 {
64473 for (int num702 = 0; num702 < 20; num702++)
64474 {
64475 int num703 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 135, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100, default(Color), 2f);
64476 Main.dust[num703].noGravity = true;
64477 Dust dust2 = Main.dust[num703];
64478 dust2.velocity *= 2f;
64479 num703 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 135, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100);
64480 dust2 = Main.dust[num703];
64481 dust2.velocity *= 2f;
64482 }
64483 }
64484 else if (type == 95 || type == 96)
64485 {
64487 for (int num704 = 0; num704 < 20; num704++)
64488 {
64489 int num705 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 75, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100, default(Color), 2f * scale);
64490 Main.dust[num705].noGravity = true;
64491 Dust dust2 = Main.dust[num705];
64492 dust2.velocity *= 2f;
64493 num705 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 75, (0f - velocity.X) * 0.2f, (0f - velocity.Y) * 0.2f, 100, default(Color), 1f * scale);
64494 dust2 = Main.dust[num705];
64495 dust2.velocity *= 2f;
64496 }
64497 }
64498 else if (type == 17)
64499 {
64500 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64501 for (int num706 = 0; num706 < 5; num706++)
64502 {
64503 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 0);
64504 }
64505 }
64506 else if (type == 31 || type == 42)
64507 {
64508 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64509 for (int num707 = 0; num707 < 5; num707++)
64510 {
64511 int num708 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 32);
64512 Dust dust2 = Main.dust[num708];
64513 dust2.velocity *= 0.6f;
64514 }
64515 }
64516 else if (type >= 411 && type <= 414)
64517 {
64518 int num709 = 9;
64519 if (type == 412 || type == 414)
64520 {
64521 num709 = 11;
64522 }
64523 if (type == 413)
64524 {
64525 num709 = 19;
64526 }
64527 for (int num710 = 0; num710 < 5; num710++)
64528 {
64529 int num711 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, num709, 0f, velocity.Y / 2f);
64530 Main.dust[num711].noGravity = true;
64531 Dust dust2 = Main.dust[num711];
64532 dust2.velocity -= velocity * 0.5f;
64533 }
64534 }
64535 else if (type == 109)
64536 {
64537 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64538 for (int num712 = 0; num712 < 5; num712++)
64539 {
64540 int num713 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 51, 0f, 0f, 0, default(Color), 0.6f);
64541 Dust dust2 = Main.dust[num713];
64542 dust2.velocity *= 0.6f;
64543 }
64544 }
64545 else if (type == 39)
64546 {
64547 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64548 for (int num714 = 0; num714 < 5; num714++)
64549 {
64550 int num715 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 38);
64551 Dust dust2 = Main.dust[num715];
64552 dust2.velocity *= 0.6f;
64553 }
64554 }
64555 else if (type == 71)
64556 {
64557 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64558 for (int num716 = 0; num716 < 5; num716++)
64559 {
64560 int num717 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 53);
64561 Dust dust2 = Main.dust[num717];
64562 dust2.velocity *= 0.6f;
64563 }
64564 }
64565 else if (type == 179)
64566 {
64567 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64568 for (int num718 = 0; num718 < 5; num718++)
64569 {
64570 int num719 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 149);
64571 Dust dust2 = Main.dust[num719];
64572 dust2.velocity *= 0.6f;
64573 }
64574 }
64575 else if (type == 40)
64576 {
64577 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64578 for (int num720 = 0; num720 < 5; num720++)
64579 {
64580 int num721 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 36);
64581 Dust dust2 = Main.dust[num721];
64582 dust2.velocity *= 0.6f;
64583 }
64584 }
64585 else if (type == 21 || type == 471 || type == 532)
64586 {
64587 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64588 for (int num722 = 0; num722 < 10; num722++)
64589 {
64590 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 26, 0f, 0f, 0, default(Color), 0.8f);
64591 }
64592 }
64593 else if (type == 583)
64594 {
64595 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64596 for (int num723 = 0; num723 < 10; num723++)
64597 {
64598 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 4, 0f, 0f, 100, new Color(20, 250, 20, 240), 0.8f);
64599 }
64600 }
64601 else if (type == 584)
64602 {
64603 SoundEngine.PlaySound(0, (int)position.X, (int)position.Y);
64604 for (int num724 = 0; num724 < 10; num724++)
64605 {
64606 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 4, 0f, 0f, 100, new Color(250, 20, 120, 240), 0.8f);
64607 }
64608 }
64609 else if (type == 24)
64610 {
64611 for (int num725 = 0; num725 < 10; num725++)
64612 {
64613 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 1, velocity.X * 0.1f, velocity.Y * 0.1f, 0, default(Color), 0.75f);
64614 }
64615 }
64616 else if (type == 27)
64617 {
64619 for (int num726 = 0; num726 < 30; num726++)
64620 {
64621 int num727 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 172, velocity.X * 0.1f, velocity.Y * 0.1f, 100);
64622 Main.dust[num727].noGravity = true;
64623 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 172, velocity.X * 0.1f, velocity.Y * 0.1f, 100, default(Color), 0.5f);
64624 }
64625 }
64626 else if (type == 38)
64627 {
64628 for (int num728 = 0; num728 < 10; num728++)
64629 {
64630 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 42, velocity.X * 0.1f, velocity.Y * 0.1f);
64631 }
64632 }
64633 else if (type == 44 || type == 45)
64634 {
64636 for (int num729 = 0; num729 < 30; num729++)
64637 {
64638 int num730 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 27, velocity.X, velocity.Y, 100, default(Color), 1.7f);
64639 Main.dust[num730].noGravity = true;
64640 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 27, velocity.X, velocity.Y, 100);
64641 }
64642 }
64643 else if (type == 41)
64644 {
64646 for (int num731 = 0; num731 < 10; num731++)
64647 {
64648 int num732 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
64649 }
64650 for (int num733 = 0; num733 < 5; num733++)
64651 {
64652 int num734 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
64653 Main.dust[num734].noGravity = true;
64654 Dust dust2 = Main.dust[num734];
64655 dust2.velocity *= 3f;
64656 num734 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
64657 dust2 = Main.dust[num734];
64658 dust2.velocity *= 2f;
64659 }
64660 int num735 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64661 Gore gore2 = Main.gore[num735];
64662 gore2.velocity *= 0.4f;
64663 Main.gore[num735].velocity.X += (float)Main.rand.Next(-10, 11) * 0.1f;
64664 Main.gore[num735].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.1f;
64665 num735 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64666 gore2 = Main.gore[num735];
64667 gore2.velocity *= 0.4f;
64668 Main.gore[num735].velocity.X += (float)Main.rand.Next(-10, 11) * 0.1f;
64669 Main.gore[num735].velocity.Y += (float)Main.rand.Next(-10, 11) * 0.1f;
64670 if (owner == Main.myPlayer)
64671 {
64672 penetrate = -1;
64673 position.X += width / 2;
64674 position.Y += height / 2;
64675 width = 64;
64676 height = 64;
64677 position.X -= width / 2;
64678 position.Y -= height / 2;
64679 Damage();
64680 }
64681 }
64682 else if (type == 514)
64683 {
64685 for (int num736 = 0; num736 < 10; num736++)
64686 {
64687 int num737 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.3f);
64688 Dust dust2 = Main.dust[num737];
64689 dust2.velocity *= 1.4f;
64690 }
64691 for (int num738 = 0; num738 < 6; num738++)
64692 {
64693 int num739 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.1f);
64694 Main.dust[num739].noGravity = true;
64695 Dust dust2 = Main.dust[num739];
64696 dust2.velocity *= 4.6f;
64697 num739 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.3f);
64698 dust2 = Main.dust[num739];
64699 dust2.velocity *= 3.3f;
64700 if (Main.rand.Next(2) == 0)
64701 {
64702 num739 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.1f);
64703 dust2 = Main.dust[num739];
64704 dust2.velocity *= 2.7f;
64705 }
64706 }
64707 if (owner == Main.myPlayer)
64708 {
64709 penetrate = -1;
64710 position.X += width / 2;
64711 position.Y += height / 2;
64712 width = 112;
64713 height = 112;
64714 position.X -= width / 2;
64715 position.Y -= height / 2;
64716 ai[0] = 2f;
64717 Damage();
64718 }
64719 }
64720 else if (type == 306)
64721 {
64722 SoundEngine.PlaySound(3, (int)position.X, (int)position.Y);
64723 for (int num740 = 0; num740 < 20; num740++)
64724 {
64725 int num741 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 184);
64726 Dust dust2 = Main.dust[num741];
64727 dust2.scale *= 1.1f;
64728 Main.dust[num741].noGravity = true;
64729 }
64730 for (int num742 = 0; num742 < 30; num742++)
64731 {
64732 int num743 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 184);
64733 Dust dust2 = Main.dust[num743];
64734 dust2.velocity *= 2.5f;
64735 dust2 = Main.dust[num743];
64736 dust2.scale *= 0.8f;
64737 Main.dust[num743].noGravity = true;
64738 }
64739 if (owner == Main.myPlayer)
64740 {
64741 int num744 = Main.rand.Next(2, 5);
64742 if (Main.rand.Next(1, 101) == 100)
64743 {
64744 num744 = 15;
64745 }
64746 for (int num745 = 0; num745 < num744; num745++)
64747 {
64748 float num746 = (float)Main.rand.Next(-35, 36) * 0.02f;
64749 float num747 = (float)Main.rand.Next(-35, 36) * 0.02f;
64750 num746 *= 10f;
64751 num747 *= 10f;
64752 NewProjectile(GetProjectileSource_FromThis(), position.X, position.Y, num746, num747, 307, (int)((double)damage * 0.75), (int)((double)knockBack * 0.35), Main.myPlayer);
64753 }
64754 }
64755 }
64756 else if (type == 469)
64757 {
64758 if (owner == Main.myPlayer)
64759 {
64760 int num748 = 6;
64761 for (int num749 = 0; num749 < num748; num749++)
64762 {
64763 if (num749 % 2 != 1 || Main.rand.Next(3) == 0)
64764 {
64767 vector61.Normalize();
64768 vector61 *= 8f;
64769 float num750 = (float)Main.rand.Next(-35, 36) * 0.01f;
64770 float num751 = (float)Main.rand.Next(-35, 36) * 0.01f;
64772 num750 += oldVelocity.X / 6f;
64773 num751 += oldVelocity.Y / 6f;
64774 int num752 = NewProjectile(GetProjectileSource_FromThis(), vector60.X, vector60.Y, num750, num751, Main.player[owner].beeType(), Main.player[owner].beeDamage(damage / 3), Main.player[owner].beeKB(0f), Main.myPlayer);
64775 Main.projectile[num752].magic = false;
64776 Main.projectile[num752].ranged = true;
64777 Main.projectile[num752].penetrate = 2;
64778 }
64779 }
64780 }
64781 }
64782 else if (type == 183)
64783 {
64785 for (int num753 = 0; num753 < 20; num753++)
64786 {
64787 int num754 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
64788 Dust dust2 = Main.dust[num754];
64789 dust2.velocity *= 1f;
64790 }
64791 int num755 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64792 Main.gore[num755].velocity.X += 1f;
64793 Main.gore[num755].velocity.Y += 1f;
64794 Gore gore2 = Main.gore[num755];
64795 gore2.velocity *= 0.3f;
64796 num755 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64797 Main.gore[num755].velocity.X -= 1f;
64798 Main.gore[num755].velocity.Y += 1f;
64799 gore2 = Main.gore[num755];
64800 gore2.velocity *= 0.3f;
64801 num755 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64802 Main.gore[num755].velocity.X += 1f;
64803 Main.gore[num755].velocity.Y -= 1f;
64804 gore2 = Main.gore[num755];
64805 gore2.velocity *= 0.3f;
64806 num755 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
64807 Main.gore[num755].velocity.X -= 1f;
64808 Main.gore[num755].velocity.Y -= 1f;
64809 gore2 = Main.gore[num755];
64810 gore2.velocity *= 0.3f;
64811 if (owner == Main.myPlayer)
64812 {
64813 int num756 = Main.rand.Next(15, 25);
64814 for (int num757 = 0; num757 < num756; num757++)
64815 {
64816 float speedX = (float)Main.rand.Next(-35, 36) * 0.02f;
64817 float speedY = (float)Main.rand.Next(-35, 36) * 0.02f;
64818 NewProjectile(GetProjectileSource_FromThis(), position.X, position.Y, speedX, speedY, Main.player[owner].beeType(), Main.player[owner].beeDamage(damage), Main.player[owner].beeKB(0f), Main.myPlayer);
64819 }
64820 }
64821 }
64822 else if (aiStyle == 34)
64823 {
64824 if (owner != Main.myPlayer)
64825 {
64826 timeLeft = 60;
64827 }
64829 if (type == 167)
64830 {
64831 for (int num758 = 0; num758 < 400; num758++)
64832 {
64833 float num759 = 16f;
64834 if (num758 < 300)
64835 {
64836 num759 = 12f;
64837 }
64838 if (num758 < 200)
64839 {
64840 num759 = 8f;
64841 }
64842 if (num758 < 100)
64843 {
64844 num759 = 4f;
64845 }
64846 int num760 = 130;
64847 int num761 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num760, 0f, 0f, 100);
64848 float num762 = Main.dust[num761].velocity.X;
64849 float y2 = Main.dust[num761].velocity.Y;
64850 if (num762 == 0f && y2 == 0f)
64851 {
64852 num762 = 1f;
64853 }
64854 float num763 = (float)Math.Sqrt(num762 * num762 + y2 * y2);
64855 num763 = num759 / num763;
64856 num762 *= num763;
64857 y2 *= num763;
64858 Dust dust2 = Main.dust[num761];
64859 dust2.velocity *= 0.5f;
64860 Main.dust[num761].velocity.X += num762;
64861 Main.dust[num761].velocity.Y += y2;
64862 Main.dust[num761].scale = 1.3f;
64863 Main.dust[num761].noGravity = true;
64864 }
64865 }
64866 if (type == 168)
64867 {
64868 for (int num764 = 0; num764 < 400; num764++)
64869 {
64870 float num765 = 2f * ((float)num764 / 100f);
64871 if (num764 > 100)
64872 {
64873 num765 = 10f;
64874 }
64875 if (num764 > 250)
64876 {
64877 num765 = 13f;
64878 }
64879 int num766 = 131;
64880 int num767 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num766, 0f, 0f, 100);
64881 float num768 = Main.dust[num767].velocity.X;
64882 float y3 = Main.dust[num767].velocity.Y;
64883 if (num768 == 0f && y3 == 0f)
64884 {
64885 num768 = 1f;
64886 }
64887 float num769 = (float)Math.Sqrt(num768 * num768 + y3 * y3);
64888 num769 = num765 / num769;
64889 if (num764 <= 200)
64890 {
64891 num768 *= num769;
64892 y3 *= num769;
64893 }
64894 else
64895 {
64896 num768 = num768 * num769 * 1.25f;
64897 y3 = y3 * num769 * 0.75f;
64898 }
64899 Dust dust2 = Main.dust[num767];
64900 dust2.velocity *= 0.5f;
64901 Main.dust[num767].velocity.X += num768;
64902 Main.dust[num767].velocity.Y += y3;
64903 if (num764 > 100)
64904 {
64905 Main.dust[num767].scale = 1.3f;
64906 Main.dust[num767].noGravity = true;
64907 }
64908 }
64909 }
64910 if (type == 169)
64911 {
64912 Vector2 vector62 = ((float)Main.rand.NextDouble() * ((float)Math.PI * 2f)).ToRotationVector2();
64913 float num770 = Main.rand.Next(5, 9);
64914 float num771 = Main.rand.Next(12, 17);
64915 float value9 = Main.rand.Next(3, 7);
64916 float num772 = 20f;
64917 for (float num773 = 0f; num773 < num770; num773++)
64918 {
64919 for (int num774 = 0; num774 < 2; num774++)
64920 {
64921 Vector2 value10 = vector62.RotatedBy(((num774 == 0) ? 1f : (-1f)) * ((float)Math.PI * 2f) / (num770 * 2f));
64922 for (float num775 = 0f; num775 < num772; num775++)
64923 {
64926 int num777 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, 133, 0f, 0f, 100, default(Color), 1.3f);
64927 Dust dust2 = Main.dust[num777];
64928 dust2.velocity *= 0.1f;
64929 Main.dust[num777].noGravity = true;
64930 dust2 = Main.dust[num777];
64931 dust2.velocity += vector63 * num776;
64932 }
64933 }
64934 vector62 = vector62.RotatedBy((float)Math.PI * 2f / num770);
64935 }
64936 for (float num778 = 0f; num778 < num770; num778++)
64937 {
64938 for (int num779 = 0; num779 < 2; num779++)
64939 {
64940 Vector2 value11 = vector62.RotatedBy(((num779 == 0) ? 1f : (-1f)) * ((float)Math.PI * 2f) / (num770 * 2f));
64941 for (float num780 = 0f; num780 < num772; num780++)
64942 {
64944 float num781 = MathHelper.Lerp(num771, value9, num780 / num772) / 2f;
64945 int num782 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, 133, 0f, 0f, 100, default(Color), 1.3f);
64946 Dust dust2 = Main.dust[num782];
64947 dust2.velocity *= 0.1f;
64948 Main.dust[num782].noGravity = true;
64949 dust2 = Main.dust[num782];
64950 dust2.velocity += vector64 * num781;
64951 }
64952 }
64953 vector62 = vector62.RotatedBy((float)Math.PI * 2f / num770);
64954 }
64955 for (int num783 = 0; num783 < 100; num783++)
64956 {
64957 float num784 = num771;
64958 int num785 = 132;
64959 int num786 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num785, 0f, 0f, 100);
64960 float num787 = Main.dust[num786].velocity.X;
64961 float y4 = Main.dust[num786].velocity.Y;
64962 if (num787 == 0f && y4 == 0f)
64963 {
64964 num787 = 1f;
64965 }
64966 float num788 = (float)Math.Sqrt(num787 * num787 + y4 * y4);
64967 num788 = num784 / num788;
64968 num787 *= num788;
64969 y4 *= num788;
64970 Dust dust2 = Main.dust[num786];
64971 dust2.velocity *= 0.5f;
64972 Main.dust[num786].velocity.X += num787;
64973 Main.dust[num786].velocity.Y += y4;
64974 Main.dust[num786].scale = 1.3f;
64975 Main.dust[num786].noGravity = true;
64976 }
64977 }
64978 if (type == 170)
64979 {
64980 for (int num789 = 0; num789 < 400; num789++)
64981 {
64982 int num790 = 133;
64983 float num791 = 16f;
64984 if (num789 > 100)
64985 {
64986 num791 = 11f;
64987 }
64988 if (num789 > 100)
64989 {
64990 num790 = 134;
64991 }
64992 if (num789 > 200)
64993 {
64994 num791 = 8f;
64995 }
64996 if (num789 > 200)
64997 {
64998 num790 = 133;
64999 }
65000 if (num789 > 300)
65001 {
65002 num791 = 5f;
65003 }
65004 if (num789 > 300)
65005 {
65006 num790 = 134;
65007 }
65008 int num792 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num790, 0f, 0f, 100);
65009 float num793 = Main.dust[num792].velocity.X;
65010 float y5 = Main.dust[num792].velocity.Y;
65011 if (num793 == 0f && y5 == 0f)
65012 {
65013 num793 = 1f;
65014 }
65015 float num794 = (float)Math.Sqrt(num793 * num793 + y5 * y5);
65016 num794 = num791 / num794;
65017 if (num789 > 300)
65018 {
65019 num793 = num793 * num794 * 0.7f;
65020 y5 *= num794;
65021 }
65022 else if (num789 > 200)
65023 {
65024 num793 *= num794;
65025 y5 = y5 * num794 * 0.7f;
65026 }
65027 else if (num789 > 100)
65028 {
65029 num793 = num793 * num794 * 0.7f;
65030 y5 *= num794;
65031 }
65032 else
65033 {
65034 num793 *= num794;
65035 y5 = y5 * num794 * 0.7f;
65036 }
65037 Dust dust2 = Main.dust[num792];
65038 dust2.velocity *= 0.5f;
65039 Main.dust[num792].velocity.X += num793;
65040 Main.dust[num792].velocity.Y += y5;
65041 if (Main.rand.Next(3) != 0)
65042 {
65043 Main.dust[num792].scale = 1.3f;
65044 Main.dust[num792].noGravity = true;
65045 }
65046 }
65047 }
65048 if (type == 415)
65049 {
65050 Vector2 vector65 = (vector65 = ((float)Main.rand.NextDouble() * ((float)Math.PI * 2f)).ToRotationVector2());
65051 float num795 = Main.rand.Next(5, 9);
65052 float num796 = (float)Main.rand.Next(10, 15) * 0.66f;
65053 float num797 = (float)Main.rand.Next(4, 7) / 2f;
65054 int num798 = 30;
65055 for (int num799 = 0; (float)num799 < (float)num798 * num795; num799++)
65056 {
65057 if (num799 % num798 == 0)
65058 {
65059 vector65 = vector65.RotatedBy((float)Math.PI * 2f / num795);
65060 }
65061 float num800 = MathHelper.Lerp(num797, num796, (float)(num799 % num798) / (float)num798);
65062 int num801 = 130;
65063 int num802 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num801, 0f, 0f, 100);
65064 Dust dust2 = Main.dust[num802];
65065 dust2.velocity *= 0.1f;
65066 dust2 = Main.dust[num802];
65067 dust2.velocity += vector65 * num800;
65068 Main.dust[num802].scale = 1.3f;
65069 Main.dust[num802].noGravity = true;
65070 }
65071 for (int num803 = 0; num803 < 100; num803++)
65072 {
65073 float num804 = num796;
65074 if (num803 < 30)
65075 {
65076 num804 = (num797 + num796) / 2f;
65077 }
65078 int num805 = 130;
65079 int num806 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num805, 0f, 0f, 100);
65080 float num807 = Main.dust[num806].velocity.X;
65081 float y6 = Main.dust[num806].velocity.Y;
65082 if (num807 == 0f && y6 == 0f)
65083 {
65084 num807 = 1f;
65085 }
65086 float num808 = (float)Math.Sqrt(num807 * num807 + y6 * y6);
65087 num808 = num804 / num808;
65088 num807 *= num808;
65089 y6 *= num808;
65090 Dust dust2 = Main.dust[num806];
65091 dust2.velocity *= 0.5f;
65092 Main.dust[num806].velocity.X += num807;
65093 Main.dust[num806].velocity.Y += y6;
65094 Main.dust[num806].scale = 1.3f;
65095 Main.dust[num806].noGravity = true;
65096 }
65097 }
65098 if (type == 416)
65099 {
65100 Vector2 vector66 = ((float)Main.rand.NextDouble() * ((float)Math.PI * 2f)).ToRotationVector2();
65102 float num809 = Main.rand.Next(3, 6) * 2;
65103 int num810 = 20;
65104 float num811 = ((Main.rand.Next(2) == 0) ? 1f : (-1f));
65105 bool flag3 = true;
65106 for (int num812 = 0; (float)num812 < (float)num810 * num809; num812++)
65107 {
65108 if (num812 % num810 == 0)
65109 {
65110 vector67 = vector67.RotatedBy(num811 * ((float)Math.PI * 2f / num809));
65112 flag3 = !flag3;
65113 }
65114 else
65115 {
65116 float num813 = (float)Math.PI * 2f / ((float)num810 * num809);
65117 vector66 = vector66.RotatedBy(num813 * num811 * 3f);
65118 }
65119 float num814 = MathHelper.Lerp(1f, 8f, (float)(num812 % num810) / (float)num810);
65120 int num815 = 131;
65121 int num816 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num815, 0f, 0f, 100, default(Color), 1.4f);
65122 Dust dust2 = Main.dust[num816];
65123 dust2.velocity *= 0.1f;
65124 dust2 = Main.dust[num816];
65125 dust2.velocity += vector66 * num814;
65126 if (flag3)
65127 {
65128 Main.dust[num816].scale = 0.9f;
65129 }
65130 Main.dust[num816].noGravity = true;
65131 }
65132 }
65133 if (type == 417)
65134 {
65135 float num817 = (float)Main.rand.NextDouble() * ((float)Math.PI * 2f);
65136 float num818 = (float)Main.rand.NextDouble() * ((float)Math.PI * 2f);
65137 float num819 = 4f + (float)Main.rand.NextDouble() * 3f;
65138 float num820 = 4f + (float)Main.rand.NextDouble() * 3f;
65139 float num821 = num819;
65140 if (num820 > num821)
65141 {
65142 num821 = num820;
65143 }
65144 for (int num822 = 0; num822 < 150; num822++)
65145 {
65146 int num823 = 132;
65147 float num824 = num821;
65148 if (num822 > 50)
65149 {
65150 num824 = num820;
65151 }
65152 if (num822 > 50)
65153 {
65154 num823 = 133;
65155 }
65156 if (num822 > 100)
65157 {
65158 num824 = num819;
65159 }
65160 if (num822 > 100)
65161 {
65162 num823 = 132;
65163 }
65164 int num825 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num823, 0f, 0f, 100);
65165 Vector2 vector68 = Main.dust[num825].velocity;
65166 vector68.Normalize();
65167 vector68 *= num824;
65168 if (num822 > 100)
65169 {
65170 vector68.X *= 0.5f;
65171 vector68 = vector68.RotatedBy(num817);
65172 }
65173 else if (num822 > 50)
65174 {
65175 vector68.Y *= 0.5f;
65176 vector68 = vector68.RotatedBy(num818);
65177 }
65178 Dust dust2 = Main.dust[num825];
65179 dust2.velocity *= 0.2f;
65180 dust2 = Main.dust[num825];
65181 dust2.velocity += vector68;
65182 if (num822 <= 200)
65183 {
65184 Main.dust[num825].scale = 1.3f;
65185 Main.dust[num825].noGravity = true;
65186 }
65187 }
65188 }
65189 if (type == 418)
65190 {
65191 Vector2 vector69 = ((float)Main.rand.NextDouble() * ((float)Math.PI * 2f)).ToRotationVector2();
65192 float num826 = Main.rand.Next(5, 12);
65193 float num827 = (float)Main.rand.Next(9, 14) * 0.66f;
65194 float num828 = (float)Main.rand.Next(2, 4) * 0.66f;
65195 float num829 = 15f;
65196 for (float num830 = 0f; num830 < num826; num830++)
65197 {
65198 for (int num831 = 0; num831 < 2; num831++)
65199 {
65200 Vector2 value12 = vector69.RotatedBy(((num831 == 0) ? 1f : (-1f)) * ((float)Math.PI * 2f) / (num826 * 2f));
65201 for (float num832 = 0f; num832 < num829; num832++)
65202 {
65205 int num834 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, 134, 0f, 0f, 100, default(Color), 1.3f);
65206 Dust dust2 = Main.dust[num834];
65207 dust2.velocity *= 0.1f;
65208 Main.dust[num834].noGravity = true;
65209 dust2 = Main.dust[num834];
65210 dust2.velocity += vector70 * num833;
65211 }
65212 }
65213 vector69 = vector69.RotatedBy((float)Math.PI * 2f / num826);
65214 }
65215 for (int num835 = 0; num835 < 120; num835++)
65216 {
65217 float num836 = num827;
65218 int num837 = 133;
65219 if (num835 < 80)
65220 {
65221 num836 = num828 - 0.5f;
65222 }
65223 else
65224 {
65225 num837 = 131;
65226 }
65227 int num838 = Dust.NewDust(new Vector2(position.X, position.Y), 6, 6, num837, 0f, 0f, 100);
65228 float num839 = Main.dust[num838].velocity.X;
65229 float y7 = Main.dust[num838].velocity.Y;
65230 if (num839 == 0f && y7 == 0f)
65231 {
65232 num839 = 1f;
65233 }
65234 float num840 = (float)Math.Sqrt(num839 * num839 + y7 * y7);
65235 num840 = num836 / num840;
65236 num839 *= num840;
65237 y7 *= num840;
65238 Dust dust2 = Main.dust[num838];
65239 dust2.velocity *= 0.2f;
65240 Main.dust[num838].velocity.X += num839;
65241 Main.dust[num838].velocity.Y += y7;
65242 Main.dust[num838].scale = 1.3f;
65243 Main.dust[num838].noGravity = true;
65244 }
65245 }
65246 position.X += width / 2;
65247 position.Y += height / 2;
65248 width = 192;
65249 height = 192;
65250 position.X -= width / 2;
65251 position.Y -= height / 2;
65252 penetrate = -1;
65253 Damage();
65254 }
65255 else if (type == 312)
65256 {
65258 position.X += width / 2;
65259 position.Y += height / 2;
65260 width = 22;
65261 height = 22;
65262 position.X -= width / 2;
65263 position.Y -= height / 2;
65264 for (int num841 = 0; num841 < 30; num841++)
65265 {
65266 int num842 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
65267 Dust dust2 = Main.dust[num842];
65268 dust2.velocity *= 1.4f;
65269 }
65270 for (int num843 = 0; num843 < 20; num843++)
65271 {
65272 int num844 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 3.5f);
65273 Main.dust[num844].noGravity = true;
65274 Dust dust2 = Main.dust[num844];
65275 dust2.velocity *= 7f;
65276 num844 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
65277 dust2 = Main.dust[num844];
65278 dust2.velocity *= 3f;
65279 }
65280 for (int num845 = 0; num845 < 2; num845++)
65281 {
65282 float num846 = 0.4f;
65283 if (num845 == 1)
65284 {
65285 num846 = 0.8f;
65286 }
65287 int num847 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65288 Gore gore2 = Main.gore[num847];
65289 gore2.velocity *= num846;
65290 Main.gore[num847].velocity.X += 1f;
65291 Main.gore[num847].velocity.Y += 1f;
65292 num847 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65293 gore2 = Main.gore[num847];
65294 gore2.velocity *= num846;
65295 Main.gore[num847].velocity.X -= 1f;
65296 Main.gore[num847].velocity.Y += 1f;
65297 num847 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65298 gore2 = Main.gore[num847];
65299 gore2.velocity *= num846;
65300 Main.gore[num847].velocity.X += 1f;
65301 Main.gore[num847].velocity.Y -= 1f;
65302 num847 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65303 gore2 = Main.gore[num847];
65304 gore2.velocity *= num846;
65305 Main.gore[num847].velocity.X -= 1f;
65306 Main.gore[num847].velocity.Y -= 1f;
65307 }
65308 position.X += width / 2;
65309 position.Y += height / 2;
65310 width = 128;
65311 height = 128;
65312 position.X -= width / 2;
65313 position.Y -= height / 2;
65314 Damage();
65315 }
65316 else if (type == 910 || type == 911)
65317 {
65318 Resize(22, 22);
65321 int num848 = 0;
65322 for (int num849 = 0; num849 < 30; num849++)
65323 {
65324 Dust dust51 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent2, 1.5f);
65325 Dust dust2 = dust51;
65326 dust2.velocity *= 1.4f;
65327 }
65328 for (int num850 = 0; num850 < 80; num850++)
65329 {
65330 Dust dust52 = Dust.NewDustDirect(position, width, height, num848, 0f, 0f, 100, transparent2, 2.2f);
65331 dust52.noGravity = true;
65332 dust52.velocity.Y -= 1.2f;
65333 Dust dust2 = dust52;
65334 dust2.velocity *= 4f;
65335 dust52 = Dust.NewDustDirect(position, width, height, num848, 0f, 0f, 100, transparent2, 1.3f);
65336 dust52.velocity.Y -= 1.2f;
65337 dust2 = dust52;
65338 dust2.velocity *= 2f;
65339 }
65340 for (int num851 = 1; num851 <= 2; num851++)
65341 {
65342 for (int num852 = -1; num852 <= 1; num852 += 2)
65343 {
65344 for (int num853 = -1; num853 <= 1; num853 += 2)
65345 {
65346 Gore gore6 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65347 Gore gore2 = gore6;
65348 gore2.velocity *= ((num851 == 1) ? 0.4f : 0.8f);
65349 gore2 = gore6;
65350 gore2.velocity += new Vector2(num852, num853);
65351 }
65352 }
65353 }
65354 if (Main.netMode != 1)
65355 {
65356 Point pt = base.Center.ToTileCoordinates();
65358 }
65359 }
65360 else if (type == 784 || type == 785 || type == 786 || type == 805 || type == 903)
65361 {
65362 Resize(22, 22);
65363 if (type == 785)
65364 {
65366 }
65367 else
65368 {
65370 }
65372 int num854 = Dust.dustWater();
65373 for (int num855 = 0; num855 < 30; num855++)
65374 {
65375 Dust dust53 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent3, 1.5f);
65376 Dust dust2 = dust53;
65377 dust2.velocity *= 1.4f;
65378 }
65379 for (int num856 = 0; num856 < 80; num856++)
65380 {
65381 Dust dust54 = Dust.NewDustDirect(position, width, height, num854, 0f, 0f, 100, transparent3, 2.2f);
65382 dust54.noGravity = true;
65383 dust54.velocity.Y -= 1.2f;
65384 Dust dust2 = dust54;
65385 dust2.velocity *= 7f;
65386 dust54 = Dust.NewDustDirect(position, width, height, num854, 0f, 0f, 100, transparent3, 1.3f);
65387 dust54.velocity.Y -= 1.2f;
65388 dust2 = dust54;
65389 dust2.velocity *= 4f;
65390 }
65391 for (int num857 = 1; num857 <= 2; num857++)
65392 {
65393 for (int num858 = -1; num858 <= 1; num858 += 2)
65394 {
65395 for (int num859 = -1; num859 <= 1; num859 += 2)
65396 {
65397 Gore gore7 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65398 Gore gore2 = gore7;
65399 gore2.velocity *= ((num857 == 1) ? 0.4f : 0.8f);
65400 gore2 = gore7;
65401 gore2.velocity += new Vector2(num858, num859);
65402 }
65403 }
65404 }
65405 if (Main.netMode != 1)
65406 {
65407 Point pt2 = base.Center.ToTileCoordinates();
65409 }
65410 }
65411 else if (type == 787 || type == 788 || type == 789 || type == 806 || type == 904)
65412 {
65413 Resize(22, 22);
65414 if (type == 788)
65415 {
65417 }
65418 else
65419 {
65421 }
65423 int num860 = 35;
65424 for (int num861 = 0; num861 < 30; num861++)
65425 {
65426 Dust dust55 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent4, 1.5f);
65427 Dust dust2 = dust55;
65428 dust2.velocity *= 1.4f;
65429 }
65430 for (int num862 = 0; num862 < 80; num862++)
65431 {
65432 Dust dust56 = Dust.NewDustDirect(position, width, height, num860, 0f, 0f, 100, transparent4, 1.2f);
65433 Dust dust2 = dust56;
65434 dust2.velocity *= 7f;
65435 dust56 = Dust.NewDustDirect(position, width, height, num860, 0f, 0f, 100, transparent4, 0.3f);
65436 dust2 = dust56;
65437 dust2.velocity *= 4f;
65438 }
65439 for (int num863 = 1; num863 <= 2; num863++)
65440 {
65441 for (int num864 = -1; num864 <= 1; num864 += 2)
65442 {
65443 for (int num865 = -1; num865 <= 1; num865 += 2)
65444 {
65445 Gore gore8 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65446 Gore gore2 = gore8;
65447 gore2.velocity *= ((num863 == 1) ? 0.4f : 0.8f);
65448 gore2 = gore8;
65449 gore2.velocity += new Vector2(num864, num865);
65450 }
65451 }
65452 }
65453 if (Main.netMode != 1)
65454 {
65455 Point pt3 = base.Center.ToTileCoordinates();
65457 }
65458 }
65459 else if (type == 790 || type == 791 || type == 792 || type == 807 || type == 905)
65460 {
65461 Resize(22, 22);
65462 if (type == 791)
65463 {
65465 }
65466 else
65467 {
65469 }
65471 int num866 = 152;
65472 for (int num867 = 0; num867 < 30; num867++)
65473 {
65474 Dust dust57 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent5, 1.5f);
65475 Dust dust2 = dust57;
65476 dust2.velocity *= 1.4f;
65477 }
65478 for (int num868 = 0; num868 < 80; num868++)
65479 {
65480 Dust dust58 = Dust.NewDustDirect(position, width, height, num866, 0f, 0f, 100, transparent5, 2.2f);
65481 Dust dust2 = dust58;
65482 dust2.velocity *= 7f;
65483 dust58 = Dust.NewDustDirect(position, width, height, num866, 0f, 0f, 100, transparent5, 1.3f);
65484 dust2 = dust58;
65485 dust2.velocity *= 4f;
65486 }
65487 for (int num869 = 1; num869 <= 2; num869++)
65488 {
65489 for (int num870 = -1; num870 <= 1; num870 += 2)
65490 {
65491 for (int num871 = -1; num871 <= 1; num871 += 2)
65492 {
65493 Gore gore9 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65494 Gore gore2 = gore9;
65495 gore2.velocity *= ((num869 == 1) ? 0.4f : 0.8f);
65496 gore2 = gore9;
65497 gore2.velocity += new Vector2(num870, num871);
65498 }
65499 }
65500 }
65501 if (Main.netMode != 1)
65502 {
65503 Point pt4 = base.Center.ToTileCoordinates();
65505 }
65506 }
65507 else if (type == 799 || type == 800 || type == 801 || type == 810 || type == 906)
65508 {
65509 Resize(22, 22);
65510 if (type == 800)
65511 {
65513 }
65514 else
65515 {
65517 }
65519 int num872 = 31;
65520 for (int num873 = 0; num873 < 30; num873++)
65521 {
65522 Dust dust59 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent6, 1.5f);
65523 Dust dust2 = dust59;
65524 dust2.velocity *= 1.4f;
65525 }
65526 for (int num874 = 0; num874 < 80; num874++)
65527 {
65528 Dust dust60 = Dust.NewDustDirect(position, width, height, num872, 0f, 0f, 100, transparent6, 1.2f);
65529 Dust dust2 = dust60;
65530 dust2.velocity *= 7f;
65531 dust60 = Dust.NewDustDirect(position, width, height, num872, 0f, 0f, 100, transparent6, 0.3f);
65532 dust2 = dust60;
65533 dust2.velocity *= 4f;
65534 }
65535 for (int num875 = 1; num875 <= 2; num875++)
65536 {
65537 for (int num876 = -1; num876 <= 1; num876 += 2)
65538 {
65539 for (int num877 = -1; num877 <= 1; num877 += 2)
65540 {
65541 Gore gore10 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65542 Gore gore2 = gore10;
65543 gore2.velocity *= ((num875 == 1) ? 0.4f : 0.8f);
65544 gore2 = gore10;
65545 gore2.velocity += new Vector2(num876, num877);
65546 }
65547 }
65548 }
65549 if (Main.netMode != 1)
65550 {
65551 Point pt5 = base.Center.ToTileCoordinates();
65553 }
65554 }
65555 else if (type == 793 || type == 796 || type == 794 || type == 797 || type == 795 || type == 798 || type == 808 || type == 809)
65556 {
65557 if (type == 794 || type == 797)
65558 {
65560 }
65561 else
65562 {
65564 }
65565 Resize(50, 50);
65566 float num878 = 3f;
65567 for (int num879 = 0; num879 < 50; num879++)
65568 {
65569 Dust dust61 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, default(Color), 2f);
65570 dust61.velocity = (dust61.position - base.Center).SafeNormalize(Vector2.Zero);
65571 Dust dust2 = dust61;
65572 dust2.velocity *= 2f + (float)Main.rand.Next(5) * 0.1f;
65573 dust61.velocity.Y -= num878 * 0.5f;
65574 dust61.color = Color.Black * 0.9f;
65575 if (Main.rand.Next(2) == 0)
65576 {
65577 dust61.scale = 0.5f;
65578 dust61.fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
65579 dust61.color = Color.Black * 0.8f;
65580 }
65581 }
65582 for (int num880 = 0; num880 < 30; num880++)
65583 {
65584 Dust dust62 = Dust.NewDustDirect(position, width, height, 6, 0f, 0f, 100);
65585 dust62.noGravity = true;
65586 dust62.fadeIn = 1.4f;
65587 dust62.velocity = (dust62.position - base.Center).SafeNormalize(Vector2.Zero);
65588 Dust dust2 = dust62;
65589 dust2.velocity *= 5.5f + (float)Main.rand.Next(61) * 0.1f;
65590 dust62.velocity.Y -= num878 * 0.5f;
65591 dust62 = Dust.NewDustDirect(position, width, height, 6, 0f, 0f, 100);
65592 dust62.velocity = (dust62.position - base.Center).SafeNormalize(Vector2.Zero);
65593 dust62.velocity.Y -= num878 * 0.25f;
65594 dust2 = dust62;
65595 dust2.velocity *= 1.5f + (float)Main.rand.Next(5) * 0.1f;
65596 dust62.fadeIn = 0f;
65597 dust62.scale = 0.6f;
65598 dust62 = Dust.NewDustDirect(position, width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
65599 dust62.noGravity = num880 % 2 == 0;
65600 dust62.velocity = (dust62.position - base.Center).SafeNormalize(Vector2.Zero);
65601 dust2 = dust62;
65602 dust2.velocity *= 3f + (float)Main.rand.Next(21) * 0.2f;
65603 dust62.velocity.Y -= num878 * 0.5f;
65604 dust62.fadeIn = 1.2f;
65605 if (!dust62.noGravity)
65606 {
65607 dust62.scale = 0.4f;
65608 dust62.fadeIn = 0f;
65609 }
65610 else
65611 {
65612 dust2 = dust62;
65613 dust2.velocity *= 2f + (float)Main.rand.Next(5) * 0.2f;
65614 dust62.velocity.Y -= num878 * 0.5f;
65615 }
65616 }
65617 int num881 = 0;
65618 for (int num882 = 1; num882 <= 3; num882++)
65619 {
65620 float num883 = (float)Math.PI * 2f * Main.rand.NextFloat();
65621 for (float num884 = 0f; num884 < 1f; num884 += 1f / 11f)
65622 {
65623 float f4 = (float)Math.PI * 2f * num884 + num883;
65624 Vector2 spinningpoint2 = f4.ToRotationVector2();
65625 spinningpoint2 *= new Vector2(1f, 0.4f);
65626 spinningpoint2 = spinningpoint2.RotatedBy((float)num881 - (float)Math.PI);
65627 Vector2 vector71 = ((float)num881 - (float)Math.PI / 2f).ToRotationVector2();
65628 Vector2 vector72 = base.Center + vector71 * 16f * 0f;
65629 Dust dust63 = Dust.NewDustPerfect(vector72, 6, spinningpoint2);
65630 dust63.fadeIn = 1.8f;
65631 dust63.noGravity = true;
65632 Dust dust2 = dust63;
65633 dust2.velocity *= (float)num882 * (Main.rand.NextFloat() * 2f + 0.2f);
65634 dust2 = dust63;
65635 dust2.velocity += vector71 * 0.8f * num882;
65636 dust2 = dust63;
65637 dust2.velocity *= 2f;
65638 }
65639 }
65640 for (int num885 = 1; num885 <= 3; num885++)
65641 {
65642 for (int num886 = -1; num886 <= 1; num886 += 2)
65643 {
65644 for (int num887 = -1; num887 <= 1; num887 += 2)
65645 {
65646 Gore gore11 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65647 Gore gore2 = gore11;
65648 gore2.velocity *= (float)num885 / 3f;
65649 gore2 = gore11;
65650 gore2.velocity += new Vector2(num886, num887);
65651 }
65652 }
65653 }
65654 Resize(10, 10);
65655 }
65656 else if (type == 779 || type == 783 || type == 862 || type == 863)
65657 {
65658 Resize(22, 22);
65661 for (int num888 = 0; num888 < 15; num888++)
65662 {
65663 Dust dust64 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent7, 0.8f);
65664 dust64.fadeIn = 0f;
65665 Dust dust2 = dust64;
65666 dust2.velocity *= 0.5f;
65667 }
65668 for (int num889 = 0; num889 < 5; num889++)
65669 {
65670 Dust dust65 = Dust.NewDustDirect(position, width, height, 228, 0f, 0f, 100, transparent7, 2.5f);
65671 dust65.noGravity = true;
65672 Dust dust2 = dust65;
65673 dust2.velocity *= 2.5f;
65674 dust65 = Dust.NewDustDirect(position, width, height, 228, 0f, 0f, 100, transparent7, 1.1f);
65675 dust2 = dust65;
65676 dust2.velocity *= 2f;
65677 dust65.noGravity = true;
65678 }
65679 for (int num890 = 0; num890 < 3; num890++)
65680 {
65681 Dust dust66 = Dust.NewDustDirect(position, width, height, 226, 0f, 0f, 100, transparent7, 1.1f);
65682 Dust dust2 = dust66;
65683 dust2.velocity *= 2f;
65684 dust66.noGravity = true;
65685 }
65686 for (int num891 = -1; num891 <= 1; num891 += 2)
65687 {
65688 for (int num892 = -1; num892 <= 1; num892 += 2)
65689 {
65690 if (Main.rand.Next(5) == 0)
65691 {
65692 Gore gore12 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65693 Gore gore2 = gore12;
65694 gore2.velocity *= 0.2f;
65695 gore2 = gore12;
65696 gore2.scale *= 0.65f;
65697 gore2 = gore12;
65698 gore2.velocity += new Vector2(num891, num892) * 0.5f;
65699 }
65700 }
65701 }
65702 }
65703 else if (type == 776 || type == 780 || type == 777 || type == 781 || type == 778 || type == 782 || type == 803 || type == 804)
65704 {
65705 Resize(22, 22);
65706 if (type == 777 || type == 781)
65707 {
65709 }
65710 else
65711 {
65713 }
65715 for (int num893 = 0; num893 < 30; num893++)
65716 {
65717 Dust dust67 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, transparent8, 1.5f);
65718 Dust dust2 = dust67;
65719 dust2.velocity *= 1.4f;
65720 }
65721 for (int num894 = 0; num894 < 40; num894++)
65722 {
65723 Dust dust68 = Dust.NewDustDirect(position, width, height, 228, 0f, 0f, 100, transparent8, 3.5f);
65724 dust68.noGravity = true;
65725 Dust dust2 = dust68;
65726 dust2.velocity *= 7f;
65727 dust68 = Dust.NewDustDirect(position, width, height, 228, 0f, 0f, 100, transparent8, 1.3f);
65728 dust2 = dust68;
65729 dust2.velocity *= 4f;
65730 dust68.noGravity = true;
65731 }
65732 for (int num895 = 0; num895 < 8; num895++)
65733 {
65734 Dust dust69 = Dust.NewDustDirect(position, width, height, 226, 0f, 0f, 100, transparent8, 1.3f);
65735 Dust dust2 = dust69;
65736 dust2.velocity *= 4f;
65737 dust69.noGravity = true;
65738 }
65739 for (int num896 = 2; num896 <= 2; num896++)
65740 {
65741 for (int num897 = -1; num897 <= 1; num897 += 2)
65742 {
65743 for (int num898 = -1; num898 <= 1; num898 += 2)
65744 {
65745 Gore gore13 = Gore.NewGoreDirect(position, Vector2.Zero, Main.rand.Next(61, 64));
65746 Gore gore2 = gore13;
65747 gore2.velocity *= ((num896 == 1) ? 0.4f : 0.8f);
65748 gore2 = gore13;
65749 gore2.velocity += new Vector2(num897, num898);
65750 }
65751 }
65752 }
65753 if (owner == Main.myPlayer)
65754 {
65755 int num899 = 779;
65756 if (type == 780 || type == 781 || type == 782)
65757 {
65758 num899 = 783;
65759 }
65760 if (type == 803)
65761 {
65762 num899 = 862;
65763 }
65764 if (type == 804)
65765 {
65766 num899 = 863;
65767 }
65768 float num900 = Main.rand.NextFloat() * ((float)Math.PI * 2f);
65769 for (float num901 = 0f; num901 < 1f; num901 += 1f / 6f)
65770 {
65771 float f5 = num900 + num901 * ((float)Math.PI * 2f);
65772 Vector2 vector73 = f5.ToRotationVector2() * (4f + Main.rand.NextFloat() * 2f);
65773 vector73 += Vector2.UnitY * -1f;
65775 Projectile projectile = Main.projectile[num902];
65776 Projectile projectile2 = projectile;
65777 projectile2.timeLeft -= Main.rand.Next(30);
65778 }
65779 }
65780 }
65781 else if (type == 133 || type == 134 || type == 135 || type == 136 || type == 137 || type == 138 || type == 303 || type == 338 || type == 339 || type == 930)
65782 {
65783 if (type == 30 || type == 133 || type == 136)
65784 {
65786 }
65787 else
65788 {
65790 }
65791 position.X += width / 2;
65792 position.Y += height / 2;
65793 width = 22;
65794 height = 22;
65795 position.X -= width / 2;
65796 position.Y -= height / 2;
65797 for (int num903 = 0; num903 < 30; num903++)
65798 {
65799 int num904 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
65800 Dust dust2 = Main.dust[num904];
65801 dust2.velocity *= 1.4f;
65802 }
65803 for (int num905 = 0; num905 < 20; num905++)
65804 {
65805 int num906 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 3.5f);
65806 Main.dust[num906].noGravity = true;
65807 Dust dust2 = Main.dust[num906];
65808 dust2.velocity *= 7f;
65809 num906 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
65810 dust2 = Main.dust[num906];
65811 dust2.velocity *= 3f;
65812 }
65813 for (int num907 = 0; num907 < 2; num907++)
65814 {
65815 float num908 = 0.4f;
65816 if (num907 == 1)
65817 {
65818 num908 = 0.8f;
65819 }
65820 int num909 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65821 Gore gore2 = Main.gore[num909];
65822 gore2.velocity *= num908;
65823 Main.gore[num909].velocity.X += 1f;
65824 Main.gore[num909].velocity.Y += 1f;
65825 num909 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65826 gore2 = Main.gore[num909];
65827 gore2.velocity *= num908;
65828 Main.gore[num909].velocity.X -= 1f;
65829 Main.gore[num909].velocity.Y += 1f;
65830 num909 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65831 gore2 = Main.gore[num909];
65832 gore2.velocity *= num908;
65833 Main.gore[num909].velocity.X += 1f;
65834 Main.gore[num909].velocity.Y -= 1f;
65835 num909 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65836 gore2 = Main.gore[num909];
65837 gore2.velocity *= num908;
65838 Main.gore[num909].velocity.X -= 1f;
65839 Main.gore[num909].velocity.Y -= 1f;
65840 }
65841 }
65842 else if (type == 139 || type == 140 || type == 141 || type == 142 || type == 143 || type == 144 || type == 340 || type == 341)
65843 {
65844 if (type == 139)
65845 {
65847 }
65848 else
65849 {
65851 }
65852 position.X += width / 2;
65853 position.Y += height / 2;
65854 width = 80;
65855 height = 80;
65856 position.X -= width / 2;
65857 position.Y -= height / 2;
65858 for (int num910 = 0; num910 < 40; num910++)
65859 {
65860 int num911 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 2f);
65861 Dust dust2 = Main.dust[num911];
65862 dust2.velocity *= 3f;
65863 if (Main.rand.Next(2) == 0)
65864 {
65865 Main.dust[num911].scale = 0.5f;
65866 Main.dust[num911].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
65867 }
65868 }
65869 for (int num912 = 0; num912 < 70; num912++)
65870 {
65871 int num913 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 3f);
65872 Main.dust[num913].noGravity = true;
65873 Dust dust2 = Main.dust[num913];
65874 dust2.velocity *= 5f;
65875 num913 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2f);
65876 dust2 = Main.dust[num913];
65877 dust2.velocity *= 2f;
65878 }
65879 for (int num914 = 0; num914 < 3; num914++)
65880 {
65881 float num915 = 0.33f;
65882 if (num914 == 1)
65883 {
65884 num915 = 0.66f;
65885 }
65886 if (num914 == 2)
65887 {
65888 num915 = 1f;
65889 }
65890 int num916 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
65891 Gore gore2 = Main.gore[num916];
65892 gore2.velocity *= num915;
65893 Main.gore[num916].velocity.X += 1f;
65894 Main.gore[num916].velocity.Y += 1f;
65895 num916 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
65896 gore2 = Main.gore[num916];
65897 gore2.velocity *= num915;
65898 Main.gore[num916].velocity.X -= 1f;
65899 Main.gore[num916].velocity.Y += 1f;
65900 num916 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
65901 gore2 = Main.gore[num916];
65902 gore2.velocity *= num915;
65903 Main.gore[num916].velocity.X += 1f;
65904 Main.gore[num916].velocity.Y -= 1f;
65905 num916 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
65906 gore2 = Main.gore[num916];
65907 gore2.velocity *= num915;
65908 Main.gore[num916].velocity.X -= 1f;
65909 Main.gore[num916].velocity.Y -= 1f;
65910 }
65911 position.X += width / 2;
65912 position.Y += height / 2;
65913 width = 10;
65914 height = 10;
65915 position.X -= width / 2;
65916 position.Y -= height / 2;
65917 }
65918 else if (type == 246)
65919 {
65921 for (int num917 = 0; num917 < 10; num917++)
65922 {
65923 int num918 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
65924 Dust dust2 = Main.dust[num918];
65925 dust2.velocity *= 0.9f;
65926 }
65927 for (int num919 = 0; num919 < 5; num919++)
65928 {
65929 int num920 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
65930 Main.dust[num920].noGravity = true;
65931 Dust dust2 = Main.dust[num920];
65932 dust2.velocity *= 3f;
65933 num920 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
65934 dust2 = Main.dust[num920];
65935 dust2.velocity *= 2f;
65936 }
65937 int num921 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65938 Gore gore2 = Main.gore[num921];
65939 gore2.velocity *= 0.3f;
65940 Main.gore[num921].velocity.X += Main.rand.Next(-1, 2);
65941 Main.gore[num921].velocity.Y += Main.rand.Next(-1, 2);
65942 position.X += width / 2;
65943 position.Y += height / 2;
65944 width = 150;
65945 height = 150;
65946 position.X -= width / 2;
65947 position.Y -= height / 2;
65948 penetrate = -1;
65949 maxPenetrate = 0;
65950 Damage();
65951 if (owner == Main.myPlayer)
65952 {
65953 int num922 = Main.rand.Next(2, 6);
65954 for (int num923 = 0; num923 < num922; num923++)
65955 {
65956 float num924 = Main.rand.Next(-100, 101);
65957 num924 += 0.01f;
65958 float num925 = Main.rand.Next(-100, 101);
65959 num924 -= 0.01f;
65960 float num926 = (float)Math.Sqrt(num924 * num924 + num925 * num925);
65961 num926 = 8f / num926;
65962 num924 *= num926;
65963 num925 *= num926;
65965 Main.projectile[num927].maxPenetrate = 0;
65966 }
65967 }
65968 }
65969 else if (type == 249)
65970 {
65972 for (int num928 = 0; num928 < 7; num928++)
65973 {
65974 int num929 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
65975 Dust dust2 = Main.dust[num929];
65976 dust2.velocity *= 0.8f;
65977 }
65978 for (int num930 = 0; num930 < 2; num930++)
65979 {
65980 int num931 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2.5f);
65981 Main.dust[num931].noGravity = true;
65982 Dust dust2 = Main.dust[num931];
65983 dust2.velocity *= 2.5f;
65984 num931 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 1.5f);
65985 dust2 = Main.dust[num931];
65986 dust2.velocity *= 1.5f;
65987 }
65988 int num932 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(61, 64));
65989 Gore gore2 = Main.gore[num932];
65990 gore2.velocity *= 0.2f;
65991 Main.gore[num932].velocity.X += Main.rand.Next(-1, 2);
65992 Main.gore[num932].velocity.Y += Main.rand.Next(-1, 2);
65993 position.X += width / 2;
65994 position.Y += height / 2;
65995 width = 100;
65996 height = 100;
65997 position.X -= width / 2;
65998 position.Y -= height / 2;
65999 penetrate = -1;
66000 Damage();
66001 }
66002 else if (type == 588)
66003 {
66005 position = base.Center;
66006 width = (height = 22);
66007 base.Center = position;
66008 for (int num933 = 0; num933 < 8; num933++)
66009 {
66010 int num934 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 219 + Main.rand.Next(5));
66011 Dust dust2 = Main.dust[num934];
66012 dust2.velocity *= 1.4f;
66013 Main.dust[num934].fadeIn = 1f;
66014 Main.dust[num934].noGravity = true;
66015 }
66016 for (int num935 = 0; num935 < 15; num935++)
66017 {
66018 int num936 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 139 + Main.rand.Next(4), 0f, 0f, 0, default(Color), 1.6f);
66019 Main.dust[num936].noGravity = true;
66020 Dust dust2 = Main.dust[num936];
66021 dust2.velocity *= 5f;
66022 num936 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 139 + Main.rand.Next(4), 0f, 0f, 0, default(Color), 1.9f);
66023 dust2 = Main.dust[num936];
66024 dust2.velocity *= 3f;
66025 }
66026 if (Main.rand.Next(2) == 0)
66027 {
66028 int num937 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(276, 283));
66029 Gore gore2 = Main.gore[num937];
66030 gore2.velocity *= 0.4f;
66031 Main.gore[num937].velocity.X += 1f;
66032 Main.gore[num937].velocity.Y += 1f;
66033 }
66034 if (Main.rand.Next(2) == 0)
66035 {
66036 int num937 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(276, 283));
66037 Gore gore2 = Main.gore[num937];
66038 gore2.velocity *= 0.4f;
66039 Main.gore[num937].velocity.X -= 1f;
66040 Main.gore[num937].velocity.Y += 1f;
66041 }
66042 if (Main.rand.Next(2) == 0)
66043 {
66044 int num937 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(276, 283));
66045 Gore gore2 = Main.gore[num937];
66046 gore2.velocity *= 0.4f;
66047 Main.gore[num937].velocity.X += 1f;
66048 Main.gore[num937].velocity.Y -= 1f;
66049 }
66050 if (Main.rand.Next(2) == 0)
66051 {
66052 int num937 = Gore.NewGore(new Vector2(position.X, position.Y), default(Vector2), Main.rand.Next(276, 283));
66053 Gore gore2 = Main.gore[num937];
66054 gore2.velocity *= 0.4f;
66055 Main.gore[num937].velocity.X -= 1f;
66056 Main.gore[num937].velocity.Y -= 1f;
66057 }
66058 }
66059 else if (type == 773)
66060 {
66061 Player player2 = Main.player[owner];
66062 Vector2 v = DirectionTo(player2.Center);
66063 float num938 = v.ToRotation() + (float)Math.PI / 2f;
66064 num938 += (float)Math.PI;
66066 num938 = scarabBombDigDirectionSnap.ToVector2().ToRotation() + (float)Math.PI / 2f;
66067 if (type == 794 || type == 797)
66068 {
66070 }
66071 else
66072 {
66074 }
66075 Resize(80, 80);
66076 for (int num939 = 0; num939 < 60; num939++)
66077 {
66078 Dust dust70 = Dust.NewDustDirect(position, width, height, 31, 0f, 0f, 100, default(Color), 2f);
66079 dust70.velocity.Y -= 0.5f;
66080 Dust dust2 = dust70;
66081 dust2.velocity *= 1.2f;
66082 dust70.color = Color.Black * 0.9f;
66083 if (Main.rand.Next(2) == 0)
66084 {
66085 dust70.scale = 0.5f;
66086 dust70.fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
66087 dust70.color = Color.Black * 0.8f;
66088 }
66089 }
66090 for (int num940 = 0; num940 < 30; num940++)
66091 {
66092 Dust dust71 = Dust.NewDustDirect(position, width, height, 59, 0f, 0f, 100);
66093 dust71.noGravity = true;
66094 if (Math.Abs(velocity.X) > 0.25f)
66095 {
66096 velocity.X *= 0.25f / Math.Abs(velocity.X);
66097 }
66098 dust71.velocity.Y -= 0.5f;
66099 dust71.fadeIn = 1.2f;
66100 Dust dust2 = dust71;
66101 dust2.velocity *= 8f;
66102 dust71.velocity = dust71.velocity.RotatedBy(num938);
66103 dust71 = Dust.NewDustDirect(position, width, height, 59, 0f, 0f, 100, default(Color), 1.5f);
66104 dust2 = dust71;
66105 dust2.velocity *= 2f;
66106 dust71.velocity = dust71.velocity.RotatedBy(num938);
66107 dust71.velocity.Y -= 1.5f;
66108 dust71 = Dust.NewDustDirect(position, width, height, 59, 0f, 0f, 100, default(Color), 1.5f);
66109 dust71.noGravity = true;
66110 dust71.velocity.Y -= 1f;
66111 dust71.fadeIn = 2f;
66112 dust2 = dust71;
66113 dust2.velocity *= 4f;
66114 dust71.velocity = dust71.velocity.RotatedBy(num938);
66115 }
66117 for (int num941 = 1; num941 <= 3; num941++)
66118 {
66119 float num942 = (float)Math.PI * 2f * Main.rand.NextFloat();
66120 for (float num943 = 0f; num943 < 1f; num943 += 1f / 12f)
66121 {
66122 float f6 = (float)Math.PI * 2f * num943 + num942;
66123 Vector2 value13 = f6.ToRotationVector2();
66124 value13 *= new Vector2(0.7f, 0.3f);
66125 Dust dust72 = Dust.NewDustPerfect(base.Center, 59, value13);
66126 dust72.fadeIn = 2f;
66127 dust72.noGravity = true;
66128 Dust dust2 = dust72;
66129 dust2.velocity *= (float)num941 + Main.rand.NextFloat() * 0.6f;
66130 dust72.velocity.Y -= (float)num941 * 0.8f;
66131 dust72.velocity = dust72.velocity.RotatedBy(num938);
66132 if (flag4)
66133 {
66134 dust2 = dust72;
66135 dust2.velocity += scarabBombDigDirectionSnap.ToVector2() * (Main.rand.NextFloat() * 11f + 6f);
66136 }
66137 else
66138 {
66139 dust2 = dust72;
66140 dust2.velocity += scarabBombDigDirectionSnap.ToVector2() * (Main.rand.NextFloat() * 7f + 5f);
66141 }
66142 }
66143 }
66144 Vector2 vector74 = (num938 - (float)Math.PI / 2f).ToRotationVector2();
66145 for (int num944 = 1; num944 <= 1; num944++)
66146 {
66147 for (int num945 = -1; num945 <= 1; num945 += 2)
66148 {
66149 for (int num946 = -1; num946 <= 1; num946 += 2)
66150 {
66151 Gore gore14 = Gore.NewGoreDirect(base.Center - Vector2.One * 20f, Vector2.Zero, Main.rand.Next(61, 64));
66152 gore14.velocity = gore14.velocity * 0.5f + vector74 * 3f;
66153 Gore gore2 = gore14;
66154 gore2.velocity += new Vector2(num945, num946) * 0.2f;
66155 }
66156 }
66157 }
66158 Resize(10, 10);
66159 if (owner == Main.myPlayer)
66160 {
66161 Point p = base.Center.ToTileCoordinates();
66162 Vector2 vector75 = p.ToWorldCoordinates();
66163 bool wallSplode = false;
66164 int num947 = 15;
66166 {
66167 num947 = (int)((double)num947 * Math.Sqrt(2.0));
66168 }
66169 for (int num948 = 0; num948 < num947; num948++)
66170 {
66171 Vector2 vec = vector75 + scarabBombDigDirectionSnap.ToVector2() * 16f * num948 * 1f;
66172 Point p2 = vec.ToTileCoordinates();
66173 if (ShouldWallExplode(p2.ToWorldCoordinates(), 9999, p2.X - 1, p2.X + 1, p2.Y - 1, p2.Y + 1))
66174 {
66175 wallSplode = true;
66176 break;
66177 }
66178 }
66179 for (int num949 = 0; num949 < num947; num949++)
66180 {
66181 Vector2 vec2 = vector75 + scarabBombDigDirectionSnap.ToVector2() * 16f * num949 * 1f;
66182 Point p3 = vec2.ToTileCoordinates();
66183 ExplodeTiles(p3.ToWorldCoordinates(), 9999, p3.X - 1, p3.X + 1, p3.Y - 1, p3.Y + 1, wallSplode);
66184 }
66185 }
66186 }
66187 else if (type == 28 || type == 30 || type == 37 || type == 75 || type == 102 || type == 164 || type == 397 || type == 517 || type == 516 || type == 519 || type == 773)
66188 {
66190 position.X += width / 2;
66191 position.Y += height / 2;
66192 width = 22;
66193 height = 22;
66194 position.X -= width / 2;
66195 position.Y -= height / 2;
66196 int num950 = 6;
66197 if (type == 773)
66198 {
66199 num950 = 59;
66200 }
66201 for (int num951 = 0; num951 < 20; num951++)
66202 {
66203 int num952 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 1.5f);
66204 Dust dust2 = Main.dust[num952];
66205 dust2.velocity *= 1.4f;
66206 }
66207 for (int num953 = 0; num953 < 10; num953++)
66208 {
66209 int num954 = Dust.NewDust(position, width, height, num950, 0f, 0f, 100, default(Color), 2.5f);
66210 Main.dust[num954].noGravity = true;
66211 Dust dust2 = Main.dust[num954];
66212 dust2.velocity *= 5f;
66213 num954 = Dust.NewDust(position, width, height, num950, 0f, 0f, 100, default(Color), 1.5f);
66214 dust2 = Main.dust[num954];
66215 dust2.velocity *= 3f;
66216 }
66217 int num955 = Gore.NewGore(position, default(Vector2), Main.rand.Next(61, 64));
66218 Gore gore2 = Main.gore[num955];
66219 gore2.velocity *= 0.4f;
66220 Main.gore[num955].velocity.X += 1f;
66221 Main.gore[num955].velocity.Y += 1f;
66222 num955 = Gore.NewGore(position, default(Vector2), Main.rand.Next(61, 64));
66223 gore2 = Main.gore[num955];
66224 gore2.velocity *= 0.4f;
66225 Main.gore[num955].velocity.X -= 1f;
66226 Main.gore[num955].velocity.Y += 1f;
66227 num955 = Gore.NewGore(position, default(Vector2), Main.rand.Next(61, 64));
66228 gore2 = Main.gore[num955];
66229 gore2.velocity *= 0.4f;
66230 Main.gore[num955].velocity.X += 1f;
66231 Main.gore[num955].velocity.Y -= 1f;
66232 num955 = Gore.NewGore(position, default(Vector2), Main.rand.Next(61, 64));
66233 gore2 = Main.gore[num955];
66234 gore2.velocity *= 0.4f;
66235 Main.gore[num955].velocity.X -= 1f;
66236 Main.gore[num955].velocity.Y -= 1f;
66237 if (type == 102)
66238 {
66240 position.X += width / 2;
66241 position.Y += height / 2;
66242 width = 128;
66243 height = 128;
66244 position.X -= width / 2;
66245 position.Y -= height / 2;
66246 damage = 40;
66247 Damage();
66249 width = 22;
66250 height = 22;
66251 }
66252 if (type == 75)
66253 {
66254 Resize(128, 128);
66255 damage = 60;
66256 knockBack = 8f;
66257 Damage();
66258 Resize(22, 22);
66259 }
66260 }
66261 else if (type == 29 || type == 108 || type == 470 || type == 637 || type == 1002)
66262 {
66264 if (type == 29)
66265 {
66266 position.X += width / 2;
66267 position.Y += height / 2;
66268 width = 200;
66269 height = 200;
66270 position.X -= width / 2;
66271 position.Y -= height / 2;
66272 }
66273 for (int num956 = 0; num956 < 50; num956++)
66274 {
66275 int num957 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 31, 0f, 0f, 100, default(Color), 2f);
66276 Dust dust2 = Main.dust[num957];
66277 dust2.velocity *= 1.4f;
66278 }
66279 for (int num958 = 0; num958 < 80; num958++)
66280 {
66281 int num959 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 3f);
66282 Main.dust[num959].noGravity = true;
66283 Dust dust2 = Main.dust[num959];
66284 dust2.velocity *= 5f;
66285 num959 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 6, 0f, 0f, 100, default(Color), 2f);
66286 dust2 = Main.dust[num959];
66287 dust2.velocity *= 3f;
66288 }
66289 for (int num960 = 0; num960 < 2; num960++)
66290 {
66291 int num961 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
66292 Main.gore[num961].scale = 1.5f;
66293 Main.gore[num961].velocity.X += 1.5f;
66294 Main.gore[num961].velocity.Y += 1.5f;
66295 num961 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
66296 Main.gore[num961].scale = 1.5f;
66297 Main.gore[num961].velocity.X -= 1.5f;
66298 Main.gore[num961].velocity.Y += 1.5f;
66299 num961 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
66300 Main.gore[num961].scale = 1.5f;
66301 Main.gore[num961].velocity.X += 1.5f;
66302 Main.gore[num961].velocity.Y -= 1.5f;
66303 num961 = Gore.NewGore(new Vector2(position.X + (float)(width / 2) - 24f, position.Y + (float)(height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64));
66304 Main.gore[num961].scale = 1.5f;
66305 Main.gore[num961].velocity.X -= 1.5f;
66306 Main.gore[num961].velocity.Y -= 1.5f;
66307 }
66308 position.X += width / 2;
66309 position.Y += height / 2;
66310 width = 10;
66311 height = 10;
66312 position.X -= width / 2;
66313 position.Y -= height / 2;
66314 }
66315 else if (type == 69)
66316 {
66317 SoundEngine.PlaySound(13, (int)position.X, (int)position.Y);
66318 for (int num962 = 0; num962 < 5; num962++)
66319 {
66320 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 13);
66321 }
66322 for (int num963 = 0; num963 < 30; num963++)
66323 {
66324 int num964 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 33, 0f, -2f, 0, default(Color), 1.1f);
66325 Main.dust[num964].alpha = 100;
66326 Main.dust[num964].velocity.X *= 1.5f;
66327 Dust dust2 = Main.dust[num964];
66328 dust2.velocity *= 3f;
66329 }
66330 }
66331 else if (type == 70)
66332 {
66333 SoundEngine.PlaySound(13, (int)position.X, (int)position.Y);
66334 for (int num965 = 0; num965 < 5; num965++)
66335 {
66336 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 13);
66337 }
66338 for (int num966 = 0; num966 < 30; num966++)
66339 {
66340 int num967 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 52, 0f, -2f, 0, default(Color), 1.1f);
66341 Main.dust[num967].alpha = 100;
66342 Main.dust[num967].velocity.X *= 1.5f;
66343 Dust dust2 = Main.dust[num967];
66344 dust2.velocity *= 3f;
66345 }
66346 }
66347 else if (type == 621)
66348 {
66349 SoundEngine.PlaySound(13, (int)position.X, (int)position.Y);
66350 for (int num968 = 0; num968 < 5; num968++)
66351 {
66352 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 13);
66353 }
66354 for (int num969 = 0; num969 < 30; num969++)
66355 {
66356 int num970 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 266, 0f, -2f, 0, default(Color), 1.1f);
66357 Main.dust[num970].alpha = 100;
66358 Main.dust[num970].velocity.X *= 1.5f;
66359 Dust dust2 = Main.dust[num970];
66360 dust2.velocity *= 3f;
66361 }
66362 }
66363 else if (type == 114 || type == 115)
66364 {
66366 for (int num971 = 4; num971 < 31; num971++)
66367 {
66368 float num972 = oldVelocity.X * (30f / (float)num971);
66369 float num973 = oldVelocity.Y * (30f / (float)num971);
66370 int num974 = Dust.NewDust(new Vector2(position.X - num972, position.Y - num973), 8, 8, 27, oldVelocity.X, oldVelocity.Y, 100, default(Color), 1.4f);
66371 Main.dust[num974].noGravity = true;
66372 Dust dust2 = Main.dust[num974];
66373 dust2.velocity *= 0.5f;
66374 num974 = Dust.NewDust(new Vector2(position.X - num972, position.Y - num973), 8, 8, 27, oldVelocity.X, oldVelocity.Y, 100, default(Color), 0.9f);
66375 dust2 = Main.dust[num974];
66376 dust2.velocity *= 0.5f;
66377 }
66378 }
66379 else if (type == 116)
66380 {
66382 for (int num975 = 4; num975 < 31; num975++)
66383 {
66384 float num976 = oldVelocity.X * (30f / (float)num975);
66385 float num977 = oldVelocity.Y * (30f / (float)num975);
66386 int num978 = Dust.NewDust(new Vector2(position.X - num976, position.Y - num977), 8, 8, 64, oldVelocity.X, oldVelocity.Y, 100, default(Color), 1.8f);
66387 Main.dust[num978].noGravity = true;
66388 num978 = Dust.NewDust(new Vector2(position.X - num976, position.Y - num977), 8, 8, 64, oldVelocity.X, oldVelocity.Y, 100, default(Color), 1.4f);
66389 Main.dust[num978].noGravity = true;
66390 }
66391 }
66392 else if (type == 173)
66393 {
66395 for (int num979 = 4; num979 < 24; num979++)
66396 {
66397 float num980 = oldVelocity.X * (30f / (float)num979);
66398 float num981 = oldVelocity.Y * (30f / (float)num979);
66399 int num982 = Main.rand.Next(3);
66400 int num983 = Dust.NewDust(new Vector2(position.X - num980, position.Y - num981), 8, 8, num982 switch
66401 {
66402 0 => 15,
66403 1 => 57,
66404 _ => 58,
66405 }, oldVelocity.X * 0.2f, oldVelocity.Y * 0.2f, 100, default(Color), 1.8f);
66406 Dust dust2 = Main.dust[num983];
66407 dust2.velocity *= 1.5f;
66408 Main.dust[num983].noGravity = true;
66409 }
66410 }
66411 else if (type == 132)
66412 {
66414 for (int num984 = 4; num984 < 31; num984++)
66415 {
66416 float num985 = oldVelocity.X * (30f / (float)num984);
66417 float num986 = oldVelocity.Y * (30f / (float)num984);
66418 int num987 = Dust.NewDust(new Vector2(oldPosition.X - num985, oldPosition.Y - num986), 8, 8, 107, oldVelocity.X, oldVelocity.Y, 100, default(Color), 1.8f);
66419 Main.dust[num987].noGravity = true;
66420 Dust dust2 = Main.dust[num987];
66421 dust2.velocity *= 0.5f;
66422 num987 = Dust.NewDust(new Vector2(oldPosition.X - num985, oldPosition.Y - num986), 8, 8, 107, oldVelocity.X, oldVelocity.Y, 100, default(Color), 1.4f);
66423 dust2 = Main.dust[num987];
66424 dust2.velocity *= 0.05f;
66425 }
66426 }
66427 else if (type == 156)
66428 {
66430 for (int num988 = 4; num988 < 31; num988++)
66431 {
66432 float num989 = oldVelocity.X * (30f / (float)num988);
66433 float num990 = oldVelocity.Y * (30f / (float)num988);
66434 int num991 = Dust.NewDust(new Vector2(oldPosition.X - num989, oldPosition.Y - num990), 8, 8, 73, oldVelocity.X, oldVelocity.Y, 255, default(Color), 1.8f);
66435 Main.dust[num991].noGravity = true;
66436 Dust dust2 = Main.dust[num991];
66437 dust2.velocity *= 0.5f;
66438 num991 = Dust.NewDust(new Vector2(oldPosition.X - num989, oldPosition.Y - num990), 8, 8, 73, oldVelocity.X, oldVelocity.Y, 255, default(Color), 1.4f);
66439 dust2 = Main.dust[num991];
66440 dust2.velocity *= 0.05f;
66441 Main.dust[num991].noGravity = true;
66442 }
66443 }
66444 else if (type == 157)
66445 {
66447 for (int num992 = 4; num992 < 31; num992++)
66448 {
66449 int num993 = Dust.NewDust(position, width, height, 107, oldVelocity.X, oldVelocity.Y, 100, default(Color), 1.8f);
66450 Main.dust[num993].noGravity = true;
66451 Dust dust2 = Main.dust[num993];
66452 dust2.velocity *= 0.5f;
66453 }
66454 }
66455 else if (type == 370)
66456 {
66458 for (int num994 = 0; num994 < 5; num994++)
66459 {
66460 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 13);
66461 }
66462 for (int num995 = 0; num995 < 30; num995++)
66463 {
66464 Vector2 vector77 = new Vector2(Main.rand.Next(-10, 11), Main.rand.Next(-10, 11));
66465 vector77.Normalize();
66466 int num996 = Gore.NewGore(base.Center + vector77 * 10f, vector77 * Main.rand.Next(4, 9) * 0.66f + Vector2.UnitY * 1.5f, 331, (float)Main.rand.Next(40, 141) * 0.01f);
66467 Main.gore[num996].sticky = false;
66468 }
66469 }
66470 else if (type == 371)
66471 {
66472 SoundEngine.PlaySound(13, (int)position.X, (int)position.Y);
66474 for (int num997 = 0; num997 < 5; num997++)
66475 {
66476 Dust.NewDust(new Vector2(position.X, position.Y), width, height, 13);
66477 }
66478 for (int num998 = 0; num998 < 30; num998++)
66479 {
66480 Vector2 vector78 = new Vector2(Main.rand.Next(-10, 11), Main.rand.Next(-10, 11));
66481 vector78.Normalize();
66482 vector78 *= 0.4f;
66483 int num999 = Gore.NewGore(base.Center + vector78 * 10f, vector78 * Main.rand.Next(4, 9) * 0.66f + Vector2.UnitY * 1.5f, Main.rand.Next(435, 438), (float)Main.rand.Next(20, 100) * 0.01f);
66484 Main.gore[num999].sticky = false;
66485 }
66486 }
66487 else if (type == 936)
66488 {
66490 for (int num1000 = 0; num1000 < 20; num1000++)
66491 {
66492 Color newColor9 = Main.hslToRgb(0.7f + 0.2f * Main.rand.NextFloat(), 1f, 0.7f);
66493 newColor9.A /= 2;
66494 int num1001 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 4, 0f, 0f, 150, newColor9);
66495 Dust dust2 = Main.dust[num1001];
66496 dust2.velocity *= 1.5f;
66497 newColor9 = Main.hslToRgb(0.7f + 0.2f * Main.rand.NextFloat(), 1f, 0.5f);
66498 newColor9.A /= 2;
66499 num1001 = Dust.NewDust(new Vector2(position.X, position.Y), width, height, 4, 0f, 0f, 150, newColor9, 1.8f);
66500 dust2 = Main.dust[num1001];
66501 dust2.velocity *= 3f;
66502 Main.dust[num1001].noGravity = true;
66503 }
66504 }
66505 }
66506 }
66507 if (owner == Main.myPlayer && (type == 370 || type == 371 || type == 936))
66508 {
66509 float num1002 = 80f;
66510 int num1003 = 119;
66511 if (type == 371)
66512 {
66513 num1003 = 120;
66514 }
66515 if (type == 936)
66516 {
66517 num1003 = 320;
66518 }
66519 for (int num1004 = 0; num1004 < 255; num1004++)
66520 {
66521 Player player3 = Main.player[num1004];
66522 if (player3.active && !player3.dead && Vector2.Distance(base.Center, player3.Center) < num1002)
66523 {
66524 player3.AddBuff(num1003, 1800, quiet: false);
66525 }
66526 }
66527 for (int num1005 = 0; num1005 < 200; num1005++)
66528 {
66529 NPC nPC = Main.npc[num1005];
66530 if (nPC.active && nPC.life > 0 && Vector2.Distance(base.Center, nPC.Center) < num1002)
66531 {
66532 nPC.AddBuff(num1003, 1800);
66533 }
66534 }
66535 }
66536 if (owner == Main.myPlayer)
66537 {
66538 if (type == 30 || type == 517 || type == 397 || type == 588)
66539 {
66540 int num1006 = 4;
66541 Vector2 center2 = base.Center;
66542 int num1007 = (int)(center2.X / 16f - (float)num1006);
66543 int num1008 = (int)(center2.X / 16f + (float)num1006);
66544 int num1009 = (int)(center2.Y / 16f - (float)num1006);
66545 int num1010 = (int)(center2.Y / 16f + (float)num1006);
66546 if (num1007 < 0)
66547 {
66548 num1007 = 0;
66549 }
66550 if (num1008 > Main.maxTilesX)
66551 {
66552 num1008 = Main.maxTilesX;
66553 }
66554 if (num1009 < 0)
66555 {
66556 num1009 = 0;
66557 }
66558 if (num1010 > Main.maxTilesY)
66559 {
66560 num1010 = Main.maxTilesY;
66561 }
66563 }
66564 if (type == 28 || type == 29 || type == 37 || type == 108 || type == 136 || type == 137 || type == 138 || type == 142 || type == 143 || type == 144 || type == 339 || type == 341 || type == 470 || type == 516 || type == 519 || type == 637 || type == 716 || type == 718 || type == 780 || type == 781 || type == 782 || type == 804 || type == 783 || type == 863 || type == 796 || type == 797 || type == 798 || type == 809 || (type == 102 && Main.getGoodWorld && !Main.remixWorld))
66565 {
66566 int num1011 = 3;
66567 if (type == 102)
66568 {
66569 num1011 = 4;
66570 }
66571 if (type == 28 || type == 37 || type == 516 || type == 519)
66572 {
66573 num1011 = 4;
66574 }
66575 if (type == 29 || type == 470 || type == 637 || type == 796 || type == 797 || type == 798 || type == 809)
66576 {
66577 num1011 = 7;
66578 }
66579 if (type == 142 || type == 143 || type == 144 || type == 341)
66580 {
66581 num1011 = 5;
66582 }
66583 if (type == 716 || type == 780 || type == 781 || type == 782 || type == 804 || type == 783 || type == 863)
66584 {
66585 num1011 = 3;
66586 }
66587 if (type == 718)
66588 {
66589 num1011 = 5;
66590 }
66591 if (type == 108)
66592 {
66593 num1011 = 10;
66594 }
66595 if (type == 1002)
66596 {
66597 num1011 = 10;
66598 }
66600 if (type == 716 || type == 718 || type == 773)
66601 {
66602 center3 = base.Center;
66603 }
66604 int num1012 = num1011;
66605 int num1013 = num1011;
66606 int num1014 = (int)(center3.X / 16f - (float)num1012);
66607 int num1015 = (int)(center3.X / 16f + (float)num1012);
66608 int num1016 = (int)(center3.Y / 16f - (float)num1013);
66609 int num1017 = (int)(center3.Y / 16f + (float)num1013);
66610 if (num1014 < 0)
66611 {
66612 num1014 = 0;
66613 }
66614 if (num1015 > Main.maxTilesX)
66615 {
66616 num1015 = Main.maxTilesX;
66617 }
66618 if (num1016 < 0)
66619 {
66620 num1016 = 0;
66621 }
66622 if (num1017 > Main.maxTilesY)
66623 {
66624 num1017 = Main.maxTilesY;
66625 }
66628 }
66629 if (Main.netMode != 0)
66630 {
66631 NetMessage.SendData(29, -1, -1, null, identity, owner);
66632 }
66633 if (!noDropItem)
66634 {
66635 int num1018 = -1;
66636 if (type >= 736 && type <= 738)
66637 {
66639 for (int num1019 = 0; num1019 < 3; num1019++)
66640 {
66641 Dust.NewDust(position, 16, 16, type - 736 + 275);
66642 }
66643 int num1020 = (int)(base.Center.X / 16f);
66644 int num1021 = (int)(base.Center.Y / 16f) + 1;
66645 if (Main.myPlayer == owner && Main.tile[num1020, num1021].active() && TileID.Sets.CrackedBricks[Main.tile[num1020, num1021].type] && Main.rand.Next(2) == 0)
66646 {
66647 WorldGen.KillTile(num1020, num1021);
66648 if (Main.netMode != 0)
66649 {
66650 NetMessage.SendData(17, -1, -1, null, 20, num1020, num1021);
66651 }
66652 }
66653 }
66654 else if (aiStyle == 10)
66655 {
66656 int num1022 = (int)(position.X + (float)(width / 2)) / 16;
66657 int num1023 = (int)(position.Y + (float)(height / 2)) / 16;
66658 int num1024 = 0;
66659 int num1025 = 2;
66660 if (type == 109)
66661 {
66662 num1024 = 147;
66663 num1025 = 0;
66664 }
66665 if (type == 31)
66666 {
66667 num1024 = 53;
66668 num1025 = 169;
66669 if (ai[0] == 2f)
66670 {
66671 num1025 = 0;
66672 }
66673 }
66674 if (type == 42)
66675 {
66676 num1024 = 53;
66677 num1025 = 0;
66678 }
66679 if (type == 56)
66680 {
66681 num1024 = 112;
66682 num1025 = 370;
66683 }
66684 if (type == 65)
66685 {
66686 num1024 = 112;
66687 num1025 = 0;
66688 }
66689 if (type == 67)
66690 {
66691 num1024 = 116;
66692 num1025 = 408;
66693 }
66694 if (type == 68)
66695 {
66696 num1024 = 116;
66697 num1025 = 0;
66698 }
66699 if (type == 71)
66700 {
66701 num1024 = 123;
66702 num1025 = 424;
66703 }
66704 if (type == 39)
66705 {
66706 num1024 = 59;
66707 num1025 = 0;
66708 }
66709 if (type == 40)
66710 {
66711 num1024 = 57;
66712 num1025 = 0;
66713 }
66714 if (type == 179)
66715 {
66716 num1024 = 224;
66717 num1025 = 1103;
66718 }
66719 if (type == 241)
66720 {
66721 num1024 = 234;
66722 num1025 = 1246;
66723 }
66724 if (type == 354)
66725 {
66726 num1024 = 234;
66727 num1025 = 0;
66728 }
66729 if (type == 411)
66730 {
66731 num1024 = 330;
66732 num1025 = 71;
66733 }
66734 if (type == 412)
66735 {
66736 num1024 = 331;
66737 num1025 = 72;
66738 }
66739 if (type == 413)
66740 {
66741 num1024 = 332;
66742 num1025 = 73;
66743 }
66744 if (type == 414)
66745 {
66746 num1024 = 333;
66747 num1025 = 74;
66748 }
66749 if (type == 812)
66750 {
66751 num1024 = 495;
66752 num1025 = 4090;
66753 }
66754 if (type == 109)
66755 {
66756 int num1026 = Player.FindClosest(position, width, height);
66757 if ((double)(base.Center - Main.player[num1026].Center).Length() > (double)Main.LogicCheckScreenWidth * 0.75)
66758 {
66759 num1024 = -1;
66760 num1025 = 593;
66761 }
66762 }
66763 if (Main.tile[num1022, num1023].nactive() && Main.tile[num1022, num1023].halfBrick() && velocity.Y > 0f && Math.Abs(velocity.Y) > Math.Abs(velocity.X))
66764 {
66765 num1023--;
66766 }
66767 if (!Main.tile[num1022, num1023].active() && num1024 >= 0)
66768 {
66769 bool flag5 = false;
66770 bool flag6 = false;
66771 if (num1023 < Main.maxTilesY - 2)
66772 {
66773 Tile tile2 = Main.tile[num1022, num1023 + 1];
66774 if (tile2 != null && tile2.active())
66775 {
66776 if (tile2.active() && tile2.type == 314)
66777 {
66778 flag6 = true;
66779 }
66780 if (tile2.active() && WorldGen.BlockBelowMakesSandFall(num1022, num1023))
66781 {
66782 flag6 = true;
66783 }
66784 }
66785 }
66786 if (!flag6)
66787 {
66789 }
66790 if (!flag6 && Main.tile[num1022, num1023].active() && Main.tile[num1022, num1023].type == num1024)
66791 {
66792 if (Main.tile[num1022, num1023 + 1].halfBrick() || Main.tile[num1022, num1023 + 1].slope() != 0)
66793 {
66794 WorldGen.SlopeTile(num1022, num1023 + 1);
66795 if (Main.netMode != 0)
66796 {
66797 NetMessage.SendData(17, -1, -1, null, 14, num1022, num1023 + 1);
66798 }
66799 }
66800 if (Main.netMode != 0)
66801 {
66802 NetMessage.SendData(17, -1, -1, null, 1, num1022, num1023, num1024);
66803 }
66804 }
66805 else if (!flag5 && num1025 > 0)
66806 {
66808 }
66809 }
66810 else if (num1025 > 0)
66811 {
66813 }
66814 }
66815 if (type == 171)
66816 {
66817 if (ai[1] == 0f)
66818 {
66819 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 985);
66820 Main.item[num1018].noGrabDelay = 0;
66821 }
66822 else if (ai[1] < 10f)
66823 {
66824 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 965, (int)(10f - ai[1]));
66825 Main.item[num1018].noGrabDelay = 0;
66826 }
66827 }
66828 if (type == 475)
66829 {
66830 if (ai[1] == 0f)
66831 {
66832 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 3005);
66833 Main.item[num1018].noGrabDelay = 0;
66834 }
66835 else if (ai[1] < 10f)
66836 {
66837 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 2996, (int)(10f - ai[1]));
66838 Main.item[num1018].noGrabDelay = 0;
66839 }
66840 }
66841 if (type == 505)
66842 {
66843 if (ai[1] == 0f)
66844 {
66845 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 3079);
66846 Main.item[num1018].noGrabDelay = 0;
66847 }
66848 else if (ai[1] < 10f)
66849 {
66850 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 3077, (int)(10f - ai[1]));
66851 Main.item[num1018].noGrabDelay = 0;
66852 }
66853 }
66854 if (type == 506)
66855 {
66856 if (ai[1] == 0f)
66857 {
66858 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 3080);
66859 Main.item[num1018].noGrabDelay = 0;
66860 }
66861 else if (ai[1] < 10f)
66862 {
66863 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 3078, (int)(10f - ai[1]));
66864 Main.item[num1018].noGrabDelay = 0;
66865 }
66866 }
66867 if (type == 12 && damage > 500 && !Main.remixWorld)
66868 {
66869 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 75);
66870 }
66871 if (type == 155)
66872 {
66873 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 859);
66874 }
66875 if (type == 861)
66876 {
66877 num1018 = Item.NewItem(GetItemSource_DropAsItem(), (int)position.X, (int)position.Y, width, height, 4743);
66878 }
66879 if (Main.netMode == 1 && num1018 >= 0)
66880 {
66881 NetMessage.SendData(21, -1, -1, null, num1018, 1f);
66882 }
66883 }
66884 if (type == 69 || type == 70 || type == 621)
66885 {
66886 int i2 = (int)(position.X + (float)(width / 2)) / 16;
66887 int j2 = (int)(position.Y + (float)(height / 2)) / 16;
66888 if (type == 69)
66889 {
66890 WorldGen.Convert(i2, j2, 2);
66891 }
66892 if (type == 70)
66893 {
66894 WorldGen.Convert(i2, j2, 1);
66895 }
66896 if (type == 621)
66897 {
66898 WorldGen.Convert(i2, j2, 4);
66899 }
66900 }
66901 if (type == 378)
66902 {
66903 int num1027 = Main.rand.Next(2, 4);
66904 if (Main.rand.Next(5) == 0)
66905 {
66906 num1027++;
66907 }
66908 for (int num1028 = 0; num1028 < num1027; num1028++)
66909 {
66910 float x2 = velocity.X;
66911 float y8 = velocity.Y;
66912 x2 *= 1f + (float)Main.rand.Next(-20, 21) * 0.01f;
66913 y8 *= 1f + (float)Main.rand.Next(-20, 21) * 0.01f;
66915 }
66916 }
66917 }
66918 active = false;
66919 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
static float SmoothStep(float value1, float value2, float amount)
Definition MathHelper.cs:63
static float Clamp(float value, float min, float max)
Definition MathHelper.cs:46
static double Atan2(double y, double x)
static double Sqrt(double d)
static double Abs(double value)
const double PI
Definition Math.cs:16
static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
static void PlaySound(int type, Vector2 position, int style=1)
static ActiveSound GetActiveSound(SlotId id)
Vector2 oldPosition
Definition Entity.cs:18
Vector2 velocity
Definition Entity.cs:16
float Distance(Vector2 Other)
Definition Entity.cs:187
Vector2 position
Definition Entity.cs:14
Vector2 oldVelocity
Definition Entity.cs:20
Vector2 DirectionTo(Vector2 Destination)
Definition Entity.cs:197
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
static Color GetPortalColor(int colorIndex)
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7
static readonly short Count
Definition ItemID.cs:12138
static bool[] DontCancelChannelOnKill
static readonly short Count
static readonly LegacySoundStyle Item10
Definition SoundID.cs:434
static readonly LegacySoundStyle Item50
Definition SoundID.cs:514
static readonly LegacySoundStyle Item127
Definition SoundID.cs:668
static readonly LegacySoundStyle Item94
Definition SoundID.cs:602
static readonly LegacySoundStyle Item45
Definition SoundID.cs:504
static readonly LegacySoundStyle Item14
Definition SoundID.cs:442
static readonly LegacySoundStyle Item107
Definition SoundID.cs:628
static readonly LegacySoundStyle Item16
Definition SoundID.cs:446
static readonly LegacySoundStyle Item4
Definition SoundID.cs:422
static readonly LegacySoundStyle Item51
Definition SoundID.cs:516
static readonly LegacySoundStyle DD2_SkyDragonsFuryCircle
Definition SoundID.cs:952
static readonly LegacySoundStyle Item118
Definition SoundID.cs:650
static readonly LegacySoundStyle Item27
Definition SoundID.cs:468
static readonly LegacySoundStyle Item100
Definition SoundID.cs:614
static readonly LegacySoundStyle Item21
Definition SoundID.cs:456
static readonly LegacySoundStyle Item62
Definition SoundID.cs:538
static readonly LegacySoundStyle DD2_BetsysWrathImpact
Definition SoundID.cs:932
static readonly LegacySoundStyle DD2_BetsyFireballImpact
Definition SoundID.cs:802
static readonly LegacySoundStyle Item89
Definition SoundID.cs:592
static readonly LegacySoundStyle DD2_GoblinBomb
Definition SoundID.cs:774
static readonly LegacySoundStyle Item96
Definition SoundID.cs:606
static readonly LegacySoundStyle Item54
Definition SoundID.cs:522
static readonly LegacySoundStyle Item110
Definition SoundID.cs:634
static bool[] CrackedBricks
Definition TileID.cs:113
Color GetFairyQueenWeaponsColor(float alphaChannelMultiplier=1f, float lerpToWhite=0f, float? rawHueOverride=null)
void DoRainbowCrystalStaffExplosion()
Point GetScarabBombDigDirectionSnap8()
IEntitySource GetProjectileSource_FromThis()
IEntitySource GetItemSource_DropAsItem()
void ExplodeCrackedTiles(Vector2 compareSpot, int radius, int minI, int maxI, int minJ, int maxJ)
void TryGettingHitByOtherPlayersExplosives()
static int GetNextSlot()
bool ShouldWallExplode(Vector2 compareSpot, int radius, int minI, int maxI, int minJ, int maxJ)
void Kill_DirtAndFluidProjectiles_RunDelegateMethodPushUpForHalfBricks(Point pt, float size, Utils.TileActionAttempt plot)
void ExplodeTiles(Vector2 compareSpot, int radius, int minI, int maxI, int minJ, int maxJ, bool wallSplode)
IEntitySource GetNPCSource_FromThis()
void Resize(int newWidth, int newHeight)
void AI_061_FishingBobber_GiveItemToPlayer(Player thePlayer, int itemType)
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
static Color CornflowerBlue
Definition Color.cs:112
static Color Transparent
Definition Color.cs:76
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491
static Vector2 SmoothStep(Vector2 value1, Vector2 value2, float amount)
Definition Vector2.cs:255
static float Distance(Vector2 value1, Vector2 value2)
Definition Vector2.cs:91
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
Definition Vector2.cs:227
static SlotId FromFloat(float value)
Definition SlotId.cs:80

References System.Math.Abs(), Terraria.Main.Achievements, Terraria.Entity.active, Terraria.Tile.active(), Terraria.Player.AddBuff(), Terraria.NPC.AI_121_QueenSlime_GetDustColor(), Terraria.Graphics.Shaders.GameShaders.Armor, System.array, System.Math.Atan2(), Microsoft.Xna.Framework.Color.Black, Terraria.WorldGen.BlockBelowMakesSandFall(), Terraria.Collision.CanHitLine(), Terraria.Entity.Center, Terraria.Utils.CenteredRectangle(), Microsoft.Xna.Framework.MathHelper.Clamp(), Terraria.PopupText.ClearSonarText(), Terraria.Dust.CloneDust(), Terraria.WorldGen.Convert(), Microsoft.Xna.Framework.Color.CornflowerBlue, Terraria.ID.ItemID.Count, Terraria.ID.ProjectileID.Count, Terraria.ID.TileID.Sets.CrackedBricks, Terraria.Player.creativeGodMode, Terraria.GameContent.Damage, Terraria.ID.SoundID.DD2_BetsyFireballImpact, Terraria.ID.SoundID.DD2_BetsysWrathImpact, Terraria.ID.SoundID.DD2_GoblinBomb, Terraria.ID.SoundID.DD2_SkyDragonsFuryCircle, Terraria.Player.dead, Terraria.Main.DiscoB, Terraria.Main.DiscoG, Terraria.Main.DiscoR, Microsoft.Xna.Framework.Vector2.Distance(), Terraria.ID.ProjectileID.Sets.DontCancelChannelOnKill, Terraria.Main.dust, Terraria.Dust.dustWater(), Terraria.Main.expertMode, Terraria.Player.FindClosest(), ReLogic.Utilities.SlotId.FromFloat(), Terraria.Audio.SoundEngine.GetActiveSound(), Terraria.NPC.GetAvailableAmountOfNPCsToSpawnUpToSlot(), Terraria.Main.getGoodWorld, Terraria.Utils.GetLerpValue(), Terraria.GameContent.PortalHelper.GetPortalColor(), Terraria.Framing.GetTileSafely(), Microsoft.Xna.Framework.Color.Gold, Terraria.Main.gore, Microsoft.Xna.Framework.Color.Green, Terraria.Collision.HitTiles(), Microsoft.Xna.Framework.Color.HotPink, Terraria.Main.hslToRgb(), Terraria.Main.item, Terraria.ID.SoundID.Item10, Terraria.ID.SoundID.Item100, Terraria.ID.SoundID.Item107, Terraria.ID.SoundID.Item110, Terraria.ID.SoundID.Item118, Terraria.ID.SoundID.Item127, Terraria.ID.SoundID.Item14, Terraria.ID.SoundID.Item16, Terraria.ID.SoundID.Item21, Terraria.ID.SoundID.Item27, Terraria.ID.SoundID.Item4, Terraria.ID.SoundID.Item45, Terraria.ID.SoundID.Item50, Terraria.ID.SoundID.Item51, Terraria.ID.SoundID.Item54, Terraria.ID.SoundID.Item62, Terraria.ID.SoundID.Item89, Terraria.ID.SoundID.Item94, Terraria.ID.SoundID.Item96, Terraria.WorldGen.KillTile(), Microsoft.Xna.Framework.Vector2.Length(), Microsoft.Xna.Framework.Color.Lerp(), Microsoft.Xna.Framework.MathHelper.Lerp(), Microsoft.Xna.Framework.Vector2.Lerp(), Terraria.Main.LogicCheckScreenWidth, Terraria.Wiring.MassWireOperation(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Dust.NewDustDirect(), Terraria.Dust.NewDustPerfect(), Terraria.Gore.NewGore(), Terraria.Gore.NewGoreDirect(), Terraria.Item.NewItem(), Terraria.NPC.NewNPC(), Microsoft.Xna.Framework.Vector2.Normalize(), Terraria.Main.npc, Terraria.Main.offScreenRange, Microsoft.Xna.Framework.Vector2.One, Microsoft.Xna.Framework.Color.Orange, Terraria.Main.OurFavoriteColor, System.Math.PI, Terraria.WorldGen.PlaceTile(), Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Audio.SoundEngine.PlayTrackedSound(), Terraria.Main.projectile, Terraria.Main.projectileIdentity, Terraria.Main.ProjectileUpdateLoopIndex, Terraria.Main.projPet, Microsoft.Xna.Framework.Color.Purple, Terraria.Main.rand, Terraria.WorldGen.RandomizeBackgroundBasedOnPlayer(), Terraria.WorldGen.RandomizeMoonState(), Terraria.Utils.RandomVector2(), Microsoft.Xna.Framework.Color.Red, Terraria.Utils.Remap(), Terraria.Main.remixWorld, Terraria.GameContent.Drawing.ParticleOrchestrator.RequestParticleSpawn(), Microsoft.Xna.Framework.Scale, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.NetMessage.SendData(), Terraria.NPC.ShieldStrengthTowerMax, Terraria.NPC.ShieldStrengthTowerNebula, Terraria.NPC.ShieldStrengthTowerSolar, Terraria.NPC.ShieldStrengthTowerStardust, Terraria.NPC.ShieldStrengthTowerVortex, Terraria.WorldGen.SlopeTile(), Microsoft.Xna.Framework.MathHelper.SmoothStep(), Microsoft.Xna.Framework.Vector2.SmoothStep(), Terraria.WorldGen.SolidTile(), Terraria.DelegateMethods.SpreadDirt(), Terraria.DelegateMethods.SpreadDry(), Terraria.DelegateMethods.SpreadHoney(), Terraria.DelegateMethods.SpreadLava(), Terraria.DelegateMethods.SpreadWater(), System.Math.Sqrt(), Terraria.Main.tenthAnniversaryWorld, Terraria.DataStructures.Tile, Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.GameContent.UI.WiresUI.Settings.ToolMode, Microsoft.Xna.Framework.Color.Transparent, Terraria.WorldGen.TreeTops, System.type, Terraria.Tile.type, Microsoft.Xna.Framework.Vector2.UnitX, Microsoft.Xna.Framework.Vector2.UnitY, System.value, Microsoft.Xna.Framework.Color.White, Microsoft.Xna.Framework.Vector2.X, System.X, Microsoft.Xna.Framework.Vector2.Y, System.Y, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.NPC.AI(), Terraria.Projectile.AI(), Terraria.Projectile.AI_121_StardustDragon(), Terraria.Projectile.AI_152_SuperStarSlash(), Terraria.Projectile.Damage(), Terraria.Player.DropSelectedItem_InterruptActionsThatUseAnimations(), Terraria.Projectile.HandleMovement(), Terraria.Projectile.Interrupt(), Terraria.Player.ItemCheck_Shoot(), Terraria.Player.ItemCheck_TryDestroyingDrones(), Terraria.Player.ItemCheck_TurretAltFeatureUse(), Terraria.NPC.PopAllAttachedProjectilesAndTakeDamageForThem(), Terraria.GameContent.Golf.GolfHelper.ContactListener.PutBallInCup(), Terraria.GameContent.PortalHelper.RemoveIntersectingPortals(), Terraria.GameContent.PortalHelper.RemoveMyOldPortal(), Terraria.Projectile.Shimmer(), Terraria.Projectile.Update(), Terraria.Player.UpdateAbigailStatus(), Terraria.Player.UpdateMaxTurrets(), and Terraria.Player.UpdateStormTigerStatus().