313 {
314 if (Main.netMode == 2 || !
active)
315 {
316 return;
317 }
319 {
321 {
322 return;
323 }
325 if (num > 32f)
326 {
328 }
329 }
331 {
332 case 4:
334 return;
335 case 5:
337 return;
338 case 6:
340 return;
341 case 7:
343 return;
344 }
346 {
348 Frame.CurrentRow = (byte)Main.rand.Next(3);
349 }
350 bool flag =
type >= 1024 &&
type <= 1026;
352 {
353 velocity.X *= 0.98f;
354 velocity.Y *= 0.98f;
356 {
357 velocity.Y += 0.05f;
358 }
359 if ((double)velocity.Y > 0.1)
360 {
362 {
364 }
365 else
366 {
368 }
369 }
370 }
372 {
374 if ((
double)
scale <= 0.01)
375 {
378 }
381 }
383 {
385 {
387 }
388 else if ((double)position.Y < Main.worldSurface * 16.0 + 8.0)
389 {
391 }
392 else
393 {
395 }
396 int num2 = 4;
399 {
402 if (
WorldGen.InWorld(num3, num4) && !Main.tile[num3, num4].active())
403 {
405 }
407 {
408 num2 = 24 + Main.rand.Next(256);
409 }
411 {
412 num2 = 24 + Main.rand.Next(256);
413 }
415 {
416 num2 = 24 + Main.rand.Next(256);
417 }
419 {
420 num2 = 24 + Main.rand.Next(96);
421 }
423 {
424 num2 = 16 + Main.rand.Next(64);
425 }
427 {
428 num2 *= 2;
429 }
431 {
432 num2 *= 4;
433 }
435 {
436 num2 = 4;
437 }
439 {
443 {
445 Main.gore[num5].frame = 9;
446 Main.gore[num5].velocity *= 0f;
447 }
448 }
449 }
451 {
452 num2 = 8;
454 {
455 num2 *= 2;
456 }
458 {
459 num2 *= 3;
460 }
462 {
466 {
468 }
469 }
470 }
472 {
473 num2 = 6;
475 {
476 num2 = (int)((double)num2 * 1.5);
477 velocity.Y += 0.175f;
478 }
479 else if (
type == 717)
480 {
481 num2 *= 2;
482 velocity.Y += 0.15f;
483 }
484 else if (
type == 943)
485 {
486 num2 = (int)((double)num2 * 1.5);
487 velocity.Y += 0.2f;
488 }
489 else
490 {
491 velocity.Y += 0.2f;
492 }
493 if ((double)velocity.Y < 0.5)
494 {
495 velocity.Y = 0.5f;
496 }
498 {
499 velocity.Y = 12f;
500 }
502 {
505 }
507 {
509 }
510 }
511 else
512 {
514 {
515 num2 *= 2;
516 }
517 else if (
type == 717)
518 {
519 num2 *= 6;
520 }
521 velocity.Y += 0.1f;
523 {
526 }
529 {
531 }
532 }
533 }
535 {
536 velocity.Y *= 0.98f;
537 velocity.X *= 0.98f;
539 if ((
double)
scale < 0.1)
540 {
543 }
544 }
546 {
547 velocity.Y *= 0.98f;
548 velocity.X *= 0.98f;
550 if ((
double)
scale < 0.1)
551 {
554 }
555 }
556 else if (
type == 1201)
557 {
559 {
561 Frame.CurrentRow = (byte)Main.rand.Next(4);
562 }
564 if ((
double)
scale < 0.1)
565 {
568 }
572 if (Main.tile[num6, num7] == null || Main.tile[num6, num7].liquid <= 0)
573 {
574 velocity.Y += 0.2f;
576 {
578 }
579 }
580 else
581 {
582 velocity.Y += 0.005f;
584 if (num8 > 1f)
585 {
587 }
588 else if (num8 > 0.1f)
589 {
591 }
592 }
593 }
594 else if (
type == 1208)
595 {
597 {
599 Frame.CurrentRow = (byte)Main.rand.Next(4);
600 }
602 int num9 = (int)vector.
X / 16;
603 int num10 = (int)vector.Y / 16;
604 bool flag2 = Main.tile[num9, num10] != null && Main.tile[num9, num10].liquid > 0;
606 if ((
double)
scale < 0.1)
607 {
610 }
612 if (flag2)
613 {
614 velocity.X *= 0.9f;
615 int num11 = (int)vector.X / 16;
616 int num12 = (int)(vector.Y / 16f);
617 _ = position.Y / 16f;
619 if (Main.tile[num11, num12] == null)
620 {
621 Main.tile[num11, num12] =
new Tile();
622 }
623 if (Main.tile[num11, num13] == null)
624 {
625 Main.tile[num11, num13] =
new Tile();
626 }
628 {
629 velocity.Y *= 0.5f;
630 }
631 num11 = (int)(vector.X / 16f);
632 num12 = (int)(vector.Y / 16f);
634 if (vector.Y > num14)
635 {
636 velocity.Y -= 0.1f;
638 {
639 velocity.Y = -8f;
640 }
642 {
643 velocity.Y = num14 - vector.Y;
644 }
645 }
646 else
647 {
648 velocity.Y = num14 - vector.Y;
649 }
651 int maxValue = (flag2 ? 270 : 15);
652 if (Main.rand.Next(maxValue) == 0 && !flag3)
653 {
655 if (flag2)
656 {
657 gore.velocity = Vector2.UnitX * Main.rand.NextFloatDirection() * 0.5f + Vector2.UnitY * Main.rand.NextFloat();
658 }
659 else if (gore.velocity.Y < 0f)
660 {
661 gore.velocity.Y = 0f - gore.velocity.Y;
662 }
663 }
664 }
665 else
666 {
668 {
669 velocity.X *= 0.95f;
670 }
671 velocity.X *= 0.98f;
672 velocity.Y += 0.3f;
674 {
675 velocity.Y = 15.9f;
676 }
677 }
678 }
679 else if (
type == 331)
680 {
682 velocity.Y *= 0.95f;
683 velocity.X *= 0.95f;
685 }
687 {
689 {
691 int num15 = Frame.CurrentRow / 4;
693 {
694 Frame.CurrentRow = (byte)(num15 * 4);
695 }
696 }
697 }
699 {
701 {
703 velocity.X *= 0.98f;
705 {
706 velocity.Y = -0.5f + Main.rand.NextFloat() * -3f;
707 }
709 {
710 velocity.Y -= 0.1f;
711 }
713 {
715 }
717 {
720 {
722 }
723 }
724 }
725 else if (
type == 1218)
726 {
728 {
730 }
731 velocity.X *= 0.95f;
733 {
734 velocity.X = 0f;
735 }
737 {
738 int num16 = 246;
740 {
741 case 0:
742 num16 = 246;
743 break;
744 case 1:
745 num16 = 245;
746 break;
747 case 2:
748 num16 = 244;
749 break;
750 }
752 Main.dust[num17].alpha = 255;
753 Main.dust[num17].scale = 0.8f;
755 }
756 velocity.Y += 0.2f;
758 }
759 else if (type < 411 || type > 430)
760 {
761 velocity.Y += 0.2f;
763 }
765 {
767 }
768 }
770 {
772 velocity.X *= 0.95f;
773 }
775 {
777 {
778 alpha += Main.rand.Next(1, 7);
779 }
780 else if (
alpha > 100)
781 {
782 alpha -= Main.rand.Next(1, 4);
783 }
785 {
787 }
789 {
791 }
792 velocity.X = (velocity.X * 50f + Main.WindForVisuals * 2f + (float)Main.rand.Next(-10, 11) * 0.1f) / 51f;
793 float num18 = 0f;
795 {
796 num18 = velocity.X * 0.2f;
797 }
798 velocity.Y = (velocity.Y * 50f + -0.35f + num18 + (float)Main.rand.Next(-10, 11) * 0.2f) / 51f;
800 float num19 = -1f;
802 {
804 for (
int i = 0;
i < 255;
i++)
805 {
806 if (Main.player[i].active && !Main.player[i].dead)
807 {
808 Rectangle value =
new Rectangle((
int)Main.player[i].position.X, (
int)Main.player[i].position.Y, Main.player[i].width, Main.player[i].height);
810 {
812 num19 = Main.player[
i].velocity.Length();
813 break;
814 }
815 }
816 }
817 }
819 {
820 if (Main.rand.Next(2) == 0)
821 {
823 }
824 if (Main.rand.Next(50) == 0)
825 {
827 }
828 if (Main.rand.Next(100) == 0)
829 {
831 }
832 }
833 else
834 {
837 {
843 int num23 = 31;
844 for (int j = 0; (float)j < num20; j++)
845 {
846 int num24 = Dust.NewDust(
new Vector2(x, y), (int)num21, (
int)num22, num23);
847 Main.dust[num24].velocity *= (1f + num19) / 3f;
848 Main.dust[num24].noGravity = true;
849 Main.dust[num24].alpha = 100;
850 Main.dust[num24].scale =
scale;
851 }
852 }
853 }
854 }
856 {
858 velocity.X = (velocity.X * 50f + Main.WindForVisuals * 2f + (float)Main.rand.Next(-10, 11) * 0.1f) / 51f;
859 velocity.Y = (velocity.Y * 50f + -0.25f + (float)Main.rand.Next(-10, 11) * 0.2f) / 51f;
862 {
864 for (int k = 0; k < 255; k++)
865 {
866 if (Main.player[k].active && !Main.player[k].dead)
867 {
868 Rectangle value2 =
new Rectangle((
int)Main.player[k].position.X, (
int)Main.player[k].position.Y, Main.player[k].width, Main.player[k].height);
870 {
872 }
873 }
874 }
876 {
878 }
879 }
881 {
882 if (Main.rand.Next(2) == 0)
883 {
885 }
886 if (Main.rand.Next(50) == 0)
887 {
889 }
890 if (Main.rand.Next(100) == 0)
891 {
893 }
894 }
895 else
896 {
899 {
905 int num28 = 176;
907 {
908 num28 = 177;
909 }
911 {
912 num28 = 178;
913 }
915 {
916 num28 = 179;
917 }
918 for (int l = 0; (float)l < num25; l++)
919 {
920 int num29 = Dust.NewDust(
new Vector2(x2, y2), (int)num26, (
int)num27, num28);
921 Main.dust[num29].noGravity = true;
922 Main.dust[num29].alpha = 100;
923 Main.dust[num29].scale =
scale;
924 }
925 }
926 }
927 }
929 {
931 {
933 {
934 float num30 = 1f;
935 float num31 = 1f;
936 float num32 = 1f;
937 float num33 = 0.6f;
938 num33 = ((
frame == 0) ? (num33 * 0.1f) : ((
frame == 1) ? (num33 * 0.2f) : ((
frame == 2) ? (num33 * 0.3f) : ((
frame == 3) ? (num33 * 0.4f) : ((
frame == 4) ? (num33 * 0.5f) : ((
frame == 5) ? (num33 * 0.4f) : ((
frame == 6) ? (num33 * 0.2f) : ((
frame <= 9) ? (num33 * 0.5f) : ((
frame == 10) ? (num33 * 0.5f) : ((
frame == 11) ? (num33 * 0.4f) : ((
frame == 12) ? (num33 * 0.3f) : ((
frame == 13) ? (num33 * 0.2f) : ((
frame != 14) ? 0f : (num33 * 0.1f))))))))))))));
939 num30 = 1f * num33;
940 num31 = 0.5f * num33;
941 num32 = 0.1f * num33;
942 Lighting.AddLight(
position +
new Vector2(8f, 8f), num30, num31, num32);
943 }
947 {
949 {
952 if (
type != 716 &&
type != 717 &&
type != 943 && (type < 1160 || type > 1162))
953 {
955 }
956 }
957 }
959 {
961 {
964 if (
type != 716 &&
type != 717 &&
type != 943 && (type < 1160 || type > 1162))
965 {
967 }
969 }
971 int num35 = (int)(
position.
Y + 14f) / 16;
972 if (Main.tile[num34, num35] != null && Main.tile[num34, num35].liquid > 0)
973 {
975 position.Y = num35 * 16 - Main.tile[num34, num35].liquid / 16;
976 }
977 }
978 }
980 {
981 int num36 = 32;
983 {
986 {
988 }
989 }
990 if (flag)
991 {
992 num36 = 4;
993 }
994 num36 = (int)((float)num36 * 0.9f);
998 {
999 if (flag)
1000 {
1001 velocity.X *= 0.94f;
1002 }
1003 else
1004 {
1005 velocity.X *= 0.97f;
1006 }
1007 if ((
double)velocity.X > -0.01 && (double)
velocity.
X < 0.01)
1008 {
1009 velocity.X = 0f;
1010 }
1011 }
1013 {
1015 }
1016 else
1017 {
1019 }
1020 }
1021 else
1022 {
1024 }
1025 }
1027 {
1028 int num37 = 32;
1030 {
1033 {
1035 }
1036 }
1037 num37 = (int)((float)num37 * 0.9f);
1039 position.X = vector3.
X;
1040 position.Y = vector3.
Y;
1041 velocity.X = vector3.
Z;
1042 velocity.Y = vector3.
W;
1043 }
1045 {
1047 }
1049 {
1051 }
1052 else
1053 {
1055 }
1057 {
1059 }
1061 {
1066 {
1067 num40 *= 0.3f;
1068 num39 *= 0.8f;
1069 }
1070 else if (
type == 17)
1071 {
1072 num39 *= 0.6f;
1073 num38 *= 0.3f;
1074 }
1076 {
1078 }
1079 else
1080 {
1082 }
1083 }
1084 }
static double Abs(double value)
static void PlaySound(int type, Vector2 position, int style=1)
static Asset< Texture2D >[] Gore
void UpdateFogMachineCloud()
void UpdateLightningBunnySparks()
static Gore NewGoreDirect(Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
static int NewGore(Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
bool DeactivateIfOutsideOfWorld()
void UpdateAmbientFloorCloud()
float ChumFloatingChunk_GetWaterLine(int X, int Y)
void UpdateAmbientAirborneCloud()
static FilterManager Scene
static int[] DisappearSpeed
static int[] DisappearSpeedAlpha
bool Intersects(Rectangle value)