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

◆ DrawProjDirect()

void Terraria.Main.DrawProjDirect ( Projectile proj)
inline

Definition at line 26150 of file Main.cs.

26151 {
26153 if (proj.type == 734)
26154 {
26159 {
26161 {
26163 }
26164 return;
26165 }
26166 }
26167 float polePosX = 0f;
26168 float polePosY = 0f;
26169 LoadProjectile(proj.type);
26170 Vector2 mountedCenter = Main.player[proj.owner].MountedCenter;
26171 if (Main.player[proj.owner].mount.Active && Main.player[proj.owner].mount.Type == 52)
26172 {
26173 mountedCenter += new Vector2(Main.player[proj.owner].direction * 14, -10f);
26174 }
26175 if (proj.aiStyle == 99)
26176 {
26178 vector.Y += Main.player[proj.owner].gfxOffY;
26179 float num = proj.Center.X - vector.X;
26180 float num2 = proj.Center.Y - vector.Y;
26181 Math.Sqrt(num * num + num2 * num2);
26182 float num3 = (float)Math.Atan2(num2, num) - 1.57f;
26183 if (!proj.counterweight)
26184 {
26185 int num4 = -1;
26186 if (proj.position.X + (float)(proj.width / 2) < Main.player[proj.owner].position.X + (float)(Main.player[proj.owner].width / 2))
26187 {
26188 num4 = 1;
26189 }
26190 num4 *= -1;
26191 Main.player[proj.owner].itemRotation = (float)Math.Atan2(num2 * (float)num4, num * (float)num4);
26192 }
26193 bool flag = true;
26194 bool flag2 = true;
26195 if (num == 0f && num2 == 0f)
26196 {
26197 flag = false;
26198 }
26199 else
26200 {
26201 float num5 = (float)Math.Sqrt(num * num + num2 * num2);
26202 num5 = 12f / num5;
26203 num *= num5;
26204 num2 *= num5;
26205 vector.X -= num * 0.1f;
26206 vector.Y -= num2 * 0.1f;
26207 num = proj.position.X + (float)proj.width * 0.5f - vector.X;
26208 num2 = proj.position.Y + (float)proj.height * 0.5f - vector.Y;
26209 }
26210 while (flag)
26211 {
26212 float num6 = 12f;
26213 float num7 = (float)Math.Sqrt(num * num + num2 * num2);
26214 float num8 = num7;
26215 if (float.IsNaN(num7) || float.IsNaN(num8))
26216 {
26217 flag = false;
26218 continue;
26219 }
26220 if (num7 < 20f)
26221 {
26222 num6 = num7 - 8f;
26223 flag = false;
26224 }
26225 num7 = 12f / num7;
26226 num *= num7;
26227 num2 *= num7;
26228 if (flag2)
26229 {
26230 flag2 = false;
26231 }
26232 else
26233 {
26234 vector.X += num;
26235 vector.Y += num2;
26236 }
26237 num = proj.position.X + (float)proj.width * 0.5f - vector.X;
26238 num2 = proj.position.Y + (float)proj.height * 0.1f - vector.Y;
26239 if (num8 > 12f)
26240 {
26241 float num9 = 0.3f;
26242 float num10 = Math.Abs(proj.velocity.X) + Math.Abs(proj.velocity.Y);
26243 if (num10 > 16f)
26244 {
26245 num10 = 16f;
26246 }
26247 num10 = 1f - num10 / 16f;
26248 num9 *= num10;
26249 num10 = num8 / 80f;
26250 if (num10 > 1f)
26251 {
26252 num10 = 1f;
26253 }
26254 num9 *= num10;
26255 if (num9 < 0f)
26256 {
26257 num9 = 0f;
26258 }
26259 num9 *= num10;
26260 num9 *= 0.5f;
26261 if (num2 > 0f)
26262 {
26263 num2 *= 1f + num9;
26264 num *= 1f - num9;
26265 }
26266 else
26267 {
26268 num10 = Math.Abs(proj.velocity.X) / 3f;
26269 if (num10 > 1f)
26270 {
26271 num10 = 1f;
26272 }
26273 num10 -= 0.5f;
26274 num9 *= num10;
26275 if (num9 > 0f)
26276 {
26277 num9 *= 2f;
26278 }
26279 num2 *= 1f + num9;
26280 num *= 1f - num9;
26281 }
26282 }
26283 num3 = (float)Math.Atan2(num2, num) - 1.57f;
26285 white.A = (byte)((float)(int)white.A * 0.4f);
26286 white = TryApplyingPlayerStringColor(Main.player[proj.owner].stringColor, white);
26287 float num11 = 0.5f;
26288 white = Lighting.GetColor((int)vector.X / 16, (int)(vector.Y / 16f), white);
26289 EntitySpriteDraw(color: new Microsoft.Xna.Framework.Color((byte)((float)(int)white.R * num11), (byte)((float)(int)white.G * num11), (byte)((float)(int)white.B * num11), (byte)((float)(int)white.A * num11)), texture: TextureAssets.FishingLine.Value, position: new Vector2(vector.X - screenPosition.X + (float)TextureAssets.FishingLine.Width() * 0.5f, vector.Y - screenPosition.Y + (float)TextureAssets.FishingLine.Height() * 0.5f) - new Vector2(6f, 0f), sourceRectangle: new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.FishingLine.Width(), (int)num6), rotation: num3, origin: new Vector2((float)TextureAssets.FishingLine.Width() * 0.5f, 0f), scale: 1f, effects: SpriteEffects.None);
26290 }
26291 }
26292 else
26293 {
26294 if (proj.aiStyle == 160)
26295 {
26296 DrawKite(proj);
26297 return;
26298 }
26299 if (proj.aiStyle == 165)
26300 {
26301 DrawWhip(proj);
26302 return;
26303 }
26304 }
26305 if (proj.type == 879 || proj.type == 877 || proj.type == 878)
26306 {
26307 proj.position.Y -= Main.player[proj.owner].gfxOffY;
26308 }
26309 if (proj.aiStyle == 174)
26310 {
26312 return;
26313 }
26314 if (proj.type == 1020)
26315 {
26317 }
26318 bool flag3 = true;
26319 switch (proj.type)
26320 {
26321 default:
26322 flag3 = false;
26323 break;
26324 case 932:
26326 break;
26327 case 919:
26329 break;
26330 case 974:
26332 break;
26333 case 972:
26335 break;
26336 case 973:
26338 break;
26339 case 982:
26341 break;
26342 case 997:
26344 break;
26345 case 984:
26347 break;
26348 case 985:
26350 break;
26351 case 983:
26353 break;
26354 case 995:
26355 _stardewAnimation.Draw(spriteBatch, (int)proj.ai[0], proj.Center - screenPosition);
26356 flag3 = false;
26357 break;
26358 }
26359 if (flag3)
26360 {
26361 return;
26362 }
26363 if (proj.type == 34)
26364 {
26365 default(FlameLashDrawer).Draw(proj);
26366 }
26367 if (proj.type == 16)
26368 {
26369 default(MagicMissileDrawer).Draw(proj);
26370 }
26371 if (proj.type == 106)
26372 {
26373 default(LightDiscDrawer).Draw(proj);
26374 }
26375 if (proj.type == 933)
26376 {
26377 default(FinalFractalHelper).Draw(proj);
26378 }
26379 if (proj.type == 79)
26380 {
26381 default(RainbowRodDrawer).Draw(proj);
26382 }
26383 if (proj.type == 946)
26384 {
26386 float num12 = GlobalTimeWrappedHourly % 3f / 3f;
26387 Player player = Main.player[proj.owner];
26388 float num13 = MathHelper.Max(1f, player.maxMinions);
26389 float num14 = (float)proj.identity % num13 / num13 + num12;
26390 Microsoft.Xna.Framework.Color fairyQueenWeaponsColor = proj.GetFairyQueenWeaponsColor(0f, 0f, num14 % 1f);
26391 Microsoft.Xna.Framework.Color fairyQueenWeaponsColor2 = proj.GetFairyQueenWeaponsColor(0f, 0f, (num14 + 0.5f) % 1f);
26392 empressBladeDrawer.ColorStart = fairyQueenWeaponsColor;
26393 empressBladeDrawer.ColorEnd = fairyQueenWeaponsColor2;
26396 return;
26397 }
26398 if (proj.type == 927)
26399 {
26401 return;
26402 }
26403 if (proj.type == 917)
26404 {
26406 return;
26407 }
26408 if (proj.type == 923)
26409 {
26410 Vector2 position = proj.Center - screenPosition;
26414 Vector2 origin = rectangle.Size() * new Vector2(0.03f, 0.5f);
26415 float num15 = 180f;
26416 float num16 = proj.ai[0] / ((float)Math.PI * 2f) + proj.localAI[0] / num15;
26417 float num17 = Utils.GetLerpValue(0f, 30f, proj.localAI[0], clamped: true) * Utils.GetLerpValue(num15, num15 - 30f, proj.localAI[0], clamped: true);
26419 float lerpValue = Utils.GetLerpValue(40f, 60f, proj.localAI[0], clamped: true);
26420 Vector2 vector2 = new Vector2(1f, MathHelper.Lerp(0.25f, 0.7f, lerpValue)) * proj.scale;
26421 Microsoft.Xna.Framework.Color value3 = hslToRgb((num16 + 0.3f) % 1f, 1f, MathHelper.Lerp(0.3f, 0.66f, lerpValue)) * num17;
26422 if (NPC.ShouldEmpressBeEnraged())
26423 {
26425 }
26427 value3.A /= 2;
26428 spriteBatch.Draw(value, position, value2, value3, proj.rotation, origin, vector2 * 1.2f, SpriteEffects.None, 0f);
26429 Microsoft.Xna.Framework.Color value4 = hslToRgb((num16 + 0.15f) % 1f, 1f, MathHelper.Lerp(0.3f, 0.5f, lerpValue)) * num17;
26430 if (NPC.ShouldEmpressBeEnraged())
26431 {
26433 }
26435 value4.A /= 2;
26436 spriteBatch.Draw(value, position, value2, value4, proj.rotation, origin, vector2 * 1.1f, SpriteEffects.None, 0f);
26437 spriteBatch.Draw(value, position, rectangle, color2 * 0.5f, proj.rotation, origin, vector2, SpriteEffects.None, 0f);
26438 spriteBatch.Draw(value, position, value2, color2 * lerpValue, proj.rotation, origin, vector2, SpriteEffects.None, 0f);
26439 return;
26440 }
26441 if (proj.type == 950)
26442 {
26443 Vector2 position2 = proj.Center - screenPosition;
26446 Vector2 origin2 = rectangle2.Size() * new Vector2(0.5f, 0.5f);
26447 Microsoft.Xna.Framework.Color color3 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * proj.Opacity;
26448 float hue = ((proj.ai[2] == 1f) ? 0.96f : 0.92f);
26449 if (proj.ai[2] == 1f)
26450 {
26451 color3 = new Microsoft.Xna.Framework.Color(255, 0, 30, 180) * proj.Opacity;
26452 }
26453 Microsoft.Xna.Framework.Color color4 = hslToRgb(hue, 1f, 0.5f) * proj.Opacity;
26454 color4.A = 0;
26455 color3 *= 0.6f;
26456 color4 *= 0.6f;
26457 float scale = proj.scale;
26458 float num18 = proj.localAI[0];
26460 spriteBatch.Draw(value5, position2, rectangle2, color4, proj.rotation, origin2, num18 * 0.95f, SpriteEffects.None, 0f);
26461 spriteBatch.Draw(value5, position2, rectangle2, color3, proj.rotation, origin2, scale, SpriteEffects.None, 0f);
26462 spriteBatch.Draw(value5, position2, rectangle2, color4, proj.rotation, origin2, scale * 0.95f, SpriteEffects.None, 0f);
26463 return;
26464 }
26465 if (proj.type == 888)
26466 {
26468 return;
26469 }
26470 if (proj.type == 874)
26471 {
26473 return;
26474 }
26475 if (proj.type == 871)
26476 {
26479 Vector2 origin3 = rectangle3.Size() / 2f;
26480 Microsoft.Xna.Framework.Color color5 = Microsoft.Xna.Framework.Color.White * proj.Opacity;
26481 SpriteEffects effects = SpriteEffects.None;
26482 color5.A /= 2;
26483 Microsoft.Xna.Framework.Color color6 = proj.AI_171_GetColor();
26484 color6.A /= 2;
26485 float num19 = proj.scale * 1.3f;
26486 float num20 = 1f;
26487 int num21 = proj.AI_172_GetPelletStormsCount();
26488 bool flag4 = false;
26489 float num22 = float.PositiveInfinity;
26490 for (int i = 0; i < num21; i++)
26491 {
26492 Projectile.HallowBossPelletStormInfo hallowBossPelletStormInfo = proj.AI_172_GetPelletStormInfo(i);
26493 for (int j = 0; j < hallowBossPelletStormInfo.BulletsInStorm; j++)
26494 {
26495 float bulletProgress = hallowBossPelletStormInfo.GetBulletProgress(j);
26496 if (bulletProgress < num22)
26497 {
26499 }
26500 if (hallowBossPelletStormInfo.IsValid(j))
26501 {
26502 if (i == num21 - 1 && bulletProgress > 0f)
26503 {
26504 flag4 = true;
26505 }
26506 rectangle3 = value6.Frame(1, 4, 0, (int)((double)(j + i * 6) + timeForVisualEffects / 4.0) % 4);
26507 float num23 = Utils.GetLerpValue(0f, 0.1f, bulletProgress, clamped: true) * Utils.GetLerpValue(1f, 0.8f, bulletProgress, clamped: true);
26508 Vector2 bulletPosition = hallowBossPelletStormInfo.GetBulletPosition(j, proj.Center);
26509 EntitySpriteDraw(value6, bulletPosition - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle3, color6 * num23, proj.rotation, origin3, num19 * num20, effects);
26510 EntitySpriteDraw(value6, bulletPosition - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle3, color5 * num23, proj.rotation, origin3, proj.scale * num20, effects);
26511 }
26512 }
26513 }
26514 if (!flag4 && num22 <= 1f)
26515 {
26516 EntitySpriteDraw(value6, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle3, color6, proj.rotation, origin3, num19, effects);
26517 EntitySpriteDraw(value6, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle3, color5, proj.rotation, origin3, proj.scale, effects);
26518 }
26519 return;
26520 }
26521 if (proj.bobber && Main.player[proj.owner].inventory[Main.player[proj.owner].selectedItem].holdStyle != 0)
26522 {
26524 }
26525 else if (proj.type == 32)
26526 {
26527 Vector2 vector3 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26528 float num24 = mountedCenter.X - vector3.X;
26529 float num25 = mountedCenter.Y - vector3.Y;
26530 float rotation = (float)Math.Atan2(num25, num24) - 1.57f;
26531 bool flag5 = true;
26532 if (num24 == 0f && num25 == 0f)
26533 {
26534 flag5 = false;
26535 }
26536 else
26537 {
26538 float num26 = (float)Math.Sqrt(num24 * num24 + num25 * num25);
26539 num26 = 8f / num26;
26540 num24 *= num26;
26541 num25 *= num26;
26542 vector3.X -= num24;
26543 vector3.Y -= num25;
26544 num24 = mountedCenter.X - vector3.X;
26545 num25 = mountedCenter.Y - vector3.Y;
26546 }
26547 while (flag5)
26548 {
26549 float num27 = (float)Math.Sqrt(num24 * num24 + num25 * num25);
26550 if (num27 < 28f)
26551 {
26552 flag5 = false;
26553 continue;
26554 }
26555 if (float.IsNaN(num27))
26556 {
26557 flag5 = false;
26558 continue;
26559 }
26560 num27 = 28f / num27;
26561 num24 *= num27;
26562 num25 *= num27;
26563 vector3.X += num24;
26564 vector3.Y += num25;
26565 num24 = mountedCenter.X - vector3.X;
26566 num25 = mountedCenter.Y - vector3.Y;
26567 Microsoft.Xna.Framework.Color color7 = Lighting.GetColor((int)vector3.X / 16, (int)(vector3.Y / 16f));
26568 EntitySpriteDraw(TextureAssets.Chain5.Value, new Vector2(vector3.X - screenPosition.X, vector3.Y - screenPosition.Y), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain5.Width(), TextureAssets.Chain5.Height()), color7, rotation, new Vector2((float)TextureAssets.Chain5.Width() * 0.5f, (float)TextureAssets.Chain5.Height() * 0.5f), 1f, SpriteEffects.None);
26569 }
26570 }
26571 else if (proj.type == 73)
26572 {
26573 Vector2 vector4 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26574 float num28 = mountedCenter.X - vector4.X;
26575 float num29 = mountedCenter.Y - vector4.Y;
26576 float rotation2 = (float)Math.Atan2(num29, num28) - 1.57f;
26577 bool flag6 = true;
26578 while (flag6)
26579 {
26580 float num30 = (float)Math.Sqrt(num28 * num28 + num29 * num29);
26581 if (num30 < 25f)
26582 {
26583 flag6 = false;
26584 continue;
26585 }
26586 if (float.IsNaN(num30))
26587 {
26588 flag6 = false;
26589 continue;
26590 }
26591 num30 = 12f / num30;
26592 num28 *= num30;
26593 num29 *= num30;
26594 vector4.X += num28;
26595 vector4.Y += num29;
26596 num28 = mountedCenter.X - vector4.X;
26597 num29 = mountedCenter.Y - vector4.Y;
26598 Microsoft.Xna.Framework.Color color8 = Lighting.GetColor((int)vector4.X / 16, (int)(vector4.Y / 16f));
26599 EntitySpriteDraw(TextureAssets.Chain8.Value, new Vector2(vector4.X - screenPosition.X, vector4.Y - screenPosition.Y), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain8.Width(), TextureAssets.Chain8.Height()), color8, rotation2, new Vector2((float)TextureAssets.Chain8.Width() * 0.5f, (float)TextureAssets.Chain8.Height() * 0.5f), 1f, SpriteEffects.None);
26600 }
26601 }
26602 else if (proj.type == 186)
26603 {
26604 Vector2 vector5 = new Vector2(proj.localAI[0], proj.localAI[1]);
26605 float num31 = Vector2.Distance(proj.Center, vector5) - proj.velocity.Length();
26606 float num32 = (float)TextureAssets.Chain17.Height() - num31;
26607 if (num31 > 0f && proj.ai[1] > 0f)
26608 {
26609 Microsoft.Xna.Framework.Color color9 = Lighting.GetColor((int)proj.position.X / 16, (int)proj.position.Y / 16);
26611 }
26612 }
26613 else if (proj.type == 74)
26614 {
26615 Vector2 vector6 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26616 float num33 = mountedCenter.X - vector6.X;
26617 float num34 = mountedCenter.Y - vector6.Y;
26618 float rotation3 = (float)Math.Atan2(num34, num33) - 1.57f;
26619 bool flag7 = true;
26620 while (flag7)
26621 {
26622 float num35 = (float)Math.Sqrt(num33 * num33 + num34 * num34);
26623 if (num35 < 25f)
26624 {
26625 flag7 = false;
26626 continue;
26627 }
26628 if (float.IsNaN(num35))
26629 {
26630 flag7 = false;
26631 continue;
26632 }
26633 num35 = 12f / num35;
26634 num33 *= num35;
26635 num34 *= num35;
26636 vector6.X += num33;
26637 vector6.Y += num34;
26638 num33 = mountedCenter.X - vector6.X;
26639 num34 = mountedCenter.Y - vector6.Y;
26640 Microsoft.Xna.Framework.Color color10 = Lighting.GetColor((int)vector6.X / 16, (int)(vector6.Y / 16f));
26642 }
26643 }
26644 else if (proj.type == 171)
26645 {
26646 Vector2 vector7 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26647 float num36 = 0f - proj.velocity.X;
26648 float num37 = 0f - proj.velocity.Y;
26649 float num38 = 1f;
26650 if (proj.ai[0] <= 17f)
26651 {
26652 num38 = proj.ai[0] / 17f;
26653 }
26654 int num39 = (int)(30f * num38);
26655 float num40 = 1f;
26656 if (proj.ai[0] <= 30f)
26657 {
26658 num40 = proj.ai[0] / 30f;
26659 }
26660 float num41 = 0.4f * num40;
26661 float num42 = num41;
26662 num37 += num42;
26663 Vector2[] array = new Vector2[num39];
26664 float[] array2 = new float[num39];
26665 for (int k = 0; k < num39; k++)
26666 {
26667 float num43 = (float)Math.Sqrt(num36 * num36 + num37 * num37);
26668 float num44 = 5.6f;
26669 if (Math.Abs(num36) + Math.Abs(num37) < 1f)
26670 {
26671 num44 *= Math.Abs(num36) + Math.Abs(num37) / 1f;
26672 }
26673 num43 = num44 / num43;
26674 num36 *= num43;
26675 num37 *= num43;
26676 float num45 = (float)Math.Atan2(num37, num36) - 1.57f;
26677 array[k].X = vector7.X;
26678 array[k].Y = vector7.Y;
26679 array2[k] = num45;
26680 vector7.X += num36;
26681 vector7.Y += num37;
26682 num36 = 0f - proj.velocity.X;
26683 num37 = 0f - proj.velocity.Y;
26684 num42 += num41;
26685 num37 += num42;
26686 }
26687 for (int num46 = --num39; num46 >= 0; num46--)
26688 {
26689 vector7.X = array[num46].X;
26690 vector7.Y = array[num46].Y;
26691 float rotation4 = array2[num46];
26692 Microsoft.Xna.Framework.Color color11 = Lighting.GetColor((int)vector7.X / 16, (int)(vector7.Y / 16f));
26694 }
26695 }
26696 else if (proj.type == 475)
26697 {
26698 Vector2 vector8 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26699 float num47 = 0f - proj.velocity.X;
26700 float num48 = 0f - proj.velocity.Y;
26701 float num49 = 1f;
26702 if (proj.ai[0] <= 17f)
26703 {
26704 num49 = proj.ai[0] / 17f;
26705 }
26706 int num50 = (int)(30f * num49);
26707 float num51 = 1f;
26708 if (proj.ai[0] <= 30f)
26709 {
26710 num51 = proj.ai[0] / 30f;
26711 }
26712 float num52 = 0.4f * num51;
26713 float num53 = num52;
26714 num48 += num53;
26715 Vector2[] array3 = new Vector2[num50];
26716 float[] array4 = new float[num50];
26717 for (int l = 0; l < num50; l++)
26718 {
26719 float num54 = (float)Math.Sqrt(num47 * num47 + num48 * num48);
26720 float num55 = 5.6f;
26721 if (Math.Abs(num47) + Math.Abs(num48) < 1f)
26722 {
26723 num55 *= Math.Abs(num47) + Math.Abs(num48) / 1f;
26724 }
26725 num54 = num55 / num54;
26726 num47 *= num54;
26727 num48 *= num54;
26728 float num56 = (float)Math.Atan2(num48, num47) - 1.57f;
26729 array3[l].X = vector8.X;
26730 array3[l].Y = vector8.Y;
26731 array4[l] = num56;
26732 vector8.X += num47;
26733 vector8.Y += num48;
26734 num47 = 0f - proj.velocity.X;
26735 num48 = 0f - proj.velocity.Y;
26736 num53 += num52;
26737 num48 += num53;
26738 }
26739 int num57 = 0;
26740 for (int num58 = --num50; num58 >= 0; num58--)
26741 {
26742 vector8.X = array3[num58].X;
26743 vector8.Y = array3[num58].Y;
26744 float rotation5 = array4[num58];
26745 Microsoft.Xna.Framework.Color color12 = Lighting.GetColor((int)vector8.X / 16, (int)(vector8.Y / 16f));
26746 if (num57 % 2 == 0)
26747 {
26749 }
26750 else
26751 {
26753 }
26754 num57++;
26755 }
26756 }
26757 else if (proj.type == 505 || proj.type == 506)
26758 {
26759 Vector2 vector9 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26760 float num59 = 0f - proj.velocity.X;
26761 float num60 = 0f - proj.velocity.Y;
26762 float num61 = 1f;
26763 if (proj.ai[0] <= 17f)
26764 {
26765 num61 = proj.ai[0] / 17f;
26766 }
26767 int num62 = (int)(30f * num61);
26768 float num63 = 1f;
26769 if (proj.ai[0] <= 30f)
26770 {
26771 num63 = proj.ai[0] / 30f;
26772 }
26773 float num64 = 0.4f * num63;
26774 float num65 = num64;
26775 num60 += num65;
26776 Vector2[] array5 = new Vector2[num62];
26777 float[] array6 = new float[num62];
26778 for (int m = 0; m < num62; m++)
26779 {
26780 float num66 = (float)Math.Sqrt(num59 * num59 + num60 * num60);
26781 float num67 = 5.6f;
26782 if (Math.Abs(num59) + Math.Abs(num60) < 1f)
26783 {
26784 num67 *= Math.Abs(num59) + Math.Abs(num60) / 1f;
26785 }
26786 num66 = num67 / num66;
26787 num59 *= num66;
26788 num60 *= num66;
26789 float num68 = (float)Math.Atan2(num60, num59) - 1.57f;
26790 array5[m].X = vector9.X;
26791 array5[m].Y = vector9.Y;
26792 array6[m] = num68;
26793 vector9.X += num59;
26794 vector9.Y += num60;
26795 num59 = 0f - proj.velocity.X;
26796 num60 = 0f - proj.velocity.Y;
26797 num65 += num64;
26798 num60 += num65;
26799 }
26800 int num69 = 0;
26801 for (int num70 = --num62; num70 >= 0; num70--)
26802 {
26803 vector9.X = array5[num70].X;
26804 vector9.Y = array5[num70].Y;
26805 float rotation6 = array6[num70];
26806 Microsoft.Xna.Framework.Color color13 = Lighting.GetColor((int)vector9.X / 16, (int)(vector9.Y / 16f));
26807 int num71 = 4;
26808 if (proj.type == 506)
26809 {
26810 num71 = 6;
26811 }
26812 num71 += num69 % 2;
26814 num69++;
26815 }
26816 }
26817 else if (proj.type == 165)
26818 {
26819 Vector2 vector10 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26820 float num72 = mountedCenter.X - vector10.X;
26821 float num73 = mountedCenter.Y - vector10.Y;
26822 float rotation7 = (float)Math.Atan2(num73, num72) - 1.57f;
26823 bool flag8 = true;
26824 while (flag8)
26825 {
26826 float num74 = (float)Math.Sqrt(num72 * num72 + num73 * num73);
26827 if (num74 < 25f)
26828 {
26829 flag8 = false;
26830 continue;
26831 }
26832 if (float.IsNaN(num74))
26833 {
26834 flag8 = false;
26835 continue;
26836 }
26837 num74 = 24f / num74;
26838 num72 *= num74;
26839 num73 *= num74;
26840 vector10.X += num72;
26841 vector10.Y += num73;
26842 num72 = mountedCenter.X - vector10.X;
26843 num73 = mountedCenter.Y - vector10.Y;
26844 Microsoft.Xna.Framework.Color color14 = Lighting.GetColor((int)vector10.X / 16, (int)(vector10.Y / 16f));
26846 }
26847 }
26848 else if (proj.type >= 230 && proj.type <= 235)
26849 {
26850 int num75 = proj.type - 229;
26851 Vector2 vector11 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26852 float num76 = mountedCenter.X - vector11.X;
26853 float num77 = mountedCenter.Y - vector11.Y;
26854 float rotation8 = (float)Math.Atan2(num77, num76) - 1.57f;
26855 bool flag9 = true;
26856 while (flag9)
26857 {
26858 float num78 = (float)Math.Sqrt(num76 * num76 + num77 * num77);
26859 if (num78 < 25f)
26860 {
26861 flag9 = false;
26862 continue;
26863 }
26864 if (float.IsNaN(num78))
26865 {
26866 flag9 = false;
26867 continue;
26868 }
26869 num78 = (float)TextureAssets.GemChain[num75].Height() / num78;
26870 num76 *= num78;
26871 num77 *= num78;
26872 vector11.X += num76;
26873 vector11.Y += num77;
26874 num76 = mountedCenter.X - vector11.X;
26875 num77 = mountedCenter.Y - vector11.Y;
26876 Microsoft.Xna.Framework.Color color15 = Lighting.GetColor((int)vector11.X / 16, (int)(vector11.Y / 16f));
26878 }
26879 }
26880 else if (proj.type == 753)
26881 {
26882 Vector2 vector12 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26883 float num79 = mountedCenter.X - vector12.X;
26884 float num80 = mountedCenter.Y - vector12.Y;
26885 float rotation9 = (float)Math.Atan2(num80, num79) - 1.57f;
26886 bool flag10 = true;
26887 Texture2D value7 = TextureAssets.Extra[95].Value;
26888 while (flag10)
26889 {
26890 float num81 = (float)Math.Sqrt(num79 * num79 + num80 * num80);
26891 if (num81 < 25f)
26892 {
26893 flag10 = false;
26894 continue;
26895 }
26896 if (float.IsNaN(num81))
26897 {
26898 flag10 = false;
26899 continue;
26900 }
26901 num81 = (float)value7.Height / num81;
26902 num79 *= num81;
26903 num80 *= num81;
26904 vector12.X += num79;
26905 vector12.Y += num80;
26906 num79 = mountedCenter.X - vector12.X;
26907 num80 = mountedCenter.Y - vector12.Y;
26908 Microsoft.Xna.Framework.Color color16 = Lighting.GetColor((int)vector12.X / 16, (int)(vector12.Y / 16f));
26910 }
26911 }
26912 else if (proj.type == 865)
26913 {
26914 Vector2 vector13 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26915 float num82 = mountedCenter.X - vector13.X;
26916 float num83 = mountedCenter.Y - vector13.Y;
26917 float rotation10 = (float)Math.Atan2(num83, num82) - 1.57f;
26918 bool flag11 = true;
26919 bool flag12 = true;
26920 Texture2D value8 = TextureAssets.Extra[154].Value;
26921 while (flag11)
26922 {
26923 float num84 = (float)Math.Sqrt(num82 * num82 + num83 * num83);
26924 if (num84 < 25f)
26925 {
26926 flag11 = false;
26927 continue;
26928 }
26929 if (float.IsNaN(num84))
26930 {
26931 flag11 = false;
26932 continue;
26933 }
26934 num84 = (float)value8.Height / num84;
26935 num82 *= num84;
26936 num83 *= num84;
26937 vector13.X += num82;
26938 vector13.Y += num83;
26939 num82 = mountedCenter.X - vector13.X;
26940 num83 = mountedCenter.Y - vector13.Y;
26941 if (!flag12)
26942 {
26943 Microsoft.Xna.Framework.Color color17 = Lighting.GetColor((int)vector13.X / 16, (int)(vector13.Y / 16f));
26945 }
26946 flag12 = false;
26947 }
26948 }
26949 else if (proj.type == 935)
26950 {
26951 Vector2 vector14 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26952 float num85 = mountedCenter.X - vector14.X;
26953 float num86 = mountedCenter.Y - vector14.Y;
26954 float rotation11 = (float)Math.Atan2(num86, num85) - 1.57f;
26955 bool flag13 = true;
26956 bool flag14 = true;
26957 Texture2D value9 = TextureAssets.Extra[208].Value;
26958 while (flag13)
26959 {
26960 float num87 = (float)Math.Sqrt(num85 * num85 + num86 * num86);
26961 if (num87 < 8f)
26962 {
26963 flag13 = false;
26964 continue;
26965 }
26966 if (float.IsNaN(num87))
26967 {
26968 flag13 = false;
26969 continue;
26970 }
26971 num87 = (float)value9.Height / num87;
26972 num85 *= num87;
26973 num86 *= num87;
26974 vector14.X += num85;
26975 vector14.Y += num86;
26976 num85 = mountedCenter.X - vector14.X;
26977 num86 = mountedCenter.Y - vector14.Y;
26978 if (!flag14)
26979 {
26980 Microsoft.Xna.Framework.Color color18 = Lighting.GetColor((int)vector14.X / 16, (int)(vector14.Y / 16f));
26982 }
26983 flag14 = false;
26984 }
26985 }
26986 else if (proj.type == 256)
26987 {
26988 Vector2 vector15 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
26989 float num88 = mountedCenter.X - vector15.X;
26990 float num89 = mountedCenter.Y - vector15.Y;
26991 float num90 = (float)Math.Atan2(num89, num88) - 1.57f;
26992 bool flag15 = true;
26993 while (flag15)
26994 {
26995 float num91 = (float)Math.Sqrt(num88 * num88 + num89 * num89);
26996 if (num91 < 26f)
26997 {
26998 flag15 = false;
26999 continue;
27000 }
27001 if (float.IsNaN(num91))
27002 {
27003 flag15 = false;
27004 continue;
27005 }
27006 num91 = 26f / num91;
27007 num88 *= num91;
27008 num89 *= num91;
27009 vector15.X += num88;
27010 vector15.Y += num89;
27011 num88 = Main.player[proj.owner].position.X + (float)(Main.player[proj.owner].width / 2) - vector15.X;
27012 num89 = Main.player[proj.owner].position.Y + (float)(Main.player[proj.owner].height / 2) - vector15.Y;
27013 Microsoft.Xna.Framework.Color color19 = Lighting.GetColor((int)vector15.X / 16, (int)(vector15.Y / 16f));
27014 EntitySpriteDraw(TextureAssets.Chain20.Value, new Vector2(vector15.X - screenPosition.X, vector15.Y - screenPosition.Y), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain20.Width(), TextureAssets.Chain20.Height()), color19, num90 - 0.785f, new Vector2((float)TextureAssets.Chain20.Width() * 0.5f, (float)TextureAssets.Chain20.Height() * 0.5f), 1f, SpriteEffects.None);
27015 }
27016 }
27017 else if (proj.type == 322)
27018 {
27019 Vector2 vector16 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
27020 float num92 = mountedCenter.X - vector16.X;
27021 float num93 = mountedCenter.Y - vector16.Y;
27022 float rotation12 = (float)Math.Atan2(num93, num92) - 1.57f;
27023 bool flag16 = true;
27024 while (flag16)
27025 {
27026 float num94 = (float)Math.Sqrt(num92 * num92 + num93 * num93);
27027 if (num94 < 22f)
27028 {
27029 flag16 = false;
27030 continue;
27031 }
27032 if (float.IsNaN(num94))
27033 {
27034 flag16 = false;
27035 continue;
27036 }
27037 num94 = 22f / num94;
27038 num92 *= num94;
27039 num93 *= num94;
27040 vector16.X += num92;
27041 vector16.Y += num93;
27042 num92 = mountedCenter.X - vector16.X;
27043 num93 = mountedCenter.Y - vector16.Y;
27044 Microsoft.Xna.Framework.Color color20 = Lighting.GetColor((int)vector16.X / 16, (int)(vector16.Y / 16f));
27046 }
27047 }
27048 else if (proj.type == 315)
27049 {
27050 Vector2 vector17 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
27051 float num95 = mountedCenter.X - vector17.X;
27052 float num96 = mountedCenter.Y - vector17.Y;
27053 float rotation13 = (float)Math.Atan2(num96, num95) - 1.57f;
27054 bool flag17 = true;
27055 while (flag17)
27056 {
27057 float num97 = (float)Math.Sqrt(num95 * num95 + num96 * num96);
27058 if (num97 < 50f)
27059 {
27060 flag17 = false;
27061 continue;
27062 }
27063 if (float.IsNaN(num97))
27064 {
27065 flag17 = false;
27066 continue;
27067 }
27068 num97 = 40f / num97;
27069 num95 *= num97;
27070 num96 *= num97;
27071 vector17.X += num95;
27072 vector17.Y += num96;
27073 num95 = mountedCenter.X - vector17.X;
27074 num96 = mountedCenter.Y - vector17.Y;
27075 Microsoft.Xna.Framework.Color color21 = Lighting.GetColor((int)vector17.X / 16, (int)(vector17.Y / 16f));
27077 }
27078 }
27079 else if (proj.type == 331)
27080 {
27081 Vector2 vector18 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
27082 float num98 = mountedCenter.X - vector18.X;
27083 float num99 = mountedCenter.Y - vector18.Y;
27084 float rotation14 = (float)Math.Atan2(num99, num98) - 1.57f;
27085 bool flag18 = true;
27086 while (flag18)
27087 {
27088 float num100 = (float)Math.Sqrt(num98 * num98 + num99 * num99);
27089 if (num100 < 30f)
27090 {
27091 flag18 = false;
27092 continue;
27093 }
27094 if (float.IsNaN(num100))
27095 {
27096 flag18 = false;
27097 continue;
27098 }
27099 num100 = 24f / num100;
27100 num98 *= num100;
27101 num99 *= num100;
27102 vector18.X += num98;
27103 vector18.Y += num99;
27104 num98 = mountedCenter.X - vector18.X;
27105 num99 = mountedCenter.Y - vector18.Y;
27106 Microsoft.Xna.Framework.Color color22 = Lighting.GetColor((int)vector18.X / 16, (int)(vector18.Y / 16f));
27108 }
27109 }
27110 else if (proj.type == 332)
27111 {
27112 int num101 = 0;
27113 Vector2 vector19 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
27114 float num102 = mountedCenter.X - vector19.X;
27115 float num103 = mountedCenter.Y - vector19.Y;
27116 float rotation15 = (float)Math.Atan2(num103, num102) - 1.57f;
27117 bool flag19 = true;
27118 while (flag19)
27119 {
27120 float num104 = (float)Math.Sqrt(num102 * num102 + num103 * num103);
27121 if (num104 < 30f)
27122 {
27123 flag19 = false;
27124 continue;
27125 }
27126 if (float.IsNaN(num104))
27127 {
27128 flag19 = false;
27129 continue;
27130 }
27131 int i2 = (int)vector19.X / 16;
27132 int j2 = (int)vector19.Y / 16;
27133 if (num101 == 0)
27134 {
27135 Lighting.AddLight(i2, j2, 0f, 0.2f, 0.2f);
27136 }
27137 if (num101 == 1)
27138 {
27139 Lighting.AddLight(i2, j2, 0.1f, 0.2f, 0f);
27140 }
27141 if (num101 == 2)
27142 {
27143 Lighting.AddLight(i2, j2, 0.2f, 0.1f, 0f);
27144 }
27145 if (num101 == 3)
27146 {
27147 Lighting.AddLight(i2, j2, 0.2f, 0f, 0.2f);
27148 }
27149 num104 = 16f / num104;
27150 num102 *= num104;
27151 num103 *= num104;
27152 vector19.X += num102;
27153 vector19.Y += num103;
27154 num102 = mountedCenter.X - vector19.X;
27155 num103 = mountedCenter.Y - vector19.Y;
27156 Microsoft.Xna.Framework.Color color23 = Lighting.GetColor((int)vector19.X / 16, (int)(vector19.Y / 16f));
27159 num101++;
27160 if (num101 > 3)
27161 {
27162 num101 = 0;
27163 }
27164 }
27165 }
27166 else if (proj.type == 372 || proj.type == 383 || proj.type == 396 || proj.type == 403 || proj.type == 404 || proj.type == 446 || (proj.type >= 486 && proj.type <= 489) || (proj.type >= 646 && proj.type <= 649) || proj.type == 652)
27167 {
27168 Texture2D texture2D = null;
27171 if (proj.type == 383)
27172 {
27174 }
27175 if (proj.type == 396)
27176 {
27178 }
27179 if (proj.type == 403)
27180 {
27182 }
27183 if (proj.type == 404)
27184 {
27186 }
27187 if (proj.type == 446)
27188 {
27189 value10 = TextureAssets.Extra[3].Value;
27190 }
27191 if (proj.type >= 486 && proj.type <= 489)
27192 {
27193 value10 = TextureAssets.Chains[proj.type - 486].Value;
27194 }
27195 if (proj.type >= 646 && proj.type <= 649)
27196 {
27197 value10 = TextureAssets.Chains[proj.type - 646 + 8].Value;
27198 texture2D = TextureAssets.Chains[proj.type - 646 + 12].Value;
27199 color24 = new Microsoft.Xna.Framework.Color(255, 255, 255, 127);
27200 }
27201 if (proj.type == 652)
27202 {
27203 value10 = TextureAssets.Chains[16].Value;
27204 }
27205 Vector2 center = proj.Center;
27207 Vector2 origin4 = new Vector2((float)value10.Width * 0.5f, (float)value10.Height * 0.5f);
27208 float num105 = value10.Height;
27209 float num106 = 0f;
27210 if (proj.type == 446)
27211 {
27212 int num107 = 7;
27213 int num108 = (int)proj.localAI[0] / num107;
27214 sourceRectangle = new Microsoft.Xna.Framework.Rectangle(0, value10.Height / 4 * num108, value10.Width, value10.Height / 4);
27215 origin4.Y /= 4f;
27216 num105 /= 4f;
27217 }
27218 switch (proj.type)
27219 {
27220 case 383:
27221 num106 = 14f;
27222 break;
27223 case 446:
27224 num106 = 20f;
27225 break;
27226 case 489:
27227 num106 = 10f;
27228 break;
27229 case 487:
27230 num106 = 8f;
27231 break;
27232 }
27233 if (num106 != 0f)
27234 {
27235 float num109 = -1.57f;
27236 Vector2 vector20 = new Vector2((float)Math.Cos(proj.rotation + num109), (float)Math.Sin(proj.rotation + num109));
27237 center -= vector20 * num106;
27239 vector20.Normalize();
27240 center -= vector20 * num105 / 2f;
27241 }
27243 float rotation16 = (float)Math.Atan2(vector21.Y, vector21.X) - 1.57f;
27244 bool flag20 = true;
27245 if (float.IsNaN(center.X) && float.IsNaN(center.Y))
27246 {
27247 flag20 = false;
27248 }
27249 if (float.IsNaN(vector21.X) && float.IsNaN(vector21.Y))
27250 {
27251 flag20 = false;
27252 }
27253 while (flag20)
27254 {
27255 if (vector21.Length() < num105 + 1f)
27256 {
27257 flag20 = false;
27258 continue;
27259 }
27261 vector22.Normalize();
27262 center += vector22 * num105;
27264 Microsoft.Xna.Framework.Color color25 = Lighting.GetColor((int)center.X / 16, (int)(center.Y / 16f));
27265 if (proj.type == 396)
27266 {
27267 color25 *= (float)(255 - proj.alpha) / 255f;
27268 }
27269 if (proj.type == 446)
27270 {
27271 color25 = proj.GetAlpha(color25);
27272 }
27273 if (proj.type == 488)
27274 {
27275 Lighting.AddLight(center, 0.2f, 0f, 0.175f);
27276 color25 = new Microsoft.Xna.Framework.Color(255, 255, 255, 255);
27277 }
27278 if (proj.type >= 646 && proj.type <= 649)
27279 {
27280 color25 = proj.GetAlpha(color25);
27281 }
27283 if (texture2D != null)
27284 {
27286 }
27287 }
27288 }
27289 else if (proj.aiStyle == 7)
27290 {
27291 Vector2 vector23 = new Vector2(proj.position.X + (float)proj.width * 0.5f, proj.position.Y + (float)proj.height * 0.5f);
27292 float num110 = mountedCenter.X - vector23.X;
27293 float num111 = mountedCenter.Y - vector23.Y;
27294 float rotation17 = (float)Math.Atan2(num111, num110) - 1.57f;
27295 bool flag21 = true;
27296 while (flag21)
27297 {
27298 float num112 = (float)Math.Sqrt(num110 * num110 + num111 * num111);
27299 if (num112 < 25f)
27300 {
27301 flag21 = false;
27302 continue;
27303 }
27304 if (float.IsNaN(num112))
27305 {
27306 flag21 = false;
27307 continue;
27308 }
27309 num112 = 12f / num112;
27310 num110 *= num112;
27311 num111 *= num112;
27312 vector23.X += num110;
27313 vector23.Y += num111;
27314 num110 = mountedCenter.X - vector23.X;
27315 num111 = mountedCenter.Y - vector23.Y;
27316 Microsoft.Xna.Framework.Color color26 = Lighting.GetColor((int)vector23.X / 16, (int)(vector23.Y / 16f));
27317 EntitySpriteDraw(TextureAssets.Chain.Value, new Vector2(vector23.X - screenPosition.X, vector23.Y - screenPosition.Y), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain.Width(), TextureAssets.Chain.Height()), color26, rotation17, new Vector2((float)TextureAssets.Chain.Width() * 0.5f, (float)TextureAssets.Chain.Height() * 0.5f), 1f, SpriteEffects.None);
27318 }
27319 }
27320 else if (proj.type == 262)
27321 {
27322 float x = proj.Center.X;
27323 float y = proj.Center.Y;
27324 float x2 = proj.velocity.X;
27325 float y2 = proj.velocity.Y;
27326 float num113 = (float)Math.Sqrt(x2 * x2 + y2 * y2);
27327 num113 = 4f / num113;
27328 if (proj.ai[0] == 0f)
27329 {
27330 x -= proj.velocity.X * num113;
27331 y -= proj.velocity.Y * num113;
27332 }
27333 else
27334 {
27335 x += proj.velocity.X * num113;
27336 y += proj.velocity.Y * num113;
27337 }
27338 Vector2 vector24 = new Vector2(x, y);
27339 x2 = mountedCenter.X - vector24.X;
27340 y2 = mountedCenter.Y - vector24.Y;
27341 float rotation18 = (float)Math.Atan2(y2, x2) - 1.57f;
27342 if (proj.alpha == 0)
27343 {
27344 int num114 = -1;
27345 if (proj.position.X + (float)(proj.width / 2) < mountedCenter.X)
27346 {
27347 num114 = 1;
27348 }
27349 if (Main.player[proj.owner].direction == 1)
27350 {
27351 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y2 * (float)num114, x2 * (float)num114);
27352 }
27353 else
27354 {
27355 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y2 * (float)num114, x2 * (float)num114);
27356 }
27357 }
27358 bool flag22 = true;
27359 while (flag22)
27360 {
27361 float num115 = (float)Math.Sqrt(x2 * x2 + y2 * y2);
27362 if (num115 < 25f)
27363 {
27364 flag22 = false;
27365 continue;
27366 }
27367 if (float.IsNaN(num115))
27368 {
27369 flag22 = false;
27370 continue;
27371 }
27372 num115 = 12f / num115;
27373 x2 *= num115;
27374 y2 *= num115;
27375 vector24.X += x2;
27376 vector24.Y += y2;
27377 x2 = mountedCenter.X - vector24.X;
27378 y2 = mountedCenter.Y - vector24.Y;
27379 Microsoft.Xna.Framework.Color color27 = Lighting.GetColor((int)vector24.X / 16, (int)(vector24.Y / 16f));
27381 }
27382 }
27383 else if (proj.type == 273)
27384 {
27385 float x3 = proj.Center.X;
27386 float y3 = proj.Center.Y;
27387 float x4 = proj.velocity.X;
27388 float y4 = proj.velocity.Y;
27389 float num116 = (float)Math.Sqrt(x4 * x4 + y4 * y4);
27390 num116 = 4f / num116;
27391 if (proj.ai[0] == 0f)
27392 {
27393 x3 -= proj.velocity.X * num116;
27394 y3 -= proj.velocity.Y * num116;
27395 }
27396 else
27397 {
27398 x3 += proj.velocity.X * num116;
27399 y3 += proj.velocity.Y * num116;
27400 }
27401 Vector2 vector25 = new Vector2(x3, y3);
27402 x4 = mountedCenter.X - vector25.X;
27403 y4 = mountedCenter.Y - vector25.Y;
27404 float rotation19 = (float)Math.Atan2(y4, x4) - 1.57f;
27405 if (proj.alpha == 0)
27406 {
27407 int num117 = -1;
27408 if (proj.position.X + (float)(proj.width / 2) < mountedCenter.X)
27409 {
27410 num117 = 1;
27411 }
27412 if (Main.player[proj.owner].direction == 1)
27413 {
27414 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y4 * (float)num117, x4 * (float)num117);
27415 }
27416 else
27417 {
27418 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y4 * (float)num117, x4 * (float)num117);
27419 }
27420 }
27421 bool flag23 = true;
27422 while (flag23)
27423 {
27424 float num118 = (float)Math.Sqrt(x4 * x4 + y4 * y4);
27425 if (num118 < 25f)
27426 {
27427 flag23 = false;
27428 continue;
27429 }
27430 if (float.IsNaN(num118))
27431 {
27432 flag23 = false;
27433 continue;
27434 }
27435 num118 = 12f / num118;
27436 x4 *= num118;
27437 y4 *= num118;
27438 vector25.X += x4;
27439 vector25.Y += y4;
27440 x4 = mountedCenter.X - vector25.X;
27441 y4 = mountedCenter.Y - vector25.Y;
27442 Microsoft.Xna.Framework.Color color28 = Lighting.GetColor((int)vector25.X / 16, (int)(vector25.Y / 16f));
27444 }
27445 }
27446 else if (proj.type == 481)
27447 {
27448 float x5 = proj.Center.X;
27449 float y5 = proj.Center.Y;
27450 float x6 = proj.velocity.X;
27451 float y6 = proj.velocity.Y;
27452 float num119 = (float)Math.Sqrt(x6 * x6 + y6 * y6);
27453 num119 = 4f / num119;
27454 if (proj.ai[0] == 0f)
27455 {
27456 x5 -= proj.velocity.X * num119;
27457 y5 -= proj.velocity.Y * num119;
27458 }
27459 else
27460 {
27461 x5 += proj.velocity.X * num119;
27462 y5 += proj.velocity.Y * num119;
27463 }
27464 Vector2 origin5 = new Vector2(x5, y5);
27465 x6 = mountedCenter.X - origin5.X;
27466 y6 = mountedCenter.Y - origin5.Y;
27467 float rotation20 = (float)Math.Atan2(y6, x6) - 1.57f;
27468 if (proj.alpha == 0)
27469 {
27470 int num120 = -1;
27471 if (proj.position.X + (float)(proj.width / 2) < mountedCenter.X)
27472 {
27473 num120 = 1;
27474 }
27475 if (Main.player[proj.owner].direction == 1)
27476 {
27477 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y6 * (float)num120, x6 * (float)num120);
27478 }
27479 else
27480 {
27481 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y6 * (float)num120, x6 * (float)num120);
27482 }
27483 }
27484 bool flag24 = true;
27485 while (flag24)
27486 {
27487 float num121 = 0.85f;
27488 float num122 = origin5.Distance(mountedCenter);
27489 float num123 = num122;
27490 if ((double)num122 < (double)TextureAssets.Chain40.Height() * 1.5)
27491 {
27492 flag24 = false;
27493 continue;
27494 }
27495 if (float.IsNaN(num122))
27496 {
27497 flag24 = false;
27498 continue;
27499 }
27500 num122 = (float)TextureAssets.Chain40.Height() * num121 / num122;
27501 x6 *= num122;
27502 y6 *= num122;
27503 origin5.X += x6;
27504 origin5.Y += y6;
27505 x6 = mountedCenter.X - origin5.X;
27506 y6 = mountedCenter.Y - origin5.Y;
27507 if (num123 > (float)(TextureAssets.Chain40.Height() * 2))
27508 {
27509 for (int n = 0; n < 2; n++)
27510 {
27511 float num124 = 0.75f;
27512 float num125 = 1f;
27513 num125 = ((n != 0) ? Math.Abs(Main.player[proj.owner].velocity.Y) : Math.Abs(Main.player[proj.owner].velocity.X));
27514 if (num125 > 10f)
27515 {
27516 num125 = 10f;
27517 }
27518 num125 /= 10f;
27519 num124 *= num125;
27520 num125 = num123 / 80f;
27521 if (num125 > 1f)
27522 {
27523 num125 = 1f;
27524 }
27525 num124 *= num125;
27526 if (num124 < 0f)
27527 {
27528 num124 = 0f;
27529 }
27530 if (float.IsNaN(num124))
27531 {
27532 continue;
27533 }
27534 if (n == 0)
27535 {
27536 if (Main.player[proj.owner].velocity.X < 0f && proj.Center.X < mountedCenter.X)
27537 {
27538 y6 *= 1f - num124;
27539 }
27540 if (Main.player[proj.owner].velocity.X > 0f && proj.Center.X > mountedCenter.X)
27541 {
27542 y6 *= 1f - num124;
27543 }
27544 }
27545 else
27546 {
27547 if (Main.player[proj.owner].velocity.Y < 0f && proj.Center.Y < mountedCenter.Y)
27548 {
27549 x6 *= 1f - num124;
27550 }
27551 if (Main.player[proj.owner].velocity.Y > 0f && proj.Center.Y > mountedCenter.Y)
27552 {
27553 x6 *= 1f - num124;
27554 }
27555 }
27556 }
27557 }
27558 Microsoft.Xna.Framework.Color color29 = Lighting.GetColor((int)origin5.X / 16, (int)(origin5.Y / 16f));
27560 }
27561 }
27562 else if (proj.type == 271)
27563 {
27564 float x7 = proj.Center.X;
27565 float y7 = proj.Center.Y;
27566 float x8 = proj.velocity.X;
27567 float y8 = proj.velocity.Y;
27568 float num126 = (float)Math.Sqrt(x8 * x8 + y8 * y8);
27569 num126 = 4f / num126;
27570 if (proj.ai[0] == 0f)
27571 {
27572 x7 -= proj.velocity.X * num126;
27573 y7 -= proj.velocity.Y * num126;
27574 }
27575 else
27576 {
27577 x7 += proj.velocity.X * num126;
27578 y7 += proj.velocity.Y * num126;
27579 }
27580 Vector2 vector26 = new Vector2(x7, y7);
27581 x8 = mountedCenter.X - vector26.X;
27582 y8 = mountedCenter.Y - vector26.Y;
27583 float rotation21 = (float)Math.Atan2(y8, x8) - 1.57f;
27584 if (proj.alpha == 0)
27585 {
27586 int num127 = -1;
27587 if (proj.position.X + (float)(proj.width / 2) < mountedCenter.X)
27588 {
27589 num127 = 1;
27590 }
27591 if (Main.player[proj.owner].direction == 1)
27592 {
27593 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y8 * (float)num127, x8 * (float)num127);
27594 }
27595 else
27596 {
27597 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y8 * (float)num127, x8 * (float)num127);
27598 }
27599 }
27600 bool flag25 = true;
27601 while (flag25)
27602 {
27603 float num128 = (float)Math.Sqrt(x8 * x8 + y8 * y8);
27604 if (num128 < 25f)
27605 {
27606 flag25 = false;
27607 continue;
27608 }
27609 if (float.IsNaN(num128))
27610 {
27611 flag25 = false;
27612 continue;
27613 }
27614 num128 = 12f / num128;
27615 x8 *= num128;
27616 y8 *= num128;
27617 vector26.X += x8;
27618 vector26.Y += y8;
27619 x8 = mountedCenter.X - vector26.X;
27620 y8 = mountedCenter.Y - vector26.Y;
27621 Microsoft.Xna.Framework.Color color30 = Lighting.GetColor((int)vector26.X / 16, (int)(vector26.Y / 16f));
27623 }
27624 }
27625 else if (proj.aiStyle == 13)
27626 {
27627 float num129 = proj.position.X + 8f;
27628 float num130 = proj.position.Y + 2f;
27629 float x9 = proj.velocity.X;
27630 float num131 = proj.velocity.Y;
27631 if (x9 == 0f && num131 == 0f)
27632 {
27633 num131 = 0.0001f;
27634 num131 = 0.0001f;
27635 }
27636 float num132 = (float)Math.Sqrt(x9 * x9 + num131 * num131);
27637 num132 = 20f / num132;
27638 if (proj.ai[0] == 0f)
27639 {
27640 num129 -= proj.velocity.X * num132;
27641 num130 -= proj.velocity.Y * num132;
27642 }
27643 else
27644 {
27645 num129 += proj.velocity.X * num132;
27646 num130 += proj.velocity.Y * num132;
27647 }
27649 x9 = mountedCenter.X - vector27.X;
27650 num131 = mountedCenter.Y - vector27.Y;
27651 float rotation22 = (float)Math.Atan2(num131, x9) - 1.57f;
27652 if (proj.alpha == 0)
27653 {
27654 int num133 = -1;
27655 if (proj.position.X + (float)(proj.width / 2) < mountedCenter.X)
27656 {
27657 num133 = 1;
27658 }
27659 if (Main.player[proj.owner].direction == 1)
27660 {
27661 Main.player[proj.owner].itemRotation = (float)Math.Atan2(num131 * (float)num133, x9 * (float)num133);
27662 }
27663 else
27664 {
27665 Main.player[proj.owner].itemRotation = (float)Math.Atan2(num131 * (float)num133, x9 * (float)num133);
27666 }
27667 }
27668 bool flag26 = true;
27669 while (flag26)
27670 {
27671 float num134 = (float)Math.Sqrt(x9 * x9 + num131 * num131);
27672 if (num134 < 25f)
27673 {
27674 flag26 = false;
27675 continue;
27676 }
27677 if (float.IsNaN(num134))
27678 {
27679 flag26 = false;
27680 continue;
27681 }
27682 num134 = 12f / num134;
27683 x9 *= num134;
27684 num131 *= num134;
27685 vector27.X += x9;
27686 vector27.Y += num131;
27687 x9 = mountedCenter.X - vector27.X;
27688 num131 = mountedCenter.Y - vector27.Y;
27689 Microsoft.Xna.Framework.Color color31 = Lighting.GetColor((int)vector27.X / 16, (int)(vector27.Y / 16f));
27690 EntitySpriteDraw(TextureAssets.Chain.Value, new Vector2(vector27.X - screenPosition.X, vector27.Y - screenPosition.Y), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Chain.Width(), TextureAssets.Chain.Height()), color31, rotation22, new Vector2((float)TextureAssets.Chain.Width() * 0.5f, (float)TextureAssets.Chain.Height() * 0.5f), 1f, SpriteEffects.None);
27691 }
27692 }
27693 else if (proj.type == 190)
27694 {
27695 float x10 = proj.position.X + (float)(proj.width / 2);
27696 float y9 = proj.position.Y + (float)(proj.height / 2);
27697 float x11 = proj.velocity.X;
27698 float y10 = proj.velocity.Y;
27699 Math.Sqrt(x11 * x11 + y10 * y10);
27700 Vector2 vector28 = new Vector2(x10, y9);
27701 x11 = mountedCenter.X - vector28.X;
27702 y10 = mountedCenter.Y + Main.player[proj.owner].gfxOffY - vector28.Y;
27703 Math.Atan2(y10, x11);
27704 if (proj.alpha == 0)
27705 {
27706 int num135 = -1;
27707 if (proj.position.X + (float)(proj.width / 2) < mountedCenter.X)
27708 {
27709 num135 = 1;
27710 }
27711 if (Main.player[proj.owner].direction == 1)
27712 {
27713 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y10 * (float)num135, x11 * (float)num135);
27714 }
27715 else
27716 {
27717 Main.player[proj.owner].itemRotation = (float)Math.Atan2(y10 * (float)num135, x11 * (float)num135);
27718 }
27719 }
27720 }
27721 else if (proj.aiStyle == 15)
27722 {
27724 }
27725 Microsoft.Xna.Framework.Color projectileColor = Lighting.GetColor((int)((double)proj.position.X + (double)proj.width * 0.5) / 16, (int)(((double)proj.position.Y + (double)proj.height * 0.5) / 16.0));
27726 if (proj.hide && !ProjectileID.Sets.DontAttachHideToAlpha[proj.type])
27727 {
27728 projectileColor = Lighting.GetColor((int)mountedCenter.X / 16, (int)(mountedCenter.Y / 16f));
27729 }
27730 if (proj.type == 14)
27731 {
27733 }
27734 int num136 = 0;
27735 int num137 = 0;
27736 if (proj.type == 175)
27737 {
27738 num136 = 10;
27739 }
27740 if (proj.type == 392)
27741 {
27742 num136 = -2;
27743 }
27744 if (proj.type == 499)
27745 {
27746 num136 = 12;
27747 }
27748 if (proj.type == 765)
27749 {
27750 num136 = 22;
27751 num137 = -16;
27752 }
27753 if (proj.type == 966)
27754 {
27755 num136 = -26;
27756 num137 = -6;
27757 }
27758 if (proj.bobber)
27759 {
27760 num136 = 8;
27761 }
27762 if (proj.type == 519)
27763 {
27764 num136 = 6;
27765 num137 -= 6;
27766 }
27767 if (proj.type == 520)
27768 {
27769 num136 = 12;
27770 }
27771 if (proj.type == 492)
27772 {
27773 num137 -= 4;
27774 num136 += 5;
27775 }
27776 if (proj.type == 498)
27777 {
27778 num136 = 6;
27779 }
27780 if (proj.type == 489)
27781 {
27782 num136 = -2;
27783 }
27784 if (proj.type == 486)
27785 {
27786 num136 = -6;
27787 }
27788 if (proj.type == 525)
27789 {
27790 num136 = 5;
27791 }
27792 if (proj.type == 488)
27793 {
27794 num137 -= 8;
27795 }
27796 if (proj.type == 373)
27797 {
27798 num137 = -10;
27799 num136 = 6;
27800 }
27801 if (proj.type == 375)
27802 {
27803 num137 = -11;
27804 num136 = 12;
27805 }
27806 if (proj.type == 423)
27807 {
27808 num137 = -5;
27809 }
27810 if (proj.type == 346)
27811 {
27812 num136 = 4;
27813 }
27814 if (proj.type == 331)
27815 {
27816 num137 = -4;
27817 }
27818 if (proj.type == 254)
27819 {
27820 num136 = 3;
27821 }
27822 if (proj.type == 273)
27823 {
27824 num137 = 2;
27825 }
27826 if (proj.type == 335)
27827 {
27828 num136 = 6;
27829 }
27830 if (proj.type == 162)
27831 {
27832 num136 = 1;
27833 num137 = 1;
27834 }
27835 if (proj.type == 377)
27836 {
27837 num136 = -6;
27838 }
27839 if (proj.type == 353)
27840 {
27841 num136 = 36;
27842 num137 = -12;
27843 }
27844 if (proj.type == 324)
27845 {
27846 num136 = 22;
27847 num137 = -6;
27848 }
27849 if (proj.type == 266)
27850 {
27851 num136 = 10;
27852 num137 = -10;
27853 }
27854 if (proj.type == 319)
27855 {
27856 num136 = 10;
27857 num137 = -12;
27858 }
27859 if (proj.type == 315)
27860 {
27861 num136 = -13;
27862 num137 = -6;
27863 }
27864 if (proj.type == 313 && proj.height != 54)
27865 {
27866 num137 = -12;
27867 num136 = 20;
27868 }
27869 if (proj.type == 314)
27870 {
27871 num137 = -8;
27872 num136 = 0;
27873 }
27874 if (proj.type == 269)
27875 {
27876 num136 = 18;
27877 num137 = -14;
27878 }
27879 if (proj.type == 268)
27880 {
27881 num136 = 22;
27882 num137 = -2;
27883 }
27884 if (proj.type == 18)
27885 {
27886 num136 = 3;
27887 num137 = 3;
27888 }
27889 if (proj.type == 16)
27890 {
27891 num136 = 6;
27892 }
27893 if (proj.type == 17 || proj.type == 31)
27894 {
27895 num136 = 2;
27896 }
27897 if (proj.type == 25 || proj.type == 26 || proj.type == 35 || proj.type == 63 || proj.type == 154)
27898 {
27899 num136 = 6;
27900 num137 -= 6;
27901 }
27902 if (proj.type == 947 || proj.type == 948)
27903 {
27904 num136 = 4;
27905 num137 -= 4;
27906 }
27907 if (proj.type == 28 || proj.type == 37 || proj.type == 75)
27908 {
27909 num136 = 8;
27910 }
27911 if (proj.type == 29 || proj.type == 470 || proj.type == 637)
27912 {
27913 num136 = 11;
27914 }
27915 if (proj.type == 43)
27916 {
27917 num136 = 4;
27918 }
27919 if (proj.type == 208)
27920 {
27921 num136 = 2;
27922 num137 -= 12;
27923 }
27924 if (proj.type == 209)
27925 {
27926 num136 = 4;
27927 num137 -= 8;
27928 }
27929 if (proj.type == 210)
27930 {
27931 num136 = 2;
27932 num137 -= 22;
27933 }
27934 if (proj.type == 251)
27935 {
27936 num136 = 18;
27937 num137 -= 10;
27938 }
27939 if (proj.type == 163 || proj.type == 310 || proj.type == 1009 || proj.type == 1010 || proj.type == 1011 || proj.type == 1008)
27940 {
27941 num136 = 10;
27942 }
27943 if (proj.type == 69 || proj.type == 70)
27944 {
27945 num136 = 4;
27946 num137 = 4;
27947 }
27948 float num138 = (float)(TextureAssets.Projectile[proj.type].Width() - proj.width) * 0.5f + (float)proj.width * 0.5f;
27949 if (proj.type == 50 || proj.type == 53 || proj.type == 515 || proj.type == 870)
27950 {
27951 num137 = -8;
27952 }
27953 if (proj.type == 473)
27954 {
27955 num137 = -6;
27956 num136 = 2;
27957 }
27958 if (proj.type == 72 || proj.type == 86 || proj.type == 87)
27959 {
27960 num137 = -16;
27961 num136 = 8;
27962 }
27963 if (proj.type == 74)
27964 {
27965 num137 = -6;
27966 }
27967 if (proj.type == 99 || proj.type == 727 || proj.type == 1013 || proj.type == 1014)
27968 {
27969 num136 = 1;
27970 }
27971 if (proj.type == 655)
27972 {
27973 num136 = 1;
27974 }
27975 if (proj.type == 111)
27976 {
27977 num136 = 18;
27978 num137 = -16;
27979 }
27980 if (proj.type == 875)
27981 {
27982 num136 = 16;
27983 num137 = -16;
27984 }
27985 if (proj.type == 881)
27986 {
27987 num136 = 14;
27988 num137 = -8;
27989 }
27990 if (proj.type == 934)
27991 {
27992 num136 = 14;
27993 num137 = -20;
27994 }
27995 if (proj.type == 934)
27996 {
27997 num136 = 14;
27998 num137 = -20;
27999 }
28000 if (proj.type == 884)
28001 {
28002 num136 = 16;
28003 num137 = -12;
28004 }
28005 if (proj.type == 890)
28006 {
28007 num136 = 26;
28008 num137 = -9;
28009 }
28010 if (proj.type == 891)
28011 {
28012 num136 = 30;
28013 num137 = -12;
28014 }
28015 if (proj.type == 897)
28016 {
28017 num136 = 38;
28018 num137 = -13;
28019 }
28020 if (proj.type == 899)
28021 {
28022 num136 = 28;
28023 num137 = -12;
28024 }
28025 if (proj.type == 900)
28026 {
28027 num136 = 54;
28028 num137 = -30;
28029 }
28030 if (proj.type == 334)
28031 {
28032 num137 = -18;
28033 num136 = 8;
28034 }
28035 if (proj.type == 816)
28036 {
28037 num137 = -19;
28038 num136 = 6;
28039 }
28040 if (proj.type == 821)
28041 {
28042 num137 = -10;
28043 num136 = 6;
28044 }
28045 if (proj.type == 825)
28046 {
28047 num137 = -19;
28048 num136 = 14;
28049 }
28050 if (proj.type == 854)
28051 {
28052 num137 = -14;
28053 num136 = 10;
28054 }
28055 if (proj.type == 858)
28056 {
28057 num137 = -8;
28058 num136 = 16;
28059 }
28060 if (proj.type == 859)
28061 {
28062 num137 = -8;
28063 num136 = 8;
28064 }
28065 if (proj.type == 860)
28066 {
28067 num137 = -8;
28068 num136 = 34;
28069 }
28070 if (proj.type == 958)
28071 {
28072 num137 = -20;
28073 num136 = 48;
28074 }
28075 if (proj.type == 960)
28076 {
28077 num137 = -14;
28078 num136 = 24;
28079 }
28080 if (proj.type == 956)
28081 {
28082 num137 = -12;
28083 num136 = 16;
28084 }
28085 if (proj.type == 959)
28086 {
28087 num137 = -14 + ((proj.spriteDirection == -1) ? (-8) : 0);
28088 num136 = 40;
28089 }
28090 if (proj.type == 994)
28091 {
28092 num137 = -10;
28093 num136 = 18;
28094 }
28095 if (proj.type == 998)
28096 {
28097 num137 = -10;
28098 num136 = 14;
28099 }
28100 if (proj.type == 1003)
28101 {
28102 num137 = -18 + ((proj.spriteDirection == 1) ? 8 : 0);
28103 num136 = 22;
28104 }
28105 if (proj.type == 1004)
28106 {
28107 num137 = -18 + ((proj.spriteDirection == 1) ? 6 : 0);
28108 num136 = 26;
28109 }
28110 if (proj.type == 200)
28111 {
28112 num136 = 12;
28113 num137 = -12;
28114 }
28115 if (proj.type == 211)
28116 {
28117 num136 = 14;
28118 num137 = 0;
28119 }
28120 if (proj.type == 236)
28121 {
28122 num136 = 30;
28123 num137 = -14;
28124 }
28125 if (proj.type >= 191 && proj.type <= 194)
28126 {
28127 num136 = 26;
28128 num137 = ((proj.direction != 1) ? (-22) : (-10));
28129 }
28130 if (proj.type >= 390 && proj.type <= 392)
28131 {
28132 num137 = 4 * proj.direction;
28133 }
28134 if (proj.type == 112)
28135 {
28136 num136 = 14;
28137 num137 = -8 + 4 * proj.spriteDirection;
28138 }
28139 _ = proj.type;
28140 _ = 118;
28141 if (proj.type == 517 || proj.type == 681)
28142 {
28143 num136 = 6;
28144 }
28145 if (proj.type == 516)
28146 {
28147 num136 = 6;
28148 }
28149 if (proj.type == 127)
28150 {
28151 num136 = 8;
28152 }
28153 if (proj.type == 155)
28154 {
28155 num136 = 3;
28156 num137 = 3;
28157 }
28158 if (proj.type == 397)
28159 {
28160 num138 -= 1f;
28161 num136 = -2;
28162 num137 = -2;
28163 }
28164 if (proj.type == 398)
28165 {
28166 num136 = 8;
28167 }
28169 if (proj.spriteDirection == -1)
28170 {
28171 dir = SpriteEffects.FlipHorizontally;
28172 }
28173 if (proj.type == 681 && proj.velocity.X > 0f)
28174 {
28175 dir ^= SpriteEffects.FlipHorizontally;
28176 }
28177 if (proj.type == 221)
28178 {
28179 for (int num139 = 1; num139 < 10; num139++)
28180 {
28181 float num140 = proj.velocity.X * (float)num139 * 0.5f;
28182 float num141 = proj.velocity.Y * (float)num139 * 0.5f;
28184 float num142 = 0f;
28185 if (num139 == 1)
28186 {
28187 num142 = 0.9f;
28188 }
28189 if (num139 == 2)
28190 {
28191 num142 = 0.8f;
28192 }
28193 if (num139 == 3)
28194 {
28195 num142 = 0.7f;
28196 }
28197 if (num139 == 4)
28198 {
28199 num142 = 0.6f;
28200 }
28201 if (num139 == 5)
28202 {
28203 num142 = 0.5f;
28204 }
28205 if (num139 == 6)
28206 {
28207 num142 = 0.4f;
28208 }
28209 if (num139 == 7)
28210 {
28211 num142 = 0.3f;
28212 }
28213 if (num139 == 8)
28214 {
28215 num142 = 0.2f;
28216 }
28217 if (num139 == 9)
28218 {
28219 num142 = 0.1f;
28220 }
28221 alpha.R = (byte)((float)(int)alpha.R * num142);
28222 alpha.G = (byte)((float)(int)alpha.G * num142);
28223 alpha.B = (byte)((float)(int)alpha.B * num142);
28224 alpha.A = (byte)((float)(int)alpha.A * num142);
28225 int num143 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
28226 int y11 = num143 * proj.frame;
28227 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137 - num140, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY - num141), new Microsoft.Xna.Framework.Rectangle(0, y11, TextureAssets.Projectile[proj.type].Width(), num143), alpha, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
28228 }
28229 }
28230 if (proj.type == 408 || proj.type == 435 || proj.type == 436 || proj.type == 438 || proj.type == 452 || proj.type == 454 || proj.type == 459 || proj.type == 462 || proj.type == 503 || proj.type == 532 || proj.type == 533 || proj.type == 573 || proj.type == 582 || proj.type == 585 || proj.type == 592 || proj.type == 601 || proj.type == 636 || proj.type == 638 || proj.type == 640 || proj.type == 639 || proj.type == 424 || proj.type == 425 || proj.type == 426 || proj.type == 660 || proj.type == 661 || proj.type == 671 || proj.type == 664 || proj.type == 666 || proj.type == 668 || proj.type == 675 || proj.type == 680 || proj.type == 682 || proj.type == 684 || proj.type == 686 || proj.type == 700 || proj.type == 706 || proj.type == 709 || proj.type == 710 || proj.type == 711 || proj.type == 261 || ProjectileID.Sets.IsAGolfBall[proj.type] || proj.type == 729 || proj.type == 732 || proj.type == 731 || proj.type == 755 || proj.type == 811 || proj.type == 814 || proj.type == 819 || proj.type == 864 || proj.type == 873 || proj.type == 872 || proj.type == 833 || proj.type == 834 || proj.type == 835 || proj.type == 818 || proj.type == 902 || proj.type == 894 || proj.type == 901 || proj.type == 909 || proj.type == 916 || proj.type == 931 || proj.type == 933 || proj.type == 964 || proj.type == 965 || proj.type == 977 || proj.type == 976 || proj.type == 1001)
28231 {
28233 int num144 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
28234 int y12 = num144 * proj.frame;
28236 Vector2 origin6 = rectangle4.Size() / 2f;
28238 float num145 = 0f;
28239 if (proj.type == 503)
28240 {
28241 origin6.Y = 70f;
28242 }
28243 if (proj.type == 686 || proj.type == 711)
28244 {
28245 origin6.Y = rectangle4.Height - 70;
28246 }
28247 if (proj.type == 438)
28248 {
28249 rectangle4.Y = 0;
28250 }
28251 if (proj.type == 452)
28252 {
28253 rectangle4.Y = 0;
28254 }
28255 if (proj.type == 408)
28256 {
28257 rectangle4.Y = num144;
28258 }
28259 if (proj.type == 636)
28260 {
28261 origin6.Y = 10f;
28262 }
28263 if (proj.type == 638)
28264 {
28265 origin6.Y = 2f;
28266 }
28267 if (proj.type == 640 || proj.type == 639 || proj.type == 710)
28268 {
28269 origin6.Y = 5f;
28270 }
28271 if (proj.type == 700)
28272 {
28273 origin6.X = ((proj.spriteDirection == 1) ? (rectangle4.Width - 20) : 20);
28274 }
28275 if (proj.type == 965 || proj.type == 964)
28276 {
28277 origin6.X = ((proj.spriteDirection == 1) ? (rectangle4.Width - 20) : 20);
28278 }
28279 if (proj.type == 872)
28280 {
28281 rectangle4.Width /= 2;
28282 origin6.X /= 2f;
28283 }
28284 if (proj.type == 933)
28285 {
28286 int num146 = (int)proj.ai[1];
28287 if (TextureAssets.Item.IndexInRange(num146))
28288 {
28289 instance.LoadItem(num146);
28291 rectangle4 = value11.Frame();
28292 origin6 = rectangle4.Size() / 2f;
28293 num145 = -(float)Math.PI / 4f * (float)proj.spriteDirection;
28294 }
28295 }
28296 if (proj.type == 833 && proj.frame != 8)
28297 {
28298 zero.Y += proj.height / 2;
28299 origin6 = rectangle4.Size() * new Vector2(0.5f, 1f);
28300 origin6.Y -= 4f;
28301 origin6.X -= 7 * dir.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt();
28302 }
28303 if ((proj.type == 834 || proj.type == 835) && proj.frame != 10)
28304 {
28305 zero.Y += proj.height / 2;
28306 origin6 = rectangle4.Size() * new Vector2(0.5f, 1f);
28307 origin6.Y -= 4f;
28308 origin6.X -= 2 * dir.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt();
28309 }
28310 int num147 = 8;
28311 int num148 = 2;
28312 int num149 = 1;
28313 float value12 = 1f;
28314 float num150 = 15f;
28315 float num151 = 0f;
28318 if (proj.type == 909)
28319 {
28320 num149 = 5;
28321 num147 = 0;
28322 num148 = -1;
28323 }
28324 else if (proj.type == 503)
28325 {
28326 num147 = 9;
28327 num148 = 3;
28328 value12 = 0.5f;
28329 }
28330 else if (proj.type == 261)
28331 {
28332 num149 = 18;
28333 num147 = 0;
28334 num148 = -2;
28335 value12 = 1.3f;
28336 }
28337 else if (proj.type == 833 || proj.type == 834 || proj.type == 835)
28338 {
28339 num149 = 6;
28340 num147 = 0;
28341 num148 = -1;
28342 value12 = 1.5f;
28343 }
28344 else if (proj.type == 818)
28345 {
28346 num149 = 18;
28347 num147 = 0;
28348 num148 = -2;
28349 value12 = 1f;
28350 }
28351 else if (proj.type == 729)
28352 {
28353 num149 = 18;
28354 num147 = 0;
28355 num148 = -2;
28356 value12 = 1.3f;
28357 }
28358 else if (proj.type == 977)
28359 {
28360 num149 = 18;
28361 num147 = 0;
28362 num148 = -2;
28363 value12 = 1.3f;
28364 }
28365 else if (proj.type == 1001)
28366 {
28367 num149 = 10;
28368 num147 = 0;
28369 num148 = -2;
28370 value12 = 1.3f;
28371 dir = ((proj.spriteDirection != 1) ? SpriteEffects.FlipVertically : SpriteEffects.None);
28372 }
28373 else if (proj.type == 976)
28374 {
28375 num149 = 18;
28376 num147 = 0;
28377 num148 = -3;
28378 value12 = 1.3f;
28379 rectangle4 = new Microsoft.Xna.Framework.Rectangle(0, 20 * proj.frame, 32, 18);
28381 origin6 = rectangle4.Size() / 2f;
28382 }
28383 else if (proj.type == 686 || proj.type == 711)
28384 {
28385 num149 = 19;
28386 num147 = 0;
28387 num148 = -3;
28388 value12 = 0.5f;
28389 }
28390 else if (ProjectileID.Sets.IsAGolfBall[proj.type])
28391 {
28392 num149 = 0;
28393 num147 = 0;
28394 num148 = -1;
28395 value12 = 2f;
28396 }
28397 else if (proj.type == 671)
28398 {
28399 num149 = 5;
28400 num147 = 0;
28401 num148 = -1;
28402 value12 = 2.6f;
28403 }
28404 else if (proj.type == 811)
28405 {
28406 num149 = 5;
28407 num147 = 0;
28408 num148 = -1;
28409 value12 = 2.6f;
28411 }
28412 else if (proj.type == 814)
28413 {
28414 num149 = 18;
28415 num147 = 0;
28416 num148 = -1;
28417 value12 = 1f;
28419 }
28420 else if (proj.type == 755)
28421 {
28422 num149 = 5;
28423 num147 = 0;
28424 num148 = -1;
28425 value12 = 2.6f;
28426 }
28427 else if (proj.type == 700)
28428 {
28429 num147 = 5;
28430 num148 = 1;
28431 value12 = 2.6f;
28432 }
28433 else if (proj.type == 965 || proj.type == 964)
28434 {
28435 num147 = 5;
28436 num148 = 1;
28437 value12 = 2.6f;
28438 }
28439 else if (proj.type == 731)
28440 {
28441 num149 = 19;
28442 num147 = 0;
28443 num148 = -1;
28444 value12 = 0.5f;
28445 }
28446 else if (proj.type == 864)
28447 {
28448 num149 = 12;
28449 num147 = 0;
28450 num148 = -1;
28451 value12 = 1.4f;
28452 value13.Y += value13.Height;
28453 }
28454 else if (proj.type == 916)
28455 {
28456 num149 = 19;
28457 num147 = 0;
28458 num148 = -1;
28459 value12 = 1.4f;
28460 value13.Y += value13.Height;
28462 unifiedRandom.SetSeed(proj.timeLeft);
28463 }
28464 else if (proj.type == 873)
28465 {
28466 num149 = 39;
28467 num150 = 40f;
28468 num147 = 0;
28469 num148 = -1;
28470 value12 = 1.4f;
28471 }
28472 else if (proj.type == 931)
28473 {
28474 num149 = 19;
28475 num150 = 20f;
28476 num147 = 0;
28477 num148 = -1;
28478 value12 = 0.7f;
28479 }
28480 else if (proj.type == 933)
28481 {
28482 num149 = 60;
28483 num150 = 60f;
28484 num147 = 0;
28485 num148 = -15;
28486 value12 = 1f;
28487 }
28488 else if (proj.type == 872)
28489 {
28490 num149 = 79;
28491 num150 = 10f;
28492 num147 = 0;
28493 num148 = -1;
28494 value12 = 1f;
28495 value13.X += value13.Width;
28496 }
28497 else if (proj.type == 664 || proj.type == 666 || proj.type == 668)
28498 {
28499 num147 = 8;
28500 num148 = 2;
28501 value12 = 0.4f;
28502 }
28503 else if (proj.type == 582 || proj.type == 902)
28504 {
28505 if (proj.ai[2] == 1f)
28506 {
28507 value11 = TextureAssets.Extra[263].Value;
28508 }
28509 num147 = 10;
28510 num148 = 2;
28511 value12 = 0.7f;
28512 num151 = 0.2f;
28513 }
28514 else if (proj.type == 675)
28515 {
28516 num147 = 5;
28517 num148 = 1;
28518 value12 = 0.4f;
28519 }
28520 else if (proj.type == 638)
28521 {
28522 num147 = 5;
28523 num148 = 1;
28524 value12 = 1f;
28525 }
28526 else if (proj.type == 660)
28527 {
28528 num147 = 3;
28529 num148 = 1;
28530 value12 = 8f;
28531 rectangle4 = new Microsoft.Xna.Framework.Rectangle(38 * proj.frame, 0, 38, 38);
28533 origin6 = rectangle4.Size() / 2f;
28534 }
28535 else if (proj.type == 684)
28536 {
28537 num147 = 8;
28538 num148 = 1;
28539 value12 = 0.75f;
28540 }
28541 else if (proj.type == 639)
28542 {
28543 num147 = 10;
28544 num148 = 1;
28545 value12 = 1f;
28546 }
28547 else if (proj.type == 710)
28548 {
28549 num149 = 9;
28550 num147 = 0;
28551 num148 = -2;
28552 value12 = 0.5f;
28553 }
28554 else if (proj.type == 640)
28555 {
28556 num147 = 20;
28557 num148 = 1;
28558 value12 = 1f;
28559 }
28560 else if (proj.type == 436)
28561 {
28562 num148 = 2;
28563 value12 = 0.5f;
28564 }
28565 else if (proj.type == 424 || proj.type == 425 || proj.type == 426)
28566 {
28567 num147 = 10;
28568 num148 = 2;
28569 value12 = 0.6f;
28570 }
28571 else if (proj.type == 438)
28572 {
28573 num147 = 10;
28574 num148 = 2;
28575 value12 = 1f;
28576 }
28577 else if (proj.type == 452)
28578 {
28579 num147 = 10;
28580 num148 = 3;
28581 value12 = 0.5f;
28582 }
28583 else if (proj.type == 454)
28584 {
28585 num147 = 5;
28586 num148 = 1;
28587 value12 = 0.2f;
28588 }
28589 else if (proj.type == 462)
28590 {
28591 num147 = 7;
28592 num148 = 1;
28593 value12 = 0.2f;
28594 }
28595 else if (proj.type == 661)
28596 {
28597 num147 = 0;
28598 num148 = 1;
28599 value12 = 0.5f;
28600 }
28601 else if (proj.type == 706)
28602 {
28603 num149 = 9;
28604 num147 = 0;
28605 num148 = -2;
28606 value12 = 0.5f;
28607 }
28608 else if (proj.type == 585)
28609 {
28610 num147 = 7;
28611 num148 = 1;
28612 value12 = 0.2f;
28613 }
28614 else if (proj.type == 459)
28615 {
28616 num147 = (int)(proj.scale * 8f);
28617 num148 = num147 / 4;
28618 if (num148 < 1)
28619 {
28620 num148 = 1;
28621 }
28622 value12 = 0.3f;
28623 }
28624 else if (proj.type == 709)
28625 {
28626 num147 = 8;
28627 num148 = num147 / 4;
28628 if (num148 < 1)
28629 {
28630 num148 = 1;
28631 }
28632 value12 = 0.5f;
28633 }
28634 else if (proj.type == 532)
28635 {
28636 num147 = 10;
28637 num148 = 1;
28638 value12 = 0.7f;
28639 num151 = 0.2f;
28640 }
28641 else if (proj.type == 592)
28642 {
28643 num147 = 10;
28644 num148 = 2;
28645 value12 = 1f;
28646 }
28647 else if (proj.type == 601)
28648 {
28649 num147 = 8;
28650 num148 = 1;
28651 value12 = 0.3f;
28652 }
28653 else if (proj.type == 636)
28654 {
28655 num147 = 20;
28656 num148 = 3;
28657 value12 = 0.5f;
28658 }
28659 else if (proj.type == 680)
28660 {
28661 num147 = 9;
28662 num148 = 3;
28663 value12 = 0.5f;
28664 }
28665 else if (proj.type == 533)
28666 {
28667 if (proj.ai[0] >= 6f && proj.ai[0] <= 8f)
28668 {
28669 num147 = ((proj.ai[0] == 6f) ? 8 : 4);
28670 num148 = 1;
28671 if (proj.ai[0] != 7f)
28672 {
28673 num151 = 0.2f;
28674 }
28675 }
28676 else
28677 {
28678 num147 = (num148 = 0);
28679 }
28680 }
28681 for (int num152 = num149; (num148 > 0 && num152 < num147) || (num148 < 0 && num152 > num147); num152 += num148)
28682 {
28683 if (num152 >= proj.oldPos.Length)
28684 {
28685 continue;
28686 }
28688 if (proj.type == 408 || proj.type == 435 || proj.type == 682 || proj.type == 732 || proj.type == 731)
28689 {
28691 }
28692 else if (proj.type == 436)
28693 {
28695 }
28696 else if (proj.type >= 424 && proj.type <= 426)
28697 {
28699 }
28700 else if (proj.type == 640 || proj.type == 639)
28701 {
28702 color32.A = 127;
28703 }
28704 else if (proj.type == 671)
28705 {
28707 }
28708 else if (proj.type == 811)
28709 {
28711 }
28712 else if (proj.type == 814)
28713 {
28714 color32 = Microsoft.Xna.Framework.Color.Lerp(color32, color32 * 0.5f, (float)num152 / (float)num147);
28715 }
28716 else if (proj.type == 261)
28717 {
28718 color32 = Microsoft.Xna.Framework.Color.Lerp(color32, new Microsoft.Xna.Framework.Color(60, 60, 60, 60), (float)num152 / (float)num147);
28719 }
28720 else if (ProjectileID.Sets.IsAGolfBall[proj.type])
28721 {
28722 color32 = Microsoft.Xna.Framework.Color.Lerp(color32, new Microsoft.Xna.Framework.Color(255, 230, 40, 20), (float)num152 / (float)num147);
28723 }
28724 color32 = proj.GetAlpha(color32);
28725 if (proj.type == 438)
28726 {
28727 color32.G /= (byte)num152;
28728 color32.B /= (byte)num152;
28729 }
28730 else if (proj.type == 755)
28731 {
28732 color32 = proj.AI_156_GetColor();
28733 }
28734 else if (proj.type == 873)
28735 {
28736 color32 = proj.AI_171_GetColor();
28737 color32.A /= 2;
28738 color32 *= Utils.GetLerpValue(0f, 20f, proj.timeLeft, clamped: true);
28739 }
28740 else if (proj.type == 931)
28741 {
28742 color32 = proj.GetFairyQueenWeaponsColor(0.5f);
28743 color32 *= Utils.GetLerpValue(0f, 20f, proj.timeLeft, clamped: true);
28744 }
28745 else if (proj.type == 872)
28746 {
28747 color32 = proj.AI_173_GetColor();
28748 color32 *= 0.4f;
28749 color32.A = (byte)((float)(int)color32.A * 0.6f);
28750 if (num152 > 80)
28751 {
28752 color32 *= 0.15f * Utils.GetLerpValue(120f, 80f, num152, clamped: true);
28753 }
28754 }
28755 else if (proj.type == 864)
28756 {
28757 color32 = proj.GetFloatingDaggerMinionGlowColor();
28758 color32.A /= 4;
28759 }
28760 else if (proj.type == 682)
28761 {
28762 color32.G /= (byte)num152;
28763 }
28764 else if (proj.type == 686)
28765 {
28766 if (proj.oldPos[num152] == Vector2.Zero)
28767 {
28768 continue;
28769 }
28770 float num153 = (float)num152 / (float)num149;
28771 color32 = ((!(num153 < 0.5f)) ? Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Purple, Microsoft.Xna.Framework.Color.Black, Utils.GetLerpValue(0.5f, 1f, num153)) : Microsoft.Xna.Framework.Color.Lerp(color32, Microsoft.Xna.Framework.Color.Purple, Utils.GetLerpValue(0f, 0.5f, num153)));
28772 }
28773 else if (proj.type == 711)
28774 {
28775 if (proj.oldPos[num152] == Vector2.Zero)
28776 {
28777 continue;
28778 }
28779 float num154 = (float)num152 / (float)num149;
28780 color32 = ((!(num154 < 0.5f)) ? Microsoft.Xna.Framework.Color.Lerp(new Microsoft.Xna.Framework.Color(128, 0, 255, 180), Microsoft.Xna.Framework.Color.Black, Utils.GetLerpValue(0.5f, 1f, num154)) : Microsoft.Xna.Framework.Color.Lerp(color32, new Microsoft.Xna.Framework.Color(128, 0, 255, 180), Utils.GetLerpValue(0f, 0.5f, num154)));
28781 }
28782 else if (proj.type == 684)
28783 {
28784 if (num152 == 1)
28785 {
28786 color32.B /= 2;
28787 color32.G /= 2;
28788 color32.A /= 2;
28789 }
28790 color32.B /= (byte)num152;
28791 color32.G /= (byte)num152;
28792 color32.A /= (byte)num152;
28793 }
28794 else if (proj.type == 706 || proj.type == 710)
28795 {
28796 color32.B /= (byte)num152;
28797 color32.G /= (byte)num152;
28798 color32.A /= (byte)num152;
28799 }
28800 else if (proj.type == 818)
28801 {
28802 float num155 = 0.3f;
28803 float num156 = Utils.GetLerpValue(0f, num155, proj.ai[0], clamped: true) * Utils.GetLerpValue(1f, 1f - num155, proj.ai[0], clamped: true);
28804 Utils.GetLerpValue(0f, num148 * -3, num152, clamped: true);
28805 Utils.GetLerpValue(num149, num149 + num148 * 3, num152, clamped: true);
28808 ourFavoriteColor.A = 0;
28811 }
28812 else if (proj.type == 833 || proj.type == 834 || proj.type == 835)
28813 {
28814 float lerpValue2 = Utils.GetLerpValue(0f, 6f, proj.velocity.Length(), clamped: true);
28816 color32.A = 0;
28818 }
28819 else if (proj.type == 592)
28820 {
28821 color32.R /= (byte)num152;
28822 color32.G /= (byte)num152;
28823 }
28824 else if (proj.type == 640)
28825 {
28826 color32.R /= (byte)num152;
28827 color32.A /= (byte)num152;
28828 }
28829 else if (proj.type >= 424 && proj.type <= 426)
28830 {
28831 color32.B /= (byte)num152;
28832 color32.G /= (byte)num152;
28833 color32.A /= (byte)num152;
28834 }
28835 else if (proj.type == 964 || proj.type == 965)
28836 {
28837 color32 = Microsoft.Xna.Framework.Color.Black * proj.Opacity;
28838 }
28839 float num157 = num147 - num152;
28840 if (num148 < 0)
28841 {
28842 num157 = num149 - num152;
28843 }
28844 color32 *= num157 / ((float)ProjectileID.Sets.TrailCacheLength[proj.type] * 1.5f);
28845 Vector2 vector29 = proj.oldPos[num152];
28846 float num158 = proj.rotation;
28849 {
28850 num158 = proj.oldRot[num152];
28851 effects2 = ((proj.oldSpriteDirection[num152] == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None);
28852 }
28853 if (vector29 == Vector2.Zero)
28854 {
28855 continue;
28856 }
28857 if (proj.type == 916)
28858 {
28859 value13.Y += value13.Height;
28860 value13.Y %= value13.Height * projFrames[proj.type];
28861 _ = num157 / ((float)ProjectileID.Sets.TrailCacheLength[proj.type] * 1.5f);
28863 int num159 = unifiedRandom.Next(3);
28864 if (num159 == 2 || num159 == 1)
28865 {
28866 color33 = Microsoft.Xna.Framework.Color.Lerp(new Microsoft.Xna.Framework.Color(106, 90, 205, 127), Microsoft.Xna.Framework.Color.Black, 0.2f + 0.8f * unifiedRandom.NextFloat());
28867 }
28868 color32 = color33;
28869 float num160 = num157 / (float)ProjectileID.Sets.TrailCacheLength[proj.type];
28870 num160 = Utils.GetLerpValue(0f, (float)ProjectileID.Sets.TrailCacheLength[proj.type] * 0.75f, num157, clamped: true);
28871 color32 *= num160;
28872 vector29 += unifiedRandom.NextVector2Circular(8f, 8f);
28873 }
28874 if (proj.type == 976)
28875 {
28876 int num161 = value13.Height + 2;
28877 value13.Y += num161;
28878 value13.Y %= num161 * 7;
28879 color32 *= Lighting.GetColor((vector29 + zero + proj.Size / 2f).ToTileCoordinates()).ToVector3().Length() / 1.74f;
28880 }
28881 if (proj.type == 933)
28882 {
28883 float t = proj.localAI[0] - (float)num152;
28884 float num162 = Utils.GetLerpValue(0f, 20f, t, clamped: true) * Utils.GetLerpValue(68f, 60f, t, clamped: true);
28885 float lerpValue3 = Utils.GetLerpValue(0f, ProjectileID.Sets.TrailCacheLength[proj.type], num157, clamped: true);
28886 color32 = Microsoft.Xna.Framework.Color.White * lerpValue3 * proj.Opacity * num162;
28887 }
28888 Vector2 position3 = vector29 + zero + proj.Size / 2f - screenPosition + new Vector2(0f, proj.gfxOffY);
28889 EntitySpriteDraw(value11, position3, value13, color32, num158 + num145 + proj.rotation * num151 * (float)(num152 - 1) * (float)(-dir.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt()), origin6, MathHelper.Lerp(proj.scale, value12, (float)num152 / num150), effects2);
28890 }
28891 if (proj.type == 661)
28892 {
28894 for (int num163 = 0; num163 < 4; num163++)
28895 {
28896 EntitySpriteDraw(TextureAssets.Extra[75].Value, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) + proj.rotation.ToRotationVector2().RotatedBy((float)Math.PI / 2f * (float)num163) * 4f, rectangle4, color34, proj.rotation, origin6, proj.scale, dir);
28897 }
28898 }
28899 if (proj.type == 864)
28900 {
28901 Microsoft.Xna.Framework.Color floatingDaggerMinionGlowColor = proj.GetFloatingDaggerMinionGlowColor();
28902 floatingDaggerMinionGlowColor.A /= 4;
28904 value15.Y += value15.Height;
28905 for (int num164 = 0; num164 < 4; num164++)
28906 {
28907 EntitySpriteDraw(value11, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) + proj.rotation.ToRotationVector2().RotatedBy((float)Math.PI / 2f * (float)num164) * 2f, value15, floatingDaggerMinionGlowColor, proj.rotation, origin6, proj.scale, dir);
28908 }
28909 }
28910 if (proj.type == 873 || proj.type == 931)
28911 {
28912 Microsoft.Xna.Framework.Color color35 = proj.AI_171_GetColor() * 0.5f;
28913 color35.A = 0;
28914 if (proj.type == 931)
28915 {
28916 color35 = proj.GetFairyQueenWeaponsColor(0f);
28917 }
28918 Vector2 vector30 = proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY);
28919 EntitySpriteDraw(value11, vector30, rectangle4, color35, proj.rotation, origin6, proj.scale * 0.9f, dir);
28922 Vector2 origin7 = value16.Size() / 2f;
28924 float num165 = Utils.GetLerpValue(15f, 30f, proj.timeLeft, clamped: true) * Utils.GetLerpValue(240f, 200f, proj.timeLeft, clamped: true) * (1f + 0.2f * (float)Math.Cos(GlobalTimeWrappedHourly % 30f / 0.5f * ((float)Math.PI * 2f) * 3f)) * 0.8f;
28925 Vector2 vector31 = new Vector2(0.5f, 5f) * num165;
28926 Vector2 vector32 = new Vector2(0.5f, 2f) * num165;
28927 color36 *= num165;
28928 color37 *= num165;
28929 int num166 = 0;
28930 Vector2 position4 = vector30 + proj.velocity.SafeNormalize(Vector2.Zero) * MathHelper.Lerp(0.5f, 1f, proj.localAI[0] / 60f) * num166;
28931 if (proj.type == 931)
28932 {
28933 vector31 *= 0.4f;
28934 vector32 *= 0.4f;
28935 }
28938 EntitySpriteDraw(value16, position4, null, color37, (float)Math.PI / 2f, origin7, vector31 * 0.6f, dir);
28940 }
28941 if (proj.type == 755)
28942 {
28943 Microsoft.Xna.Framework.Color color38 = proj.AI_156_GetColor();
28944 color38.A = 120;
28945 for (int num167 = 0; num167 < 4; num167++)
28946 {
28947 EntitySpriteDraw(value11, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) + proj.rotation.ToRotationVector2().RotatedBy((float)Math.PI / 2f * (float)num167) * 2f, rectangle4, color38, proj.rotation, origin6, proj.scale, dir);
28948 }
28949 }
28950 else if (proj.type == 684)
28951 {
28952 float x12 = (proj.localAI[0] * ((float)Math.PI * 2f) / 30f).ToRotationVector2().X;
28954 color39 *= 0.75f + 0.25f * x12;
28955 for (int num168 = 0; num168 < 8; num168++)
28956 {
28957 EntitySpriteDraw(value11, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) + proj.rotation.ToRotationVector2().RotatedBy((float)Math.PI / 4f * (float)num168) * (4f + 1f * x12), rectangle4, color39, proj.rotation, origin6, proj.scale, dir);
28958 }
28959 }
28960 else if (ProjectileID.Sets.IsAGolfBall[proj.type])
28961 {
28962 Player player2 = Main.player[proj.owner];
28964 bool flag28 = false;
28965 if (flag27)
28966 {
28967 flag28 |= player2.ownedProjectileCounts[722] > 0 && player2.itemAnimation >= player2.itemAnimationMax;
28968 flag28 |= player2.itemAnimation == 0;
28969 flag28 &= player2.velocity.Y == 0f;
28970 }
28971 Vector2 shotVector = MouseWorld - proj.Center;
28973 {
28975 Projectile projectile = null;
28976 for (int num169 = 0; num169 < 1000; num169++)
28977 {
28978 Projectile projectile2 = Main.projectile[num169];
28979 if (projectile2.active && projectile2.owner == player2.whoAmI && projectile2.type == 722)
28980 {
28982 break;
28983 }
28984 }
28985 if (projectile != null)
28986 {
28989 if (impactVelocity.Length() > 0.05f)
28990 {
28991 GolfHelper.DrawPredictionLine(proj, impactVelocity, shotStrength.RelativeStrength, shotStrength.RoughLandResistance);
28992 }
28993 }
28994 }
28996 {
28997 Microsoft.Xna.Framework.Color golfTrailColor = Projectile.GetGolfTrailColor(proj);
28998 float num170 = proj.velocity.Length() / 16f;
28999 if (num170 > 1f)
29000 {
29001 num170 = 1f;
29002 }
29004 if (proj.oldPos[4] != Vector2.Zero)
29005 {
29007 for (float num171 = 0f; num171 <= 1f; num171 += 0.04f)
29008 {
29009 EntitySpriteDraw(value11, Vector2.Lerp(proj.oldPos[4], proj.position, num171) + proj.Size / 2f - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle4, golfTrailColor * num171, proj.rotation, origin6, proj.scale * MathHelper.Lerp(0.7f, 1.5f, num171), dir);
29010 }
29011 }
29012 EntitySpriteDraw(value11, proj.position + proj.Size / 2f - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle4, golfTrailColor, proj.rotation, origin6, proj.scale * 1.5f, dir);
29013 }
29014 }
29015 if (proj.type == 964 || proj.type == 965)
29016 {
29018 if (proj.type == 965)
29019 {
29021 }
29023 float num172 = ((proj.type == 964) ? 60 : 30);
29024 for (int num173 = 0; num173 < 4; num173++)
29025 {
29026 EntitySpriteDraw(value11, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) + proj.rotation.ToRotationVector2().RotatedBy(proj.ai[0] / num172 * ((float)Math.PI * 2f) + (float)Math.PI / 2f * (float)num173) * 6f, rectangle4, color41, proj.rotation, origin6, proj.scale, dir);
29027 }
29028 }
29030 float num174 = proj.scale;
29031 float rotation23 = proj.rotation + num145;
29032 if (proj.type == 640)
29033 {
29035 }
29036 if (proj.type == 684)
29037 {
29038 color42.A = 127;
29039 }
29040 if (proj.type == 873)
29041 {
29042 color42.A /= 2;
29043 }
29044 if (proj.type == 931)
29045 {
29046 color42.A /= 2;
29047 }
29048 if (proj.type == 872)
29049 {
29050 color42 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * proj.Opacity;
29051 num174 *= 0.9f;
29052 }
29053 if (proj.type == 818)
29054 {
29056 }
29057 if (proj.type == 916)
29058 {
29060 }
29061 if (proj.type == 964 || proj.type == 965)
29062 {
29063 color42 = Microsoft.Xna.Framework.Color.Black * proj.Opacity;
29064 }
29065 if (proj.type == 933)
29066 {
29067 float t2 = proj.localAI[0];
29068 float num175 = Utils.GetLerpValue(0f, 20f, t2, clamped: true) * Utils.GetLerpValue(68f, 60f, t2, clamped: true);
29069 color42 *= num175;
29070 }
29072 if (proj.type == 894)
29073 {
29074 float num176 = Utils.WrappedLerp(0.6f, 1f, (float)((int)timeForVisualEffects % 70) / 70f);
29075 EntitySpriteDraw(color: new Microsoft.Xna.Framework.Color(num176, num176, num176, 150f), texture: TextureAssets.GlowMask[282].Value, position: proj.Center + zero - screenPosition + new Vector2(0f, proj.gfxOffY), sourceRectangle: rectangle4, rotation: proj.rotation, origin: origin6, scale: proj.scale, effects: dir);
29076 }
29077 if (proj.type == 503)
29078 {
29079 EntitySpriteDraw(TextureAssets.Extra[36].Value, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle4, Microsoft.Xna.Framework.Color.White, proj.localAI[0], origin6, proj.scale, dir);
29080 }
29081 else if (proj.type == 533)
29082 {
29083 EntitySpriteDraw(TextureAssets.GlowMask[128].Value, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle4, Microsoft.Xna.Framework.Color.White * 0.3f, proj.rotation, origin6, proj.scale, dir);
29084 }
29085 else if (proj.type == 261)
29086 {
29087 float num177 = 0.7f;
29088 float num178 = proj.velocity.Length();
29089 if (num178 < 0.3f && proj.velocity.Y == 0f)
29090 {
29091 num177 = Utils.GetLerpValue(0.02f, 0.3f, num178, clamped: true) * 0.7f;
29092 }
29093 EntitySpriteDraw(TextureAssets.GlowMask[252].Value, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle4, Microsoft.Xna.Framework.Color.White * num177, proj.rotation, origin6, proj.scale, dir);
29094 }
29095 else if (proj.type == 601)
29096 {
29098 white2.A = 0;
29099 EntitySpriteDraw(value11, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle4, white2, proj.rotation, origin6, proj.scale * 0.7f, dir);
29100 }
29102 {
29104 }
29105 if (proj.type == 933)
29106 {
29107 float t3 = proj.localAI[0];
29108 float num179 = Utils.GetLerpValue(0f, 20f, t3, clamped: true) * Utils.GetLerpValue(68f, 60f, t3, clamped: true);
29109 EntitySpriteDraw(value11, proj.Center + zero - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle4, new Microsoft.Xna.Framework.Color(255, 255, 255, 127) * proj.Opacity * num179, rotation23, origin6, num174 * 1.25f, dir);
29111 Microsoft.Xna.Framework.Color trailColor = finalFractalProfile.trailColor;
29112 trailColor.A /= 2;
29113 DrawPrettyStarSparkle(proj.Opacity, dir, proj.Center + zero - screenPosition + new Vector2(0f, proj.gfxOffY) + (proj.rotation - (float)Math.PI / 2f).ToRotationVector2() * finalFractalProfile.trailWidth, Microsoft.Xna.Framework.Color.White * num179, trailColor * num179, proj.localAI[0], 15f, 30f, 30f, 45f, 0f, new Vector2(5f, 2f), Vector2.One);
29114 }
29115 }
29116 else if (proj.type == 672)
29117 {
29118 Vector2 position5 = proj.Center - screenPosition;
29119 if (proj.localAI[1] == 0f)
29120 {
29121 position5.Y += 60f;
29122 float num180 = proj.localAI[0] / 120f;
29123 for (int num181 = 0; num181 < 4; num181++)
29124 {
29125 float value17 = num180 * 2f - (float)num181 / 3f;
29126 value17 = MathHelper.Clamp(value17, 0f, 1f);
29127 float num182 = 1f - MathHelper.Clamp((num180 - 0.8f) / 0.2f, 0f, 1f);
29128 EntitySpriteDraw(TextureAssets.MagicPixel.Value, position5, null, new Microsoft.Xna.Framework.Color(0.4f, 0.17f, 0.4f, 0f) * (value17 * num182) * 1.3f, 0f, new Vector2((float)TextureAssets.MagicPixel.Width() / 2f, TextureAssets.MagicPixel.Height()), new Vector2((float)Math.Sqrt(value17) * 100f, value17 * 2f), SpriteEffects.None);
29129 }
29130 }
29131 else if (proj.localAI[1] == 1f)
29132 {
29133 _ = proj.localAI[0] / 300f;
29134 float num183 = Math.Min(1f, proj.localAI[0] / 30f);
29135 int num184 = (int)(GlobalTimeWrappedHourly * 10f) % 8;
29137 DrawElderEye(spriteBatch, proj.Center, 1f, 1f, (num184 + 1) % 8, new Microsoft.Xna.Framework.Color(0.2f, 0.2f, 0.2f, 0f) * num183);
29138 }
29139 else if (proj.localAI[1] == 2f)
29140 {
29141 int num185 = (int)(GlobalTimeWrappedHourly * 10f) % 8;
29143 DrawElderEye(spriteBatch, proj.Center, 1f, 1f, (num185 + 1) % 8, new Microsoft.Xna.Framework.Color(0.2f, 0.2f, 0.2f, 0f));
29144 }
29145 }
29146 else
29147 {
29148 if (proj.type == 713)
29149 {
29150 return;
29151 }
29152 if (proj.type == 754)
29153 {
29156 rectangle5.Width -= 2;
29157 rectangle5.Height -= 2;
29158 Vector2 origin8 = new Vector2(rectangle5.Width / 2, 0f);
29159 float y13 = proj.position.Y;
29160 float num186 = proj.ai[0] + 8f + 2f - (float)rectangle5.Height + 2f;
29162 Vector2 top = proj.Top;
29163 if (proj.ai[1] == 2f)
29164 {
29165 rectangle5 = value18.Frame(5, 2, 4);
29166 rectangle5.Width -= 2;
29167 rectangle5.Height -= 2;
29168 origin8 = new Vector2(rectangle5.Width / 2, 0f);
29169 alpha2 = proj.GetAlpha(Lighting.GetColor((int)(top.X + (float)(rectangle5.Width / 2)) / 16, (int)((num186 - 2f + (float)(rectangle5.Height / 2)) / 16f)));
29170 EntitySpriteDraw(value18, new Vector2(top.X, num186 - 2f) - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle5, alpha2, proj.rotation, origin8, proj.scale, dir);
29171 return;
29172 }
29173 for (float num187 = y13; num187 < num186; num187 += (float)rectangle5.Height)
29174 {
29175 Vector2 vector33 = top;
29176 vector33.Y = num187;
29178 float num188 = num186 - num187;
29179 if (num188 < (float)value19.Height)
29180 {
29181 value19.Height = (int)num188;
29182 }
29183 alpha2 = proj.GetAlpha(Lighting.GetColor((int)(vector33.X + (float)(value19.Width / 2)) / 16, (int)((vector33.Y + (float)(value19.Height / 2)) / 16f)));
29184 EntitySpriteDraw(value18, vector33 - screenPosition + new Vector2(0f, proj.gfxOffY), value19, alpha2, proj.rotation, origin8, proj.scale, dir);
29185 if (rectangle5.Y == 0)
29186 {
29187 rectangle5.Y += rectangle5.Height + 2;
29188 }
29189 }
29190 rectangle5 = value18.Frame(5, 2, 4);
29191 rectangle5.Width -= 2;
29192 rectangle5.Height -= 2;
29193 origin8 = new Vector2(rectangle5.Width / 2, 0f);
29194 alpha2 = proj.GetAlpha(Lighting.GetColor((int)(top.X + (float)(rectangle5.Width / 2)) / 16, (int)((num186 - 2f + (float)(rectangle5.Height / 2)) / 16f)));
29195 EntitySpriteDraw(value18, new Vector2(top.X, num186 - 2f) - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle5, alpha2, proj.rotation, origin8, proj.scale, dir);
29196 return;
29197 }
29198 if (proj.type == 12 || proj.type == 728 || proj.type == 955)
29199 {
29202 Vector2 origin9 = rectangle6.Size() / 2f;
29206 Vector2 origin10 = new Vector2((float)value22.Width / 2f, 10f);
29207 Vector2 vector34 = new Vector2(0f, proj.gfxOffY);
29208 Vector2 spinningpoint = new Vector2(0f, -10f);
29209 float num189 = (float)timeForVisualEffects / 60f;
29210 Vector2 vector35 = proj.Center + proj.velocity;
29211 Microsoft.Xna.Framework.Color color44 = Microsoft.Xna.Framework.Color.Blue * 0.2f;
29212 Microsoft.Xna.Framework.Color color45 = Microsoft.Xna.Framework.Color.White * 0.5f;
29213 color45.A = 0;
29214 float num190 = 0f;
29216 {
29217 color44 = Microsoft.Xna.Framework.Color.HotPink * 0.3f;
29218 color45 = Microsoft.Xna.Framework.Color.White * 0.75f;
29219 color45.A = 0;
29220 num190 = -0.1f;
29221 }
29222 if (proj.type == 728)
29223 {
29224 color44 = Microsoft.Xna.Framework.Color.Orange * 0.2f;
29225 color45 = Microsoft.Xna.Framework.Color.Gold * 0.5f;
29226 color45.A = 50;
29227 num190 = -0.2f;
29228 }
29230 color46.A = 0;
29232 color47.A = 0;
29234 color48.A = 0;
29235 EntitySpriteDraw(value21, vector35 - screenPosition + vector34 + spinningpoint.RotatedBy((float)Math.PI * 2f * num189), value22, color46, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin10, 1.5f + num190, SpriteEffects.None);
29236 EntitySpriteDraw(value21, vector35 - screenPosition + vector34 + spinningpoint.RotatedBy((float)Math.PI * 2f * num189 + (float)Math.PI * 2f / 3f), value22, color47, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin10, 1.1f + num190, SpriteEffects.None);
29237 EntitySpriteDraw(value21, vector35 - screenPosition + vector34 + spinningpoint.RotatedBy((float)Math.PI * 2f * num189 + 4.1887903f), value22, color48, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin10, 1.3f + num190, SpriteEffects.None);
29238 Vector2 vector36 = proj.Center - proj.velocity * 0.5f;
29239 for (float num191 = 0f; num191 < 1f; num191 += 0.5f)
29240 {
29241 float num192 = num189 % 0.5f / 0.5f;
29242 num192 = (num192 + num191) % 1f;
29243 float num193 = num192 * 2f;
29244 if (num193 > 1f)
29245 {
29246 num193 = 2f - num193;
29247 }
29248 EntitySpriteDraw(value21, vector36 - screenPosition + vector34, value22, color45 * num193, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin10, 0.3f + num192 * 0.5f, SpriteEffects.None);
29249 }
29250 EntitySpriteDraw(value20, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle6, alpha3, proj.rotation, origin9, proj.scale + 0.1f, dir);
29251 return;
29252 }
29253 if (proj.type == 756)
29254 {
29256 Microsoft.Xna.Framework.Rectangle value24 = value23.Frame(1, 6, 0, proj.frame);
29257 Vector2 origin11 = new Vector2(16f, value24.Height / 2);
29259 Vector2 scale2 = new Vector2(proj.scale);
29260 float lerpValue4 = Utils.GetLerpValue(35f, 35f - 5f, proj.ai[0], clamped: true);
29261 scale2.Y *= lerpValue4;
29262 Vector4 vector37 = projectileColor.ToVector4();
29264 vector38 *= vector37;
29265 EntitySpriteDraw(TextureAssets.Extra[98].Value, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) - proj.velocity * proj.scale * 0.5f, null, proj.GetAlpha(new Microsoft.Xna.Framework.Color(vector38.X, vector38.Y, vector38.Z, vector38.W)) * 1f, proj.rotation + (float)Math.PI / 2f, TextureAssets.Extra[98].Value.Size() / 2f, proj.scale * 0.9f, dir);
29266 EntitySpriteDraw(value23, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), value24, alpha4, proj.rotation, origin11, scale2, dir);
29267 return;
29268 }
29269 if (proj.type == 961)
29270 {
29272 Microsoft.Xna.Framework.Rectangle value26 = value25.Frame(1, 5, 0, proj.frame);
29273 Vector2 origin12 = new Vector2(16f, value26.Height / 2);
29275 Vector2 vector39 = new Vector2(proj.scale);
29276 float lerpValue5 = Utils.GetLerpValue(30f, 25f, proj.ai[0], clamped: true);
29277 vector39.Y *= lerpValue5;
29278 Vector4 vector40 = projectileColor.ToVector4();
29280 vector41 *= vector40;
29281 EntitySpriteDraw(TextureAssets.Extra[98].Value, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) - proj.velocity * proj.scale * 0.5f, null, proj.GetAlpha(new Microsoft.Xna.Framework.Color(vector41.X, vector41.Y, vector41.Z, vector41.W)) * 1f, proj.rotation + (float)Math.PI / 2f, TextureAssets.Extra[98].Value.Size() / 2f, proj.scale * 0.9f, dir);
29282 Microsoft.Xna.Framework.Color color49 = proj.GetAlpha(Microsoft.Xna.Framework.Color.White) * Utils.Remap(proj.ai[0], 0f, 20f, 0.5f, 0f);
29283 color49.A = 0;
29284 for (int num194 = 0; num194 < 4; num194++)
29285 {
29286 EntitySpriteDraw(value25, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY) + proj.rotation.ToRotationVector2().RotatedBy((float)Math.PI / 2f * (float)num194) * 2f * vector39, value26, color49, proj.rotation, origin12, vector39, dir);
29287 }
29288 EntitySpriteDraw(value25, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), value26, alpha5, proj.rotation, origin12, vector39, dir);
29289 return;
29290 }
29291 if (proj.type == 723 || proj.type == 726 || proj.type == 725 || proj.type == 724 || proj.type == 9)
29292 {
29295 Vector2 origin13 = rectangle7.Size() / 2f;
29299 Vector2 origin14 = new Vector2((float)value29.Width / 2f, 10f);
29300 _ = Microsoft.Xna.Framework.Color.White * 0.2f;
29301 Vector2 vector42 = new Vector2(0f, proj.gfxOffY);
29302 Vector2 spinningpoint2 = new Vector2(0f, -5f);
29303 float num195 = (float)timeForVisualEffects / 60f;
29304 Vector2 vector43 = proj.Center + proj.velocity;
29305 float num196 = 1.5f;
29306 float num197 = 1.1f;
29307 float num198 = 1.3f;
29308 Microsoft.Xna.Framework.Color color51 = Microsoft.Xna.Framework.Color.Blue * 0.1f;
29309 Microsoft.Xna.Framework.Color color52 = Microsoft.Xna.Framework.Color.White * 0.3f;
29310 color52.A = 0;
29311 byte a = 0;
29312 float num199 = 1f;
29313 bool flag29 = true;
29314 float num200 = proj.scale + 0.1f;
29315 if (proj.type == 726)
29316 {
29318 color51 = color53 * 0.3f;
29319 color52 = color53 * 0.3f;
29320 a = 60;
29321 float num201 = 0.6f;
29322 num196 -= num201;
29323 num197 -= num201;
29324 num198 -= num201;
29325 }
29326 if (proj.type == 725)
29327 {
29332 a = 50;
29333 float num202 = 0.5f;
29334 num196 -= num202;
29335 num197 -= num202;
29336 num198 -= num202;
29337 }
29338 if (proj.type == 724)
29339 {
29342 Microsoft.Xna.Framework.Color value32 = Microsoft.Xna.Framework.Color.Orange * 0.75f;
29343 color54 = Microsoft.Xna.Framework.Color.Yellow * 0.5f;
29346 a = 0;
29347 float num203 = 0.5f;
29348 num196 -= num203;
29349 num197 -= num203;
29350 num198 -= num203;
29351 }
29352 if (proj.type == 9)
29353 {
29354 num196 = 0.9f;
29355 num197 = 0f;
29356 num198 = 0f;
29357 flag29 = false;
29359 vector42 += proj.velocity.SafeNormalize(Vector2.Zero) * 8f;
29360 num199 *= 0.75f;
29361 vector43 -= proj.velocity;
29363 value33 *= 0.75f;
29364 value33.A /= 2;
29366 value34.A /= 4;
29367 value34 *= 0.85f;
29368 value34 *= 0.75f;
29370 gold.A = 180;
29372 Microsoft.Xna.Framework.Color value36 = new Microsoft.Xna.Framework.Color(180, 20, 255) * 0.75f * 0.3f;
29373 Microsoft.Xna.Framework.Color value37 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * 0.5f * 0.3f;
29374 float num204 = 0.5f;
29375 float num205 = proj.rotation * num204 % ((float)Math.PI * 2f);
29376 if (num205 < 0f)
29377 {
29378 num205 += (float)Math.PI * 2f;
29379 }
29380 num205 /= (float)Math.PI * 2f;
29381 float num206 = Utils.Remap(num205, 0.15f, 0.5f, 0f, 1f) * Utils.Remap(num205, 0.5f, 0.85f, 1f, 0f);
29382 num206 = 1f - num206;
29386 num200 += num206 * 0.2f;
29387 }
29391 if (flag29)
29392 {
29393 color55.A = a;
29394 color56.A = a;
29395 color57.A = a;
29396 }
29397 EntitySpriteDraw(value28, vector43 - screenPosition + vector42 + spinningpoint2.RotatedBy((float)Math.PI * 2f * num195), value29, color55, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin14, num196, SpriteEffects.None);
29398 EntitySpriteDraw(value28, vector43 - screenPosition + vector42 + spinningpoint2.RotatedBy((float)Math.PI * 2f * num195 + (float)Math.PI * 2f / 3f), value29, color56, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin14, num197, SpriteEffects.None);
29399 EntitySpriteDraw(value28, vector43 - screenPosition + vector42 + spinningpoint2.RotatedBy((float)Math.PI * 2f * num195 + 4.1887903f), value29, color57, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin14, num198, SpriteEffects.None);
29400 Vector2 vector44 = proj.Center - proj.velocity * 0.5f;
29401 for (float num207 = 0f; num207 < 1f; num207 += 0.5f)
29402 {
29403 float num208 = num195 % 0.5f / 0.5f;
29404 num208 = (num208 + num207) % 1f;
29405 float num209 = num208 * 2f;
29406 if (num209 > 1f)
29407 {
29408 num209 = 2f - num209;
29409 }
29410 EntitySpriteDraw(value28, vector44 - screenPosition + vector42, value29, color52 * num209, proj.velocity.ToRotation() + (float)Math.PI / 2f, origin14, (0.5f + num208 * 0.5f) * num199, SpriteEffects.None);
29411 }
29412 EntitySpriteDraw(value27, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), rectangle7, color50, proj.rotation, origin13, num200, dir);
29413 return;
29414 }
29415 if (proj.type == 674)
29416 {
29418 Vector2 origin15 = new Vector2(66f, 86f);
29419 Vector2 position6 = proj.Center - screenPosition;
29421 one = new Vector2(4f, 1f) * 1.4f;
29424 float num210 = 0f;
29425 if (proj.ai[0] < 30f)
29426 {
29427 num210 = Utils.GetLerpValue(0f, 30f, proj.ai[0], clamped: true);
29428 }
29429 else if (proj.ai[0] < 40f)
29430 {
29431 num210 = 1f + Utils.GetLerpValue(30f, 40f, proj.ai[0], clamped: true);
29432 }
29433 Vector2 vector45 = new Vector2(1f, 1f);
29434 Vector2 vector46 = new Vector2(0.8f, 2f);
29435 if (num210 < 1f)
29436 {
29437 vector45.X *= num210;
29438 }
29439 one *= num210;
29440 if (num210 < 1f)
29441 {
29442 color58 *= num210;
29443 color59 *= num210;
29444 }
29445 if (num210 > 1.5f)
29446 {
29447 float lerpValue6 = Utils.GetLerpValue(2f, 1.5f, num210, clamped: true);
29450 }
29451 float num211 = 0.42f;
29452 color58 *= num211;
29453 color59 *= num211;
29456 EntitySpriteDraw(TextureAssets.Extra[59].Value, position6, null, color58, 0f, origin15, one * vector45 * new Vector2(1f, 0.3f), SpriteEffects.None);
29457 return;
29458 }
29459 if (proj.type == 440 || proj.type == 449 || proj.type == 606)
29460 {
29462 if (proj.getRect().Intersects(value39))
29463 {
29464 Vector2 vector47 = new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY);
29465 float num212 = 100f;
29466 float num213 = 3f;
29467 if (proj.type == 606)
29468 {
29469 num212 = 150f;
29470 num213 = 3f;
29471 }
29472 if (proj.ai[1] == 1f)
29473 {
29474 num212 = (int)proj.localAI[0];
29475 }
29476 for (int num214 = 1; num214 <= (int)proj.localAI[0]; num214++)
29477 {
29480 alpha6 *= (num212 - (float)num214) / num212;
29481 alpha6.A = 0;
29482 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, vector47 - vector48, null, alpha6, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
29483 }
29484 }
29485 return;
29486 }
29487 if (proj.type == 85)
29488 {
29490 return;
29491 }
29492 if (proj.type == 687)
29493 {
29494 Vector2 center2 = proj.Center;
29496 float num215 = 40f;
29497 float num216 = num215 * 2f;
29498 float num217 = (float)proj.frameCounter / num215;
29504 ulong seed = 1uL;
29505 for (float num218 = 0f; num218 < 15f; num218 += 1f)
29506 {
29507 float num219 = Utils.RandomFloat(ref seed) * 0.25f - 0.125f;
29508 Vector2 vector49 = (proj.rotation + num219).ToRotationVector2();
29509 Vector2 value41 = center2 + vector49 * 400f;
29510 float num220 = num217 + num218 * (1f / 15f);
29511 int num221 = (int)(num220 / (1f / 15f));
29512 num220 %= 1f;
29513 if ((!(num220 > num217 % 1f) || !((float)proj.frameCounter < num215)) && (!(num220 < num217 % 1f) || !((float)proj.frameCounter >= num216 - num215)))
29514 {
29515 transparent = ((num220 < 0.1f) ? Microsoft.Xna.Framework.Color.Lerp(Microsoft.Xna.Framework.Color.Transparent, color60, Utils.GetLerpValue(0f, 0.1f, num220, clamped: true)) : ((num220 < 0.35f) ? color60 : ((num220 < 0.7f) ? Microsoft.Xna.Framework.Color.Lerp(color60, color61, Utils.GetLerpValue(0.35f, 0.7f, num220, clamped: true)) : ((num220 < 0.9f) ? Microsoft.Xna.Framework.Color.Lerp(color61, color62, Utils.GetLerpValue(0.7f, 0.9f, num220, clamped: true)) : ((!(num220 < 1f)) ? Microsoft.Xna.Framework.Color.Transparent : Microsoft.Xna.Framework.Color.Lerp(color62, Microsoft.Xna.Framework.Color.Transparent, Utils.GetLerpValue(0.9f, 1f, num220, clamped: true)))))));
29516 float num222 = 0.9f + num220 * 0.8f;
29517 num222 *= num222;
29518 num222 *= 0.8f;
29520 Microsoft.Xna.Framework.Rectangle rectangle8 = value40.Frame(1, 7, 0, (int)(num220 * 7f));
29521 EntitySpriteDraw(value40, position7, rectangle8, transparent, proj.rotation + (float)Math.PI * 2f * (num220 + GlobalTimeWrappedHourly * 1.2f) * 0.2f + (float)num221 * ((float)Math.PI * 2f / 5f), rectangle8.Size() / 2f, num222, SpriteEffects.None);
29522 }
29523 }
29524 return;
29525 }
29526 if (proj.type == 651)
29527 {
29528 if (proj.owner != myPlayer)
29529 {
29530 return;
29531 }
29532 Player player3 = Main.player[proj.owner];
29533 Microsoft.Xna.Framework.Point point = new Vector2(proj.ai[0], proj.ai[1]).ToPoint();
29534 Microsoft.Xna.Framework.Point point2 = proj.Center.ToTileCoordinates();
29537 int num223 = 1;
29538 float num224 = 0f;
29540 bool flag30 = toolMode.HasFlag(WiresUI.Settings.MultiToolMode.Actuator);
29541 if (toolMode.HasFlag(WiresUI.Settings.MultiToolMode.Red))
29542 {
29543 num224 += 1f;
29545 }
29546 if (toolMode.HasFlag(WiresUI.Settings.MultiToolMode.Blue))
29547 {
29548 num224 += 1f;
29550 }
29551 if (toolMode.HasFlag(WiresUI.Settings.MultiToolMode.Green))
29552 {
29553 num224 += 1f;
29555 }
29556 if (toolMode.HasFlag(WiresUI.Settings.MultiToolMode.Yellow))
29557 {
29558 num224 += 1f;
29560 }
29561 if (toolMode.HasFlag(WiresUI.Settings.MultiToolMode.Cutter))
29562 {
29563 color63 = new Microsoft.Xna.Framework.Color(50, 50, 50, 255);
29564 }
29565 color64.A = 0;
29566 if (point == point2)
29567 {
29568 Vector2 position8 = point2.ToVector2() * 16f - screenPosition;
29570 if (flag30)
29571 {
29573 }
29575 value42.Y = 18;
29577 return;
29578 }
29579 if (point.X == point2.X)
29580 {
29581 int num225 = point2.Y - point.Y;
29582 int num226 = Math.Sign(num225);
29583 Vector2 position9 = point.ToVector2() * 16f - screenPosition;
29585 if (flag30)
29586 {
29588 }
29590 value43.Y = 18;
29592 for (int num227 = point.Y + num226; num227 != point2.Y; num227 += num226)
29593 {
29594 position9 = new Vector2(point.X * 16, num227 * 16) - screenPosition;
29595 value43.Y = 0;
29596 value43.X = 90;
29597 if (flag30)
29598 {
29600 }
29602 value43.Y = 18;
29604 }
29605 position9 = point2.ToVector2() * 16f - screenPosition;
29606 value43 = new Microsoft.Xna.Framework.Rectangle((num225 * num223 > 0) ? 18 : 72, 0, 16, 16);
29607 if (flag30)
29608 {
29610 }
29612 value43.Y = 18;
29614 return;
29615 }
29616 if (point.Y == point2.Y)
29617 {
29618 int num228 = point2.X - point.X;
29619 int num229 = Math.Sign(num228);
29620 Vector2 position10 = point.ToVector2() * 16f - screenPosition;
29622 if (flag30)
29623 {
29625 }
29627 value44.Y = 18;
29629 for (int num230 = point.X + num229; num230 != point2.X; num230 += num229)
29630 {
29631 position10 = new Vector2(num230 * 16, point.Y * 16) - screenPosition;
29632 value44.Y = 0;
29633 value44.X = 180;
29634 if (flag30)
29635 {
29637 }
29639 value44.Y = 18;
29641 }
29642 position10 = point2.ToVector2() * 16f - screenPosition;
29643 value44 = new Microsoft.Xna.Framework.Rectangle((num228 > 0) ? 144 : 36, 0, 16, 16);
29644 if (flag30)
29645 {
29647 }
29649 value44.Y = 18;
29651 return;
29652 }
29653 Math.Abs(point.X - point2.X);
29654 Math.Abs(point.Y - point2.Y);
29655 int num231 = Math.Sign(point2.X - point.X);
29656 int num232 = Math.Sign(point2.Y - point.Y);
29658 bool flag31 = false;
29659 bool flag32 = player3.direction == 1;
29660 int num233;
29661 int num234;
29662 int num235;
29663 if (flag32)
29664 {
29665 p.X = point.X;
29666 num233 = point.Y;
29667 num234 = point2.Y;
29668 num235 = num232;
29669 }
29670 else
29671 {
29672 p.Y = point.Y;
29673 num233 = point.X;
29674 num234 = point2.X;
29675 num235 = num231;
29676 }
29677 Vector2 position11 = point.ToVector2() * 16f - screenPosition;
29679 if (!flag32)
29680 {
29681 value45.X = ((num235 > 0) ? 36 : 144);
29682 }
29683 else
29684 {
29685 value45.X = ((num235 > 0) ? 72 : 18);
29686 }
29687 if (flag30)
29688 {
29690 }
29692 value45.Y = 18;
29694 for (int num236 = num233 + num235; num236 != num234; num236 += num235)
29695 {
29696 if (flag31)
29697 {
29698 break;
29699 }
29700 if (flag32)
29701 {
29702 p.Y = num236;
29703 }
29704 else
29705 {
29706 p.X = num236;
29707 }
29708 if (WorldGen.InWorld(p.X, p.Y, 1) && tile[p.X, p.Y] != null)
29709 {
29710 position11 = p.ToVector2() * 16f - screenPosition;
29711 value45.Y = 0;
29712 if (!flag32)
29713 {
29714 value45.X = 180;
29715 }
29716 else
29717 {
29718 value45.X = 90;
29719 }
29720 if (flag30)
29721 {
29723 }
29725 value45.Y = 18;
29727 }
29728 }
29729 if (flag32)
29730 {
29731 p.Y = point2.Y;
29732 num233 = point.X;
29733 num234 = point2.X;
29734 num235 = num231;
29735 }
29736 else
29737 {
29738 p.X = point2.X;
29739 num233 = point.Y;
29740 num234 = point2.Y;
29741 num235 = num232;
29742 }
29743 position11 = p.ToVector2() * 16f - screenPosition;
29744 value45 = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16);
29745 if (!flag32)
29746 {
29747 value45.X += ((num231 > 0) ? 144 : 36);
29748 value45.X += ((num232 * num223 > 0) ? 72 : 18);
29749 }
29750 else
29751 {
29752 value45.X += ((num231 > 0) ? 36 : 144);
29753 value45.X += ((num232 * num223 > 0) ? 18 : 72);
29754 }
29755 if (flag30)
29756 {
29758 }
29760 value45.Y = 18;
29762 for (int num237 = num233 + num235; num237 != num234; num237 += num235)
29763 {
29764 if (flag31)
29765 {
29766 break;
29767 }
29768 if (!flag32)
29769 {
29770 p.Y = num237;
29771 }
29772 else
29773 {
29774 p.X = num237;
29775 }
29776 if (WorldGen.InWorld(p.X, p.Y, 1) && tile[p.X, p.Y] != null)
29777 {
29778 position11 = p.ToVector2() * 16f - screenPosition;
29779 value45.Y = 0;
29780 if (!flag32)
29781 {
29782 value45.X = 90;
29783 }
29784 else
29785 {
29786 value45.X = 180;
29787 }
29788 if (flag30)
29789 {
29791 }
29793 value45.Y = 18;
29795 }
29796 }
29797 position11 = point2.ToVector2() * 16f - screenPosition;
29798 value45 = new Microsoft.Xna.Framework.Rectangle(0, 0, 16, 16);
29799 if (!flag32)
29800 {
29801 value45.X += ((num232 * num223 > 0) ? 18 : 72);
29802 }
29803 else
29804 {
29805 value45.X += ((num231 > 0) ? 144 : 36);
29806 }
29807 if (flag30)
29808 {
29810 }
29812 value45.Y = 18;
29814 return;
29815 }
29816 if (proj.type == 586)
29817 {
29818 float num238 = 300f;
29819 if (proj.ai[0] >= 100f)
29820 {
29821 num238 = MathHelper.Lerp(300f, 600f, (proj.ai[0] - 100f) / 200f);
29822 }
29823 if (num238 > 600f)
29824 {
29825 num238 = 600f;
29826 }
29827 if (proj.ai[0] >= 500f)
29828 {
29829 num238 = MathHelper.Lerp(600f, 1200f, (proj.ai[0] - 500f) / 100f);
29830 }
29831 float rotation24 = proj.rotation;
29833 int num239 = (int)(proj.ai[0] / 6f);
29834 Vector2 spinningpoint3 = new Vector2(0f, 0f - num238);
29835 for (int num240 = 0; (float)num240 < 10f; num240++)
29836 {
29838 float num241 = rotation24 + (float)Math.PI / 5f * (float)num240;
29839 Vector2 vector50 = spinningpoint3.RotatedBy(num241) / 3f + proj.Center;
29840 Microsoft.Xna.Framework.Color alpha7 = proj.GetAlpha(Lighting.GetColor(vector50.ToTileCoordinates()));
29841 alpha7.A /= 2;
29843 }
29844 for (int num242 = 0; (float)num242 < 20f; num242++)
29845 {
29847 float num243 = 0f - rotation24 + (float)Math.PI / 10f * (float)num242;
29848 num243 *= 2f;
29849 Vector2 vector51 = spinningpoint3.RotatedBy(num243) + proj.Center;
29850 Microsoft.Xna.Framework.Color alpha7 = proj.GetAlpha(Lighting.GetColor(vector51.ToTileCoordinates()));
29851 alpha7.A /= 2;
29853 }
29854 return;
29855 }
29856 if (proj.type == 536 || proj.type == 607)
29857 {
29859 Vector2 position12 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
29860 EntitySpriteDraw(scale: new Vector2(1f, proj.velocity.Length() / (float)value47.Height), texture: value47, position: position12, sourceRectangle: null, color: proj.GetAlpha(projectileColor), rotation: proj.rotation, origin: value47.Frame().Bottom(), effects: dir);
29861 return;
29862 }
29863 if (proj.type == 591)
29864 {
29866 Vector2 position13 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
29867 Vector2 scale4 = new Vector2(1f, proj.velocity.Length() / (float)value48.Height);
29868 LoadNPC(139);
29869 Texture2D value49 = TextureAssets.Npc[139].Value;
29870 bool num244 = proj.velocity.X >= 0f;
29871 float rotation25 = proj.velocity.ToRotation() + (float)Math.PI;
29872 SpriteEffects effects3 = (num244 ? SpriteEffects.FlipVertically : SpriteEffects.None);
29873 float fromValue = 1f - proj.Opacity;
29874 float num245 = Utils.Remap(fromValue, 0f, 0.2f, 0f, 1f) * Utils.Remap(fromValue, 0.2f, 1f, 1f, 0f);
29879 Vector2 origin16 = rectangle11.Bottom();
29881 rectangle11 = value48.Frame(2, 1, 1);
29883 return;
29884 }
29885 if (proj.type == 688 || proj.type == 689 || proj.type == 690)
29886 {
29888 Vector2 position14 = proj.Top + Vector2.UnitY * proj.gfxOffY - screenPosition;
29890 Vector2 origin17 = rectangle12.Size() * new Vector2(0.5f, 0f);
29893 color68.A = 127;
29894 Texture2D texture2D2 = null;
29895 Texture2D texture2D3 = null;
29896 switch (proj.type)
29897 {
29898 case 688:
29899 texture2D2 = TextureAssets.GlowMask[228].Value;
29900 texture2D3 = TextureAssets.Extra[86].Value;
29901 break;
29902 case 689:
29903 texture2D2 = TextureAssets.GlowMask[229].Value;
29904 texture2D3 = TextureAssets.Extra[87].Value;
29905 break;
29906 case 690:
29907 texture2D2 = TextureAssets.GlowMask[230].Value;
29908 texture2D3 = TextureAssets.Extra[88].Value;
29909 break;
29910 }
29912 if (texture2D2 != null)
29913 {
29915 }
29916 if (texture2D3 != null)
29917 {
29918 Vector2 position15 = proj.Center + Vector2.UnitY * proj.gfxOffY - screenPosition;
29919 rectangle12 = texture2D3.Frame();
29920 origin17 = rectangle12.Size() * new Vector2(0.5f, 1f);
29921 origin17.Y -= 2f;
29923 }
29924 return;
29925 }
29926 if (proj.type == 694 || proj.type == 695 || proj.type == 696)
29927 {
29929 Vector2 position16 = proj.Bottom + Vector2.UnitY * proj.gfxOffY - screenPosition;
29931 Vector2 origin18 = rectangle13.Size() * new Vector2(0.5f, 1f);
29932 origin18.Y -= 8f;
29933 int type = proj.type;
29934 if ((uint)(type - 694) <= 1u)
29935 {
29936 origin18.X += 3f;
29937 }
29940 EntitySpriteDraw(value51, position16, rectangle13, color69 * 0.3f, proj.rotation, origin18, proj.scale * 1.1f, dir);
29941 return;
29942 }
29943 if (proj.type == 409)
29944 {
29946 int num246 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
29947 int y14 = num246 * proj.frame;
29948 int num247 = 10;
29949 int num248 = 2;
29950 float value53 = 0.5f;
29951 for (int num249 = 1; num249 < num247; num249 += num248)
29952 {
29953 _ = ref proj.oldPos[num249];
29955 newColor = proj.GetAlpha(newColor);
29956 newColor *= (float)(num247 - num249) / 15f;
29957 _ = proj.oldPos[num249] - screenPosition + new Vector2(num138 + (float)num137, (float)(proj.height / 2) + proj.gfxOffY);
29958 EntitySpriteDraw(value52, proj.oldPos[num249] + new Vector2(proj.width, proj.height) / 2f - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y14, value52.Width, num246), newColor, proj.rotation, new Vector2((float)value52.Width / 2f, (float)num246 / 2f), MathHelper.Lerp(proj.scale, value53, (float)num249 / 15f), dir);
29959 }
29960 EntitySpriteDraw(value52, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y14, value52.Width, num246), proj.GetAlpha(projectileColor), proj.rotation, new Vector2((float)value52.Width / 2f, (float)num246 / 2f), proj.scale, dir);
29961 return;
29962 }
29963 if (proj.type == 437)
29964 {
29966 int num250 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
29967 int y15 = num250 * proj.frame;
29968 int num251 = 10;
29969 int num252 = 2;
29970 float value55 = 0.2f;
29971 for (int num253 = 1; num253 < num251; num253 += num252)
29972 {
29973 _ = ref proj.oldPos[num253];
29975 newColor2 = proj.GetAlpha(newColor2);
29976 newColor2 *= (float)(num251 - num253) / 15f;
29977 _ = proj.oldPos[num253] - screenPosition + new Vector2(num138 + (float)num137, (float)(proj.height / 2) + proj.gfxOffY);
29978 EntitySpriteDraw(value54, proj.oldPos[num253] + new Vector2(proj.width, proj.height) / 2f - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y15, value54.Width, num250), newColor2, proj.rotation, new Vector2((float)value54.Width / 2f, (float)num250 / 2f), MathHelper.Lerp(proj.scale, value55, (float)num253 / 15f), dir);
29979 }
29980 EntitySpriteDraw(value54, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y15, value54.Width, num250), Microsoft.Xna.Framework.Color.White, proj.rotation, new Vector2((float)value54.Width / 2f, (float)num250 / 2f), proj.scale + 0.2f, dir);
29981 EntitySpriteDraw(value54, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y15, value54.Width, num250), proj.GetAlpha(Microsoft.Xna.Framework.Color.White), proj.rotation, new Vector2((float)value54.Width / 2f, (float)num250 / 2f), proj.scale + 0.2f, dir);
29982 return;
29983 }
29984 if (proj.type == 384 || proj.type == 386)
29985 {
29987 int num254 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
29988 int y16 = num254 * proj.frame;
29989 EntitySpriteDraw(value56, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y16, value56.Width, num254), proj.GetAlpha(projectileColor), proj.rotation, new Vector2((float)value56.Width / 2f, (float)num254 / 2f), proj.scale, dir);
29990 return;
29991 }
29992 if (proj.type == 439 || proj.type == 460 || proj.type == 600 || proj.type == 615 || proj.type == 630 || proj.type == 633 || proj.type == 705 || proj.type == 714)
29993 {
29995 if (Main.player[proj.owner].gravDir == -1f)
29996 {
29997 if (proj.type == 705)
29998 {
29999 dir |= SpriteEffects.FlipVertically;
30000 }
30001 if (proj.type == 615 || proj.type == 714)
30002 {
30003 if (Main.player[proj.owner].direction == 1)
30004 {
30005 dir = SpriteEffects.FlipVertically;
30006 }
30007 else if (Main.player[proj.owner].direction == -1)
30008 {
30009 dir = SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically;
30010 }
30011 }
30012 else if (proj.type == 600 || proj.type == 439)
30013 {
30014 if (Main.player[proj.owner].direction == 1)
30015 {
30016 dir = SpriteEffects.FlipHorizontally;
30017 }
30018 else if (Main.player[proj.owner].direction == -1)
30019 {
30020 dir = SpriteEffects.None;
30021 }
30022 }
30023 }
30024 int num255 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
30025 int y17 = num255 * proj.frame;
30026 Vector2 vector52 = (proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition).Floor();
30027 float num256 = 1f;
30028 if (Main.player[proj.owner].shroomiteStealth && Main.player[proj.owner].inventory[Main.player[proj.owner].selectedItem].ranged)
30029 {
30030 float num257 = Main.player[proj.owner].stealth;
30031 if ((double)num257 < 0.03)
30032 {
30033 num257 = 0.03f;
30034 }
30035 _ = (1f + num257 * 10f) / 11f;
30037 num256 = num257;
30038 }
30039 if (Main.player[proj.owner].setVortex && Main.player[proj.owner].inventory[Main.player[proj.owner].selectedItem].ranged)
30040 {
30041 float num258 = Main.player[proj.owner].stealth;
30042 if ((double)num258 < 0.03)
30043 {
30044 num258 = 0.03f;
30045 }
30046 _ = (1f + num258 * 10f) / 11f;
30047 projectileColor = projectileColor.MultiplyRGBA(new Microsoft.Xna.Framework.Color(Vector4.Lerp(Vector4.One, new Vector4(0f, 0.12f, 0.16f, 0f), 1f - num258)));
30048 num256 = num258;
30049 }
30050 if (proj.type == 714)
30051 {
30052 y17 = 0;
30053 instance.LoadItem(3930);
30054 value57 = TextureAssets.Item[3930].Value;
30055 }
30056 EntitySpriteDraw(value57, vector52, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), proj.GetAlpha(projectileColor), proj.rotation, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30057 if (proj.type == 439)
30058 {
30059 EntitySpriteDraw(TextureAssets.GlowMask[35].Value, vector52, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * num256, proj.rotation, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30060 }
30061 else if (proj.type == 714)
30062 {
30063 y17 = num255 * proj.frame;
30064 Microsoft.Xna.Framework.Color color70 = hslToRgb(proj.ai[0] / 90f % 1f, 1f, 0.5f);
30065 color70.A = 120;
30066 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, vector52, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), color70 * num256, proj.rotation, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30067 }
30068 else if (proj.type == 615)
30069 {
30070 EntitySpriteDraw(TextureAssets.GlowMask[192].Value, vector52, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), new Microsoft.Xna.Framework.Color(255, 255, 255, 127) * num256, proj.rotation, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30071 }
30072 else if (proj.type == 630)
30073 {
30074 EntitySpriteDraw(TextureAssets.GlowMask[200].Value, vector52, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), new Microsoft.Xna.Framework.Color(255, 255, 255, 127) * num256, proj.rotation, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30075 if (proj.localAI[0] > 0f)
30076 {
30077 int frameY = 6 - (int)(proj.localAI[0] / 1f);
30078 value57 = TextureAssets.Extra[65].Value;
30079 EntitySpriteDraw(value57, vector52 + Vector2.Normalize(proj.velocity) * 2f, value57.Frame(1, 6, 0, frameY), new Microsoft.Xna.Framework.Color(255, 255, 255, 127) * num256, proj.rotation, new Vector2(dir.HasFlag(SpriteEffects.FlipHorizontally) ? value57.Width : 0, (float)num255 / 2f - 2f), proj.scale, dir);
30080 }
30081 }
30082 else if (proj.type == 600)
30083 {
30085 portalColor.A = 70;
30086 EntitySpriteDraw(TextureAssets.GlowMask[173].Value, vector52, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), portalColor, proj.rotation, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30087 }
30088 else if (proj.type == 460)
30089 {
30090 if (Math.Abs(proj.rotation - (float)Math.PI / 2f) > (float)Math.PI / 2f)
30091 {
30092 dir |= SpriteEffects.FlipVertically;
30093 }
30094 EntitySpriteDraw(TextureAssets.GlowMask[102].Value, vector52, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), new Microsoft.Xna.Framework.Color(255, 255, 255, 0), proj.rotation - (float)Math.PI / 2f, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30095 if (proj.ai[0] > 180f && Main.projectile[(int)proj.ai[1]].type == 461)
30096 {
30097 DrawProj((int)proj.ai[1]);
30098 }
30099 }
30100 else if (proj.type == 633)
30101 {
30102 float num259 = (float)Math.Cos((float)Math.PI * 2f * (proj.ai[0] / 30f)) * 2f + 2f;
30103 if (proj.ai[0] > 120f)
30104 {
30105 num259 = 4f;
30106 }
30107 for (float num260 = 0f; num260 < 4f; num260 += 1f)
30108 {
30109 EntitySpriteDraw(value57, vector52 + Vector2.UnitY.RotatedBy(num260 * ((float)Math.PI * 2f) / 4f) * num259, new Microsoft.Xna.Framework.Rectangle(0, y17, value57.Width, num255), proj.GetAlpha(projectileColor).MultiplyRGBA(new Microsoft.Xna.Framework.Color(255, 255, 255, 0)) * 0.03f, proj.rotation, new Vector2((float)value57.Width / 2f, (float)num255 / 2f), proj.scale, dir);
30110 }
30111 }
30112 return;
30113 }
30114 if (proj.type == 442)
30115 {
30117 int num261 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
30118 int y18 = num261 * proj.frame;
30119 Vector2 position17 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30120 EntitySpriteDraw(value58, position17, new Microsoft.Xna.Framework.Rectangle(0, y18, value58.Width, num261), proj.GetAlpha(projectileColor), proj.rotation, new Vector2((float)value58.Width / 2f, (float)num261 / 2f), proj.scale, dir);
30121 EntitySpriteDraw(TextureAssets.GlowMask[37].Value, position17, new Microsoft.Xna.Framework.Rectangle(0, y18, value58.Width, num261), new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * (1f - (float)proj.alpha / 255f), proj.rotation, new Vector2((float)value58.Width / 2f, (float)num261 / 2f), proj.scale, dir);
30122 return;
30123 }
30124 if (proj.type == 447)
30125 {
30128 int num262 = value59.Height / projFrames[proj.type];
30129 int y19 = num262 * proj.frame;
30130 int num263 = value60.Height / projFrames[proj.type];
30131 int num264 = num263 * proj.frame;
30133 Vector2 vector53 = proj.position + new Vector2(proj.width, 0f) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30134 EntitySpriteDraw(TextureAssets.Extra[4].Value, vector53, value61, proj.GetAlpha(projectileColor), proj.rotation, new Vector2(value60.Width / 2, 0f), proj.scale, dir);
30135 int num265 = proj.height - num262 - 14;
30136 if (num265 < 0)
30137 {
30138 num265 = 0;
30139 }
30140 if (num265 > 0)
30141 {
30142 if (num264 == num263 * 3)
30143 {
30144 num264 = num263 * 2;
30145 }
30146 EntitySpriteDraw(TextureAssets.Extra[4].Value, vector53 + Vector2.UnitY * (num263 - 1), new Microsoft.Xna.Framework.Rectangle(0, num264 + num263 - 1, value60.Width, 1), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(value60.Width / 2, 0f), new Vector2(1f, num265), dir);
30147 }
30148 value61.Width = value59.Width;
30149 value61.Y = y19;
30150 EntitySpriteDraw(value59, vector53 + Vector2.UnitY * (num263 - 1 + num265), value61, proj.GetAlpha(projectileColor), proj.rotation, new Vector2((float)value59.Width / 2f, 0f), proj.scale, dir);
30151 return;
30152 }
30153 if (proj.type == 455)
30154 {
30155 if (proj.velocity == Vector2.Zero)
30156 {
30157 return;
30158 }
30162 float num266 = proj.localAI[1];
30163 Microsoft.Xna.Framework.Color color71 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * 0.9f;
30164 EntitySpriteDraw(value62, proj.Center - screenPosition, null, color71, proj.rotation, value62.Size() / 2f, proj.scale, SpriteEffects.None);
30165 num266 -= (float)(value62.Height / 2 + value64.Height) * proj.scale;
30166 Vector2 center3 = proj.Center;
30167 center3 += proj.velocity * proj.scale * value62.Height / 2f;
30168 if (num266 > 0f)
30169 {
30170 float num267 = 0f;
30171 Microsoft.Xna.Framework.Rectangle value65 = new Microsoft.Xna.Framework.Rectangle(0, 16 * (proj.timeLeft / 3 % 5), value63.Width, 16);
30172 while (num267 + 1f < num266)
30173 {
30174 if (num266 - num267 < (float)value65.Height)
30175 {
30176 value65.Height = (int)(num266 - num267);
30177 }
30178 EntitySpriteDraw(value63, center3 - screenPosition, value65, color71, proj.rotation, new Vector2(value65.Width / 2, 0f), proj.scale, SpriteEffects.None);
30179 num267 += (float)value65.Height * proj.scale;
30180 center3 += proj.velocity * value65.Height * proj.scale;
30181 value65.Y += 16;
30182 if (value65.Y + value65.Height > value63.Height)
30183 {
30184 value65.Y = 0;
30185 }
30186 }
30187 }
30188 EntitySpriteDraw(value64, center3 - screenPosition, null, color71, proj.rotation, value64.Frame().Top(), proj.scale, SpriteEffects.None);
30189 return;
30190 }
30191 if (proj.type == 461)
30192 {
30193 if (proj.velocity == Vector2.Zero)
30194 {
30195 return;
30196 }
30198 float num268 = proj.localAI[1];
30199 Microsoft.Xna.Framework.Color color72 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * 0.9f;
30201 Vector2 vector54 = new Vector2(0f, Main.player[proj.owner].gfxOffY);
30202 EntitySpriteDraw(value66, proj.Center.Floor() - screenPosition + vector54, rectangle14, color72, proj.rotation, rectangle14.Size() / 2f, proj.scale, SpriteEffects.None);
30203 num268 -= 33f * proj.scale;
30204 Vector2 vector55 = proj.Center.Floor();
30205 vector55 += proj.velocity * proj.scale * 10.5f;
30206 rectangle14 = new Microsoft.Xna.Framework.Rectangle(0, 25, value66.Width, 28);
30207 if (num268 > 0f)
30208 {
30209 float num269 = 0f;
30210 while (num269 + 1f < num268)
30211 {
30212 if (num268 - num269 < (float)rectangle14.Height)
30213 {
30214 rectangle14.Height = (int)(num268 - num269);
30215 }
30217 num269 += (float)rectangle14.Height * proj.scale;
30218 vector55 += proj.velocity * rectangle14.Height * proj.scale;
30219 }
30220 }
30221 EntitySpriteDraw(sourceRectangle: new Microsoft.Xna.Framework.Rectangle(0, 56, value66.Width, 22), texture: value66, position: vector55 - screenPosition + vector54, color: color72, rotation: proj.rotation, origin: value66.Frame().Top(), scale: proj.scale, effects: SpriteEffects.None);
30222 return;
30223 }
30224 if (proj.type == 632)
30225 {
30226 if (!(proj.velocity == Vector2.Zero))
30227 {
30229 float num270 = proj.localAI[1];
30230 float laserLuminance = 0.5f;
30231 float laserAlphaMultiplier = 0f;
30233 color73.A = (byte)((float)(int)color73.A * laserAlphaMultiplier);
30234 Vector2 vector56 = proj.Center.Floor();
30235 vector56 += proj.velocity * proj.scale * 10.5f;
30236 num270 -= proj.scale * 14.5f * proj.scale;
30237 Vector2 vector57 = new Vector2(proj.scale);
30238 DelegateMethods.f_1 = 1f;
30239 DelegateMethods.c_1 = color73 * 0.75f * proj.Opacity;
30240 _ = proj.oldPos[0] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30241 Utils.DrawLaser(spriteBatch, value67, vector56 - screenPosition, vector56 + proj.velocity * num270 - screenPosition, vector57, DelegateMethods.RainbowLaserDraw);
30242 DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(255, 255, 255, 127) * 0.75f * proj.Opacity;
30243 Utils.DrawLaser(spriteBatch, value67, vector56 - screenPosition, vector56 + proj.velocity * num270 - screenPosition, vector57 / 2f, DelegateMethods.RainbowLaserDraw);
30244 }
30245 return;
30246 }
30247 if (proj.type == 642)
30248 {
30249 if (!(proj.velocity == Vector2.Zero))
30250 {
30252 float num271 = proj.localAI[1];
30253 Microsoft.Xna.Framework.Color c_ = new Microsoft.Xna.Framework.Color(255, 255, 255, 127);
30254 Vector2 vector58 = proj.Center.Floor();
30255 num271 -= proj.scale * 10.5f;
30256 Vector2 vector59 = new Vector2(proj.scale);
30257 DelegateMethods.f_1 = 1f;
30258 DelegateMethods.c_1 = c_;
30259 DelegateMethods.i_1 = 54000 - (int)time / 2;
30260 _ = proj.oldPos[0] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30261 Utils.DrawLaser(spriteBatch, value68, vector58 - screenPosition, vector58 + proj.velocity * num271 - screenPosition, vector59, DelegateMethods.TurretLaserDraw);
30262 DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(255, 255, 255, 127) * 0.75f * proj.Opacity;
30263 Utils.DrawLaser(spriteBatch, value68, vector58 - screenPosition, vector58 + proj.velocity * num271 - screenPosition, vector59 / 2f, DelegateMethods.TurretLaserDraw);
30264 }
30265 return;
30266 }
30267 if (proj.type == 611)
30268 {
30269 _ = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30272 if (proj.velocity == Vector2.Zero)
30273 {
30274 return;
30275 }
30276 float num272 = proj.velocity.Length() + 16f;
30277 bool flag33 = num272 < 100f;
30280 Vector2 vector61 = new Vector2(0f, Main.player[proj.owner].gfxOffY);
30281 float rotation26 = proj.rotation + (float)Math.PI;
30283 num272 -= 40f * proj.scale;
30284 Vector2 vector62 = proj.Center.Floor();
30285 vector62 += vector60 * proj.scale * 24f;
30286 rectangle15 = new Microsoft.Xna.Framework.Rectangle(0, 68, value69.Width, 18);
30287 if (num272 > 0f)
30288 {
30289 float num273 = 0f;
30290 while (num273 + 1f < num272)
30291 {
30292 if (num272 - num273 < (float)rectangle15.Height)
30293 {
30294 rectangle15.Height = (int)(num272 - num273);
30295 }
30297 num273 += (float)rectangle15.Height * proj.scale;
30298 vector62 += vector60 * rectangle15.Height * proj.scale;
30299 }
30300 }
30302 vector62 = proj.Center.Floor();
30303 vector62 += vector60 * proj.scale * 24f;
30304 rectangle15 = new Microsoft.Xna.Framework.Rectangle(0, 46, value69.Width, 18);
30305 int num274 = 18;
30306 if (flag33)
30307 {
30308 num274 = 9;
30309 }
30310 float num275 = num272;
30311 if (num272 > 0f)
30312 {
30313 float num276 = 0f;
30314 float num277 = num275 / (float)num274;
30315 num276 += num277 * 0.25f;
30316 vector62 += vector60 * num277 * 0.25f;
30317 for (int num278 = 0; num278 < num274; num278++)
30318 {
30319 float num279 = num277;
30320 if (num278 == 0)
30321 {
30322 num279 *= 0.75f;
30323 }
30325 num276 += num279;
30327 }
30328 }
30329 EntitySpriteDraw(sourceRectangle: new Microsoft.Xna.Framework.Rectangle(0, 90, value69.Width, 48), texture: value69, position: vector63 - screenPosition + vector61, color: alpha8, rotation: rotation26, origin: value69.Frame().Top(), scale: proj.scale, effects: SpriteEffects.None);
30330 return;
30331 }
30332 if (proj.type == 537)
30333 {
30334 if (proj.velocity == Vector2.Zero)
30335 {
30336 return;
30337 }
30339 float num280 = proj.localAI[1];
30340 float fromValue2 = Utils.Remap(proj.localAI[0], 20f, 30f, 0f, 1f) * Utils.Remap(proj.localAI[0], 60f, 90f, 1f, 0f);
30341 float toMax = 1.5f;
30342 float num281 = Utils.Remap(fromValue2, 0f, 1f, 0.25f, toMax);
30343 Microsoft.Xna.Framework.Color color74 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * 0.9f;
30345 Vector2 vector64 = new Vector2(0f, npc[(int)proj.ai[1]].gfxOffY);
30346 EntitySpriteDraw(value70, proj.Center.Floor() - screenPosition + vector64, rectangle16, color74, proj.rotation, rectangle16.Size() / 2f, num281, SpriteEffects.None);
30347 num280 -= 33f * proj.scale;
30348 Vector2 vector65 = proj.Center.Floor();
30349 vector65 += proj.velocity * num281 * 10.5f;
30350 rectangle16 = new Microsoft.Xna.Framework.Rectangle(0, 25, value70.Width, 28);
30351 if (num280 > 0f)
30352 {
30353 float num282 = 0f;
30354 while (num282 + 1f < num280)
30355 {
30356 if (num280 - num282 < (float)rectangle16.Height)
30357 {
30358 rectangle16.Height = (int)(num280 - num282);
30359 }
30361 num282 += (float)rectangle16.Height * num281;
30362 vector65 += proj.velocity * rectangle16.Height * num281;
30363 }
30364 }
30365 EntitySpriteDraw(sourceRectangle: new Microsoft.Xna.Framework.Rectangle(0, 56, value70.Width, 22), texture: value70, position: vector65 - screenPosition + vector64, color: color74, rotation: proj.rotation, origin: value70.Frame().Top(), scale: num281, effects: SpriteEffects.None);
30366 return;
30367 }
30368 if (proj.type == 456)
30369 {
30373 Vector2 vector66 = new Vector2(0f, 216f);
30374 Vector2 value74 = npc[(int)Math.Abs(proj.ai[0]) - 1].Center - proj.Center + vector66;
30375 float num283 = value74.Length();
30378 rectangle17.Height /= 4;
30379 rectangle17.Y += proj.frame * rectangle17.Height;
30380 EntitySpriteDraw(color: proj.GetAlpha(Microsoft.Xna.Framework.Color.Lerp(projectileColor, Microsoft.Xna.Framework.Color.White, 0.3f)), texture: value71, position: proj.Center - screenPosition, sourceRectangle: rectangle17, rotation: proj.rotation, origin: rectangle17.Size() / 2f, scale: proj.scale, effects: SpriteEffects.None);
30381 num283 -= (float)(rectangle17.Height / 2 + value73.Height) * proj.scale;
30382 Vector2 center4 = proj.Center;
30383 center4 += vector67 * proj.scale * rectangle17.Height / 2f;
30384 if (num283 > 0f)
30385 {
30386 float num284 = 0f;
30388 while (num284 + 1f < num283)
30389 {
30390 if (num283 - num284 < (float)rectangle18.Height)
30391 {
30392 rectangle18.Height = (int)(num283 - num284);
30393 }
30394 Microsoft.Xna.Framework.Point point3 = center4.ToTileCoordinates();
30395 Microsoft.Xna.Framework.Color color75 = Lighting.GetColor(point3.X, point3.Y);
30397 EntitySpriteDraw(value72, center4 - screenPosition, rectangle18, proj.GetAlpha(color75), proj.rotation, rectangle18.Bottom(), proj.scale, SpriteEffects.None);
30398 num284 += (float)rectangle18.Height * proj.scale;
30399 center4 += vector67 * rectangle18.Height * proj.scale;
30400 }
30401 }
30402 Microsoft.Xna.Framework.Point point4 = center4.ToTileCoordinates();
30403 Microsoft.Xna.Framework.Color color76 = Lighting.GetColor(point4.X, point4.Y);
30406 if (num283 < 0f)
30407 {
30408 value75.Height += (int)num283;
30409 }
30410 EntitySpriteDraw(value73, center4 - screenPosition, value75, color76, proj.rotation, new Vector2((float)value75.Width / 2f, value75.Height), proj.scale, SpriteEffects.None);
30411 return;
30412 }
30413 if (proj.type == 443)
30414 {
30416 float num285 = 30f;
30417 float num286 = num285 * 4f;
30418 float num287 = (float)Math.PI * 2f * proj.ai[0] / num285;
30419 float num288 = (float)Math.PI * 2f * proj.ai[0] / num286;
30420 Vector2 vector68 = -Vector2.UnitY.RotatedBy(num287);
30421 float scale5 = 0.75f + vector68.Y * 0.25f;
30422 float scale6 = 0.8f - vector68.Y * 0.2f;
30423 int num289 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
30424 int y20 = num289 * proj.frame;
30425 Vector2 position18 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30426 EntitySpriteDraw(value76, position18, new Microsoft.Xna.Framework.Rectangle(0, y20, value76.Width, num289), proj.GetAlpha(projectileColor), proj.rotation + num288, new Vector2((float)value76.Width / 2f, (float)num289 / 2f), scale5, dir);
30427 EntitySpriteDraw(value76, position18, new Microsoft.Xna.Framework.Rectangle(0, y20, value76.Width, num289), proj.GetAlpha(projectileColor), proj.rotation + ((float)Math.PI * 2f - num288), new Vector2((float)value76.Width / 2f, (float)num289 / 2f), scale6, dir);
30428 return;
30429 }
30430 if (proj.type == 656 || proj.type == 657)
30431 {
30432 float num290 = 900f;
30433 if (proj.type == 657)
30434 {
30435 num290 = 300f;
30436 }
30437 float num291 = 15f;
30438 float num292 = 15f;
30439 float num293 = proj.ai[0];
30440 float num294 = MathHelper.Clamp(num293 / 30f, 0f, 1f);
30441 if (num293 > num290 - 60f)
30442 {
30443 num294 = MathHelper.Lerp(1f, 0f, (num293 - (num290 - 60f)) / 60f);
30444 }
30445 Microsoft.Xna.Framework.Point point5 = proj.Center.ToTileCoordinates();
30446 Collision.ExpandVertically(point5.X, point5.Y, out var topY, out var bottomY, (int)num291, (int)num292);
30447 topY++;
30448 bottomY--;
30449 float num295 = 0.2f;
30450 Vector2 value77 = new Vector2(point5.X, topY) * 16f + new Vector2(8f);
30451 Vector2 value78 = new Vector2(point5.X, bottomY) * 16f + new Vector2(8f);
30452 Vector2.Lerp(value77, value78, 0.5f);
30453 Vector2 vector69 = new Vector2(0f, value78.Y - value77.Y);
30454 vector69.X = vector69.Y * num295;
30455 new Vector2(value77.X - vector69.X / 2f, value77.Y);
30458 Vector2 origin19 = rectangle19.Size() / 2f;
30459 float num296 = -(float)Math.PI / 50f * num293;
30460 Vector2 spinningpoint4 = Vector2.UnitY.RotatedBy(num293 * 0.1f);
30461 float num297 = 0f;
30462 float num298 = 5.1f;
30464 for (float num299 = (int)value78.Y; num299 > (float)(int)value77.Y; num299 -= num298)
30465 {
30466 num297 += num298;
30467 float num300 = num297 / vector69.Y;
30468 float num301 = num297 * ((float)Math.PI * 2f) / -20f;
30469 float num302 = num300 - 0.15f;
30471 Vector2 vector70 = new Vector2(0f, num300 + 1f);
30472 vector70.X = vector70.Y * num295;
30474 if (num300 > 0.5f)
30475 {
30477 }
30478 color77.A = (byte)((float)(int)color77.A * 0.5f);
30479 color77 *= num294;
30480 position19 *= vector70 * 100f;
30481 position19.Y = 0f;
30482 position19.X = 0f;
30485 }
30486 return;
30487 }
30488 if (proj.type == 704)
30489 {
30490 float num303 = 300f;
30491 float num304 = proj.ai[0];
30492 float num305 = MathHelper.Clamp(num304 / 30f, 0f, 1f);
30493 if (num304 > num303 - 60f)
30494 {
30495 num305 = MathHelper.Lerp(1f, 0f, (num304 - (num303 - 60f)) / 60f);
30496 }
30497 float num306 = 0.2f;
30498 Vector2 top2 = proj.Top;
30499 Vector2 bottom = proj.Bottom;
30500 Vector2.Lerp(top2, bottom, 0.5f);
30501 Vector2 vector71 = new Vector2(0f, bottom.Y - top2.Y);
30502 vector71.X = vector71.Y * num306;
30503 new Vector2(top2.X - vector71.X / 2f, top2.Y);
30506 Vector2 origin20 = rectangle20.Size() / 2f;
30507 float num307 = -(float)Math.PI / 20f * num304 * (float)((!(proj.velocity.X > 0f)) ? 1 : (-1));
30508 SpriteEffects effects4 = ((proj.velocity.X > 0f) ? SpriteEffects.FlipVertically : SpriteEffects.None);
30509 bool flag34 = proj.velocity.X > 0f;
30510 Vector2 spinningpoint5 = Vector2.UnitY.RotatedBy(num304 * 0.14f);
30511 float num308 = 0f;
30512 float num309 = 5.01f + num304 / 150f * -0.9f;
30513 if (num309 < 4.11f)
30514 {
30515 num309 = 4.11f;
30516 }
30519 float num310 = num304 % 60f;
30520 if (num310 < 30f)
30521 {
30522 color78 *= Utils.GetLerpValue(22f, 30f, num310, clamped: true);
30523 }
30524 else
30525 {
30526 color78 *= Utils.GetLerpValue(38f, 30f, num310, clamped: true);
30527 }
30529 for (float num311 = (int)bottom.Y; num311 > (float)(int)top2.Y; num311 -= num309)
30530 {
30531 num308 += num309;
30532 float num312 = num308 / vector71.Y;
30533 float num313 = num308 * ((float)Math.PI * 2f) / -20f;
30534 if (flag34)
30535 {
30536 num313 *= -1f;
30537 }
30538 float num314 = num312 - 0.35f;
30540 Vector2 vector72 = new Vector2(0f, num312 + 1f);
30541 vector72.X = vector72.Y * num306;
30543 if (num312 > 0.5f)
30544 {
30546 }
30547 color79.A = (byte)((float)(int)color79.A * 0.5f);
30548 color79 *= num305;
30549 position20 *= vector72 * 100f;
30550 position20.Y = 0f;
30551 position20.X = 0f;
30552 position20 += new Vector2(bottom.X, num311) - screenPosition;
30553 if (flag35)
30554 {
30556 if (num312 > 0.5f)
30557 {
30559 }
30560 color80.A = (byte)((float)(int)color80.A * 0.5f);
30561 color80 *= num305;
30563 }
30565 }
30566 return;
30567 }
30568 if (proj.type == 444 || proj.type == 446 || proj.type == 490 || proj.type == 464 || proj.type == 502 || proj.type == 538 || proj.type == 540 || proj.type == 579 || proj.type == 578 || proj.type == 813 || proj.type == 583 || proj.type == 584 || proj.type == 616 || proj.type == 617 || proj.type == 618 || proj.type == 641 || (proj.type >= 646 && proj.type <= 649) || proj.type == 653 || proj.type == 186 || proj.type == 662 || proj.type == 685 || proj.type == 673 || proj.type == 676 || proj.type == 697 || proj.type == 699 || proj.type == 707 || proj.type == 708 || proj.type == 719 || proj.type == 761 || proj.type == 762 || proj.type == 763 || proj.type == 772 || proj.type == 802 || proj.type == 842 || proj.type == 865 || proj.type == 921 || proj.type == 926 || proj.type == 757 || proj.type == 25 || proj.type == 35 || proj.type == 63 || proj.type == 154 || proj.type == 247 || proj.type == 26 || proj.type == 928 || proj.type == 16 || proj.type == 34 || proj.type == 79 || proj.type == 936 || proj.type == 937 || proj.type == 938 || proj.type == 939 || proj.type == 940 || proj.type == 941 || proj.type == 942 || proj.type == 943 || proj.type == 944 || proj.type == 945 || proj.type == 971 || proj.type == 975 || proj.type == 1000 || proj.type == 1012 || proj.type == 1018 || proj.type == 1020 || (((proj.type >= 776 && proj.type <= 801) || (proj.type >= 803 && proj.type <= 810)) && proj.type != 779 && proj.type != 783 && proj.type != 862 && proj.type != 863))
30569 {
30570 Vector2 vector73 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30573 Vector2 origin21 = new Vector2(value83.Width, value83.Height) / 2f;
30574 float num315 = proj.rotation;
30575 Vector2 vector74 = Vector2.One * proj.scale;
30577 if (proj.type == 446)
30578 {
30579 origin21.Y = 4f;
30580 }
30581 if (proj.type == 1020)
30582 {
30583 origin21.Y = 14f;
30584 }
30585 if (proj.type == 865)
30586 {
30587 vector73 += new Vector2(1f, -1f);
30588 dir = ((proj.DirectionFrom(Main.player[proj.owner].Center).SafeNormalize(Vector2.Zero).X > 0f) ? SpriteEffects.FlipHorizontally : SpriteEffects.None);
30589 }
30590 if (proj.type == 16)
30591 {
30592 float lerpValue7 = Utils.GetLerpValue(0f, 8f, proj.velocity.Length(), clamped: true);
30593 num315 *= lerpValue7;
30594 vector74 *= 0.6f;
30595 vector74.Y *= MathHelper.Lerp(1f, 0.8f, lerpValue7);
30596 vector74.X *= MathHelper.Lerp(1f, 1.5f, lerpValue7);
30597 }
30598 if (proj.type == 34)
30599 {
30600 float lerpValue8 = Utils.GetLerpValue(0f, 8f, proj.velocity.Length(), clamped: true);
30601 num315 *= lerpValue8;
30602 vector74.X *= MathHelper.Lerp(1f, 0.8f, lerpValue8);
30603 num315 += -(float)Math.PI / 2f * lerpValue8;
30604 sourceRectangle5 = value83.Frame(1, projFrames[proj.type], 0, proj.frame);
30605 origin21 = sourceRectangle5.Value.Size() / 2f;
30606 vector73 -= proj.velocity * 1f;
30607 vector73 = proj.oldPos[0] + proj.Size / 2f - screenPosition - proj.velocity / 2f;
30608 }
30609 if (proj.type == 79)
30610 {
30611 num315 = 0f;
30612 vector74 *= Utils.GetLerpValue(32f, 0f, proj.position.Distance(proj.oldPos[12]), clamped: true);
30613 color81 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0);
30614 }
30615 if (proj.type == 761 || proj.type == 762)
30616 {
30617 dir = ((proj.spriteDirection <= 0) ? SpriteEffects.FlipVertically : SpriteEffects.None);
30618 }
30619 if (proj.type == 662 || proj.type == 685)
30620 {
30621 origin21 = new Vector2(6f, 6f);
30622 }
30623 if (proj.type == 699 || proj.type == 708)
30624 {
30625 Player player4 = Main.player[proj.owner];
30626 origin21 = new Vector2((proj.spriteDirection == 1) ? ((float)value83.Width - -8f) : (-8f), (player4.gravDir == 1f) ? (-8f) : ((float)value83.Height - -8f));
30627 if (player4.gravDir == -1f)
30628 {
30629 dir |= SpriteEffects.FlipVertically;
30630 num315 += (float)Math.PI / 2f * (float)(-proj.spriteDirection);
30631 }
30632 }
30633 if (proj.type == 938 || proj.type == 939 || proj.type == 940 || proj.type == 941 || proj.type == 942 || proj.type == 943 || proj.type == 944 || proj.type == 945)
30634 {
30635 num315 -= (float)Math.PI / 4f * (float)proj.spriteDirection;
30636 }
30637 if (proj.type == 502)
30638 {
30639 LoadProjectile(250);
30641 Vector2 origin22 = new Vector2(value84.Width / 2, 0f);
30642 Vector2 vector75 = new Vector2(proj.width, proj.height) / 2f;
30644 white3.A = 127;
30645 for (int num316 = proj.oldPos.Length - 1; num316 > 0; num316--)
30646 {
30647 Vector2 vector76 = proj.oldPos[num316] + vector75;
30648 if (!(vector76 == vector75))
30649 {
30650 Vector2 vector77 = proj.oldPos[num316 - 1] + vector75;
30651 float rotation27 = (vector77 - vector76).ToRotation() - (float)Math.PI / 2f;
30652 Vector2 scale7 = new Vector2(1f, Vector2.Distance(vector76, vector77) / (float)value84.Height);
30653 Microsoft.Xna.Framework.Color color82 = white3 * (1f - (float)num316 / (float)proj.oldPos.Length);
30655 }
30656 }
30657 }
30658 else if (proj.type == 540 && proj.velocity != Vector2.Zero)
30659 {
30660 float num317 = 0f;
30661 if (proj.ai[0] >= 10f)
30662 {
30663 num317 = (proj.ai[0] - 10f) / 10f;
30664 }
30665 if (proj.ai[0] >= 20f)
30666 {
30667 num317 = (20f - proj.ai[0]) / 10f;
30668 }
30669 if (num317 > 1f)
30670 {
30671 num317 = 1f;
30672 }
30673 if (num317 < 0f)
30674 {
30675 num317 = 0f;
30676 }
30677 if (num317 != 0f)
30678 {
30680 Vector2 origin23 = new Vector2(value85.Width / 2, 0f);
30682 Vector2 position21 = proj.Center - screenPosition;
30683 Vector2 vector78 = proj.velocity.ToRotation().ToRotationVector2() * value83.Width / 3f;
30686 float rotation28 = proj.velocity.ToRotation() - (float)Math.PI / 2f;
30687 Vector2 scale8 = new Vector2(1f, (proj.velocity.Length() - vector78.Length() * 2f) / (float)value85.Height);
30689 }
30690 }
30691 if (proj.type == 578 || proj.type == 579 || proj.type == 641 || proj.type == 813)
30692 {
30694 color84.A /= 2;
30696 color85.A = color81.A;
30697 float num318 = 0.95f + (proj.rotation * 0.75f).ToRotationVector2().Y * 0.1f;
30698 color85 *= num318;
30699 float scale9 = 0.6f + proj.scale * 0.6f * num318;
30701 bool flag36 = true;
30702 if (proj.type == 813)
30703 {
30704 flag36 = false;
30705 value86 = TextureAssets.Extra[131].Value;
30706 }
30707 Vector2 origin24 = value86.Size() / 2f;
30708 EntitySpriteDraw(value86, vector73, null, color85, 0f - num315 + 0.35f, origin24, scale9, dir ^ SpriteEffects.FlipHorizontally);
30709 EntitySpriteDraw(value86, vector73, null, color81, 0f - num315, origin24, proj.scale, dir ^ SpriteEffects.FlipHorizontally);
30710 if (flag36)
30711 {
30712 EntitySpriteDraw(value83, vector73, null, color84, (0f - num315) * 0.7f, origin21, proj.scale, dir ^ SpriteEffects.FlipHorizontally);
30713 }
30714 EntitySpriteDraw(value86, vector73, null, color81 * 0.8f, num315 * 0.5f, origin24, proj.scale * 0.9f, dir);
30715 color81.A = 0;
30716 if (proj.type == 813)
30717 {
30718 num315 = 0f;
30719 }
30720 }
30721 if (proj.type == 617)
30722 {
30724 color86.A /= 2;
30726 color87.A = color81.A;
30727 float num319 = 0.95f + (proj.rotation * 0.75f).ToRotationVector2().Y * 0.1f;
30728 color87 *= num319;
30729 float scale10 = 0.6f + proj.scale * 0.6f * num319;
30730 EntitySpriteDraw(TextureAssets.Extra[50].Value, vector73, null, color87, 0f - proj.rotation + 0.35f, origin21, scale10, dir ^ SpriteEffects.FlipHorizontally);
30731 EntitySpriteDraw(TextureAssets.Extra[50].Value, vector73, null, color81, 0f - proj.rotation, origin21, proj.scale, dir ^ SpriteEffects.FlipHorizontally);
30732 EntitySpriteDraw(value83, vector73, null, color86, (0f - proj.rotation) * 0.7f, origin21, proj.scale, dir ^ SpriteEffects.FlipHorizontally);
30733 EntitySpriteDraw(TextureAssets.Extra[50].Value, vector73, null, color81 * 0.8f, proj.rotation * 0.5f, origin21, proj.scale * 0.9f, dir);
30734 color81.A = 0;
30735 }
30736 if (proj.type == 757 || proj.type == 25 || proj.type == 35 || proj.type == 63 || proj.type == 154 || proj.type == 247 || proj.type == 26)
30737 {
30738 if (proj.ai[0] == 1f)
30739 {
30741 color88.A = 127;
30742 color88 *= 0.5f;
30743 int num320 = (int)proj.ai[1];
30744 if (num320 > 5)
30745 {
30746 num320 = 5;
30747 }
30748 for (float num321 = 1f; num321 >= 0f; num321 -= 0.125f)
30749 {
30750 float num322 = 1f - num321;
30751 Vector2 vector79 = proj.velocity * -num320 * num321;
30752 EntitySpriteDraw(value83, vector73 + vector79, null, color88 * num322, num315, origin21, proj.scale * 1.15f * MathHelper.Lerp(0.5f, 1f, num322), dir);
30753 }
30754 }
30755 }
30756 else if (proj.type == 79)
30757 {
30758 Vector2 scale11 = vector74 * 1.4f;
30759 Vector2 spinningpoint6 = new Vector2(2f * scale11.X + (float)Math.Cos(GlobalTimeWrappedHourly * ((float)Math.PI * 2f)) * 0.4f, 0f).RotatedBy(num315 + GlobalTimeWrappedHourly * ((float)Math.PI * 2f));
30760 for (float num323 = 0f; num323 < 1f; num323 += 1f / 6f)
30761 {
30763 color89.A = 0;
30764 EntitySpriteDraw(value83, vector73 + spinningpoint6.RotatedBy(num323 * ((float)Math.PI * 2f)), null, color89, num315, origin21, scale11, dir);
30765 }
30767 }
30768 if ((0u | ((proj.type == 464 && proj.ai[1] != 1f) ? 1u : 0u)) == 0)
30769 {
30771 }
30772 if (proj.type == 464 && proj.ai[1] != 1f)
30773 {
30774 value83 = TextureAssets.Extra[35].Value;
30776 origin21 = rectangle21.Size() / 2f;
30777 Vector2 vector80 = new Vector2(0f, -720f).RotatedBy(proj.velocity.ToRotation());
30778 float num324 = proj.ai[0] % 45f / 45f;
30780 for (int num325 = 0; num325 < 6; num325++)
30781 {
30782 float num326 = (float)num325 * ((float)Math.PI * 2f) / 6f;
30783 Vector2 vector81 = proj.Center + spinningpoint7.RotatedBy(num326);
30784 EntitySpriteDraw(value83, vector81 - screenPosition, rectangle21, color81, num326 + proj.velocity.ToRotation() + (float)Math.PI, origin21, proj.scale, dir);
30785 rectangle21.Y += rectangle21.Height;
30786 if (rectangle21.Y >= value83.Height)
30787 {
30788 rectangle21.Y = 0;
30789 }
30790 }
30791 }
30792 else if (proj.type == 490)
30793 {
30794 EntitySpriteDraw(TextureAssets.Extra[34].Value, vector73, null, color81, 0f - proj.rotation, TextureAssets.Extra[34].Value.Size() / 2f, proj.scale, dir);
30795 EntitySpriteDraw(value83, vector73, null, color81, proj.rotation, origin21, proj.scale * 0.42f, dir);
30796 EntitySpriteDraw(TextureAssets.Extra[34].Value, vector73, null, color81, 0f - proj.rotation, TextureAssets.Extra[34].Value.Size() / 2f, proj.scale * 0.42f, dir);
30797 }
30798 else if (proj.type == 616)
30799 {
30800 value83 = TextureAssets.GlowMask[193].Value;
30801 EntitySpriteDraw(value83, vector73, null, new Microsoft.Xna.Framework.Color(127, 127, 127, 0), proj.rotation, origin21, proj.scale, dir);
30802 }
30803 else if (proj.type >= 646 && proj.type <= 649)
30804 {
30805 value83 = TextureAssets.GlowMask[203 + proj.type - 646].Value;
30806 EntitySpriteDraw(value83, vector73, null, new Microsoft.Xna.Framework.Color(255, 255, 255, 127), proj.rotation, origin21, proj.scale, dir);
30807 }
30808 else if (proj.type == 699)
30809 {
30810 value83 = TextureAssets.GlowMask[231].Value;
30811 EntitySpriteDraw(value83, vector73, null, new Microsoft.Xna.Framework.Color(255, 255, 255, 127), num315, origin21, proj.scale, dir);
30812 }
30813 else if (proj.type == 707 || proj.type == 708)
30814 {
30815 float num327 = 0.5f;
30816 value83 = TextureAssets.GlowMask[232].Value;
30817 Microsoft.Xna.Framework.Rectangle value87 = value83.Frame(1, 3, 0, (int)(proj.ai[0] % 9f) / 3);
30818 if (proj.type == 708)
30819 {
30820 value87 = value83.Frame(1, 3, 0, Main.player[proj.owner].itemAnimation % 9 / 3);
30821 num327 = 0.75f;
30822 }
30824 Vector2 spinningpoint8 = new Vector2(2f, 0f).RotatedBy(proj.rotation);
30825 for (float num328 = 0f; num328 < 4f; num328 += 1f)
30826 {
30827 EntitySpriteDraw(value83, vector73 + spinningpoint8.RotatedBy(num328 * ((float)Math.PI / 2f)), value87, color90 * 0.5f, proj.rotation, origin21, proj.scale, dir);
30828 }
30830 }
30831 else if (proj.type == 719)
30832 {
30833 float num329 = 0.3f;
30835 float num330 = proj.scale * 1.5f;
30836 Vector2 spinningpoint9 = new Vector2(2f * num330, 0f).RotatedBy(proj.rotation);
30837 for (float num331 = 0f; num331 < 4f; num331 += 1f)
30838 {
30839 EntitySpriteDraw(value83, vector73 + -proj.velocity * num331 * 1.25f, null, color91 * 0.7f, proj.rotation, origin21, num330, dir);
30840 }
30841 for (float num332 = 0f; num332 < 3f; num332 += 1f)
30842 {
30843 EntitySpriteDraw(value83, vector73 + spinningpoint9.RotatedBy(num332 * ((float)Math.PI / 2f)), null, color91 * 0.9f, proj.rotation, origin21, num330, dir);
30844 }
30845 EntitySpriteDraw(value83, vector73, null, color81, proj.rotation, origin21, proj.scale, dir);
30846 }
30847 else if (proj.type == 16)
30848 {
30850 Vector2 scale12 = vector74 + vector74 * (float)Math.Cos(GlobalTimeWrappedHourly * ((float)Math.PI * 2f)) * 0.4f;
30851 Vector2 spinningpoint10 = new Vector2(2f * scale12.X, 0f).RotatedBy(num315);
30852 for (float num333 = 0f; num333 < 1f; num333 += 0.25f)
30853 {
30854 EntitySpriteDraw(value83, vector73 + spinningpoint10.RotatedBy(num333 * ((float)Math.PI * 2f)), null, color92, num315, origin21, scale12, dir);
30855 }
30857 }
30858 else if (proj.type == 34)
30859 {
30860 float lerpValue9 = Utils.GetLerpValue(0f, 6f, proj.localAI[0], clamped: true);
30861 Microsoft.Xna.Framework.Color color93 = new Microsoft.Xna.Framework.Color(255, 255, 255, 127) * 0.75f;
30863 Vector2 spinningpoint11 = new Vector2(4f * scale13.X, 0f).RotatedBy(num315);
30864 for (float num334 = 0f; num334 < 1f; num334 += 0.25f)
30865 {
30867 }
30868 }
30869 return;
30870 }
30871 if (proj.type == 465 || proj.type == 467 || proj.type == 468 || proj.type == 500 || proj.type == 518 || proj.type == 535 || proj.type == 539 || proj.type == 575 || proj.type == 574 || proj.type == 589 || proj.type == 590 || proj.type == 593 || proj.type == 602 || proj.type == 596 || proj.type == 612 || proj.type == 953 || proj.type == 613 || proj.type == 614 || proj.type == 623 || proj.type == 625 || proj.type == 626 || proj.type == 627 || proj.type == 628 || proj.type == 634 || proj.type == 635 || proj.type == 643 || proj.type == 644 || proj.type == 645 || proj.type == 650 || proj.type == 652 || proj.type == 658 || proj.type == 659 || proj.type == 663 || proj.type == 665 || proj.type == 667 || proj.type == 677 || proj.type == 678 || proj.type == 679 || proj.type == 691 || proj.type == 692 || proj.type == 693 || proj.type == 702 || proj.type == 703 || proj.type == 701 || proj.type == 712 || proj.type == 715 || proj.type == 716 || proj.type == 717 || proj.type == 718 || proj.type == 758 || proj.type == 759 || proj.type == 764 || proj.type == 779 || proj.type == 783 || proj.type == 773 || proj.type == 820 || proj.type == 831 || proj.type == 970 || proj.type == 836 || proj.type == 851 || proj.type == 855 || proj.type == 856 || proj.type == 857 || proj.type == 861 || proj.type == 862 || proj.type == 863 || proj.type == 866 || proj.type == 870 || proj.type == 882 || proj.type == 885 || proj.type == 889 || proj.type == 895 || proj.type == 896 || proj.type == 898 || proj.type == 903 || proj.type == 904 || proj.type == 905 || proj.type == 906 || proj.type == 908 || proj.type == 910 || proj.type == 911 || proj.type == 951 || proj.type == 957 || proj.type == 962 || proj.type == 963 || proj.type == 967 || proj.type == 968 || proj.type == 978 || proj.type == 995 || proj.type == 886 || proj.type == 892)
30872 {
30873 Vector2 vector82 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
30876 if (proj.type == 963)
30877 {
30878 rectangle22 = texture2D4.Frame(4, projFrames[proj.type], 0, proj.frame);
30879 }
30880 if (proj.type == 957)
30881 {
30882 int horizontalFrames = 3;
30883 int frameX = proj.frame / projFrames[proj.type];
30884 int frameY2 = proj.frame % projFrames[proj.type];
30886 }
30887 if (proj.type == 962)
30888 {
30889 int verticalFrames = 4;
30890 int frameY3 = proj.frame / projFrames[proj.type];
30891 int frameX2 = proj.frame % projFrames[proj.type];
30893 }
30895 if (proj.type == 623 && CurrentDrawnEntityShader != 0)
30896 {
30897 color94.A = 127;
30898 }
30899 if (proj.type == 995)
30900 {
30901 Projectile.AI_192_GetJuminoFall(proj, out var timeSinceFall, out var fall);
30902 vector82.Y -= 4f;
30903 vector82.Y += fall;
30904 float amount = Utils.Remap(timeSinceFall, 0f, 10f, 1f, 0f);
30906 }
30907 Vector2 origin25 = rectangle22.Size() / 2f;
30908 if (proj.type == 703)
30909 {
30910 rectangle22.Height -= 2;
30911 }
30912 if (proj.type == 957)
30913 {
30914 float num335 = (float)(Math.Cos((float)(int)mouseTextColor / 255f * ((float)Math.PI * 2f) * 2f) * 4.0);
30915 num335 *= Math.Max(0f, Math.Min(1f, proj.localAI[0] / 100f));
30916 float num336 = 0f;
30917 if (proj.frame > projFrames[proj.type] * 2)
30918 {
30919 switch (proj.frame % projFrames[proj.type])
30920 {
30921 case 5:
30922 case 11:
30923 num336 = 2f;
30924 break;
30925 case 6:
30926 case 10:
30927 num336 = 6f;
30928 break;
30929 case 7:
30930 num336 = 8f;
30931 break;
30932 case 8:
30933 case 9:
30934 num336 = 10f;
30935 break;
30936 }
30937 }
30938 vector82.Y += -2f + num335 + num336;
30939 }
30940 if (proj.type == 895 || proj.type == 896 || proj.type == 898 || proj.type == 963)
30941 {
30942 float num337 = 2f;
30943 if (proj.isAPreviewDummy)
30944 {
30945 num337 = 0.5f;
30946 }
30947 vector82.Y += 0f - num337 + (float)(Math.Cos((float)(int)mouseTextColor / 255f * ((float)Math.PI * 2f) * 2f) * (double)(num337 * 2f));
30948 }
30949 if (proj.type == 963 && proj.localAI[1] >= 0f)
30950 {
30951 float num338 = proj.localAI[1];
30952 float num339 = 1f - num338;
30953 Microsoft.Xna.Framework.Color color95 = proj.GetAlpha(new Microsoft.Xna.Framework.Color(255, 220, 220)) * num339 * num339 * 0.8f;
30954 color95.A = 0;
30955 short num340 = 536;
30958 Vector2 origin26 = value88.Size() * new Vector2(0.5f, 1f);
30959 float num341 = 9f;
30960 float num342 = proj.velocity.ToRotation();
30961 if (proj.velocity.Length() < 0.1f)
30962 {
30963 num342 = ((proj.direction == 1) ? 0f : ((float)Math.PI));
30964 }
30965 Vector2 value89 = (num342 + (float)Math.PI / 2f).ToRotationVector2();
30966 for (int num343 = 0; (float)num343 < num341; num343++)
30967 {
30968 float num344 = ((num343 % 2 != 0) ? 1 : (-1));
30969 float num345 = ((float)num343 + 1f) * num344 * 0.2f * (0.2f + 2f * num338) + num342 + (float)Math.PI / 2f;
30970 float num346 = Utils.Remap(Vector2.Dot(num345.ToRotationVector2(), value89), -1f, 1f, 0f, 1f);
30971 float num347 = proj.scale * (0.15f + 0.6f * (float)Math.Sin(GlobalTimeWrappedHourly + (float)num343 * 0.739f)) * num346;
30972 EntitySpriteDraw(value88, vector82 + proj.rotation.ToRotationVector2().RotatedBy((float)Math.PI * 2f * (1f / num341) * (float)num343 + GlobalTimeWrappedHourly) * 4f * proj.scale, null, color95 * num346, num345, origin26, new Vector2(num347 * 1.5f, num347), SpriteEffects.None);
30973 }
30974 }
30975 if (proj.type == 962)
30976 {
30977 float num348 = Utils.Remap(proj.ai[0], 0f, 30f, 1f, 0f);
30979 color96.A = 0;
30980 for (int num349 = 0; num349 < 4; num349++)
30981 {
30982 EntitySpriteDraw(texture2D4, vector82 + proj.rotation.ToRotationVector2().RotatedBy((float)Math.PI / 2f * (float)num349) * 2f * proj.scale, rectangle22, color96, proj.rotation, origin25, proj.scale, dir);
30983 }
30984 }
30985 if (proj.type == 855)
30986 {
30987 float y21 = (GlobalTimeWrappedHourly % 6f / 6f * ((float)Math.PI * 2f)).ToRotationVector2().Y;
30988 float num350 = y21 * 0.3f + 0.7f;
30990 for (int num351 = 0; num351 < 4; num351++)
30991 {
30992 float x13 = 0f;
30993 float y22 = 0f;
30994 switch (num351)
30995 {
30996 case 0:
30997 x13 = 4f;
30998 break;
30999 case 1:
31000 x13 = -4f;
31001 break;
31002 case 2:
31003 y22 = 4f;
31004 break;
31005 case 3:
31006 y22 = -4f;
31007 break;
31008 }
31009 Vector2 vector83 = new Vector2(x13, y22).RotatedBy(proj.rotation) * y21;
31010 spriteBatch.Draw(texture2D4, vector82 + vector83, rectangle22, color97, proj.rotation, rectangle22.Size() / 2f, 1f, SpriteEffects.None, 0f);
31011 }
31012 }
31013 else if (proj.type == 908)
31014 {
31016 vector82 += (GlobalTimeWrappedHourly * 8f + (float)proj.whoAmI).ToRotationVector2() * 4f;
31017 playerTitaniumStormBuff.Request();
31018 if (playerTitaniumStormBuff.IsReady)
31019 {
31020 texture2D4 = playerTitaniumStormBuff.GetTarget();
31021 }
31022 rectangle22 = texture2D4.Frame(projFrames[proj.type], 1, proj.frame);
31023 origin25 = rectangle22.Size() / 2f;
31024 }
31025 else if (proj.type == 764)
31026 {
31028 }
31029 else if (proj.type == 856)
31030 {
31032 }
31033 else if (proj.type == 857)
31034 {
31036 color94 = Microsoft.Xna.Framework.Color.White * proj.Opacity * 0.9f;
31037 color94.A /= 2;
31038 rectangle22 = texture2D4.Frame(15, 1, proj.frame);
31039 origin25 = rectangle22.Size() / 2f;
31040 DrawPrettyStarSparkle(proj.Opacity, dir, vector82, color94, proj.GetFirstFractalColor(), proj.localAI[0], 15f, 30f, 30f, 45f, 0f, new Vector2(5f, 2f), Vector2.One);
31041 }
31042 else if (proj.type == 539)
31043 {
31044 if (proj.ai[0] >= 210f)
31045 {
31046 float num352 = proj.ai[0] - 210f;
31047 num352 /= 20f;
31048 if (num352 > 1f)
31049 {
31050 num352 = 1f;
31051 }
31052 EntitySpriteDraw(TextureAssets.Extra[46].Value, vector82, null, new Microsoft.Xna.Framework.Color(255, 255, 255, 128) * num352, proj.rotation, new Vector2(17f, 22f), proj.scale, dir);
31053 }
31054 }
31055 else if (proj.type == 773)
31056 {
31057 origin25.Y = rectangle22.Height - 12;
31058 }
31059 else if (proj.type == 866)
31060 {
31061 origin25.X += 14f;
31062 }
31063 else if (proj.type == 759)
31064 {
31065 origin25.Y = rectangle22.Height - 2;
31066 origin25.X += (dir.HasFlag(SpriteEffects.FlipHorizontally) ? 1 : (-1));
31067 }
31068 else if (proj.type == 758)
31069 {
31070 vector82.Y += proj.height / 2;
31071 origin25 = rectangle22.Size() * new Vector2(0.5f, 1f);
31072 origin25.Y -= 4f;
31073 }
31074 else if (proj.type == 951)
31075 {
31076 vector82.Y += proj.height / 2;
31077 vector82.Y -= (float)rectangle22.Height * 0.5f;
31078 vector82.Y += 4f;
31079 origin25 = rectangle22.Size() * new Vector2(0.5f, 0.5f);
31080 }
31081 else if (proj.type == 833)
31082 {
31083 if (proj.frame != 8)
31084 {
31085 vector82.Y += proj.height / 2;
31086 origin25 = rectangle22.Size() * new Vector2(0.5f, 1f);
31087 origin25.Y -= 4f;
31088 origin25.X -= 7 * dir.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt();
31089 }
31090 }
31091 else if (proj.type == 834 || proj.type == 835)
31092 {
31093 if (proj.frame != 10)
31094 {
31095 vector82.Y += proj.height / 2;
31096 origin25 = rectangle22.Size() * new Vector2(0.5f, 1f);
31097 origin25.Y -= 4f;
31098 origin25.X -= 2 * dir.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt();
31099 }
31100 }
31101 else if (proj.type == 715 || proj.type == 716 || proj.type == 717 || proj.type == 718)
31102 {
31103 rectangle22 = texture2D4.Frame(3);
31104 origin25 = rectangle22.Size() / 2f;
31105 int num353 = (int)proj.ai[0];
31106 Vector2 origin27 = new Vector2(rectangle22.Width / 2, 0f);
31107 Vector2 vector84 = proj.Size / 2f;
31109 celeb2Color.A = 127;
31110 celeb2Color *= 0.8f;
31112 value90.X += value90.Width * 2;
31113 for (int num354 = proj.oldPos.Length - 1; num354 > 0; num354--)
31114 {
31115 Vector2 vector85 = proj.oldPos[num354] + vector84;
31116 if (!(vector85 == vector84))
31117 {
31118 Vector2 value91 = proj.oldPos[num354 - 1] + vector84;
31119 float num355 = proj.oldRot[num354];
31120 Vector2 scale14 = new Vector2(Vector2.Distance(vector85, value91) / (float)rectangle22.Width, 1f);
31121 Microsoft.Xna.Framework.Color color98 = celeb2Color * (1f - (float)num354 / (float)proj.oldPos.Length);
31122 switch (num353)
31123 {
31124 case 2:
31125 {
31126 Vector2 vector86 = num355.ToRotationVector2();
31127 int num356 = num354 + proj.timeLeft;
31128 if (num356 < 0)
31129 {
31130 num356 += 20 * (num356 / -20) + 20;
31131 }
31132 num356 %= 20;
31133 float num357 = 0f;
31134 scale14 *= 0.6f;
31135 switch (num356)
31136 {
31137 case 1:
31138 num357 = 1f;
31139 break;
31140 case 2:
31141 num357 = 2f;
31142 break;
31143 case 3:
31144 num357 = 3f;
31145 break;
31146 case 4:
31147 num357 = 2f;
31148 break;
31149 case 5:
31150 num357 = 1f;
31151 break;
31152 case 7:
31153 num357 = -1f;
31154 break;
31155 case 8:
31156 num357 = -2f;
31157 break;
31158 case 9:
31159 num357 = -3f;
31160 break;
31161 case 10:
31162 num357 = -2f;
31163 break;
31164 case 11:
31165 num357 = -1f;
31166 break;
31167 }
31168 vector85 += vector86 * num357 * 4f;
31169 break;
31170 }
31171 case 5:
31172 scale14 *= 0.5f;
31173 break;
31174 }
31176 }
31177 }
31178 }
31179 else if (proj.type == 663 || proj.type == 665 || proj.type == 667)
31180 {
31181 vector82 = proj.Bottom + Vector2.UnitY * proj.gfxOffY - screenPosition;
31182 origin25 = rectangle22.Size() * new Vector2(0.5f, 1f);
31183 origin25.Y -= 2f;
31184 origin25.Y -= 2f;
31185 }
31186 else if (proj.type == 691 || proj.type == 692 || proj.type == 693)
31187 {
31188 vector82 = proj.Bottom + Vector2.UnitY * proj.gfxOffY - screenPosition;
31189 origin25 = rectangle22.Size() * new Vector2(0.5f, 1f);
31190 origin25.Y -= 2f;
31191 origin25.Y -= 2f;
31192 }
31193 else if (proj.type == 677 || proj.type == 678 || proj.type == 679)
31194 {
31195 if (proj.spriteDirection == -1)
31196 {
31197 dir ^= SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically;
31198 }
31200 if (proj.type == 678)
31201 {
31202 value92 = TextureAssets.Extra[84].Value;
31203 }
31204 if (proj.type == 679)
31205 {
31206 value92 = TextureAssets.Extra[85].Value;
31207 }
31208 Vector2 position22 = proj.Bottom + Vector2.UnitY * proj.gfxOffY - screenPosition;
31209 Vector2 origin28 = value92.Size() * new Vector2(0.5f, 1f);
31210 origin28.Y -= 2f;
31211 EntitySpriteDraw(value92, position22, null, color94, 0f, origin28, 1f, dir & SpriteEffects.FlipHorizontally);
31212 origin25.X += dir.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt();
31213 vector82.Y += 1f;
31214 vector82.Y += 2f;
31215 if (proj.type == 678)
31216 {
31217 vector82.Y += -4f;
31218 }
31219 if (proj.type == 679)
31220 {
31221 vector82.Y -= 2f;
31222 if (!dir.HasFlag(SpriteEffects.FlipVertically))
31223 {
31224 origin25.Y += 4f;
31225 }
31226 else
31227 {
31228 origin25.Y -= 4f;
31229 }
31230 origin25.X += dir.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt() * 4;
31231 }
31232 }
31233 else if (proj.type == 602)
31234 {
31235 origin25.X = rectangle22.Width - 6;
31236 origin25.Y -= 1f;
31237 rectangle22.Height -= 2;
31238 }
31239 else if (proj.type == 589)
31240 {
31241 rectangle22 = texture2D4.Frame(5, 1, (int)proj.ai[1]);
31242 origin25 = rectangle22.Size() / 2f;
31243 }
31244 else if (proj.type == 590)
31245 {
31246 if (proj.ai[2] == 1f && proj.frame < 3)
31247 {
31248 proj.frame = 3;
31249 }
31250 rectangle22 = texture2D4.Frame(6, 1, proj.frame);
31251 origin25 = rectangle22.Size() / 2f;
31252 }
31253 else if (proj.type == 836)
31254 {
31255 rectangle22 = texture2D4.Frame(4, 1, proj.frame);
31256 origin25 = rectangle22.Size() / 2f;
31257 }
31258 else if (proj.type == 650 || proj.type == 882 || proj.type == 888 || proj.type == 894 || proj.type == 895 || proj.type == 896 || proj.type == 898 || proj.type == 901 || proj.type == 957)
31259 {
31260 origin25.Y -= 4f;
31261 }
31262 else if (proj.type == 623)
31263 {
31264 if (!gamePaused && proj.ai[0] == 2f)
31265 {
31266 vector82 += rand.NextVector2Circular(2f, 2f);
31267 }
31268 if (CurrentDrawnEntityShader == 0)
31269 {
31270 color94.A /= 2;
31271 }
31272 }
31273 else if (proj.type >= 625 && proj.type <= 628)
31274 {
31275 color94.A /= 2;
31276 }
31277 else if (proj.type == 644)
31278 {
31279 Microsoft.Xna.Framework.Color color99 = hslToRgb(proj.ai[0], 1f, 0.5f).MultiplyRGBA(new Microsoft.Xna.Framework.Color(255, 255, 255, 0));
31282 if (proj.ai[1] != -1f && proj.Opacity > 0.3f)
31283 {
31284 Vector2 vector87 = Main.projectile[(int)proj.ai[1]].Center - proj.Center;
31285 Vector2 vector88 = new Vector2(1f, vector87.Length() / (float)texture2D4.Height);
31286 float rotation29 = vector87.ToRotation() + (float)Math.PI / 2f;
31287 float value93 = MathHelper.Distance(30f, proj.localAI[1]) / 20f;
31288 value93 = MathHelper.Clamp(value93, 0f, 1f);
31289 if (value93 > 0f)
31290 {
31293 }
31294 }
31295 }
31296 else if (proj.type == 658)
31297 {
31298 Microsoft.Xna.Framework.Color color100 = hslToRgb(0.136f, 1f, 0.5f).MultiplyRGBA(new Microsoft.Xna.Framework.Color(255, 255, 255, 0));
31299 EntitySpriteDraw(texture2D4, vector82, rectangle22, color100, 0f, origin25, new Vector2(1f, 5f) * proj.scale * 2f, dir);
31300 }
31302 if (proj.type == 896)
31303 {
31306 for (int num358 = 0; num358 < 2; num358++)
31307 {
31308 Vector2 position23 = vector82 + new Vector2((float)rand.Next(-10, 11) * 0.1f, (float)rand.Next(-10, 11) * 0.1f);
31310 }
31312 }
31313 if (proj.type == 889)
31314 {
31316 Microsoft.Xna.Framework.Color color102 = Microsoft.Xna.Framework.Color.White * (int)mouseTextColor;
31318 if (!proj.isAPreviewDummy)
31319 {
31320 for (int num359 = 0; num359 < 4; num359++)
31321 {
31322 int num360 = 28;
31323 int num361 = 7 + num359;
31324 float num362 = 100f;
31325 bool flag37 = num361 == 8;
31330 float num363 = 0f;
31331 float num364 = GlobalTimeWrappedHourly * 2f;
31332 switch (num359)
31333 {
31334 case 1:
31335 num364 += (float)Math.PI / 2f;
31336 break;
31337 case 2:
31338 num364 += (float)Math.PI;
31339 break;
31340 case 3:
31341 num364 += 4.712389f;
31342 break;
31343 }
31344 num364 *= 3f;
31345 num363 = num364;
31346 vector89 += num364.ToRotationVector2() * num360;
31347 if (proj.localAI[0] == num362)
31348 {
31350 if (flag37)
31351 {
31353 }
31354 continue;
31355 }
31356 Vector2 vector90 = new Vector2(num360, -16f) + proj.velocity * 1.5f;
31357 float num365 = 4f;
31358 float num366 = -0.35f;
31359 switch (num359)
31360 {
31361 case 1:
31362 vector90.X *= -1f;
31363 effects5 = SpriteEffects.FlipHorizontally;
31364 num366 = 0.35f;
31365 num365 = -3f;
31366 break;
31367 case 2:
31368 vector90.Y = 16f;
31369 num366 = 0.35f;
31370 num365 = 2f;
31371 break;
31372 case 3:
31373 vector90.X *= -1f;
31374 vector90.Y = 16f;
31375 effects5 = SpriteEffects.FlipHorizontally;
31376 num366 = -0.35f;
31377 num365 = -1f;
31378 break;
31379 }
31380 vector90 += (GlobalTimeWrappedHourly * num365).ToRotationVector2() * 4f;
31381 value97 += vector90;
31382 float num367 = proj.localAI[0] / num362;
31384 num363 = ((num367 > 0.5f) ? num364 : num366);
31386 if (flag37)
31387 {
31389 }
31390 }
31391 }
31392 }
31393 if (proj.type == 885 && !proj.isAPreviewDummy)
31394 {
31395 for (int num368 = 0; num368 < 2; num368++)
31396 {
31398 int num369 = -30;
31399 if (num368 == 1)
31400 {
31401 num369 = 30;
31402 effects6 = SpriteEffects.FlipHorizontally;
31403 }
31404 int num370 = (int)proj.localAI[0];
31405 if (proj.frame == 6)
31406 {
31407 num370 = 0;
31408 }
31409 else if (num368 == 1)
31410 {
31411 num370 = 2 - num370;
31412 }
31413 num370 += 7;
31416 Vector2 vector91 = (GlobalTimeWrappedHourly * 2f).ToRotationVector2() * 4f;
31417 vector91 += proj.velocity * -1.5f;
31418 Vector2 vector92 = (GlobalTimeWrappedHourly * 1f).ToRotationVector2() * 3f;
31419 if (num368 == 1)
31420 {
31422 }
31423 else
31424 {
31426 }
31428 }
31429 }
31430 if (proj.type == 535)
31431 {
31432 for (int num371 = 0; num371 < 1000; num371++)
31433 {
31434 if (Main.projectile[num371].active && Main.projectile[num371].owner == proj.owner && Main.projectile[num371].type == 536)
31435 {
31437 }
31438 }
31439 }
31440 else if (proj.type == 715 || proj.type == 716 || proj.type == 717 || proj.type == 718)
31441 {
31442 rectangle22.X += rectangle22.Width;
31444 celeb2Color2.A = 80;
31446 }
31447 else if (proj.type == 702)
31448 {
31450 Vector2 origin29 = value99.Size() / 2f;
31451 Vector2 vector93 = new Vector2(5 * proj.spriteDirection, -10f).RotatedBy(proj.rotation);
31452 ulong seed2 = (ulong)(proj.localAI[0] / 4f);
31453 for (int num372 = 0; num372 < 5; num372++)
31454 {
31456 float x14 = (float)Utils.RandomInt(ref seed2, -10, 11) * 0.15f;
31457 float y23 = (float)Utils.RandomInt(ref seed2, -10, 1) * 0.35f;
31458 EntitySpriteDraw(value99, vector82 + vector93 + new Vector2(x14, y23), null, color103, proj.rotation, origin29, 1f, dir);
31459 }
31460 }
31461 else if (proj.type == 663 || proj.type == 665 || proj.type == 667)
31462 {
31464 switch (proj.type)
31465 {
31466 case 665:
31467 value100 = TextureAssets.GlowMask[222].Value;
31468 break;
31469 case 667:
31470 value100 = TextureAssets.GlowMask[223].Value;
31471 break;
31472 }
31473 float num373 = (proj.localAI[0] / 100f * ((float)Math.PI * 2f)).ToRotationVector2().X * 1f + 1f;
31474 Microsoft.Xna.Framework.Color color104 = new Microsoft.Xna.Framework.Color(140, 100, 40, 0) * (num373 / 4f + 0.5f) * 1f;
31475 for (float num374 = 0f; num374 < 4f; num374 += 1f)
31476 {
31477 EntitySpriteDraw(value100, vector82 + (num374 * ((float)Math.PI / 2f)).ToRotationVector2() * num373, rectangle22, color104, proj.rotation, origin25, proj.scale, dir);
31478 }
31479 }
31480 else if (proj.type == 644)
31481 {
31483 }
31484 else if (proj.type == 963)
31485 {
31486 int num375 = Main.player[proj.owner].ownedProjectileCounts[970] - 1;
31487 int num376 = (num375 + 3) % 3;
31488 int num377 = num375 / 3;
31489 Vector3 vector94 = rgbToHsl(new Microsoft.Xna.Framework.Color(250, 150, 180));
31490 vector94 = new Vector3(0f, 1f, 0.6f);
31491 if (num377 == 1)
31492 {
31494 vector94.Z += 0.1f;
31495 vector94.X -= 0.05f;
31496 }
31497 vector94.X = (vector94.X - (float)num377 * 0.13f + 1f) % 1f;
31499 Microsoft.Xna.Framework.Color color105 = Lighting.GetColor((int)(proj.Center.X / 16f), (int)(proj.Center.Y / 16f), oldColor);
31500 rectangle22.X += rectangle22.Width * (1 + num376);
31502 }
31503 else if (proj.type == 773 && proj.velocity.Length() == 0f)
31504 {
31505 EntitySpriteDraw(TextureAssets.GlowMask[266].Value, color: Microsoft.Xna.Framework.Color.White * (int)mouseTextColor, position: vector82, sourceRectangle: rectangle22, rotation: proj.rotation, origin: origin25, scale: proj.scale, effects: dir);
31506 }
31507 else if (proj.type == 658)
31508 {
31510 }
31511 else if (proj.type == 602)
31512 {
31513 texture2D4 = TextureAssets.Extra[60].Value;
31515 color107.A = 0;
31516 color107 *= 0.3f;
31517 origin25 = texture2D4.Size() / 2f;
31518 EntitySpriteDraw(texture2D4, vector82, null, color107, proj.rotation - (float)Math.PI / 2f, origin25, proj.scale, dir);
31519 texture2D4 = TextureAssets.Extra[59].Value;
31520 color107 = color94;
31521 color107.A = 0;
31522 color107 *= 0.13f;
31523 origin25 = texture2D4.Size() / 2f;
31524 EntitySpriteDraw(texture2D4, vector82, null, color107, proj.rotation - (float)Math.PI / 2f, origin25, proj.scale * 0.9f, dir);
31525 }
31526 else if (proj.type == 539)
31527 {
31528 EntitySpriteDraw(TextureAssets.GlowMask[140].Value, vector82, rectangle22, new Microsoft.Xna.Framework.Color(255, 255, 255, 0), proj.rotation, origin25, proj.scale, dir);
31529 }
31530 else if (proj.type == 613)
31531 {
31532 EntitySpriteDraw(TextureAssets.GlowMask[189].Value, vector82, rectangle22, new Microsoft.Xna.Framework.Color(128 - proj.alpha / 2, 128 - proj.alpha / 2, 128 - proj.alpha / 2, 0), proj.rotation, origin25, proj.scale, dir);
31533 }
31534 else if (proj.type == 614)
31535 {
31536 EntitySpriteDraw(TextureAssets.GlowMask[190].Value, vector82, rectangle22, new Microsoft.Xna.Framework.Color(128 - proj.alpha / 2, 128 - proj.alpha / 2, 128 - proj.alpha / 2, 0), proj.rotation, origin25, proj.scale, dir);
31537 }
31538 else if (proj.type == 574)
31539 {
31540 EntitySpriteDraw(TextureAssets.GlowMask[148].Value, vector82, rectangle22, new Microsoft.Xna.Framework.Color(255, 255, 255, 0), proj.rotation, origin25, proj.scale, dir);
31541 }
31542 else if (proj.type == 691 || proj.type == 692 || proj.type == 693)
31543 {
31545 switch (proj.type)
31546 {
31547 case 692:
31548 value102 = TextureAssets.GlowMask[236].Value;
31549 break;
31550 case 693:
31551 value102 = TextureAssets.GlowMask[237].Value;
31552 break;
31553 }
31554 EntitySpriteDraw(value102, vector82, rectangle22, new Microsoft.Xna.Framework.Color(255, 255, 255, 127), proj.rotation, origin25, proj.scale, dir);
31555 }
31556 else if (proj.type == 590)
31557 {
31558 EntitySpriteDraw(TextureAssets.GlowMask[168].Value, vector82, rectangle22, new Microsoft.Xna.Framework.Color(127 - proj.alpha / 2, 127 - proj.alpha / 2, 127 - proj.alpha / 2, 0), proj.rotation, origin25, proj.scale, dir);
31559 }
31560 else if (proj.type == 623 || (proj.type >= 625 && proj.type <= 628))
31561 {
31562 if (Main.player[proj.owner].ghostFade != 0f)
31563 {
31564 float num378 = Main.player[proj.owner].ghostFade * 5f;
31565 for (float num379 = 0f; num379 < 4f; num379 += 1f)
31566 {
31567 EntitySpriteDraw(texture2D4, vector82 + Vector2.UnitY.RotatedBy(num379 * ((float)Math.PI * 2f) / 4f) * num378, rectangle22, color94 * 0.1f, proj.rotation, origin25, proj.scale, dir);
31568 }
31569 }
31570 if (proj.type == 623 && proj.ai[0] == 2f && proj.frame >= 14)
31571 {
31573 }
31574 }
31575 else if (proj.type == 643)
31576 {
31577 float num380 = (float)Math.Cos((float)Math.PI * 2f * (proj.localAI[0] / 60f)) + 3f + 3f;
31578 for (float num381 = 0f; num381 < 4f; num381 += 1f)
31579 {
31580 EntitySpriteDraw(texture2D4, vector82 + Vector2.UnitY.RotatedBy(num381 * ((float)Math.PI / 2f)) * num380, rectangle22, color94 * 0.2f, proj.rotation, origin25, proj.scale, dir);
31581 }
31582 }
31583 else if (proj.type == 650)
31584 {
31585 int num382 = (int)(proj.localAI[0] / ((float)Math.PI * 2f));
31586 float f = proj.localAI[0] % ((float)Math.PI * 2f) - (float)Math.PI;
31587 float num383 = (float)Math.IEEERemainder(proj.localAI[1], 1.0);
31588 if (num383 < 0f)
31589 {
31590 num383 += 1f;
31591 }
31592 int num384 = (int)Math.Floor(proj.localAI[1]);
31593 float num385 = 1f;
31594 float num386 = 5f;
31595 num385 = 1f + (float)num384 * 0.02f;
31596 if ((float)num382 == 1f)
31597 {
31598 num386 = 7f;
31599 }
31600 Vector2 vector95 = f.ToRotationVector2() * num383 * num386 * proj.scale;
31601 texture2D4 = TextureAssets.Extra[66].Value;
31602 EntitySpriteDraw(texture2D4, vector82 + vector95, null, color94, proj.rotation, texture2D4.Size() / 2f, num385, SpriteEffects.None);
31603 }
31604 return;
31605 }
31606 if (proj.type == 466)
31607 {
31608 Vector2 end = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31610 proj.GetAlpha(projectileColor);
31611 Vector2 vector96 = new Vector2(proj.scale) / 2f;
31612 for (int num387 = 0; num387 < 3; num387++)
31613 {
31614 switch (num387)
31615 {
31616 case 0:
31617 vector96 = new Vector2(proj.scale) * 0.6f;
31618 DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(115, 204, 219, 0) * 0.5f;
31619 break;
31620 case 1:
31621 vector96 = new Vector2(proj.scale) * 0.4f;
31622 DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(113, 251, 255, 0) * 0.5f;
31623 break;
31624 default:
31625 vector96 = new Vector2(proj.scale) * 0.2f;
31626 DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * 0.5f;
31627 break;
31628 }
31629 DelegateMethods.f_1 = 1f;
31630 for (int num388 = proj.oldPos.Length - 1; num388 > 0; num388--)
31631 {
31632 if (!(proj.oldPos[num388] == Vector2.Zero))
31633 {
31634 Vector2 start = proj.oldPos[num388] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31635 Vector2 end2 = proj.oldPos[num388 - 1] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31636 Utils.DrawLaser(spriteBatch, value103, start, end2, vector96, DelegateMethods.LightningLaserDraw);
31637 }
31638 }
31639 if (proj.oldPos[0] != Vector2.Zero)
31640 {
31641 DelegateMethods.f_1 = 1f;
31642 Vector2 start2 = proj.oldPos[0] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31643 Utils.DrawLaser(spriteBatch, value103, start2, end, vector96, DelegateMethods.LightningLaserDraw);
31644 }
31645 }
31646 return;
31647 }
31648 if (proj.type == 580)
31649 {
31650 Vector2 end3 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31652 proj.GetAlpha(projectileColor);
31653 Vector2 vector97 = new Vector2(proj.scale) / 2f;
31654 for (int num389 = 0; num389 < 2; num389++)
31655 {
31656 float num390 = ((proj.localAI[1] == -1f || proj.localAI[1] == 1f) ? (-0.2f) : 0f);
31657 if (num389 == 0)
31658 {
31659 vector97 = new Vector2(proj.scale) * (0.5f + num390);
31660 DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(115, 244, 219, 0) * 0.5f;
31661 }
31662 else
31663 {
31664 vector97 = new Vector2(proj.scale) * (0.3f + num390);
31665 DelegateMethods.c_1 = new Microsoft.Xna.Framework.Color(255, 255, 255, 0) * 0.5f;
31666 }
31667 DelegateMethods.f_1 = 1f;
31668 for (int num391 = proj.oldPos.Length - 1; num391 > 0; num391--)
31669 {
31670 if (!(proj.oldPos[num391] == Vector2.Zero))
31671 {
31672 Vector2 start3 = proj.oldPos[num391] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31673 Vector2 end4 = proj.oldPos[num391 - 1] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31674 Utils.DrawLaser(spriteBatch, value104, start3, end4, vector97, DelegateMethods.LightningLaserDraw);
31675 }
31676 }
31677 if (proj.oldPos[0] != Vector2.Zero)
31678 {
31679 DelegateMethods.f_1 = 1f;
31680 Vector2 start4 = proj.oldPos[0] + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31681 Utils.DrawLaser(spriteBatch, value104, start4, end3, vector97, DelegateMethods.LightningLaserDraw);
31682 }
31683 }
31684 return;
31685 }
31686 if (proj.type == 445)
31687 {
31688 if (Main.player[proj.owner].gravDir == -1f)
31689 {
31690 dir |= SpriteEffects.FlipVertically;
31691 }
31692 Vector2 vector98 = proj.position + new Vector2(proj.width, proj.height) / 2f + Vector2.UnitY * proj.gfxOffY - screenPosition;
31695 Vector2 vector99 = Main.player[proj.owner].RotatedRelativePoint(mountedCenter) + Vector2.UnitY * Main.player[proj.owner].gfxOffY;
31698 float num392 = vector100.Length();
31699 float num393 = vector100.ToRotation() + (float)Math.PI / 2f;
31700 float num394 = -5f;
31701 float num395 = num394 + 30f;
31702 new Vector2(2f, num392 - num395);
31704 Vector2 vector103 = -Vector2.UnitY.RotatedBy(proj.localAI[0] / 60f * (float)Math.PI);
31705 Vector2[] array7 = new Vector2[4]
31706 {
31707 vector103,
31708 vector103.RotatedBy(1.5707963705062866),
31709 vector103.RotatedBy(3.1415927410125732),
31710 vector103.RotatedBy(4.71238899230957)
31711 };
31712 if (num392 > num395)
31713 {
31714 for (int num396 = 0; num396 < 2; num396++)
31715 {
31717 if (num396 % 2 == 0)
31718 {
31720 white4.A = 128;
31721 white4 *= 0.5f;
31722 }
31723 else
31724 {
31726 white4.A = 128;
31727 white4 *= 0.5f;
31728 }
31729 Vector2 vector104 = new Vector2(array7[num396].X, 0f).RotatedBy(num393) * 4f;
31731 }
31732 }
31733 int type2 = Main.player[proj.owner].inventory[Main.player[proj.owner].selectedItem].type;
31734 instance.LoadItem(type2);
31736 Microsoft.Xna.Framework.Color color108 = Lighting.GetColor((int)vector99.X / 16, (int)vector99.Y / 16);
31737 EntitySpriteDraw(value106, vector99 - screenPosition + vector101 * num394, null, color108, proj.rotation + (float)Math.PI / 2f + ((dir == SpriteEffects.None || dir == SpriteEffects.FlipVertically) ? ((float)Math.PI) : 0f), new Vector2((dir != 0 && dir != SpriteEffects.FlipVertically) ? value106.Width : 0, (float)value106.Height / 2f) + Vector2.UnitY * 1f, Main.player[proj.owner].inventory[Main.player[proj.owner].selectedItem].scale, dir);
31738 EntitySpriteDraw(TextureAssets.GlowMask[39].Value, vector99 - screenPosition + vector101 * num394, null, new Microsoft.Xna.Framework.Color(255, 255, 255, 0), proj.rotation + (float)Math.PI / 2f + ((dir == SpriteEffects.None || dir == SpriteEffects.FlipVertically) ? ((float)Math.PI) : 0f), new Vector2((dir != 0 && dir != SpriteEffects.FlipVertically) ? value106.Width : 0, (float)value106.Height / 2f) + Vector2.UnitY * 1f, Main.player[proj.owner].inventory[Main.player[proj.owner].selectedItem].scale, dir);
31739 if (num392 > num395)
31740 {
31741 for (int num397 = 2; num397 < 4; num397++)
31742 {
31744 if (num397 % 2 == 0)
31745 {
31747 white5.A = 128;
31748 white5 *= 0.5f;
31749 }
31750 else
31751 {
31753 white5.A = 128;
31754 white5 *= 0.5f;
31755 }
31756 Vector2 vector105 = new Vector2(array7[num397].X, 0f).RotatedBy(num393) * 4f;
31758 }
31759 }
31760 float num398 = proj.localAI[0] / 60f;
31761 if (num398 > 0.5f)
31762 {
31763 num398 = 1f - num398;
31764 }
31765 EntitySpriteDraw(value105, vector98, null, alpha10 * num398 * 2f, proj.rotation, new Vector2(value105.Width, value105.Height) / 2f, proj.scale, dir);
31766 EntitySpriteDraw(TextureAssets.GlowMask[40].Value, vector98, null, alpha10 * (0.5f - num398) * 2f, proj.rotation, new Vector2(value105.Width, value105.Height) / 2f, proj.scale, dir);
31767 return;
31768 }
31769 if ((proj.type >= 393 && proj.type <= 395) || proj.type == 398 || proj.type == 423 || proj.type == 450)
31770 {
31772 int num399 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
31773 int y24 = num399 * proj.frame;
31774 EntitySpriteDraw(value107, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle(0, y24, value107.Width, num399), proj.GetAlpha(projectileColor), proj.rotation, new Vector2((float)value107.Width / 2f, (float)num399 / 2f), proj.scale, dir);
31775 if (proj.type == 398)
31776 {
31778 EntitySpriteDraw(value107, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle(0, y24, value107.Width, num399), new Microsoft.Xna.Framework.Color(250, 250, 250, proj.alpha), proj.rotation, new Vector2((float)value107.Width / 2f, (float)num399 / 2f), proj.scale, dir);
31779 }
31780 if (proj.type == 423)
31781 {
31782 value107 = TextureAssets.GlowMask[0].Value;
31783 EntitySpriteDraw(value107, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY - 2f), new Microsoft.Xna.Framework.Rectangle(0, y24, value107.Width, num399), new Microsoft.Xna.Framework.Color(250, 250, 250, proj.alpha), proj.rotation, new Vector2((float)value107.Width / 2f, (float)num399 / 2f), proj.scale, dir);
31784 }
31785 return;
31786 }
31787 if (proj.type == 385)
31788 {
31790 int num400 = value108.Height / projFrames[proj.type];
31791 int y25 = num400 * proj.frame;
31792 int num401 = 8;
31793 int num402 = 2;
31794 float value109 = 0.4f;
31795 for (int num403 = 1; num403 < num401; num403 += num402)
31796 {
31797 _ = ref proj.oldPos[num403];
31799 newColor3 = proj.GetAlpha(newColor3);
31800 newColor3 *= (float)(num401 - num403) / 15f;
31802 _ = proj.oldPos[num403] - screenPosition + new Vector2(num138 + (float)num137, (float)(proj.height / 2) + proj.gfxOffY);
31803 EntitySpriteDraw(value108, proj.oldPos[num403] + new Vector2(proj.width, proj.height) / 2f - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y25, value108.Width, num400), Microsoft.Xna.Framework.Color.Lerp(alpha11, newColor3, 0.3f), proj.rotation, new Vector2((float)value108.Width / 2f, (float)num400 / 2f), MathHelper.Lerp(proj.scale, value109, (float)num403 / 15f), dir);
31804 }
31805 EntitySpriteDraw(value108, proj.Center - screenPosition + new Vector2(0f, proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y25, value108.Width, num400), proj.GetAlpha(projectileColor), proj.rotation, new Vector2((float)value108.Width / 2f, (float)num400 / 2f), proj.scale, dir);
31806 return;
31807 }
31808 if (proj.type == 388)
31809 {
31811 int num404 = value110.Height / projFrames[proj.type];
31812 int y26 = num404 * proj.frame;
31813 int num405 = 0;
31814 int num406 = 0;
31815 if (proj.ai[0] == 2f)
31816 {
31817 num405 = 10;
31818 num406 = 1;
31819 }
31820 else
31821 {
31822 num405 = 3;
31823 num406 = 1;
31824 }
31825 for (int num407 = 1; num407 < num405; num407 += num406)
31826 {
31827 _ = ref proj.oldPos[num407];
31829 newColor4 = proj.GetAlpha(newColor4);
31830 newColor4 *= (float)(num405 - num407) / 15f;
31831 Vector2 position25 = proj.oldPos[num407] - screenPosition + new Vector2(num138 + (float)num137, (float)(proj.height / 2) + proj.gfxOffY);
31833 }
31834 EntitySpriteDraw(value110, proj.position - screenPosition + new Vector2(num138 + (float)num137, (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y26, value110.Width, num404), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31835 return;
31836 }
31837 if (projFrames[proj.type] > 1)
31838 {
31839 int num408 = TextureAssets.Projectile[proj.type].Height() / projFrames[proj.type];
31840 int y27 = num408 * proj.frame;
31841 if (proj.type == 111)
31842 {
31843 int r = Main.player[proj.owner].shirtColor.R;
31844 int g = Main.player[proj.owner].shirtColor.G;
31845 int b = Main.player[proj.owner].shirtColor.B;
31846 projectileColor = Lighting.GetColor(oldColor: new Microsoft.Xna.Framework.Color((byte)r, (byte)g, (byte)b), x: (int)((double)proj.position.X + (double)proj.width * 0.5) / 16, y: (int)(((double)proj.position.Y + (double)proj.height * 0.5) / 16.0));
31847 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31848 return;
31849 }
31851 if (proj.type == 211 && CurrentDrawnEntityShader != 0)
31852 {
31853 alpha12.A = 127;
31854 }
31855 if (proj.type == 344)
31856 {
31857 float num409 = MathHelper.Min(60f, proj.ai[0]) / 2f;
31858 for (float num410 = 0.9f; num410 > 0f; num410 -= 0.25f)
31859 {
31860 Vector2 vector106 = num410 * (proj.velocity * 0.33f) * num409;
31861 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY) - vector106, new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), alpha12 * (1f - num410) * 0.75f, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale * (0.4f + (1f - num410) * 0.6f), dir);
31862 }
31863 }
31864 if (proj.type == 920 || proj.type == 921)
31865 {
31866 for (float num411 = 0.25f; num411 < 1f; num411 += 0.5f)
31867 {
31868 Vector2 vector107 = num411 * proj.velocity * 4f;
31869 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY) - vector107, new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), alpha12 * (1f - num411) * 0.75f, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31870 }
31871 }
31872 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), alpha12, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31873 if (proj.type == 966)
31874 {
31875 Vector2 vector108 = new Vector2(0f, -30f);
31876 vector108.Y += -1f + (float)(Math.Cos((float)(int)mouseTextColor / 255f * ((float)Math.PI * 2f) * 2f) * 2.0);
31877 Vector2 vector109 = new Vector2(-1f, -1f);
31878 float num412 = 3f;
31879 Vector2 vector110 = proj.Center + vector108;
31880 Vector2 vector111 = proj.Center;
31881 int num413 = (int)proj.ai[1];
31882 if (num413 >= 0)
31883 {
31884 if (npc[num413].active)
31885 {
31886 vector111 = npc[num413].Center;
31887 }
31888 else
31889 {
31890 num413 = -1;
31891 }
31892 }
31893 if (num413 <= -1)
31894 {
31895 Player player5 = Main.player[proj.owner];
31896 vector111 = ((!player5.dead) ? player5.Center : (vector110 + new Vector2(2f, 0f)));
31897 }
31898 vector109 += (vector111 - vector110).SafeNormalize(Vector2.Zero) * num412;
31899 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY) + vector108, new Microsoft.Xna.Framework.Rectangle(0, num408, TextureAssets.Projectile[proj.type].Width(), num408 - 1), alpha12, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31900 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY) + vector108 + vector109, new Microsoft.Xna.Framework.Rectangle(0, num408 * 2, TextureAssets.Projectile[proj.type].Width(), num408 - 1), alpha12, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31901 }
31902 if (proj.type == 335)
31903 {
31904 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), new Microsoft.Xna.Framework.Color(100, 100, 100, 0), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31905 }
31906 if (proj.type == 897 || proj.type == 899)
31907 {
31908 int num414 = 279;
31909 if (proj.type == 899)
31910 {
31911 num414 = 281;
31912 }
31913 EntitySpriteDraw(TextureAssets.GlowMask[num414].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), Microsoft.Xna.Framework.Color.White, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31914 }
31915 if (proj.type == 891)
31916 {
31917 float num415 = Utils.WrappedLerp(0.6f, 1f, (float)((int)timeForVisualEffects % 100) / 100f);
31918 EntitySpriteDraw(color: new Microsoft.Xna.Framework.Color(num415, num415, num415, 150f), texture: TextureAssets.GlowMask[277].Value, position: new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), sourceRectangle: new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), rotation: proj.rotation, origin: new Vector2(num138, proj.height / 2 + num136), scale: proj.scale, effects: dir);
31919 }
31920 if (proj.type == 595)
31921 {
31922 Player player6 = Main.player[proj.owner];
31923 if (player6.active && player6.body == 208)
31924 {
31925 for (float num416 = 0f; num416 <= 1f; num416 += 0.2f)
31926 {
31927 Microsoft.Xna.Framework.Color underShirtColor = player6.underShirtColor;
31928 underShirtColor.A = (byte)(120f * (1f - num416 * 0.5f));
31929 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), underShirtColor, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale * MathHelper.Lerp(0.8f, 1.3f, num416), dir);
31930 }
31931 }
31932 }
31933 if (proj.type == 387)
31934 {
31935 EntitySpriteDraw(TextureAssets.EyeLaserSmall.Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408), new Microsoft.Xna.Framework.Color(255, 255, 255, 0), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
31936 }
31937 if (proj.type != 525 && proj.type != 960)
31938 {
31939 return;
31940 }
31942 if (num417 == 0)
31943 {
31944 return;
31945 }
31946 int num418 = (projectileColor.R + projectileColor.G + projectileColor.B) / 3;
31947 if (num418 > 10)
31948 {
31949 int num419 = 94;
31950 if (proj.type == 960)
31951 {
31952 num419 = 244;
31953 }
31955 EntitySpriteDraw(TextureAssets.Extra[num419].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, y27, TextureAssets.Projectile[proj.type].Width(), num408 - 1), selectionGlowColor, proj.rotation, new Vector2(num138, proj.height / 2 + num136), 1f, dir);
31956 }
31957 return;
31958 }
31959 if (proj.type == 383 || proj.type == 399)
31960 {
31962 EntitySpriteDraw(value111, proj.Center - screenPosition, null, proj.GetAlpha(projectileColor), proj.rotation, new Vector2(value111.Width, value111.Height) / 2f, proj.scale, dir);
31963 return;
31964 }
31965 if (proj.type == 157 || proj.type == 378)
31966 {
31967 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + (float)(proj.width / 2), proj.position.Y - screenPosition.Y + (float)(proj.height / 2)), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(TextureAssets.Projectile[proj.type].Width() / 2, TextureAssets.Projectile[proj.type].Height() / 2), proj.scale, dir);
31968 return;
31969 }
31970 if (proj.type == 306)
31971 {
31972 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + (float)(proj.width / 2), proj.position.Y - screenPosition.Y + (float)(proj.height / 2)), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(TextureAssets.Projectile[proj.type].Width() / 2, TextureAssets.Projectile[proj.type].Height() / 2), proj.scale, dir);
31973 return;
31974 }
31975 if (proj.type == 256)
31976 {
31977 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + (float)(proj.width / 2), proj.position.Y - screenPosition.Y + (float)(proj.height / 2)), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(TextureAssets.Projectile[proj.type].Width() / 2, TextureAssets.Projectile[proj.type].Height() / 2), proj.scale, dir);
31978 return;
31979 }
31980 if (proj.aiStyle == 27)
31981 {
31982 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + (float)(proj.width / 2), proj.position.Y - screenPosition.Y + (float)(proj.height / 2)), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(TextureAssets.Projectile[proj.type].Width(), 0f), proj.scale, dir);
31983 return;
31984 }
31985 if (proj.aiStyle == 19)
31986 {
31988 return;
31989 }
31990 if (proj.type == 451)
31991 {
31992 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, proj.Center - screenPosition, null, proj.GetAlpha(projectileColor), proj.rotation, new Vector2(TextureAssets.Projectile[proj.type].Width(), 0f), proj.scale, dir);
31993 return;
31994 }
31995 if (proj.type == 434)
31996 {
31997 Vector2 vector112 = new Vector2(proj.ai[0], proj.ai[1]);
31998 Vector2 v = proj.position - vector112;
31999 float num420 = (float)Math.Sqrt(v.X * v.X + v.Y * v.Y);
32000 new Vector2(4f, num420);
32001 float rotation30 = v.ToRotation() + (float)Math.PI / 2f;
32002 Vector2 vector113 = Vector2.Lerp(proj.position, vector112, 0.5f);
32004 red.A = 0;
32006 red *= proj.localAI[0];
32007 white6 *= proj.localAI[0];
32008 float num421 = (float)Math.Sqrt(proj.damage / 50);
32012 return;
32013 }
32014 if (proj.type == 94 && proj.ai[1] > 6f)
32015 {
32016 for (int num422 = 0; num422 < 10; num422++)
32017 {
32019 float num423 = (float)(9 - num422) / 9f;
32020 alpha13.R = (byte)((float)(int)alpha13.R * num423);
32021 alpha13.G = (byte)((float)(int)alpha13.G * num423);
32022 alpha13.B = (byte)((float)(int)alpha13.B * num423);
32023 alpha13.A = (byte)((float)(int)alpha13.A * num423);
32024 float num424 = (float)(9 - num422) / 9f;
32025 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.oldPos[num422].X - screenPosition.X + num138 + (float)num137, proj.oldPos[num422].Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), alpha13, proj.rotation, new Vector2(num138, proj.height / 2 + num136), num424 * proj.scale, dir);
32026 }
32027 }
32028 if (proj.type == 301)
32029 {
32030 for (int num425 = 0; num425 < 10; num425++)
32031 {
32033 float num426 = (float)(9 - num425) / 9f;
32034 alpha14.R = (byte)((float)(int)alpha14.R * num426);
32035 alpha14.G = (byte)((float)(int)alpha14.G * num426);
32036 alpha14.B = (byte)((float)(int)alpha14.B * num426);
32037 alpha14.A = (byte)((float)(int)alpha14.A * num426);
32038 float num427 = (float)(9 - num425) / 9f;
32039 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.oldPos[num425].X - screenPosition.X + num138 + (float)num137, proj.oldPos[num425].Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), alpha14, proj.rotation, new Vector2(num138, proj.height / 2 + num136), num427 * proj.scale, dir);
32040 }
32041 }
32042 if (proj.type == 323 && proj.alpha == 0)
32043 {
32044 for (int num428 = 1; num428 < 8; num428++)
32045 {
32046 float num429 = proj.velocity.X * (float)num428;
32047 float num430 = proj.velocity.Y * (float)num428;
32049 float num431 = 0f;
32050 if (num428 == 1)
32051 {
32052 num431 = 0.7f;
32053 }
32054 if (num428 == 2)
32055 {
32056 num431 = 0.6f;
32057 }
32058 if (num428 == 3)
32059 {
32060 num431 = 0.5f;
32061 }
32062 if (num428 == 4)
32063 {
32064 num431 = 0.4f;
32065 }
32066 if (num428 == 5)
32067 {
32068 num431 = 0.3f;
32069 }
32070 if (num428 == 6)
32071 {
32072 num431 = 0.2f;
32073 }
32074 if (num428 == 7)
32075 {
32076 num431 = 0.1f;
32077 }
32078 alpha15.R = (byte)((float)(int)alpha15.R * num431);
32079 alpha15.G = (byte)((float)(int)alpha15.G * num431);
32080 alpha15.B = (byte)((float)(int)alpha15.B * num431);
32081 alpha15.A = (byte)((float)(int)alpha15.A * num431);
32082 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137 - num429, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY - num430), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), alpha15, proj.rotation, new Vector2(num138, proj.height / 2 + num136), num431 + 0.2f, dir);
32083 }
32084 }
32085 if (proj.type == 117 && proj.ai[0] > 3f)
32086 {
32087 for (int num432 = 1; num432 < 5; num432++)
32088 {
32089 float num433 = proj.velocity.X * (float)num432;
32090 float num434 = proj.velocity.Y * (float)num432;
32092 float num435 = 0f;
32093 if (num432 == 1)
32094 {
32095 num435 = 0.4f;
32096 }
32097 if (num432 == 2)
32098 {
32099 num435 = 0.3f;
32100 }
32101 if (num432 == 3)
32102 {
32103 num435 = 0.2f;
32104 }
32105 if (num432 == 4)
32106 {
32107 num435 = 0.1f;
32108 }
32109 alpha16.R = (byte)((float)(int)alpha16.R * num435);
32110 alpha16.G = (byte)((float)(int)alpha16.G * num435);
32111 alpha16.B = (byte)((float)(int)alpha16.B * num435);
32112 alpha16.A = (byte)((float)(int)alpha16.A * num435);
32113 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137 - num433, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY - num434), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), alpha16, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32114 }
32115 }
32116 if (proj.bobber)
32117 {
32118 if (proj.ai[1] > 0f && proj.ai[1] < (float)ItemID.Count && proj.ai[0] == 1f)
32119 {
32120 int num436 = (int)proj.ai[1];
32121 Vector2 center5 = proj.Center;
32122 float rotation31 = proj.rotation;
32124 float num437 = polePosX - vector114.X;
32125 float num438 = polePosY - vector114.Y;
32126 rotation31 = (float)Math.Atan2(num438, num437);
32127 if (proj.velocity.X > 0f)
32128 {
32129 dir = SpriteEffects.None;
32130 rotation31 = (float)Math.Atan2(num438, num437);
32131 rotation31 += 0.785f;
32132 if (proj.ai[1] == 2342f)
32133 {
32134 rotation31 -= 0.785f;
32135 }
32136 }
32137 else
32138 {
32139 dir = SpriteEffects.FlipHorizontally;
32140 rotation31 = (float)Math.Atan2(0f - num438, 0f - num437);
32141 rotation31 -= 0.785f;
32142 if (proj.ai[1] == 2342f)
32143 {
32144 rotation31 += 0.785f;
32145 }
32146 }
32147 instance.LoadItem(num436);
32150 if (ItemID.Sets.IsFood[num436] && itemAnimations[num436] != null)
32151 {
32152 value113 = itemAnimations[num436].GetFrame(value112, 0);
32153 }
32155 }
32156 else if (proj.ai[0] <= 1f)
32157 {
32158 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32159 if (proj.glowMask != -1)
32160 {
32161 Texture2D value114 = TextureAssets.GlowMask[proj.glowMask].Value;
32163 if (proj.type == 993)
32164 {
32166 }
32167 EntitySpriteDraw(value114, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, value114.Width, value114.Height), proj.GetAlpha(newColor5), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32168 }
32169 }
32170 }
32171 else
32172 {
32173 if (proj.ownerHitCheck && Main.player[proj.owner].gravDir == -1f)
32174 {
32175 if (Main.player[proj.owner].direction == 1)
32176 {
32177 dir = SpriteEffects.FlipHorizontally;
32178 }
32179 else if (Main.player[proj.owner].direction == -1)
32180 {
32181 dir = SpriteEffects.None;
32182 }
32183 }
32184 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), proj.GetAlpha(projectileColor), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32185 if (proj.glowMask != -1)
32186 {
32187 EntitySpriteDraw(TextureAssets.GlowMask[proj.glowMask].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), new Microsoft.Xna.Framework.Color(250, 250, 250, proj.alpha), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32188 }
32189 if (proj.type == 473)
32190 {
32191 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), new Microsoft.Xna.Framework.Color(255, 255, 0, 0), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32192 }
32193 if (proj.type >= 511 && proj.type <= 513)
32194 {
32195 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), proj.GetAlpha(projectileColor) * 0.25f, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale * (1f + proj.Opacity * 1.75f), dir);
32196 }
32197 if (proj.type == 312)
32198 {
32199 ulong seed3 = TileFrameSeed;
32200 for (int num439 = 0; num439 < 4; num439++)
32201 {
32202 Vector2 vector115 = new Vector2(Utils.RandomInt(ref seed3, -2, 3), Utils.RandomInt(ref seed3, -2, 3));
32203 EntitySpriteDraw(TextureAssets.GlowMask[proj.glowMask].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY) + vector115, new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), new Microsoft.Xna.Framework.Color(255, 255, 255, 255) * 0.2f, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32204 }
32205 }
32206 }
32207 if (proj.type == 106)
32208 {
32210 Vector2 position26 = new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2));
32212 EntitySpriteDraw(value115, position26, value116, new Microsoft.Xna.Framework.Color(200, 200, 200, 0), proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32213 }
32214 if (proj.type >= 326 && proj.type <= 328)
32215 {
32216 ulong seed4 = TileFrameSeed;
32217 for (int num440 = 0; num440 < 4; num440++)
32218 {
32219 Vector2 vector116 = new Vector2(Utils.RandomInt(ref seed4, -2, 3), Utils.RandomInt(ref seed4, -2, 3));
32220 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137, proj.position.Y - screenPosition.Y + (float)(proj.height / 2)) + vector116 - proj.velocity * 0.25f * num440, new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), new Microsoft.Xna.Framework.Color(120, 120, 120, 60) * 1f, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale - (float)num440 * 0.2f, dir);
32221 }
32222 }
32223 if (proj.type == 554 || proj.type == 603)
32224 {
32225 for (int num441 = 1; num441 < 5; num441++)
32226 {
32227 float num442 = proj.velocity.X * (float)num441 * 0.5f;
32228 float num443 = proj.velocity.Y * (float)num441 * 0.5f;
32230 float num444 = 0f;
32231 if (num441 == 1)
32232 {
32233 num444 = 0.4f;
32234 }
32235 if (num441 == 2)
32236 {
32237 num444 = 0.3f;
32238 }
32239 if (num441 == 3)
32240 {
32241 num444 = 0.2f;
32242 }
32243 if (num441 == 4)
32244 {
32245 num444 = 0.1f;
32246 }
32247 alpha17.R = (byte)((float)(int)alpha17.R * num444);
32248 alpha17.G = (byte)((float)(int)alpha17.G * num444);
32249 alpha17.B = (byte)((float)(int)alpha17.B * num444);
32250 alpha17.A = (byte)((float)(int)alpha17.A * num444);
32251 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137 - num442, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY - num443), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), alpha17, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32252 }
32253 }
32254 else if (proj.type == 604)
32255 {
32256 int num445 = (int)proj.ai[1] + 1;
32257 if (num445 > 7)
32258 {
32259 num445 = 7;
32260 }
32261 for (int num446 = 1; num446 < num445; num446++)
32262 {
32263 float num447 = proj.velocity.X * (float)num446 * 1.5f;
32264 float num448 = proj.velocity.Y * (float)num446 * 1.5f;
32266 float num449 = 0f;
32267 if (num446 == 1)
32268 {
32269 num449 = 0.4f;
32270 }
32271 if (num446 == 2)
32272 {
32273 num449 = 0.3f;
32274 }
32275 if (num446 == 3)
32276 {
32277 num449 = 0.2f;
32278 }
32279 if (num446 == 4)
32280 {
32281 num449 = 0.1f;
32282 }
32283 num449 = 0.4f - (float)num446 * 0.06f;
32284 num449 *= 1f - (float)proj.alpha / 255f;
32285 alpha18.R = (byte)((float)(int)alpha18.R * num449);
32286 alpha18.G = (byte)((float)(int)alpha18.G * num449);
32287 alpha18.B = (byte)((float)(int)alpha18.B * num449);
32288 alpha18.A = (byte)((float)(int)alpha18.A * num449 / 2f);
32289 float scale15 = proj.scale;
32290 scale15 -= (float)num446 * 0.1f;
32291 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137 - num447, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY - num448), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), alpha18, proj.rotation, new Vector2(num138, proj.height / 2 + num136), scale15, dir);
32292 }
32293 }
32294 else
32295 {
32296 if (proj.type != 553)
32297 {
32298 return;
32299 }
32300 for (int num450 = 1; num450 < 5; num450++)
32301 {
32302 float num451 = proj.velocity.X * (float)num450 * 0.4f;
32303 float num452 = proj.velocity.Y * (float)num450 * 0.4f;
32305 float num453 = 0f;
32306 if (num450 == 1)
32307 {
32308 num453 = 0.4f;
32309 }
32310 if (num450 == 2)
32311 {
32312 num453 = 0.3f;
32313 }
32314 if (num450 == 3)
32315 {
32316 num453 = 0.2f;
32317 }
32318 if (num450 == 4)
32319 {
32320 num453 = 0.1f;
32321 }
32322 alpha19.R = (byte)((float)(int)alpha19.R * num453);
32323 alpha19.G = (byte)((float)(int)alpha19.G * num453);
32324 alpha19.B = (byte)((float)(int)alpha19.B * num453);
32325 alpha19.A = (byte)((float)(int)alpha19.A * num453);
32326 EntitySpriteDraw(TextureAssets.Projectile[proj.type].Value, new Vector2(proj.position.X - screenPosition.X + num138 + (float)num137 - num451, proj.position.Y - screenPosition.Y + (float)(proj.height / 2) + proj.gfxOffY - num452), new Microsoft.Xna.Framework.Rectangle(0, 0, TextureAssets.Projectile[proj.type].Width(), TextureAssets.Projectile[proj.type].Height()), alpha19, proj.rotation, new Vector2(num138, proj.height / 2 + num136), proj.scale, dir);
32327 }
32328 }
32329 }
32330 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
static float Distance(float value1, float value2)
Definition MathHelper.cs:31
static float Max(float value1, float value2)
Definition MathHelper.cs:41
static float Clamp(float value, float min, float max)
Definition MathHelper.cs:46
static float Min(float value1, float value2)
Definition MathHelper.cs:36
static double Cos(double d)
static byte Min(byte val1, byte val2)
Definition Math.cs:912
static double Atan2(double y, double x)
static double Sqrt(double d)
static double IEEERemainder(double x, double y)
Definition Math.cs:679
static double Abs(double value)
static double Sin(double a)
const double PI
Definition Math.cs:16
static double Floor(double d)
static int Sign(decimal value)
Definition Math.cs:1202
static byte Max(byte val1, byte val2)
Definition Math.cs:738
static bool ValidateShot(Entity golfBall, Player player, ref Vector2 shotVector)
static ShotStrength CalculateShotStrength(Vector2 shotVector, ClubProperties clubProperties)
static void DrawPredictionLine(Entity golfBall, Vector2 impactVelocity, float chargeProgress, float roughLandResistance)
static bool IsGolfBallResting(Projectile golfBall)
static bool IsGolfShotValid(Entity golfBall, Player player)
static bool IsPlayerHoldingClub(Player player)
static Color GetPortalColor(int colorIndex)
static PlayerTitaniumStormBuffTextureContent PlayerTitaniumStormBuff
static Asset< Texture2D > Chain9
static Asset< Texture2D > Chain28
static Asset< Texture2D > Chain29
static Asset< Texture2D > Chain5
static Asset< Texture2D > Chain35
static Asset< Texture2D >[] Npc
static Asset< Texture2D > Chain40
static Asset< Texture2D > Chain15
static Asset< Texture2D >[] Projectile
static Asset< Texture2D > MiniMinotaur
static Asset< Texture2D >[] GlowMask
static Asset< Texture2D > Chain31
static Asset< Texture2D > Chain30
static Asset< Texture2D > Chain17
static Asset< Texture2D > EyeLaserSmall
static Asset< Texture2D >[] Item
static Asset< Texture2D > Chain16
static Asset< Texture2D > Chain20
static Asset< Texture2D >[] Extra
static Asset< Texture2D > LightDisc
static Asset< Texture2D >[] Flames
static Asset< Texture2D >[] Chains
static Asset< Texture2D > GolfBallOutline
static Asset< Texture2D > Chain38
static Asset< Texture2D > Chain39
static Asset< Texture2D > Chain23
static Asset< Texture2D > Chain33
static Asset< Texture2D > Chain8
static Asset< Texture2D > Chain
static Asset< Texture2D >[] WireUi
static Asset< Texture2D >[] GemChain
static Asset< Texture2D > Chain36
static Asset< Texture2D > Chain22
static Asset< Texture2D > MagicPixel
static Asset< Texture2D > Chain32
static Asset< Texture2D > Chain37
static Asset< Texture2D > Chain18
static Asset< Texture2D > Chain34
static Color GetSelectionGlowColor(bool isTileSelected, int averageTileLighting)
Definition Colors.cs:127
static bool[] IsFood
Definition ItemID.cs:233
static readonly short Count
Definition ItemID.cs:12138
void DrawProj_StardustGuardianPunching(Projectile proj)
Definition Main.cs:32951
static int TryInteractingWithVoidLens(Projectile proj)
Definition Main.cs:34390
static double time
Definition Main.cs:1284
void DrawProj_FairyQueenLance(Projectile proj)
Definition Main.cs:33056
void LoadProjectile(int i)
Definition Main.cs:56041
void DrawProj_TrueNightsEdge(Projectile proj)
Definition Main.cs:25955
void LoadNPC(int i)
Definition Main.cs:56032
static void DrawPrettyStarSparkle(float opacity, SpriteEffects dir, Vector2 drawpos, Microsoft.Xna.Framework.Color drawColor, Microsoft.Xna.Framework.Color shineColor, float flareCounter, float fadeInStart, float fadeInEnd, float fadeOutStart, float fadeOutEnd, float rotation, Vector2 scale, Vector2 fatness)
Definition Main.cs:32485
static SpriteBatch spriteBatch
Definition Main.cs:974
void DrawProjWithStarryTrail(Projectile proj, Microsoft.Xna.Framework.Color projectileColor, SpriteEffects dir)
Definition Main.cs:34287
static int myPlayer
Definition Main.cs:1801
static int DiscoR
Definition Main.cs:1062
static void DrawProj_Flamethrower(Projectile proj)
Definition Main.cs:32332
List< DrawData > _voidLensData
Definition Main.cs:2413
static DrawAnimation[] itemAnimations
Definition Main.cs:1707
static int TryInteractingWithMoneyTrough(Projectile proj)
Definition Main.cs:34468
static int[] projFrames
Definition Main.cs:1326
void DrawProj_TerraBlade2Shot(Projectile proj)
Definition Main.cs:26051
static StardewValleyAnimation _stardewAnimation
Definition Main.cs:2421
void DrawProj_Excalibur(Projectile proj)
Definition Main.cs:25836
static double timeForVisualEffects
Definition Main.cs:1286
static Main instance
Definition Main.cs:283
static Vector2 MouseWorld
Definition Main.cs:2776
static Microsoft.Xna.Framework.Color TryApplyingPlayerStringColor(int playerStringColor, Microsoft.Xna.Framework.Color stringColor)
Definition Main.cs:32681
static int screenHeight
Definition Main.cs:1721
static Vector2 screenPosition
Definition Main.cs:1715
static int CurrentDrawnEntityShader
Definition Main.cs:219
void DrawProj_EmpressBlade(Projectile proj, float hueOverride)
Definition Main.cs:33126
void DrawKite(Projectile proj)
Definition Main.cs:33858
static byte mouseTextColor
Definition Main.cs:1751
void DrawProj_PiercingStarlight(Projectile proj)
Definition Main.cs:32988
void DrawProj_LightsBane(Projectile proj)
Definition Main.cs:25765
static Microsoft.Xna.Framework.Color OurFavoriteColor
Definition Main.cs:902
static int DiscoG
Definition Main.cs:1066
void DrawProj_TrueExcalibur(Projectile proj)
Definition Main.cs:25914
static ulong TileFrameSeed
Definition Main.cs:411
void DrawProj_TerraBlade2(Projectile proj)
Definition Main.cs:26011
static Tile[,] tile
Definition Main.cs:1675
void DrawElderEye(SpriteBatch spriteBatch, Vector2 worldPosition, float opacity, float scale, int frameNumber, Microsoft.Xna.Framework.Color passedColor)
Definition Main.cs:20800
void DrawProj_NightsEdge(Projectile proj)
Definition Main.cs:25807
void DrawProj(int i)
Definition Main.cs:26110
void DrawWhip(Projectile proj)
Definition Main.cs:33230
static Projectile[] projectile
Definition Main.cs:1691
static void DrawProj_FlailChains(Projectile proj, Vector2 mountedCenter)
Definition Main.cs:32503
static int DiscoB
Definition Main.cs:1064
void DrawProj_CoolWhipMinion(Projectile proj)
Definition Main.cs:33160
static UnifiedRandom rand
Definition Main.cs:1387
void DrawContinuousTrail(Projectile proj)
Definition Main.cs:26120
static NPC[] npc
Definition Main.cs:1685
static UnifiedRandom _tempSeededRandom
Definition Main.cs:2423
static Vector3 rgbToHsl(Microsoft.Xna.Framework.Color newColor)
Definition Main.cs:44972
void DrawProj_TheHorsemansBlade(Projectile proj)
Definition Main.cs:25875
void DrawMultisegmentPet(Projectile proj)
Definition Main.cs:33792
void DrawMurderAurora(Projectile proj)
Definition Main.cs:33189
void PrepareDrawnProjectileDrawing(Projectile proj)
Definition Main.cs:34622
static bool tenthAnniversaryWorld
Definition Main.cs:343
static void DrawProj_FishingLine(Projectile proj, ref float polePosX, ref float polePosY, Vector2 mountedCenter)
Definition Main.cs:32719
static int screenWidth
Definition Main.cs:1719
static void DrawProj_Spear(Projectile proj, ref Microsoft.Xna.Framework.Color projectileColor, ref SpriteEffects dir)
Definition Main.cs:32404
static Microsoft.Xna.Framework.Color hslToRgb(Vector3 hslVector)
Definition Main.cs:44913
void DrawTwinsPet(Projectile proj)
Definition Main.cs:33772
void DrawProj_FairyQueenRangedItemShot(Projectile proj)
Definition Main.cs:33098
static Player LocalPlayer
Definition Main.cs:2829
static bool gamePaused
Definition Main.cs:1072
static Player[] player
Definition Main.cs:1803
static float GlobalTimeWrappedHourly
Definition Main.cs:405
static void EntitySpriteDraw(Texture2D texture, Vector2 position, Microsoft.Xna.Framework.Rectangle? sourceRectangle, Microsoft.Xna.Framework.Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float worthless=0f)
Definition Main.cs:34658
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 float Dot(Vector2 value1, Vector2 value2)
Definition Vector2.cs:121
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 Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
Definition Vector4.cs:277
static FinalFractalProfile GetFinalFractalProfile(int usedSwordId)

References Terraria.Main._stardewAnimation, Terraria.Main._tempSeededRandom, Terraria.Main._voidLensData, System.Math.Abs(), Terraria.Lighting.AddLight(), Terraria.Projectile.AI_192_GetJuminoFall(), System.array, System.Math.Atan2(), Microsoft.Xna.Framework.Color.Black, Microsoft.Xna.Framework.Color.Blue, Terraria.GameContent.Golf.GolfHelper.CalculateShotStrength(), Terraria.GameContent.TextureAssets.Chain, Terraria.GameContent.TextureAssets.Chain15, Terraria.GameContent.TextureAssets.Chain16, Terraria.GameContent.TextureAssets.Chain17, Terraria.GameContent.TextureAssets.Chain18, Terraria.GameContent.TextureAssets.Chain20, Terraria.GameContent.TextureAssets.Chain22, Terraria.GameContent.TextureAssets.Chain23, Terraria.GameContent.TextureAssets.Chain28, Terraria.GameContent.TextureAssets.Chain29, Terraria.GameContent.TextureAssets.Chain30, Terraria.GameContent.TextureAssets.Chain31, Terraria.GameContent.TextureAssets.Chain32, Terraria.GameContent.TextureAssets.Chain33, Terraria.GameContent.TextureAssets.Chain34, Terraria.GameContent.TextureAssets.Chain35, Terraria.GameContent.TextureAssets.Chain36, Terraria.GameContent.TextureAssets.Chain37, Terraria.GameContent.TextureAssets.Chain38, Terraria.GameContent.TextureAssets.Chain39, Terraria.GameContent.TextureAssets.Chain40, Terraria.GameContent.TextureAssets.Chain5, Terraria.GameContent.TextureAssets.Chain8, Terraria.GameContent.TextureAssets.Chain9, Terraria.GameContent.TextureAssets.Chains, Microsoft.Xna.Framework.MathHelper.Clamp(), System.Collections.Generic.List< T >.Clear(), Microsoft.Xna.Framework.Color.CornflowerBlue, System.Math.Cos(), Terraria.ID.ItemID.Count, Microsoft.Xna.Framework.Color.Crimson, Terraria.Main.CurrentDrawnEntityShader, Terraria.Main.DiscoB, Terraria.Main.DiscoG, Terraria.Main.DiscoR, Microsoft.Xna.Framework.MathHelper.Distance(), Microsoft.Xna.Framework.Vector2.Distance(), Terraria.ID.ProjectileID.Sets.DontAttachHideToAlpha, Microsoft.Xna.Framework.Vector2.Dot(), Terraria.Main.DrawContinuousTrail(), Terraria.Main.DrawElderEye(), Terraria.Main.DrawKite(), Terraria.Utils.DrawLaser(), Terraria.Main.DrawMultisegmentPet(), Terraria.Main.DrawMurderAurora(), Terraria.GameContent.Golf.GolfHelper.DrawPredictionLine(), Terraria.Main.DrawPrettyStarSparkle(), Terraria.Main.DrawProj(), Terraria.Main.DrawProj_CoolWhipMinion(), Terraria.Main.DrawProj_EmpressBlade(), Terraria.Main.DrawProj_Excalibur(), Terraria.Main.DrawProj_FairyQueenLance(), Terraria.Main.DrawProj_FairyQueenRangedItemShot(), Terraria.Main.DrawProj_FishingLine(), Terraria.Main.DrawProj_FlailChains(), Terraria.Main.DrawProj_Flamethrower(), Terraria.Main.DrawProj_LightsBane(), Terraria.Main.DrawProj_NightsEdge(), Terraria.Main.DrawProj_PiercingStarlight(), Terraria.Main.DrawProj_Spear(), Terraria.Main.DrawProj_StardustGuardianPunching(), Terraria.Main.DrawProj_TerraBlade2(), Terraria.Main.DrawProj_TerraBlade2Shot(), Terraria.Main.DrawProj_TheHorsemansBlade(), Terraria.Main.DrawProj_TrueExcalibur(), Terraria.Main.DrawProj_TrueNightsEdge(), Terraria.Main.DrawProjWithStarryTrail(), Terraria.Main.DrawTwinsPet(), Terraria.Main.DrawWhip(), Terraria.Main.EntitySpriteDraw(), Terraria.Collision.ExpandVertically(), Terraria.GameContent.TextureAssets.Extra, Terraria.GameContent.TextureAssets.EyeLaserSmall, Terraria.GameContent.TextureAssets.FishingLine, Terraria.GameContent.TextureAssets.Flames, System.Math.Floor(), Terraria.Main.gamePaused, Terraria.GameContent.TextureAssets.GemChain, Terraria.Lighting.GetColor(), Terraria.Graphics.FinalFractalHelper.GetFinalFractalProfile(), Terraria.Projectile.GetGolfTrailColor(), Terraria.Utils.GetLerpValue(), Terraria.GameContent.PortalHelper.GetPortalColor(), Terraria.ID.Colors.GetSelectionGlowColor(), Terraria.Main.GlobalTimeWrappedHourly, Terraria.GameContent.TextureAssets.GlowMask, Microsoft.Xna.Framework.Color.Gold, Terraria.GameContent.TextureAssets.GolfBallOutline, Microsoft.Xna.Framework.Color.HotPink, Terraria.Main.hslToRgb(), System.Text.RegularExpressions.i, System.Math.IEEERemainder(), Terraria.Main.instance, Terraria.WorldGen.InWorld(), Terraria.ID.ProjectileID.Sets.IsAGolfBall, Terraria.ID.ItemID.Sets.IsFood, Terraria.GameContent.Golf.GolfHelper.IsGolfBallResting(), Terraria.GameContent.Golf.GolfHelper.IsGolfShotValid(), Terraria.GameContent.Golf.GolfHelper.IsPlayerHoldingClub(), Terraria.GameContent.TextureAssets.Item, Terraria.Main.itemAnimations, Microsoft.Xna.Framework.Color.Lerp(), Microsoft.Xna.Framework.MathHelper.Lerp(), Microsoft.Xna.Framework.Vector2.Lerp(), Microsoft.Xna.Framework.Vector4.Lerp(), Terraria.GameContent.TextureAssets.LightDisc, Terraria.DelegateMethods.LightningLaserDraw(), Microsoft.Xna.Framework.Color.LimeGreen, Terraria.Main.LoadNPC(), Terraria.Main.LoadProjectile(), Terraria.Main.LocalPlayer, Terraria.GameContent.TextureAssets.MagicPixel, System.Math.Max(), Microsoft.Xna.Framework.MathHelper.Max(), System.Math.Min(), Microsoft.Xna.Framework.MathHelper.Min(), Terraria.GameContent.TextureAssets.MiniMinotaur, Terraria.Main.mouseTextColor, Terraria.Main.MouseWorld, Terraria.Main.myPlayer, Microsoft.Xna.Framework.Vector2.Normalize(), Terraria.GameContent.TextureAssets.Npc, Terraria.Main.npc, Microsoft.Xna.Framework.Vector2.One, Microsoft.Xna.Framework.Vector4.One, Microsoft.Xna.Framework.Color.Orange, Terraria.Main.OurFavoriteColor, System.Math.PI, Terraria.Main.player, Terraria.GameContent.TextureAssets.RenderTargets.PlayerTitaniumStormBuff, Terraria.Main.PrepareDrawnProjectileDrawing(), Terraria.GameContent.TextureAssets.Projectile, Terraria.Main.projectile, Terraria.Main.projFrames, Microsoft.Xna.Framework.Color.Purple, Terraria.DelegateMethods.RainbowLaserDraw(), Terraria.Main.rand, Terraria.Utils.RandomFloat(), Terraria.Utils.RandomInt(), Microsoft.Xna.Framework.Color.Red, Terraria.Utils.Remap(), Terraria.Main.rgbToHsl(), Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.NPC.ShouldEmpressBeEnraged(), System.Math.Sign(), System.Math.Sin(), Microsoft.Xna.Framework.Vector2.SmoothStep(), Terraria.Main.spriteBatch, System.Math.Sqrt(), System.start, Terraria.Main.tenthAnniversaryWorld, Terraria.Main.tile, Terraria.Main.TileFrameSeed, Terraria.Main.time, Terraria.Main.timeForVisualEffects, Terraria.GameContent.UI.WiresUI.Settings.ToolMode, Microsoft.Xna.Framework.Color.ToVector4(), Terraria.ID.ProjectileID.Sets.TrailCacheLength, Terraria.ID.ProjectileID.Sets.TrailingMode, Microsoft.Xna.Framework.Color.Transparent, Terraria.Main.TryApplyingPlayerStringColor(), Terraria.Main.TryInteractingWithMoneyTrough(), Terraria.Main.TryInteractingWithVoidLens(), Terraria.DelegateMethods.TurretLaserDraw(), System.type, Microsoft.Xna.Framework.Vector2.UnitY, Terraria.GameContent.Golf.GolfHelper.ValidateShot(), System.value, Microsoft.Xna.Framework.Graphics.Vector2, Microsoft.Xna.Framework.Graphics.Vector3, Microsoft.Xna.Framework.Color.Violet, Microsoft.Xna.Framework.Color.White, Terraria.GameContent.TextureAssets.WireUi, Terraria.Utils.WrappedLerp(), Microsoft.Xna.Framework.Point.X, Microsoft.Xna.Framework.Vector2.X, System.X, Microsoft.Xna.Framework.Point.Y, Microsoft.Xna.Framework.Vector2.Y, Microsoft.Xna.Framework.Color.Yellow, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.Main.DrawProj().