54502 {
54503 float num = 0f;
54507 float num5 = 0.69f;
54509 {
54510 if (Main.player[
owner].dead)
54511 {
54512 Main.player[
owner].abigailMinion =
false;
54513 }
54514 if (Main.player[
owner].abigailMinion)
54515 {
54517 }
54519 num2 = Main.player[
owner].ownedProjectileCounts[970] - 1;
54521 num = 1.4f;
54524 }
54526 {
54528 }
54530 {
54531 if (Main.player[
owner].dead)
54532 {
54533 Main.player[
owner].hornetMinion =
false;
54534 }
54535 if (Main.player[
owner].hornetMinion)
54536 {
54538 }
54539 }
54541 {
54542 if (Main.player[
owner].dead)
54543 {
54544 Main.player[
owner].impMinion =
false;
54545 }
54546 if (Main.player[
owner].impMinion)
54547 {
54549 }
54550 }
54552 {
54553 if (Main.player[
owner].dead)
54554 {
54555 Main.player[
owner].sharknadoMinion =
false;
54556 }
54557 if (Main.player[
owner].sharknadoMinion)
54558 {
54560 }
54561 }
54563 {
54564 if (Main.player[
owner].dead)
54565 {
54566 Main.player[
owner].UFOMinion =
false;
54567 }
54568 if (Main.player[
owner].UFOMinion)
54569 {
54571 }
54572 }
54574 {
54575 if (Main.player[
owner].dead)
54576 {
54577 Main.player[
owner].stardustMinion =
false;
54578 }
54579 if (Main.player[
owner].stardustMinion)
54580 {
54582 }
54583 Lighting.AddLight(
base.Center, 0.2f, 0.6f, 0.7f);
54585 {
54587 }
54588 }
54590 {
54592 {
54596 {
54598 Main.dust[
num6].scale = 0.5f + (float)Main.rand.NextDouble() * 0.3f;
54599 Main.dust[
num6].velocity /= 2.5f;
54600 Main.dust[
num6].noGravity =
true;
54601 Main.dust[
num6].noLight =
true;
54602 Main.dust[
num6].frame.Y = 80;
54603 }
54605 {
54606 return;
54607 }
54611 velocity.Y = 0f;
54617 }
54619 {
54621 }
54623 {
54625 }
54626 }
54628 {
54630 {
54634 {
54636 {
54637 for (
int i = 0;
i < 3;
i++)
54638 {
54640 obj.noGravity = true;
54641 obj.position =
base.Center;
54642 obj.velocity *= 3f;
54644 obj.fadeIn = 1f;
54645 }
54646 }
54649 {
54651 for (
int j = 0; (float)
j <
num8;
j++)
54652 {
54654 obj2.noGravity = true;
54657 obj2.fadeIn =
num7 / 2f;
54659 }
54660 }
54661 }
54663 {
54664 return;
54665 }
54669 velocity.Y = 0f;
54674 for (
int k = 0; (float)
k <
num9;
k++)
54675 {
54677 dust.noGravity = true;
54678 dust.position = base.Center -
velocity * 5f;
54679 dust.velocity *= 3f;
54681 dust.fadeIn = 1f;
54682 if (Main.rand.Next(3) != 0)
54683 {
54684 dust.fadeIn = 2f;
54685 dust.scale = 2f;
54686 dust.velocity /= 8f;
54687 }
54688 }
54689 for (
int l = 0; (float)
l <
num9;
l++)
54690 {
54692 dust2.noGravity = true;
54693 dust2.position =
base.Center;
54694 dust2.velocity *= 3f;
54696 dust2.fadeIn = 1f;
54697 if (Main.rand.Next(3) != 0)
54698 {
54699 dust2.fadeIn = 2f;
54700 dust2.scale = 2f;
54701 dust2.velocity /= 8f;
54702 }
54703 }
54706 }
54708 {
54710 }
54712 {
54714 }
54715 }
54717 {
54719 }
54721 {
54723 }
54724 float num10 = 0.05f;
54727 {
54730 }
54731 for (
int m = 0;
m < 1000;
m++)
54732 {
54734 {
54735 if (
position.
X < Main.projectile[
m].position.X)
54736 {
54737 velocity.X -=
num10;
54738 }
54739 else
54740 {
54741 velocity.X +=
num10;
54742 }
54743 if (
position.
Y < Main.projectile[
m].position.Y)
54744 {
54745 velocity.Y -=
num10;
54746 }
54747 else
54748 {
54749 velocity.Y +=
num10;
54750 }
54751 }
54752 }
54754 float num12 = 400f;
54756 {
54758 }
54760 {
54762 }
54765 {
54767 }
54768 bool flag = false;
54772 {
54774 }
54776 {
54779 {
54782 {
54784 }
54785 }
54786 else
54787 {
54790 {
54792 }
54793 }
54794 }
54796 {
54800 {
54801 vector2.Y = 0f;
54802 }
54805 {
54810 {
54813 flag = true;
54815 }
54816 }
54817 if (!flag)
54818 {
54819 for (
int n = 0;
n < 200;
n++)
54820 {
54822 if (
nPC.CanBeChasedBy(
this))
54823 {
54827 {
54830 flag = true;
54832 }
54833 }
54834 }
54835 }
54836 }
54837 else
54838 {
54841 {
54845 {
54846 bool flag2 =
false;
54847 if ((
type != 963) ? Collision.CanHitLine(
position,
width,
height,
ownerMinionAttackTargetNPC2.position,
ownerMinionAttackTargetNPC2.width,
ownerMinionAttackTargetNPC2.height) : Collision.CanHit(
base.
Center, 1, 1,
ownerMinionAttackTargetNPC2.
Center, 1, 1))
54848 {
54851 flag = true;
54853 }
54854 }
54855 }
54856 if (!flag)
54857 {
54859 {
54861 if (!
nPC2.CanBeChasedBy(
this))
54862 {
54863 continue;
54864 }
54867 {
54868 bool flag3 =
false;
54869 if ((
type != 963) ? Collision.CanHitLine(
position,
width,
height,
nPC2.position,
nPC2.width,
nPC2.height) : Collision.CanHit(
base.
Center, 1, 1,
nPC2.
Center, 1, 1))
54870 {
54873 flag = true;
54875 }
54876 }
54877 }
54878 }
54879 }
54882 {
54884 }
54885 if (flag)
54886 {
54888 }
54889 if (flag &&
type == 423)
54890 {
54892 }
54893 if (flag &&
type == 613)
54894 {
54896 }
54899 {
54902 }
54904 {
54906 }
54907 bool flag4 =
false;
54909 {
54911 }
54913 {
54915 {
54917 }
54918 else
54919 {
54922 {
54924 }
54925 }
54926 }
54928 {
54930 }
54931 bool flag5 =
false;
54933 {
54935 }
54937 {
54938 if (
ai[0] == 2f &&
type == 963)
54939 {
54941 }
54944 {
54946 }
54947 if (!flag)
54948 {
54950 }
54952 {
54955 if (flag &&
type == 963 && (
vector -
base.Center).Length() < 50f)
54956 {
54958 }
54959 }
54961 }
54962 else if (flag && (
flag5 ||
ai[0] == 0f))
54963 {
54968 {
54969 v =
vector - Vector2.UnitY * 80f;
54970 int num23 = (int)v.
Y / 16;
54972 {
54974 }
54975 Tile tile = Main.tile[(int)v.
X / 16,
num23];
54976 if (tile != null && tile.active() && Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type])
54977 {
54978 v += Vector2.UnitY * 16f;
54979 tile = Main.tile[(int)v.
X / 16, (
int)v.Y / 16];
54980 if (tile != null && tile.active() && Main.tileSolid[tile.type] && !Main.tileSolidTop[tile.type])
54981 {
54982 v += Vector2.UnitY * 16f;
54983 }
54984 }
54989 {
54995 return;
54996 }
54997 }
54999 {
55003 {
55005 }
55008 int num24 = (int)v.Y / 16;
55010 {
55012 }
55014 if (
tile2 !=
null &&
tile2.active() && Main.tileSolid[
tile2.type] && !Main.tileSolidTop[
tile2.type])
55015 {
55016 v += Vector2.UnitY * 16f;
55017 tile2 = Main.tile[(int)v.X / 16, (
int)v.Y / 16];
55018 if (
tile2 !=
null &&
tile2.active() && Main.tileSolid[
tile2.type] && !Main.tileSolidTop[
tile2.type])
55019 {
55020 v += Vector2.UnitY * 16f;
55021 }
55022 }
55024 num22 = v.Length();
55027 {
55033 return;
55034 }
55035 }
55037 {
55039 {
55043 }
55044 else
55045 {
55047 }
55048 }
55050 {
55054 velocity.X = (velocity.X *
num27 + v.X) / (
num27 + 1f);
55055 velocity.Y = (velocity.Y *
num27 + v.Y) / (
num27 + 1f);
55056 }
55057 else if (
type == 963)
55058 {
55060 {
55064 }
55065 else
55066 {
55070 }
55071 }
55072 else if (
type == 423 ||
type == 613)
55073 {
55075 {
55078 {
55080 }
55084 {
55085 velocity.X = (velocity.X * 10f + v.X) / 11f;
55086 }
55087 }
55088 else
55089 {
55091 }
55092 }
55093 else if (
type == 375)
55094 {
55096 {
55099 velocity.X = (velocity.X * 40f + v.X) / 41f;
55100 velocity.Y = (velocity.Y * 40f + v.Y) / 41f;
55101 }
55102 else
55103 {
55105 }
55106 }
55108 {
55109 velocity.Y -= 0.1f;
55110 }
55111 }
55112 else
55113 {
55114 if (
type != 963 && !Collision.CanHitLine(
base.Center, 1, 1, Main.player[
owner].Center, 1, 1))
55115 {
55117 }
55120 {
55122 }
55124 {
55126 }
55128 {
55130 }
55134 {
55136 }
55138 {
55140 }
55142 {
55148 {
55149 if (Main.projectile[
num33].active && Main.projectile[
num33].owner ==
owner && Main.projectile[
num33].type ==
type)
55150 {
55152 }
55153 }
55154 v2.X -= 10 * Main.player[
owner].direction;
55155 v2.X -=
num32 * 40 * Main.player[
owner].direction;
55156 v2.Y -= 10f;
55157 }
55160 {
55162 }
55164 {
55166 }
55168 {
55170 }
55172 {
55175 }
55177 {
55178 position.X = Main.player[
owner].Center.X - (float)(
width / 2);
55179 position.Y = Main.player[
owner].Center.Y - (float)(
width / 2);
55180 }
55182 {
55184 {
55187 {
55189 }
55192 }
55193 else
55194 {
55197 }
55198 }
55199 else if (
type == 407)
55200 {
55202 {
55207 }
55208 else
55209 {
55211 {
55212 velocity.X = -0.15f;
55213 velocity.Y = -0.05f;
55214 }
55216 }
55217 }
55218 else if (
num34 > 70f)
55219 {
55223 }
55224 else
55225 {
55227 {
55228 velocity.X = -0.15f;
55229 velocity.Y = -0.05f;
55230 }
55232 }
55234 {
55235 float x = Main.player[
owner].velocity.
X;
55236 float y = Main.player[
owner].velocity.Y;
55237 if ((
velocity.
X < 0f && x >= 0f) || (velocity.X >= 0f && x < 0f))
55238 {
55239 velocity.X *= 0.95f;
55240 }
55241 else
55242 {
55243 velocity.X += x * 0.125f;
55244 }
55245 if ((
velocity.
Y < 0f && y >= 0f) || (velocity.Y >= 0f && y < 0f))
55246 {
55247 velocity.Y *= 0.95f;
55248 }
55249 else
55250 {
55251 velocity.Y += y * 0.125f;
55252 }
55254 {
55256 }
55257 }
55258 }
55262 {
55264 {
55267 }
55269 {
55271 }
55272 }
55274 {
55276 {
55279 {
55281 }
55285 {
55288 }
55290 {
55291 case 0:
55292 case 1:
55293 case 2:
55295 break;
55296 case 3:
55297 case 5:
55298 case 7:
55300 break;
55301 default:
55303 break;
55304 }
55305 if (Main.rand.Next(2) == 0)
55306 {
55307 float num36 = 1.1f + Main.rand.NextFloat() * 0.3f;
55308 float num37 = 1.4f + Main.rand.NextFloat() * 0.4f;
55313 Main.dust[
num39].noGravity =
true;
55314 }
55315 }
55316 else
55317 {
55319 {
55322 }
55324 {
55328 {
55330 }
55331 }
55332 }
55333 }
55335 {
55337 {
55339 }
55341 if (
ai[1] > 0f &&
ai[1] < 16f)
55342 {
55344 }
55345 if (Main.rand.Next(6) == 0)
55346 {
55348 Main.dust[
num40].velocity *= 0.3f;
55349 Main.dust[
num40].noGravity =
true;
55350 Main.dust[
num40].noLight =
true;
55351 }
55352 }
55354 {
55357 {
55359 }
55361 if (Main.rand.Next(5) == 0)
55362 {
55364 Main.dust[
num42].velocity *= 0.3f;
55365 Main.dust[
num42].noGravity =
true;
55366 Main.dust[
num42].noLight =
true;
55367 }
55368 }
55370 {
55373 {
55375 }
55377 }
55379 {
55381 }
55383 {
55385 }
55387 {
55390 {
55392 }
55393 }
55395 {
55397 {
55398 ai[1] += Main.rand.Next(1, 4);
55399 }
55401 if (Main.player[
owner].strongBees)
55402 {
55404 }
55406 {
55409 }
55410 }
55411 else if (
type == 375)
55412 {
55414 {
55416 if (Main.rand.Next(3) == 0)
55417 {
55419 }
55420 }
55422 {
55425 }
55426 }
55427 else if (
type == 407)
55428 {
55430 {
55432 if (Main.rand.Next(3) != 0)
55433 {
55435 }
55436 }
55438 {
55441 }
55442 }
55443 else if (
type == 423)
55444 {
55446 {
55448 if (Main.rand.Next(3) != 0)
55449 {
55451 }
55452 }
55454 {
55457 }
55458 }
55459 else if (
type == 613)
55460 {
55462 {
55464 if (Main.rand.Next(3) != 0)
55465 {
55467 }
55468 }
55470 {
55473 }
55474 }
55476 {
55477 return;
55478 }
55482 {
55485 }
55486 else if (
type == 375)
55487 {
55490 }
55491 else if (
type == 407)
55492 {
55495 }
55496 else if (
type == 423)
55497 {
55500 }
55501 else if (
type == 613)
55502 {
55505 }
55506 if (!flag)
55507 {
55508 return;
55509 }
55511 {
55513 {
55515 }
55517 {
55519 }
55520 }
55522 {
55523 return;
55524 }
55526 {
55528 {
55530 }
55531 if (!((
vector -
base.Center).Length() > 400f) &&
ai[1] == 0f)
55532 {
55534 if (Main.myPlayer ==
owner)
55535 {
55541 }
55542 }
55543 }
55544 else if (
ai[1] == 0f &&
type == 613)
55545 {
55546 if ((
vector -
base.Center).Length() > 500f ||
ai[1] != 0f)
55547 {
55548 return;
55549 }
55551 if (Main.myPlayer ==
owner)
55552 {
55556 int num47 =
NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y,
v4.X,
v4.Y,
num46,
damage,
knockBack, Main.myPlayer, 0f,
num13);
55557 Main.projectile[
num47].timeLeft = 300;
55558 Main.projectile[
num47].netUpdate =
true;
55561 }
55563 {
55565 _ = ((float)Main.rand.NextDouble() * ((float)
Math.
PI * 2f)).ToRotationVector2() * Main.rand.Next(24, 41) / 8f;
55571 {
55572 dust3.velocity =
vector7 *
dust3.velocity.Length() * 2f;
55573 }
55574 else
55575 {
55576 dust3.velocity = 2f *
vector7 * Main.rand.Next(45, 91) / 10f;
55577 }
55578 dust3.noGravity = true;
55579 dust3.scale = 0.7f + Main.rand.NextFloat();
55580 }
55581 }
55582 else if (
ai[1] == 0f)
55583 {
55586 if (Main.myPlayer ==
owner)
55587 {
55591 Main.projectile[
num51].timeLeft = 300;
55592 Main.projectile[
num51].netUpdate =
true;
55594 }
55595 }
55596 }
static byte Min(byte val1, byte val2)
static double Abs(double value)
static byte Max(byte val1, byte val2)
static void PlaySound(int type, Vector2 position, int style=1)
static readonly LegacySoundStyle AbigailCry
static readonly LegacySoundStyle AbigailAttack
IEntitySource GetProjectileSource_FromThis()
NPC OwnerMinionAttackTargetNPC
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)
static float Distance(Vector2 value1, Vector2 value2)