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

◆ Damage()

void Terraria.Projectile.Damage ( )
inline

Definition at line 11590 of file Projectile.cs.

11591 {
11592 //IL_06c5: Unknown result type (might be due to invalid IL or missing references)
11593 //IL_06ca: Unknown result type (might be due to invalid IL or missing references)
11594 //IL_072c: Unknown result type (might be due to invalid IL or missing references)
11595 //IL_0702: Unknown result type (might be due to invalid IL or missing references)
11596 //IL_4df2: Unknown result type (might be due to invalid IL or missing references)
11597 //IL_4c81: Unknown result type (might be due to invalid IL or missing references)
11598 //IL_4cb6: Unknown result type (might be due to invalid IL or missing references)
11599 //IL_4cd3: Unknown result type (might be due to invalid IL or missing references)
11600 //IL_4cdd: Unknown result type (might be due to invalid IL or missing references)
11601 //IL_4ce2: Unknown result type (might be due to invalid IL or missing references)
11602 //IL_4ce7: Unknown result type (might be due to invalid IL or missing references)
11603 //IL_4ce9: Unknown result type (might be due to invalid IL or missing references)
11604 //IL_4cfd: Unknown result type (might be due to invalid IL or missing references)
11605 //IL_4d05: Unknown result type (might be due to invalid IL or missing references)
11606 //IL_4f2c: Unknown result type (might be due to invalid IL or missing references)
11607 //IL_4f34: Unknown result type (might be due to invalid IL or missing references)
11608 //IL_4fa5: Unknown result type (might be due to invalid IL or missing references)
11609 //IL_4fab: Unknown result type (might be due to invalid IL or missing references)
11610 //IL_4fb1: Unknown result type (might be due to invalid IL or missing references)
11611 //IL_4881: Unknown result type (might be due to invalid IL or missing references)
11612 //IL_4884: Unknown result type (might be due to invalid IL or missing references)
11613 //IL_0b9d: Unknown result type (might be due to invalid IL or missing references)
11614 //IL_0baa: Unknown result type (might be due to invalid IL or missing references)
11615 //IL_0baf: Unknown result type (might be due to invalid IL or missing references)
11616 //IL_0bb4: Unknown result type (might be due to invalid IL or missing references)
11617 //IL_4ad3: Unknown result type (might be due to invalid IL or missing references)
11618 //IL_4adf: Unknown result type (might be due to invalid IL or missing references)
11619 //IL_4ae9: Unknown result type (might be due to invalid IL or missing references)
11620 //IL_477e: Unknown result type (might be due to invalid IL or missing references)
11621 //IL_478b: Unknown result type (might be due to invalid IL or missing references)
11622 //IL_4790: Unknown result type (might be due to invalid IL or missing references)
11623 //IL_4795: Unknown result type (might be due to invalid IL or missing references)
11624 //IL_4b27: Unknown result type (might be due to invalid IL or missing references)
11625 //IL_4b33: Unknown result type (might be due to invalid IL or missing references)
11626 //IL_4a9a: Unknown result type (might be due to invalid IL or missing references)
11627 //IL_4aa6: Unknown result type (might be due to invalid IL or missing references)
11628 //IL_4ab0: Unknown result type (might be due to invalid IL or missing references)
11629 //IL_0e50: Unknown result type (might be due to invalid IL or missing references)
11630 //IL_0e59: Unknown result type (might be due to invalid IL or missing references)
11631 //IL_0e00: Unknown result type (might be due to invalid IL or missing references)
11632 //IL_0e05: Unknown result type (might be due to invalid IL or missing references)
11633 //IL_0e43: Unknown result type (might be due to invalid IL or missing references)
11634 //IL_0e44: Unknown result type (might be due to invalid IL or missing references)
11635 //IL_0f28: Unknown result type (might be due to invalid IL or missing references)
11636 //IL_0f2d: Unknown result type (might be due to invalid IL or missing references)
11637 //IL_1350: Unknown result type (might be due to invalid IL or missing references)
11638 //IL_1318: Unknown result type (might be due to invalid IL or missing references)
11639 //IL_1325: Unknown result type (might be due to invalid IL or missing references)
11640 //IL_132a: Unknown result type (might be due to invalid IL or missing references)
11641 //IL_132f: Unknown result type (might be due to invalid IL or missing references)
11642 //IL_1075: Unknown result type (might be due to invalid IL or missing references)
11643 //IL_107f: Unknown result type (might be due to invalid IL or missing references)
11644 //IL_1084: Unknown result type (might be due to invalid IL or missing references)
11645 //IL_0fc6: Unknown result type (might be due to invalid IL or missing references)
11646 //IL_0fcb: Unknown result type (might be due to invalid IL or missing references)
11647 //IL_0fcf: Unknown result type (might be due to invalid IL or missing references)
11648 //IL_0fd5: Unknown result type (might be due to invalid IL or missing references)
11649 //IL_0fe8: Unknown result type (might be due to invalid IL or missing references)
11650 //IL_0fed: Unknown result type (might be due to invalid IL or missing references)
11651 //IL_0ff2: Unknown result type (might be due to invalid IL or missing references)
11652 //IL_1000: Unknown result type (might be due to invalid IL or missing references)
11653 //IL_1019: Unknown result type (might be due to invalid IL or missing references)
11654 //IL_101b: Unknown result type (might be due to invalid IL or missing references)
11655 //IL_1022: Unknown result type (might be due to invalid IL or missing references)
11656 //IL_1028: Unknown result type (might be due to invalid IL or missing references)
11657 //IL_103b: Unknown result type (might be due to invalid IL or missing references)
11658 //IL_1040: Unknown result type (might be due to invalid IL or missing references)
11659 //IL_1045: Unknown result type (might be due to invalid IL or missing references)
11660 //IL_1053: Unknown result type (might be due to invalid IL or missing references)
11661 //IL_106c: Unknown result type (might be due to invalid IL or missing references)
11662 //IL_106e: Unknown result type (might be due to invalid IL or missing references)
11663 //IL_1160: Unknown result type (might be due to invalid IL or missing references)
11664 //IL_1165: Unknown result type (might be due to invalid IL or missing references)
11665 //IL_11bc: Unknown result type (might be due to invalid IL or missing references)
11666 //IL_11c1: Unknown result type (might be due to invalid IL or missing references)
11667 //IL_118e: Unknown result type (might be due to invalid IL or missing references)
11668 //IL_11ea: Unknown result type (might be due to invalid IL or missing references)
11669 //IL_11a7: Unknown result type (might be due to invalid IL or missing references)
11670 //IL_11a9: Unknown result type (might be due to invalid IL or missing references)
11671 //IL_1203: Unknown result type (might be due to invalid IL or missing references)
11672 //IL_1205: Unknown result type (might be due to invalid IL or missing references)
11673 //IL_125e: Unknown result type (might be due to invalid IL or missing references)
11674 //IL_127a: Unknown result type (might be due to invalid IL or missing references)
11675 //IL_127f: Unknown result type (might be due to invalid IL or missing references)
11676 //IL_1c06: Unknown result type (might be due to invalid IL or missing references)
11677 //IL_1c0b: Unknown result type (might be due to invalid IL or missing references)
11678 //IL_1c10: Unknown result type (might be due to invalid IL or missing references)
11679 //IL_1c1c: Unknown result type (might be due to invalid IL or missing references)
11680 //IL_1c1e: Unknown result type (might be due to invalid IL or missing references)
11681 //IL_1c91: Unknown result type (might be due to invalid IL or missing references)
11682 //IL_1c96: Unknown result type (might be due to invalid IL or missing references)
11683 //IL_1d72: Unknown result type (might be due to invalid IL or missing references)
11684 //IL_1d77: Unknown result type (might be due to invalid IL or missing references)
11685 //IL_1a34: Unknown result type (might be due to invalid IL or missing references)
11686 //IL_1a39: Unknown result type (might be due to invalid IL or missing references)
11687 //IL_1af2: Unknown result type (might be due to invalid IL or missing references)
11688 //IL_1af7: Unknown result type (might be due to invalid IL or missing references)
11689 //IL_1ab0: Unknown result type (might be due to invalid IL or missing references)
11690 //IL_1ab5: Unknown result type (might be due to invalid IL or missing references)
11691 //IL_1efb: Unknown result type (might be due to invalid IL or missing references)
11692 //IL_1f01: Unknown result type (might be due to invalid IL or missing references)
11693 //IL_1f06: Unknown result type (might be due to invalid IL or missing references)
11694 //IL_1f0b: Unknown result type (might be due to invalid IL or missing references)
11695 //IL_1f10: Unknown result type (might be due to invalid IL or missing references)
11696 //IL_1f15: Unknown result type (might be due to invalid IL or missing references)
11697 //IL_1f4a: Unknown result type (might be due to invalid IL or missing references)
11698 //IL_1f5c: Unknown result type (might be due to invalid IL or missing references)
11699 //IL_22f5: Unknown result type (might be due to invalid IL or missing references)
11700 //IL_2303: Unknown result type (might be due to invalid IL or missing references)
11701 //IL_220e: Unknown result type (might be due to invalid IL or missing references)
11702 //IL_2211: Unknown result type (might be due to invalid IL or missing references)
11703 //IL_221b: Unknown result type (might be due to invalid IL or missing references)
11704 //IL_2220: Unknown result type (might be due to invalid IL or missing references)
11705 //IL_2225: Unknown result type (might be due to invalid IL or missing references)
11706 //IL_222e: Unknown result type (might be due to invalid IL or missing references)
11707 //IL_2245: Unknown result type (might be due to invalid IL or missing references)
11708 //IL_224a: Unknown result type (might be due to invalid IL or missing references)
11709 //IL_2267: Unknown result type (might be due to invalid IL or missing references)
11710 //IL_2272: Unknown result type (might be due to invalid IL or missing references)
11711 //IL_227c: Unknown result type (might be due to invalid IL or missing references)
11712 //IL_2283: Unknown result type (might be due to invalid IL or missing references)
11713 //IL_1e5d: Unknown result type (might be due to invalid IL or missing references)
11714 //IL_1e63: Unknown result type (might be due to invalid IL or missing references)
11715 //IL_1e68: Unknown result type (might be due to invalid IL or missing references)
11716 //IL_1e6d: Unknown result type (might be due to invalid IL or missing references)
11717 //IL_1e77: Unknown result type (might be due to invalid IL or missing references)
11718 //IL_1e7c: Unknown result type (might be due to invalid IL or missing references)
11719 //IL_1e82: Unknown result type (might be due to invalid IL or missing references)
11720 //IL_1e87: Unknown result type (might be due to invalid IL or missing references)
11721 //IL_1e8c: Unknown result type (might be due to invalid IL or missing references)
11722 //IL_1e91: Unknown result type (might be due to invalid IL or missing references)
11723 //IL_237d: Unknown result type (might be due to invalid IL or missing references)
11724 //IL_2383: Unknown result type (might be due to invalid IL or missing references)
11725 //IL_2388: Unknown result type (might be due to invalid IL or missing references)
11726 //IL_2392: Unknown result type (might be due to invalid IL or missing references)
11727 //IL_2397: Unknown result type (might be due to invalid IL or missing references)
11728 //IL_203f: Unknown result type (might be due to invalid IL or missing references)
11729 //IL_204a: Unknown result type (might be due to invalid IL or missing references)
11730 //IL_2511: Unknown result type (might be due to invalid IL or missing references)
11731 //IL_2529: Unknown result type (might be due to invalid IL or missing references)
11732 //IL_253f: Unknown result type (might be due to invalid IL or missing references)
11733 //IL_265b: Unknown result type (might be due to invalid IL or missing references)
11734 //IL_2678: Unknown result type (might be due to invalid IL or missing references)
11735 //IL_26f2: Unknown result type (might be due to invalid IL or missing references)
11736 //IL_26f8: Unknown result type (might be due to invalid IL or missing references)
11737 //IL_26fd: Unknown result type (might be due to invalid IL or missing references)
11738 //IL_2702: Unknown result type (might be due to invalid IL or missing references)
11739 //IL_256e: Unknown result type (might be due to invalid IL or missing references)
11740 //IL_2575: Unknown result type (might be due to invalid IL or missing references)
11741 //IL_257a: Unknown result type (might be due to invalid IL or missing references)
11742 //IL_257f: Unknown result type (might be due to invalid IL or missing references)
11743 //IL_2591: Unknown result type (might be due to invalid IL or missing references)
11744 //IL_259b: Unknown result type (might be due to invalid IL or missing references)
11745 //IL_25a0: Unknown result type (might be due to invalid IL or missing references)
11746 //IL_25a7: Unknown result type (might be due to invalid IL or missing references)
11747 //IL_25ac: Unknown result type (might be due to invalid IL or missing references)
11748 //IL_25b0: Unknown result type (might be due to invalid IL or missing references)
11749 //IL_25b5: Unknown result type (might be due to invalid IL or missing references)
11750 //IL_25ba: Unknown result type (might be due to invalid IL or missing references)
11751 //IL_25dc: Unknown result type (might be due to invalid IL or missing references)
11752 //IL_25f9: Unknown result type (might be due to invalid IL or missing references)
11753 //IL_2953: Unknown result type (might be due to invalid IL or missing references)
11754 //IL_2959: Unknown result type (might be due to invalid IL or missing references)
11755 //IL_295e: Unknown result type (might be due to invalid IL or missing references)
11756 //IL_2963: Unknown result type (might be due to invalid IL or missing references)
11757 //IL_296c: Unknown result type (might be due to invalid IL or missing references)
11758 //IL_2970: Unknown result type (might be due to invalid IL or missing references)
11759 //IL_2975: Unknown result type (might be due to invalid IL or missing references)
11760 //IL_2978: Unknown result type (might be due to invalid IL or missing references)
11761 //IL_297a: Unknown result type (might be due to invalid IL or missing references)
11762 //IL_2984: Unknown result type (might be due to invalid IL or missing references)
11763 //IL_2989: Unknown result type (might be due to invalid IL or missing references)
11764 //IL_304f: Unknown result type (might be due to invalid IL or missing references)
11765 //IL_305b: Unknown result type (might be due to invalid IL or missing references)
11766 //IL_30b2: Unknown result type (might be due to invalid IL or missing references)
11767 //IL_30be: Unknown result type (might be due to invalid IL or missing references)
11768 //IL_30eb: Unknown result type (might be due to invalid IL or missing references)
11769 //IL_30f7: Unknown result type (might be due to invalid IL or missing references)
11770 //IL_2e9e: Unknown result type (might be due to invalid IL or missing references)
11771 //IL_2ea4: Unknown result type (might be due to invalid IL or missing references)
11772 //IL_2ea9: Unknown result type (might be due to invalid IL or missing references)
11773 //IL_2eae: Unknown result type (might be due to invalid IL or missing references)
11774 //IL_2ec5: Unknown result type (might be due to invalid IL or missing references)
11775 //IL_2ec9: Unknown result type (might be due to invalid IL or missing references)
11776 //IL_2ece: Unknown result type (might be due to invalid IL or missing references)
11777 //IL_2e0a: Unknown result type (might be due to invalid IL or missing references)
11778 //IL_2e17: Unknown result type (might be due to invalid IL or missing references)
11779 //IL_2e1c: Unknown result type (might be due to invalid IL or missing references)
11780 //IL_2e21: Unknown result type (might be due to invalid IL or missing references)
11781 //IL_2e3b: Unknown result type (might be due to invalid IL or missing references)
11782 //IL_2e4a: Unknown result type (might be due to invalid IL or missing references)
11783 //IL_3b10: Unknown result type (might be due to invalid IL or missing references)
11784 //IL_3b1c: Unknown result type (might be due to invalid IL or missing references)
11785 //IL_34fa: Unknown result type (might be due to invalid IL or missing references)
11786 //IL_3501: Unknown result type (might be due to invalid IL or missing references)
11787 //IL_3506: Unknown result type (might be due to invalid IL or missing references)
11788 //IL_350b: Unknown result type (might be due to invalid IL or missing references)
11789 //IL_3510: Unknown result type (might be due to invalid IL or missing references)
11790 //IL_351a: Unknown result type (might be due to invalid IL or missing references)
11791 //IL_351f: Unknown result type (might be due to invalid IL or missing references)
11792 //IL_353a: Unknown result type (might be due to invalid IL or missing references)
11793 //IL_3545: Unknown result type (might be due to invalid IL or missing references)
11794 //IL_354f: Unknown result type (might be due to invalid IL or missing references)
11795 //IL_3556: Unknown result type (might be due to invalid IL or missing references)
11796 //IL_35cc: Unknown result type (might be due to invalid IL or missing references)
11797 //IL_35d8: Unknown result type (might be due to invalid IL or missing references)
11798 //IL_35e2: Unknown result type (might be due to invalid IL or missing references)
11799 //IL_3662: Unknown result type (might be due to invalid IL or missing references)
11800 //IL_366e: Unknown result type (might be due to invalid IL or missing references)
11801 //IL_3678: Unknown result type (might be due to invalid IL or missing references)
11802 //IL_3628: Unknown result type (might be due to invalid IL or missing references)
11803 //IL_3634: Unknown result type (might be due to invalid IL or missing references)
11804 //IL_363e: Unknown result type (might be due to invalid IL or missing references)
11805 //IL_38b9: Unknown result type (might be due to invalid IL or missing references)
11806 //IL_38ca: Unknown result type (might be due to invalid IL or missing references)
11807 //IL_38de: Unknown result type (might be due to invalid IL or missing references)
11808 //IL_38e3: Unknown result type (might be due to invalid IL or missing references)
11809 //IL_38e8: Unknown result type (might be due to invalid IL or missing references)
11810 //IL_38ed: Unknown result type (might be due to invalid IL or missing references)
11811 //IL_38f1: Unknown result type (might be due to invalid IL or missing references)
11812 //IL_38f3: Unknown result type (might be due to invalid IL or missing references)
11813 //IL_38fd: Unknown result type (might be due to invalid IL or missing references)
11814 //IL_3902: Unknown result type (might be due to invalid IL or missing references)
11815 //IL_391a: Unknown result type (might be due to invalid IL or missing references)
11816 //IL_3921: Unknown result type (might be due to invalid IL or missing references)
11817 //IL_3928: Unknown result type (might be due to invalid IL or missing references)
11818 //IL_392f: Unknown result type (might be due to invalid IL or missing references)
11819 //IL_3961: Unknown result type (might be due to invalid IL or missing references)
11820 //IL_3968: Unknown result type (might be due to invalid IL or missing references)
11821 //IL_396f: Unknown result type (might be due to invalid IL or missing references)
11822 //IL_3976: Unknown result type (might be due to invalid IL or missing references)
11823 //IL_39a8: Unknown result type (might be due to invalid IL or missing references)
11824 //IL_39af: Unknown result type (might be due to invalid IL or missing references)
11825 //IL_39b6: Unknown result type (might be due to invalid IL or missing references)
11826 //IL_39bd: Unknown result type (might be due to invalid IL or missing references)
11827 //IL_3a8b: Unknown result type (might be due to invalid IL or missing references)
11828 //IL_3a90: Unknown result type (might be due to invalid IL or missing references)
11829 //IL_3d0b: Unknown result type (might be due to invalid IL or missing references)
11830 //IL_3d17: Unknown result type (might be due to invalid IL or missing references)
11831 //IL_4271: Unknown result type (might be due to invalid IL or missing references)
11832 //IL_427e: Unknown result type (might be due to invalid IL or missing references)
11833 //IL_4283: Unknown result type (might be due to invalid IL or missing references)
11834 //IL_4288: Unknown result type (might be due to invalid IL or missing references)
11835 //IL_4586: Unknown result type (might be due to invalid IL or missing references)
11836 //IL_4605: Unknown result type (might be due to invalid IL or missing references)
11837 //IL_460a: Unknown result type (might be due to invalid IL or missing references)
11838 //IL_4612: Unknown result type (might be due to invalid IL or missing references)
11839 //IL_4617: Unknown result type (might be due to invalid IL or missing references)
11840 //IL_46b9: Unknown result type (might be due to invalid IL or missing references)
11841 //IL_46c0: Unknown result type (might be due to invalid IL or missing references)
11842 //IL_46c6: Unknown result type (might be due to invalid IL or missing references)
11843 //IL_46cb: Unknown result type (might be due to invalid IL or missing references)
11844 //IL_46d5: Unknown result type (might be due to invalid IL or missing references)
11845 //IL_46ef: Unknown result type (might be due to invalid IL or missing references)
11846 //IL_46f4: Unknown result type (might be due to invalid IL or missing references)
11847 //IL_46f9: Unknown result type (might be due to invalid IL or missing references)
11848 //IL_4717: Unknown result type (might be due to invalid IL or missing references)
11849 //IL_4732: Unknown result type (might be due to invalid IL or missing references)
11850 //IL_4737: Unknown result type (might be due to invalid IL or missing references)
11851 //IL_3fe8: Unknown result type (might be due to invalid IL or missing references)
11852 //IL_3ff5: Unknown result type (might be due to invalid IL or missing references)
11853 //IL_3ffa: Unknown result type (might be due to invalid IL or missing references)
11854 //IL_3fff: Unknown result type (might be due to invalid IL or missing references)
11855 //IL_40fe: Unknown result type (might be due to invalid IL or missing references)
11856 //IL_410b: Unknown result type (might be due to invalid IL or missing references)
11857 //IL_4110: Unknown result type (might be due to invalid IL or missing references)
11858 //IL_4115: Unknown result type (might be due to invalid IL or missing references)
11859 //IL_417e: Unknown result type (might be due to invalid IL or missing references)
11860 //IL_4183: Unknown result type (might be due to invalid IL or missing references)
11861 //IL_4188: Unknown result type (might be due to invalid IL or missing references)
11862 //IL_418d: Unknown result type (might be due to invalid IL or missing references)
11863 bool vanillaCanDamage = true;
11864 if (type == 18 || type == 72 || type == 86 || type == 87 || aiStyle == 31 || aiStyle == 32 || type == 226 || type == 378 || type == 613 || type == 650 || type == 882 || type == 888 || type == 895 || type == 896 || (type == 434 && localAI[0] != 0f) || type == 439 || type == 444 || (type == 451 && ((int)(ai[0] - 1f) / penetrate == 0 || ai[1] < 5f) && ai[0] != 0f) || type == 500 || type == 653 || type == 1018 || type == 460 || type == 633 || type == 600 || type == 601 || type == 602 || type == 535 || (type == 631 && localAI[1] == 0f) || (type == 537 && localAI[0] <= 30f) || type == 651 || (type == 188 && localAI[0] < 5f) || (aiStyle == 137 && ai[0] != 0f) || aiStyle == 138 || (type == 261 && ((Vector2)(ref velocity)).Length() < 1.5f) || (type == 818 && ai[0] < 1f) || type == 831 || type == 970 || (type == 833 && ai[0] == 4f) || (type == 834 && ai[0] == 4f) || (type == 835 && ai[0] == 4f) || (type == 281 && ai[0] == -3f) || ((type == 598 || type == 636 || type == 614 || type == 971 || type == 975) && ai[0] == 1f) || (type == 923 && localAI[0] <= 60f) || (type == 919 && localAI[0] <= 60f) || (aiStyle == 15 && ai[0] == 0f && localAI[1] <= 12f) || type == 861 || (type >= 511 && type <= 513 && ai[1] >= 1f) || type == 1007 || (aiStyle == 93 && ai[0] != 0f && ai[0] != 2f) || (aiStyle == 10 && localAI[1] == -1f) || (type == 85 && localAI[0] >= 54f) || (Main.projPet[type] && type != 266 && type != 407 && type != 317 && (type != 388 || ai[0] != 2f) && (type < 390 || type > 392) && (type < 393 || type > 395) && (type != 533 || !(ai[0] >= 6f) || !(ai[0] <= 8f)) && (type < 625 || type > 628) && (type != 755 || ai[0] == 0f) && (type != 946 || ai[0] == 0f) && type != 758 && type != 951 && type != 963 && (type != 759 || frame == Main.projFrames[type] - 1) && type != 833 && type != 834 && type != 835 && type != 864 && (type != 623 || ai[0] != 2f)))
11865 {
11866 vanillaCanDamage = false;
11867 }
11868 if (Main.projPet[type] && ProjectileLoader.MinionContactDamage(this))
11869 {
11870 vanillaCanDamage = true;
11871 }
11873 {
11874 return;
11875 }
11876 Rectangle rectangle = Damage_GetHitbox();
11877 if (friendly && Main.getGoodWorld && aiStyle == 16 && Main.netMode == 1 && owner != Main.myPlayer && !npcProj)
11878 {
11879 BombsHurtPlayers(rectangle, Main.myPlayer);
11880 return;
11881 }
11882 if (friendly && owner == Main.myPlayer && !npcProj)
11883 {
11885 if (!minion)
11886 {
11887 CutTiles();
11888 }
11889 }
11890 if (owner == Main.myPlayer)
11891 {
11892 float num = 1f;
11894 {
11895 num *= 2f;
11896 }
11897 if (ProjectileID.Sets.IsAMineThatDealsTripleDamageWhenStationary[type] && ((Vector2)(ref velocity)).Length() < 0.5f)
11898 {
11899 num *= 3f;
11900 }
11901 if (type == 34 && penetrate == 1)
11902 {
11903 num *= 1f;
11904 }
11905 if (aiStyle == 15 && ai[0] == 0f)
11906 {
11907 num *= 1.2f;
11908 }
11909 if (aiStyle == 15 && (ai[0] == 1f || ai[0] == 2f))
11910 {
11911 num *= 2f;
11912 }
11913 if (type == 877 || type == 879 || type == 878)
11914 {
11915 num = 0.1f + ((Vector2)(ref Main.player[owner].velocity)).Length() / 7f * 0.9f;
11916 }
11917 if (type == 968)
11918 {
11919 num = 1f;
11920 switch ((int)ai[1])
11921 {
11922 case 0:
11923 num = 1.5f;
11924 break;
11925 case 1:
11926 num = 1f;
11927 break;
11928 case 2:
11929 num = 1.5f;
11930 break;
11931 case 3:
11932 num = 0.1f;
11933 break;
11934 case 4:
11935 num = 1f;
11936 break;
11937 case 5:
11938 num = 1f;
11939 break;
11940 case 6:
11941 num = 1f;
11942 break;
11943 case 7:
11944 num = 0.25f;
11945 break;
11946 case 8:
11947 num = 1f;
11948 break;
11949 case 9:
11950 num = 0.75f;
11951 break;
11952 case 10:
11953 num = 0.5f;
11954 break;
11955 case 11:
11956 num = 0.5f;
11957 break;
11958 case 12:
11959 num = 0.5f;
11960 break;
11961 case 13:
11962 num = 0.5f;
11963 break;
11964 case 14:
11965 num = 0.5f;
11966 break;
11967 case 15:
11968 num = 0.5f;
11969 break;
11970 case 16:
11971 num = 0.5f;
11972 break;
11973 case 17:
11974 num = 1.5f;
11975 break;
11976 case 18:
11977 num = 1.6f;
11978 break;
11979 case 19:
11980 num = 1.8f;
11981 break;
11982 case 20:
11983 num = 1.9f;
11984 break;
11985 case 21:
11986 num = 1.7f;
11987 break;
11988 case 22:
11989 num = 2f;
11990 break;
11991 case 23:
11992 num = 1.9f;
11993 break;
11994 }
11995 }
11996 if (type == 533 && localAI[2] >= 40f)
11997 {
11998 num *= 0.5f;
11999 }
12000 bool flag = !npcProj && !trap;
12001 bool flag12 = usesOwnerMeleeHitCD && flag && owner < 255;
12002 bool flag22 = damage > 0;
12003 if (flag22)
12004 {
12005 int[] array = localNPCImmunity;
12006 if (type == 626 || type == 627 || type == 628)
12007 {
12008 Projectile projectile = FindStardustDragonHeadOfOwner();
12009 if (projectile != null)
12010 {
12011 array = projectile.localNPCImmunity;
12012 }
12013 }
12014 bool flag23 = true;
12015 Vector2 vector3 = default(Vector2);
12016 for (int i = 0; i < 200 && flag23; i++)
12017 {
12018 if (!Main.npc[i].active)
12019 {
12020 continue;
12021 }
12023 if (flag12 && !Main.player[owner].CanHitNPCWithMeleeHit(i))
12024 {
12025 flag24 = false;
12026 }
12027 if (!((!Main.npc[i].dontTakeDamage || NPCID.Sets.ZappingJellyfish[Main.npc[i].type]) && flag24) || (Main.npc[i].aiStyle == 112 && Main.npc[i].ai[2] > 1f))
12028 {
12029 continue;
12030 }
12031 bool canHitFlag = false;
12032 bool? flag29 = CombinedHooks.CanHitNPCWithProj(this, Main.npc[i]);
12033 if (flag29.HasValue)
12034 {
12035 if (!flag29.GetValueOrDefault())
12036 {
12037 continue;
12038 }
12039 canHitFlag = true;
12040 }
12041 NPC obj = Main.npc[i];
12042 obj.position += Main.npc[i].netOffset;
12043 bool flag25 = !Main.npc[i].friendly;
12044 flag25 |= type == 318;
12045 flag25 |= Main.npc[i].type == 22 && owner < 255 && Main.player[owner].killGuide;
12046 flag25 |= Main.npc[i].type == 54 && owner < 255 && Main.player[owner].killClothier;
12047 if (owner < 255 && !Main.player[owner].CanNPCBeHitByPlayerOrPlayerProjectile(Main.npc[i], this))
12048 {
12049 flag25 = false;
12050 }
12051 bool flag26 = Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles;
12052 if (canHitFlag || (friendly && (flag25 || NPCID.Sets.ZappingJellyfish[Main.npc[i].type])) || (hostile && flag26))
12053 {
12055 if (canHitFlag)
12056 {
12057 flag27 = true;
12058 }
12059 if (owner < 0 || Main.npc[i].immune[owner] == 0 || flag27)
12060 {
12061 bool flag28 = false;
12062 if (type == 11 && (Main.npc[i].type == 47 || Main.npc[i].type == 57))
12063 {
12064 flag28 = true;
12065 }
12066 else if (type == 31 && Main.npc[i].type == 69)
12067 {
12068 flag28 = true;
12069 }
12070 else if (Main.npc[i].trapImmune && trap)
12071 {
12072 flag28 = true;
12073 }
12074 else if (Main.npc[i].immortal && npcProj)
12075 {
12076 flag28 = true;
12077 }
12078 if (canHitFlag)
12079 {
12080 flag28 = false;
12081 }
12082 if (!flag28 && (Main.npc[i].noTileCollide || !ownerHitCheck || CanHitWithMeleeWeapon(Main.npc[i])))
12083 {
12084 bool flag2 = false;
12085 if (Main.npc[i].type == 414)
12086 {
12087 Rectangle rect = Main.npc[i].getRect();
12088 int num11 = 8;
12089 rect.X -= num11;
12090 rect.Y -= num11;
12091 rect.Width += num11 * 2;
12092 rect.Height += num11 * 2;
12094 }
12095 else
12096 {
12097 flag2 = Colliding(rectangle, Main.npc[i].getRect());
12098 }
12099 if (flag2)
12100 {
12101 NPC nPC = Main.npc[i];
12102 if (NPCID.Sets.ZappingJellyfish[nPC.type])
12103 {
12104 if ((nPC.dontTakeDamage || !Main.player[owner].CanNPCBeHitByPlayerOrPlayerProjectile(nPC, this)) && (aiStyle == 19 || aiStyle == 161 || aiStyle == 75 || aiStyle == 140 || ProjectileID.Sets.IsAWhip[type] || ProjectileID.Sets.AllowsContactDamageFromJellyfish[type]))
12105 {
12106 Main.player[owner].TakeDamageFromJellyfish(i);
12107 }
12108 if (nPC.dontTakeDamage || !flag25)
12109 {
12110 continue;
12111 }
12112 }
12113 if (type == 876)
12114 {
12115 Vector2 vector = position;
12116 if (Main.rand.Next(20) == 0)
12117 {
12118 tileCollide = false;
12119 position.X += Main.rand.Next(-256, 257);
12120 }
12121 if (Main.rand.Next(20) == 0)
12122 {
12123 tileCollide = false;
12124 position.Y += Main.rand.Next(-256, 257);
12125 }
12126 if (Main.rand.Next(2) == 0)
12127 {
12128 tileCollide = false;
12129 }
12130 if (Main.rand.Next(3) != 0)
12131 {
12132 vector = position;
12133 position -= velocity * (float)Main.rand.Next(0, 40);
12134 if (tileCollide && Collision.SolidTiles(position, width, height))
12135 {
12136 position = vector;
12137 position -= velocity * (float)Main.rand.Next(0, 40);
12138 if (tileCollide && Collision.SolidTiles(position, width, height))
12139 {
12140 position = vector;
12141 }
12142 }
12143 }
12144 velocity *= 0.6f;
12145 if (Main.rand.Next(7) == 0)
12146 {
12147 velocity.X += (float)Main.rand.Next(30, 31) * 0.01f;
12148 }
12149 if (Main.rand.Next(7) == 0)
12150 {
12151 velocity.Y += (float)Main.rand.Next(30, 31) * 0.01f;
12152 }
12153 damage = (int)((double)damage * 0.9);
12154 knockBack *= 0.9f;
12155 if (Main.rand.Next(20) == 0)
12156 {
12157 knockBack *= 10f;
12158 }
12159 if (Main.rand.Next(50) == 0)
12160 {
12161 damage *= 10;
12162 }
12163 if (Main.rand.Next(7) == 0)
12164 {
12165 vector = position;
12166 position.X += Main.rand.Next(-64, 65);
12167 if (tileCollide && Collision.SolidTiles(position, width, height))
12168 {
12169 position = vector;
12170 }
12171 }
12172 if (Main.rand.Next(7) == 0)
12173 {
12174 vector = position;
12175 position.Y += Main.rand.Next(-64, 65);
12176 if (tileCollide && Collision.SolidTiles(position, width, height))
12177 {
12178 position = vector;
12179 }
12180 }
12181 if (Main.rand.Next(14) == 0)
12182 {
12183 velocity.X *= -1f;
12184 }
12185 if (Main.rand.Next(14) == 0)
12186 {
12187 velocity.Y *= -1f;
12188 }
12189 if (Main.rand.Next(10) == 0)
12190 {
12191 velocity *= (float)Main.rand.Next(1, 201) * 0.0005f;
12192 }
12193 if (tileCollide)
12194 {
12195 ai[1] = 0f;
12196 }
12197 else
12198 {
12199 ai[1] = 1f;
12200 }
12201 netUpdate = true;
12202 }
12203 bool flag3 = nPC.reflectsProjectiles;
12204 if (Main.getGoodWorld && NPCID.Sets.ReflectStarShotsInForTheWorthy[Main.npc[i].type] && (type == 955 || type == 728))
12205 {
12206 flag3 = true;
12207 }
12208 if (flag3 && CanBeReflected() && nPC.CanReflectProjectile(this))
12209 {
12210 nPC.ReflectProjectile(this);
12211 NPC obj2 = Main.npc[i];
12212 obj2.position -= Main.npc[i].netOffset;
12213 return;
12214 }
12215 if (type == 604)
12216 {
12217 Main.player[owner].Counterweight(nPC.Center, damage, knockBack);
12218 }
12219 NPC.HitModifiers modifiers = nPC.GetIncomingStrikeModifiers(DamageType, direction);
12220 modifiers.ArmorPenetration += (float)ArmorPenetration;
12222 float num21 = knockBack;
12223 bool flag4 = false;
12224 int num32 = (int)Main.player[owner].armorPenetration;
12225 float armorPenetrationPercent = 0f;
12226 bool flag5 = false;
12227 switch (type)
12228 {
12229 case 442:
12230 flag5 = true;
12231 break;
12232 case 410:
12233 if (Main.remixWorld)
12234 {
12235 num32 += 20;
12236 }
12237 break;
12238 case 864:
12239 num32 += 25;
12240 break;
12241 case 916:
12242 num32 += 50;
12243 break;
12244 case 917:
12245 num32 += 30;
12246 break;
12247 case 595:
12248 num32 += 20;
12249 break;
12250 case 493:
12251 case 494:
12252 num32 += 10;
12253 break;
12254 case 150:
12255 case 151:
12256 case 152:
12257 num32 += 10;
12258 break;
12259 case 189:
12260 num32 += 10;
12261 if (flag && Main.player[owner].strongBees)
12262 {
12263 modifiers.ArmorPenetration += 5f;
12264 }
12265 break;
12266 case 723:
12267 case 724:
12268 case 725:
12269 case 726:
12270 num32 += 25;
12271 break;
12272 case 532:
12273 num32 += 25;
12274 break;
12275 case 964:
12276 num32 += 20;
12277 break;
12278 case 969:
12279 num32 += 10;
12280 break;
12281 case 85:
12282 num32 += 15;
12283 break;
12284 case 877:
12285 case 878:
12286 case 879:
12287 num21 *= ((Vector2)(ref Main.player[owner].velocity)).Length() / 7f;
12288 break;
12289 case 963:
12290 num21 *= 0.25f;
12291 break;
12292 case 976:
12293 num32 += 20;
12294 break;
12295 case 974:
12296 num32 += 5;
12297 break;
12298 case 977:
12299 num32 += 5;
12300 break;
12301 }
12302 if (flag5)
12303 {
12304 Kill();
12305 return;
12306 }
12307 modifiers.SourceDamage *= num;
12308 float num43 = 1000f;
12309 int num46 = 0;
12311 {
12312 float value = (scale - 1f) * 100f;
12313 value = Utils.Clamp(value, 0f, 50f);
12314 num43 = (int)(num43 * (1f + value * 0.23f));
12315 }
12317 {
12318 int num47 = Math.Max(0, Main.player[owner].ownedProjectileCounts[831] - 1);
12319 num43 = (int)(num43 * (1f + (float)num47 * 0.4f));
12320 }
12321 if (type == 818)
12322 {
12323 int num48 = Math.Max(0, Main.player[owner].ownedProjectileCounts[831] - 1);
12324 num43 = (int)(num43 * (1.5f + (float)num48 * 0.4f));
12325 }
12326 if (type == 963)
12327 {
12328 int num49 = Math.Max(0, Main.player[owner].ownedProjectileCounts[970] - 1);
12329 int num2 = 3 + num49 / 2;
12331 {
12332 return;
12333 }
12334 float num3 = 0.55f;
12335 if (Main.hardMode)
12336 {
12337 num3 = 1.3f;
12338 }
12339 num43 = (int)(num43 * (1f + (float)num49 * num3));
12340 }
12341 if (flag && type == 189 && Main.player[owner].strongBees)
12342 {
12343 modifiers.SourceDamage.Base += 5f;
12344 }
12345 if (flag)
12346 {
12347 if (DamageType.UseStandardCritCalcs && Main.rand.Next(100) < CritChance)
12348 {
12349 flag4 = true;
12350 }
12351 if ((uint)(type - 688) <= 2u)
12352 {
12353 if (Main.player[owner].setMonkT3)
12354 {
12355 if (Main.rand.Next(4) == 0)
12356 {
12357 flag4 = true;
12358 }
12359 }
12360 else if (Main.player[owner].setMonkT2 && Main.rand.Next(6) == 0)
12361 {
12362 flag4 = true;
12363 }
12364 }
12365 }
12366 modifiers.SourceDamage *= num43 / 1000f;
12367 num43 = modifiers.SourceDamage.ApplyTo(damage);
12370 {
12371 bool flag6 = false;
12372 bool flag7 = false;
12373 bool flag8 = false;
12374 bool flag9 = false;
12375 bool flag10 = false;
12376 bool flag11 = false;
12377 bool flag13 = false;
12378 bool flag14 = false;
12379 bool flag15 = false;
12380 for (int j = 0; j < NPC.maxBuffs; j++)
12381 {
12382 if (nPC.buffTime[j] >= 1)
12383 {
12384 switch (nPC.buffType[j])
12385 {
12386 case 307:
12387 flag6 = true;
12388 break;
12389 case 309:
12390 flag7 = true;
12391 break;
12392 case 313:
12393 flag8 = true;
12394 break;
12395 case 310:
12396 flag9 = true;
12397 break;
12398 case 315:
12399 flag10 = true;
12400 break;
12401 case 326:
12402 flag11 = true;
12403 break;
12404 case 319:
12405 flag14 = true;
12406 break;
12407 case 316:
12408 flag15 = true;
12409 break;
12410 case 340:
12411 flag13 = true;
12412 break;
12413 }
12414 }
12415 }
12416 if (flag6)
12417 {
12418 num46 += 4;
12419 }
12420 if (flag10)
12421 {
12422 num46 += 6;
12423 }
12424 if (flag11)
12425 {
12426 num46 += 7;
12427 }
12428 if (flag13)
12429 {
12430 num46 += 6;
12431 }
12432 if (flag7)
12433 {
12434 num46 += 9;
12435 }
12436 if (flag14)
12437 {
12438 num46 += 8;
12439 if (Main.rand.Next(100) < 12)
12440 {
12441 flag4 = true;
12442 }
12443 }
12444 if (flag9)
12445 {
12446 int num5 = 10;
12447 num46 += num5;
12448 int num6 = NewProjectile(GetProjectileSource_FromThis(), nPC.Center, Vector2.Zero, 916, (int)((float)num5 * num4), 0f, owner);
12449 Main.projectile[num6].localNPCImmunity[i] = -1;
12451 }
12452 if (flag15)
12453 {
12454 int num7 = 20;
12455 num46 += num7;
12456 if (Main.rand.Next(10) == 0)
12457 {
12458 flag4 = true;
12459 }
12461 {
12462 PositionInWorld = base.Center
12463 });
12464 }
12465 if (flag8)
12466 {
12467 nPC.RequestBuffRemoval(313);
12468 int num8 = (int)(num43 * 1.75f);
12469 int num9 = NewProjectile(GetProjectileSource_FromThis(), nPC.Center, Vector2.Zero, 918, num8, 0f, owner);
12470 Main.projectile[num9].localNPCImmunity[i] = -1;
12471 modifiers.ScalingBonusDamage += 1.75f * num4;
12472 }
12473 }
12474 num46 = (int)((float)num46 * num4);
12475 modifiers.FlatBonusDamage += (float)num46;
12476 if (flag)
12477 {
12478 _ = Main.player[owner].luck;
12479 }
12480 float num10 = 1000f;
12481 if (type == 1002)
12482 {
12483 num10 /= 2f;
12484 }
12486 {
12487 num10 /= 2f;
12488 }
12489 if (type == 482 && (nPC.aiStyle == 6 || nPC.aiStyle == 37))
12490 {
12491 num10 /= 2f;
12492 }
12493 if (flag)
12494 {
12495 Vector2 positionInWorld = Main.rand.NextVector2FromRectangle(nPC.Hitbox);
12497 particleOrchestraSettings.PositionInWorld = positionInWorld;
12499 switch (type)
12500 {
12501 case 972:
12503 break;
12504 case 973:
12506 break;
12507 case 984:
12508 case 985:
12509 settings.MovementVector = velocity;
12511 break;
12512 case 982:
12514 break;
12515 case 983:
12517 break;
12518 }
12519 }
12520 if (type == 604)
12521 {
12522 friendly = false;
12523 ai[1] = 1000f;
12524 }
12525 if ((type == 400 || type == 401 || type == 402) && nPC.type >= 13 && nPC.type <= 15)
12526 {
12527 num10 = (int)((double)num10 * 0.65);
12528 if (penetrate > 1)
12529 {
12530 penetrate--;
12531 }
12532 }
12533 if (type == 710 && !WorldUtils.Find(base.Center.ToTileCoordinates(), Searches.Chain(new Searches.Down(12), _cachedConditions_notNull, _cachedConditions_solid), out var _))
12534 {
12535 num10 = (int)(num10 * 1.5f);
12536 }
12537 if (type == 504 || type == 954 || type == 979)
12538 {
12539 float num12 = (60f - ai[0]) / 2f;
12540 ai[0] += num12;
12541 }
12542 if (aiStyle == 3 && type != 301 && type != 866 && type != 902)
12543 {
12544 if (ai[0] == 0f)
12545 {
12546 if (type == 106)
12547 {
12548 LightDisc_Bounce(base.Center + velocity.SafeNormalize(Vector2.UnitX) * 8f, (-velocity).SafeNormalize(Vector2.UnitX));
12549 }
12550 velocity.X = 0f - velocity.X;
12551 velocity.Y = 0f - velocity.Y;
12552 netUpdate = true;
12553 }
12554 ai[0] = 1f;
12555 }
12556 else if (type == 951)
12557 {
12558 Vector2 vector2 = (nPC.Center - base.Center).SafeNormalize(Vector2.Zero);
12559 vector2.X += (-0.5f + Main.rand.NextFloat()) * 13f;
12560 vector2.Y = -5f;
12561 velocity.X = vector2.X;
12562 velocity.Y = vector2.Y;
12563 netUpdate = true;
12564 }
12565 else if (type == 582 || type == 902)
12566 {
12567 if (ai[0] != 0f)
12568 {
12569 direction *= -1;
12570 }
12571 }
12572 else if (type == 612 || type == 953 || type == 978)
12573 {
12574 direction = Main.player[owner].direction;
12575 }
12576 else if (type == 624)
12577 {
12578 float num13 = 1f;
12579 if (nPC.knockBackResist > 0f)
12580 {
12581 num13 = 1f / nPC.knockBackResist;
12582 }
12583 knockBack = 4f * num13;
12584 num21 = knockBack;
12585 if (nPC.Center.X < base.Center.X)
12586 {
12587 direction = 1;
12588 }
12589 else
12590 {
12591 direction = -1;
12592 }
12593 }
12594 else if (aiStyle == 16)
12595 {
12596 if (timeLeft > 3)
12597 {
12598 timeLeft = 3;
12599 }
12600 if (nPC.position.X + (float)(nPC.width / 2) < position.X + (float)(width / 2))
12601 {
12602 direction = -1;
12603 }
12604 else
12605 {
12606 direction = 1;
12607 }
12608 }
12609 else if (aiStyle == 68)
12610 {
12611 if (timeLeft > 3)
12612 {
12613 timeLeft = 3;
12614 }
12615 if (nPC.position.X + (float)(nPC.width / 2) < position.X + (float)(width / 2))
12616 {
12617 direction = -1;
12618 }
12619 else
12620 {
12621 direction = 1;
12622 }
12623 }
12624 else if (aiStyle == 50)
12625 {
12626 if (nPC.position.X + (float)(nPC.width / 2) < position.X + (float)(width / 2))
12627 {
12628 direction = -1;
12629 }
12630 else
12631 {
12632 direction = 1;
12633 }
12634 }
12635 else if (type == 908)
12636 {
12637 if (nPC.position.X + (float)(nPC.width / 2) < position.X + (float)(width / 2))
12638 {
12639 direction = -1;
12640 }
12641 else
12642 {
12643 direction = 1;
12644 }
12645 }
12646 if (type == 509)
12647 {
12648 int num14 = Main.rand.Next(2, 6);
12649 for (int k = 0; k < num14; k++)
12650 {
12651 ((Vector2)(ref vector3))._002Ector((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
12652 vector3 += velocity * 3f;
12653 ((Vector2)(ref vector3)).Normalize();
12654 vector3 *= (float)Main.rand.Next(35, 81) * 0.1f;
12655 int num15 = (int)((double)damage * 0.5);
12656 NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, vector3.X, vector3.Y, 504, num15, knockBack * 0.2f, owner);
12657 }
12658 }
12659 if ((type == 476 || type == 950) && !npcProj)
12660 {
12661 float x = Main.player[owner].Center.X;
12662 if (nPC.Center.X < x)
12663 {
12664 direction = -1;
12665 }
12666 else
12667 {
12668 direction = 1;
12669 }
12670 }
12671 if (type == 598 || type == 636 || type == 614 || type == 971 || type == 975)
12672 {
12673 ai[0] = 1f;
12674 ai[1] = i;
12675 velocity = (nPC.Center - base.Center) * 0.75f;
12676 netUpdate = true;
12677 }
12678 if (type >= 511 && type <= 513)
12679 {
12680 ai[1] += 1f;
12681 netUpdate = true;
12682 }
12683 if (type == 659)
12684 {
12685 timeLeft = 0;
12686 }
12687 if (type == 524)
12688 {
12689 netUpdate = true;
12690 ai[0] += 50f;
12691 }
12692 if ((type == 688 || type == 689 || type == 690) && nPC.type != 68 && nPC.defense < 999)
12693 {
12695 }
12696 if (aiStyle == 39)
12697 {
12698 if (ai[1] == 0f)
12699 {
12700 ai[1] = i + 1;
12701 netUpdate = true;
12702 }
12703 if (Main.player[owner].position.X + (float)(Main.player[owner].width / 2) < position.X + (float)(width / 2))
12704 {
12705 direction = 1;
12706 }
12707 else
12708 {
12709 direction = -1;
12710 }
12711 }
12712 if (type == 41 && timeLeft > 1)
12713 {
12714 timeLeft = 1;
12715 }
12716 if (aiStyle == 99)
12717 {
12718 Main.player[owner].Counterweight(nPC.Center, damage, knockBack);
12719 if (nPC.Center.X < Main.player[owner].Center.X)
12720 {
12721 direction = -1;
12722 }
12723 else
12724 {
12725 direction = 1;
12726 }
12727 if (ai[0] >= 0f)
12728 {
12729 Vector2 vector4 = base.Center - nPC.Center;
12730 ((Vector2)(ref vector4)).Normalize();
12731 float num16 = 16f;
12732 velocity *= -0.5f;
12733 velocity += vector4 * num16;
12734 netUpdate = true;
12735 localAI[0] += 20f;
12736 if (!Collision.CanHit(position, width, height, Main.player[owner].position, Main.player[owner].width, Main.player[owner].height))
12737 {
12738 localAI[0] += 40f;
12739 num10 = (int)((double)num10 * 0.75);
12740 }
12741 }
12742 }
12743 if (type == 856 && !Collision.CanHit(position, width, height, Main.player[owner].position, Main.player[owner].width, Main.player[owner].height))
12744 {
12745 num10 = (int)((double)num10 * 0.75);
12746 }
12747 if (aiStyle == 93)
12748 {
12749 if (ai[0] == 0f)
12750 {
12751 ai[1] = 0f;
12752 int num17 = -i - 1;
12753 ai[0] = num17;
12754 velocity = nPC.Center - base.Center;
12755 }
12756 num10 = ((ai[0] != 2f) ? ((int)((double)num10 * 0.15)) : ((int)((double)num10 * 1.35)));
12757 }
12758 if (flag)
12759 {
12760 int num18 = Item.NPCtoBanner(nPC.BannerID());
12761 if (num18 >= 0)
12762 {
12763 Main.player[Main.myPlayer].lastCreatureHit = num18;
12764 }
12765 }
12766 if (Main.netMode != 2 && flag)
12767 {
12768 Main.player[owner].ApplyBannerOffenseBuff(nPC, ref modifiers);
12769 }
12770 if (Main.expertMode)
12771 {
12772 if ((type == 30 || type == 397 || type == 517 || type == 28 || type == 37 || type == 516 || type == 29 || type == 470 || type == 637 || type == 108 || type == 281 || type == 588 || type == 519 || type == 773 || type == 183 || type == 181 || type == 566 || type == 1002) && nPC.type >= 13 && nPC.type <= 15)
12773 {
12774 num10 /= 5f;
12775 }
12776 if (type == 280 && ((nPC.type >= 134 && nPC.type <= 136) || nPC.type == 139))
12777 {
12778 num10 = (int)((double)num10 * 0.75);
12779 }
12780 }
12781 if (Main.netMode != 2 && nPC.type == 439 && type >= 0 && ProjectileID.Sets.CultistIsResistantTo[type])
12782 {
12783 num10 = (int)(num10 * 0.75f);
12784 }
12785 if (type == 497 && penetrate != 1)
12786 {
12787 ai[0] = 25f;
12788 float num19 = ((Vector2)(ref velocity)).Length();
12789 Vector2 vector5 = nPC.Center - base.Center;
12790 ((Vector2)(ref vector5)).Normalize();
12791 vector5 *= num19;
12792 velocity = -vector5 * 0.9f;
12793 netUpdate = true;
12794 }
12795 if (type == 323 && (nPC.type == 159 || nPC.type == 158))
12796 {
12797 num10 *= 10f;
12798 }
12799 if (type == 981 && nPC.type == 104)
12800 {
12801 num10 *= 3f;
12802 }
12803 if (type == 261 && ((Vector2)(ref velocity)).Length() < 3.5f)
12804 {
12805 modifiers.SourceDamage /= 2f;
12806 num21 /= 2f;
12807 }
12808 if (flag && melee && Main.player[owner].parryDamageBuff && !ProjectileID.Sets.DontApplyParryDamageBuff[type])
12809 {
12810 modifiers.ScalingBonusDamage += 4f;
12811 Main.player[owner].parryDamageBuff = false;
12812 Main.player[owner].ClearBuff(198);
12813 }
12814 int? num26 = null;
12815 switch (type)
12816 {
12817 case 697:
12818 case 699:
12819 case 707:
12820 case 708:
12821 case 759:
12822 num26 = ((Main.player[owner].Center.X < nPC.Center.X) ? 1 : (-1));
12823 break;
12824 }
12825 if (aiStyle == 188 || aiStyle == 189 || aiStyle == 190 || aiStyle == 191)
12826 {
12827 num26 = ((Main.player[owner].Center.X < nPC.Center.X) ? 1 : (-1));
12828 }
12829 if (aiStyle == 15)
12830 {
12831 num26 = ((Main.player[owner].Center.X < nPC.Center.X) ? 1 : (-1));
12832 if (ai[0] == 0f)
12833 {
12834 num21 *= 0.35f;
12835 }
12836 if (ai[0] == 6f)
12837 {
12838 num21 *= 0.5f;
12839 }
12840 }
12841 modifiers.ScalingArmorPenetration += armorPenetrationPercent;
12842 modifiers.Knockback *= num21 / knockBack;
12843 modifiers.TargetDamageMultiplier *= num10 / 1000f;
12844 if (num26.HasValue)
12845 {
12846 modifiers.HitDirectionOverride = num26;
12847 }
12848 NPC.HitInfo strike = modifiers.ToHitInfo(damage, flag4, num21, damageVariation: true, flag ? Main.player[owner].luck : 0f);
12849 num26 = strike.HitDirection;
12850 if (type == 294)
12851 {
12852 damage = (int)((double)damage * 0.9);
12853 }
12854 if (type == 265)
12855 {
12856 damage = (int)((double)damage * 0.75);
12857 }
12858 if (type == 355)
12859 {
12860 damage = (int)((double)damage * 0.75);
12861 }
12862 if (type == 114)
12863 {
12864 damage = (int)((double)damage * 0.9);
12865 }
12866 if (type == 76 || type == 78 || type == 77)
12867 {
12868 damage = (int)((double)damage * 0.95);
12869 }
12870 if (type == 85)
12871 {
12872 damage = (int)((double)damage * 0.85);
12873 }
12874 if (type == 866)
12875 {
12876 damage = (int)((double)damage * 0.8);
12877 }
12878 if (type == 841)
12879 {
12880 damage = (int)((double)damage * 0.5);
12881 }
12882 if (type == 914)
12883 {
12884 damage = (int)((double)damage * 0.6);
12885 }
12886 if (type == 952)
12887 {
12888 damage = (int)((double)damage * 0.9);
12889 }
12890 if (type == 913)
12891 {
12892 damage = (int)((double)damage * 0.66);
12893 }
12894 if (type == 912)
12895 {
12896 damage = (int)((double)damage * 0.7);
12897 }
12898 if (type == 847)
12899 {
12900 damage = (int)((double)damage * 0.8);
12901 }
12902 if (type == 848)
12903 {
12904 damage = (int)((double)damage * 0.95);
12905 }
12906 if (type == 849)
12907 {
12908 damage = (int)((double)damage * 0.9);
12909 }
12910 if (type == 915)
12911 {
12912 damage = (int)((double)damage * 0.9);
12913 }
12914 if (type == 931)
12915 {
12916 damage = (int)((double)damage * 0.8);
12917 }
12918 if (type == 242)
12919 {
12920 damage = (int)((double)damage * 0.85);
12921 }
12922 if (type == 323)
12923 {
12924 damage = (int)((double)damage * 0.9);
12925 }
12926 if (type == 5)
12927 {
12928 damage = (int)((double)damage * 0.9);
12929 }
12930 if (type == 4)
12931 {
12932 damage = (int)((double)damage * 0.95);
12933 }
12934 if (type == 309)
12935 {
12936 damage = (int)((double)damage * 0.85);
12937 }
12938 if (type == 132)
12939 {
12940 damage = (int)((double)damage * 0.85);
12941 }
12942 if (type == 985)
12943 {
12944 damage = (int)((double)damage * 0.75);
12945 }
12946 if (type == 950)
12947 {
12948 damage = (int)((double)damage * 0.98);
12949 }
12950 if (type == 964)
12951 {
12952 damage = (int)((double)damage * 0.85);
12953 }
12954 if (type == 477 && penetrate > 1)
12955 {
12956 int[] array2 = new int[10];
12957 int num20 = 0;
12958 int num22 = 700;
12959 int num23 = 20;
12960 for (int l = 0; l < 200; l++)
12961 {
12962 if (l == i || !Main.npc[l].CanBeChasedBy(this))
12963 {
12964 continue;
12965 }
12966 Vector2 val = base.Center - Main.npc[l].Center;
12967 float num24 = ((Vector2)(ref val)).Length();
12968 if (num24 > (float)num23 && num24 < (float)num22 && Collision.CanHitLine(base.Center, 1, 1, Main.npc[l].Center, 1, 1))
12969 {
12970 array2[num20] = l;
12971 num20++;
12972 if (num20 >= 9)
12973 {
12974 break;
12975 }
12976 }
12977 }
12978 if (num20 > 0)
12979 {
12980 num20 = Main.rand.Next(num20);
12981 Vector2 vector6 = Main.npc[array2[num20]].Center - base.Center;
12982 float num25 = ((Vector2)(ref velocity)).Length();
12983 ((Vector2)(ref vector6)).Normalize();
12985 netUpdate = true;
12986 }
12987 }
12988 StatusNPC(i);
12989 if (flag && nPC.life > 5)
12990 {
12992 }
12994 {
12995 nPC.UpdateNPC_BuffSetFlags(lowerBuffTime: false);
12996 }
12997 if (type == 317)
12998 {
12999 ai[1] = -1f;
13000 netUpdate = true;
13001 }
13003 int num27 = nPC.StrikeNPC(strike, fromNet: false, !flag);
13004 if (flag && attempt.DidNPCDie())
13005 {
13006 Main.player[owner].OnKillNPC(ref attempt, this);
13007 }
13008 if (flag && Main.player[owner].accDreamCatcher && !nPC.HideStrikeDamage)
13009 {
13010 Main.player[owner].addDPS(num27);
13011 }
13012 bool flag16 = !nPC.immortal;
13013 bool flag17 = num27 > 0 && nPC.lifeMax > 5 && friendly && !hostile && aiStyle != 59;
13014 bool flag18 = false;
13015 if (flag16 && active && timeLeft > 10 && nPC.active && nPC.type == 676 && CanBeReflected())
13016 {
13017 nPC.ReflectProjectile(this);
13018 penetrate++;
13019 }
13020 if (flag && flag16)
13021 {
13022 if (type == 997 && (!nPC.immortal || flag18) && !nPC.SpawnedFromStatue && !NPCID.Sets.CountsAsCritter[nPC.type])
13023 {
13024 Main.player[owner].HorsemansBlade_SpawnPumpkin(i, (int)((float)damage * 1f), knockBack);
13025 }
13026 if (type == 756 && penetrate == 1)
13027 {
13028 damage = 0;
13029 penetrate = -1;
13030 flag23 = false;
13031 }
13032 if ((flag18 || nPC.value > 0f) && Main.player[owner].hasLuckyCoin && Main.rand.Next(5) == 0)
13033 {
13034 int num28 = 71;
13035 if (Main.rand.Next(10) == 0)
13036 {
13037 num28 = 72;
13038 }
13039 if (Main.rand.Next(100) == 0)
13040 {
13041 num28 = 73;
13042 }
13043 int num29 = Item.NewItem(GetItemSource_OnHit(nPC, 2), (int)nPC.position.X, (int)nPC.position.Y, nPC.width, nPC.height, num28);
13044 Main.item[num29].stack = Main.rand.Next(1, 11);
13045 Main.item[num29].velocity.Y = (float)Main.rand.Next(-20, 1) * 0.2f;
13046 Main.item[num29].velocity.X = (float)Main.rand.Next(10, 31) * 0.2f * (float)num26.Value;
13047 Main.item[num29].timeLeftInWhichTheItemCannotBeTakenByEnemies = 60;
13048 if (Main.netMode == 1)
13049 {
13050 NetMessage.SendData(148, -1, -1, null, num29);
13051 }
13052 }
13053 if (type == 999 && owner == Main.myPlayer && Main.rand.Next(3) == 0)
13054 {
13055 Player player = Main.player[owner];
13056 Vector2 vector7 = (base.Center - nPC.Center).SafeNormalize(Vector2.Zero) * 0.25f;
13057 int dmg = damage / 2;
13058 float kB = knockBack;
13059 int num30 = NewProjectile(GetProjectileSource_FromThis(), base.Center.X, base.Center.Y, vector7.X, vector7.Y, player.beeType(), player.beeDamage(dmg), player.beeKB(kB), owner);
13060 Main.projectile[num30].melee = true;
13061 }
13062 if (flag17)
13063 {
13064 if (type == 304 && !Main.player[owner].moonLeech)
13065 {
13066 vampireHeal(num27, new Vector2(nPC.Center.X, nPC.Center.Y), nPC);
13067 }
13068 if (nPC.canGhostHeal || flag18)
13069 {
13070 if (Main.player[owner].ghostHeal && !Main.player[owner].moonLeech)
13071 {
13072 ghostHeal(num27, new Vector2(nPC.Center.X, nPC.Center.Y), nPC);
13073 }
13074 if (Main.player[owner].ghostHurt)
13075 {
13076 ghostHurt(num27, new Vector2(nPC.Center.X, nPC.Center.Y), nPC);
13077 }
13078 if (magic && Main.player[owner].setNebula && Main.player[owner].nebulaCD == 0 && Main.rand.Next(3) == 0)
13079 {
13080 Main.player[owner].nebulaCD = 30;
13081 int num31 = Utils.SelectRandom<int>(Main.rand, 3453, 3454, 3455);
13082 int num33 = Item.NewItem(GetItemSource_OnHit(nPC, 1), (int)nPC.position.X, (int)nPC.position.Y, nPC.width, nPC.height, num31);
13083 Main.item[num33].velocity.Y = (float)Main.rand.Next(-20, 1) * 0.2f;
13084 Main.item[num33].velocity.X = (float)Main.rand.Next(10, 31) * 0.2f * (float)num26.Value;
13085 if (Main.netMode == 1)
13086 {
13087 NetMessage.SendData(21, -1, -1, null, num33);
13088 }
13089 }
13090 }
13091 if (melee && Main.player[owner].beetleOffense && (!nPC.immortal || flag18))
13092 {
13093 if (Main.player[owner].beetleOrbs == 0)
13094 {
13095 Main.player[owner].beetleCounter += num27 * 3;
13096 }
13097 else if (Main.player[owner].beetleOrbs == 1)
13098 {
13099 Main.player[owner].beetleCounter += num27 * 2;
13100 }
13101 else
13102 {
13103 Main.player[owner].beetleCounter += num27;
13104 }
13105 Main.player[owner].beetleCountdown = 0;
13106 }
13107 if (arrow && type != 631 && Main.player[owner].phantasmTime > 0)
13108 {
13109 Vector2 source = Main.player[owner].position + Main.player[owner].Size * Utils.RandomVector2(Main.rand, 0f, 1f);
13110 Vector2 vector8 = nPC.DirectionFrom(source) * 6f;
13111 int num34 = (int)((float)damage * 0.3f);
13112 NewProjectile(GetProjectileSource_FromThis(), source.X, source.Y, vector8.X, vector8.Y, 631, num34, 0f, owner, i);
13113 NewProjectile(GetProjectileSource_FromThis(), source.X, source.Y, vector8.X, vector8.Y, 631, num34, 0f, owner, i, 15f);
13114 NewProjectile(GetProjectileSource_FromThis(), source.X, source.Y, vector8.X, vector8.Y, 631, num34, 0f, owner, i, 30f);
13115 }
13116 Player player2 = Main.player[owner];
13117 switch (type)
13118 {
13119 case 914:
13120 player2.AddBuff(314, 180);
13121 break;
13122 case 847:
13123 player2.AddBuff(308, 180);
13124 break;
13125 case 849:
13126 player2.AddBuff(311, 180);
13127 break;
13128 case 912:
13129 {
13130 int num35 = 15;
13131 if (!player2.coolWhipBuff)
13132 {
13133 NewProjectile(GetProjectileSource_FromThis(), nPC.Center, Vector2.Zero, 917, num35, 0f, owner);
13134 player2.coolWhipBuff = true;
13135 }
13136 player2.AddBuff(312, 180);
13137 break;
13138 }
13139 }
13140 }
13141 }
13142 if (flag && (melee || ProjectileID.Sets.IsAWhip[type]) && Main.player[owner].meleeEnchant == 7)
13143 {
13144 NewProjectile(GetProjectileSource_FromThis(), nPC.Center.X, nPC.Center.Y, nPC.velocity.X, nPC.velocity.Y, 289, 0, 0f, owner);
13145 }
13146 if (flag && type == 913)
13147 {
13148 localAI[0] = 1f;
13149 }
13150 if (Main.netMode != 0)
13151 {
13152 NetMessage.SendStrikeNPC(nPC, in strike);
13153 }
13154 if (type == 916)
13155 {
13157 }
13158 if (type >= 390 && type <= 392)
13159 {
13160 localAI[1] = 20f;
13161 }
13163 {
13165 {
13166 nPC.immune[owner] = 0;
13167 perIDStaticNPCImmunity[type][i] = Main.GameUpdateCount + (uint)idStaticNPCHitCooldown;
13168 }
13169 }
13170 else if (type == 434)
13171 {
13172 numUpdates = 0;
13173 }
13174 else if (type == 598 || type == 636 || type == 614)
13175 {
13176 Point[] bufferForScan = _javelinsMax6;
13177 if (type == 636)
13178 {
13180 }
13181 if (type == 614)
13182 {
13184 }
13186 }
13187 else if (type == 632)
13188 {
13189 nPC.immune[owner] = 5;
13190 }
13191 else if (type == 514)
13192 {
13193 nPC.immune[owner] = 1;
13194 }
13195 else if (type == 611)
13196 {
13197 if (localAI[1] <= 0f)
13198 {
13199 NewProjectile(GetProjectileSource_FromThis(), nPC.Center.X, nPC.Center.Y, 0f, 0f, 612, damage, 10f, owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
13200 }
13201 localAI[1] = 4f;
13202 }
13203 else if (type == 595 || type == 735)
13204 {
13205 nPC.immune[owner] = 5;
13206 }
13207 else if (type == 927)
13208 {
13209 nPC.immune[owner] = 4;
13210 }
13211 else if (type == 286)
13212 {
13213 nPC.immune[owner] = 5;
13214 }
13215 else if (type == 443)
13216 {
13217 nPC.immune[owner] = 8;
13218 }
13219 else if (type >= 424 && type <= 426)
13220 {
13221 nPC.immune[owner] = 5;
13222 }
13223 else if (type == 634 || type == 635)
13224 {
13225 nPC.immune[owner] = 5;
13226 }
13227 else if (type == 659)
13228 {
13229 nPC.immune[owner] = 5;
13230 }
13231 else if (type == 246)
13232 {
13233 nPC.immune[owner] = 7;
13234 }
13235 else if (type == 249)
13236 {
13237 nPC.immune[owner] = 7;
13238 }
13239 else if (type == 16)
13240 {
13241 nPC.immune[owner] = 8;
13242 }
13243 else if (type == 409)
13244 {
13245 nPC.immune[owner] = 6;
13246 }
13247 else if (type == 311)
13248 {
13249 nPC.immune[owner] = 7;
13250 }
13251 else if (type == 582 || type == 902)
13252 {
13253 nPC.immune[owner] = 7;
13254 if (ai[0] != 1f)
13255 {
13256 ai[0] = 1f;
13257 netUpdate = true;
13258 }
13259 }
13260 else
13261 {
13262 if (type == 451)
13263 {
13264 if (ai[0] == 0f)
13265 {
13266 ai[0] += penetrate;
13267 }
13268 else
13269 {
13270 ai[0] -= penetrate + 1;
13271 }
13272 ai[1] = 0f;
13273 netUpdate = true;
13274 NPC obj3 = Main.npc[i];
13275 obj3.position -= Main.npc[i].netOffset;
13276 break;
13277 }
13278 if (type == 864)
13279 {
13280 array[i] = 10;
13281 nPC.immune[owner] = 0;
13282 if (ai[0] > 0f)
13283 {
13284 ai[0] = -1f;
13285 ai[1] = 0f;
13286 netUpdate = true;
13287 }
13288 }
13289 else if (type == 661 || type == 856)
13290 {
13291 array[i] = 8;
13292 nPC.immune[owner] = 0;
13293 }
13294 else if (type == 866)
13295 {
13296 array[i] = -1;
13297 nPC.immune[owner] = 0;
13298 penetrate--;
13299 if (penetrate == 0)
13300 {
13301 penetrate = 1;
13302 damage = 0;
13303 ai[1] = -1f;
13304 netUpdate = true;
13305 NPC obj4 = Main.npc[i];
13306 obj4.position -= Main.npc[i].netOffset;
13307 break;
13308 }
13309 if (owner == Main.myPlayer)
13310 {
13312 float num37 = ai[1];
13313 ai[1] = num36;
13314 if (ai[1] != num37)
13315 {
13316 netUpdate = true;
13317 }
13318 if (num36 != -1)
13319 {
13320 velocity = ((Vector2)(ref velocity)).Length() * DirectionTo(Main.npc[num36].Center);
13321 }
13322 }
13323 }
13324 else if (usesLocalNPCImmunity && localNPCHitCooldown != -2)
13325 {
13326 nPC.immune[owner] = 0;
13327 array[i] = localNPCHitCooldown;
13328 }
13330 {
13331 nPC.immune[owner] = 10;
13332 }
13333 }
13334 if (type == 710)
13335 {
13336 BetsySharpnel(i);
13337 }
13339 if (penetrate > 0 && type != 317 && type != 866)
13340 {
13341 if (type == 357)
13342 {
13343 damage = (int)((double)damage * 0.8);
13344 }
13345 penetrate--;
13346 if (penetrate == 0)
13347 {
13348 NPC obj5 = Main.npc[i];
13349 obj5.position -= Main.npc[i].netOffset;
13351 {
13352 penetrate = -1;
13353 damage = 0;
13354 }
13355 flag23 = false;
13356 }
13357 }
13358 if (aiStyle == 7)
13359 {
13360 ai[0] = 1f;
13361 damage = 0;
13362 netUpdate = true;
13363 }
13364 else if (aiStyle == 13)
13365 {
13366 ai[0] = 1f;
13367 netUpdate = true;
13368 }
13369 else if (aiStyle == 69)
13370 {
13371 ai[0] = 1f;
13372 netUpdate = true;
13373 }
13374 else if (type == 607)
13375 {
13376 ai[0] = 1f;
13377 netUpdate = true;
13378 friendly = false;
13379 }
13380 else if (type == 638 || type == 639 || type == 640)
13381 {
13382 array[i] = -1;
13383 nPC.immune[owner] = 0;
13384 damage = (int)((double)damage * 0.96);
13385 }
13386 else if (type == 617)
13387 {
13388 array[i] = 8;
13389 nPC.immune[owner] = 0;
13390 }
13391 else if (type == 656)
13392 {
13393 array[i] = 8;
13394 nPC.immune[owner] = 0;
13395 localAI[0] += 1f;
13396 }
13397 else if (type == 618)
13398 {
13399 array[i] = 20;
13400 nPC.immune[owner] = 0;
13401 }
13402 else if (type == 642)
13403 {
13404 array[i] = 10;
13405 nPC.immune[owner] = 0;
13406 }
13407 else if (type == 857)
13408 {
13409 array[i] = 10;
13410 nPC.immune[owner] = 0;
13411 }
13412 else if (type == 611 || type == 612)
13413 {
13414 array[i] = 6;
13415 nPC.immune[owner] = 4;
13416 }
13417 else if (type == 645)
13418 {
13419 array[i] = -1;
13420 nPC.immune[owner] = 0;
13421 if (ai[1] != -1f)
13422 {
13423 ai[0] = 0f;
13424 ai[1] = -1f;
13425 netUpdate = true;
13426 }
13427 }
13428 numHits++;
13429 if (type == 697)
13430 {
13431 if (ai[0] >= 42f)
13432 {
13433 localAI[1] = 1f;
13434 }
13435 }
13436 else if (type == 699)
13437 {
13439 }
13440 else if (type == 706)
13441 {
13442 damage = (int)((float)damage * 0.95f);
13443 }
13444 else if (type == 728)
13445 {
13446 SummonSuperStarSlash(nPC.Center);
13447 }
13448 else if (type == 34)
13449 {
13450 if (ai[0] == -1f)
13451 {
13452 ai[1] = -1f;
13453 netUpdate = true;
13454 }
13455 }
13456 else if (type == 79)
13457 {
13458 if (ai[0] == -1f)
13459 {
13460 ai[1] = -1f;
13461 netUpdate = true;
13462 }
13464 {
13465 PositionInWorld = nPC.Center,
13466 MovementVector = velocity
13467 });
13468 }
13469 else if (type == 931)
13470 {
13472 if (num38 != -1)
13473 {
13474 ai[0] = num38;
13475 netUpdate = true;
13476 }
13477 }
13478 else if (aiStyle == 165)
13479 {
13480 if (nPC.active)
13481 {
13482 Main.player[owner].MinionAttackTargetNPC = i;
13483 }
13484 }
13485 else if (type == 623)
13486 {
13488 {
13489 PositionInWorld = Vector2.Lerp(base.Center, nPC.Hitbox.ClosestPointInRect(base.Center), 0.5f) + new Vector2(0f, Main.rand.NextFloatDirection() * 10f),
13490 MovementVector = new Vector2((float)direction, Main.rand.NextFloatDirection() * 0.5f) * (3f + 3f * Main.rand.NextFloat())
13491 });
13492 }
13493 if (flag12)
13494 {
13495 Main.player[owner].SetMeleeHitCooldown(i, Main.player[owner].itemAnimation);
13496 }
13497 }
13498 }
13499 }
13500 }
13501 NPC obj6 = Main.npc[i];
13502 obj6.position -= Main.npc[i].netOffset;
13503 }
13504 }
13505 if (flag22 && Main.player[Main.myPlayer].hostile)
13506 {
13507 for (int m = 0; m < 255; m++)
13508 {
13509 if (m == owner)
13510 {
13511 continue;
13512 }
13513 Player player3 = Main.player[m];
13514 if (!player3.active || player3.dead || player3.immune || !player3.hostile || playerImmune[m] > 0 || (Main.player[Main.myPlayer].team != 0 && Main.player[Main.myPlayer].team == player3.team))
13515 {
13516 continue;
13517 }
13518 bool flag19 = !ownerHitCheck;
13519 if (ownerHitCheck)
13520 {
13522 }
13524 {
13525 continue;
13526 }
13527 if (aiStyle == 3)
13528 {
13529 if (ai[0] == 0f)
13530 {
13531 velocity.X = 0f - velocity.X;
13532 velocity.Y = 0f - velocity.Y;
13533 netUpdate = true;
13534 }
13535 ai[0] = 1f;
13536 }
13537 else if (aiStyle == 16)
13538 {
13539 if (timeLeft > 3)
13540 {
13541 timeLeft = 3;
13542 }
13543 if (player3.position.X + (float)(player3.width / 2) < position.X + (float)(width / 2))
13544 {
13545 direction = -1;
13546 }
13547 else
13548 {
13549 direction = 1;
13550 }
13551 }
13552 else if (aiStyle == 68)
13553 {
13554 if (timeLeft > 3)
13555 {
13556 timeLeft = 3;
13557 }
13558 if (player3.position.X + (float)(player3.width / 2) < position.X + (float)(width / 2))
13559 {
13560 direction = -1;
13561 }
13562 else
13563 {
13564 direction = 1;
13565 }
13566 }
13567 int playerIndex = owner;
13569 {
13570 playerIndex = (int)ai[0];
13571 }
13573 if (type == 41 && timeLeft > 1)
13574 {
13575 timeLeft = 1;
13576 }
13577 bool flag20 = false;
13578 int num39 = Main.DamageVar((int)((float)damage * num), Main.player[owner].luck);
13579 bool dodgeable = IsDamageDodgable();
13580 if (!player3.immune)
13581 {
13582 StatusPvP(m);
13583 }
13586 if (num40 > 0 && Main.player[owner].ghostHeal && friendly && !hostile)
13587 {
13588 ghostHeal(num40, new Vector2(player3.Center.X, player3.Center.Y), player3);
13589 }
13590 if (type == 304 && num40 > 0)
13591 {
13592 vampireHeal(num40, new Vector2(player3.Center.X, player3.Center.Y), player3);
13593 }
13594 if ((melee || ProjectileID.Sets.IsAWhip[type]) && Main.player[owner].meleeEnchant == 7)
13595 {
13596 NewProjectile(GetProjectileSource_FromThis(), player3.Center.X, player3.Center.Y, player3.velocity.X, player3.velocity.Y, 289, 0, 0f, owner);
13597 }
13598 if (Main.netMode != 0)
13599 {
13600 NetMessage.SendPlayerHurt(m, playerDeathReason, num39, direction, flag20, pvp: true, -1);
13601 }
13602 playerImmune[m] = 40;
13603 if (penetrate > 0)
13604 {
13605 penetrate--;
13606 if (penetrate == 0)
13607 {
13608 break;
13609 }
13610 }
13611 if (aiStyle == 7)
13612 {
13613 ai[0] = 1f;
13614 damage = 0;
13615 netUpdate = true;
13616 }
13617 else if (aiStyle == 13)
13618 {
13619 ai[0] = 1f;
13620 netUpdate = true;
13621 }
13622 else if (aiStyle == 69)
13623 {
13624 ai[0] = 1f;
13625 netUpdate = true;
13626 }
13627 }
13628 }
13629 }
13630 if (type == 10 && Main.netMode != 1)
13631 {
13632 for (int n = 0; n < 200; n++)
13633 {
13634 NPC nPC2 = Main.npc[n];
13635 if (!nPC2.active)
13636 {
13637 continue;
13638 }
13639 if (nPC2.type == 534)
13640 {
13641 if (((Rectangle)(ref rectangle)).Intersects(nPC2.Hitbox))
13642 {
13643 nPC2.Transform(441);
13644 }
13645 }
13646 else
13647 {
13648 if (nPC2.type != 687 || !((Rectangle)(ref rectangle)).Intersects(nPC2.Hitbox))
13649 {
13650 continue;
13651 }
13652 nPC2.Transform(683);
13653 Vector2 vector9 = nPC2.Center - new Vector2(20f);
13654 Utils.PoofOfSmoke(vector9);
13655 if (Main.netMode == 2)
13656 {
13657 NetMessage.SendData(106, -1, -1, null, (int)vector9.X, vector9.Y);
13658 }
13659 if (!NPC.unlockedSlimeYellowSpawn)
13660 {
13661 NPC.unlockedSlimeYellowSpawn = true;
13662 if (Main.netMode == 2)
13663 {
13664 NetMessage.SendData(7);
13665 }
13666 }
13667 }
13668 }
13669 }
13670 if ((type == 11 || type == 463) && Main.netMode != 1)
13671 {
13672 bool crimson = type == 463;
13673 Rectangle value2 = default(Rectangle);
13674 for (int num41 = 0; num41 < 200; num41++)
13675 {
13676 if (Main.npc[num41].active)
13677 {
13678 ((Rectangle)(ref value2))._002Ector((int)Main.npc[num41].position.X, (int)Main.npc[num41].position.Y, Main.npc[num41].width, Main.npc[num41].height);
13679 if (((Rectangle)(ref rectangle)).Intersects(value2))
13680 {
13681 Main.npc[num41].AttemptToConvertNPCToEvil(crimson);
13682 }
13683 }
13684 }
13685 }
13686 if (Main.netMode == 2 || !hostile || Main.myPlayer >= 255 || damage <= 0)
13687 {
13688 return;
13689 }
13690 int num42 = -1;
13691 switch (type)
13692 {
13693 case 452:
13694 case 454:
13695 case 455:
13696 case 462:
13697 num42 = 1;
13698 break;
13699 case 871:
13700 case 872:
13701 case 873:
13702 case 874:
13703 case 919:
13704 case 923:
13705 case 924:
13706 num42 = 1;
13707 break;
13708 }
13709 int myPlayer = Main.myPlayer;
13710 bool flag21 = Main.player[myPlayer].active && !Main.player[myPlayer].dead && (!Main.player[myPlayer].immune || num42 != -1);
13711 if (flag21 && type == 281)
13712 {
13713 flag21 = ai[1] - 1f == (float)myPlayer;
13714 }
13715 if (Main.getGoodWorld && type == 281)
13716 {
13717 flag21 = true;
13718 }
13719 if (ModProjectile != null)
13720 {
13722 }
13723 if (!flag21 || !Colliding(rectangle, Main.player[myPlayer].getRect()) || !CombinedHooks.CanBeHitByProjectile(Main.player[myPlayer], this))
13724 {
13725 return;
13726 }
13727 int num44 = direction;
13728 num44 = ((!(Main.player[myPlayer].position.X + (float)(Main.player[myPlayer].width / 2) < position.X + (float)(width / 2))) ? 1 : (-1));
13729 if (!Main.player[myPlayer].CanParryAgainst(Main.player[myPlayer].Hitbox, base.Hitbox, velocity))
13730 {
13731 int num45 = Main.DamageVar(damage, 0f - Main.player[owner].luck) * 2;
13732 if (type == 961)
13733 {
13734 if (penetrate == 1)
13735 {
13736 damage = 0;
13737 penetrate = -1;
13738 }
13739 else
13740 {
13741 damage = (int)((double)damage * 0.7);
13742 }
13743 }
13745 int playerIndex2 = -1;
13747 {
13748 playerIndex2 = (int)ai[0];
13749 }
13750 if (Main.player[myPlayer].Hurt(PlayerDeathReason.ByProjectile(playerIndex2, whoAmI), num45, num44, pvp: false, quiet: false, Crit: false, num42, dodgeable2, ArmorPenetration) > 0.0 && !Main.player[myPlayer].dead)
13751 {
13752 StatusPlayer(myPlayer);
13753 }
13754 if (trap)
13755 {
13756 Main.player[myPlayer].trapDebuffSource = true;
13757 if (Main.player[myPlayer].dead)
13758 {
13759 AchievementsHelper.HandleSpecialEvent(Main.player[myPlayer], 4);
13760 }
13761 }
13762 }
13763 if (type == 435 || type == 682)
13764 {
13765 penetrate--;
13766 }
13767 if (type == 436)
13768 {
13769 penetrate--;
13770 }
13771 if (type == 681)
13772 {
13773 timeLeft = 0;
13774 }
13775 if (type == 437)
13776 {
13777 penetrate--;
13778 }
13779 }
static PlayerDeathReason ByProjectile(int playerIndex, int projectileIndex)
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
Vector2 DirectionTo(Vector2 Destination)
Definition Entity.cs:289
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static void HandleSpecialEvent(Player player, int eventID)
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
static bool[] CountsAsCritter
If true for a given NPC type (F:Terraria.NPC.type), then that NPC is counted as a critter....
Definition NPCID.cs:416
static bool[] ReflectStarShotsInForTheWorthy
If true for a given NPC type (F:Terraria.NPC.type), then that NPC will reflect F:Terraria....
Definition NPCID.cs:216
static bool[] BelongsToInvasionOldOnesArmy
If true for a given NPC type (F:Terraria.NPC.type), then that NPC belongs to the Old One's Army event...
Definition NPCID.cs:292
static bool[] ZappingJellyfish
If true for a given NPC type (F:Terraria.NPC.type), then that NPC, if currently F:Terraria....
Definition NPCID.cs:250
static bool[] ImmediatelyUpdatesNPCBuffFlags
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile will immediate...
static bool[] MinionShot
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile is shot by som...
static bool[] CultistIsResistantTo
Indicates that the Lunatic Cultist takes 75% damage from this projectile. All projectiles in this set...
static bool[] AllowsContactDamageFromJellyfish
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile will zap the p...
static bool[] DontApplyParryDamageBuff
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile won't receive ...
static bool[] IsARocketThatDealsDoubleDamageToPrimaryEnemy
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile will deal doub...
static bool[] IsAMineThatDealsTripleDamageWhenStationary
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile will deal trip...
static float[] SummonTagDamageMultiplier
Used to scale down summon tag damage for fast hitting minions and sentries.
static bool[] IsAWhip
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile will use whip ...
static bool[] IsAGravestone
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile handles player...
static bool[] SentryShot
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile is shot by som...
static readonly short Count
static void ModifyHitNPCWithProj(Projectile projectile, NPC nPC, ref NPC.HitModifiers modifiers)
static bool CanBeHitByProjectile(Player player, Projectile projectile)
static void OnHitNPCWithProj(Projectile projectile, NPC nPC, in NPC.HitInfo hit, int damageDone)
static bool CanHitPvpWithProj(Projectile projectile, Player target)
static ? bool CanHitNPCWithProj(Projectile proj, NPC npc)
virtual bool UseStandardCritCalcs
This lets you decide whether or not your damage class will use standard crit chance calculations....
int CooldownSlot
Determines which (T:Terraria.ID.ImmunityCooldownID) to use when this projectile damages a player....
This class serves as a place for you to place all your properties and hooks for each projectile....
static bool MinionContactDamage(Projectile projectile)
static ? bool CanDamage(Projectile projectile)
This serves as the central class from which projectile-related functions are carried out....
bool sentry
Indicates that this projectile is a sentry Defaults to false. All sentries should set F:Terraria....
bool minion
Indicates that this projectile is a minion Defaults to false.
Projectile FindStardustDragonHeadOfOwner()
int maxPenetrate
How many npc can this projectile hit before dying. (Or tile bounces) Automatically set at the end o...
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
static void KillOldestJavelin(int protectedProjectileIndex, int projectileType, int targetNPCIndex, Point[] bufferForScan)
int aiStyle
Selects which vanilla code to use for the AI method. Vanilla projectile AI styles are enumerated in t...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
void ghostHeal(int dmg, Vector2 Position, Entity victim)
static Conditions.NotNull _cachedConditions_notNull
int penetrate
The remaining number of npc can this projectile hit before dying. (Or tile bounces)....
int ArmorPenetration
The number of defense points that this projectile can ignore on its own. Cannot be set to negative va...
IEntitySource GetItemSource_OnHit(Entity victim, int itemSourceId)
IEntitySource GetProjectileSource_FromThis()
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
bool stopsDealingDamageAfterPenetrateHits
int CountEnemiesWhoAreImmuneToMeRightNow(int cap)
int FindTargetWithLineOfSight(float maxRange=800f)
Finds the closest NPC to this projectile which can be targeted and which it has line of sight to.
static Point[] _javelinsMax8
void BombsHurtPlayers(Rectangle projRectangle, int j)
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
float knockBack
This will always be set in Projectile.NewProjectile based on the weapons knockback and player stat mo...
bool friendly
If True, this projectile will hurt enemies (!F:Terraria.NPC.friendly) Defaults to false.
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
void SummonSuperStarSlash(Vector2 target)
void vampireHeal(int dmg, Vector2 Position, Entity victim)
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
void TryDoingOnHitEffects(Entity entity)
bool ownerHitCheck
If true, then this projectile will only deal damage if its owner has line of sight to the hit....
bool usesIDStaticNPCImmunity
If true, all projectiles of this type share an immunity cooldown for each npc. Use this rather than ...
static Conditions.IsSolid _cachedConditions_solid
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
void BetsySharpnel(int npcIndex)
static Point[] _javelinsMax6
bool appliesImmunityTimeOnSingleHits
If true, this projectile will apply immunity to an npc despite having a F:Terraria....
static void EmitBlackLightningParticles(NPC targetNPC)
int idStaticNPCHitCooldown
When used in conjunction with F:Terraria.Projectile.usesIDStaticNPCImmunity, determines how many tick...
void ghostHurt(int dmg, Vector2 Position, Entity victim)
void StatusPlayer(int i)
bool hostile
If True, this projectile will hurt players and friendly NPCs (F:Terraria.NPC.friendly) Defaults to ...
bool trap
If true, this projectile was spawned by a trap tile.
static Point[] _javelinsMax10
bool npcProj
If true, this projectile was spawned by a friendly Town NPC.
bool CanHitWithMeleeWeapon(Entity ent)
bool usesLocalNPCImmunity
If true, this projectile manages it's own immunity timers for each npc. Use this rather than F:Terra...
static bool IsNPCIndexImmuneToProjectileType(int projectileType, int npcIndex)
int CritChance
The critical strike chance modifier of this projectile. Cannot be set to negative values....
bool Colliding(Rectangle myRect, Rectangle targetRect)
int localNPCHitCooldown
When used in conjunction with F:Terraria.Projectile.usesLocalNPCImmunity, determines how many ticks m...
void LightDisc_Bounce(Vector2 hitPoint, Vector2 normal)
void StatusPvP(int i)
void StatusNPC(int i)
static uint[][] perIDStaticNPCImmunity
Definition Projectile.cs:97
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....
Rectangle Damage_GetHitbox()
DamageClass DamageType
The damage type assigned to this projectile, represented as a DamageClass. Leave blank or use DamageC...
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...
static GenSearch Chain(GenSearch search, params GenCondition[] conditions)
Definition Searches.cs:154
static bool Find(Point origin, GenSearch search, out Point result)
Definition WorldUtils.cs:30

References Terraria.Projectile._cachedConditions_notNull, Terraria.Projectile._cachedConditions_solid, Terraria.Projectile._javelinsMax10, Terraria.Projectile._javelinsMax6, Terraria.Projectile._javelinsMax8, Terraria.Entity.active, Terraria.Projectile.ai, Terraria.Projectile.aiStyle, Terraria.ID.ProjectileID.Sets.AllowsContactDamageFromJellyfish, Terraria.Projectile.appliesImmunityTimeOnSingleHits, Terraria.Projectile.ArmorPenetration, Terraria.Projectile.arrow, Terraria.Player.beeDamage(), Terraria.Player.beeKB(), Terraria.Player.beeType(), Terraria.ID.NPCID.Sets.BelongsToInvasionOldOnesArmy, Terraria.Projectile.BetsySharpnel(), Terraria.Projectile.BombsHurtPlayers(), Terraria.DataStructures.PlayerDeathReason.ByProjectile(), Terraria.ModLoader.CombinedHooks.CanBeHitByProjectile(), Terraria.Projectile.CanBeReflected(), Terraria.ModLoader.ProjectileLoader.CanDamage(), Terraria.Collision.CanHit(), Terraria.Collision.CanHitLine(), Terraria.ModLoader.CombinedHooks.CanHitNPCWithProj(), Terraria.ModLoader.CombinedHooks.CanHitPvpWithProj(), Terraria.Projectile.CanHitWithMeleeWeapon(), Terraria.WorldBuilding.Searches.Chain(), Terraria.Projectile.Colliding(), Terraria.ModLoader.ModProjectile.CooldownSlot, Terraria.ID.ProjectileID.Count, Terraria.Projectile.CountEnemiesWhoAreImmuneToMeRightNow(), Terraria.ID.NPCID.Sets.CountsAsCritter, Terraria.Projectile.CritChance, Terraria.ID.ProjectileID.Sets.CultistIsResistantTo, Terraria.Projectile.CutTiles(), Terraria.Projectile.damage, Terraria.Projectile.Damage_GetHitbox(), Terraria.Projectile.DamageType, Terraria.Main.DamageVar(), Terraria.Entity.direction, Terraria.Entity.DirectionTo(), Terraria.ID.ProjectileID.Sets.DontApplyParryDamageBuff, Terraria.Projectile.EmitBlackLightningParticles(), Terraria.Main.expertMode, Terraria.WorldBuilding.WorldUtils.Find(), Terraria.Projectile.FindStardustDragonHeadOfOwner(), Terraria.Projectile.FindTargetWithLineOfSight(), Terraria.Projectile.frame, Terraria.Projectile.friendly, Terraria.Main.getGoodWorld, Terraria.Projectile.GetItemSource_OnHit(), Terraria.Projectile.GetProjectileSource_FromThis(), Terraria.Projectile.ghostHeal(), Terraria.Projectile.ghostHurt(), Terraria.GameContent.Achievements.AchievementsHelper.HandleSpecialEvent(), Terraria.Main.hardMode, Terraria.Entity.height, Terraria.Projectile.hostile, Terraria.Projectile.idStaticNPCHitCooldown, Terraria.ID.ProjectileID.Sets.ImmediatelyUpdatesNPCBuffFlags, Terraria.ID.ProjectileID.Sets.IsAGravestone, Terraria.ID.ProjectileID.Sets.IsAMineThatDealsTripleDamageWhenStationary, Terraria.ID.ProjectileID.Sets.IsARocketThatDealsDoubleDamageToPrimaryEnemy, Terraria.ID.ProjectileID.Sets.IsAWhip, Terraria.Projectile.IsDamageDodgable(), Terraria.Projectile.IsNPCIndexImmuneToProjectileType(), Terraria.Main.item, Terraria.Projectile.Kill(), Terraria.Projectile.KillOldestJavelin(), Terraria.Projectile.knockBack, Terraria.Projectile.LightDisc_Bounce(), Terraria.Projectile.localAI, Terraria.Projectile.localNPCHitCooldown, Terraria.Projectile.localNPCImmunity, Terraria.Projectile.magic, Terraria.NPC.maxBuffs, Terraria.Projectile.maxPenetrate, Terraria.Projectile.melee, Terraria.Projectile.minion, Terraria.ModLoader.ProjectileLoader.MinionContactDamage(), Terraria.ID.ProjectileID.Sets.MinionShot, Terraria.ModLoader.CombinedHooks.ModifyHitNPCWithProj(), Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.Projectile.netUpdate, Terraria.Item.NewItem(), Terraria.Projectile.NewProjectile(), Terraria.Main.npc, Terraria.Projectile.npcProj, Terraria.Item.NPCtoBanner(), Terraria.Projectile.numHits, Terraria.Projectile.numUpdates, Terraria.ModLoader.CombinedHooks.OnHitNPCWithProj(), Terraria.Projectile.owner, Terraria.Projectile.ownerHitCheck, Terraria.Projectile.penetrate, Terraria.Projectile.perIDStaticNPCImmunity, Terraria.Main.player, Terraria.Projectile.playerImmune, Terraria.Utils.PoofOfSmoke(), Terraria.Entity.position, Terraria.Main.projectile, Terraria.Main.projFrames, Terraria.Main.projPet, Terraria.Main.rand, Terraria.Utils.RandomVector2(), Terraria.ID.NPCID.Sets.ReflectStarShotsInForTheWorthy, Terraria.Main.remixWorld, Terraria.GameContent.Drawing.ParticleOrchestrator.RequestParticleSpawn(), Terraria.Projectile.scale, Terraria.NetMessage.SendData(), Terraria.NetMessage.SendPlayerHurt(), Terraria.NetMessage.SendStrikeNPC(), Terraria.Projectile.sentry, Terraria.ID.ProjectileID.Sets.SentryShot, Terraria.Collision.SolidTiles(), Terraria.ID.ProjectileID.Sets.StardustDragon, Terraria.Projectile.StatusNPC(), Terraria.Projectile.StatusPlayer(), Terraria.Projectile.StatusPvP(), Terraria.Projectile.stopsDealingDamageAfterPenetrateHits, Terraria.ID.ProjectileID.Sets.StormTiger, Terraria.Projectile.SummonMonkGhast(), Terraria.Projectile.SummonSuperStarSlash(), Terraria.ID.ProjectileID.Sets.SummonTagDamageMultiplier, Terraria.Projectile.tileCollide, Terraria.Projectile.timeLeft, Terraria.Projectile.trap, Terraria.Projectile.TryDoingOnHitEffects(), Terraria.Projectile.type, Terraria.NPC.unlockedSlimeYellowSpawn, Terraria.Projectile.usesIDStaticNPCImmunity, Terraria.Projectile.usesLocalNPCImmunity, Terraria.Projectile.usesOwnerMeleeHitCD, Terraria.ModLoader.DamageClass.UseStandardCritCalcs, Terraria.Projectile.vampireHeal(), Terraria.Entity.velocity, Terraria.Entity.whoAmI, Terraria.Entity.width, and Terraria.ID.NPCID.Sets.ZappingJellyfish.

Referenced by Terraria.Projectile.HandleMovement(), Terraria.Projectile.NewProjectile(), Terraria.Projectile.NewProjectile(), and Terraria.Projectile.Update().

+ Here is the caller graph for this function: