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

◆ AI_075()

void Terraria.Projectile.AI_075 ( )
inlineprivate

Definition at line 55598 of file Projectile.cs.

55599 {
55600 Player player = Main.player[owner];
55601 float num = (float)Math.PI / 2f;
55602 Vector2 vector = player.RotatedRelativePoint(player.MountedCenter);
55603 int num2 = 2;
55604 float num3 = 0f;
55605 if (type == 439)
55606 {
55607 ai[0] += 1f;
55608 int num4 = 0;
55609 if (ai[0] >= 40f)
55610 {
55611 num4++;
55612 }
55613 if (ai[0] >= 80f)
55614 {
55615 num4++;
55616 }
55617 if (ai[0] >= 120f)
55618 {
55619 num4++;
55620 }
55621 int num5 = 24;
55622 int num6 = 6;
55623 ai[1] += 1f;
55624 bool flag = false;
55625 if (ai[1] >= (float)(num5 - num6 * num4))
55626 {
55627 ai[1] = 0f;
55628 flag = true;
55629 }
55630 frameCounter += 1 + num4;
55631 if (frameCounter >= 4)
55632 {
55633 frameCounter = 0;
55634 frame++;
55635 if (frame >= 6)
55636 {
55637 frame = 0;
55638 }
55639 }
55640 if (soundDelay <= 0)
55641 {
55642 soundDelay = num5 - num6 * num4;
55643 if (ai[0] != 1f)
55644 {
55646 }
55647 }
55648 if (ai[1] == 1f && ai[0] != 1f)
55649 {
55650 Vector2 spinningpoint = Vector2.UnitX * 24f;
55651 spinningpoint = spinningpoint.RotatedBy(rotation - (float)Math.PI / 2f);
55652 Vector2 vector2 = base.Center + spinningpoint;
55653 for (int i = 0; i < 2; i++)
55654 {
55655 int num7 = Dust.NewDust(vector2 - Vector2.One * 8f, 16, 16, 135, velocity.X / 2f, velocity.Y / 2f, 100);
55656 Main.dust[num7].velocity *= 0.66f;
55657 Main.dust[num7].noGravity = true;
55658 Main.dust[num7].scale = 1.4f;
55659 }
55660 }
55661 if (flag && Main.myPlayer == owner)
55662 {
55663 if (player.channel && player.CheckMana(player.inventory[player.selectedItem].mana, pay: true) && !player.noItems && !player.CCed)
55664 {
55665 float num8 = player.inventory[player.selectedItem].shootSpeed * scale;
55667 Vector2 value = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector3;
55668 if (player.gravDir == -1f)
55669 {
55670 value.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector3.Y;
55671 }
55673 if (float.IsNaN(vector4.X) || float.IsNaN(vector4.Y))
55674 {
55676 }
55677 vector4 *= num8;
55678 if (vector4.X != velocity.X || vector4.Y != velocity.Y)
55679 {
55680 netUpdate = true;
55681 }
55682 velocity = vector4;
55683 int num9 = 440;
55684 float num10 = 14f;
55685 int num11 = 7;
55686 for (int j = 0; j < 2; j++)
55687 {
55688 vector3 = base.Center + new Vector2(Main.rand.Next(-num11, num11 + 1), Main.rand.Next(-num11, num11 + 1));
55690 spinningpoint2 = spinningpoint2.RotatedBy(Main.rand.NextDouble() * 0.19634954631328583 - 0.09817477315664291);
55691 if (float.IsNaN(spinningpoint2.X) || float.IsNaN(spinningpoint2.Y))
55692 {
55694 }
55696 }
55697 }
55698 else
55699 {
55700 Kill();
55701 }
55702 }
55703 }
55704 if (type == 445)
55705 {
55706 if (soundDelay <= 0)
55707 {
55709 soundDelay = 23;
55710 }
55711 localAI[0] += 1f;
55712 if (localAI[0] >= 60f)
55713 {
55714 localAI[0] = 0f;
55715 }
55716 if (Vector2.Distance(vector, base.Center) >= 5f)
55717 {
55718 float num12 = localAI[0] / 60f;
55719 if (num12 > 0.5f)
55720 {
55721 num12 = 1f - num12;
55722 }
55723 Vector3 value2 = new Vector3(0f, 1f, 0.7f);
55724 Vector3 value3 = new Vector3(0f, 0.7f, 1f);
55725 Vector3 vector5 = Vector3.Lerp(value2, value3, 1f - num12 * 2f) * 0.5f;
55726 if (Vector2.Distance(vector, base.Center) >= 30f)
55727 {
55728 Vector2 vector6 = base.Center - vector;
55729 vector6.Normalize();
55730 vector6 *= Vector2.Distance(vector, base.Center) - 30f;
55731 DelegateMethods.v3_1 = vector5 * 0.8f;
55732 Utils.PlotTileLine(base.Center - vector6, base.Center, 8f, DelegateMethods.CastLightOpen);
55733 }
55734 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, vector5.X, vector5.Y, vector5.Z);
55735 }
55736 if (Main.myPlayer == owner)
55737 {
55738 if (localAI[1] > 0f)
55739 {
55740 localAI[1] -= 1f;
55741 }
55742 if (!player.channel || player.noItems || player.CCed)
55743 {
55744 Kill();
55745 }
55746 else if (localAI[1] == 0f)
55747 {
55749 Vector2 value4 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector7;
55750 if (player.gravDir == -1f)
55751 {
55752 value4.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector7.Y;
55753 }
55754 if (Main.tile[Player.tileTargetX, Player.tileTargetY].active())
55755 {
55756 value4 = new Vector2(Player.tileTargetX, Player.tileTargetY) * 16f + Vector2.One * 8f - vector7;
55757 localAI[1] = 2f;
55758 }
55759 value4 = Vector2.Lerp(value4, velocity, 0.7f);
55760 if (float.IsNaN(value4.X) || float.IsNaN(value4.Y))
55761 {
55762 value4 = -Vector2.UnitY;
55763 }
55764 float num13 = 30f;
55765 if (value4.Length() < num13)
55766 {
55768 }
55769 int tileBoost = player.inventory[player.selectedItem].tileBoost;
55770 int num14 = -Player.tileRangeX - tileBoost + 1;
55771 int num15 = Player.tileRangeX + tileBoost - 1;
55772 int num16 = -Player.tileRangeY - tileBoost;
55773 int num17 = Player.tileRangeY + tileBoost - 1;
55774 int num18 = 12;
55775 bool flag2 = false;
55776 if (value4.X < (float)(num14 * 16 - num18))
55777 {
55778 flag2 = true;
55779 }
55780 if (value4.Y < (float)(num16 * 16 - num18))
55781 {
55782 flag2 = true;
55783 }
55784 if (value4.X > (float)(num15 * 16 + num18))
55785 {
55786 flag2 = true;
55787 }
55788 if (value4.Y > (float)(num17 * 16 + num18))
55789 {
55790 flag2 = true;
55791 }
55792 if (flag2)
55793 {
55795 float num19 = -1f;
55796 if (vector8.X < 0f && ((float)(num14 * 16 - num18) / vector8.X < num19 || num19 == -1f))
55797 {
55798 num19 = (float)(num14 * 16 - num18) / vector8.X;
55799 }
55800 if (vector8.X > 0f && ((float)(num15 * 16 + num18) / vector8.X < num19 || num19 == -1f))
55801 {
55802 num19 = (float)(num15 * 16 + num18) / vector8.X;
55803 }
55804 if (vector8.Y < 0f && ((float)(num16 * 16 - num18) / vector8.Y < num19 || num19 == -1f))
55805 {
55806 num19 = (float)(num16 * 16 - num18) / vector8.Y;
55807 }
55808 if (vector8.Y > 0f && ((float)(num17 * 16 + num18) / vector8.Y < num19 || num19 == -1f))
55809 {
55810 num19 = (float)(num17 * 16 + num18) / vector8.Y;
55811 }
55812 value4 = vector8 * num19;
55813 }
55814 if (value4.X != velocity.X || value4.Y != velocity.Y)
55815 {
55816 netUpdate = true;
55817 }
55818 velocity = value4;
55819 }
55820 }
55821 }
55822 if (type == 460)
55823 {
55824 ai[0] += 1f;
55825 int num20 = 0;
55826 if (ai[0] >= 80f)
55827 {
55828 num20++;
55829 }
55830 if (ai[0] >= 180f)
55831 {
55832 num20++;
55833 }
55834 bool flag3 = false;
55835 _ = ai[0];
55836 if (ai[0] == 80f || ai[0] == 180f || (ai[0] > 180f && ai[0] % 20f == 0f))
55837 {
55838 flag3 = true;
55839 }
55840 bool flag4 = ai[0] >= 180f;
55841 int num21 = 5;
55842 if (!flag4)
55843 {
55844 ai[1] += 1f;
55845 }
55846 bool flag5 = false;
55847 if (ai[0] == 1f)
55848 {
55849 flag5 = true;
55850 }
55851 if (flag4 && ai[0] % 20f == 0f)
55852 {
55853 flag5 = true;
55854 }
55855 if ((!flag4 && ai[1] >= (float)num21) || (flag4 && ai[0] % 5f == 0f))
55856 {
55857 if (!flag4)
55858 {
55859 ai[1] = 0f;
55860 }
55861 flag5 = true;
55862 float num22 = player.inventory[player.selectedItem].shootSpeed * scale;
55864 Vector2 value5 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector9;
55865 if (player.gravDir == -1f)
55866 {
55867 value5.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector9.Y;
55868 }
55870 if (float.IsNaN(vector10.X) || float.IsNaN(vector10.Y))
55871 {
55873 }
55874 vector10 *= num22;
55875 if (vector10.X != velocity.X || vector10.Y != velocity.Y)
55876 {
55877 netUpdate = true;
55878 }
55880 }
55881 if (soundDelay <= 0 && !flag4)
55882 {
55884 soundDelay *= 2;
55885 if (ai[0] != 1f)
55886 {
55888 }
55889 }
55890 if (ai[0] > 10f && !flag4)
55891 {
55892 Vector2 spinningpoint3 = Vector2.UnitX * 18f;
55893 spinningpoint3 = spinningpoint3.RotatedBy(rotation - (float)Math.PI / 2f);
55894 Vector2 vector11 = base.Center + spinningpoint3;
55895 for (int k = 0; k < num20 + 1; k++)
55896 {
55897 int num23 = 226;
55898 float num24 = 0.4f;
55899 if (k % 2 == 1)
55900 {
55901 num23 = 226;
55902 num24 = 0.65f;
55903 }
55904 Vector2 vector12 = vector11 + ((float)Main.rand.NextDouble() * ((float)Math.PI * 2f)).ToRotationVector2() * (12f - (float)(num20 * 2));
55905 int num25 = Dust.NewDust(vector12 - Vector2.One * 8f, 16, 16, num23, velocity.X / 2f, velocity.Y / 2f);
55906 Main.dust[num25].velocity = Vector2.Normalize(vector11 - vector12) * 1.5f * (10f - (float)num20 * 2f) / 10f;
55907 Main.dust[num25].noGravity = true;
55908 Main.dust[num25].scale = num24;
55909 Main.dust[num25].customData = player;
55910 }
55911 }
55912 if (flag4)
55913 {
55914 Vector2 spinningpoint4 = Vector2.UnitX * 14f;
55915 spinningpoint4 = spinningpoint4.RotatedBy(rotation - (float)Math.PI / 2f);
55916 Vector2 vector13 = base.Center + spinningpoint4;
55917 for (int l = 0; l < 2; l++)
55918 {
55919 int num26 = 226;
55920 float num27 = 0.35f;
55921 if (l % 2 == 1)
55922 {
55923 num26 = 226;
55924 num27 = 0.45f;
55925 }
55926 float num28 = Main.rand.NextFloatDirection();
55927 Vector2 vector14 = vector13 + (rotation + num28 * ((float)Math.PI / 4f) * 0.8f - (float)Math.PI / 2f).ToRotationVector2() * 6f;
55928 int num29 = 24;
55929 int num30 = Dust.NewDust(vector14 - Vector2.One * (num29 / 2), num29, num29, num26, velocity.X / 2f, velocity.Y / 2f);
55930 Main.dust[num30].velocity = (vector14 - vector13).SafeNormalize(Vector2.Zero) * MathHelper.Lerp(1.5f, 9f, Utils.GetLerpValue(1f, 0f, Math.Abs(num28), clamped: true));
55931 Main.dust[num30].noGravity = true;
55932 Main.dust[num30].scale = num27;
55933 Main.dust[num30].customData = player;
55934 Main.dust[num30].fadeIn = 0.5f;
55935 }
55936 }
55937 if (flag5 && Main.myPlayer == owner)
55938 {
55939 bool flag6 = false;
55940 flag6 = !flag3 || player.CheckMana(player.inventory[player.selectedItem].mana, pay: true);
55941 if (player.channel && flag6 && !player.noItems && !player.CCed)
55942 {
55943 if (ai[0] == 180f)
55944 {
55945 Vector2 center = base.Center;
55947 if (float.IsNaN(vector15.X) || float.IsNaN(vector15.Y))
55948 {
55950 }
55951 int num31 = (int)((float)damage * 1.5f);
55953 ai[1] = num32;
55954 netUpdate = true;
55955 }
55956 else if (flag4)
55957 {
55958 Projectile projectile = Main.projectile[(int)ai[1]];
55959 if (!projectile.active || projectile.type != 461)
55960 {
55961 Kill();
55962 return;
55963 }
55964 }
55965 else
55966 {
55967 bool flag7 = false;
55968 if (ai[0] == 1f)
55969 {
55970 flag7 = true;
55971 }
55972 if (ai[0] <= 50f && ai[0] % 10f == 0f)
55973 {
55974 flag7 = true;
55975 }
55976 if (ai[0] >= 80f && ai[0] < 180f && ai[0] % 30f == 0f)
55977 {
55978 flag7 = true;
55979 }
55980 if (flag7)
55981 {
55983 int num33 = 459;
55984 float num34 = 10f;
55985 vector16 = base.Center;
55987 if (float.IsNaN(vector17.X) || float.IsNaN(vector17.Y))
55988 {
55990 }
55991 float num35 = 0.7f + (float)num20 * 0.3f;
55992 int num36 = ((num35 < 1f) ? damage : ((int)((float)damage * 2.5f)));
55994 }
55995 }
55996 }
55997 else
55998 {
55999 Kill();
56000 }
56001 }
56002 }
56003 if (type == 633)
56004 {
56005 float num37 = 30f;
56006 if (ai[0] > 90f)
56007 {
56008 num37 = 15f;
56009 }
56010 if (ai[0] > 120f)
56011 {
56012 num37 = 5f;
56013 }
56014 damage = (int)((float)player.inventory[player.selectedItem].damage * player.magicDamage);
56015 ai[0] += 1f;
56016 ai[1] += 1f;
56017 bool flag8 = false;
56018 if (ai[0] % num37 == 0f)
56019 {
56020 flag8 = true;
56021 }
56022 int num38 = 10;
56023 bool flag9 = false;
56024 if (ai[0] % num37 == 0f)
56025 {
56026 flag9 = true;
56027 }
56028 if (ai[1] >= 1f)
56029 {
56030 ai[1] = 0f;
56031 flag9 = true;
56032 if (Main.myPlayer == owner)
56033 {
56034 float num39 = player.inventory[player.selectedItem].shootSpeed * scale;
56036 Vector2 value6 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector18;
56037 if (player.gravDir == -1f)
56038 {
56039 value6.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector18.Y;
56040 }
56042 if (float.IsNaN(value7.X) || float.IsNaN(value7.Y))
56043 {
56044 value7 = -Vector2.UnitY;
56045 }
56047 value7 *= num39;
56048 if (value7.X != velocity.X || value7.Y != velocity.Y)
56049 {
56050 netUpdate = true;
56051 }
56052 velocity = value7;
56053 }
56054 }
56055 frameCounter++;
56056 int num40 = ((!(ai[0] < 120f)) ? 1 : 4);
56057 if (frameCounter >= num40)
56058 {
56059 frameCounter = 0;
56060 if (++frame >= 5)
56061 {
56062 frame = 0;
56063 }
56064 }
56065 if (soundDelay <= 0)
56066 {
56067 soundDelay = num38;
56068 soundDelay *= 2;
56069 if (ai[0] != 1f)
56070 {
56072 }
56073 }
56074 if (flag9 && Main.myPlayer == owner)
56075 {
56076 bool flag10 = false;
56077 flag10 = !flag8 || player.CheckMana(player.inventory[player.selectedItem].mana, pay: true);
56078 if (player.channel && flag10 && !player.noItems && !player.CCed)
56079 {
56080 if (ai[0] == 1f)
56081 {
56082 Vector2 center2 = base.Center;
56084 if (float.IsNaN(vector19.X) || float.IsNaN(vector19.Y))
56085 {
56087 }
56088 int num41 = damage;
56089 for (int m = 0; m < 6; m++)
56090 {
56092 }
56093 netUpdate = true;
56094 }
56095 }
56096 else
56097 {
56098 Kill();
56099 }
56100 }
56101 }
56102 if (type == 595)
56103 {
56104 num = 0f;
56105 if (spriteDirection == -1)
56106 {
56107 num = (float)Math.PI;
56108 }
56109 if (++frame >= Main.projFrames[type])
56110 {
56111 frame = 0;
56112 }
56113 soundDelay--;
56114 if (soundDelay <= 0)
56115 {
56117 soundDelay = 12;
56118 }
56119 if (Main.myPlayer == owner)
56120 {
56121 if (player.channel && !player.noItems && !player.CCed)
56122 {
56123 float num42 = 1f;
56124 if (player.inventory[player.selectedItem].shoot == type)
56125 {
56126 num42 = player.inventory[player.selectedItem].shootSpeed * scale;
56127 }
56128 Vector2 vec = Main.MouseWorld - vector;
56129 vec.Normalize();
56130 if (vec.HasNaNs())
56131 {
56132 vec = Vector2.UnitX * player.direction;
56133 }
56134 vec *= num42;
56135 if (vec.X != velocity.X || vec.Y != velocity.Y)
56136 {
56137 netUpdate = true;
56138 }
56139 velocity = vec;
56140 }
56141 else
56142 {
56143 Kill();
56144 }
56145 }
56146 Vector2 vector20 = base.Center + velocity * 3f;
56147 Lighting.AddLight(vector20, 0.8f, 0.8f, 0.8f);
56148 if (Main.rand.Next(3) == 0)
56149 {
56150 int num43 = Dust.NewDust(vector20 - base.Size / 2f, width, height, 63, velocity.X, velocity.Y, 100, default(Color), 2f);
56151 Main.dust[num43].noGravity = true;
56152 Main.dust[num43].position -= velocity;
56153 }
56154 }
56155 if (type == 735)
56156 {
56157 num = 0f;
56158 if (spriteDirection == -1)
56159 {
56160 num = (float)Math.PI;
56161 }
56162 if (++frame >= Main.projFrames[type])
56163 {
56164 frame = 0;
56165 }
56166 soundDelay--;
56167 if (soundDelay <= 0)
56168 {
56170 soundDelay = 12;
56171 }
56172 if (Main.myPlayer == owner)
56173 {
56174 if (player.channel && !player.noItems && !player.CCed)
56175 {
56176 float num44 = 1f;
56177 if (player.inventory[player.selectedItem].shoot == type)
56178 {
56179 num44 = player.inventory[player.selectedItem].shootSpeed * scale;
56180 }
56181 Vector2 vec2 = Main.MouseWorld - vector;
56182 vec2.Normalize();
56183 if (vec2.HasNaNs())
56184 {
56185 vec2 = Vector2.UnitX * player.direction;
56186 }
56187 vec2 *= num44;
56188 if (vec2.X != velocity.X || vec2.Y != velocity.Y)
56189 {
56190 netUpdate = true;
56191 }
56192 velocity = vec2;
56193 }
56194 else
56195 {
56196 Kill();
56197 }
56198 }
56199 Vector2 vector21 = base.Center + velocity * 3f;
56200 Lighting.AddLight(vector21, 0.8f, 0.8f, 0.8f);
56201 if (Main.rand.Next(3) == 0)
56202 {
56203 int num45 = Dust.NewDust(vector21 - base.Size / 2f, width, height, 302, velocity.X, velocity.Y, 100, default(Color), 2f);
56204 Main.dust[num45].noGravity = true;
56205 Main.dust[num45].position -= velocity;
56206 }
56207 }
56208 if (type == 927)
56209 {
56210 num = 0f;
56211 scale = ai[1];
56212 ai[0] += 1f;
56213 if (ai[0] >= 8f)
56214 {
56215 ai[0] = 0f;
56216 }
56217 num2 = 9;
56218 num3 = Main.rand.NextFloatDirection() * ((float)Math.PI * 2f) * 0.05f;
56219 soundDelay--;
56220 if (soundDelay <= 0)
56221 {
56223 soundDelay = 6;
56224 }
56225 if (Main.myPlayer == owner)
56226 {
56227 if (player.channel && !player.noItems && !player.CCed)
56228 {
56229 float num46 = 1f;
56230 if (player.inventory[player.selectedItem].shoot == type)
56231 {
56232 num46 = player.inventory[player.selectedItem].shootSpeed;
56233 }
56234 Vector2 vec3 = Main.MouseWorld - vector;
56235 vec3.Normalize();
56236 if (vec3.HasNaNs())
56237 {
56238 vec3 = Vector2.UnitX * player.direction;
56239 }
56240 vec3 *= num46;
56241 if (vec3.X != velocity.X || vec3.Y != velocity.Y)
56242 {
56243 netUpdate = true;
56244 }
56245 velocity = vec3;
56246 }
56247 else
56248 {
56249 Kill();
56250 }
56251 }
56252 DelegateMethods.v3_1 = new Vector3(0.5f, 0.5f, 0.5f);
56253 Utils.PlotTileLine(base.Center - velocity, base.Center + velocity.SafeNormalize(Vector2.Zero) * 80f, 16f, DelegateMethods.CastLightOpen);
56254 }
56255 if (type == 600)
56256 {
56257 _ = ai[0];
56258 _ = 0f;
56259 ai[0] += 1f;
56260 if (Main.myPlayer == owner && ai[0] == 1f)
56261 {
56262 float num47 = player.inventory[player.selectedItem].shootSpeed * scale;
56264 Vector2 value8 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector22;
56265 if (player.gravDir == -1f)
56266 {
56267 value8.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector22.Y;
56268 }
56270 if (float.IsNaN(vector23.X) || float.IsNaN(vector23.Y))
56271 {
56273 }
56274 vector23 *= num47;
56275 if (vector23.X != velocity.X || vector23.Y != velocity.Y)
56276 {
56277 netUpdate = true;
56278 }
56280 int num48 = 601;
56281 float num49 = 3f;
56282 vector22 = base.Center;
56284 if (float.IsNaN(vector24.X) || float.IsNaN(vector24.Y))
56285 {
56287 }
56289 }
56290 if (ai[0] >= 30f)
56291 {
56292 Kill();
56293 }
56294 }
56295 if (type == 611)
56296 {
56297 if (Main.netMode != 2 && localAI[0] == 0f)
56298 {
56300 }
56301 if (localAI[1] > 0f)
56302 {
56303 localAI[1] -= 1f;
56304 }
56305 alpha -= 42;
56306 if (alpha < 0)
56307 {
56308 alpha = 0;
56309 }
56310 if (localAI[0] == 0f)
56311 {
56312 localAI[0] = velocity.ToRotation();
56313 }
56314 float num50 = ((localAI[0].ToRotationVector2().X >= 0f) ? 1 : (-1));
56315 if (ai[1] <= 0f)
56316 {
56317 num50 *= -1f;
56318 }
56319 Vector2 spinningpoint5 = (num50 * (ai[0] / 30f * ((float)Math.PI * 2f) - (float)Math.PI / 2f)).ToRotationVector2();
56320 spinningpoint5.Y *= (float)Math.Sin(ai[1]);
56321 if (ai[1] <= 0f)
56322 {
56323 spinningpoint5.Y *= -1f;
56324 }
56325 spinningpoint5 = spinningpoint5.RotatedBy(localAI[0]);
56326 ai[0] += 1f;
56327 if (ai[0] < 30f)
56328 {
56329 velocity += 48f * spinningpoint5;
56330 }
56331 else
56332 {
56333 Kill();
56334 }
56335 }
56336 if (type == 615)
56337 {
56338 num = 0f;
56339 if (spriteDirection == -1)
56340 {
56341 num = (float)Math.PI;
56342 }
56343 ai[0] += 1f;
56344 int num51 = 0;
56345 if (ai[0] >= 40f)
56346 {
56347 num51++;
56348 }
56349 if (ai[0] >= 80f)
56350 {
56351 num51++;
56352 }
56353 if (ai[0] >= 120f)
56354 {
56355 num51++;
56356 }
56357 int num52 = 5;
56358 int num53 = 0;
56359 ai[1] -= 1f;
56360 bool flag11 = false;
56361 int num54 = -1;
56362 if (ai[1] <= 0f)
56363 {
56364 ai[1] = num52 - num53 * num51;
56365 flag11 = true;
56366 if ((int)ai[0] / (num52 - num53 * num51) % 7 == 0)
56367 {
56368 num54 = 0;
56369 }
56370 }
56371 frameCounter += 1 + num51;
56372 if (frameCounter >= 4)
56373 {
56374 frameCounter = 0;
56375 frame++;
56376 if (frame >= Main.projFrames[type])
56377 {
56378 frame = 0;
56379 }
56380 }
56381 if (soundDelay <= 0)
56382 {
56384 if (ai[0] != 1f)
56385 {
56387 }
56388 }
56389 if (flag11 && Main.myPlayer == owner)
56390 {
56391 bool canShoot = player.channel && player.HasAmmo(player.inventory[player.selectedItem], canUse: true) && !player.noItems && !player.CCed;
56392 int projToShoot = 14;
56393 float speed = 14f;
56394 int Damage = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56395 float KnockBack = player.inventory[player.selectedItem].knockBack;
56396 if (canShoot)
56397 {
56398 player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot, ref speed, ref canShoot, ref Damage, ref KnockBack, out var usedAmmoItemId);
56399 IEntitySource projectileSource_Item_WithPotentialAmmo = player.GetProjectileSource_Item_WithPotentialAmmo(player.HeldItem, usedAmmoItemId);
56400 KnockBack = player.GetWeaponKnockback(player.inventory[player.selectedItem], KnockBack);
56401 float num55 = player.inventory[player.selectedItem].shootSpeed * scale;
56403 Vector2 value9 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector25;
56404 if (player.gravDir == -1f)
56405 {
56406 value9.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector25.Y;
56407 }
56409 if (float.IsNaN(spinningpoint6.X) || float.IsNaN(spinningpoint6.Y))
56410 {
56412 }
56414 spinningpoint6 = spinningpoint6.RotatedBy(Main.rand.NextDouble() * 0.13089969754219055 - 0.06544984877109528);
56416 {
56417 netUpdate = true;
56418 }
56420 for (int n = 0; n < 1; n++)
56421 {
56423 spinningpoint7 = spinningpoint7.RotatedBy(Main.rand.NextDouble() * 0.19634954631328583 - 0.09817477315664291);
56424 if (float.IsNaN(spinningpoint7.X) || float.IsNaN(spinningpoint7.Y))
56425 {
56427 }
56429 }
56430 if (num54 == 0)
56431 {
56432 projToShoot = 616;
56433 speed = 8f;
56434 for (int num56 = 0; num56 < 1; num56++)
56435 {
56437 spinningpoint8 = spinningpoint8.RotatedBy(Main.rand.NextDouble() * 0.39269909262657166 - 0.19634954631328583);
56438 if (float.IsNaN(spinningpoint8.X) || float.IsNaN(spinningpoint8.Y))
56439 {
56441 }
56443 }
56444 }
56445 }
56446 else
56447 {
56448 Kill();
56449 }
56450 }
56451 }
56452 if (type == 714)
56453 {
56454 num = 0f;
56455 if (spriteDirection == -1)
56456 {
56457 num = (float)Math.PI;
56458 }
56459 ai[0] += 1f;
56460 int num57 = 0;
56461 int num58 = 8;
56462 int num59 = 0;
56463 ai[1] -= 1f;
56464 bool flag12 = false;
56465 int num60 = -1;
56466 if (ai[1] <= 0f)
56467 {
56468 ai[1] = num58 - num59 * num57;
56469 flag12 = true;
56470 int num61 = (int)ai[0] / (num58 - num59 * num57);
56471 if (num61 % 7 == 0)
56472 {
56473 num60 = 0;
56474 }
56475 num60 = num61 % 7;
56476 }
56477 _ = rotation;
56478 Vector2 center3 = base.Center;
56479 _ = direction;
56480 Vector2 v = velocity;
56481 frameCounter += 1 + num57;
56482 if (frameCounter >= 4)
56483 {
56484 frameCounter = 0;
56485 frame++;
56486 if (frame >= Main.projFrames[type])
56487 {
56488 frame = 0;
56489 }
56490 }
56491 if (soundDelay <= 0 && Main.player[owner].controlUseItem)
56492 {
56494 if (ai[0] != 1f)
56495 {
56497 }
56498 }
56499 if (flag12 && Main.myPlayer == owner)
56500 {
56501 bool canShoot2 = player.channel && player.HasAmmo(player.inventory[player.selectedItem], canUse: true) && !player.noItems && !player.CCed;
56502 int projToShoot2 = 134;
56503 float speed2 = 8f;
56504 int Damage2 = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56505 float KnockBack2 = player.inventory[player.selectedItem].knockBack;
56506 if (num60 == 3)
56507 {
56508 speed2 += 1f;
56509 }
56510 if (canShoot2)
56511 {
56512 player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot2, ref speed2, ref canShoot2, ref Damage2, ref KnockBack2, out var usedAmmoItemId2);
56513 KnockBack2 = player.GetWeaponKnockback(player.inventory[player.selectedItem], KnockBack2);
56514 IEntitySource projectileSource_Item_WithPotentialAmmo2 = player.GetProjectileSource_Item_WithPotentialAmmo(player.HeldItem, usedAmmoItemId2);
56515 float num62 = player.inventory[player.selectedItem].shootSpeed * scale;
56517 Vector2 value10 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector26;
56518 if (player.gravDir == -1f)
56519 {
56520 value10.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector26.Y;
56521 }
56523 if (float.IsNaN(spinningpoint9.X) || float.IsNaN(spinningpoint9.Y))
56524 {
56526 }
56528 spinningpoint9 = spinningpoint9.RotatedBy((Main.rand.NextDouble() * 0.13089969754219055 - 0.06544984877109528) * 0.5);
56530 {
56531 netUpdate = true;
56532 }
56534 for (int num63 = 0; num63 < 1; num63++)
56535 {
56537 spinningpoint10 = spinningpoint10.RotatedBy(Main.rand.NextDouble() * 0.19634954631328583 - 0.09817477315664291);
56538 if (float.IsNaN(spinningpoint10.X) || float.IsNaN(spinningpoint10.Y))
56539 {
56541 }
56543 if (num60 == 5)
56544 {
56545 for (float num64 = -1f; num64 <= 1f; num64 += 2f)
56546 {
56547 Vector2 vector27 = spinningpoint10.RotatedBy((float)Math.PI * 2f * num64 * 1f / 80f);
56548 if (float.IsNaN(spinningpoint10.X) || float.IsNaN(spinningpoint10.Y))
56549 {
56551 }
56553 }
56554 }
56555 if (num60 == 4)
56556 {
56558 }
56559 }
56560 }
56561 else
56562 {
56563 Kill();
56564 }
56565 }
56566 Vector2 vector28 = base.Center + velocity.ToRotation().ToRotationVector2() * 40f;
56567 Vector2 vector29 = center3 + v.ToRotation().ToRotationVector2() * 40f;
56568 Color color = Main.hslToRgb(ai[0] / 90f % 1f, 1f, 0.5f);
56569 color.A = 120;
56570 int num65 = 267;
56571 Dust dust = Dust.NewDustPerfect(vector28, num65, Vector2.Zero);
56572 dust.color = color;
56573 dust.scale = 0.6f;
56574 dust.fadeIn = 0.9f;
56575 dust.noGravity = true;
56576 Dust dust2 = Dust.NewDustPerfect(vector28, num65, Vector2.Zero);
56577 dust2.color = color;
56578 dust2.scale = 0.6f;
56579 dust2.fadeIn = 0.7f;
56580 dust2.noGravity = true;
56581 dust2.velocity = -velocity.RotatedBy(2.094395160675049) / 10f;
56582 Dust dust3 = Dust.NewDustPerfect(vector28, num65, Vector2.Zero);
56583 dust3.color = color;
56584 dust3.scale = 0.6f;
56585 dust3.fadeIn = 0.7f;
56586 dust3.noGravity = true;
56587 dust3.velocity = -velocity.RotatedBy(-2.094395160675049) / 10f;
56588 if (vector28 != vector29)
56589 {
56590 float num66 = -1f;
56591 Dust dust4 = Dust.NewDustPerfect(Vector2.Lerp(vector28, vector29, 0.8f), num65, Vector2.Zero);
56592 dust4.velocity = (vector28 - vector29).SafeNormalize(Vector2.Zero) * 2f;
56593 dust4.color = color;
56594 dust4.scale = 0.6f;
56595 dust4.fadeIn = 0.9f;
56596 dust4.velocity *= num66;
56597 dust4.noGravity = true;
56598 Dust dust5 = Dust.NewDustPerfect(Vector2.Lerp(vector28, vector29, 0.5f), num65, Vector2.Zero);
56599 dust5.velocity = (vector28 - vector29).SafeNormalize(Vector2.Zero) * 2f;
56600 dust5.color = color;
56601 dust5.scale = 0.6f;
56602 dust5.fadeIn = 0.9f;
56603 dust5.velocity *= num66;
56604 dust5.noGravity = true;
56605 Dust dust6 = Dust.NewDustPerfect(Vector2.Lerp(vector28, vector29, 0.2f), num65, Vector2.Zero);
56606 dust6.velocity = (vector28 - vector29).SafeNormalize(Vector2.Zero) * 2f;
56607 dust6.color = color;
56608 dust6.scale = 0.6f;
56609 dust6.fadeIn = 0.9f;
56610 dust6.velocity *= num66;
56611 dust6.noGravity = true;
56612 }
56613 }
56614 if (type == 630)
56615 {
56616 num = 0f;
56617 if (spriteDirection == -1)
56618 {
56619 num = (float)Math.PI;
56620 }
56621 ai[0] += 1f;
56622 int num67 = 0;
56623 if (ai[0] >= 40f)
56624 {
56625 num67++;
56626 }
56627 if (ai[0] >= 80f)
56628 {
56629 num67++;
56630 }
56631 if (ai[0] >= 120f)
56632 {
56633 num67++;
56634 }
56635 int num68 = 24;
56636 int num69 = 2;
56637 ai[1] -= 1f;
56638 bool flag13 = false;
56639 if (ai[1] <= 0f)
56640 {
56641 ai[1] = num68 - num69 * num67;
56642 flag13 = true;
56643 _ = (int)ai[0] / (num68 - num69 * num67);
56644 }
56645 bool canShoot3 = player.channel && player.HasAmmo(player.inventory[player.selectedItem], canUse: true) && !player.noItems && !player.CCed;
56646 if (localAI[0] > 0f)
56647 {
56648 localAI[0] -= 1f;
56649 }
56650 if (soundDelay <= 0 && canShoot3)
56651 {
56653 if (ai[0] != 1f)
56654 {
56656 }
56657 localAI[0] = 12f;
56658 }
56659 player.phantasmTime = 2;
56660 if (flag13 && Main.myPlayer == owner)
56661 {
56662 int projToShoot3 = 14;
56663 float speed3 = 14f;
56664 int Damage3 = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56665 float KnockBack3 = player.inventory[player.selectedItem].knockBack;
56666 if (canShoot3)
56667 {
56668 player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot3, ref speed3, ref canShoot3, ref Damage3, ref KnockBack3, out var usedAmmoItemId3);
56669 IEntitySource projectileSource_Item_WithPotentialAmmo3 = player.GetProjectileSource_Item_WithPotentialAmmo(player.HeldItem, usedAmmoItemId3);
56670 KnockBack3 = player.GetWeaponKnockback(player.inventory[player.selectedItem], KnockBack3);
56671 float num70 = player.inventory[player.selectedItem].shootSpeed * scale;
56673 Vector2 value11 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector30;
56674 if (player.gravDir == -1f)
56675 {
56676 value11.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector30.Y;
56677 }
56679 if (float.IsNaN(vector31.X) || float.IsNaN(vector31.Y))
56680 {
56682 }
56683 vector31 *= num70;
56684 if (vector31.X != velocity.X || vector31.Y != velocity.Y)
56685 {
56686 netUpdate = true;
56687 }
56688 velocity = vector31 * 0.55f;
56689 for (int num71 = 0; num71 < 4; num71++)
56690 {
56691 Vector2 vector32 = Vector2.Normalize(velocity) * speed3 * (0.6f + Main.rand.NextFloat() * 0.8f);
56692 if (float.IsNaN(vector32.X) || float.IsNaN(vector32.Y))
56693 {
56695 }
56696 Vector2 vector33 = vector30 + Utils.RandomVector2(Main.rand, -15f, 15f);
56698 Main.projectile[num72].noDropItem = true;
56699 }
56700 }
56701 else
56702 {
56703 Kill();
56704 }
56705 }
56706 }
56707 if (type == 705)
56708 {
56709 num = 0f;
56710 if (spriteDirection == -1)
56711 {
56712 num = (float)Math.PI;
56713 }
56714 ai[0] += 1f;
56715 int itemAnimationMax = player.itemAnimationMax;
56716 ai[1] -= 1f;
56717 bool flag14 = false;
56718 if (ai[1] <= 0f)
56719 {
56720 ai[1] = itemAnimationMax;
56721 flag14 = true;
56722 }
56723 bool canShoot4 = player.channel && player.HasAmmo(player.inventory[player.selectedItem], canUse: true) && !player.noItems && !player.CCed;
56724 if (localAI[0] > 0f)
56725 {
56726 localAI[0] -= 1f;
56727 }
56728 if (soundDelay <= 0 && canShoot4)
56729 {
56730 soundDelay = itemAnimationMax;
56731 if (ai[0] != 1f)
56732 {
56734 }
56735 localAI[0] = 12f;
56736 }
56737 if (flag14 && Main.myPlayer == owner)
56738 {
56739 int projToShoot4 = 14;
56740 float speed4 = 12f;
56741 int Damage4 = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56742 float KnockBack4 = player.inventory[player.selectedItem].knockBack;
56743 int num73 = 2;
56744 float num74 = 1.5f;
56745 if (canShoot4)
56746 {
56747 player.PickAmmo(player.inventory[player.selectedItem], ref projToShoot4, ref speed4, ref canShoot4, ref Damage4, ref KnockBack4, out var usedAmmoItemId4);
56748 IEntitySource projectileSource_Item_WithPotentialAmmo4 = player.GetProjectileSource_Item_WithPotentialAmmo(player.HeldItem, usedAmmoItemId4);
56749 KnockBack4 = player.GetWeaponKnockback(player.inventory[player.selectedItem], KnockBack4);
56750 if (projToShoot4 == 1)
56751 {
56752 projToShoot4 = 2;
56753 }
56754 if (++player.phantomPhoneixCounter >= 3)
56755 {
56756 player.phantomPhoneixCounter = 0;
56757 num73 = 1;
56758 Damage4 *= 2;
56759 num74 = 0f;
56760 ai[1] *= 1.5f;
56761 projToShoot4 = 706;
56762 speed4 = 16f;
56763 }
56764 float num75 = player.inventory[player.selectedItem].shootSpeed * scale;
56766 Vector2 value12 = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - vector34;
56767 if (player.gravDir == -1f)
56768 {
56769 value12.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - vector34.Y;
56770 }
56772 if (float.IsNaN(vector35.X) || float.IsNaN(vector35.Y))
56773 {
56775 }
56776 vector35 *= num75;
56777 if (vector35.X != velocity.X || vector35.Y != velocity.Y)
56778 {
56779 netUpdate = true;
56780 }
56781 velocity = vector35 * 0.55f;
56782 for (int num76 = 0; num76 < num73; num76++)
56783 {
56785 vector36 += Main.rand.NextVector2Square(0f - num74, num74);
56786 if (float.IsNaN(vector36.X) || float.IsNaN(vector36.Y))
56787 {
56789 }
56792 Main.projectile[num77].noDropItem = true;
56793 }
56794 }
56795 else
56796 {
56797 Kill();
56798 }
56799 }
56800 }
56801 position = player.RotatedRelativePoint(player.MountedCenter, reverseRotation: false, addGfxOffY: false) - base.Size / 2f;
56802 rotation = velocity.ToRotation() + num;
56804 timeLeft = 2;
56805 player.ChangeDir(direction);
56806 player.heldProj = whoAmI;
56807 player.SetDummyItemTime(num2);
56808 player.itemRotation = MathHelper.WrapAngle((float)Math.Atan2(velocity.Y * (float)direction, velocity.X * (float)direction) + num3);
56809 if (type == 460 || type == 611)
56810 {
56811 Vector2 vector38 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f;
56812 if (player.direction != 1)
56813 {
56814 vector38.X = (float)player.bodyFrame.Width - vector38.X;
56815 }
56816 if (player.gravDir != 1f)
56817 {
56818 vector38.Y = (float)player.bodyFrame.Height - vector38.Y;
56819 }
56820 vector38 -= new Vector2(player.bodyFrame.Width - player.width, player.bodyFrame.Height - 42) / 2f;
56821 base.Center = player.RotatedRelativePoint(player.MountedCenter - new Vector2(20f, 42f) / 2f + vector38, reverseRotation: false, addGfxOffY: false) - velocity;
56822 }
56823 if (type == 615)
56824 {
56825 position.Y += player.gravDir * 2f;
56826 }
56827 if (type == 714)
56828 {
56829 position.Y += player.gravDir * 2f;
56830 }
56831 if (type == 611 && alpha == 0)
56832 {
56833 for (int num78 = 0; num78 < 2; num78++)
56834 {
56835 Dust obj = Main.dust[Dust.NewDust(position + velocity * 2f, width, height, 6, 0f, 0f, 100, Color.Transparent, 2f)];
56836 obj.noGravity = true;
56837 obj.velocity *= 2f;
56838 obj.velocity += localAI[0].ToRotationVector2();
56839 obj.fadeIn = 1.5f;
56840 }
56841 float num79 = 18f;
56842 for (int num80 = 0; (float)num80 < num79; num80++)
56843 {
56844 if (Main.rand.Next(4) == 0)
56845 {
56847 Dust obj2 = Main.dust[Dust.NewDust(vector39, width, height, 6, 0f, 0f, 100, Color.Transparent)];
56848 obj2.noGravity = true;
56849 obj2.fadeIn = 0.5f;
56850 obj2.velocity += localAI[0].ToRotationVector2();
56851 obj2.noLight = true;
56852 }
56853 }
56854 }
56855 if (type == 927)
56856 {
56857 player.itemAnimation = num2 - (int)ai[0];
56858 }
56859 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
static float WrapAngle(float angle)
Definition MathHelper.cs:87
static double Atan2(double y, double x)
static double Abs(double value)
static double Sin(double a)
const double PI
Definition Math.cs:16
static void PlaySound(int type, Vector2 position, int style=1)
Vector2 Size
Definition Entity.cs:151
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
static readonly LegacySoundStyle Item36
Definition SoundID.cs:486
static readonly LegacySoundStyle Item91
Definition SoundID.cs:596
static readonly LegacySoundStyle Item132
Definition SoundID.cs:678
static readonly LegacySoundStyle Item15
Definition SoundID.cs:444
static readonly LegacySoundStyle Item5
Definition SoundID.cs:424
static readonly LegacySoundStyle Item1
Definition SoundID.cs:416
static readonly LegacySoundStyle Item116
Definition SoundID.cs:646
static readonly LegacySoundStyle Item156
Definition SoundID.cs:726
IEntitySource GetProjectileSource_FromThis()
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 Transparent
Definition Color.cs:76
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 Vector3 Lerp(Vector3 value1, Vector3 value2, float amount)
Definition Vector3.cs:307

References System.Math.Abs(), Terraria.Entity.active, Terraria.Lighting.AddLight(), System.Math.Atan2(), Terraria.Player.bodyFrame, Terraria.DelegateMethods.CastLightOpen(), Terraria.Player.CCed, Terraria.Player.ChangeDir(), Terraria.Player.channel, Terraria.Player.CheckMana(), Terraria.GameContent.Damage, Terraria.Item.damage, Terraria.Entity.direction, Microsoft.Xna.Framework.Vector2.Distance(), Terraria.Main.dust, Terraria.Utils.GetLerpValue(), Terraria.Player.GetProjectileSource_Item_WithPotentialAmmo(), Terraria.Player.GetWeaponDamage(), Terraria.Player.GetWeaponKnockback(), Terraria.Player.gravDir, Terraria.Player.HasAmmo(), Microsoft.Xna.Framework.Rectangle.Height, Terraria.Player.HeldItem, Terraria.Main.hslToRgb(), Terraria.Player.inventory, Terraria.ID.SoundID.Item1, Terraria.ID.SoundID.Item116, Terraria.ID.SoundID.Item132, Terraria.ID.SoundID.Item15, Terraria.ID.SoundID.Item156, Terraria.ID.SoundID.Item36, Terraria.ID.SoundID.Item5, Terraria.ID.SoundID.Item91, Terraria.Player.itemAnimationMax, Terraria.Item.knockBack, Microsoft.Xna.Framework.MathHelper.Lerp(), Microsoft.Xna.Framework.Vector2.Lerp(), Microsoft.Xna.Framework.Vector3.Lerp(), Terraria.Player.magicDamage, Terraria.Item.mana, Terraria.Player.MountedCenter, Terraria.Main.mouseX, Terraria.Main.mouseY, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Dust.NewDustPerfect(), Terraria.Player.noItems, Microsoft.Xna.Framework.Vector2.Normalize(), System.obj, Terraria.Main.OffsetsPlayerOnhand, Microsoft.Xna.Framework.Vector2.One, Terraria.Player.phantomPhoneixCounter, System.Math.PI, Terraria.Player.PickAmmo(), Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Utils.PlotTileLine(), Terraria.Main.projectile, Terraria.Main.projFrames, Terraria.Main.rand, Terraria.Utils.RandomVector2(), Terraria.Player.RotatedRelativePoint(), Terraria.Main.screenHeight, Terraria.Player.selectedItem, Terraria.Player.SetDummyItemTime(), Terraria.Item.shoot, Terraria.Item.shootSpeed, System.Math.Sin(), Terraria.Main.tile, Terraria.Item.tileBoost, Terraria.Player.tileTargetX, Terraria.Player.tileTargetY, Microsoft.Xna.Framework.Color.Transparent, System.type, Terraria.Projectile.type, Microsoft.Xna.Framework.Vector2.UnitY, System.value, Microsoft.Xna.Framework.Rectangle.Width, Terraria.Entity.width, Microsoft.Xna.Framework.MathHelper.WrapAngle(), and Microsoft.Xna.Framework.Vector2.Zero.