15045 {
15046 bool flag = false;
15049 bool flag2 =
false;
15051 bool flag4 = flag3.HasValue && !
flag3.Value;
15054 {
15058 if (Main.projPet[
type])
15059 {
15062 {
15064 }
15065 }
15067 {
15069 if (Main.player[
owner].Bottom.Y >
base.Bottom.Y + 4f)
15070 {
15072 }
15073 }
15075 {
15077 if (Main.player[
owner].Bottom.Y >
base.Bottom.Y + 4f)
15078 {
15080 }
15081 }
15083 {
15085 }
15087 {
15089 }
15091 {
15093 }
15095 {
15097 }
15099 {
15101 }
15103 {
15105 }
15107 {
15109 }
15111 {
15113 }
15115 {
15116 case 663:
15117 case 665:
15118 case 667:
15119 case 677:
15120 case 678:
15121 case 679:
15122 case 688:
15123 case 689:
15124 case 690:
15125 case 691:
15126 case 692:
15127 case 693:
15129 break;
15130 case 759:
15132 break;
15133 case 1020:
15134 {
15136 flag6 = num >= (float)
Math.
PI / 2f || num < -(
float)Math.PI / 2f;
15137 break;
15138 }
15139 }
15141 {
15143 }
15145 {
15149 }
15151 {
15154 }
15156 {
15160 }
15162 {
15166 }
15168 {
15172 }
15174 {
15177 }
15179 {
15182 }
15183 else if (
type == 308)
15184 {
15187 }
15189 {
15192 }
15194 {
15198 }
15199 else if (
type == 669 ||
type == 706)
15200 {
15203 }
15204 else if (
type == 261 ||
type == 277)
15205 {
15208 }
15210 {
15213 }
15214 else if (
type == 514)
15215 {
15218 }
15220 {
15223 }
15225 {
15228 }
15230 {
15233 }
15235 {
15238 }
15239 else if (
type == 533 &&
ai[0] >= 6f)
15240 {
15243 }
15244 else if (
type == 755 &&
ai[0] >= 0f)
15245 {
15248 }
15249 else if (
type == 759)
15250 {
15252 {
15254 }
15256 {
15258 }
15259 }
15261 {
15264 }
15265 else if (
type == 617)
15266 {
15269 }
15270 else if (
type == 304)
15271 {
15274 }
15276 {
15279 }
15280 else if (
type == 931)
15281 {
15284 }
15286 {
15288 {
15290 {
15292 }
15294 {
15297 }
15299 {
15301 }
15302 else
15303 {
15305 }
15306 }
15307 else
15308 {
15313 {
15315 }
15317 {
15319 {
15324 {
15326 }
15328 {
15330 }
15331 }
15333 {
15338 {
15340 }
15342 {
15344 }
15345 }
15346 else
15347 {
15352 {
15354 }
15356 {
15358 }
15359 }
15360 if (!Main.projPet[
type])
15361 {
15365 {
15367 {
15368 flag = true;
15369 }
15371 {
15372 flag = true;
15373 }
15375 position.Y = vector2.Y +
vector7.Y;
15377 }
15378 else
15379 {
15381 {
15382 flag = true;
15383 }
15385 {
15386 flag = true;
15387 }
15389 {
15390 flag = true;
15391 }
15393 {
15394 flag = true;
15395 }
15401 }
15402 }
15403 }
15404 else
15405 {
15408 {
15410 }
15412 {
15414 }
15416 {
15422 {
15423 vector9.Y = 0f;
15424 }
15431 {
15434 {
15435 break;
15436 }
15440 {
15442 }
15448 if (!Main.projPet[
type])
15449 {
15453 {
15455 {
15456 flag = true;
15457 }
15459 {
15460 flag = true;
15461 }
15463 position.Y = vector2.Y +
vector14.Y;
15465 }
15466 else
15467 {
15469 {
15470 flag = true;
15471 }
15473 {
15474 flag = true;
15475 }
15477 {
15478 flag = true;
15479 }
15481 {
15482 flag = true;
15483 }
15489 }
15490 }
15493 {
15495 }
15498 }
15501 {
15503 }
15505 {
15507 }
15508 if (!Main.projPet[
type])
15509 {
15513 {
15515 {
15516 flag = true;
15517 }
15519 {
15520 flag = true;
15521 }
15523 position.Y = vector2.Y +
vector16.Y;
15525 }
15526 else
15527 {
15529 {
15530 flag = true;
15531 }
15533 {
15534 flag = true;
15535 }
15537 {
15538 flag = true;
15539 }
15541 {
15542 flag = true;
15543 }
15549 }
15550 }
15551 }
15552 else
15553 {
15555 if (!Main.projPet[
type])
15556 {
15560 {
15562 {
15563 flag = true;
15564 }
15566 {
15567 flag = true;
15568 }
15570 position.Y = vector2.Y +
vector18.Y;
15572 }
15573 else
15574 {
15576 {
15577 flag = true;
15578 }
15580 {
15581 flag = true;
15582 }
15584 {
15585 flag = true;
15586 }
15588 {
15589 flag = true;
15590 }
15596 }
15597 }
15598 }
15599 }
15600 }
15601 }
15603 {
15604 flag = true;
15605 }
15606 if (flag)
15607 {
15609 {
15615 {
15617 }
15618 if (
num10 > Main.maxTilesX)
15619 {
15620 num10 = Main.maxTilesX;
15621 }
15623 {
15625 }
15626 if (
num12 > Main.maxTilesY)
15627 {
15628 num12 = Main.maxTilesY;
15629 }
15632 {
15634 {
15636 {
15638 if (Main.netMode != 0)
15639 {
15640 NetMessage.SendData(17, -1, -1,
null, 0, i,
j);
15641 }
15642 }
15643 }
15644 }
15645 }
15647 {
15653 {
15655 }
15656 if (
num14 > Main.maxTilesX)
15657 {
15658 num14 = Main.maxTilesX;
15659 }
15661 {
15663 }
15664 if (
num16 > Main.maxTilesY)
15665 {
15666 num16 = Main.maxTilesY;
15667 }
15670 {
15672 {
15674 {
15676 if (Main.netMode != 0)
15677 {
15678 NetMessage.SendData(17, -1, -1,
null, 0,
k,
l);
15679 }
15680 }
15681 }
15682 }
15683 }
15685 {
15688 }
15689 else if (
type == 434)
15690 {
15693 }
15694 else if (
type == 1020)
15695 {
15697 {
15699 }
15701 {
15703 }
15704 }
15705 else if (
type == 601)
15706 {
15707 if (Main.netMode != 2 &&
alpha > 0)
15708 {
15710 {
15712 }
15713 else
15714 {
15716 }
15717 }
15718 if (
owner == Main.myPlayer)
15719 {
15721 }
15724 }
15725 else if (
type == 985)
15726 {
15731 }
15732 else if (
type == 451)
15733 {
15738 }
15739 else if (
type == 645)
15740 {
15744 }
15745 else if (
type == 584)
15746 {
15747 bool flag7 =
false;
15749 {
15750 velocity.X = lastVelocity.X * -0.75f;
15752 }
15754 {
15755 velocity.Y = lastVelocity.Y * -0.75f;
15757 }
15759 {
15762 {
15764 }
15767 }
15768 }
15769 else if (
type == 532)
15770 {
15771 bool flag8 =
false;
15773 {
15774 velocity.X = lastVelocity.X * -0.75f;
15776 }
15778 {
15779 velocity.Y = lastVelocity.Y * -0.75f;
15781 }
15783 {
15786 {
15788 }
15792 }
15793 }
15794 else if (
type == 533)
15795 {
15797 bool flag9 =
false;
15799 {
15800 velocity.X = lastVelocity.X * (0f -
num19);
15802 }
15804 {
15805 velocity.Y = lastVelocity.Y * (0f -
num19) * 0.5f;
15807 }
15809 {
15812 {
15814 }
15816 if (
ai[0] == 7f && (
double)velocity.Y < -0.1)
15817 {
15818 velocity.Y += 0.1f;
15819 }
15820 if (
ai[0] >= 6f &&
ai[0] < 9f)
15821 {
15823 }
15825 }
15826 }
15827 else if (
type == 502)
15828 {
15832 {
15835 }
15836 else
15837 {
15839 {
15841 }
15843 {
15845 }
15846 }
15848 float num21 = 10f +
ai[0] * 4f;
15851 {
15853 Main.dust[
num23].position =
base.Center;
15856 Main.dust[
num23].noGravity =
true;
15857 Main.dust[
num23].scale = 1f +
ai[0] / 3f;
15858 }
15859 if (Main.myPlayer ==
owner)
15860 {
15874 }
15875 }
15876 else if (
type == 444)
15877 {
15879 {
15881 }
15883 {
15885 }
15887 }
15888 else if (
type == 617)
15889 {
15891 {
15893 }
15895 {
15897 }
15898 }
15900 {
15902 {
15906 }
15907 }
15908 else if (
type == 85)
15909 {
15912 }
15914 {
15916 {
15920 }
15921 }
15922 else if (
type == 851)
15923 {
15925 {
15927 }
15929 {
15931 }
15932 }
15933 else if (
type == 855)
15934 {
15936 {
15938 }
15940 {
15943 {
15944 velocity.Y *= 0.25f;
15945 }
15946 }
15947 }
15949 {
15951 {
15952 velocity.X = lastVelocity.X * -0.6f;
15953 }
15955 {
15956 velocity.Y = lastVelocity.Y * -0.6f;
15957 }
15958 }
15959 else if (
type == 861)
15960 {
15963 {
15965 }
15967 {
15968 velocity.X = lastVelocity.X *
num27;
15969 }
15971 {
15972 velocity.Y = lastVelocity.Y *
num27;
15973 }
15975 {
15976 velocity.Y = 0f;
15977 }
15979 {
15981 }
15983 }
15985 {
15987 {
15989 {
15992 {
15994 velocity.X = lastVelocity.X * -1f;
15995 }
15997 {
15999 velocity.Y = lastVelocity.Y * -1f;
16000 }
16002 {
16010 {
16012 }
16013 }
16014 }
16015 }
16016 else if (
type == 604)
16017 {
16019 {
16021 }
16023 {
16025 }
16026 }
16027 else if (
type == 379)
16028 {
16030 {
16031 velocity.X = lastVelocity.X * -0.6f;
16032 }
16034 {
16035 velocity.Y = lastVelocity.Y * -0.6f;
16036 }
16037 }
16038 else if (
type == 491)
16039 {
16041 {
16043 }
16045 {
16046 velocity.X = lastVelocity.X * -1f;
16047 }
16049 {
16050 velocity.Y = lastVelocity.Y * -1f;
16051 }
16052 }
16054 {
16056 {
16057 velocity.X = lastVelocity.X * -0.9f;
16058 }
16060 {
16061 velocity.Y = lastVelocity.Y * -0.9f;
16062 }
16063 }
16065 {
16067 {
16068 velocity.X = lastVelocity.X * -0.4f;
16069 }
16071 {
16072 velocity.Y = lastVelocity.Y * -0.95f;
16073 }
16075 }
16076 else if (
type == 969)
16077 {
16079 {
16080 velocity.X = lastVelocity.X * -0.75f;
16081 }
16083 {
16084 velocity.Y = lastVelocity.Y * -0.75f;
16085 }
16086 }
16087 else if (
type == 681)
16088 {
16090 }
16091 else if (
type == 409)
16092 {
16094 {
16095 velocity.X = lastVelocity.X * -1f;
16096 }
16098 {
16099 velocity.Y = lastVelocity.Y * -1f;
16100 }
16101 }
16102 else if (
type == 254)
16103 {
16105 {
16106 velocity.X = lastVelocity.X * -1f;
16107 }
16109 {
16110 velocity.Y = lastVelocity.Y * -1f;
16111 }
16112 }
16113 else if (
type == 225)
16114 {
16117 {
16119 }
16121 {
16123 return;
16124 }
16129 {
16135 }
16136 }
16137 else if (
type == 285)
16138 {
16141 {
16143 }
16145 {
16147 return;
16148 }
16150 {
16151 velocity.X = lastVelocity.X * -1f;
16152 }
16154 {
16155 velocity.Y = lastVelocity.Y * -1f;
16156 }
16159 {
16164 }
16165 }
16166 else if (
type == 931)
16167 {
16169 {
16170 velocity.X = lastVelocity.X * -1f;
16171 }
16173 {
16174 velocity.Y = lastVelocity.Y * -1f;
16175 }
16176 }
16177 else if (
type == 155)
16178 {
16180 {
16182 if (Main.netMode == 0)
16183 {
16184 Main.NewText(
networkText.ToString(),
byte.MaxValue, 240, 20);
16185 }
16186 else if (Main.netMode == 2)
16187 {
16189 }
16190 }
16193 {
16194 velocity.X = lastVelocity.X * -0.6f;
16195 }
16197 {
16198 velocity.Y = lastVelocity.Y * -0.6f;
16199 }
16200 }
16202 {
16204 {
16206 {
16208 }
16209 else
16210 {
16212 }
16215 }
16216 }
16218 {
16220 {
16222 {
16225 {
16227 }
16229 {
16231 }
16233 {
16235 }
16236 }
16238 {
16239 int[]
array =
new int[10];
16243 for (
int m = 0;
m < 200;
m++)
16244 {
16245 if (!Main.npc[
m].CanBeChasedBy(
this))
16246 {
16247 continue;
16248 }
16249 float num33 = (base.Center - Main.npc[
m].Center).
Length();
16251 {
16255 {
16256 break;
16257 }
16258 }
16259 }
16261 {
16268 }
16269 }
16270 }
16271 else if (
type == 94)
16272 {
16274 {
16276 }
16278 {
16280 }
16281 }
16282 else if (
type == 496)
16283 {
16285 {
16287 {
16289 }
16290 else
16291 {
16293 }
16294 }
16296 {
16298 {
16300 }
16301 else
16302 {
16304 }
16305 }
16306 }
16307 else if (
type == 311)
16308 {
16310 {
16313 }
16315 {
16318 }
16320 {
16322 }
16323 }
16324 else if (
type == 312)
16325 {
16327 {
16330 }
16332 {
16335 }
16336 }
16337 else if (
type == 522 ||
type == 620)
16338 {
16340 {
16342 }
16344 {
16346 }
16347 }
16348 else if (
type == 524)
16349 {
16352 {
16354 }
16356 {
16358 }
16359 }
16361 {
16363 {
16372 }
16373 }
16374 else if (
type == 281)
16375 {
16377 if (
ai[0] == -2f ||
ai[0] == -3f)
16378 {
16380 }
16382 {
16383 if (Main.myPlayer ==
owner)
16384 {
16385 int num35 = ((velocity.X > 0f) ? 1 : 2);
16387 {
16389 }
16393 }
16394 }
16395 else
16396 {
16398 {
16400 }
16402 {
16404 }
16405 }
16406 }
16407 else if (
type == 290 ||
type == 294)
16408 {
16410 {
16413 }
16415 {
16418 }
16419 }
16421 {
16423 {
16425 }
16428 {
16430 }
16432 {
16434 }
16435 }
16436 else if (
type == 307 &&
ai[1] < 5f)
16437 {
16440 {
16442 }
16444 {
16446 }
16447 }
16449 {
16451 {
16455 }
16457 {
16459 }
16460 }
16461 else if (
type == 1021)
16462 {
16464 {
16466 {
16470 }
16472 {
16474 }
16475 }
16477 {
16479 {
16480 velocity.X = lastVelocity.X * -0.75f;
16482 }
16483 else
16484 {
16486 }
16487 }
16488 }
16489 else if (
type == 1013)
16490 {
16493 float num38 = 0.95f;
16494 float num39 = 0.95f;
16496 {
16498 }
16499 else if (
num36 < 0.75f)
16500 {
16502 }
16503 else if (
num36 < 1f)
16504 {
16506 }
16508 {
16510 }
16511 else if (
num37 < 0.75f)
16512 {
16514 }
16515 else if (
num37 < 1f)
16516 {
16518 }
16521 {
16523 {
16525 }
16527 }
16529 {
16531 {
16533 }
16535 }
16537 {
16541 }
16543 {
16545 }
16547 {
16549 }
16550 }
16551 else if (
type == 727)
16552 {
16557 {
16561 if (
owner == Main.myPlayer)
16562 {
16563 int num43 = Main.rand.Next(3, 6);
16564 float num44 = Main.rand.NextFloat();
16566 {
16569 {
16571 }
16573 }
16574 }
16575 }
16577 {
16579 if (
owner == Main.myPlayer)
16580 {
16581 int num46 = Main.rand.Next(3, 6);
16582 float num47 = Main.rand.NextFloat();
16584 {
16587 {
16589 }
16591 }
16592 }
16593 }
16594 }
16595 else if (
type == 655)
16596 {
16598 {
16602 }
16604 {
16606 }
16607 }
16608 else if (
type == 36)
16609 {
16611 {
16616 {
16618 }
16620 {
16622 }
16623 }
16624 else
16625 {
16627 }
16628 }
16630 {
16632 {
16634 }
16636 {
16638 }
16639 }
16641 {
16643 {
16644 velocity.X = lastVelocity.X * -0.75f;
16645 }
16647 {
16648 velocity.Y = lastVelocity.Y * -0.7f;
16649 }
16650 }
16652 {
16654 }
16656 {
16659 {
16663 {
16665 {
16666 velocity.X *= 0.1f;
16667 }
16669 {
16670 velocity.Y *= 0.1f;
16671 }
16672 }
16673 }
16675 {
16677 }
16678 }
16680 {
16683 {
16685 {
16687 }
16689 {
16691 }
16692 }
16693 else
16694 {
16697 {
16700 }
16701 }
16704 }
16706 {
16708 {
16712 }
16715 {
16717 {
16719 }
16721 {
16723 }
16724 }
16725 else
16726 {
16729 {
16732 }
16733 }
16736 }
16738 {
16743 {
16744 case 15:
16746 break;
16747 case 253:
16749 break;
16750 }
16752 {
16755 }
16756 else
16757 {
16759 {
16761 {
16763 }
16764 }
16766 {
16768 }
16770 {
16772 }
16773 }
16774 }
16776 {
16778 {
16779 velocity.X = lastVelocity.X * -0.3f;
16780 }
16782 {
16783 velocity.Y = lastVelocity.Y * -0.3f;
16784 }
16785 }
16787 {
16789 {
16792 {
16794 {
16797 {
16798 Main.projectile[
num51].timeLeft = 2;
16799 }
16800 }
16801 }
16802 }
16804 {
16805 for (
int n = 0;
n < 10;
n++)
16806 {
16808 }
16811 }
16813 {
16814 velocity.X = lastVelocity.X * -0.1f;
16815 }
16817 {
16819 {
16820 velocity.X = lastVelocity.X * -0.1f;
16821 }
16822 }
16823 else if (
type == 870 &&
ai[1] == 0f)
16824 {
16826 {
16829 }
16830 }
16831 else if (
type == 50)
16832 {
16834 {
16835 velocity.X = lastVelocity.X * -0.2f;
16836 }
16838 {
16839 velocity.Y = lastVelocity.Y * -0.2f;
16840 }
16841 }
16842 else if (
type == 185)
16843 {
16845 {
16846 velocity.X = lastVelocity.X * -0.9f;
16847 }
16849 {
16850 velocity.Y = lastVelocity.Y * -0.9f;
16851 }
16852 }
16853 else if (
type == 277)
16854 {
16856 {
16857 velocity.X = lastVelocity.X * -0.9f;
16858 }
16860 {
16861 velocity.Y = lastVelocity.Y * -0.9f;
16862 }
16863 }
16864 else if (
type != 480)
16865 {
16867 {
16869 {
16870 velocity.X = lastVelocity.X * -0.1f;
16871 }
16872 }
16873 else
16874 {
16876 {
16877 velocity.X = lastVelocity.X * -0.5f;
16878 }
16880 {
16881 velocity.Y = lastVelocity.Y * -0.5f;
16882 }
16883 }
16884 }
16885 }
16887 {
16889 {
16890 velocity.X = lastVelocity.X * -0.4f;
16892 {
16893 velocity.X *= 0.8f;
16894 }
16895 }
16897 {
16898 velocity.Y = lastVelocity.Y * -0.4f;
16900 {
16901 velocity.Y *= 0.8f;
16902 }
16903 }
16905 {
16909 }
16910 }
16912 {
16917 }
16918 else if (
type == 870)
16919 {
16921 {
16922 velocity.X = lastVelocity.X * -0.2f;
16923 }
16925 {
16926 velocity.Y = lastVelocity.Y * -0.2f;
16927 }
16928 }
16929 else
16930 {
16933 }
16934 }
16935 }
16936 }
16937 }
16940 {
16946 {
16949 }
16951 }
16952 }
static float Lerp(float value1, float value2, float amount)
static float WrapAngle(float angle)
static byte Min(byte val1, byte val2)
static double Abs(double value)
static int Sign(decimal value)
static void PlaySound(int type, Vector2 position, int style=1)
static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer=-1)
float Distance(Vector2 Other)
Vector2 DirectionTo(Vector2 Destination)
static int TryPlacingPortal(Projectile theBolt, Vector2 velocity, Vector2 theCrashVelocity)
static ? bool[] ForcePlateDetection
static bool[] FallingBlockDoesNotFallThroughPlatforms
static readonly LegacySoundStyle Item10
static readonly LegacySoundStyle Item115
static readonly LegacySoundStyle Item114
static bool[] CrackedBricks
static NetworkText FromKey(string key, params object[] substitutions)
void UpdatePosition(Vector2 wetVelocity)
IEntitySource GetProjectileSource_FromThis()
int FindTargetWithLineOfSight(float maxRange=800f)
void MakeBoulderOfEarthExplosion()
void LightDisc_Bounce(Vector2 hitPoint, Vector2 normal)
void AI_015_HandleMovementCollision(ref Vector2 wetVelocity, ref Vector2 lastVelocity)
bool decidesManualFallThrough
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)