53293 {
53294 if (
type == 1 && (
ai[1] == 1f ||
ai[1] == 2f ||
ai[1] == 3f))
53295 {
53297 }
53298 if (
type == 1 &&
ai[1] == 75f)
53299 {
53300 float num = 0.3f;
53301 Lighting.AddLight((
int)(
base.Center.X / 16f), (
int)(
base.Center.Y / 16f), 0.8f * num, 0.7f * num, 0.1f * num);
53302 if (Main.rand.Next(12) == 0)
53303 {
53304 Dust dust = Dust.NewDustPerfect(
base.Center +
new Vector2(0f, (
float)
height * 0.2f) + Main.rand.NextVector2CircularEdge(
width, (
float)
height * 0.6f) * (0.3f + Main.rand.NextFloat() * 0.5f), 228,
new Vector2(0f, (0f - Main.rand.NextFloat()) * 0.3f - 1.5f), 127);
53305 dust.scale = 0.5f;
53306 dust.fadeIn = 1.1f;
53307 dust.noGravity = true;
53308 dust.noLight = true;
53309 }
53310 }
53311 if (
type == 1 &&
ai[1] == 0f && Main.netMode != 1 &&
value > 0f)
53312 {
53314 if (Main.remixWorld &&
ai[0] != -999f && Main.rand.Next(3) == 0)
53315 {
53318 }
53319 else if (Main.rand.Next(20) == 0)
53320 {
53324 }
53325 }
53326 if (
type == 1 &&
ai[0] == -999f)
53327 {
53328 frame.Y = 0;
53331 return;
53332 }
53334 {
53335 float num3 = (float)Main.DiscoR / 255f;
53336 float num4 = (float)Main.DiscoG / 255f;
53337 float num5 = (float)Main.DiscoB / 255f;
53343 }
53344 bool flag = false;
53345 if (!Main.dayTime ||
life !=
lifeMax || (
double)
position.
Y > Main.worldSurface * 16.0 || Main.slimeRain)
53346 {
53347 flag = true;
53348 }
53350 {
53351 flag = false;
53352 }
53354 {
53355 flag = true;
53356 if (Main.rand.Next(30) == 0)
53357 {
53360 Main.dust[
num6].velocity *= 0.3f;
53362 }
53363 }
53365 {
53366 flag = true;
53367 }
53369 {
53370 flag = true;
53371 }
53373 {
53374 flag = true;
53375 }
53377 {
53378 flag = true;
53379 }
53381 {
53382 flag = true;
53384 }
53385 if (
type == 147 && Main.rand.Next(10) == 0)
53386 {
53389 Main.dust[
num7].noGravity =
true;
53390 Main.dust[
num7].velocity *= 0.1f;
53392 }
53394 {
53396 Lighting.AddLight((
int)(
base.Center.X / 16f), (
int)(
base.Center.Y / 16f), (
float)(
int)
color.
R / 255f * 1.1f, (
float)(
int)
color.
G / 255f * 1.1f, (
float)(
int)
color.
B / 255f * 1.1f);
53398 {
53405 Main.dust[
num11].noGravity =
true;
53406 Main.dust[
num11].noLightEmittence =
true;
53407 Main.dust[
num11].velocity *= 0.2f;
53408 Main.dust[
num11].scale = 1.5f;
53410 }
53411 }
53413 {
53414 Lighting.AddLight(
base.Center, 23);
53415 if ((
velocity.
Length() > 1f && Main.rand.Next(3) == 0) || Main.rand.Next(5) == 0)
53416 {
53417 Dust
dust2 = Dust.NewDustPerfect(Main.rand.NextVector2FromRectangle(
base.Hitbox), 306);
53418 dust2.noGravity = true;
53419 dust2.noLightEmittence = true;
53420 dust2.alpha = 127;
53421 dust2.color = Main.hslToRgb(((float)Main.timeForVisualEffects / 300f + Main.rand.NextFloat() * 0.1f) % 1f, 1f, 0.65f);
53422 dust2.color.A = 0;
53423 dust2.velocity = dust2.position -
base.Center;
53424 dust2.velocity *= 0.1f;
53425 dust2.velocity.X *= 0.25f;
53426 if (
dust2.velocity.Y > 0f)
53427 {
53428 dust2.velocity.Y *= -1f;
53429 }
53430 dust2.scale = Main.rand.NextFloat() * 0.3f + 0.5f;
53431 dust2.fadeIn = 0.9f;
53433 }
53434 }
53436 {
53437 if (Main.rand.Next(8) == 0)
53438 {
53441 Main.dust[
num12].noGravity =
true;
53442 Main.dust[
num12].velocity *= 0.15f;
53444 }
53445 flag = true;
53447 {
53449 }
53451 {
53457 {
53460 {
53461 velocity.X *= 0.9f;
53462 }
53463 if (Main.netMode != 1 &&
localAI[0] == 0f)
53464 {
53465 for (
int i = 0;
i < 5;
i++)
53466 {
53468 vector3.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f;
53469 vector3.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f;
53471 vector3 *= 4f + (float)Main.rand.Next(-50, 51) * 0.01f;
53475 }
53476 }
53477 }
53479 {
53482 {
53483 velocity.X *= 0.9f;
53484 }
53485 if (Main.netMode != 1 &&
localAI[0] == 0f)
53486 {
53487 num14 = Main.player[
target].position.Y - vector2.Y - (float)Main.rand.Next(0, 200);
53494 }
53495 }
53496 }
53497 }
53499 {
53500 flag = true;
53502 {
53504 }
53506 {
53512 {
53515 {
53516 velocity.X *= 0.9f;
53517 }
53518 if (Main.netMode != 1 &&
localAI[0] == 0f)
53519 {
53520 for (
int j = 0;
j < 5;
j++)
53521 {
53523 vector5.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f;
53524 vector5.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f;
53526 vector5 *= 4f + (float)Main.rand.Next(-50, 51) * 0.01f;
53530 }
53531 }
53532 }
53534 {
53537 {
53538 velocity.X *= 0.9f;
53539 }
53540 if (Main.netMode != 1 &&
localAI[0] == 0f)
53541 {
53542 num17 = Main.player[
target].position.Y - vector4.Y - (float)Main.rand.Next(0, 200);
53549 }
53550 }
53551 }
53552 }
53554 {
53555 flag = true;
53557 {
53559 }
53561 {
53569 {
53572 {
53573 velocity.X *= 0.9f;
53574 }
53575 if (Main.netMode != 1 &&
localAI[0] == 0f)
53576 {
53577 for (
int k = 0;
k < 3;
k++)
53578 {
53580 vector6.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f;
53581 vector6.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f;
53583 vector6 *= 6f + (float)Main.rand.Next(-50, 51) * 0.01f;
53585 {
53587 }
53588 else if (
num21 > 250f)
53589 {
53591 }
53596 {
53597 break;
53598 }
53599 }
53600 }
53601 }
53603 {
53607 {
53608 velocity.X *= 0.9f;
53609 }
53610 if (Main.netMode != 1 &&
localAI[0] == 0f)
53611 {
53612 num20 = Main.player[
target].position.Y - center.Y - (float)Main.rand.Next(0, 200);
53617 {
53619 }
53620 else if (
num23 > 250f)
53621 {
53623 }
53629 }
53630 }
53631 }
53632 }
53634 {
53635 flag = true;
53637 {
53639 }
53641 {
53649 {
53652 {
53653 velocity.X *= 0.9f;
53654 }
53655 if (Main.netMode != 1 &&
localAI[0] == 0f)
53656 {
53657 num25 = Main.player[
target].position.Y - center2.Y - (float)Main.rand.Next(0, 200);
53662 {
53664 }
53665 else if (
num27 > 250f)
53666 {
53668 }
53672 if (Main.expertMode)
53673 {
53675 }
53678 }
53679 }
53680 }
53681 }
53683 {
53684 flag = true;
53686 {
53688 }
53690 {
53696 {
53699 {
53700 velocity.X *= 0.9f;
53701 }
53702 if (Main.netMode != 1 &&
localAI[0] == 0f)
53703 {
53704 for (
int l = 0;
l < 5;
l++)
53705 {
53707 vector8.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.02f;
53708 vector8.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.02f;
53710 vector8 *= 3f + (float)Main.rand.Next(-50, 51) * 0.01f;
53714 }
53715 }
53716 }
53718 {
53721 {
53722 velocity.X *= 0.9f;
53723 }
53724 if (Main.netMode != 1 &&
localAI[0] == 0f)
53725 {
53726 num29 = Main.player[
target].position.Y - vector7.Y - (float)Main.rand.Next(-30, 20);
53728 num28 = Main.player[
target].position.X - vector7.X - (float)Main.rand.Next(-20, 20);
53735 }
53736 }
53737 }
53738 }
53740 {
53742 {
53744 }
53745 else
53746 {
53748 }
53749 }
53751 {
53753 Lighting.AddLight((
int)((position.X + (float)(
width / 2)) / 16f), (int)((
position.
Y + (
float)(
height / 2)) / 16f), 1f, 0.3f, 0.1f);
53755 Main.dust[
num31].noGravity =
true;
53757 }
53759 {
53761 }
53763 {
53765 {
53766 velocity.Y = -2f;
53767 }
53769 {
53772 }
53774 {
53776 }
53777 if (
type == 59 && !Main.remixWorld)
53778 {
53780 {
53781 velocity.Y *= 0.9f;
53782 }
53784 {
53785 velocity.Y -= 0.8f;
53786 }
53787 velocity.Y -= 0.5f;
53789 {
53790 velocity.Y = -10f;
53791 }
53792 }
53793 else
53794 {
53796 {
53797 velocity.Y *= 0.9f;
53798 }
53799 velocity.Y -= 0.5f;
53801 {
53802 velocity.Y = -4f;
53803 }
53804 }
53805 if (
ai[2] == 1f && flag)
53806 {
53808 }
53809 }
53812 {
53816 }
53818 {
53820 {
53821 position.X -= velocity.X + (float)
direction;
53822 }
53824 {
53827 }
53829 velocity.X *= 0.8f;
53830 if ((
double)velocity.X > -0.1 && (double)
velocity.
X < 0.1)
53831 {
53832 velocity.X = 0f;
53833 }
53834 if (flag)
53835 {
53837 }
53839 if (
type == 59 && !Main.remixWorld)
53840 {
53842 }
53844 {
53846 }
53848 {
53850 }
53852 {
53854 }
53856 {
53858 }
53860 {
53862 }
53864 {
53866 }
53868 {
53871 }
53873 {
53875 }
53877 {
53879 {
53881 }
53882 else
53883 {
53885 }
53886 }
53887 float num33 = -1000f;
53889 {
53891 }
53893 {
53895 }
53898 {
53900 }
53902 {
53904 }
53906 {
53908 }
53910 {
53912 if (flag &&
ai[2] == 1f)
53913 {
53915 }
53917 {
53918 velocity.Y = -8f;
53919 if (
type == 59 && !Main.remixWorld)
53920 {
53921 velocity.Y -= 2f;
53922 }
53924 if (
type == 59 && !Main.remixWorld)
53925 {
53927 }
53930 }
53931 else
53932 {
53933 velocity.Y = -6f;
53935 if (
type == 59 && !Main.remixWorld)
53936 {
53938 }
53941 {
53943 }
53944 else
53945 {
53947 }
53948 }
53950 {
53951 velocity.Y *= 1.6f;
53952 velocity.X *= 1.2f;
53953 }
53955 {
53956 velocity.Y *= 0.5f;
53957 velocity.X *= 0.2f;
53958 if (Main.rand.Next(2) == 0)
53959 {
53961 }
53962 }
53964 {
53965 velocity.Y *= 1.3f;
53966 velocity.X *= 1.2f;
53967 }
53969 {
53970 velocity.Y *= 0.9f;
53971 velocity.X *= 0.6f;
53972 if (flag)
53973 {
53975 velocity.X *= -1f;
53976 }
53977 int i2 = (int)(
base.Center.X / 16f);
53978 int j2 = (int)(
base.Center.Y / 16f) - 1;
53980 {
53981 velocity.Y = -(16 -
height);
53982 }
53983 }
53984 }
53985 else if (
ai[0] >= -30f)
53986 {
53988 }
53989 }
53991 {
53993 {
53995 }
53997 {
53998 position.X -= velocity.X + (float)
direction;
53999 }
54001 {
54003 }
54004 else
54005 {
54006 velocity.X *= 0.93f;
54007 }
54008 }
54009 }
static double Sqrt(double d)
static double Abs(double value)
int GetAttackDamage_ForProjectiles_MultiLerp(float normalDamage, float expertDamage, float masterDamage)
static int CountNPCS(int Type)
void AI_001_SetRainbowSlimeColor()
void TargetClosest(bool faceTarget=true)
static int AI_001_Slimes_GenerateItemInsideBody(bool isBallooned)
int GetAttackDamage_ForProjectiles(float normalDamage, float expertDamage)
IEntitySource GetSpawnSource_ForProjectile()
static float Distance(Vector2 value1, Vector2 value2)