39150 {
39156 float num = 0.5f;
39159 float num4 = 6400f;
39167 bool flag2 = Main.expertMode;
39171 {
39173 }
39180 if (flag)
39181 {
39192 }
39199 {
39206 }
39210 if (flag)
39211 {
39213 }
39215 {
39217 }
39218 switch ((
int)this.
ai[0])
39219 {
39220 case 0:
39221 if (this.
ai[1] == 0f)
39222 {
39224 if (Main.netMode != 1)
39225 {
39227 }
39228 }
39229 if (this.
ai[1] == 10f)
39230 {
39232 }
39234 if (this.
ai[1] > 10f && this.
ai[1] < 150f)
39235 {
39238 {
39242 Main.dust[
num69].position = base.Center + Main.rand.NextVector2Circular((
float)
width * 3f, (
float)
height * 3f) +
new Vector2(0f, -150f);
39243 Main.dust[
num69].velocity *= Main.rand.NextFloat() * 0.8f;
39244 Main.dust[
num69].noGravity =
true;
39245 Main.dust[
num69].fadeIn = 0.6f + Main.rand.NextFloat() * 0.7f *
num68;
39246 Main.dust[
num69].velocity += Vector2.UnitY * 3f;
39247 Main.dust[
num69].scale = 0.35f;
39249 {
39251 dust2.scale /= 2f;
39252 dust2.fadeIn *= 0.85f;
39253 dust2.color =
new Color(255, 255, 255, 255);
39254 }
39255 }
39256 }
39261 if (this.
ai[1] >= 180f)
39262 {
39264 {
39266 }
39271 }
39272 break;
39273 case 1:
39274 {
39275 float num34 = (flag ? 20f : 45f);
39276 if (Main.getGoodWorld)
39277 {
39279 }
39280 if (this.
ai[1] <= 10f)
39281 {
39282 if (this.
ai[1] == 0f)
39283 {
39285 }
39288 {
39294 break;
39295 }
39299 }
39301 {
39303 }
39306 if (!(this.
ai[1] >= num34))
39307 {
39308 break;
39309 }
39313 if (!flag)
39314 {
39326 {
39328 }
39330 {
39332 }
39334 {
39336 }
39338 {
39340 }
39342 {
39344 }
39346 {
39348 }
39350 {
39352 }
39354 {
39356 }
39358 {
39360 }
39362 {
39364 }
39366 {
39368 }
39369 }
39370 if (flag)
39371 {
39377 {
39379 }
39387 {
39389 }
39391 {
39393 }
39395 {
39397 }
39399 {
39401 }
39403 {
39405 }
39407 {
39409 }
39411 {
39413 }
39415 {
39417 }
39419 {
39421 }
39423 {
39425 }
39427 {
39429 }
39430 }
39435 {
39436 if (!Main.dayTime)
39437 {
39439 }
39440 if (Main.dayTime && Main.time >= 53400.0)
39441 {
39443 }
39444 }
39446 {
39448 }
39450 {
39452 }
39454 {
39456 }
39457 this.
ai[0] = num36;
39461 break;
39462 }
39463 case 2:
39464 {
39465 if (this.
ai[1] == 0f)
39466 {
39468 }
39474 {
39476 }
39477 if (this.
ai[1] < 60f)
39478 {
39480 }
39483 {
39485 }
39486 if ((
int)this.
ai[1] % num91 == 0 && this.
ai[1] < 60f)
39487 {
39488 float ai3 = this.
ai[1] / 60f;
39491 {
39493 }
39494 if (Main.netMode != 1)
39495 {
39497 }
39498 if (Main.netMode != 1)
39499 {
39500 int num92 = (int)(this.
ai[1] / (
float)num91);
39502 {
39504 {
39506 }
39507 }
39508 }
39509 }
39511 if (this.
ai[1] >= 60f +
num90)
39512 {
39516 }
39517 break;
39518 }
39519 case 3:
39520 {
39525 {
39527 }
39528 if ((
int)this.
ai[1] % 180 == 0)
39529 {
39532 }
39533 if (this.
ai[1] >= 120f)
39534 {
39538 }
39539 break;
39540 }
39541 case 4:
39542 {
39545 if (this.
ai[1] == 0f)
39546 {
39548 }
39549 if (this.
ai[1] >= 6f && this.
ai[1] < 54f)
39550 {
39553 }
39557 {
39559 }
39562 {
39564 }
39565 if ((
int)this.
ai[1] % 4 == 0 && this.
ai[1] < 100f)
39566 {
39570 {
39571 int num85 = (int)this.
ai[1] / 4;
39574 {
39575 vector30.X += ((vector30.X > 0f) ? 0.5f : (-0.5f));
39576 }
39578 float num86 = 300f;
39580 {
39582 }
39585 {
39586 continue;
39587 }
39589 {
39591 }
39596 {
39599 {
39601 }
39603 }
39605 if (Main.netMode != 1)
39606 {
39608 }
39609 if (Main.netMode == 1)
39610 {
39611 continue;
39612 }
39613 int num88 = (int)(this.
ai[1] / 4f);
39615 {
39617 {
39618 continue;
39619 }
39623 {
39625 }
39629 {
39632 {
39634 }
39636 }
39639 }
39640 }
39641 }
39643 if (this.
ai[1] >= 100f +
num81)
39644 {
39648 }
39649 break;
39650 }
39651 case 5:
39652 {
39653 if (this.
ai[1] == 0f)
39654 {
39656 }
39661 if (this.
ai[1] < 42f)
39662 {
39664 }
39668 {
39670 }
39671 if ((
int)this.
ai[1] % 42 == 0 && this.
ai[1] < 42f)
39672 {
39673 float num64 = (float)
Math.
PI * 2f * Main.rand.NextFloat();
39675 {
39678 if (Main.netMode != 1)
39679 {
39681 }
39682 }
39683 }
39685 if (this.
ai[1] >= 42f +
num63)
39686 {
39690 }
39691 break;
39692 }
39693 case 6:
39694 {
39701 {
39703 }
39704 if ((
int)this.
ai[1] % 60 == 0 && this.
ai[1] < 180f)
39705 {
39706 int num26 = (int)this.
ai[1] / 60;
39707 int num27 = ((targetData2.Center.X >
base.Center.X) ? 1 : 0);
39710 {
39712 }
39715 {
39718 if (Main.netMode != 1)
39719 {
39721 }
39722 }
39723 }
39724 this.ai[1] += 1f;
39725 if (this.ai[1] >= 180f +
num25)
39726 {
39727 this.ai[0] = 1f;
39728 this.ai[1] = 0f;
39730 }
39731 break;
39732 }
39733 case 7:
39734 {
39739 {
39743 }
39748 {
39750 }
39751 if ((
float)(
int)this.ai[1] %
num71 == 0f && this.ai[1] <
num72)
39752 {
39754 Main.rand.NextFloat();
39757 float num75 = 150f;
39761 {
39764 float num77 = 0.4f;
39765 float num78 = 1.4f;
39768 {
39773 }
39775 {
39776 case 0:
39780 break;
39781 case 1:
39785 break;
39786 case 2:
39790 break;
39791 case 3:
39795 break;
39796 case 4:
39800 break;
39801 case 5:
39805 break;
39806 }
39808 {
39812 {
39816 }
39818 if (Main.netMode != 1)
39819 {
39821 }
39822 }
39823 }
39824 }
39825 this.ai[1] += 1f;
39827 {
39828 this.ai[0] = 1f;
39829 this.ai[1] = 0f;
39831 }
39832 break;
39833 }
39834 case 8:
39835 case 9:
39836 {
39840 flag6 = !(this.ai[1] >= 6f) || !(this.ai[1] <= 40f);
39841 int num33 = ((this.ai[0] != 8f) ? 1 : (-1));
39843 if (this.ai[1] <= 40f)
39844 {
39845 if (this.ai[1] == 20f)
39846 {
39848 }
39852 if (this.ai[1] == 40f)
39853 {
39855 }
39856 }
39857 else if (this.ai[1] <= 90f)
39858 {
39860 if (this.ai[1] == 90f)
39861 {
39863 }
39865 }
39866 else
39867 {
39869 }
39870 this.ai[1] += 1f;
39871 if (this.ai[1] >= 90f +
num32)
39872 {
39873 this.ai[0] = 1f;
39874 this.ai[1] = 0f;
39876 }
39877 break;
39878 }
39879 case 10:
39880 {
39882 if (this.ai[1] == 0f)
39883 {
39885 }
39886 flag6 = !(this.ai[1] >= 30f) || !(this.ai[1] <= 170f);
39888 if (this.ai[1] == 90f)
39889 {
39890 if (this.ai[3] == 0f)
39891 {
39892 this.ai[3] = 1f;
39893 }
39894 if (this.ai[3] == 2f)
39895 {
39896 this.ai[3] = 3f;
39897 }
39900 }
39901 this.ai[1] += 1f;
39902 if (this.ai[1] >= 180f +
num94)
39903 {
39904 this.ai[0] = 1f;
39905 this.ai[1] = 0f;
39906 this.ai[2] = 0f;
39908 }
39909 break;
39910 }
39911 case 11:
39912 {
39913 if (this.ai[1] == 0f)
39914 {
39916 }
39919 if (this.ai[1] >= 6f && this.ai[1] < 54f)
39920 {
39923 }
39927 {
39929 }
39930 if ((int)this.ai[1] % 3 == 0 && this.ai[1] < 100f)
39931 {
39934 {
39937 float num60 = 100f;
39940 {
39941 continue;
39942 }
39947 {
39950 {
39952 }
39954 }
39956 if (Main.netMode != 1)
39957 {
39959 }
39960 if (Main.netMode == 1)
39961 {
39962 continue;
39963 }
39964 int num62 = (int)(this.ai[1] / 3f);
39965 for (
int l = 0;
l < 255;
l++)
39966 {
39968 {
39969 continue;
39970 }
39971 Player player = Main.player[
l];
39980 {
39983 {
39985 }
39987 }
39990 }
39991 }
39992 }
39993 this.ai[1] += 1f;
39994 if (this.ai[1] >= 100f +
num58)
39995 {
39996 this.ai[0] = 1f;
39997 this.ai[1] = 0f;
39999 }
40000 break;
40001 }
40002 case 12:
40003 {
40006 if (this.ai[1] == 0f)
40007 {
40010 }
40012 bool flag11 = this.ai[1] < 60f && this.ai[1] >= 10f;
40014 {
40016 }
40019 {
40021 }
40022 float num23 = (this.ai[1] - 10f) / 50f;
40024 {
40025 _ = this.ai[1] / 60f;
40027 if (Main.netMode != 1)
40028 {
40030 }
40031 if (Main.netMode != 1)
40032 {
40033 int num24 = (int)(this.ai[1] % (
float)
num22);
40034 for (
int j = 0;
j < 255;
j++)
40035 {
40037 {
40039 }
40040 }
40041 }
40042 }
40043 this.ai[1] += 1f;
40044 if (this.ai[1] >= 60f +
num21)
40045 {
40046 this.ai[0] = 1f;
40047 this.ai[1] = 0f;
40049 }
40050 break;
40051 }
40052 case 13:
40053 {
40055 if (this.ai[1] == 0f)
40056 {
40059 }
40064 bool flag7 =
false;
40065 bool flag8 =
false;
40067 {
40069 {
40070 if (!Main.dayTime)
40071 {
40073 }
40074 if (Main.dayTime && Main.time >= 53400.0)
40075 {
40077 }
40078 }
40080 }
40082 {
40085 }
40089 for (
int i = 0;
i <
num18;
i++)
40090 {
40092 Color newColor = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.5f);
40094 Main.dust[
num20].position = base.Center + Main.rand.NextVector2Circular(
width,
height);
40095 Main.dust[
num20].velocity *= Main.rand.NextFloat() * 0.8f;
40096 Main.dust[
num20].noGravity =
true;
40097 Main.dust[
num20].scale = 0.9f + Main.rand.NextFloat() * 1.2f;
40098 Main.dust[
num20].fadeIn = 0.4f + Main.rand.NextFloat() * 1.2f *
num19;
40099 Main.dust[
num20].velocity += Vector2.UnitY * -2f;
40100 Main.dust[
num20].scale = 0.35f;
40102 {
40103 Dust dust = Dust.CloneDust(
num20);
40104 dust.scale /= 2f;
40105 dust.fadeIn *= 0.85f;
40106 dust.color =
new Color(255, 255, 255, 255);
40107 }
40108 }
40109 this.ai[1] += 1f;
40110 if (!(this.ai[1] >= 20f &&
flag10))
40111 {
40112 break;
40113 }
40115 {
40117 if (Main.netMode != 1)
40118 {
40119 NetMessage.SendData(23, -1, -1,
null,
whoAmI);
40120 }
40121 return;
40122 }
40123 this.ai[0] = 1f;
40124 this.ai[1] = 0f;
40126 break;
40127 }
40128 }
40132 {
40134 }
40135 if (flag)
40136 {
40138 }
40139 else
40140 {
40142 }
40143 if ((
localAI[0] += 1f) >= 44f)
40144 {
40146 }
40148 {
40150 }
40152 }
static float Lerp(float value1, float value2, float amount)
static float Clamp(float value, float min, float max)
static void PlaySound(int type, Vector2 position, int style=1)
Vector2 DirectionFrom(Vector2 Source)
float Distance(Vector2 Other)
Vector2 DirectionTo(Vector2 Destination)
static readonly LegacySoundStyle Item163
static readonly LegacySoundStyle Item161
static readonly LegacySoundStyle Item165
static readonly LegacySoundStyle Item164
static readonly LegacySoundStyle Item160
static readonly LegacySoundStyle Item162
void AI_120_HallowBoss_DashTo(Vector2 targetPosition)
bool Boss_CanShootExtraAt(int playerIndex, int rotationIndexToAttack, int rotationSize, float attackScanDistance, bool alwaysSkipMainTarget=true)
void TargetClosest(bool faceTarget=true)
bool AI_120_HallowBoss_IsGenuinelyEnraged()
static bool ShouldEmpressBeEnraged()
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)
void AI_120_HallowBoss_DoMagicEffect(Vector2 spot, int effectType, float progress)
int GetAttackDamage_ScaledByStrength(float normalDamage)
int GetAttackDamage_ForProjectiles(float normalDamage, float expertDamage)
bool AI_120_HallowBoss_IsInPhase2()
IEntitySource GetSpawnSource_ForProjectile()
void SimpleFlyMovement(Vector2 desiredVelocity, float moveSpeed)
static float Dot(Vector2 value1, Vector2 value2)
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)