40428 {
40430 if (!player.active)
40431 {
40433 return;
40434 }
40435 bool flag =
type == 393 ||
type == 394 ||
type == 395;
40440 int num = 450;
40445 {
40446 if (player.dead)
40447 {
40448 player.flinxMinion = false;
40449 }
40450 if (player.flinxMinion)
40451 {
40453 }
40454 num = 800;
40455 }
40456 if (flag)
40457 {
40458 if (player.dead)
40459 {
40460 player.pirateMinion = false;
40461 }
40462 if (player.pirateMinion)
40463 {
40465 }
40466 num = 800;
40467 }
40469 {
40470 if (player.dead)
40471 {
40472 player.stormTiger = false;
40473 }
40474 if (player.stormTiger)
40475 {
40477 }
40478 num = 800;
40480 {
40482 {
40484 obj.fadeIn = 0.5f;
40485 obj.scale = 0.3f;
40486 obj.noLight = true;
40487 obj.velocity +=
velocity * 0.005f;
40488 }
40490 {
40492 }
40494 {
40496 }
40498 {
40500 }
40501 }
40502 if (
owner == Main.myPlayer)
40503 {
40505 {
40507 {
40508 834 => 300,
40509 835 => 240,
40511 };
40513 {
40516 }
40517 }
40518 else
40519 {
40521 }
40522 }
40523 }
40525 {
40526 if (player.dead)
40527 {
40528 player.vampireFrog = false;
40529 }
40530 if (player.vampireFrog)
40531 {
40533 }
40534 num = 800;
40535 }
40537 {
40539 if (player.dead)
40540 {
40541 player.crimsonHeart = false;
40542 }
40543 if (player.crimsonHeart)
40544 {
40546 }
40547 }
40549 {
40551 if (player.dead)
40552 {
40553 player.companionCube = false;
40554 }
40555 if (player.companionCube)
40556 {
40558 }
40559 }
40561 {
40563 if (player.dead)
40564 {
40565 player.petFlagDirtiestBlock = false;
40566 }
40567 if (player.petFlagDirtiestBlock)
40568 {
40570 }
40571 }
40573 {
40577 {
40579 }
40581 if (!(
ai[1] <= 0f))
40582 {
40583 return;
40584 }
40588 }
40591 {
40592 vector.X -= (45 + player.width / 2) * player.direction;
40593 vector.X -=
minionPos * 30 * player.direction;
40594 }
40595 else if (flag)
40596 {
40597 vector.X -= (15 + player.width / 2) * player.direction;
40598 vector.X -=
minionPos * 20 * player.direction;
40599 }
40601 {
40602 vector.X -= (15 + player.width / 2) * player.direction;
40603 vector.X -=
minionPos * 40 * player.direction;
40604 }
40606 {
40607 vector.X -= (35 + player.width / 2) * player.direction;
40608 vector.X -=
minionPos * 40 * player.direction;
40609 }
40610 else if (
type == 500)
40611 {
40612 vector.X -= (15 + player.width / 2) * player.direction;
40613 vector.X -= 40 * player.direction;
40614 }
40615 else if (
type == 1018)
40616 {
40617 vector.X = player.Center.X;
40618 }
40619 else if (
type == 653)
40620 {
40621 vector.X = player.Center.X;
40622 }
40624 {
40625 Lighting.AddLight(
base.Center, 0.9f, 0.1f, 0.3f);
40628 {
40630 }
40632 {
40635 {
40637 }
40638 }
40642 Main.dust[
num7].scale = 1f;
40643 Main.dust[
num7].velocity =
vector2.RotatedByRandom(0.7853981852531433) * 3.5f;
40644 Main.dust[
num7].noGravity =
true;
40646 }
40648 {
40650 }
40652 {
40656 {
40659 {
40661 }
40662 }
40665 {
40667 }
40668 else
40669 {
40671 }
40674 {
40676 {
40679 }
40681 }
40682 if (
flag7 &&
owner == Main.myPlayer && Main.netMode != 2)
40683 {
40685 Vector3 vector4 = Lighting.GetColor((
int)player.Center.X / 16, (
int)player.Center.Y / 16).ToVector3();
40687 {
40689 }
40691 {
40693 }
40695 if (
localAI[1] > (
float)Main.rand.Next(30, 120) && !player.immune && player.velocity ==
Vector2.
Zero)
40696 {
40697 if (Main.rand.Next(5) == 0)
40698 {
40701 }
40702 else
40703 {
40706 player.immune = false;
40707 player.immuneTime = 0;
40708 localAI[1] = -300 + Main.rand.Next(30) * -10;
40709 }
40710 }
40711 }
40712 }
40715 {
40717 }
40726 {
40729 }
40731 {
40735 }
40737 {
40741 }
40744 {
40746 }
40748 {
40750 }
40752 {
40754 {
40759 {
40762 return;
40763 }
40764 Point point =
nPC.Top.ToTileCoordinates();
40768 {
40770 if (tile == null || tile.active())
40771 {
40772 break;
40773 }
40776 }
40779 {
40782 return;
40783 }
40785 {
40786 velocity.Y = -8f;
40788 }
40794 float num16 = (float)
Math.
Cos(Main.timeForVisualEffects / (
double)
num14 * 6.2831854820251465);
40796 {
40798 }
40803 {
40805 }
40809 {
40811 }
40813 }
40814 else
40815 {
40818 }
40819 return;
40820 }
40822 {
40824 float num17 = 0.2f;
40828 {
40830 }
40834 {
40836 }
40838 {
40842 {
40843 velocity.Y = -6f;
40844 }
40845 }
40846 if (!(
num20 < 60f))
40847 {
40851 {
40852 velocity.X +=
num17;
40854 {
40855 velocity.X +=
num17 * 1.5f;
40856 }
40857 }
40859 {
40860 velocity.X -=
num17;
40862 {
40863 velocity.X -=
num17 * 1.5f;
40864 }
40865 }
40867 {
40868 velocity.Y +=
num17;
40870 {
40871 velocity.Y +=
num17 * 1.5f;
40872 }
40873 }
40875 {
40876 velocity.Y -=
num17;
40878 {
40879 velocity.Y -=
num17 * 1.5f;
40880 }
40881 }
40882 }
40884 {
40886 }
40888 {
40891 {
40894 }
40896 {
40898 }
40900 }
40901 if (flag)
40902 {
40905 {
40908 }
40910 {
40912 }
40914 }
40916 {
40919 {
40921 }
40924 }
40926 {
40929 {
40931 }
40933 }
40934 if (
type == 1018 && Main.LocalPlayer.miscCounter % 3 == 0)
40935 {
40938 obj2.velocity = -
velocity * 0.25f;
40939 obj2.velocity =
obj2.velocity.RotatedByRandom(0.2617993950843811);
40940 }
40941 }
40942 if (
ai[0] == 2f &&
ai[1] < 0f)
40943 {
40947 {
40951 return;
40952 }
40953 }
40954 else if (
ai[0] == 2f)
40955 {
40958 if (flag)
40959 {
40963 {
40965 }
40966 }
40968 {
40970 if ((
double)
num23 > 0.25 && (double)
num23 < 0.75)
40971 {
40973 }
40976 {
40978 }
40980 {
40982 }
40983 else
40984 {
40986 }
40988 {
40989 velocity.X *= 0.8f;
40990 }
40991 }
40992 velocity.Y += 0.4f;
40994 {
40995 velocity.Y = 10f;
40996 }
40999 {
41001 {
41005 return;
41006 }
41008 }
41009 }
41011 {
41015 {
41017 }
41022 {
41024 bool flag12 = velocity.Y == 0f;
41026 {
41028 }
41030 {
41031 float num26 = (center.Y -
base.Center.Y) * -1f;
41032 float num27 = 0.4f;
41035 {
41037 }
41038 velocity.Y = 0f -
num28;
41039 }
41041 {
41043 {
41045 }
41049 direction = ((center.X - base.Center.X > 0f) ? 1 : (-1));
41050 }
41052 {
41057 {
41060 {
41061 break;
41062 }
41065 }
41067 {
41071 return;
41072 }
41074 {
41075 velocity.Y = -4f;
41077 }
41078 }
41079 }
41081 {
41084 {
41086 }
41087 vector.X += 20 * -
num31;
41088 }
41089 }
41091 {
41092 if (Main.player[
owner].rocketDelay2 > 0)
41093 {
41096 }
41098 if (
vector7.Length() > 2000f)
41099 {
41101 }
41103 {
41107 {
41108 velocity.Y = 0f;
41109 }
41111 {
41112 velocity.Y = 0f;
41113 }
41114 }
41115 }
41117 {
41119 {
41121 {
41123 }
41125 for (
int i = 0;
i < 20;
i++)
41126 {
41127 if (Collision.SolidCollision(
r.TopLeft(),
r.Width,
r.Height))
41128 {
41129 break;
41130 }
41131 r.Y += 16;
41132 vector.Y += 16f;
41133 }
41137 {
41139 if (player.Center.Distance(
base.Center) <
num32)
41140 {
41142 }
41143 }
41146 {
41151 {
41153 if (Collision.SolidCollision(
r2.TopLeft() +
vector10 *
num33,
r.Width,
r.Height))
41154 {
41155 break;
41156 }
41158 }
41160 }
41161 }
41163 float num34 = 0.5f;
41166 float num37 = 0.1f;
41168 {
41172 }
41174 {
41178 }
41180 {
41184 }
41186 {
41190 }
41192 {
41195 }
41197 {
41198 float num38 = player.velocity.Length();
41200 {
41202 }
41204 {
41206 }
41207 }
41210 float num40 = vector.X -
base.Center.X;
41213 {
41215 velocity.X *= 0.9f;
41217 {
41218 velocity.X = 0f;
41219 }
41220 }
41222 {
41224 velocity.X *= 0.9f;
41226 {
41227 velocity.X = 0f;
41228 }
41229 }
41231 {
41233 {
41236 {
41237 velocity.X -=
num34;
41238 }
41239 else
41240 {
41241 velocity.X -=
num37;
41242 }
41243 }
41244 else
41245 {
41248 {
41249 velocity.X +=
num34;
41250 }
41251 else
41252 {
41253 velocity.X +=
num37;
41254 }
41255 }
41257 if (flag)
41258 {
41260 }
41262 {
41264 }
41266 {
41268 }
41270 {
41272 }
41274 {
41275 flag14 = vector13.Y < -80f;
41276 }
41278 {
41280 }
41282 {
41284 }
41285 }
41286 else
41287 {
41288 velocity.X *= 0.9f;
41290 {
41291 velocity.X = 0f;
41292 }
41293 }
41296 {
41302 {
41304 {
41306 }
41307 }
41308 }
41310 {
41312 }
41314 {
41316 }
41318 {
41320 }
41324 {
41326 {
41327 for (
int k = 0;
k < 3;
k++)
41328 {
41331 {
41333 }
41335 {
41337 }
41340 {
41341 continue;
41342 }
41343 try
41344 {
41350 {
41351 velocity.Y = -5.1f;
41352 }
41354 {
41355 velocity.Y = -7.1f;
41356 }
41358 {
41359 velocity.Y = -11.1f;
41360 }
41362 {
41363 velocity.Y = -10.1f;
41364 }
41365 else
41366 {
41367 velocity.Y = -9.1f;
41368 }
41369 }
41370 catch
41371 {
41372 velocity.Y = -9.1f;
41373 }
41374 }
41376 {
41377 float num46 = vector.Y -
base.Center.Y;
41380 {
41381 velocity.Y = -6f;
41382 }
41383 else if (
num46 < 80f)
41384 {
41385 velocity.Y = -7f;
41386 }
41387 else if (
num46 < 100f)
41388 {
41389 velocity.Y = -8f;
41390 }
41391 else if (
num46 < 120f)
41392 {
41393 velocity.Y = -9f;
41394 }
41395 else if (
num46 < 140f)
41396 {
41397 velocity.Y = -10f;
41398 }
41399 else if (
num46 < 160f)
41400 {
41401 velocity.Y = -11f;
41402 }
41403 else if (
num46 < 190f)
41404 {
41405 velocity.Y = -12f;
41406 }
41407 else if (
num46 < 210f)
41408 {
41409 velocity.Y = -13f;
41410 }
41411 else if (
num46 < 270f)
41412 {
41413 velocity.Y = -14f;
41414 }
41415 else if (
num46 < 310f)
41416 {
41417 velocity.Y = -15f;
41418 }
41419 else
41420 {
41421 velocity.Y = -16f;
41422 }
41423 }
41425 {
41426 velocity.Y *= 2f;
41427 }
41428 }
41430 {
41432 for (
int l = 0;
l < 6;
l++)
41433 {
41435 obj4.velocity.X = velocity.X * 0.25f;
41437 obj4.velocity =
obj4.velocity.RotatedByRandom(0.2617993950843811);
41438 }
41439 }
41440 }
41441 else if (
type == 1018)
41442 {
41444 }
41446 {
41447 velocity.X =
num36;
41448 }
41450 {
41451 velocity.X = 0f -
num36;
41452 }
41454 {
41456 }
41458 {
41460 }
41462 {
41463 direction = ((player.Center.X >
base.Center.X) ? 1 : (-1));
41464 }
41466 {
41468 }
41470 {
41472 }
41475 {
41477 {
41480 {
41483 }
41485 {
41489 {
41492 }
41494 {
41496 }
41497 }
41498 else
41499 {
41502 }
41503 }
41505 {
41508 {
41510 }
41513 }
41514 }
41515 if (flag)
41516 {
41519 {
41521 {
41524 }
41526 {
41530 {
41533 }
41535 {
41537 }
41538 }
41539 else
41540 {
41543 }
41544 }
41546 {
41549 }
41550 }
41552 {
41555 {
41557 {
41560 {
41562 }
41565 {
41567 }
41569 {
41571 }
41573 }
41575 {
41581 {
41583 }
41586 }
41587 else
41588 {
41591 }
41592 }
41594 {
41596 {
41598 {
41601 }
41603 {
41606 }
41607 }
41608 else
41609 {
41611 {
41614 }
41616 {
41619 }
41620 }
41621 }
41622 }
41624 {
41627 {
41629 }
41632 {
41634 {
41637 }
41639 {
41643 {
41646 }
41648 {
41650 }
41651 }
41652 else
41653 {
41656 }
41657 }
41659 {
41663 {
41665 }
41666 }
41667 }
41668 velocity.Y += 0.4f +
num43 * 1f;
41670 {
41671 velocity.Y = 10f;
41672 }
41673 }
41674 if (!flag)
41675 {
41676 return;
41677 }
41680 {
41682 }
41683 if (
localAI[0] >= (
float)Main.rand.Next(900, 1200))
41684 {
41686 for (
int m = 0;
m < 6;
m++)
41687 {
41689 Main.dust[
num53].velocity /= 2f;
41690 Main.dust[
num53].scale = 0.8f;
41691 }
41693 Main.gore[
num54].velocity /= 2f;
41696 }
41697 }
static float Clamp(float value, float min, float max)
static double Cos(double d)
static byte Min(byte val1, byte val2)
static double Sqrt(double d)
static double Abs(double value)
static int Sign(decimal value)
static void PlaySound(int type, Vector2 position, int style=1)
static PlayerDeathReason ByOther(int type)
float Distance(Vector2 Other)
static ArmorShaderDataSet Armor
static readonly LegacySoundStyle Item16
static readonly LegacySoundStyle Item1
static readonly LegacySoundStyle NPCDeath59
bool IsInRangeOfMeOrMyOwner(Entity entity, float maxDistance, out float myDistance, out float playerDistance, out bool closerIsMe)
void Minion_FindTargetInRange(int startAttackRange, ref int attackTarget, bool skipIfCannotHitWithOwnBody, Func< Entity, int, bool > customEliminationCheck=null)
static float[] _CompanionCubeScreamCooldown
bool AI_067_TigerSpecialAttack()
bool AI_067_CustomEliminationCheck_Pirates(Entity otherEntity, int currentTarget)
static Color Lerp(Color value1, Color value2, float amount)
static float Distance(Vector2 value1, Vector2 value2)