18854 {
18855
18856
18857
18858
18859
18860
18861
18862
18864 {
18866 }
18868 {
18869 if (Main.windPhysics)
18870 {
18871 velocity.X += Main.windSpeedCurrent * Main.windPhysicsStrength;
18872 }
18873 if (
type == 93 && Main.rand.Next(5) == 0)
18874 {
18876 Main.dust[num].noGravity = true;
18877 Main.dust[num].fadeIn = 1f;
18878 Main.dust[num].velocity.X *= 0.3f;
18879 Main.dust[num].velocity.Y *= 0.3f;
18880 }
18882 {
18884 {
18887 float num2 = Utils.Remap(
vector.Length(), 0f, 3f, 0f, 0.5f);
18889 for (
int i = 0;
i < 8;
i++)
18890 {
18892 dust.velocity = (
velocity * (0.2f +
num2)).RotatedByRandom(0.699999988079071) +
vector * 0.25f;
18894 dust2.velocity *= 0f + Main.rand.NextFloat() * 1f;
18895 dust.fadeIn = 0.1f;
18897 dust2.position -= dust.velocity;
18898 dust.noGravity = true;
18899 }
18900 }
18903 }
18905 {
18908 }
18910 {
18912 }
18913 else
18914 {
18916 }
18918 {
18921 if (this.
ai[0] >= (
float)num3)
18922 {
18923 velocity.Y += 0.4f;
18924 velocity.X *= 0.97f;
18925 }
18926 if (Main.netMode != 1 && this.ai[1] == 0f)
18927 {
18928 this.
ai[1] = 1 + Main.rand.Next(6);
18930 }
18931 if (this.
ai[1] > 0f)
18932 {
18934 }
18935 }
18936 else if (
type == 162)
18937 {
18938 if (this.
ai[1] == 0f)
18939 {
18942 }
18944 if (this.
ai[0] >= 18f)
18945 {
18946 velocity.Y += 0.28f;
18947 velocity.X *= 0.99f;
18948 }
18949 if (this.
ai[0] > 2f)
18950 {
18952 if (this.
ai[0] == 3f)
18953 {
18954 for (
int j = 0;
j < 10;
j++)
18955 {
18958 dust2.velocity *= 0.5f;
18960 dust2.velocity +=
velocity * 0.1f;
18961 }
18962 for (
int k = 0;
k < 5;
k++)
18963 {
18965 Main.dust[
num5].noGravity =
true;
18967 dust2.velocity *= 3f;
18969 dust2.velocity +=
velocity * 0.2f;
18972 dust2.velocity *= 2f;
18974 dust2.velocity +=
velocity * 0.3f;
18975 }
18976 for (
int l = 0;
l < 1;
l++)
18977 {
18978 int num6 = Gore.NewGore(
new Vector2(
base.position.X - 10f,
base.position.Y - 10f),
default(
Vector2), Main.rand.Next(61, 64));
18979 Gore gore = Main.gore[
num6];
18980 gore.position +=
velocity * 1.25f;
18981 Main.gore[
num6].scale = 1.5f;
18982 gore = Main.gore[
num6];
18984 gore = Main.gore[
num6];
18985 gore.velocity *= 0.02f;
18986 }
18987 }
18988 }
18989 }
18990 else if (
type == 281)
18991 {
18992 if (this.
ai[1] == 0f)
18993 {
18996 }
18998 if (this.
ai[0] >= 18f)
18999 {
19000 velocity.Y += 0.28f;
19001 velocity.X *= 0.99f;
19002 }
19003 if (this.
ai[0] > 2f)
19004 {
19006 if (this.
ai[0] == 3f)
19007 {
19008 for (
int m = 0;
m < 10;
m++)
19009 {
19012 dust2.velocity *= 0.5f;
19014 dust2.velocity +=
velocity * 0.1f;
19015 }
19016 for (
int n = 0;
n < 5;
n++)
19017 {
19019 Main.dust[
num8].noGravity =
true;
19021 dust2.velocity *= 3f;
19023 dust2.velocity +=
velocity * 0.2f;
19026 dust2.velocity *= 2f;
19028 dust2.velocity +=
velocity * 0.3f;
19029 }
19031 {
19033 Gore gore = Main.gore[
num10];
19034 gore.position +=
velocity * 1.25f;
19035 Main.gore[
num10].scale = 1.5f;
19036 gore = Main.gore[
num10];
19038 gore = Main.gore[
num10];
19039 gore.velocity *= 0.02f;
19040 }
19041 }
19042 }
19043 }
19044 else if (
type == 240)
19045 {
19046 if (this.
ai[1] == 0f)
19047 {
19050 }
19052 if (this.
ai[0] >= 16f)
19053 {
19054 velocity.Y += 0.18f;
19055 velocity.X *= 0.991f;
19056 }
19057 if (this.
ai[0] > 2f)
19058 {
19060 if (this.
ai[0] == 3f)
19061 {
19063 {
19066 dust2.velocity *= 0.5f;
19068 dust2.velocity +=
velocity * 0.1f;
19069 }
19071 {
19073 Main.dust[
num14].noGravity =
true;
19075 dust2.velocity *= 3f;
19077 dust2.velocity +=
velocity * 0.2f;
19080 dust2.velocity *= 2f;
19082 dust2.velocity +=
velocity * 0.3f;
19083 }
19085 {
19087 Gore gore = Main.gore[
num16];
19088 gore.position +=
velocity * 1.25f;
19089 Main.gore[
num16].scale = 1.25f;
19090 gore = Main.gore[
num16];
19092 gore = Main.gore[
num16];
19093 gore.velocity *= 0.02f;
19094 }
19095 }
19096 }
19097 }
19098 else if (
type == 497)
19099 {
19101 Main.dust[
num17].position = (Main.dust[
num17].position +
base.Center) / 2f;
19102 Main.dust[
num17].noGravity =
true;
19104 dust2.velocity *= 0.3f;
19106 dust2.velocity -=
velocity * 0.1f;
19108 if (this.
ai[0] >= 30f)
19109 {
19110 velocity.X *= 0.99f;
19111 velocity.Y += 0.5f;
19112 }
19113 else
19114 {
19116 }
19117 }
19118 else if (
type == 861)
19119 {
19120 if (Main.myPlayer ==
owner)
19121 {
19124 {
19126 }
19129 {
19132 {
19134 break;
19135 }
19136 }
19137 }
19139 {
19140 velocity.X *= 0.95f;
19141 }
19142 else
19143 {
19144 velocity.X *= 0.995f;
19145 }
19147 {
19148 velocity.X = 0f;
19149 }
19151 {
19153 }
19154 velocity.Y += 0.1f;
19155 if (this.
ai[1] == 1f)
19156 {
19159 }
19160 else
19161 {
19163 {
19165 }
19168 {
19172 {
19174 }
19175 }
19179 {
19181 }
19182 }
19183 }
19184 else if (
type == 249)
19185 {
19187 if (this.
ai[0] >= 0f)
19188 {
19189 velocity.Y += 0.25f;
19190 }
19191 }
19192 else if (
type == 347)
19193 {
19195 if (this.
ai[0] >= 5f)
19196 {
19197 velocity.Y += 0.25f;
19198 }
19199 }
19200 else if (
type == 501)
19201 {
19203 if (this.
ai[0] >= 18f)
19204 {
19205 velocity.X *= 0.995f;
19206 velocity.Y += 0.2f;
19207 }
19208 }
19210 {
19213 if (this.
ai[0] > 3f)
19214 {
19216 if (this.
ai[0] > 20f)
19217 {
19219 float num21 = this.
ai[0] - 20f;
19222 {
19224 }
19225 }
19226 if (this.
ai[0] <= 10f)
19227 {
19228 num19 = (int)this.
ai[0] * 10;
19229 }
19230 if (Main.rand.Next(100) <
num19)
19231 {
19232 int num22 = ((
type != 979) ? Dust.NewDust(
base.position,
width,
height, 6, 0f, 0f, 150) : Dust.NewDust(
base.position,
width,
height, 135, 0f, 0f, 150));
19233 Main.dust[
num22].position = (Main.dust[
num22].position +
base.Center) / 2f;
19234 Main.dust[
num22].noGravity =
true;
19236 dust2.velocity *= 2f;
19238 dust2.scale *= 1.6f;
19241 }
19242 }
19243 if (this.
ai[0] >= 20f)
19244 {
19245 velocity.X *= 0.99f;
19246 velocity.Y += 0.1f;
19247 }
19248 }
19250 {
19252 if (this.
ai[0] >= 10f)
19253 {
19254 velocity.Y += 0.25f;
19255 velocity.X *= 0.99f;
19256 }
19257 }
19258 else if (
type == 166)
19259 {
19260 if (
owner == Main.myPlayer &&
this.ai[1] == 1f)
19261 {
19263 {
19265 {
19267 return;
19268 }
19269 }
19270 if (Main.netMode == 1)
19271 {
19273 {
19275 {
19277 return;
19278 }
19279 }
19280 }
19281 }
19283 if (this.
ai[0] >= 20f)
19284 {
19285 velocity.Y += 0.3f;
19286 velocity.X *= 0.98f;
19287 }
19288 }
19289 else if (
type == 300)
19290 {
19291 if (this.
ai[0] == 0f)
19292 {
19294 }
19296 if (this.
ai[0] >= 60f)
19297 {
19298 velocity.Y += 0.2f;
19299 velocity.X *= 0.99f;
19300 }
19301 }
19302 else if (
type == 306)
19303 {
19305 {
19307 {
19308 float num26 = velocity.X / 4f * (float)
num25;
19309 float num27 = velocity.Y / 4f * (float)
num25;
19311 Main.dust[
num28].position.X = base.Center.X -
num26;
19312 Main.dust[
num28].position.Y = base.Center.Y -
num27;
19314 dust2.velocity *= 0f;
19315 Main.dust[
num28].scale = 0.7f;
19316 }
19317 }
19320 {
19322 }
19324 }
19325 else if (
type == 304)
19326 {
19328 if (this.
ai[0] >= 30f)
19329 {
19334 {
19336 }
19337 }
19338 if (this.
ai[0] < 30f)
19339 {
19341 }
19342 }
19344 {
19346 if (this.
ai[0] >= 15f)
19347 {
19348 velocity.Y += 0.3f;
19349 velocity.X *= 0.98f;
19350 }
19351 }
19352 else
19353 {
19356 {
19357 num29 = 28 + Main.rand.Next(6);
19358 }
19360 if (this.
ai[0] >= (
float)num29)
19361 {
19363 {
19365 }
19366 velocity.Y += 0.4f;
19367 velocity.X *= 0.97f;
19368 }
19370 {
19372 }
19373 }
19375 {
19376 velocity.Y = 16f;
19377 }
19378 if (
type == 54 && Main.rand.Next(20) == 0)
19379 {
19381 }
19382 }
19384 {
19386 {
19389 }
19391 {
19393 {
19395 Main.dust[
num31].noGravity =
true;
19396 Main.dust[
num31].velocity.X *= 0.3f;
19397 Main.dust[
num31].velocity.Y *= 0.3f;
19398 }
19399 }
19400 else if (
type == 1000)
19401 {
19402 if (Main.rand.Next(3) == 0)
19403 {
19404 switch (Main.rand.Next(3))
19405 {
19406 default:
19407 {
19408 int num32 = Main.rand.Next(3)
switch
19409 {
19410 1 => 57,
19411 2 => 58,
19413 };
19416 dust2.velocity *= 0.5f;
19417 break;
19418 }
19419 case 1:
19420 {
19421 Dust
dust3 = Main.dust[Dust.NewDust(
base.position,
width,
height, 267,
velocity.
X,
velocity.
Y, 50,
new Color(50, 50, 200), 1.1f)];
19422 dust3.fadeIn = 0.1f;
19424 dust3.noGravity = true;
19425 break;
19426 }
19427 case 2:
19428 {
19430 dust3.noGravity = true;
19432 break;
19433 }
19434 }
19435 }
19436 }
19437 else if (
type == 867)
19438 {
19439 if (Main.rand.Next(3) == 0)
19440 {
19443 dust2.velocity *= 0.5f;
19444 Main.dust[
num33].noGravity =
true;
19445 }
19446 }
19447 else if (
type == 33)
19448 {
19449 if (Main.rand.Next(1) == 0)
19450 {
19452 Main.dust[
num34].noGravity =
true;
19453 }
19454 }
19455 else if (
type == 320)
19456 {
19457 if (Main.rand.Next(3) == 0)
19458 {
19460 if (Main.rand.Next(2) == 0)
19461 {
19462 Main.dust[
num35].scale = 0.9f;
19464 dust2.velocity *= 0.2f;
19465 }
19466 else
19467 {
19468 Main.dust[
num35].noGravity =
true;
19469 }
19470 }
19471 }
19472 else if (
type == 6)
19473 {
19474 if (Main.rand.Next(5) == 0)
19475 {
19476 int num36 = Main.rand.Next(3);
19478 {
19479 0 => 15,
19480 1 => 57,
19482 }, velocity.X * 0.25f, velocity.Y * 0.25f, 150,
default(
Color), 0.7f);
19483 }
19484 }
19485 else if (
type == 113 && Main.rand.Next(1) == 0)
19486 {
19488 Main.dust[
num37].noGravity =
true;
19490 }
19491 if (this.
ai[0] == 0f)
19492 {
19493 bool flag = true;
19496 {
19497 flag = false;
19498 }
19499 if (flag)
19500 {
19502 }
19503 if (
type == 106 && this.
ai[1] >= 45f)
19504 {
19508 }
19510 {
19511 if (this.
ai[1] >= 10f)
19512 {
19513 velocity.Y += 0.5f;
19515 {
19516 velocity.Y += 0.35f;
19517 }
19518 velocity.X *= 0.95f;
19520 {
19521 velocity.Y = 16f;
19522 }
19524 {
19527 }
19528 }
19529 }
19530 else if (
type == 182)
19531 {
19532 if (Main.rand.Next(2) == 0)
19533 {
19536 dust2.velocity *= 0.1f;
19537 Main.dust[
num39].noGravity =
true;
19538 }
19540 {
19542 }
19544 {
19546 }
19549 float num42 = 800f;
19550 bool flag2 =
false;
19551 if (this.
ai[1] > 10f && this.
ai[1] < 360f)
19552 {
19554 {
19555 if (Main.npc[
num43].CanBeChasedBy(
this))
19556 {
19557 float num44 = Main.npc[
num43].position.X + (float)(Main.npc[
num43].width / 2);
19558 float num45 = Main.npc[
num43].position.Y + (float)(Main.npc[
num43].height / 2);
19561 {
19566 }
19567 }
19568 }
19569 }
19571 {
19572 num40 = base.position.X + (float)(
width / 2) + velocity.X * 100f;
19573 num41 = base.position.Y + (float)(
height / 2) + velocity.Y * 100f;
19574 if (this.
ai[1] >= 30f)
19575 {
19579 }
19580 }
19582 float num48 = 0.25f;
19592 {
19593 velocity.X +=
num48;
19595 {
19596 velocity.X +=
num48 * 2f;
19597 }
19598 }
19600 {
19601 velocity.X -=
num48;
19603 {
19604 velocity.X -=
num48 * 2f;
19605 }
19606 }
19608 {
19609 velocity.Y +=
num48;
19611 {
19612 velocity.Y +=
num48 * 2f;
19613 }
19614 }
19616 {
19617 velocity.Y -=
num48;
19619 {
19620 velocity.Y -=
num48 * 2f;
19621 }
19622 }
19623 }
19624 else if (
type == 866)
19625 {
19627 {
19630 {
19632 this.
ai[1] = num54;
19633 }
19634 else
19635 {
19637 }
19638 if (this.
ai[1] != num53)
19639 {
19641 }
19642 }
19646 if (Main.npc.IndexInRange(
num55) && Main.npc[
num55].CanBeChasedBy(
this))
19647 {
19649 }
19650 else
19651 {
19654 if (
owner != Main.myPlayer)
19655 {
19657 }
19659 {
19663 }
19664 }
19666 float num58 = 0.25f;
19676 {
19677 velocity.X +=
num58;
19679 {
19680 velocity.X +=
num58 * 2f;
19681 }
19682 }
19684 {
19685 velocity.X -=
num58;
19687 {
19688 velocity.X -=
num58 * 2f;
19689 }
19690 }
19692 {
19693 velocity.Y +=
num58;
19695 {
19696 velocity.Y +=
num58 * 2f;
19697 }
19698 }
19700 {
19701 velocity.Y -=
num58;
19703 {
19704 velocity.Y -=
num58 * 2f;
19705 }
19706 }
19707 }
19708 else if (
type == 301)
19709 {
19710 if (this.
ai[1] >= 20f)
19711 {
19716 }
19717 }
19718 else if (this.
ai[1] >= 30f)
19719 {
19723 }
19724 }
19725 else
19726 {
19729 float num64 = 0.4f;
19731 {
19733 }
19735 {
19738 }
19739 else if (
type == 33)
19740 {
19743 }
19744 else if (
type == 182)
19745 {
19748 }
19749 else if (
type == 866)
19750 {
19753 }
19754 else if (
type == 106)
19755 {
19758 }
19759 else if (
type == 272)
19760 {
19763 }
19764 else if (
type == 333)
19765 {
19768 }
19769 else if (
type == 301)
19770 {
19773 }
19774 else if (
type == 320)
19775 {
19778 }
19779 else if (
type == 383)
19780 {
19783 }
19789 {
19791 }
19796 {
19799 {
19803 }
19804 }
19805 else
19806 {
19808 {
19809 velocity.X +=
num64;
19811 {
19812 velocity.X +=
num64;
19813 }
19814 }
19816 {
19817 velocity.X -=
num64;
19819 {
19820 velocity.X -=
num64;
19821 }
19822 }
19824 {
19825 velocity.Y +=
num64;
19827 {
19828 velocity.Y +=
num64;
19829 }
19830 }
19832 {
19833 velocity.Y -=
num64;
19835 {
19836 velocity.Y -=
num64;
19837 }
19838 }
19839 }
19840 if (Main.myPlayer ==
owner)
19841 {
19845 {
19847 }
19848 }
19849 }
19851 {
19853 }
19854 else if (
type == 866)
19855 {
19857 if (Main.rand.Next(2) == 0)
19858 {
19861 dust2.velocity *= 0.1f;
19862 Main.dust[
num68].noGravity =
true;
19863 }
19864 }
19865 else if (
type == 383)
19866 {
19867 if (this.
ai[0] == 0f)
19868 {
19872 }
19873 else
19874 {
19878 }
19879 }
19880 else if (
type == 301)
19881 {
19882 if (this.
ai[0] == 0f)
19883 {
19885 if (Main.rand.Next(2) == 0)
19886 {
19889 dust2.velocity +=
velocity * 0.3f;
19891 dust2.velocity *= 0.2f;
19892 Main.dust[
num69].noGravity =
true;
19893 }
19894 if (Main.rand.Next(3) == 0)
19895 {
19898 dust2.velocity +=
velocity * 0.5f;
19900 dust2.velocity *= 0.5f;
19901 Main.dust[
num70].noGravity =
true;
19902 }
19903 }
19904 else
19905 {
19907 }
19908 }
19909 else
19910 {
19912 }
19913 }
19915 {
19916 if (Main.netMode != 2 &&
this.ai[1] == 0f &&
localAI[0] == 0f)
19917 {
19921 {
19923 }
19925 }
19927 if (this.
ai[0] == 0f)
19928 {
19929 if (
type >= 150 &&
type <= 152 && this.
ai[1] == 0f &&
alpha == 255 && Main.rand.Next(2) == 0)
19930 {
19933 }
19936 {
19938 }
19939 else if (
type == 493 ||
type == 494)
19940 {
19942 }
19944 {
19945 return;
19946 }
19949 if (this.
ai[1] == 0f)
19950 {
19953 }
19954 if (
type == 7 && Main.myPlayer ==
owner)
19955 {
19957 if (this.
ai[1] >= 6f)
19958 {
19960 }
19963 Main.projectile[
num72].ai[1] = this.
ai[1] + 1f;
19964 NetMessage.SendData(27, -1, -1,
null,
num72);
19965 }
19966 else if (
type == 494 && Main.myPlayer ==
owner)
19967 {
19969 if (this.
ai[1] >= (
float)(7 + Main.rand.Next(2)))
19970 {
19972 }
19976 {
19979 }
19980 int number =
NewProjectile(
GetProjectileSource_FromThis(),
base.position.X +
velocity.
X + (
float)(
width / 2),
base.position.Y +
velocity.
Y + (
float)(
height / 2),
velocity.
X,
velocity.
Y,
num73,
num74,
num75,
owner, 0f,
this.ai[1] + 1f);
19981 NetMessage.SendData(27, -1, -1,
null,
number);
19982 }
19983 else if ((
type == 150 ||
type == 151) && Main.myPlayer ==
owner)
19984 {
19987 {
19989 }
19990 else if (
type == 151)
19991 {
19993 }
19994 if (this.
ai[1] >= 10f &&
type == 151)
19995 {
19997 }
20000 Main.projectile[
num77].ai[1] = this.
ai[1] + 1f;
20001 NetMessage.SendData(27, -1, -1,
null,
num77);
20002 }
20003 return;
20004 }
20006 {
20008 {
20010 {
20012 Main.dust[
num79].noGravity =
true;
20014 dust2.velocity *= 0.5f;
20015 }
20016 }
20017 else if (
type == 493 ||
type == 494)
20018 {
20020 {
20022 Main.dust[
num81].noGravity =
true;
20024 dust2.velocity *= 0.5f;
20025 }
20026 }
20027 else
20028 {
20030 {
20032 }
20034 }
20035 }
20037 {
20039 }
20040 else if (
type == 493 ||
type == 494)
20041 {
20043 }
20044 else
20045 {
20047 }
20049 {
20051 }
20052 }
20054 {
20055 if (!Main.remixWorld &&
type == 12 && Main.dayTime &&
damage == 1000)
20056 {
20058 }
20060 {
20061 if (
base.Center.Y >
this.ai[1])
20062 {
20064 }
20065 }
20066 else if (
type == 92)
20067 {
20068 if (
base.position.Y >
this.ai[1])
20069 {
20071 }
20072 }
20073 else if (
type == 9)
20074 {
20076 }
20077 else
20078 {
20079 if (this.
ai[1] == 0f && !Collision.SolidCollision(
base.position,
width,
height))
20080 {
20083 }
20084 if (this.
ai[1] != 0f)
20085 {
20087 }
20088 }
20090 {
20093 }
20095 {
20098 if (
base.Center.Y >=
this.ai[1])
20099 {
20101 }
20103 {
20105 }
20107 }
20109 {
20112 if (
base.Center.Y >=
this.ai[1])
20113 {
20115 }
20117 {
20119 }
20121 }
20122 else
20123 {
20125 {
20127 }
20130 {
20133 }
20135 {
20138 }
20139 }
20141 {
20143 }
20144 else
20145 {
20147 }
20149 {
20150 if (Main.rand.Next(16) == 0)
20151 {
20155 Main.dust[
num85].position = base.Center +
vector9 * 12f;
20156 }
20157 if (Main.rand.Next(48) == 0)
20158 {
20160 Gore gore = Main.gore[
num86];
20161 gore.velocity *= 0.66f;
20162 gore = Main.gore[
num86];
20164 }
20165 }
20167 {
20169 if (
base.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector10 / 2f,
vector10 +
new Vector2(400f))) && Main.rand.Next(6) == 0)
20170 {
20171 int num87 = Utils.SelectRandom<
int>(Main.rand, 16, 17, 17, 17);
20172 if (Main.tenthAnniversaryWorld)
20173 {
20174 num87 = Utils.SelectRandom<
int>(Main.rand, 16, 16, 16, 17);
20175 }
20177 }
20179 if (Main.rand.Next(20) == 0 || (Main.tenthAnniversaryWorld && Main.rand.Next(15) == 0))
20180 {
20182 }
20183 }
20185 {
20187 {
20189 if (
base.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector11 / 2f,
vector11 +
new Vector2(400f))) && Main.rand.Next(24) == 0)
20190 {
20191 Gore.NewGore(
base.position,
velocity * 0.2f, Utils.SelectRandom<
int>(Main.rand, 16, 17));
20192 }
20193 if (Main.rand.Next(3) == 0)
20194 {
20197 dust2.velocity *= 0.5f;
20198 dust4.noGravity = true;
20199 }
20200 }
20202 {
20204 if (
base.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector12 / 2f,
vector12 +
new Vector2(400f))) && Main.rand.Next(6) == 0)
20205 {
20207 }
20209 {
20212 dust5.noLight = true;
20213 dust5.noGravity = true;
20215 dust5.noLight = true;
20216 dust5.noGravity = true;
20217 }
20218 }
20219 }
20220 else if (
type == 9)
20221 {
20223 if (
base.Hitbox.Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector14 / 2f,
vector14 +
new Vector2(400f))) && Main.rand.Next(20) == 0)
20224 {
20225 Gore.NewGore(
base.position,
velocity * 0.2f, Main.rand.Next(16, 18));
20226 }
20227 if (Main.rand.Next(4) == 0)
20228 {
20231 dust2.velocity *= 0.7f;
20232 dust6.noGravity = true;
20234 dust2.velocity +=
velocity * 0.3f;
20235 if (Main.rand.Next(2) == 0)
20236 {
20239 }
20240 }
20241 }
20242 else if (this.
ai[1] == 1f ||
type == 92)
20243 {
20245 if (Main.rand.Next(10) == 0)
20246 {
20248 }
20249 if (Main.rand.Next(20) == 0)
20250 {
20252 }
20253 }
20254 }
20256 {
20260 if (this.
ai[0] == 180f)
20261 {
20263 }
20264 if (this.
ai[1] == 0f)
20265 {
20270 {
20272 }
20274 {
20277 }
20279 {
20282 {
20283 dust7.noGravity =
num91 % 3 != 0;
20284 if (!
dust7.noGravity)
20285 {
20287 dust2.scale *= 1.25f;
20289 dust2.velocity /= 2f;
20290 dust7.velocity.Y -= 2.2f;
20291 }
20292 else
20293 {
20295 dust2.scale *= 1.75f;
20297 dust2.velocity +=
velocity * 0.65f;
20298 }
20299 }
20300 }
20301 }
20304 {
20305 flag4 = Main.netMode != 1;
20306 }
20308 {
20309 int num92 = (int)(
base.position.X / 16f) - 1;
20311 int num94 = (int)(
base.position.Y / 16f) - 1;
20314 {
20316 }
20317 if (
num93 > Main.maxTilesX)
20318 {
20319 num93 = Main.maxTilesX;
20320 }
20322 {
20324 }
20325 if (
num95 > Main.maxTilesY)
20326 {
20327 num95 = Main.maxTilesY;
20328 }
20331 {
20333 {
20334 vector15.X =
num96 * 16;
20335 vector15.Y =
num97 * 16;
20337 {
20338 continue;
20339 }
20341 {
20343 {
20346 if (Main.netMode == 1)
20347 {
20348 NetMessage.SendTileSquare(-1,
num96,
num97);
20349 }
20350 }
20352 {
20355 if (Main.netMode == 1)
20356 {
20357 NetMessage.SendTileSquare(-1,
num96,
num97);
20358 }
20359 }
20361 {
20364 if (Main.netMode == 1)
20365 {
20366 NetMessage.SendTileSquare(-1,
num96,
num97);
20367 }
20368 }
20370 {
20373 if (Main.netMode == 1)
20374 {
20375 NetMessage.SendTileSquare(-1,
num96,
num97);
20376 }
20377 }
20379 {
20382 if (Main.netMode == 1)
20383 {
20384 NetMessage.SendTileSquare(-1,
num96,
num97);
20385 }
20386 }
20388 {
20391 if (Main.netMode == 1)
20392 {
20393 NetMessage.SendTileSquare(-1,
num96,
num97);
20394 }
20395 }
20397 {
20400 if (Main.netMode == 1)
20401 {
20402 NetMessage.SendTileSquare(-1,
num96,
num97);
20403 }
20404 }
20405 }
20407 {
20409 {
20411 }
20413 {
20415 }
20416 }
20418 {
20419 continue;
20420 }
20423 {
20424 if (Main.remixWorld &&
num97 >= (
int)Main.worldSurface - 1 &&
num97 < Main.maxTilesY - 20)
20425 {
20427 }
20429 }
20430 }
20431 }
20432 }
20434 {
20436 }
20437 }
20439 {
20441 }
20443 {
20445 {
20448 }
20450 {
20453 }
20455 {
20457 {
20458 float num99 = velocity.X / 3f * (float)
num98;
20462 Main.dust[
num102].noGravity =
true;
20464 dust2.velocity *= 0.1f;
20466 dust2.velocity +=
velocity * 0.1f;
20469 }
20470 if (Main.rand.Next(5) == 0)
20471 {
20475 dust2.velocity *= 0.25f;
20477 dust2.velocity +=
velocity * 0.5f;
20478 }
20479 }
20480 else if (
type == 502)
20481 {
20482 float num105 = (float)Main.DiscoR / 255f;
20483 float num106 = (float)Main.DiscoG / 255f;
20484 float num107 = (float)Main.DiscoB / 255f;
20489 }
20490 else if (
type == 95 ||
type == 96)
20491 {
20493 Main.dust[
num108].noGravity =
true;
20494 }
20495 else if (
type == 253)
20496 {
20498 {
20500 Main.dust[
num110].noGravity =
true;
20501 Main.dust[
num110].velocity.X *= 0.3f;
20502 Main.dust[
num110].velocity.Y *= 0.3f;
20503 }
20504 }
20505 else
20506 {
20508 {
20510 if (
type == 258 && Main.getGoodWorld)
20511 {
20512 Main.dust[
num112].noLight =
true;
20513 }
20514 Main.dust[
num112].noGravity =
true;
20515 Main.dust[
num112].velocity.X *= 0.3f;
20516 Main.dust[
num112].velocity.Y *= 0.3f;
20517 }
20518 }
20520 {
20522 }
20523 if (this.
ai[1] >= 20f)
20524 {
20525 velocity.Y += 0.2f;
20526 }
20528 {
20531 {
20533 }
20534 }
20535 else
20536 {
20538 }
20540 {
20541 velocity.Y = 16f;
20542 }
20543 }
20545 {
20547 }
20549 {
20551 }
20553 {
20556 {
20558 {
20560 }
20562 {
20564 }
20568 {
20571 }
20573 {
20575 }
20576 if (Main.rand.Next(6) == 0)
20577 {
20580 {
20582 }
20583 else if (
type == 87)
20584 {
20586 }
20589 dust2.velocity *= 0.3f;
20591 }
20592 }
20593 else
20594 {
20596 }
20598 {
20599 if (Main.player[
owner].blueFairy)
20600 {
20602 }
20603 }
20604 else if (
type == 86)
20605 {
20606 if (Main.player[
owner].redFairy)
20607 {
20609 }
20610 }
20611 else if (
type == 87)
20612 {
20613 if (Main.player[
owner].greenFairy)
20614 {
20616 }
20617 }
20618 else if (
type == 18 && Main.player[
owner].lightOrb)
20619 {
20621 }
20622 if (!Main.player[
owner].dead)
20623 {
20626 {
20628 }
20635 {
20636 if (Main.player[
owner].controlUp)
20637 {
20641 }
20642 else if (Main.player[
owner].controlDown)
20643 {
20647 }
20648 }
20650 {
20652 }
20656 {
20657 base.position.X = Main.player[
owner].position.X + (float)(Main.player[
owner].width / 2) - (float)(
width / 2);
20658 base.position.Y = Main.player[
owner].position.Y + (float)(Main.player[
owner].height / 2) - (float)(
height / 2);
20659 }
20661 {
20669 {
20671 }
20672 }
20673 else
20674 {
20675 velocity.X = (velocity.Y = 0f);
20676 }
20677 }
20678 else
20679 {
20681 }
20682 }
20684 {
20686 {
20689 }
20691 {
20694 {
20696 }
20698 {
20700 }
20701 if (this.
ai[0] > 3f)
20702 {
20703 velocity.Y += 0.075f;
20705 {
20710 Main.dust[
num126].noGravity =
true;
20712 dust2.velocity *= 0.1f;
20714 dust2.velocity +=
velocity * 0.5f;
20717 }
20718 if (Main.rand.Next(8) == 0)
20719 {
20723 dust2.velocity *= 0.25f;
20725 dust2.velocity +=
velocity * 0.5f;
20726 }
20727 }
20728 else
20729 {
20731 }
20732 return;
20733 }
20737 {
20740 }
20743 {
20745 }
20746 if (this.
ai[0] > 3f)
20747 {
20750 {
20752 {
20757 Main.dust[
num136].noGravity =
true;
20759 dust2.velocity *= 0.3f;
20761 dust2.velocity +=
velocity * 0.5f;
20764 }
20765 if (Main.rand.Next(8) == 0)
20766 {
20770 dust2.velocity *= 0.5f;
20772 dust2.velocity +=
velocity * 0.5f;
20773 }
20774 }
20775 }
20776 else
20777 {
20779 }
20780 }
20782 {
20785 {
20788 }
20790 {
20792 return;
20793 }
20795 {
20798 }
20800 {
20801 if (
base.position.X + (
float)(
width / 2) > Main.player[
owner].position.X + (
float)(Main.player[
owner].width / 2))
20802 {
20803 Main.player[
owner].ChangeDir(1);
20804 }
20805 else
20806 {
20807 Main.player[
owner].ChangeDir(-1);
20808 }
20809 }
20811 {
20812 if (this.
ai[0] == 0f)
20813 {
20815 }
20816 else
20817 {
20819 }
20820 }
20825 if (this.
ai[0] == 0f)
20826 {
20828 {
20830 }
20832 {
20834 }
20836 {
20838 }
20839 else if (
type == 273 && (Main.remixWorld ? (
num142 > 300f) : (
num142 > 150f)))
20840 {
20842 }
20844 {
20846 }
20849 if (this.
ai[1] > 5f)
20850 {
20852 }
20853 if (
type == 262 && this.
ai[1] > 8f)
20854 {
20856 }
20857 if (
type == 271 && this.
ai[1] > 8f)
20858 {
20860 }
20861 if (
type == 273 && this.
ai[1] > 8f)
20862 {
20864 }
20865 if (
type == 481 && this.
ai[1] > 8f)
20866 {
20868 }
20869 if (
type == 404 && this.
ai[1] > 8f)
20870 {
20872 }
20873 if (this.
ai[1] >= 10f)
20874 {
20876 velocity.Y += 0.3f;
20877 }
20879 {
20881 }
20882 else if (
type == 262)
20883 {
20885 }
20887 {
20889 }
20890 else if (
type == 271)
20891 {
20893 }
20894 }
20895 else if (this.
ai[0] == 1f)
20896 {
20901 {
20903 }
20905 {
20907 }
20914 {
20916 }
20917 else if (
type == 262)
20918 {
20920 }
20922 {
20924 }
20925 else if (
type == 271)
20926 {
20928 }
20929 }
20930 }
20932 {
20933 if (
type == 870 && this.
ai[1] > 0f)
20934 {
20936 }
20937 if (
type == 473 && Main.netMode != 2)
20938 {
20941 {
20944 if ((
base.Center - Main.player[Main.myPlayer].Center).Length() < (
float)(Main.screenWidth +
num144 * 16))
20945 {
20946 Main.instance.SpelunkerProjectileHelper.AddSpotToCheck(
base.Center);
20947 }
20948 }
20949 }
20951 {
20953 {
20955 }
20958 {
20961 }
20962 else if (
alpha >= 255)
20963 {
20966 }
20968 }
20970 {
20972 {
20975 }
20978 {
20979 Lighting.AddLight(
base.Center, 0.25f, 0.2f, 0f);
20980 }
20981 else
20982 {
20983 Lighting.AddLight(
base.Center, 0.15f, 0.15f, 0.15f);
20984 }
20986 {
20988 {
20991 float num147 = Main.rand.Next(-20, 21);
20992 float num148 = Main.rand.Next(-20, 0);
20997 num147 *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f;
20998 num148 *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f;
20999 int num150 =
NewProjectile(
GetProjectileSource_FromThis(),
vector18.X,
vector18.Y,
num147,
num148, 347, 40, 0f, Main.myPlayer, 0f,
this.ai[1]);
21000 }
21001 }
21002 }
21004 {
21005 int num151 = Main.rand.Next(1, 3);
21007 {
21010 dust2.alpha += Main.rand.Next(100);
21012 dust2.velocity *= 0.3f;
21013 Main.dust[
num153].velocity.X += (float)Main.rand.Next(-10, 11) * 0.025f;
21014 Main.dust[
num153].velocity.Y -= 0.4f + (float)Main.rand.Next(-3, 14) * 0.15f;
21015 Main.dust[
num153].fadeIn = 1.25f + (float)Main.rand.Next(20) * 0.15f;
21016 }
21017 }
21019 {
21020 try
21021 {
21022 int num154 = (int)(
base.position.X / 16f) - 1;
21024 int num156 = (int)(
base.position.Y / 16f) - 1;
21027 {
21029 }
21030 if (
num155 > Main.maxTilesX)
21031 {
21032 num155 = Main.maxTilesX;
21033 }
21035 {
21037 }
21038 if (
num157 > Main.maxTilesY)
21039 {
21040 num157 = Main.maxTilesY;
21041 }
21044 {
21046 {
21048 {
21049 vector19.X =
num158 * 16;
21050 vector19.Y =
num159 * 16;
21051 if (
base.position.X + (
float)
width > vector19.X && base.position.X < vector19.X + 16f && base.position.Y + (float)
height >
vector19.Y &&
base.position.Y <
vector19.Y + 16f)
21052 {
21053 velocity.X = 0f;
21054 velocity.Y = -0.2f;
21055 }
21056 }
21057 }
21058 }
21059 }
21060 catch
21061 {
21062 }
21063 }
21065 {
21067 {
21070 {
21072 }
21073 }
21074 if (Main.expertMode)
21075 {
21084 {
21087 }
21088 }
21089 }
21091 {
21093 {
21096 }
21099 {
21101 }
21103 if (this.
ai[0] > 15f)
21104 {
21106 {
21107 velocity.X *= 0.97f;
21111 {
21113 }
21114 }
21116 velocity.Y += 0.2f;
21117 }
21119 {
21124 {
21126 }
21128 {
21130 }
21131 if (Main.rand.Next(
maxValue) == 0)
21132 {
21133 Dust
dust8 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
width / 2,
height / 2), 31);
21135 dust2.velocity *= 0.33f;
21136 dust8.scale = 0.7f;
21137 }
21138 if (Main.rand.Next(
maxValue) == 0)
21139 {
21140 Dust
dust9 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
width / 2,
height / 2), 228, Main.rand.NextVector2Circular(3f, 3f));
21141 dust9.scale = 0.6f;
21143 dust2.velocity *= 0.33f;
21144 }
21145 }
21146 }
21147 else if (
type == 277)
21148 {
21150 if (this.
ai[0] > 15f)
21151 {
21154 {
21155 velocity.X *= 0.97f;
21157 {
21159 }
21160 }
21161 velocity.Y += 0.2f;
21162 }
21164 }
21165 else if (
type == 378)
21166 {
21168 {
21171 }
21174 {
21176 {
21179 {
21181 return;
21182 }
21183 }
21184 }
21186 if (this.
ai[0] > 10f)
21187 {
21190 {
21191 velocity.X *= 0.96f;
21193 {
21195 }
21196 }
21197 velocity.Y += 0.2f;
21198 }
21200 }
21201 else if (
type == 483)
21202 {
21204 if (this.
ai[0] > 5f)
21205 {
21206 if (
owner == Main.myPlayer &&
this.ai[0] > (
float)Main.rand.Next(20, 130))
21207 {
21209 }
21211 {
21212 velocity.X *= 0.97f;
21214 {
21215 velocity.X = 0f;
21217 }
21218 }
21219 velocity.Y += 0.3f;
21220 velocity.X *= 0.99f;
21221 }
21223 }
21224 else if (
type == 538)
21225 {
21228 {
21231 }
21232 else if (this.
ai[0] > 5f)
21233 {
21234 velocity.Y += 0.1f;
21235 velocity.X *= 1.025f;
21237 scale = 0.8f * (255f - (float)
alpha) / 255f;
21239 {
21241 }
21242 }
21243 if (
alpha >= 255 && this.
ai[0] > 5f)
21244 {
21246 return;
21247 }
21248 }
21249 else
21250 {
21252 if (this.
ai[0] > 5f)
21253 {
21256 {
21257 velocity.X *= 0.97f;
21259 {
21260 velocity.X = 0f;
21262 }
21263 }
21264 velocity.Y += 0.2f;
21265 }
21267 }
21269 {
21271 {
21274 }
21275 if (
velocity.
Y < 0f &&
this.ai[0] < 60f)
21276 {
21277 if (Main.rand.Next(4) == 0)
21278 {
21282 dust2.scale += (float)Main.rand.Next(50) * 0.01f;
21283 Main.dust[
num165].noGravity =
true;
21284 Main.dust[
num165].velocity.Y -= 2f;
21285 }
21286 if (Main.rand.Next(6) == 0)
21287 {
21291 dust2.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
21292 Main.dust[
num166].noGravity =
true;
21294 dust2.velocity *= 0.1f;
21295 }
21296 }
21297 }
21299 {
21300 if (this.
ai[1] == 0f)
21301 {
21304 }
21305 if (Main.rand.Next(2) == 0)
21306 {
21308 Main.dust[
num167].position.X -= 2f;
21309 Main.dust[
num167].position.Y += 2f;
21311 dust2.scale += (float)Main.rand.Next(50) * 0.01f;
21312 Main.dust[
num167].noGravity =
true;
21313 Main.dust[
num167].velocity.Y -= 2f;
21314 }
21315 if (Main.rand.Next(4) == 0)
21316 {
21318 Main.dust[
num168].position.X -= 2f;
21319 Main.dust[
num168].position.Y += 2f;
21321 dust2.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
21322 Main.dust[
num168].noGravity =
true;
21324 dust2.velocity *= 0.1f;
21325 }
21327 {
21330 {
21332 }
21333 }
21334 if ((
double)velocity.Y < 0.25 && (double)
velocity.
Y > 0.15)
21335 {
21336 velocity.X *= 0.8f;
21337 }
21339 }
21341 {
21344 Main.dust[
num169].position.X -= 2f;
21345 Main.dust[
num169].position.Y += 2f;
21347 dust2.scale += (float)Main.rand.Next(50) * 0.01f;
21348 Main.dust[
num169].noGravity =
true;
21349 Main.dust[
num169].velocity.Y -= 2f;
21350 if (Main.rand.Next(2) == 0)
21351 {
21353 Main.dust[
num170].position.X -= 2f;
21354 Main.dust[
num170].position.Y += 2f;
21356 dust2.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
21357 Main.dust[
num170].noGravity =
true;
21359 dust2.velocity *= 0.1f;
21360 }
21361 }
21363 {
21365 {
21367 }
21368 if (this.
ai[1] == 0f &&
type >= 326 &&
type <= 328)
21369 {
21372 }
21373 if (Main.rand.Next(3) != 0)
21374 {
21376 dust10.velocity.Y -= 2f;
21377 dust10.noGravity = true;
21379 dust2.scale += Main.rand.NextFloat() * 0.8f + 0.3f;
21382 }
21384 {
21385 velocity.X *= 0.8f;
21386 }
21388 }
21390 {
21392 {
21394 }
21395 if (this.
ai[1] == 0f &&
type >= 326 &&
type <= 328)
21396 {
21399 }
21401 Main.dust[
num171].position.X -= 2f;
21402 Main.dust[
num171].position.Y += 2f;
21404 dust2.scale += (float)Main.rand.Next(50) * 0.01f;
21405 Main.dust[
num171].noGravity =
true;
21406 Main.dust[
num171].velocity.Y -= 2f;
21407 if (Main.rand.Next(2) == 0)
21408 {
21410 Main.dust[
num172].position.X -= 2f;
21411 Main.dust[
num172].position.Y += 2f;
21413 dust2.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
21414 Main.dust[
num172].noGravity =
true;
21416 dust2.velocity *= 0.1f;
21417 }
21418 if ((
double)velocity.Y < 0.25 && (double)
velocity.
Y > 0.15)
21419 {
21420 velocity.X *= 0.8f;
21421 }
21423 }
21425 {
21426 velocity.Y = 16f;
21427 }
21428 }
21430 {
21432 }
21434 {
21436 }
21438 {
21440 {
21441 velocity.X *= 0.98f;
21442 }
21444 velocity.Y += 0.2f;
21446 {
21449 }
21450 if (
owner != Main.myPlayer)
21451 {
21452 return;
21453 }
21457 {
21458 return;
21459 }
21460 int style = 0;
21462 {
21463 style =
type - 200;
21464 }
21466 {
21467 style =
type - 527 + 6;
21468 }
21469 bool flag7 =
false;
21470 TileObject
objectData =
default(TileObject);
21472 {
21474 }
21476 {
21481 {
21483 NetMessage.SendData(47, -1, -1,
null,
num175, 0f, (
int)(byte)
new BitsByte(
b1:
true));
21484 }
21486 }
21487 }
21489 {
21490 if (this.
ai[1] == 0f &&
type == 44)
21491 {
21494 }
21496 {
21498 {
21500 }
21504 {
21506 }
21507 else
21508 {
21510 }
21511 return;
21512 }
21515 if (!(this.
ai[0] < 30f))
21516 {
21517 if (this.
ai[0] < 100f)
21518 {
21520 }
21521 else
21522 {
21524 }
21525 }
21527 {
21529 Main.dust[
num177].noGravity =
true;
21530 }
21531 }
21533 {
21535 }
21537 {
21540 {
21543 {
21546 }
21548 {
21550 }
21551 }
21553 {
21556 {
21559 }
21561 {
21563 }
21564 }
21566 {
21569 }
21571 if (Main.myPlayer ==
owner)
21572 {
21573 if (Main.player[
owner].channel)
21574 {
21577 float num179 = (float)Main.mouseX + Main.screenPosition.X -
vector22.X;
21578 float num180 = (float)Main.mouseY + Main.screenPosition.Y -
vector22.Y;
21579 if (Main.player[
owner].gravDir == -1f)
21580 {
21581 num180 = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector22.Y;
21582 }
21589 {
21591 }
21594 }
21595 else
21596 {
21598 }
21599 }
21601 {
21602 Main.player[
owner].ChangeDir(1);
21603 }
21605 {
21606 Main.player[
owner].ChangeDir(-1);
21607 }
21611 Main.player[
owner].SetDummyItemTime(2);
21612 base.position.X = vector21.X - (float)(
width / 2);
21613 base.position.Y = vector21.Y - (float)(
height / 2);
21615 if (Main.player[
owner].direction == 1)
21616 {
21618 }
21619 else
21620 {
21622 }
21623 velocity.X *= 1f + (float)Main.rand.Next(-3, 4) * 0.01f;
21624 if (Main.rand.Next(6) == 0)
21625 {
21627 Main.dust[
num182].position.X -= 4f;
21628 Main.dust[
num182].noGravity =
true;
21630 dust2.velocity *= 0.2f;
21631 Main.dust[
num182].velocity.Y = (float)(-Main.rand.Next(7, 13)) * 0.15f;
21632 }
21633 }
21635 {
21638 if (Main.rand.Next(3) == 0)
21639 {
21641 Main.dust[
num183].noGravity =
true;
21643 dust2.velocity *= 0.2f;
21644 }
21645 if (this.
ai[1] == 1f)
21646 {
21648 Main.musicPitch = this.
ai[0];
21650 }
21651 }
21653 {
21655 {
21657 }
21659 if (this.
ai[1] < 0f)
21660 {
21662 {
21664 }
21666 {
21668 }
21669 else
21670 {
21672 }
21673 int num184 = (int)(
base.position.X / 16f) - 1;
21675 int num186 = (int)(
base.position.Y / 16f) - 1;
21678 {
21680 }
21681 if (
num185 > Main.maxTilesX)
21682 {
21683 num185 = Main.maxTilesX;
21684 }
21686 {
21688 }
21689 if (
num187 > Main.maxTilesY)
21690 {
21691 num187 = Main.maxTilesY;
21692 }
21697 {
21699 {
21701 {
21702 vector23.X =
num190 * 16;
21703 vector23.Y =
num191 * 16;
21705 {
21707 }
21708 }
21709 }
21710 }
21712 Main.dust[
num192].noGravity =
true;
21714 dust2.velocity *= 0.3f;
21715 return;
21716 }
21717 if (this.
ai[0] < 0f)
21718 {
21719 if (this.
ai[0] == -1f)
21720 {
21722 {
21724 Main.dust[
num194].noGravity =
true;
21726 dust2.velocity *= 1.3f;
21727 }
21728 }
21729 else if (Main.rand.Next(30) == 0)
21730 {
21733 dust2.velocity *= 0.2f;
21734 }
21738 {
21740 }
21742 if (this.
ai[0] <= -900f && (Main.myPlayer ==
owner || Main.netMode == 2) && Main.tile[
num196,
num197].active() && Main.tile[
num196,
num197].type == 127)
21743 {
21745 if (Main.netMode == 1)
21746 {
21747 NetMessage.SendData(17, -1, -1,
null, 0,
num196,
num197);
21748 }
21750 }
21751 return;
21752 }
21753 int num198 = (int)(
base.position.X / 16f) - 1;
21755 int num200 = (int)(
base.position.Y / 16f) - 1;
21758 {
21760 }
21761 if (
num199 > Main.maxTilesX)
21762 {
21763 num199 = Main.maxTilesX;
21764 }
21766 {
21768 }
21769 if (
num201 > Main.maxTilesY)
21770 {
21771 num201 = Main.maxTilesY;
21772 }
21777 {
21779 {
21781 {
21782 vector24.X =
num204 * 16;
21783 vector24.Y =
num205 * 16;
21785 {
21787 }
21788 }
21789 }
21790 }
21792 {
21794 }
21798 {
21800 }
21802 {
21803 return;
21804 }
21806 Main.dust[
num208].noGravity =
true;
21808 dust2.velocity *= 0.3f;
21812 {
21814 {
21816 {
21818 }
21820 {
21822 }
21824 {
21826 }
21828 {
21830 }
21832 {
21834 }
21836 {
21838 }
21839 }
21841 {
21843 }
21845 {
21847 }
21849 {
21851 }
21853 {
21855 }
21857 {
21859 }
21861 {
21863 }
21864 }
21866 {
21868 }
21869 else
21870 {
21872 }
21873 if (Main.myPlayer !=
owner)
21874 {
21875 return;
21876 }
21879 bool flag8 =
false;
21881 {
21883 }
21885 {
21887 }
21889 {
21890 return;
21891 }
21893 {
21894 if (Main.netMode == 1)
21895 {
21896 NetMessage.SendData(17, -1, -1,
null, 1,
num209,
num210, 127f);
21897 }
21902 base.position.X =
num209 * 16;
21903 base.position.Y =
num210 * 16;
21905 }
21906 else
21907 {
21909 }
21910 }
21912 {
21914 {
21915 if (this.
ai[0] < 8f)
21916 {
21918 }
21920 }
21922 {
21924 }
21925 if (this.
ai[0] > 7f)
21926 {
21928 if (this.
ai[0] == 8f)
21929 {
21931 }
21932 else if (this.
ai[0] == 9f)
21933 {
21935 }
21936 else if (this.
ai[0] == 10f)
21937 {
21939 }
21943 {
21945 }
21946 if (
num214 == 6 || Main.rand.Next(2) == 0)
21947 {
21949 {
21952 if (Main.rand.Next(3) != 0 || (
num214 == 75 && Main.rand.Next(3) == 0))
21953 {
21954 Main.dust[
num216].noGravity =
true;
21956 dust2.scale *= 3f;
21957 Main.dust[
num216].velocity.X *= 2f;
21958 Main.dust[
num216].velocity.Y *= 2f;
21959 }
21961 {
21963 dust2.scale *= 1.25f;
21964 }
21965 else
21966 {
21968 dust2.scale *= 1.5f;
21969 }
21970 Main.dust[
num216].velocity.X *= 1.2f;
21971 Main.dust[
num216].velocity.Y *= 1.2f;
21975 {
21978 if (!Main.dust[
num216].noGravity)
21979 {
21981 dust2.velocity *= 0.5f;
21982 }
21983 }
21984 }
21985 }
21986 }
21987 else
21988 {
21990 }
21992 }
21994 {
21999 {
22000 if (Main.rand.Next(4) == 0)
22001 {
22003 Main.dust[
num217].noGravity =
true;
22005 dust2.velocity *= 0.5f;
22007 dust2.scale *= 0.9f;
22008 }
22010 if (this.
ai[1] > 130f)
22011 {
22013 if ((
double)
scale <= 0.2)
22014 {
22017 }
22018 }
22019 return;
22020 }
22022 if (this.
ai[1] > 15f)
22023 {
22025 if ((
double)
scale <= 0.2)
22026 {
22029 }
22030 }
22031 }
22033 {
22035 {
22037 }
22039 {
22040 frame = Main.tileFrame[665];
22041 }
22043 {
22045 int i2 = (int)((
base.position.X - 8f) / 16f);
22047 bool flag9 =
false;
22050 {
22052 }
22053 i2 = (int)((
base.position.X + (
float)
width + 8f) / 16f);
22055 {
22057 }
22059 {
22061 }
22063 {
22064 velocity.X = 0f -
num218;
22065 }
22066 else
22067 {
22068 i2 = (int)((
base.position.X - 8f - 16f) / 16f);
22073 {
22075 }
22076 i2 = (int)((
base.position.X + (
float)
width + 8f + 16f) / 16f);
22078 {
22080 }
22082 {
22084 }
22086 {
22087 velocity.X = 0f -
num218;
22088 }
22089 else
22090 {
22091 i2 = (int)((
base.position.X - 8f - 32f) / 16f);
22096 {
22098 }
22099 i2 = (int)((
base.position.X + (
float)
width + 8f + 32f) / 16f);
22101 {
22103 }
22105 {
22106 if ((int)(base.Center.X / 16f) % 2 == 0)
22107 {
22109 }
22110 else
22111 {
22113 }
22114 }
22116 {
22118 }
22120 {
22121 velocity.X = 0f -
num218;
22122 }
22123 }
22124 }
22125 }
22129 {
22130 velocity.Y = 16f;
22131 }
22133 {
22135 {
22136 if (
velocity.
X > 0f && (
double)velocity.X < 3.5)
22137 {
22138 velocity.X += 0.025f;
22139 }
22140 if (
velocity.
X < 0f && (
double)velocity.X > -3.5)
22141 {
22142 velocity.X -= 0.025f;
22143 }
22144 }
22145 }
22147 {
22149 {
22150 velocity.X += 0.05f;
22151 }
22153 {
22154 velocity.X -= 0.05f;
22155 }
22156 }
22158 {
22159 velocity.Y += 0.06f;
22160 }
22161 else
22162 {
22163 velocity.Y += 0.3f;
22164 }
22166 {
22168 }
22169 }
22171 {
22173 }
22175 {
22177 {
22179 if (this.
ai[0] < 30f)
22180 {
22182 }
22183 }
22185 {
22188 {
22195 dust2.velocity *= 0.25f;
22198 }
22199 }
22201 {
22202 int num224 = Main.rand.Next(3);
22204 {
22205 0 => 15,
22206 1 => 57,
22207 _ => 58,
22208 }, 0f, 0f, 100,
default(
Color), 1.25f);
22210 dust2.velocity *= 0.1f;
22211 }
22213 {
22216 dust2.velocity *= -0.25f;
22219 dust2.velocity *= -0.25f;
22221 dust2.position -=
velocity * 0.5f;
22222 }
22224 {
22226 }
22227 else
22228 {
22230 {
22233 dust2.velocity *= -0.25f;
22234 }
22235 else if (
type == 116)
22236 {
22239 dust2.velocity *= -0.25f;
22240 Main.dust[
num228].noGravity =
true;
22241 }
22243 {
22247 {
22250 }
22251 }
22253 {
22257 {
22260 }
22261 }
22262 }
22263 if (this.
ai[1] == 0f)
22264 {
22267 {
22269 }
22270 else
22271 {
22273 }
22274 }
22276 {
22279 }
22280 else
22281 {
22283 }
22285 {
22286 velocity.Y = 16f;
22287 }
22288 }
22290 {
22292 {
22295 {
22297 int num229 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 219,
velocity.
X,
velocity.
Y, 0,
default(
Color), 0.35f + (float)Main.rand.Next(-5, 5) * 0.01f);
22298 Main.dust[
num229].noGravity =
true;
22300 }
22302 {
22306 {
22308 }
22309 }
22310 }
22312 {
22314 {
22315 int num231 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 137,
velocity.
X,
velocity.
Y, Main.rand.Next(0, 101),
default(
Color), 1f + (float)Main.rand.Next(-20, 40) * 0.01f);
22316 Main.dust[
num231].noGravity =
true;
22318 dust2.velocity *= 0.3f;
22319 }
22320 }
22322 {
22324 {
22326 Main.dust[
num233].noGravity =
true;
22328 dust2.velocity *= 0.3f;
22329 }
22330 }
22332 {
22334 {
22336 Main.dust[
num235].noGravity =
true;
22338 dust2.velocity *= 0.3f;
22339 }
22340 }
22342 {
22344 {
22346 Main.dust[
num237].noGravity =
true;
22348 dust2.velocity *= 0.3f;
22349 }
22350 }
22352 {
22354 {
22356 Main.dust[
num239].noGravity =
true;
22358 dust2.velocity *= 0.1f + (float)Main.rand.Next(4) * 0.1f;
22360 dust2.scale *= 1f + (float)Main.rand.Next(5) * 0.1f;
22361 }
22362 }
22363 if (this.
ai[1] != 0f)
22364 {
22365 return;
22366 }
22369 {
22371 {
22372 int num241 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 219,
velocity.
X,
velocity.
Y, 0,
default(
Color), 0.4f + (float)Main.rand.Next(-20, 40) * 0.01f);
22373 Main.dust[
num241].noGravity =
true;
22374 Main.dust[
num241].velocity = (
velocity * 0.5f).RotatedByRandom(0.5);
22375 }
22377 }
22378 else
22379 {
22381 }
22382 }
22384 {
22386 {
22389 {
22391 Main.dust[
num244].position = (Main.dust[
num244].position +
base.Center) / 2f;
22392 Main.dust[
num244].noGravity =
true;
22394 dust2.velocity *= 0.5f;
22395 }
22397 {
22400 {
22401 case 0:
22402 Main.dust[
num244].position = (Main.dust[
num244].position + base.Center * 5f) / 6f;
22403 break;
22404 case 1:
22405 Main.dust[
num244].position = (Main.dust[
num244].position + (base.Center +
velocity / 2f) * 5f) / 6f;
22406 break;
22407 }
22409 dust2.velocity *= 0.1f;
22410 Main.dust[
num244].noGravity =
true;
22411 Main.dust[
num244].fadeIn = 1f;
22412 }
22413 }
22414 else if (
type == 620)
22415 {
22418 float num247 = (60f - this.
ai[1]) / 60f;
22419 if (this.
ai[1] > 40f)
22420 {
22422 }
22423 velocity.Y += 0.2f;
22425 {
22426 velocity.Y = 18f;
22427 }
22428 velocity.X *= 0.98f;
22430 {
22432 Main.dust[
num249].position = (Main.dust[
num249].position +
base.Center) / 2f;
22433 Main.dust[
num249].noGravity =
true;
22435 dust2.velocity *= 0.3f;
22438 }
22440 {
22442 Main.dust[
num249].position = (Main.dust[
num249].position + base.Center * 5f) / 6f;
22444 dust2.velocity *= 0.1f;
22445 Main.dust[
num249].noGravity =
true;
22449 }
22450 }
22451 else if (
type == 521)
22452 {
22454 {
22456 Main.dust[
num252].position = (Main.dust[
num252].position +
base.Center) / 2f;
22457 Main.dust[
num252].noGravity =
true;
22459 dust2.velocity *= 0.5f;
22460 }
22462 {
22465 {
22466 case 0:
22467 Main.dust[
num252].position = (Main.dust[
num252].position + base.Center * 5f) / 6f;
22468 break;
22469 case 1:
22470 Main.dust[
num252].position = (Main.dust[
num252].position + (base.Center +
velocity / 2f) * 5f) / 6f;
22471 break;
22472 }
22474 dust2.velocity *= 0.1f;
22475 Main.dust[
num252].noGravity =
true;
22476 Main.dust[
num252].fadeIn = 1f;
22477 }
22478 }
22479 else if (
type == 522)
22480 {
22482 float num254 = (60f - this.
ai[1]) / 60f;
22483 if (this.
ai[1] > 40f)
22484 {
22486 }
22487 velocity.Y += 0.2f;
22489 {
22490 velocity.Y = 18f;
22491 }
22492 velocity.X *= 0.98f;
22494 {
22496 Main.dust[
num256].position = (Main.dust[
num256].position +
base.Center) / 2f;
22497 Main.dust[
num256].noGravity =
true;
22499 dust2.velocity *= 0.3f;
22502 }
22504 {
22506 Main.dust[
num256].position = (Main.dust[
num256].position + base.Center * 5f) / 6f;
22508 dust2.velocity *= 0.1f;
22509 Main.dust[
num256].noGravity =
true;
22513 }
22514 }
22515 else if (
type == 731)
22516 {
22518 {
22521 {
22523 }
22524 }
22527 {
22529 }
22531 if ((
int)this.
ai[0] % 2 != 0 && Main.rand.Next(4) == 0)
22532 {
22534 }
22536 switch ((
int)this.
ai[0])
22537 {
22538 case 10:
22540 break;
22541 case 12:
22543 break;
22544 case 18:
22546 break;
22547 case 20:
22550 break;
22551 }
22552 if (Main.rand.Next(3) == 0)
22553 {
22555 dust11.noGravity = true;
22556 dust11.velocity = dust11.velocity * 0f +
velocity * 0.5f;
22557 if (Main.rand.Next(3) != 0)
22558 {
22560 dust2.velocity *= 1.4f;
22561 }
22562 }
22563 Lighting.AddLight(
base.Center, 0.2f, 0.5f, 0.7f);
22564 }
22565 else
22566 {
22569 {
22571 }
22573 {
22575 Main.dust[
num261].noGravity =
true;
22577 dust2.velocity *= 0.3f;
22578 }
22579 if (this.
ai[1] == 0f)
22580 {
22583 }
22584 }
22585 }
22587 {
22589 {
22593 {
22595 int num265 = Dust.NewDust(
base.position +
new Vector2(
num264,
num264),
width -
num264 * 2,
height -
num264 * 2, 43, 0f, 0f, 254,
new Color(255, 255, 0));
22597 }
22598 if (this.
ai[0] > num263)
22599 {
22602 }
22603 else
22604 {
22606 if (
rotation > (
float)Math.PI * 2f)
22607 {
22609 }
22610 }
22613 if (Main.myPlayer ==
owner &&
this.ai[0] <
num263 &&
this.ai[0] % 10f == 0f)
22614 {
22615 float num267 = (float)
Math.
PI / 2f * (
float)((this.
ai[0] % 20f != 0f) ? 1 : (-1));
22620 v3 *=
Math.
Max(2.5f, (
num263 - this.
ai[0]) / num263 * (7f + (-2f + (float)Main.rand.Next(2) * 2f)));
22622 }
22624 {
22626 }
22627 if (this.
ai[0] > num262)
22628 {
22630 }
22631 }
22632 else if (
type == 335)
22633 {
22635 if (this.
ai[0] < 0f)
22636 {
22637 velocity.Y += 0.25f;
22639 {
22640 velocity.Y = 14f;
22641 }
22642 }
22643 else
22644 {
22646 {
22649 {
22650 case 0:
22652 break;
22653 case 1:
22655 break;
22656 case 2:
22658 break;
22659 case 3:
22661 break;
22662 }
22666 }
22668 }
22670 {
22672 {
22674 if (Main.netMode != 1)
22675 {
22678 }
22679 }
22681 }
22682 localAI[0]++;
22684 }
22685 else
22686 {
22691 {
22693 }
22694 }
22695 }
22697 {
22702 {
22703 default:
22706 break;
22707 case 147:
22710 break;
22711 case 146:
22714 break;
22715 case 148:
22718 break;
22719 case 149:
22722 break;
22723 case 1015:
22726 break;
22727 case 1016:
22730 break;
22731 case 1017:
22734 break;
22735 }
22736 if (
owner == Main.myPlayer)
22737 {
22740 {
22742 }
22743 Point point =
base.Center.ToTileCoordinates();
22745 }
22747 {
22749 }
22752 {
22754 }
22755 if (this.
ai[0] > (
float)num274)
22756 {
22758 if (this.
ai[0] == (
float)(num274 + 1))
22759 {
22761 }
22762 else if (this.
ai[0] == (
float)(num274 + 2))
22763 {
22765 }
22766 else if (this.
ai[0] == (
float)(num274 + 3))
22767 {
22769 }
22770 else if (this.
ai[0] == (
float)(num274 + 4))
22771 {
22773 }
22776 {
22779 }
22782 {
22784 Main.dust[
num278].noGravity =
true;
22786 dust2.scale *= 1.75f;
22787 Main.dust[
num278].velocity.X *= 2f;
22788 Main.dust[
num278].velocity.Y *= 2f;
22791 }
22792 }
22793 else
22794 {
22796 }
22798 }
22800 {
22803 if (this.
ai[0] >= 20f)
22804 {
22808 {
22810 if (entity.active &&
rectangle3.Intersects(entity.Hitbox))
22811 {
22813 velocity.Y = -4.5f;
22815 {
22816 velocity.X = 2f;
22817 }
22819 {
22820 velocity.X = -2f;
22821 }
22822 velocity.X = (velocity.X + (float)entity.direction * 1.75f) / 2f;
22823 velocity.X += entity.velocity.X * 3f;
22824 velocity.Y += entity.velocity.Y;
22826 {
22827 velocity.X = 6f;
22828 }
22830 {
22831 velocity.X = -6f;
22832 }
22834 {
22836 }
22839 }
22840 }
22842 {
22844 {
22845 continue;
22846 }
22848 if (entity.active &&
rectangle3.Intersects(entity.Hitbox))
22849 {
22851 velocity.Y = -4.5f;
22853 {
22854 velocity.X = 2f;
22855 }
22857 {
22858 velocity.X = -2f;
22859 }
22860 velocity.X = (velocity.X + (float)entity.direction * 1.75f) / 2f;
22861 velocity.X += entity.velocity.X * 3f;
22862 velocity.Y += entity.velocity.Y;
22864 {
22865 velocity.X = 6f;
22866 }
22868 {
22869 velocity.X = -6f;
22870 }
22872 {
22874 }
22877 }
22878 }
22879 }
22881 {
22883 }
22886 {
22887 velocity.X *= 0.98f;
22888 }
22890 {
22891 velocity.X *= 0.99f;
22892 }
22893 else
22894 {
22895 velocity.X *= 0.995f;
22896 }
22898 {
22899 velocity.X = 0f;
22900 }
22902 {
22905 {
22906 velocity.Y *= 0.95f;
22907 }
22908 velocity.Y -= 0.1f;
22910 {
22911 velocity.Y = -4f;
22912 }
22914 {
22916 }
22917 }
22918 else
22919 {
22920 velocity.Y += 0.1f;
22921 }
22923 {
22924 velocity.Y = 10f;
22925 }
22926 }
22928 {
22930 {
22933 {
22935 }
22936 }
22940 if (num282 == 0f &&
num283 == 0f)
22941 {
22943 }
22949 {
22952 {
22953 case 163:
22955 break;
22956 case 310:
22958 break;
22959 case 1008:
22961 break;
22962 case 1009:
22964 break;
22965 case 1010:
22967 break;
22968 case 1011:
22970 break;
22971 }
22973 Main.dust[
num286].noGravity =
true;
22979 {
22980 Main.dust[
num286].color = Main.hslToRgb(Main.GlobalTimeWrappedHourly * 0.6f % 1f, 1f, 0.5f);
22982 dust2.scale *= 0.5f;
22984 dust2.velocity *= 0.75f;
22985 }
22986 }
22988 {
22991 localAI[1] += 1f;
22993 {
22994 velocity.Y += 0.09f;
22996 }
22997 }
22998 else
22999 {
23001 {
23004 }
23005 if (
type == 1008 && Main.netMode != 2)
23006 {
23008 if ((
base.Center - Main.player[Main.myPlayer].Center).Length() < (float)(Main.screenWidth +
num287 * 16))
23009 {
23010 Main.instance.SpelunkerProjectileHelper.AddSpotToCheck(
base.Center);
23011 }
23012 }
23014 }
23016 {
23017 velocity.Y = 16f;
23018 }
23020 }
23022 {
23024 if (this.
ai[1] == 1f)
23025 {
23027 if (this.
ai[0] == 1f)
23028 {
23030 {
23032 Main.dust[
num289].noGravity =
true;
23034 dust2.velocity *= 3f;
23035 Main.dust[
num289].fadeIn = 0.5f;
23039 dust2.velocity +=
velocity / 4f + Main.player[
owner].velocity * 0.1f;
23040 }
23041 }
23042 if (this.
ai[0] > 2f)
23043 {
23045 Main.dust[
num290].noGravity =
true;
23047 dust2.velocity *= 0.2f;
23050 Main.dust[
num290].noGravity =
true;
23052 dust2.velocity *= 0.2f;
23055 Main.dust[
num290].noGravity =
true;
23057 dust2.velocity *= 0.2f;
23059 }
23060 }
23061 else if (
type >= 415 &&
type <= 418)
23062 {
23064 if (this.
ai[0] > 4f)
23065 {
23067 Main.dust[
num291].noGravity =
true;
23069 dust2.velocity *= 0.2f;
23071 }
23072 }
23073 else
23074 {
23076 Main.dust[
num292].noGravity =
true;
23078 dust2.velocity *= 0.2f;
23080 }
23081 }
23083 {
23085 if (this.
ai[0] > 30f)
23086 {
23087 velocity.Y += 0.2f;
23088 velocity.X *= 0.985f;
23090 {
23091 velocity.Y = 14f;
23092 }
23093 }
23095 if (
owner != Main.myPlayer)
23096 {
23097 return;
23098 }
23102 {
23104 }
23105 else
23106 {
23110 {
23112 base.position.Y =
num294 * 16 + 16 + 8;
23113 base.position.X =
num293 * 16 + 8;
23114 }
23115 }
23117 {
23118 return;
23119 }
23122 {
23124 }
23126 {
23128 }
23130 {
23132 }
23138 {
23139 return;
23140 }
23142 {
23143 }
23146 {
23149 {
23150 break;
23151 }
23153 {
23155 {
23157 }
23159 {
23162 NetMessage.SendData(17, -1, -1,
null, 0,
num296,
num297);
23163 }
23164 }
23166 {
23172 }
23174 {
23176 }
23178 {
23180 }
23182 }
23184 }
23186 {
23188 {
23190 }
23192 {
23194 }
23195 else
23196 {
23198 }
23200 {
23202 }
23204 {
23208 {
23211 }
23213 {
23215 }
23217 {
23221 Main.dust[
num302].position.X = base.Center.X -
num300;
23222 Main.dust[
num302].position.Y = base.Center.Y -
num301;
23224 dust2.velocity *= 0f;
23225 Main.dust[
num302].scale = 0.5f;
23226 }
23227 }
23228 else
23229 {
23231 {
23233 {
23235 }
23237 {
23239 }
23240 }
23242 {
23244 }
23246 {
23248 }
23252 {
23255 }
23257 {
23259 }
23260 }
23266 if (this.
ai[0] > 30f)
23267 {
23270 {
23271 if (Main.npc[
num306].CanBeChasedBy(
this) && (!Main.npc[
num306].wet || Main.npc[
num306].type == 370 ||
type == 307))
23272 {
23277 {
23282 }
23283 }
23284 }
23285 }
23287 {
23288 num303 = base.position.X + (float)(
width / 2) + velocity.X * 100f;
23289 num304 = base.position.Y + (float)(
height / 2) + velocity.Y * 100f;
23290 }
23291 else if (
type == 307)
23292 {
23294 }
23298 {
23301 }
23303 {
23306 }
23308 {
23310 {
23313 }
23314 else
23315 {
23318 }
23319 }
23321 {
23324 }
23334 {
23337 {
23338 velocity.X +=
num311 * 2f;
23339 }
23340 }
23342 {
23345 {
23346 velocity.X -=
num311 * 2f;
23347 }
23348 }
23350 {
23353 {
23354 velocity.Y +=
num311 * 2f;
23355 }
23356 }
23358 {
23361 {
23362 velocity.Y -=
num311 * 2f;
23363 }
23364 }
23365 }
23367 {
23368 if (this.
ai[1] == 0f)
23369 {
23371 localAI[0] = base.Center.X - velocity.X * 1.5f;
23372 localAI[1] = base.Center.Y - velocity.Y * 1.5f;
23373 }
23376 if (this.
ai[0] == 0f)
23377 {
23379 {
23382 return;
23383 }
23386 {
23389 }
23390 }
23392 {
23394 }
23395 }
23397 {
23399 if (this.
ai[0] >= 6f)
23400 {
23403 if (Main.myPlayer ==
owner)
23404 {
23406 }
23407 }
23408 }
23410 {
23413 {
23415 }
23417 {
23419 return;
23420 }
23422 {
23423 Main.player[
owner].SetDummyItemTime(5);
23424 if (
base.Center.X > Main.player[
owner].Center.X)
23425 {
23426 Main.player[
owner].ChangeDir(1);
23427 }
23428 else
23429 {
23430 Main.player[
owner].ChangeDir(-1);
23431 }
23432 }
23438 {
23441 }
23442 if (this.
ai[1] > 0f &&
num319 > 1500f)
23443 {
23446 }
23447 if (this.
ai[1] > 0f)
23448 {
23451 if (Main.npc[
num320].active && Main.npc[
num320].life > 0)
23452 {
23459 {
23463 {
23465 {
23468 }
23469 else
23470 {
23473 }
23475 {
23476 velocity.X = 0f;
23477 velocity.Y = 0f;
23478 }
23479 }
23480 }
23481 else
23482 {
23484 {
23486 }
23493 {
23496 }
23497 else
23498 {
23501 }
23502 }
23504 {
23505 base.position += Main.npc[
num320].velocity;
23507 {
23509 {
23510 if (
base.position.X < Main.projectile[
num322].position.X)
23511 {
23512 velocity.X -= 4f;
23513 }
23514 else
23515 {
23516 velocity.X += 4f;
23517 }
23518 if (
base.position.Y < Main.projectile[
num322].position.Y)
23519 {
23520 velocity.Y -= 4f;
23521 }
23522 else
23523 {
23524 velocity.Y += 4f;
23525 }
23526 }
23527 }
23528 }
23529 if (Main.myPlayer ==
owner)
23530 {
23534 {
23536 }
23537 }
23538 }
23539 else if (Main.myPlayer ==
owner)
23540 {
23544 {
23546 }
23552 {
23553 if (Main.npc[
num329].CanBeChasedBy(
this))
23554 {
23555 float x = Main.npc[
num329].Center.X;
23556 float y = Main.npc[
num329].Center.Y;
23559 {
23564 }
23565 }
23566 }
23568 {
23575 {
23577 }
23584 this.
ai[1] = num328 + 1;
23586 }
23587 }
23588 }
23589 else if (this.
ai[0] == 0f)
23590 {
23592 {
23595 }
23597 {
23600 }
23601 else
23602 {
23605 }
23606 }
23607 else if (this.
ai[0] == 1f)
23608 {
23611 {
23614 }
23615 else
23616 {
23619 }
23621 {
23624 }
23625 else
23626 {
23629 }
23632 {
23634 }
23641 {
23642 base.position += Main.player[
owner].velocity;
23643 }
23644 }
23647 {
23650 }
23652 {
23654 }
23655 }
23657 {
23660 {
23664 {
23666 }
23667 }
23670 {
23673 }
23675 {
23677 }
23678 velocity.X += this.
ai[0];
23679 velocity.Y += this.
ai[1];
23680 localAI[1] += 1f;
23682 {
23684 this.
ai[0] = (float)Main.rand.Next(-100, 101) * 6
E-05f;
23685 this.
ai[1] = (float)Main.rand.Next(-100, 101) * 6
E-05f;
23686 }
23688 {
23689 velocity.X *= 0.95f;
23690 velocity.Y *= 0.95f;
23691 }
23693 {
23694 velocity.X *= 1.05f;
23695 velocity.Y *= 1.05f;
23696 }
23698 }
23700 {
23702 {
23704 frame = Main.rand.Next(3);
23705 }
23707 }
23709 {
23710 if (!Main.player[
owner].crystalLeaf)
23711 {
23713 return;
23714 }
23715 base.position.X = Main.player[
owner].Center.X - (float)(
width / 2);
23716 base.position.Y = Main.player[
owner].Center.Y - (float)(
height / 2) + Main.player[
owner].gfxOffY - 60f;
23717 if (Main.player[
owner].gravDir == -1f)
23718 {
23719 base.position.Y += 120f;
23721 }
23722 else
23723 {
23725 }
23726 base.position.X = (int)
base.position.X;
23727 base.position.Y = (int)
base.position.Y;
23728 float num333 = (float)(
int)Main.mouseTextColor / 200f - 0.35f;
23731 if (
owner != Main.myPlayer || Main.player[
owner].crystalLeafCooldown != 0)
23732 {
23733 return;
23734 }
23735 float x2 =
base.position.X;
23736 float y2 =
base.position.Y;
23740 {
23741 if (Main.npc[
num335].CanBeChasedBy(
this))
23742 {
23747 {
23750 }
23751 }
23752 }
23754 {
23767 {
23771 }
23773 Main.player[
owner].crystalLeafCooldown = 40;
23774 }
23775 }
23777 {
23780 {
23784 {
23786 Main.dust[
num346].noGravity =
true;
23788 dust2.velocity *= 3f;
23789 Main.dust[
num346].scale = 1.5f;
23791 dust2.velocity +=
velocity * Main.rand.NextFloat();
23792 }
23793 }
23795 float num348 = ((
num347 * -6f * 0.85f + 0.33f) % 1f + 1f) % 1f;
23800 {
23803 {
23804 PositionInWorld =
base.Center,
23806 UniqueInfoPiece = (byte)(Main.rgbToHsl(
value3).X * 255f)
23807 });
23808 }
23809 Lighting.AddLight(
base.Center,
new Vector3(0.05f, 0.2f, 0.1f) * 1.5f);
23810 if (Main.rand.Next(5) == 0)
23811 {
23813 dust12.noGravity = true;
23815 dust2.velocity *= 0.1f;
23816 dust12.scale = 1.5f;
23818 dust2.velocity +=
velocity * Main.rand.NextFloat();
23820 dust12.color.A /= 4;
23821 dust12.alpha = 100;
23822 dust12.noLight = true;
23823 }
23824 }
23826 {
23829 {
23833 {
23835 }
23836 }
23837 else if (
type == 732)
23838 {
23842 {
23844 }
23845 if (Main.rand.Next(5) == 0)
23846 {
23848 dust13.noGravity = true;
23850 dust2.velocity *= 1.2f;
23851 }
23853 Lighting.AddLight(
base.Center, 0.3f, 0.6f, 0.8f);
23854 }
23855 else if (
type == 229)
23856 {
23857 if (this.
ai[0] == 0f)
23858 {
23860 }
23862 if (this.
ai[0] > 20f)
23863 {
23864 velocity.Y += 0.3f;
23865 velocity.X *= 0.98f;
23866 }
23867 }
23869 {
23872 {
23874 }
23875 }
23876 }
23878 {
23880 {
23883 if (num350 != 0f &&
num351 != 0f)
23884 {
23888 {
23889 velocity.X = 0f;
23891 }
23893 {
23894 velocity.Y = 0f;
23896 }
23898 {
23900 }
23901 }
23905 {
23909 {
23911 }
23912 }
23913 }
23914 else if (
type == 238 ||
type == 244)
23915 {
23920 {
23922 }
23925 {
23929 {
23931 }
23932 }
23934 if (
type == 244 && this.
ai[1] >= 18000f)
23935 {
23938 {
23941 }
23942 }
23943 else if (
type == 238 && this.
ai[1] >= 18000f)
23944 {
23947 {
23950 }
23951 }
23953 {
23956 {
23957 if (this.
ai[0] > 10f)
23958 {
23960 if (
owner == Main.myPlayer)
23961 {
23962 num352 += Main.rand.Next(-14, 15);
23964 }
23965 }
23966 }
23967 else if (this.
ai[0] > 8f)
23968 {
23970 if (
owner == Main.myPlayer)
23971 {
23972 num352 += Main.rand.Next(-14, 15);
23974 }
23975 }
23976 }
23979 {
23980 return;
23981 }
23988 {
23990 {
23993 {
23996 }
23997 }
23998 }
24000 {
24002 {
24003 Main.projectile[
num355].netUpdate =
true;
24004 Main.projectile[
num355].ai[1] = 18000f;
24005 }
24006 }
24008 {
24009 Main.projectile[
num355].netUpdate =
true;
24010 Main.projectile[
num355].ai[1] = 18000f;
24011 }
24012 }
24014 {
24018 {
24019 velocity.Y *= -1f;
24021 }
24023 {
24025 }
24026 else if (
type == 245)
24027 {
24029 }
24030 else if (
type == 264)
24031 {
24033 }
24034 }
24035 }
24037 {
24041 {
24043 }
24046 {
24049 {
24051 return;
24052 }
24053 if (
owner == Main.myPlayer)
24054 {
24057 {
24060 }
24062 {
24064 }
24065 }
24068 {
24069 num364 -= velocity.Y / 3f;
24070 }
24071 this.
ai[0] += num364;
24072 if (this.
ai[0] > 30f)
24073 {
24074 velocity.Y += 0.5f;
24076 {
24077 velocity.X *= 0.95f;
24078 }
24079 else
24080 {
24081 velocity.X *= 1.05f;
24082 }
24083 }
24093 return;
24094 }
24096 {
24098 {
24101 }
24102 else
24103 {
24106 }
24109 }
24110 velocity.X *= 0.98f;
24111 velocity.Y *= 0.98f;
24113 {
24115 }
24117 {
24119 }
24121 {
24124 }
24125 else
24126 {
24128 }
24129 }
24131 {
24133 }
24135 {
24137 {
24139 {
24147 Main.dust[
num368].scale = (float)Main.rand.Next(70, 110) * 0.013f;
24149 dust2.velocity *= 0.2f;
24150 }
24151 return;
24152 }
24154 {
24156 {
24164 if (Main.rand.Next(2) == 0)
24165 {
24167 }
24168 else
24169 {
24171 }
24172 Main.dust[
num370].scale = (float)Main.rand.Next(70, 110) * 0.013f;
24174 dust2.velocity *= 0.2f;
24175 }
24176 return;
24177 }
24179 {
24181 {
24183 }
24186 {
24188 {
24194 Main.dust[
num372].scale = (float)Main.rand.Next(70, 110) * 0.013f;
24196 dust2.velocity *= 0.2f;
24197 }
24198 }
24199 return;
24200 }
24202 {
24205 {
24207 {
24213 Main.dust[
num374].scale = (float)Main.rand.Next(70, 110) * 0.013f;
24215 dust2.velocity *= 0.2f;
24216 }
24217 }
24218 return;
24219 }
24222 {
24224 {
24232 Main.dust[
num376].scale = (float)Main.rand.Next(70, 110) * 0.013f;
24234 dust2.velocity *= 0.2f;
24235 }
24236 }
24237 }
24239 {
24240 if (this.
ai[0] == -2f)
24241 {
24244 return;
24245 }
24246 if (this.
ai[0] == -3f)
24247 {
24249 return;
24250 }
24252 {
24255 }
24256 if (this.
ai[0] >= 0f)
24257 {
24259 {
24261 }
24263 {
24265 }
24269 if (this.
ai[0] >= 18f)
24270 {
24271 velocity.Y += 0.28f;
24272 velocity.X *= 0.99f;
24273 }
24274 if ((double)velocity.Y > 15.9)
24275 {
24276 velocity.Y = 15.9f;
24277 }
24278 if (!(this.
ai[0] > 2f))
24279 {
24280 return;
24281 }
24283 if (this.
ai[0] == 3f)
24284 {
24286 {
24289 dust2.velocity *= 0.5f;
24291 dust2.velocity +=
velocity * 0.1f;
24292 }
24294 {
24296 Main.dust[
num380].noGravity =
true;
24298 dust2.velocity *= 3f;
24300 dust2.velocity +=
velocity * 0.2f;
24303 dust2.velocity *= 2f;
24305 dust2.velocity +=
velocity * 0.3f;
24306 }
24308 {
24310 Gore gore = Main.gore[
num382];
24311 gore.position +=
velocity * 1.25f;
24312 Main.gore[
num382].scale = 1.5f;
24313 gore = Main.gore[
num382];
24315 gore = Main.gore[
num382];
24316 gore.velocity *= 0.02f;
24317 }
24318 }
24319 }
24320 else if (this.
ai[0] == -1f)
24321 {
24323 velocity.X *= 0.95f;
24324 velocity.Y += 0.2f;
24325 }
24326 }
24328 {
24330 {
24332 {
24335 }
24339 {
24341 }
24343 {
24345 }
24347 {
24349 }
24351 {
24353 }
24355 {
24357 }
24359 {
24361 Main.dust[
num384].noGravity =
true;
24363 dust2.velocity *= 0.5f;
24365 dust2.velocity +=
velocity * 0.1f;
24366 }
24367 return;
24368 }
24370 {
24372 {
24374 Main.dust[
num386].noGravity =
true;
24376 dust2.velocity *= 0.5f;
24378 dust2.velocity +=
velocity * 0.1f;
24379 }
24380 return;
24381 }
24383 {
24386 }
24389 {
24391 }
24393 if (this.
ai[0] > 540f)
24394 {
24395 num387 -= (this.
ai[0] - 180f) / 2f;
24396 }
24398 {
24401 }
24403 {
24405 }
24407 {
24408 float num389 = Main.rand.Next(-10, 11);
24409 float num390 = Main.rand.Next(-10, 11);
24410 float num391 = Main.rand.Next(3, 9);
24416 Main.dust[
num393].noGravity =
true;
24417 Main.dust[
num393].position.X =
base.Center.X;
24418 Main.dust[
num393].position.Y =
base.Center.Y;
24419 Main.dust[
num393].position.X += Main.rand.Next(-10, 11);
24420 Main.dust[
num393].position.Y += Main.rand.Next(-10, 11);
24423 }
24424 }
24426 {
24428 {
24431 {
24433 {
24435 Main.dust[
num395].noGravity =
true;
24437 dust2.velocity *= 0f;
24438 }
24439 }
24440 }
24441 else
24442 {
24444 {
24447 }
24449 {
24451 Main.dust[
num397].noGravity =
true;
24453 dust2.velocity *= 0f;
24454 }
24455 }
24462 {
24464 {
24466 {
24471 {
24477 }
24478 }
24479 }
24480 }
24481 else
24482 {
24485 {
24486 if (Main.player[
num406].active && !Main.player[
num406].dead)
24487 {
24488 float num407 = Main.player[
num406].position.X + (float)(Main.player[
num406].width / 2);
24489 float num408 = Main.player[
num406].position.Y + (float)(Main.player[
num406].height / 2);
24492 {
24498 }
24499 }
24500 }
24501 }
24503 {
24506 {
24508 }
24518 {
24519 velocity.X = (velocity.X * 20f +
num411) / 21f;
24520 velocity.Y = (velocity.Y * 20f +
num412) / 21f;
24521 }
24522 else
24523 {
24524 velocity.X = (velocity.X * 100f +
num411) / 101f;
24525 velocity.Y = (velocity.Y * 100f +
num412) / 101f;
24526 }
24527 }
24528 }
24530 {
24538 if (
num419 < 50f &&
base.position.X < Main.player[
num415].position.X + (
float)Main.player[
num415].width && base.position.X + (float)
width > Main.player[
num415].position.X &&
base.position.Y < Main.player[
num415].position.Y + (
float)Main.player[
num415].height && base.position.Y + (float)
height > Main.player[
num415].position.Y)
24539 {
24540 if (
owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech)
24541 {
24545 player3.statLife +=
num421;
24546 if (Main.player[
num415].statLife > Main.player[
num415].statLifeMax2)
24547 {
24548 Main.player[
num415].statLife = Main.player[
num415].statLifeMax2;
24549 }
24550 NetMessage.SendData(66, -1, -1,
null,
num415,
num421);
24551 }
24553 }
24557 velocity.X = (velocity.X * 15f +
num417) / 16f;
24558 velocity.Y = (velocity.Y * 15f +
num418) / 16f;
24560 {
24562 {
24564 float num424 = (0f - velocity.Y * 0.334f) * (
float)
num422;
24566 Main.dust[
num425].noGravity =
true;
24568 dust2.velocity *= 0f;
24571 }
24572 }
24573 else
24574 {
24576 {
24578 float num428 = (0f - velocity.Y * 0.2f) * (
float)
num426;
24580 Main.dust[
num429].noGravity =
true;
24582 dust2.velocity *= 0f;
24585 }
24586 }
24587 }
24589 {
24591 {
24598 {
24600 {
24603 dust2.velocity *= 2f;
24604 Main.dust[
num432].noGravity =
true;
24606 dust2.scale *= 1.15f;
24607 }
24608 }
24610 {
24614 {
24616 Main.dust[
num434].scale = (float)Main.rand.Next(1, 10) * 0.1f;
24617 Main.dust[
num434].noGravity =
true;
24618 Main.dust[
num434].fadeIn = 1.5f;
24620 dust2.velocity *= 0.75f;
24621 }
24622 }
24624 {
24631 {
24634 dust2.velocity *= 2f;
24635 Main.dust[
num438].noGravity =
true;
24637 dust2.scale *= 0.5f;
24638 }
24639 }
24640 }
24641 velocity.X = 0f;
24642 velocity.Y += 0.2f;
24644 {
24645 velocity.Y = 16f;
24646 }
24654 {
24659 {
24665 }
24666 }
24668 {
24670 {
24671 if (Main.npc[
num446].CanBeChasedBy(
this))
24672 {
24677 {
24683 }
24684 }
24685 }
24686 }
24688 {
24689 if (
type == 966 && this.
ai[1] != (
float)num442)
24690 {
24691 this.
ai[1] = num442;
24693 }
24700 {
24702 {
24704 }
24706 {
24709 {
24711 }
24712 else
24713 {
24715 }
24719 {
24721 }
24722 else if (
type == 377)
24723 {
24725 }
24727 {
24729 }
24731 {
24733 if (this.
ai[0] <= 0f)
24734 {
24736 }
24737 }
24738 }
24739 }
24740 if (this.
ai[0] <= 0f)
24741 {
24744 {
24746 }
24748 this.
ai[0] = num455;
24750 if (Main.myPlayer ==
owner)
24751 {
24755 {
24758 }
24760 {
24763 }
24765 {
24768 }
24771 {
24772 vector37.Y -= 16f;
24773 }
24774 else
24775 {
24777 {
24778 case 0:
24779 vector37.Y += 12f;
24781 break;
24782 case 1:
24783 vector37.Y += 0f;
24785 break;
24786 case 2:
24787 vector37.Y -= 2f;
24789 break;
24790 case 3:
24791 vector37.Y -= 6f;
24793 break;
24794 case 4:
24795 vector37.Y -= 14f;
24797 break;
24798 }
24799 }
24801 {
24802 vector37.X += 10f;
24803 }
24813 }
24814 }
24815 }
24816 else
24817 {
24818 if (
type == 966 && this.
ai[1] != -1f)
24819 {
24822 }
24824 {
24826 }
24827 }
24828 if (this.
ai[0] > 0f)
24829 {
24831 }
24832 }
24834 {
24836 {
24837 if (Main.player[Main.myPlayer].dead)
24838 {
24839 Main.player[Main.myPlayer].raven = false;
24840 }
24841 if (Main.player[Main.myPlayer].raven)
24842 {
24844 }
24845 }
24847 {
24849 {
24850 if (
base.position.X < Main.projectile[
num464].position.X)
24851 {
24852 velocity.X -= 0.05f;
24853 }
24854 else
24855 {
24856 velocity.X += 0.05f;
24857 }
24858 if (
base.position.Y < Main.projectile[
num464].position.Y)
24859 {
24860 velocity.Y -= 0.05f;
24861 }
24862 else
24863 {
24864 velocity.Y += 0.05f;
24865 }
24866 }
24867 }
24874 {
24876 }
24878 {
24880 }
24881 if (this.
ai[0] == 0f)
24882 {
24886 {
24891 {
24896 }
24897 }
24899 {
24901 {
24902 if (Main.npc[
num472].CanBeChasedBy(
this))
24903 {
24908 {
24913 }
24914 }
24915 }
24916 }
24917 }
24918 else
24919 {
24921 }
24923 {
24926 if (this.
ai[0] == 1f)
24927 {
24929 }
24932 float num478 = Main.player[
owner].Center.Y - vector38.Y - 60f;
24936 {
24938 }
24940 {
24941 base.position.X = Main.player[
owner].Center.X - (float)(
width / 2);
24942 base.position.Y = Main.player[
owner].Center.Y - (float)(
width / 2);
24943 }
24945 {
24947 if (this.
ai[0] == 1f)
24948 {
24950 }
24951 }
24953 {
24957 velocity.X = (velocity.X * 20f +
num477) / 21f;
24958 velocity.Y = (velocity.Y * 20f +
num478) / 21f;
24959 }
24960 else
24961 {
24963 {
24964 velocity.X = -0.15f;
24965 velocity.Y = -0.05f;
24966 }
24968 }
24973 {
24976 }
24978 {
24980 }
24982 {
24984 }
24985 return;
24986 }
24987 if (this.
ai[1] == -1f)
24988 {
24990 }
24991 if (this.
ai[1] > 0f)
24992 {
24994 }
24995 if (this.
ai[1] == 0f)
24996 {
25005 {
25007 }
25011 velocity.X = (velocity.X * 14f +
num482) / 15f;
25012 velocity.Y = (velocity.Y * 14f +
num483) / 15f;
25013 }
25014 else
25015 {
25018 {
25020 }
25021 }
25025 {
25028 }
25030 {
25032 }
25034 {
25036 }
25038 {
25040 }
25041 }
25043 {
25046 {
25050 {
25052 }
25053 }
25055 {
25058 }
25059 else
25060 {
25063 }
25064 if (this.
ai[0] >= 0f && this.
ai[0] < 200f)
25065 {
25069 {
25079 velocity.X = (velocity.X * 14f +
num488) / 15f;
25080 velocity.Y = (velocity.Y * 14f +
num489) / 15f;
25081 }
25082 else
25083 {
25086 {
25089 {
25090 float x4 =
nPC3.Center.X;
25091 float y4 =
nPC3.Center.Y;
25094 {
25097 }
25098 }
25099 }
25100 }
25104 dust2.velocity *= 0.5f;
25106 dust2.velocity +=
velocity * 0.5f;
25107 Main.dust[
num496].noGravity =
true;
25108 Main.dust[
num496].noLight =
true;
25109 Main.dust[
num496].scale = 1.4f;
25110 }
25111 else
25112 {
25114 }
25115 }
25117 {
25119 {
25123 }
25125 {
25127 }
25129 {
25131 }
25132 else
25133 {
25135 }
25137 }
25139 {
25141 if (this.
ai[0] > 30f)
25142 {
25144 velocity.Y += 0.25f;
25146 {
25147 velocity.Y = 16f;
25148 }
25149 velocity.X *= 0.995f;
25150 }
25154 {
25156 }
25157 if (
owner == Main.myPlayer)
25158 {
25160 {
25161 localAI[1] = Main.rand.Next(7);
25162 }
25166 {
25168 }
25170 {
25173 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y, 0f, 0f, 344, (
int)((
float)
damage * 0.7f),
knockBack * 0.55f,
owner, 0f, Main.rand.Next(3));
25174 }
25175 }
25176 }
25178 {
25181 {
25183 }
25184 if (this.
ai[0] == 0f)
25185 {
25188 if (this.
ai[1] > 30f)
25189 {
25190 velocity.Y += 0.1f;
25191 }
25193 {
25195 }
25196 }
25197 if (this.
ai[0] == 1f)
25198 {
25200 velocity.Y += 0.1f;
25202 {
25203 velocity.Y = 3f;
25204 }
25205 velocity.X *= 0.99f;
25206 }
25208 }
25210 {
25212 if (this.
ai[1] >= 60f)
25213 {
25216 if (Main.myPlayer ==
owner && (
num498 == -1 || !Main.npc[
num498].CanBeChasedBy(
this)))
25217 {
25219 int[]
array =
new int[200];
25222 {
25223 if (Main.npc[
num500].CanBeChasedBy(
this))
25224 {
25227 {
25230 }
25231 }
25232 }
25234 {
25236 return;
25237 }
25239 this.
ai[0] = num498;
25241 }
25243 {
25256 }
25257 }
25259 {
25261 float num510 = (0f - velocity.Y * 0.2f) * (
float)
num508;
25263 Main.dust[
num511].noGravity =
true;
25265 dust2.velocity *= 0f;
25268 }
25269 }
25271 {
25274 {
25278 }
25279 if (this.
ai[0] > 3f)
25280 {
25283 {
25285 }
25286 if (
owner == Main.myPlayer)
25287 {
25290 {
25291 if (Main.npc[
num513].active && !Main.npc[
num513].dontTakeDamage && Main.npc[
num513].lifeMax > 1)
25292 {
25295 {
25298 }
25299 }
25300 }
25302 {
25304 {
25307 {
25310 }
25311 }
25312 }
25313 }
25314 this.
ai[0] += this.
ai[1];
25315 if (this.
ai[0] > 30f)
25316 {
25317 velocity.Y += 0.1f;
25318 }
25320 {
25322 {
25324 {
25330 if (Main.rand.Next(2) == 0)
25331 {
25333 dust2.alpha += 25;
25334 }
25335 if (Main.rand.Next(2) == 0)
25336 {
25338 dust2.alpha += 25;
25339 }
25340 if (Main.rand.Next(2) == 0)
25341 {
25343 dust2.alpha += 25;
25344 }
25345 Main.dust[
num520].noGravity =
true;
25347 dust2.velocity *= 0.3f;
25349 dust2.velocity +=
velocity * 0.5f;
25354 dust2.velocity *= 0.2f;
25355 }
25356 if (Main.rand.Next(4) == 0)
25357 {
25361 dust2.velocity *= 0.5f;
25363 dust2.velocity +=
velocity * 0.5f;
25364 }
25365 }
25366 }
25368 {
25369 return;
25370 }
25374 {
25379 if (Main.rand.Next(2) == 0)
25380 {
25382 dust2.alpha += 25;
25383 }
25384 if (Main.rand.Next(2) == 0)
25385 {
25387 dust2.alpha += 25;
25388 }
25389 if (Main.rand.Next(2) == 0)
25390 {
25392 dust2.alpha += 25;
25393 }
25394 Main.dust[
num526].noGravity =
true;
25396 dust2.velocity *= 0.3f;
25398 dust2.velocity +=
velocity * 0.5f;
25403 dust2.velocity *= 0.2f;
25404 }
25405 if (Main.rand.Next(4) == 0)
25406 {
25410 dust2.velocity *= 0.5f;
25412 dust2.velocity +=
velocity * 0.5f;
25413 }
25414 }
25415 else
25416 {
25418 }
25419 }
25421 {
25423 }
25425 {
25427 }
25429 {
25430 if (!Main.player[
owner].active)
25431 {
25433 return;
25434 }
25439 {
25441 if (
nPC4.CanBeChasedBy(
this))
25442 {
25445 {
25449 }
25450 }
25451 }
25453 {
25454 velocity.X *= 0.95f;
25455 }
25456 else
25457 {
25461 {
25464 {
25466 }
25468 {
25469 velocity.Y = -6f;
25470 }
25471 }
25472 else
25473 {
25476 }
25479 {
25480 velocity.X = 0f -
num532;
25481 }
25483 {
25485 }
25486 }
25490 {
25492 }
25493 else
25494 {
25496 {
25498 }
25500 {
25502 }
25504 {
25506 }
25508 {
25510 }
25511 else
25512 {
25514 }
25515 }
25517 {
25519 }
25521 velocity.Y += 0.2f;
25523 {
25524 velocity.Y = 16f;
25525 }
25526 }
25528 {
25535 {
25539 }
25541 {
25543 }
25546 {
25549 }
25551 {
25553 }
25555 {
25557 base.position.X +=
width / 2;
25558 base.position.Y +=
height / 2;
25562 base.position.X -=
width / 2;
25563 base.position.Y -=
height / 2;
25565 }
25566 if (this.
ai[1] != -1f)
25567 {
25571 }
25573 {
25576 {
25578 }
25580 {
25582 }
25583 }
25584 else
25585 {
25588 {
25590 }
25591 }
25592 if (this.
ai[0] > 0f)
25593 {
25595 }
25596 if (this.
ai[0] == 1f && this.
ai[1] > 0f &&
owner == Main.myPlayer)
25597 {
25603 center4.Y += 2f;
25604 NewProjectile(
GetProjectileSource_FromThis(),
center4.X,
center4.Y,
velocity.
X,
velocity.
Y,
type,
damage,
knockBack,
owner, 10f,
this.ai[1] - 1f);
25607 {
25609 }
25610 if ((
int)this.
ai[1] % num541 == 0 && this.
ai[1] != 0f)
25611 {
25614 {
25616 }
25619 Main.npc[
num543].netUpdate =
true;
25621 {
25623 Main.npc[
num543].ai[3] = -1.5f;
25624 }
25625 }
25626 }
25627 if (this.
ai[0] <= 0f)
25628 {
25632 {
25634 }
25640 }
25641 }
25643 {
25644 if (this.
ai[1] > 0f)
25645 {
25647 if (num547 < 255)
25648 {
25651 {
25654 {
25657 Vector2 vector42 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - (float)
Math.
PI / 2f).ToRotationVector2() * Main.rand.Next(3, 8);
25659 Main.dust[
num550].noGravity =
true;
25660 Main.dust[
num550].noLight =
true;
25662 dust2.velocity /= 4f;
25665 }
25668 {
25670 }
25673 }
25676 if (this.
ai[2] == 1f)
25677 {
25679 }
25682 if (
value6.Length() < 50f)
25683 {
25685 }
25686 }
25687 }
25688 else
25689 {
25699 {
25702 {
25704 }
25707 }
25708 }
25710 {
25711 base.position.Y -= 16f;
25713 }
25714 }
25716 {
25723 {
25728 if (Main.player[
owner].dead)
25729 {
25730 Main.player[
owner].twinsMinion =
false;
25731 }
25732 if (Main.player[
owner].twinsMinion)
25733 {
25735 }
25736 }
25738 {
25743 if (Main.player[
owner].dead)
25744 {
25745 Main.player[
owner].DeadlySphereMinion =
false;
25746 }
25747 if (Main.player[
owner].DeadlySphereMinion)
25748 {
25750 }
25752 }
25755 {
25758 {
25760 }
25762 {
25763 if (
base.position.X < Main.projectile[
num560].position.X)
25764 {
25766 }
25767 else
25768 {
25770 }
25771 if (
base.position.Y < Main.projectile[
num560].position.Y)
25772 {
25774 }
25775 else
25776 {
25778 }
25779 }
25780 }
25782 {
25783 if ((
int)this.
ai[0] % 3 != 2)
25784 {
25785 Lighting.AddLight(
base.Center, 0.8f, 0.3f, 0.1f);
25786 }
25787 else
25788 {
25789 Lighting.AddLight(
base.Center, 0.3f, 0.5f, 0.7f);
25790 }
25791 }
25793 if (this.
ai[0] == 2f &&
type == 388)
25794 {
25800 {
25803 }
25805 {
25807 }
25808 if (this.
ai[1] > 40f)
25809 {
25815 }
25816 else
25817 {
25819 }
25820 }
25821 if (
type == 533 && this.
ai[0] >= 3f && this.
ai[0] <= 5f)
25822 {
25827 int num562 = (int)this.
ai[1] / num561 + (
int)(this.
ai[0] - 3f) * 8;
25829 {
25831 }
25833 {
25835 }
25837 {
25839 }
25841 {
25843 }
25845 {
25847 }
25849 {
25851 }
25853 {
25855 }
25857 {
25859 }
25860 else
25861 {
25863 }
25864 if (this.
ai[1] > (
float)(num561 * 8))
25865 {
25868 }
25869 }
25870 if (
type == 533 && this.
ai[0] >= 6f && this.
ai[0] <= 8f)
25871 {
25874 if (this.
ai[0] == 7f)
25875 {
25877 }
25878 else
25879 {
25881 }
25883 switch ((
int)this.
ai[0])
25884 {
25885 case 6:
25887 num563 = 40;
25888 break;
25889 case 7:
25892 break;
25893 case 8:
25896 break;
25897 }
25898 if (this.ai[1] > (
float)
num563)
25899 {
25900 this.ai[1] = 1f;
25901 this.ai[0] -= 6f;
25906 }
25907 else
25908 {
25910 }
25911 if (this.ai[0] == 8f)
25912 {
25914 {
25915 int num565 = Utils.SelectRandom<
int>(Main.rand, 226, 228, 75);
25919 dust14.position = base.Center +
vector43 * 10f;
25921 dust14.scale = 0.6f + Main.rand.NextFloat() * 0.5f;
25922 dust14.noGravity = true;
25923 }
25924 }
25925 }
25927 {
25928 return;
25929 }
25933 if (this.ai[0] != 1f &&
flag26)
25934 {
25936 }
25937 if (
type == 533 && this.ai[0] < 9f)
25938 {
25940 }
25941 if (
tileCollide &&
WorldGen.SolidTile(Framing.GetTileSafely((
int)base.Center.X / 16, (int)
base.Center.Y / 16)))
25942 {
25944 }
25947 {
25951 {
25955 }
25956 }
25958 {
25960 {
25962 if (
nPC5.CanBeChasedBy(
this))
25963 {
25966 {
25971 }
25972 }
25973 }
25974 }
25977 {
25979 }
25982 {
25984 {
25985 this.ai[0] = 1f;
25986 }
25987 if (
type == 533 && this.ai[0] < 9f)
25988 {
25989 this.ai[0] += 3 * (3 - (int)(this.ai[0] / 3f));
25990 }
25993 }
25995 {
26000 {
26003 {
26005 }
26008 }
26009 else
26010 {
26014 }
26015 }
26016 else
26017 {
26020 {
26021 flag30 = this.ai[0] == 1f;
26022 }
26024 {
26025 flag30 = this.ai[0] >= 9f;
26026 }
26030 {
26032 }
26034 {
26036 }
26042 {
26044 }
26046 {
26050 {
26053 }
26055 {
26057 }
26058 }
26060 {
26063 }
26065 {
26067 {
26068 this.ai[0] = 0f;
26069 }
26071 {
26072 this.ai[0] -= 9f;
26073 }
26075 }
26077 {
26078 base.position.X = Main.player[
owner].Center.X - (float)(
width / 2);
26079 base.position.Y = Main.player[
owner].Center.Y - (float)(
height / 2);
26081 }
26083 {
26088 }
26090 {
26091 velocity.X = -0.15f;
26092 velocity.Y = -0.05f;
26093 }
26095 {
26097 }
26098 }
26100 {
26102 }
26104 {
26105 if (this.ai[0] != 1f &&
flag29)
26106 {
26108 }
26109 else
26110 {
26112 }
26113 }
26114 if (
type == 533 && (this.ai[0] < 3f || this.ai[0] >= 9f))
26115 {
26117 }
26119 {
26122 {
26125 }
26127 {
26129 }
26130 }
26131 else if (
type == 533)
26132 {
26133 if (this.ai[0] < 3f || this.ai[0] >= 9f)
26134 {
26137 {
26139 }
26142 switch ((int)this.ai[0])
26143 {
26144 case 0:
26145 case 9:
26147 break;
26148 case 1:
26149 case 10:
26152 break;
26153 case 2:
26154 case 11:
26157 {
26159 }
26161 break;
26162 }
26163 }
26164 if (this.ai[0] == 2f && Main.rand.Next(2) == 0)
26165 {
26167 {
26168 if (Main.rand.Next(2) != 0)
26169 {
26170 int num581 = Utils.SelectRandom<
int>(Main.rand, 226, 228, 75);
26174 dust15.position = base.Center +
vector47 * 10f;
26176 dust15.scale = 0.3f + Main.rand.NextFloat() * 0.5f;
26177 dust15.noGravity = true;
26178 dust15.customData = this;
26179 dust15.noLight = true;
26180 }
26181 }
26182 }
26183 }
26184 if (this.ai[1] > 0f &&
flag26)
26185 {
26186 this.ai[1] += Main.rand.Next(1, 4);
26187 }
26188 if (this.ai[1] > 90f &&
type == 387)
26189 {
26190 this.ai[1] = 0f;
26192 }
26193 if (this.ai[1] > 40f &&
type == 388)
26194 {
26195 this.ai[1] = 0f;
26197 }
26198 if (this.ai[1] > 0f &&
type == 533)
26199 {
26200 this.ai[1]++;
26202 if (this.ai[1] > (
float)
num583)
26203 {
26204 this.ai[1] = 0f;
26206 }
26207 }
26208 if (this.ai[0] == 0f &&
flag26)
26209 {
26211 {
26214 if (
flag29 && this.ai[1] == 0f)
26215 {
26216 this.ai[1]++;
26218 {
26223 Main.projectile[
num586].timeLeft = 300;
26225 }
26226 }
26227 }
26229 {
26230 this.ai[1]++;
26231 if (Main.myPlayer ==
owner)
26232 {
26233 this.ai[0] = 2f;
26240 }
26241 }
26242 }
26243 else
26244 {
26245 if (
type != 533 || !(this.ai[0] < 9f))
26246 {
26247 return;
26248 }
26252 {
26253 return;
26254 }
26255 this.ai[1]++;
26256 if (Main.myPlayer !=
owner)
26257 {
26258 return;
26259 }
26261 {
26262 this.ai[0] += 4f;
26263 if (this.ai[0] == 6f)
26264 {
26265 this.ai[0] = 3f;
26266 }
26268 }
26269 else
26270 {
26271 this.ai[0] += 6f;
26274 float num589 = ((this.ai[0] == 8f) ? 12f : 10f);
26278 }
26279 }
26280 }
26282 {
26284 }
26286 {
26290 this.ai[0] += 1f;
26291 if (this.ai[0] >= 3f)
26292 {
26295 {
26297 }
26298 }
26299 if (this.ai[0] >= 15f)
26300 {
26301 velocity.Y += 0.2f;
26303 {
26304 velocity.Y = 16f;
26305 }
26306 velocity.X *= 0.99f;
26307 }
26309 {
26311 {
26315 {
26316 spinningpoint2.X = -4f;
26317 }
26320 {
26322 Main.dust[
num592].scale = 1.5f;
26323 Main.dust[
num592].noGravity =
true;
26326 }
26327 }
26329 {
26331 {
26336 Main.dust[
num595].scale = 0.8f - Main.rand.NextFloat() * 0.2f;
26339 Main.dust[
num595].color = Utils.SelectRandom<
Color>(Main.rand,
new Color(255, 255, 255, 110),
new Color(245, 200, 30, 110));
26340 }
26341 }
26342 }
26345 {
26348 base.position.X +=
width / 2;
26349 base.position.Y +=
height / 2;
26352 base.position.X -=
width / 2;
26353 base.position.Y -=
height / 2;
26355 }
26357 {
26359 }
26360 }
26362 {
26365 if (Main.player[
owner].dead)
26366 {
26368 return;
26369 }
26370 Main.player[
owner].SetDummyItemTime(10);
26374 {
26375 Main.player[
owner].ChangeDir(1);
26377 }
26378 else
26379 {
26380 Main.player[
owner].ChangeDir(-1);
26382 }
26385 if (this.ai[0] == 0f &&
vector49.Length() > 400f)
26386 {
26387 this.ai[0] = 1f;
26388 }
26389 if (this.ai[0] == 1f || this.ai[0] == 2f)
26390 {
26393 {
26395 return;
26396 }
26398 {
26399 this.ai[0] = 2f;
26400 }
26403 if (this.ai[0] == 2f)
26404 {
26406 }
26409 {
26411 return;
26412 }
26413 }
26414 this.ai[1]++;
26415 if (this.ai[1] > 5f)
26416 {
26418 }
26419 if ((
int)this.ai[1] % 4 == 0 &&
owner == Main.myPlayer)
26420 {
26426 }
26427 }
26429 {
26430 if (this.ai[0] == 0f)
26431 {
26435 {
26439 {
26442 }
26443 }
26444 this.ai[0] =
num599 + 1;
26445 if (this.ai[0] == 0f)
26446 {
26447 this.ai[0] = -15f;
26448 }
26449 if (this.ai[0] > 0f)
26450 {
26451 float num602 = (float)Main.rand.Next(35, 75) / 30f;
26454 }
26455 }
26456 else if (this.ai[0] > 0f)
26457 {
26460 }
26461 else
26462 {
26463 this.ai[0]++;
26466 {
26468 }
26470 }
26471 if (this.ai[1] == 0f)
26472 {
26473 this.ai[1] = (float)Main.rand.Next(80, 121) / 100f;
26475 }
26476 scale = this.ai[1];
26477 }
26479 {
26481 if (
localAI[1] > 10f && Main.rand.Next(3) == 0)
26482 {
26485 {
26488 Vector2 vector51 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - (float)
Math.
PI / 2f).ToRotationVector2() * Main.rand.Next(3, 8);
26490 Main.dust[
num605].noGravity =
true;
26491 Main.dust[
num605].noLight =
true;
26493 dust2.velocity /= 4f;
26496 }
26499 {
26501 }
26504 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.1f, 0.4f, 0.6f);
26505 }
26510 {
26512 }
26513 if (this.ai[0] == 0f &&
localAI[0] == 0f)
26514 {
26516 {
26518 if (
nPC7.CanBeChasedBy(
this) && (this.ai[0] == 0f || this.ai[0] == (float)(
num608 + 1)))
26519 {
26523 {
26527 }
26528 }
26529 }
26531 {
26532 this.ai[0] =
num606 + 1;
26534 }
26536 }
26537 if (
localAI[0] == 0f && this.ai[0] == 0f)
26538 {
26540 }
26542 if (this.ai[0] != 0f)
26543 {
26544 int num610 = (int)(this.ai[0] - 1f);
26546 {
26551 {
26554 }
26555 }
26556 else
26557 {
26558 this.ai[0] = 0f;
26561 }
26562 }
26564 {
26570 {
26571 num616 -= Math.PI * 2.0;
26572 }
26574 {
26575 num616 += Math.PI * 2.0;
26576 }
26578 }
26582 }
26584 {
26587 {
26590 {
26592 }
26593 }
26595 if (this.ai[1] == 0f)
26596 {
26597 this.ai[1] = (float)Main.rand.Next(60, 121) / 100f;
26599 }
26600 scale = this.ai[1];
26601 base.position =
base.Center;
26607 }
26609 {
26610 int num620 = (int)this.ai[0];
26611 int num621 = (int)this.ai[1];
26613 if (
tile2 ==
null || !
tile2.active() || tile2.type != 338)
26614 {
26616 return;
26617 }
26621 {
26623 }
26625 {
26627 {
26633 dust16.scale = 1f + (float)Main.rand.NextDouble() * 0.3f;
26635 dust2.velocity *= 0.5f;
26636 if (
dust16.velocity.Y > 0f)
26637 {
26638 dust16.velocity.Y *= -1f;
26639 }
26641 dust2.position -=
new Vector2(2 + Main.rand.Next(-2, 3), 0f);
26644 dust16.scale = 0.6f;
26645 dust16.fadeIn = dust16.scale + 0.2f;
26646 dust16.velocity.Y *= 2f;
26647 }
26648 }
26650 {
26652 {
26657 if (Main.rand.Next(5) == 0)
26658 {
26660 }
26663 dust17.scale = 1f + (float)Main.rand.NextDouble() * 0.3f;
26665 dust2.velocity *= 0.5f;
26666 if (
dust17.velocity.Y > 0f)
26667 {
26668 dust17.velocity.Y *= -1f;
26669 }
26671 dust2.position -=
new Vector2(2 + Main.rand.Next(-2, 3), 0f);
26674 dust17.velocity.X *= 0.5f;
26675 dust17.scale = 0.6f;
26676 dust17.fadeIn = dust17.scale + 0.2f;
26677 dust17.velocity.Y *= 2f;
26678 }
26679 }
26681 {
26683 {
26689 dust18.scale = 1f + (float)Main.rand.NextDouble() * 0.3f;
26691 dust2.velocity *= 0.1f;
26692 if (
dust18.velocity.Y > 0f)
26693 {
26694 dust18.velocity.Y *= -1f;
26695 }
26697 dust2.position -=
new Vector2(2 + Main.rand.Next(-2, 3), 0f);
26700 dust18.scale = 0.6f;
26701 dust18.fadeIn = dust18.scale + 0.2f;
26702 dust18.velocity.Y *= 2.5f;
26703 }
26705 {
26706 float num631 = 0.85f + (float)Main.rand.NextDouble() * 0.2f;
26708 {
26712 dust19.scale = 0.7f + (float)Main.rand.NextDouble() * 0.3f;
26714 dust2.velocity *= 0f;
26715 if (
dust19.velocity.Y > 0f)
26716 {
26717 dust19.velocity.Y *= -1f;
26718 }
26720 dust2.position -=
new Vector2(2 + Main.rand.Next(-2, 3), 0f);
26723 dust19.scale = 0.6f;
26724 dust19.fadeIn = dust19.scale + 0.2f;
26725 dust19.velocity.Y *= 2f;
26726 }
26727 }
26728 }
26730 {
26731 return;
26732 }
26734 {
26740 dust20.scale = 1f + (float)Main.rand.NextDouble() * 0.3f;
26742 dust2.velocity *= 0.5f;
26743 if (
dust20.velocity.Y > 0f)
26744 {
26745 dust20.velocity.Y *= -1f;
26746 }
26748 dust2.position -=
new Vector2(2 + Main.rand.Next(-2, 3), 0f);
26751 dust20.scale = 0.6f;
26752 dust20.fadeIn = dust20.scale + 0.2f;
26753 dust20.velocity.Y *= 2f;
26754 }
26755 }
26757 {
26759 {
26762 if ((
double)
localAI[0] < 0.01)
26763 {
26765 }
26766 }
26767 }
26769 {
26771 }
26773 {
26775 player5.heldProj =
whoAmI;
26777 {
26779 {
26781 return;
26782 }
26783 }
26785 {
26787 return;
26788 }
26789 if (Main.myPlayer ==
owner)
26790 {
26791 base.position.X = Main.screenPosition.X + (float)Main.mouseX;
26792 base.position.Y = Main.screenPosition.Y + (float)Main.mouseY;
26793 if (this.ai[0] !=
base.position.X -
player5.position.X ||
this.ai[1] !=
base.position.Y -
player5.position.Y)
26794 {
26796 }
26797 this.ai[0] = base.position.X -
player5.position.X;
26798 this.ai[1] = base.position.Y -
player5.position.Y;
26801 {
26804 }
26805 return;
26806 }
26807 base.position.X = player5.position.X + this.ai[0];
26808 base.position.Y = player5.position.Y + this.ai[1];
26810 {
26811 if (!
player5.mount.AbilityCharging)
26812 {
26814 }
26815 }
26816 else if (
type == 453 && !
player5.mount.AbilityActive)
26817 {
26819 }
26821 }
26823 {
26827 {
26829 {
26834 }
26836 }
26837 else
26838 {
26842 }
26843 if (this.ai[1] == 1f)
26844 {
26847 {
26849 }
26851 {
26854 return;
26855 }
26856 }
26857 else
26858 {
26860 {
26862 }
26864 {
26866 }
26867 }
26870 this.ai[0]++;
26871 if (this.ai[0] >
num637)
26872 {
26873 this.ai[0] = 0f;
26874 }
26876 float val = 0.75f + vector54.Y * 0.25f;
26877 float val2 = 0.8f - vector54.Y * 0.2f;
26884 {
26888 {
26890 }
26891 }
26893 {
26898 Main.dust[
num643].noGravity =
true;
26900 dust2.velocity *= 2f;
26901 Main.dust[
num643].position = ((float)Main.rand.NextDouble() * ((float)
Math.
PI * 2f)).ToRotationVector2() * (
num641 +
num642 * (float)Main.rand.NextDouble() *
num640) +
base.Center;
26903 if (Main.rand.Next(2) == 0)
26904 {
26906 Main.dust[
num643].noGravity =
true;
26908 dust2.velocity *= 1.2f;
26909 Main.dust[
num643].position = ((float)Main.rand.NextDouble() * ((float)
Math.
PI * 2f)).ToRotationVector2() * (
num641 +
num642 * (float)Main.rand.NextDouble() *
num640) +
base.Center;
26911 }
26912 if (Main.rand.Next(4) == 0)
26913 {
26915 Main.dust[
num643].noGravity =
true;
26917 dust2.velocity *= 1.2f;
26918 Main.dust[
num643].position = ((float)Main.rand.NextDouble() * ((float)
Math.
PI * 2f)).ToRotationVector2() * (
num641 +
num642 * (float)Main.rand.NextDouble() *
num640) +
base.Center;
26920 }
26921 }
26922 }
26924 {
26926 {
26928 }
26930 {
26932 }
26933 Vector2 v7 = this.ai[0].ToRotationVector2();
26938 {
26939 num646 -= Math.PI * 2.0;
26940 }
26942 {
26943 num646 += Math.PI * 2.0;
26944 }
26949 {
26951 }
26952 }
26954 {
26956 int num647 = (int)this.ai[0] - 1;
26957 if (
type == 447 && (this.ai[0] == 0f || ((!Main.npc[
num647].active || Main.npc[
num647].type != 392) && (!Main.npc[
num647].active || Main.npc[
num647].type != 395 || !(Main.npc[
num647].ai[3] % 120f >= 60f) || Main.npc[
num647].ai[0] != 2f))))
26958 {
26960 }
26962 {
26964 return;
26965 }
26967 float num648 = nPC8.Center.Y + 46f;
26970 {
26971 int target =
nPC8.target;
26972 if (
nPC8.type == 392)
26973 {
26974 target = Main.npc[(int)
nPC8.ai[0]].target;
26975 }
26978 {
26980 }
26981 }
26987 {
26989 }
26990 else
26991 {
26993 {
26996 {
26998 break;
26999 }
27000 }
27001 }
27002 base.position.X = nPC8.Center.X - (float)(
width / 2);
27003 base.position.Y =
num648;
27007 {
27010 }
27012 {
27014 {
27016 Main.dust[
num657].noGravity =
true;
27018 dust2.velocity *= 0.5f;
27019 Main.dust[
num657].velocity.X -= (float)
num656 -
nPC8.velocity.X * 2f / 3f;
27020 Main.dust[
num657].scale = 2.8f;
27021 }
27022 if (Main.rand.Next(5) == 0)
27023 {
27026 dust2.velocity *= 0.5f;
27027 Main.dust[
num658].velocity.X -= nPC8.velocity.X / 2f;
27029 }
27030 }
27032 {
27035 {
27037 }
27038 }
27039 }
27041 {
27042 if (this.ai[0] == 0f && this.ai[1] > 0f)
27043 {
27044 this.ai[1]--;
27045 }
27046 else if (this.ai[0] == 0f && this.ai[1] == 0f)
27047 {
27048 this.ai[0] = 1f;
27054 {
27058 int num661 = Dust.NewDust(
base.Center, 0, 0, 228);
27059 Main.dust[
num661].scale = 1.5f;
27060 Main.dust[
num661].noGravity =
true;
27063 }
27064 }
27065 else if (this.ai[0] == 1f)
27066 {
27073 {
27075 return;
27076 }
27078 {
27084 {
27085 num667 -= Math.PI * 2.0;
27086 }
27088 {
27089 num667 += Math.PI * 2.0;
27090 }
27092 }
27094 {
27096 {
27100 int num669 = Dust.NewDust(
base.Center, 0, 0, 228);
27101 Main.dust[
num669].scale = 1.5f;
27102 Main.dust[
num669].noGravity =
true;
27105 }
27106 }
27107 }
27110 {
27113 {
27115 }
27116 }
27118 {
27120 int num671 = Dust.NewDust(
base.Center, 0, 0, 228);
27122 Main.dust[
num671].scale = 1f;
27123 Main.dust[
num671].noGravity =
true;
27124 }
27126 {
27129 {
27131 break;
27132 }
27133 }
27134 }
27136 {
27138 if (this.ai[0] == 0f)
27139 {
27143 {
27144 int num674 = Utils.SelectRandom<
int>(Main.rand, 226, 229);
27153 dust2.velocity *= 0.1f;
27154 if (Main.rand.Next(6) != 0)
27155 {
27156 Main.dust[
num677].noGravity =
true;
27157 }
27158 }
27164 {
27166 {
27170 {
27173 }
27174 }
27176 {
27180 {
27183 }
27184 }
27185 }
27187 }
27188 else if (this.ai[0] >= 1f && this.ai[0] < (
float)(1 +
num673))
27189 {
27198 {
27200 if (
nPC9.CanBeChasedBy(
this))
27201 {
27205 {
27209 }
27210 }
27211 }
27213 {
27214 if (this.ai[0] == 1f)
27215 {
27217 return;
27218 }
27220 {
27226 }
27227 else
27228 {
27230 }
27231 }
27233 {
27234 base.position += Main.npc[
num682].velocity;
27235 }
27236 if (Main.rand.Next(3) == 0)
27237 {
27238 int num686 = Utils.SelectRandom<
int>(Main.rand, 226, 229);
27248 dust2.velocity *= 0.1f;
27249 Main.dust[
num689].noGravity =
true;
27250 }
27251 }
27252 else if (this.ai[0] >= (
float)(1 +
num673) && this.ai[0] < (
float)(1 +
num673 * 2))
27253 {
27257 this.ai[1]++;
27258 if (this.ai[1] >= 15f)
27259 {
27263 {
27265 }
27266 }
27267 else
27268 {
27271 {
27273 }
27275 }
27281 {
27283 if (
nPC10.CanBeChasedBy(
this))
27284 {
27288 {
27292 }
27293 }
27294 }
27296 {
27297 base.position += Main.npc[
num690].velocity;
27298 }
27299 int num694 = Utils.SelectRandom<
int>(Main.rand, 226, 229);
27308 dust2.velocity *= 0.1f;
27309 Main.dust[
num697].noGravity =
true;
27310 }
27312 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.3f *
num698, 0.4f *
num698, 1f *
num698);
27313 }
27315 {
27318 {
27320 }
27321 if (this.ai[0] == 0f)
27322 {
27325 {
27327 this.ai[0] = 1f;
27328 this.ai[1] = 0f - this.ai[1];
27330 }
27331 velocity.X =
velocity.RotatedBy(this.ai[1]).
X;
27333 velocity.Y -= 0.08f;
27335 {
27336 velocity.Y -= 0.2f;
27337 }
27339 {
27340 velocity.Y = -7f;
27341 }
27342 }
27343 else if (this.ai[0] == 1f)
27344 {
27347 {
27349 this.ai[0] = 2f;
27352 }
27353 velocity.X =
velocity.RotatedBy(this.ai[1]).
X;
27355 velocity.Y -= 0.08f;
27357 {
27358 velocity.Y -= 0.2f;
27359 }
27361 {
27362 velocity.Y = -7f;
27363 }
27364 }
27365 else if (this.ai[0] == 2f)
27366 {
27368 if (
value7.Length() < 30f)
27369 {
27371 return;
27372 }
27377 {
27378 value7.Y = 6f;
27379 }
27382 {
27385 {
27387 }
27388 }
27390 {
27393 {
27395 }
27396 }
27398 {
27401 {
27403 }
27404 }
27406 {
27409 {
27411 }
27412 }
27413 }
27415 {
27417 Main.dust[
num700].noGravity =
true;
27418 }
27420 }
27422 {
27424 {
27426 }
27429 {
27431 }
27434 if (this.ai[0] >= 0f)
27435 {
27436 this.ai[0]++;
27437 }
27438 if (this.ai[0] == -1f)
27439 {
27442 }
27443 else if (this.ai[0] < 30f)
27444 {
27446 }
27447 else
27448 {
27451 {
27454 {
27456 }
27457 }
27458 }
27460 {
27461 return;
27462 }
27464 {
27465 float num703 = (float)Main.rand.NextDouble() * 1f - 0.5f;
27467 {
27469 }
27471 {
27473 }
27478 Main.dust[
num704].noGravity =
true;
27479 }
27480 }
27482 {
27485 {
27487 }
27488 if (
type == 455 && Main.npc[(
int)
this.ai[1]].active && Main.npc[(
int)
this.ai[1]].type == 396)
27489 {
27490 if (Main.npc[(int)this.ai[1]].ai[0] == -2f)
27491 {
27493 return;
27494 }
27497 }
27498 else if (
type == 455 && Main.npc[(
int)this.ai[1]].active && Main.npc[(int)this.ai[1]].
type == 400)
27499 {
27502 }
27503 else if (
type == 537 && Main.npc[(
int)this.ai[1]].active && Main.npc[(int)this.ai[1]].
type == 411)
27504 {
27506 base.position = Main.npc[(int)this.ai[1]].
Center +
vector62 -
base.Size / 2f +
new Vector2(0f, 0f - Main.npc[(
int)this.ai[1]].gfxOffY);
27507 }
27508 else if (
type == 461 && Main.projectile[(
int)this.ai[1]].active && Main.projectile[(int)this.ai[1]].
type == 460)
27509 {
27513 }
27514 else if (
type == 642 && Main.projectile[(
int)
this.ai[1]].active && Main.projectile[(
int)
this.ai[1]].type == 641)
27515 {
27516 Projectile projectile = Main.projectile[(int)this.ai[1]];
27517 base.Center = projectile.Center;
27518 Vector2 vector64 = this.ai[0].ToRotationVector2().RotatedBy((
float)(-projectile.direction) * ((
float)Math.PI / 3f) / 50f);
27519 this.ai[0] =
vector64.ToRotation();
27521 }
27522 else
27523 {
27524 if (
type != 632 || !Main.projectile[(
int)this.ai[1]].active || Main.projectile[(int)this.ai[1]].
type != 633)
27525 {
27527 return;
27528 }
27529 float num705 = (float)(
int)this.ai[0] - 2.5f;
27531 Projectile
projectile2 = Main.projectile[(int)this.ai[1]];
27539 {
27543 {
27546 }
27547 else
27548 {
27551 }
27553 }
27554 else
27555 {
27561 }
27565 base.position = projectile2.Center +
vector65 * 16f - base.Size / 2f +
new Vector2(0f, 0f - Main.projectile[(
int)
this.ai[1]].gfxOffY);
27566 base.position +=
projectile2.velocity.ToRotation().ToRotationVector2() *
num710;
27567 base.position +=
zero2;
27572 {
27575 }
27576 if (!Collision.CanHitLine(Main.player[
owner].Center, 0, 0,
projectile2.Center, 0, 0))
27577 {
27579 }
27581 }
27583 {
27585 }
27587 {
27588 this.ai[0]++;
27589 if (this.ai[0] >= 300f)
27590 {
27592 return;
27593 }
27594 scale = (float)
Math.
Sin(
this.ai[0] * (
float)Math.PI / 300f) * 10f;
27596 {
27598 }
27599 }
27601 {
27603 {
27605 }
27607 if (Main.npc[(int)this.ai[1]].type == 400)
27608 {
27610 }
27613 {
27615 return;
27616 }
27619 {
27621 }
27622 }
27624 {
27628 {
27630 return;
27631 }
27634 {
27636 }
27637 }
27639 {
27643 {
27645 return;
27646 }
27649 {
27651 }
27652 }
27655 {
27657 }
27664 {
27666 }
27668 {
27671 }
27672 else if (
type == 461)
27673 {
27676 }
27677 else if (
type == 642)
27678 {
27681 }
27682 else if (
type == 632)
27683 {
27686 }
27687 else if (
type == 537)
27688 {
27691 }
27696 {
27698 }
27702 {
27703 NPC nPC11 = Main.npc[(int)this.ai[1]];
27704 if (
nPC11.type == 396)
27705 {
27708 {
27711 }
27712 }
27713 }
27715 {
27717 }
27720 {
27723 {
27724 float num721 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1f) : 1f) * ((
float)Math.PI / 2f);
27725 float num722 = (float)Main.rand.NextDouble() * 2f + 2f;
27728 Main.dust[
num723].noGravity =
true;
27729 Main.dust[
num723].scale = 1.7f;
27730 }
27731 if (Main.rand.Next(5) == 0)
27732 {
27736 dust2.velocity *= 0.5f;
27738 }
27739 DelegateMethods.v3_1 =
new Vector3(0.3f, 0.65f, 0.7f);
27741 }
27742 else if (
type == 642)
27743 {
27746 {
27747 float num726 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1f) : 1f) * ((
float)Math.PI / 2f);
27748 float num727 = (float)Main.rand.NextDouble() * 2f + 2f;
27751 Main.dust[
num728].noGravity =
true;
27752 Main.dust[
num728].scale = 1.7f;
27753 }
27754 if (Main.rand.Next(5) == 0)
27755 {
27759 dust2.velocity *= 0.5f;
27761 }
27762 DelegateMethods.v3_1 =
new Vector3(0.3f, 0.65f, 0.7f);
27764 }
27766 {
27769 {
27770 float num731 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1f) : 1f) * ((
float)Math.PI / 2f);
27771 float num732 = (float)Main.rand.NextDouble() * 0.8f + 1f;
27774 Main.dust[
num733].noGravity =
true;
27775 Main.dust[
num733].scale = 1.2f;
27776 }
27777 if (Main.rand.Next(5) == 0)
27778 {
27782 dust2.velocity *= 0.5f;
27784 }
27785 DelegateMethods.v3_1 =
new Vector3(0.4f, 0.85f, 0.9f);
27787 }
27789 {
27794 {
27796 {
27797 float num738 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1f) : 1f) * ((
float)Math.PI / 2f);
27798 float num739 = (float)Main.rand.NextDouble() * 0.8f + 1f;
27801 Main.dust[
num740].noGravity =
true;
27802 Main.dust[
num740].scale = 1.2f;
27803 }
27804 }
27807 {
27811 dust2.velocity *= 0.5f;
27813 }
27814 DelegateMethods.v3_1 =
new Vector3(0.4f, 0.85f, 0.9f);
27816 }
27818 {
27819 return;
27820 }
27828 float x5 = Main.rgbToHsl(
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB)).
X;
27830 {
27831 float num743 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1f) : 1f) * ((
float)Math.PI / 2f);
27832 float num744 = (float)Main.rand.NextDouble() * 0.8f + 1f;
27835 Main.dust[
num745].color = color;
27836 Main.dust[
num745].scale = 1.2f;
27838 {
27840 dust2.velocity *=
scale;
27842 dust2.scale *=
scale;
27843 }
27844 Main.dust[
num745].noGravity =
true;
27846 {
27850 dust2.scale /= 2f;
27851 }
27852 float hue = (
x5 + Main.rand.NextFloat() * 0.4f) % 1f;
27854 }
27855 if (Main.rand.Next(5) == 0)
27856 {
27860 dust2.velocity *= 0.5f;
27862 }
27863 DelegateMethods.v3_1 = color.
ToVector3() * 0.3f;
27864 float value8 = 0.1f * (float)
Math.
Sin(Main.GlobalTimeWrappedHourly * 20f);
27867 if (Main.netMode != 2)
27868 {
27870 }
27872 }
27874 {
27878 {
27880 }
27882 int num749 = (int)this.ai[1];
27883 if (!Main.npc[
num748].active || Main.npc[
num748].type != 396)
27884 {
27886 return;
27887 }
27889 if (
localAI[0] >= 330f && this.ai[0] > 0f && Main.netMode != 1)
27890 {
27891 this.ai[0] *= -1f;
27893 }
27894 if (Main.netMode != 1 && this.ai[0] > 0f && (!Main.player[(int)this.ai[1]].active || Main.player[(int)this.ai[1]].dead))
27895 {
27896 this.ai[0] *= -1f;
27898 }
27900 if (this.ai[0] > 0f)
27901 {
27904 {
27906 }
27907 else
27908 {
27910 }
27912 {
27915 if (Main.expertMode)
27916 {
27918 }
27919 if (!Main.player[
num749].creativeGodMode)
27920 {
27922 }
27923 }
27924 }
27925 else
27926 {
27929 {
27931 }
27932 else
27933 {
27935 }
27937 {
27939 }
27940 }
27941 }
27943 {
27945 {
27948 }
27949 this.ai[0]++;
27950 if (this.ai[1] == 1f)
27951 {
27952 if (this.ai[0] >= 130f)
27953 {
27955 }
27956 else
27957 {
27959 }
27961 {
27963 }
27965 {
27967 }
27968 if (this.ai[0] >= 150f)
27969 {
27971 return;
27972 }
27973 if (this.ai[0] % 30f == 0f && Main.netMode != 1)
27974 {
27977 }
27979 Lighting.AddLight(
base.Center, 0.3f, 0.75f, 0.9f);
27980 return;
27981 }
27983 if (this.ai[0] >= 40f)
27984 {
27986 }
27987 else
27988 {
27990 }
27992 {
27994 }
27996 {
27998 }
27999 if (this.ai[0] >= 45f)
28000 {
28002 return;
28003 }
28005 float num750 = this.ai[0] % 45f / 45f;
28008 {
28010 Lighting.AddLight(
vector84, 0.3f, 0.75f, 0.9f);
28012 {
28014 Main.dust[
num753].noGravity =
true;
28015 }
28016 }
28017 }
28019 {
28020 base.position.Y = this.ai[0];
28021 height = (int)this.ai[1];
28022 if (
base.Center.X > Main.player[
owner].Center.X)
28023 {
28025 }
28026 else
28027 {
28029 }
28031 if (
owner == Main.myPlayer)
28032 {
28034 {
28036 {
28038 return;
28039 }
28040 }
28041 }
28044 {
28046 Main.dust[
num757].noGravity =
true;
28048 dust2.velocity *= 0.5f;
28049 Main.dust[
num757].velocity.Y -= 0.5f;
28050 Main.dust[
num757].scale = 1.4f;
28051 Main.dust[
num757].position.X += 6f;
28052 Main.dust[
num757].position.Y -= 2f;
28053 }
28054 }
28056 {
28058 {
28060 {
28063 }
28064 if (this.ai[0] < 180f)
28065 {
28068 {
28070 }
28071 }
28072 else
28073 {
28076 {
28079 return;
28080 }
28081 }
28082 this.ai[0]++;
28083 if (this.ai[0] % 30f == 0f && this.ai[0] < 180f && Main.netMode != 1)
28084 {
28085 int[]
array5 =
new int[5];
28090 {
28091 if (!Main.player[
num760].active || Main.player[
num760].dead)
28092 {
28093 continue;
28094 }
28098 {
28104 {
28105 break;
28106 }
28107 }
28108 }
28110 {
28112 float ai = Main.rand.Next(100);
28114 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y,
vector86.X,
vector86.Y, 466,
damage, 0f, Main.myPlayer,
vector85.ToRotation(),
ai);
28115 }
28116 }
28117 Lighting.AddLight(
base.Center, 0.4f, 0.85f, 0.9f);
28119 {
28122 {
28124 }
28125 }
28126 if (
alpha >= 150 || !(this.ai[0] < 180f))
28127 {
28128 return;
28129 }
28131 {
28132 float num764 = (float)Main.rand.NextDouble() * 1f - 0.5f;
28134 {
28136 }
28138 {
28140 }
28145 Main.dust[
num765].noGravity =
true;
28146 }
28148 {
28149 float num767 = (float)Main.rand.NextDouble() * 1f - 0.5f;
28151 {
28153 }
28155 {
28157 }
28162 Main.dust[
num768].noGravity =
true;
28163 }
28164 }
28165 else if (
type == 466)
28166 {
28168 Lighting.AddLight(
base.Center, 0.3f, 0.45f, 0.5f);
28170 {
28172 {
28176 {
28178 {
28180 }
28181 }
28183 {
28185 return;
28186 }
28187 }
28189 {
28191 {
28193 float num772 = (float)Main.rand.NextDouble() * 0.8f + 1f;
28196 Main.dust[
num773].noGravity =
true;
28197 Main.dust[
num773].scale = 1.2f;
28198 }
28199 if (Main.rand.Next(5) == 0)
28200 {
28204 dust2.velocity *= 0.5f;
28206 }
28207 }
28208 }
28209 else
28210 {
28212 {
28213 return;
28214 }
28220 while (true)
28221 {
28225 float f = (float)
num777 / 100f * ((
float)Math.PI * 2f);
28228 {
28229 vector91.Y *= -1f;
28230 }
28233 {
28235 }
28237 {
28239 }
28241 {
28243 }
28245 {
28247 {
28250 break;
28251 }
28252 continue;
28253 }
28255 break;
28256 }
28258 {
28262 }
28263 }
28264 }
28265 else
28266 {
28268 {
28269 return;
28270 }
28271 if (
localAI[1] == 0f && this.ai[0] >= 900f)
28272 {
28273 this.ai[0] -= 1000f;
28275 }
28277 Lighting.AddLight(
base.Center, 0.3f, 0.45f, 0.5f);
28279 {
28281 {
28285 {
28287 {
28289 }
28290 }
28292 {
28294 return;
28295 }
28296 }
28298 {
28300 {
28302 float num781 = (float)Main.rand.NextDouble() * 0.8f + 1f;
28305 Main.dust[
num782].noGravity =
true;
28306 Main.dust[
num782].scale = 1.2f;
28307 }
28308 if (Main.rand.Next(5) == 0)
28309 {
28313 dust2.velocity *= 0.5f;
28315 }
28316 }
28317 }
28318 else
28319 {
28321 {
28322 return;
28323 }
28329 while (true)
28330 {
28334 float f2 = (float)
num786 / 100f * ((
float)Math.PI * 2f);
28337 {
28338 vector94.Y *= -1f;
28339 }
28342 {
28344 }
28346 {
28348 }
28350 {
28352 }
28354 {
28356 {
28359 {
28361 }
28362 break;
28363 }
28364 continue;
28365 }
28367 break;
28368 }
28370 {
28371 return;
28372 }
28376 if (Main.rand.Next(4) == 0 && Main.netMode != 1 &&
localAI[1] == 0f)
28377 {
28378 float num787 = (float)Main.rand.Next(-3, 4) * ((float)
Math.
PI / 3f) / 3f;
28380 if (!Collision.CanHitLine(
base.Center, 0, 0,
base.Center +
vector95 * 50f, 0, 0))
28381 {
28382 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X -
vector95.X,
base.Center.Y -
vector95.Y,
vector95.X,
vector95.Y,
type,
damage,
knockBack,
owner,
vector95.ToRotation() + 1000f,
this.ai[1]);
28383 }
28384 }
28385 }
28386 }
28387 }
28389 {
28390 if (this.ai[1] == -1f)
28391 {
28393 }
28394 else if (this.ai[0] < 300f)
28395 {
28397 }
28398 else
28399 {
28401 }
28403 {
28405 }
28407 {
28409 }
28414 {
28417 }
28419 {
28421 {
28422 float num789 = Main.rand.Next(2, 4);
28425 {
28428 }
28432 Main.dust[
num791].noGravity =
true;
28433 Main.dust[
num791].noLight =
true;
28435 if (Main.rand.Next(8) == 0)
28436 {
28439 dust2.scale += 0.5f;
28440 }
28441 else
28442 {
28444 }
28445 }
28446 }
28447 this.ai[0]++;
28448 if (this.ai[0] >= 60f)
28449 {
28450 int num792 = (int)(this.ai[0] - 0f) / 60;
28453 {
28454 float num795 = Main.rand.Next(1, 3);
28458 Main.dust[
num796].noGravity =
true;
28459 Main.dust[
num796].noLight =
true;
28461 if (Main.rand.Next(2) == 0)
28462 {
28465 dust2.scale += 0.5f;
28466 }
28467 else
28468 {
28470 }
28471 Main.dust[
num796].fadeIn = 2f;
28472 }
28473 }
28474 if (this.ai[0] == 300f && this.ai[1] != -1f && Main.netMode != 1)
28475 {
28476 if (!
NPC.AnyNPCs(454))
28477 {
28479 }
28480 else
28481 {
28483 }
28484 }
28485 else if (this.ai[0] == 320f)
28486 {
28488 return;
28489 }
28491 if (this.ai[1] == -1f)
28492 {
28494 {
28496 }
28497 }
28498 else
28499 {
28500 flag39 = !(this.ai[1] >= 0f) || !Main.npc[(
int)this.ai[1]].active;
28501 if ((
flag39 || Main.npc[(
int)
this.ai[1]].type != 439) && (
flag39 || Main.npc[(int)this.ai[1]].
type != 454) && (
flag39 || Main.npc[(int)this.ai[1]].
type != 521))
28502 {
28504 }
28505 }
28507 {
28509 }
28510 else
28511 {
28512 Lighting.AddLight(
base.Center, 1.1f, 0.9f, 0.4f);
28513 }
28514 }
28516 {
28517 if (Main.player[
owner].dead)
28518 {
28520 }
28521 if (Main.player[
owner].magicLantern)
28522 {
28524 }
28526 {
28528 {
28530 }
28532 {
28534 }
28535 }
28538 Lighting.AddLight(
base.position, 0.35f, 0.35f, 0.1f);
28541 {
28544 if ((
base.Center - Main.player[Main.myPlayer].Center).Length() < (
float)(Main.screenWidth +
num797 * 16))
28545 {
28549 {
28551 {
28553 {
28555 Main.dust[
num802].fadeIn = 0.75f;
28557 dust2.velocity *= 0.1f;
28558 Main.dust[
num802].noLight =
true;
28559 }
28560 }
28561 }
28562 }
28563 }
28566 vector98.Y -= 40f;
28569 {
28570 base.Center = Main.player[
owner].Center;
28571 }
28575 {
28578 }
28580 {
28583 }
28585 {
28588 }
28591 {
28594 {
28596 {
28598 }
28599 else
28600 {
28602 }
28603 }
28607 {
28611 {
28613 }
28614 }
28616 {
28618 }
28619 return;
28620 }
28622 {
28624 }
28626 {
28628 }
28629 else
28630 {
28632 }
28635 {
28639 {
28641 }
28642 }
28643 }
28645 {
28650 base.position.X = center15.X - (float)(
width / 2);
28651 base.position.Y = center15.Y - (float)(
height / 2);
28652 if ((
double)
localAI[0] < 0.1)
28653 {
28655 }
28656 else
28657 {
28659 }
28661 {
28663 }
28664 velocity.X += this.ai[0] * 1.5f;
28665 velocity.Y += this.ai[1] * 1.5f;
28667 {
28670 }
28671 this.ai[0] *= 1.05f;
28672 this.ai[1] *= 1.05f;
28674 {
28676 {
28678 Main.dust[
num808].position = (Main.dust[
num808].position +
base.Center) / 2f;
28679 Main.dust[
num808].noGravity =
true;
28681 dust2.velocity *= 0.1f;
28686 dust2.scale +=
scale * 0.75f;
28687 }
28688 }
28689 }
28691 {
28696 {
28698 {
28700 }
28702 {
28703 PositionInWorld =
base.Center,
28705 });
28706 }
28707 this.ai[0] += 1f;
28708 if (this.ai[1] >= 1f)
28709 {
28710 this.ai[0] += 2f;
28711 }
28714 {
28716 }
28717 if (this.ai[0] >
num809)
28718 {
28721 return;
28722 }
28725 {
28731 Opacity =
MathHelper.
Clamp(Utils.Remap(
fromValue, 0f, 0.25f, 0f, 1f) * Utils.Remap(
fromValue, 0.75f, 1f, 1f, 0f), 0f, 1f) * 0.85f;
28732 }
28733 else
28734 {
28736 }
28740 {
28742 }
28743 else
28744 {
28746 }
28748 {
28751 {
28753 {
28754 continue;
28755 }
28758 {
28759 continue;
28760 }
28763 {
28764 continue;
28765 }
28768 {
28770 {
28771 vector99.X = -1f;
28772 vector99.Y = 1f;
28773 }
28774 else
28775 {
28776 vector99.X = 1f;
28777 vector99.Y = -1f;
28778 }
28779 }
28783 }
28784 }
28788 {
28790 }
28792 {
28793 return;
28794 }
28799 {
28801 }
28803 {
28804 return;
28805 }
28807 if (Main.netMode != 2)
28808 {
28811 {
28813 }
28814 }
28815 if (Main.netMode == 1)
28816 {
28817 return;
28818 }
28820 {
28823 {
28825 }
28826 }
28827 }
28829 {
28831 {
28834 {
28836 }
28837 }
28839 {
28840 velocity.Y = 18f;
28841 }
28842 if (this.ai[0] == 0f)
28843 {
28844 this.ai[1] += 1f;
28845 if (this.ai[1] > 20f)
28846 {
28847 velocity.Y += 0.1f;
28848 velocity.X *= 0.992f;
28849 }
28851 return;
28852 }
28854 if (this.ai[0] == 1f)
28855 {
28858 }
28859 else
28860 {
28862 int num815 = (int)(0f - this.ai[0]);
28865 base.position.X -=
width / 2;
28866 base.position.Y -=
height / 2;
28867 if (!Main.npc[
num815].active || Main.npc[
num815].life < 0)
28868 {
28870 this.ai[0] = 0f;
28871 this.ai[1] = 20f;
28872 velocity =
new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
28876 }
28878 {
28880 }
28881 }
28882 if (this.ai[0] != 0f)
28883 {
28884 this.ai[1] += 1f;
28885 if (this.ai[1] > 90f)
28886 {
28888 }
28889 }
28890 }
28892 {
28894 {
28897 {
28899 }
28900 }
28901 this.ai[0]++;
28902 if (this.ai[0] <= 40f)
28903 {
28906 {
28908 }
28910 if (this.ai[0] == 40f)
28911 {
28913 switch (Main.rand.Next(3))
28914 {
28915 case 0:
28916 this.ai[1] = 10f;
28917 break;
28918 case 1:
28919 this.ai[1] = 15f;
28920 break;
28921 case 2:
28922 this.ai[1] = 30f;
28923 break;
28924 }
28925 }
28926 }
28927 else if (this.ai[0] <= 60f)
28928 {
28930 if (this.ai[0] == 60f)
28931 {
28933 }
28934 }
28935 else if (this.ai[0] <= 210f)
28936 {
28937 if (Main.netMode != 1 && (
localAI[0] += 1f) >=
this.ai[1])
28938 {
28942 }
28943 if (this.ai[0] == 210f)
28944 {
28946 }
28947 }
28948 else
28949 {
28952 if (this.ai[0] == 239f)
28953 {
28955 }
28956 if (this.ai[0] == 240f)
28957 {
28959 }
28960 }
28961 if (
alpha < 90 && Main.rand.Next(3) == 0)
28962 {
28969 }
28971 float num819 = 0.70980394f;
28972 float num820 = 24f / 85f;
28974 }
28976 {
28978 {
28981 {
28983 }
28984 }
28985 else
28986 {
28988 }
28989 if (this.ai[0] > 30f)
28990 {
28992 {
28993 velocity.Y -= 0.05f;
28994 }
28995 velocity.X *= 0.98f;
28996 }
28997 else
28998 {
28999 this.ai[0] += 1f;
29000 }
29003 {
29005 {
29006 velocity.Y *= 0.98f;
29007 }
29009 {
29010 velocity.Y -= 0.2f;
29011 }
29012 velocity.X *= 0.94f;
29013 }
29014 }
29016 {
29017 this.ai[0] += 0.6f;
29018 if (this.ai[0] > 500f)
29019 {
29021 }
29023 {
29024 if (Main.rand.Next(3) != 0)
29025 {
29027 Main.dust[
num822].position = (Main.dust[
num822].position +
base.Center) / 2f;
29028 Main.dust[
num822].noGravity =
true;
29030 dust2.velocity *= 0.1f;
29032 {
29035 }
29036 float num823 = (800f - this.ai[0]) / 800f;
29038 dust2.scale *=
num823 + 0.1f;
29039 }
29040 }
29041 velocity.Y += 0.008f;
29042 }
29044 {
29048 {
29050 }
29052 {
29054 }
29056 {
29058 }
29060 {
29062 }
29064 {
29066 }
29068 {
29070 }
29072 {
29074 }
29076 {
29078 }
29079 else
29080 {
29083 }
29084 Main.CurrentFrameFlags.HadAnActiveInteractibleProjectile = true;
29085 if (
owner == Main.myPlayer)
29086 {
29088 {
29090 {
29092 {
29093 Main.projectile[
num825].Kill();
29094 }
29095 else
29096 {
29098 }
29099 }
29100 }
29101 }
29102 if (this.ai[0] == 0f)
29103 {
29105 {
29106 velocity.X = 0f;
29107 velocity.Y = 0f;
29108 this.ai[0] = 1f;
29109 this.ai[1] = 45f;
29110 return;
29111 }
29114 {
29116 }
29117 else
29118 {
29120 }
29122 return;
29123 }
29124 if (Main.player[
owner].Center.X <
base.Center.X)
29125 {
29127 }
29128 else
29129 {
29131 }
29133 this.ai[1] += 1f;
29135 if (this.ai[1] > 0f)
29136 {
29138 }
29139 else
29140 {
29142 }
29143 if (this.ai[1] >= 90f)
29144 {
29145 this.ai[1] *= -1f;
29146 }
29147 }
29149 {
29153 {
29155 return;
29156 }
29161 {
29162 int num828 = Dust.NewDust(
base.Center, 0, 0, 228, 0f, 0f, 100);
29163 Main.dust[
num828].noGravity =
true;
29165 dust2.position +=
new Vector2(4f);
29167 dust2.scale += Main.rand.NextFloat() * 1f;
29168 }
29169 }
29171 {
29173 }
29175 {
29177 }
29179 {
29181 }
29183 {
29187 int num830 = (int)this.ai[0];
29191 {
29192 case 536:
29195 break;
29196 case 591:
29198 break;
29199 }
29201 {
29202 case 1:
29204 {
29206 return;
29207 }
29209 {
29211 base.position += Main.player[
owner].position - Main.player[
owner].oldPosition;
29214 {
29216 return;
29217 }
29218 }
29219 else
29220 {
29222 }
29223 break;
29224 case 0:
29226 {
29228 return;
29229 }
29231 break;
29232 }
29234 }
29236 {
29248 {
29249 case 539:
29255 break;
29256 case 573:
29262 break;
29263 case 574:
29272 if (Main.expertMode)
29273 {
29275 }
29277 break;
29278 }
29280 {
29281 int num838 = (int)this.ai[1];
29283 {
29285 return;
29286 }
29288 }
29289 this.ai[0]++;
29290 if (this.ai[0] <
num834)
29291 {
29293 int num839 = (int)this.ai[1];
29295 {
29297 {
29298 base.position += Main.npc[
num839].position - Main.npc[
num839].oldPos[1];
29299 }
29300 }
29301 else
29302 {
29305 }
29307 {
29310 {
29312 }
29313 }
29315 {
29316 if (Main.rand.Next(12) == 0)
29317 {
29318 int num840 = Dust.NewDust(
base.Center, 8, 8, 180);
29321 dust2.velocity *= 0.2f;
29322 Main.dust[
num840].noGravity =
true;
29323 }
29325 {
29328 {
29330 }
29331 }
29333 }
29335 {
29336 if (Main.rand.Next(2) == 0)
29337 {
29338 int num841 = Dust.NewDust(
base.Center, 8, 8, 242);
29341 Main.dust[
num841].noGravity =
true;
29342 Main.dust[
num841].scale = 1.5f;
29343 }
29345 }
29347 {
29348 if (Main.rand.Next(10) == 0)
29349 {
29350 int num842 = Dust.NewDust(
base.Center, 8, 8, 242);
29353 Main.dust[
num842].noGravity =
true;
29354 Main.dust[
num842].scale = 1.5f;
29355 }
29357 {
29360 if (Collision.CanHitLine(
base.Center, 0, 0, Main.player[
target2].Center, 0, 0))
29361 {
29363 }
29365 }
29367 }
29368 }
29369 if (this.ai[0] ==
num834)
29370 {
29374 {
29375 int num845 = (int)this.ai[1];
29377 {
29379 }
29380 else
29381 {
29383 }
29384 }
29385 else
29386 {
29388 }
29390 {
29392 }
29394 value13.X += Main.rand.Next(-50, 51);
29395 value13.Y += Main.rand.Next(-50, 51);
29396 value13.X *= (float)Main.rand.Next(80, 121) * 0.01f;
29397 value13.Y *= (float)Main.rand.Next(80, 121) * 0.01f;
29400 {
29402 }
29404 {
29407 }
29408 else
29409 {
29410 if (Main.netMode != 1 && Collision.CanHitLine(
base.Center, 0, 0, Main.player[
num844].Center, 0, 0))
29411 {
29413 }
29414 this.ai[0] = 0f;
29415 }
29416 }
29417 if (!(this.ai[0] >=
num834))
29418 {
29419 return;
29420 }
29423 {
29425 {
29428 {
29430 }
29431 }
29432 if (Main.rand.Next(2) == 0)
29433 {
29436 dust2.scale += (float)Main.rand.Next(50) * 0.01f;
29437 Main.dust[
num846].noGravity =
true;
29439 dust2.velocity *= 0.1f;
29440 Main.dust[
num846].fadeIn = Main.rand.NextFloat() * 1.5f;
29441 }
29442 if (Main.rand.Next(3) == 0)
29443 {
29446 dust2.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
29447 Main.dust[
num847].noGravity =
true;
29449 dust2.velocity *= 0.1f;
29450 Main.dust[
num847].fadeIn = Main.rand.NextFloat() * 1.5f;
29451 }
29452 }
29454 {
29455 if (Main.rand.Next(4) == 0)
29456 {
29457 int num848 = Dust.NewDust(
base.Center, 8, 8, 242);
29460 dust2.velocity *= 0.2f;
29461 Main.dust[
num848].noGravity =
true;
29462 Main.dust[
num848].scale = 1.5f;
29463 }
29465 }
29466 }
29468 {
29469 scale = this.ai[1];
29470 this.ai[0]++;
29471 if (this.ai[0] >= 30f)
29472 {
29475 {
29477 }
29478 }
29479 else
29480 {
29481 if (!(this.ai[0] >= 0f))
29482 {
29483 return;
29484 }
29487 {
29490 {
29493 }
29494 }
29495 }
29496 }
29498 {
29499 if (this.ai[0] == 1f)
29500 {
29504 {
29506 }
29507 }
29508 else
29509 {
29513 {
29515 this.ai[0] = 1f;
29516 }
29517 }
29520 {
29524 {
29526 }
29527 }
29528 velocity.Y -= 0.03f;
29529 velocity.X *= 0.97f;
29530 }
29532 {
29538 {
29540 }
29542 {
29544 }
29545 else
29546 {
29548 }
29553 {
29555 }
29557 {
29559 }
29561 {
29564 }
29566 {
29568 }
29570 {
29572 }
29575 {
29577 }
29579 {
29580 velocity.X += 0.002f *
num851;
29581 velocity.Y += 0.002f *
num850;
29582 }
29583 else
29584 {
29585 velocity.X -= 0.002f *
num851;
29586 velocity.Y -= 0.002f *
num850;
29587 }
29588 this.ai[0] += 1f;
29589 if (this.ai[0] > 5400f)
29590 {
29592 this.ai[1] = 1f;
29594 {
29597 {
29599 }
29600 }
29601 else if (
owner == Main.myPlayer)
29602 {
29604 }
29605 }
29606 else
29607 {
29610 {
29612 }
29614 {
29616 }
29618 {
29620 }
29622 {
29624 }
29626 {
29628 }
29630 {
29632 }
29634 {
29636 }
29637 if (!Main.player[
owner].sporeSac)
29638 {
29640 }
29643 {
29646 {
29648 }
29649 }
29650 }
29655 {
29656 if (Main.npc[
num854].CanBeChasedBy(
this))
29657 {
29662 {
29666 }
29667 }
29668 }
29670 {
29675 }
29677 {
29679 }
29680 }
29682 {
29685 {
29687 }
29688 else
29689 {
29691 }
29693 this.ai[0] += 1f;
29694 if (this.ai[0] >= 60f)
29695 {
29697 {
29700 {
29702 }
29703 }
29704 else if (
owner == Main.myPlayer)
29705 {
29707 }
29708 }
29709 else if (
alpha > 80)
29710 {
29713 {
29715 }
29716 }
29717 }
29719 {
29724 {
29726 {
29728 }
29730 {
29732 }
29734 {
29736 }
29738 {
29741 {
29743 }
29744 }
29745 Lighting.AddLight(
base.Center, 0.5f, 0.1f, 0.3f);
29746 }
29747 else if (
type == 596)
29748 {
29752 {
29754 }
29756 {
29758 }
29760 {
29762 }
29764 {
29767 {
29769 }
29770 }
29773 {
29775 }
29777 {
29779 }
29780 this.ai[1]++;
29781 float num862 = this.ai[1] / 180f * ((float)
Math.
PI * 2f);
29783 {
29784 if (Main.rand.Next(3) != 0)
29785 {
29786 return;
29787 }
29788 Dust
dust22 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 27, 0f, -2f)];
29790 dust22.noGravity = true;
29793 dust22.fadeIn = 0.5f;
29794 dust22.alpha = 200;
29795 }
29797 {
29799 if (Main.expertMode)
29800 {
29802 }
29803 base.position =
base.Center;
29805 base.Center =
base.position;
29808 {
29809 Dust
dust22 = Main.dust[Dust.NewDust(
base.position,
width,
height, Utils.SelectRandom<
int>(Main.rand, 27, 6), 0f, -2f)];
29810 dust22.noGravity = true;
29812 {
29814 }
29815 }
29816 }
29817 }
29818 int num866 = (int)this.ai[0];
29820 {
29822 {
29825 {
29827 }
29829 }
29830 }
29831 else
29832 {
29834 {
29836 }
29837 if (this.ai[0] != -1f)
29838 {
29839 this.ai[0] = -1f;
29841 }
29842 }
29843 }
29845 {
29847 if (
flag48 && this.ai[1] == 1f && Main.netMode != 2)
29848 {
29849 this.ai[1] = 0f;
29851 {
29852 int num868 = Utils.SelectRandom<
int>(Main.rand, 229, 229, 161);
29854 dust23.noGravity = true;
29855 dust23.scale = 1.75f + Main.rand.NextFloat() * 1.25f;
29856 dust23.fadeIn = 0.25f;
29858 dust2.velocity *= 3.5f + Main.rand.NextFloat() * 0.5f;
29859 dust23.noLight = true;
29860 }
29861 }
29863 {
29866 }
29868 {
29873 {
29875 }
29878 }
29879 this.ai[0]++;
29880 if (this.ai[0] <= 50f)
29881 {
29883 {
29884 if (Main.rand.Next(4) == 0)
29885 {
29888 dust24.noGravity = true;
29889 dust24.position = base.Center -
vector110 * Main.rand.Next(10, 21);
29890 dust24.velocity =
vector110.RotatedBy(1.5707963705062866) * 4f;
29891 dust24.scale = 0.5f + Main.rand.NextFloat();
29892 dust24.fadeIn = 0.5f;
29893 }
29894 if (Main.rand.Next(4) == 0)
29895 {
29898 dust25.noGravity = true;
29899 dust25.position = base.Center -
vector111 * 30f;
29900 dust25.velocity =
vector111.RotatedBy(-1.5707963705062866) * 2f;
29901 dust25.scale = 0.5f + Main.rand.NextFloat();
29902 dust25.fadeIn = 0.5f;
29903 }
29904 }
29905 if (
type == 578 && Main.rand.Next(2) == 0)
29906 {
29908 Vector2 vector113 =
vector112.RotatedBy(1.5707963705062866) * (Main.rand.Next(2) == 0).ToDirectionInt() * Main.rand.Next(10, 21);
29914 dust26.noGravity = true;
29915 dust26.position = base.Center +
vector113;
29917 dust26.scale = 0.5f + Main.rand.NextFloat();
29918 dust26.fadeIn = 0.5f;
29923 dust26.noGravity = true;
29924 dust26.position = base.Center +
vector113 / 2f;
29926 dust26.scale = 1f + Main.rand.NextFloat();
29927 }
29929 {
29930 if (Main.rand.Next(4) == 0)
29931 {
29934 dust27.noGravity = true;
29935 dust27.position = base.Center -
vector116 * Main.rand.Next(10, 21);
29936 dust27.velocity =
vector116.RotatedBy(1.5707963705062866) * 4f;
29937 dust27.scale = 0.5f + Main.rand.NextFloat();
29938 dust27.fadeIn = 0.5f;
29939 }
29940 if (Main.rand.Next(4) == 0)
29941 {
29944 dust28.noGravity = true;
29945 dust28.position = base.Center -
vector117 * 30f;
29946 dust28.velocity =
vector117.RotatedBy(-1.5707963705062866) * 2f;
29947 dust28.scale = 0.5f + Main.rand.NextFloat();
29948 dust28.fadeIn = 0.5f;
29949 }
29950 }
29951 }
29952 else if (this.ai[0] <= 90f)
29953 {
29954 if (this.ai[0] == 90f)
29955 {
29957 {
29959 }
29960 else
29961 {
29963 }
29964 }
29965 scale = (this.ai[0] - 50f) / 40f;
29969 {
29970 if (Main.rand.Next(2) == 0)
29971 {
29974 dust29.noGravity = true;
29975 dust29.position = base.Center -
vector118 * Main.rand.Next(10, 21);
29976 dust29.velocity =
vector118.RotatedBy(1.5707963705062866) * 6f;
29977 dust29.scale = 0.5f + Main.rand.NextFloat();
29978 dust29.fadeIn = 0.5f;
29979 dust29.customData =
base.Center;
29980 }
29981 if (Main.rand.Next(2) == 0)
29982 {
29985 dust30.noGravity = true;
29986 dust30.position = base.Center -
vector119 * 30f;
29987 dust30.velocity =
vector119.RotatedBy(-1.5707963705062866) * 3f;
29988 dust30.scale = 0.5f + Main.rand.NextFloat();
29989 dust30.fadeIn = 0.5f;
29990 dust30.customData =
base.Center;
29991 }
29992 }
29994 {
29996 Vector2 vector121 =
vector120.RotatedBy(1.5707963705062866) * (Main.rand.Next(2) == 0).ToDirectionInt() * Main.rand.Next(10, 21);
29997 vector120 *= (float)Main.rand.Next(-80, 81);
30000 int num871 = Utils.SelectRandom<
int>(Main.rand, 229, 229);
30002 dust31.noGravity = true;
30003 dust31.position = base.Center +
vector121;
30005 dust31.scale = 0.5f + Main.rand.NextFloat();
30006 dust31.fadeIn = 0.5f;
30007 if (this.ai[0] == 90f && Main.netMode != 1)
30008 {
30010 float ai2 = Main.rand.Next(80);
30011 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X -
vector123.X,
base.Center.Y -
vector123.Y,
vector123.X,
vector123.Y, 580, 50, 1f, Main.myPlayer,
this.ai[1],
ai2);
30012 }
30013 }
30014 else if (
type == 579)
30015 {
30016 if (this.ai[0] == 90f && Main.netMode != 1)
30017 {
30018 this.ai[1] = 1f;
30021 {
30023 Main.npc[
num873].velocity = -
Vector2.
UnitY.RotatedByRandom(6.2831854820251465) * Main.rand.Next(4, 9) - Vector2.UnitY * 2f;
30024 Main.npc[
num873].netUpdate =
true;
30025 }
30026 }
30027 }
30028 else if (
type == 813)
30029 {
30030 if (Main.rand.Next(2) == 0)
30031 {
30034 dust32.noGravity = true;
30035 dust32.position = base.Center -
vector124 * Main.rand.Next(10, 21);
30036 dust32.velocity =
vector124.RotatedBy(1.5707963705062866) * 6f;
30037 dust32.scale = 0.5f + Main.rand.NextFloat();
30038 dust32.fadeIn = 0.5f;
30039 dust32.customData =
base.Center;
30040 }
30041 if (Main.rand.Next(2) == 0)
30042 {
30045 dust33.noGravity = true;
30046 dust33.position = base.Center -
vector125 * 30f;
30047 dust33.velocity =
vector125.RotatedBy(-1.5707963705062866) * 3f;
30048 dust33.scale = 0.5f + Main.rand.NextFloat();
30049 dust33.fadeIn = 0.5f;
30050 dust33.customData =
base.Center;
30051 }
30052 if (this.ai[0] == 90f && Main.netMode != 1)
30053 {
30055 Main.npc[
num874].netUpdate =
true;
30056 }
30057 }
30058 }
30059 else if (this.ai[0] <= 120f)
30060 {
30065 {
30066 if (Main.rand.Next(2) == 0)
30067 {
30070 dust34.noGravity = true;
30071 dust34.position = base.Center -
vector126 * Main.rand.Next(10, 21);
30072 dust34.velocity =
vector126.RotatedBy(1.5707963705062866) * 6f;
30073 dust34.scale = 0.5f + Main.rand.NextFloat();
30074 dust34.fadeIn = 0.5f;
30075 dust34.customData =
base.Center;
30076 }
30077 else
30078 {
30081 dust35.noGravity = true;
30082 dust35.position = base.Center -
vector127 * 30f;
30083 dust35.velocity =
vector127.RotatedBy(-1.5707963705062866) * 3f;
30084 dust35.scale = 0.5f + Main.rand.NextFloat();
30085 dust35.fadeIn = 0.5f;
30086 dust35.customData =
base.Center;
30087 }
30088 }
30089 else if (Main.rand.Next(2) == 0)
30090 {
30093 dust36.noGravity = true;
30094 dust36.position = base.Center -
vector128 * Main.rand.Next(10, 21);
30095 dust36.velocity =
vector128.RotatedBy(1.5707963705062866) * 6f;
30096 dust36.scale = 0.5f + Main.rand.NextFloat();
30097 dust36.fadeIn = 0.5f;
30098 dust36.customData =
base.Center;
30099 }
30100 else
30101 {
30104 dust37.noGravity = true;
30105 dust37.position = base.Center -
vector129 * 30f;
30106 dust37.velocity =
vector129.RotatedBy(-1.5707963705062866) * 3f;
30107 dust37.scale = 0.5f + Main.rand.NextFloat();
30108 dust37.fadeIn = 0.5f;
30109 dust37.customData =
base.Center;
30110 }
30111 }
30112 else
30113 {
30114 scale = 1f - (this.ai[0] - 120f) / 60f;
30118 {
30120 }
30122 {
30124 {
30125 switch (Main.rand.Next(3))
30126 {
30127 case 0:
30128 {
30131 dust39.noGravity = true;
30132 dust39.position = base.Center -
vector131 * Main.rand.Next(10, 21);
30133 dust39.velocity =
vector131.RotatedBy(1.5707963705062866) * 6f;
30134 dust39.scale = 0.5f + Main.rand.NextFloat();
30135 dust39.fadeIn = 0.5f;
30136 dust39.customData =
base.Center;
30137 break;
30138 }
30139 case 1:
30140 {
30143 dust38.noGravity = true;
30144 dust38.position = base.Center -
vector130 * 30f;
30145 dust38.velocity =
vector130.RotatedBy(-1.5707963705062866) * 3f;
30146 dust38.scale = 0.5f + Main.rand.NextFloat();
30147 dust38.fadeIn = 0.5f;
30148 dust38.customData =
base.Center;
30149 break;
30150 }
30151 }
30152 }
30153 }
30154 else
30155 {
30157 {
30158 switch (Main.rand.Next(3))
30159 {
30160 case 0:
30161 {
30164 dust41.noGravity = true;
30165 dust41.position = base.Center -
vector133 * Main.rand.Next(10, 21);
30166 dust41.velocity =
vector133.RotatedBy(1.5707963705062866) * 6f;
30167 dust41.scale = 0.5f + Main.rand.NextFloat();
30168 dust41.fadeIn = 0.5f;
30169 dust41.customData =
base.Center;
30170 break;
30171 }
30172 case 1:
30173 {
30176 dust40.noGravity = true;
30177 dust40.position = base.Center -
vector132 * 30f;
30178 dust40.velocity =
vector132.RotatedBy(-1.5707963705062866) * 3f;
30179 dust40.scale = 0.5f + Main.rand.NextFloat();
30180 dust40.fadeIn = 0.5f;
30181 dust40.customData =
base.Center;
30182 break;
30183 }
30184 }
30185 }
30186 }
30187 }
30188 if (
type == 813 && Main.rand.NextFloat() <
Opacity)
30189 {
30190 Dust
dust42 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(3f, 20f), 90);
30192 dust42.noGravity = true;
30193 dust42.scale =
scale;
30194 }
30195 }
30197 {
30199 {
30201 }
30202 if (this.ai[0] == 0f)
30203 {
30206 {
30207 this.ai[0] = 1f;
30209 return;
30210 }
30211 }
30212 else if (this.ai[0] == 1f)
30213 {
30215 if (
type != 582 || !Main.npc[(
int)
this.ai[1]].active || Main.npc[(
int)
this.ai[1]].type != 124)
30216 {
30218 return;
30219 }
30220 NPC.lazyNPCOwnedProjectileSearchArray[(int)this.ai[1]] =
whoAmI;
30226 {
30228 return;
30229 }
30233 }
30235 }
30237 {
30239 {
30241 }
30243 if (Main.npc[(int)this.ai[0]].active && Main.npc[(int)this.ai[0]].townNPC)
30244 {
30248 if (
value15.Length() <
num878 ||
base.Hitbox.Intersects(Main.npc[(
int)
this.ai[0]].Hitbox))
30249 {
30251 int num879 = Main.npc[(int)this.ai[0]].lifeMax - Main.npc[(
int)this.ai[0]].life;
30253 {
30255 }
30257 {
30258 NPC nPC13 = Main.npc[(int)this.ai[0]];
30260 Main.npc[(int)this.ai[0]].HealEffect(
num879);
30261 }
30262 }
30263 else
30264 {
30268 {
30270 }
30271 value15.Y += 1f;
30274 }
30275 }
30276 else
30277 {
30279 }
30280 }
30282 {
30284 }
30286 {
30288 {
30290 {
30293 {
30296 dust2.velocity *= 0.3f;
30297 Main.dust[
num881].noGravity =
true;
30298 }
30299 }
30301 {
30304 {
30306 }
30307 }
30311 direction = ((player9.Center.X >
base.Center.X) ? 1 : (-1));
30316 {
30319 }
30321 {
30323 {
30324 float num885 = player9.Center.X -
base.Center.X;
30325 velocity.X += 0.05f * (float)
direction * (0.6f +
Math.
Abs(Main.WindForVisuals));
30327 {
30328 velocity.X -= 0.1f;
30329 }
30331 {
30332 velocity.X += 0.1f;
30333 }
30334 }
30336 {
30337 velocity.Y += 0.05f;
30339 {
30340 velocity.Y -= 0.1f;
30341 }
30342 }
30344 {
30345 velocity.Y -= 0.1f;
30347 {
30348 velocity.Y += 0.2f;
30349 }
30350 }
30351 }
30352 else
30353 {
30354 velocity.Y += 0.2f;
30356 {
30357 velocity.Y += 0.2f;
30358 }
30360 {
30361 velocity.Y -= 0.2f;
30362 }
30363 }
30365 }
30367 {
30369 {
30372 if (this.ai[2] == 1f)
30373 {
30376 }
30379 {
30381 }
30382 }
30384 {
30386 }
30388 {
30390 }
30392 {
30393 float num888 = (float)Main.rand.Next(28, 42) * 0.005f;
30394 num888 += (float)(270 - Main.mouseTextColor) / 500f;
30403 }
30405 this.ai[0]++;
30406 if (this.ai[0] >= 180f)
30407 {
30408 this.ai[0] = 0f;
30409 }
30410 }
30412 {
30413 return;
30414 }
30416 int num893 = (int)this.ai[1];
30418 {
30419 this.ai[1] = -1f;
30420 }
30421 else
30422 {
30423 DelegateMethods.v3_1 =
newColor3.ToVector3() * 0.5f;
30424 Utils.PlotTileLine(
base.Center, Main.projectile[
num893].Center, 8f, DelegateMethods.CastLight);
30425 }
30427 {
30428 localAI[0] = Main.rand.NextFloat() * 0.8f + 0.8f;
30429 direction = ((Main.rand.Next(2) > 0) ? 1 : (-1));
30430 }
30433 {
30435 }
30437 {
30439 }
30441 {
30442 Lighting.AddLight(
base.Center,
newColor3.ToVector3() * 0.5f);
30443 }
30445 {
30446 if (Main.rand.Next(10) == 0)
30447 {
30449 Dust
dust43 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 267, 0f, 0f, 225,
newColor3, 1.5f)];
30450 dust43.noGravity = true;
30451 dust43.noLight = true;
30453 dust43.position =
base.Center;
30455 }
30456 }
30458 {
30459 if (Main.rand.Next(10) == 0)
30460 {
30462 Dust
dust44 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 267, 0f, 0f, 225,
newColor3, 1.5f)];
30463 dust44.noGravity = true;
30464 dust44.noLight = true;
30466 dust44.position =
base.Center;
30468 }
30469 }
30470 if (Main.rand.Next(10) == 0)
30471 {
30472 float num896 = 1f + Main.rand.NextFloat() * 2f;
30473 float fadeIn = 1f + Main.rand.NextFloat();
30474 float num897 = 1f + Main.rand.NextFloat();
30477 {
30479 }
30480 vector136 *= 20f + Main.rand.NextFloat() * 100f;
30485 {
30487 }
30489 {
30491 }
30493 {
30495 dust45.noGravity = true;
30496 dust45.position =
vec;
30497 dust45.velocity = -Vector2.UnitY *
num896 * (Main.rand.NextFloat() * 0.9f + 1.6f);
30498 dust45.fadeIn = fadeIn;
30500 dust45.noLight = true;
30501 if (
dust45.dustIndex != 6000)
30502 {
30505 dust2.scale *= 0.65f;
30507 dust2.fadeIn *= 0.65f;
30508 dust46.color =
new Color(255, 255, 255, 255);
30509 }
30510 }
30511 }
30516 {
30518 }
30520 {
30522 if (Main.myPlayer ==
owner)
30523 {
30528 base.position =
base.Center;
30530 base.Center =
base.position;
30535 base.position =
base.Center;
30538 base.Center =
base.position;
30540 }
30541 }
30542 }
30544 {
30547 {
30549 }
30551 {
30553 }
30555 {
30557 }
30558 if (this.ai[0] == 0f)
30559 {
30561 {
30562 int num902 = (int)this.ai[1];
30563 if (!Main.npc[
num902].CanBeChasedBy(
this))
30564 {
30566 return;
30567 }
30571 {
30574 }
30577 }
30578 else
30579 {
30580 this.ai[1]++;
30581 if (this.ai[1] >= 45f)
30582 {
30586 {
30589 }
30590 this.ai[1] = 45f;
30593 }
30595 }
30596 }
30597 if (this.ai[0] == 1f)
30598 {
30604 {
30606 }
30608 {
30610 }
30612 {
30614 }
30619 {
30621 }
30622 int num908 = (int)this.ai[1];
30624 {
30626 }
30628 {
30630 }
30631 else if (Main.npc[
num908].active && !Main.npc[
num908].dontTakeDamage)
30632 {
30636 {
30637 Main.npc[
num908].HitEffect(0, 1.0);
30638 }
30639 }
30640 else
30641 {
30643 }
30645 {
30647 }
30649 {
30651 {
30655 dust47.fadeIn = 0.25f;
30656 dust47.noGravity = true;
30657 }
30659 {
30662 }
30663 }
30665 {
30667 {
30671 dust48.scale = 1.1f;
30674 dust48.velocity =
spinningpoint17.RotatedBy((
float)
Math.
PI * 2f * Main.rand.NextFloatDirection() * 0.025f);
30676 dust48.velocity =
spinningpoint17.RotatedBy((
float)
Math.
PI * 2f * Main.rand.NextFloatDirection() * 0.025f);
30678 dust2.position +=
dust48.velocity;
30679 if (Main.rand.Next(3) == 0)
30680 {
30682 dust48.velocity =
dust48.velocity.RotatedByRandom(0.39269909262657166) * 0.9f;
30683 }
30684 }
30686 {
30691 {
30694 dust49.scale = 1.5f;
30696 dust49.noGravity = true;
30697 }
30698 }
30699 }
30700 }
30702 {
30703 Lighting.AddLight(
base.Center, 0.2f, 0.6f, 0.7f);
30704 }
30706 {
30707 Lighting.AddLight(
base.Center, 0.8f, 0.7f, 0.4f);
30708 }
30709 }
30711 {
30712 if (Main.netMode == 2 &&
localAI[0] == 0f)
30713 {
30716 }
30720 {
30722 }
30723 if (!
flag54 && !
WorldGen.InWorld((
int)
base.Center.X / 16, (
int)
base.Center.Y / 16, Lighting.OffScreenTiles))
30724 {
30726 }
30728 {
30730 }
30732 {
30734 return;
30735 }
30739 {
30741 }
30743 {
30745 }
30747 {
30750 {
30752 }
30753 }
30755 }
30757 {
30758 Lighting.AddLight(
base.Center,
new Vector3(0.075f, 0.3f, 0.15f));
30762 {
30764 }
30765 else
30766 {
30768 }
30769 this.ai[1] += 1f;
30770 if (this.ai[1] > 30f)
30771 {
30774 {
30777 }
30778 }
30779 }
30781 {
30783 {
30786 }
30789 {
30791 }
30792 float angle = (float)
player10.miscCounter / 300f * ((
float)Math.PI * 4f) + this.ai[1];
30797 {
30799 }
30801 base.Center = player10.Center -
velocity;
30802 }
30804 {
30805 this.ai[1] += 0.01f;
30806 scale = this.ai[1];
30807 this.ai[0]++;
30808 if (this.ai[0] >= (
float)(3 * Main.projFrames[
type]))
30809 {
30811 return;
30812 }
30814 {
30817 {
30819 }
30820 }
30823 {
30825 }
30829 {
30830 Lighting.AddLight(
base.Center, 0.9f, 0.8f, 0.6f);
30831 }
30832 if (this.ai[0] != 1f)
30833 {
30834 return;
30835 }
30836 base.position =
base.Center;
30838 base.Center =
base.position;
30841 {
30844 {
30846 Main.dust[
num911].position = base.Center +
Vector2.
UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() *
width / 2f;
30847 }
30849 {
30851 Main.dust[
num913].position = base.Center +
Vector2.
UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() *
width / 2f;
30852 Main.dust[
num913].noGravity =
true;
30854 dust2.velocity *= 3f;
30856 Main.dust[
num913].position = base.Center +
Vector2.
UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() *
width / 2f;
30858 dust2.velocity *= 2f;
30859 Main.dust[
num913].noGravity =
true;
30860 Main.dust[
num913].fadeIn = 2.5f;
30861 }
30863 {
30866 Main.dust[
num915].noGravity =
true;
30868 dust2.velocity *= 3f;
30869 }
30871 {
30874 Main.dust[
num917].noGravity =
true;
30876 dust2.velocity *= 3f;
30877 }
30878 }
30880 {
30881 return;
30882 }
30885 {
30887 Main.dust[
num919].position = base.Center +
Vector2.
UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() *
width / 2f;
30889 dust2.velocity *= 2f;
30890 Main.dust[
num919].noGravity =
true;
30891 Main.dust[
num919].fadeIn = 2.5f;
30893 }
30895 {
30898 Main.dust[
num921].noGravity =
true;
30900 dust2.velocity *= 3f;
30902 }
30903 float num922 = (float)Main.rand.NextDouble() * ((float)
Math.
PI * 2f);
30904 float num923 = (float)Main.rand.NextDouble() * ((float)
Math.
PI * 2f);
30905 float num924 = (float)Main.rand.NextDouble() * ((float)
Math.
PI * 2f);
30906 float num925 = 7f + (float)Main.rand.NextDouble() * 7f;
30907 float num926 = 7f + (float)Main.rand.NextDouble() * 7f;
30908 float num927 = 7f + (float)Main.rand.NextDouble() * 7f;
30911 {
30913 }
30915 {
30917 }
30919 {
30923 {
30925 }
30927 {
30929 }
30931 {
30933 }
30940 {
30941 vector143.Y *= 0.5f;
30943 }
30945 {
30946 vector143.X *= 0.5f;
30948 }
30950 {
30951 vector143.Y *= 0.5f;
30953 }
30955 dust2.velocity *= 0.2f;
30960 {
30961 Main.dust[
num932].scale = 2f;
30962 Main.dust[
num932].noGravity =
true;
30963 Main.dust[
num932].fadeIn = Main.rand.NextFloat() * 2f;
30964 if (Main.rand.Next(4) == 0)
30965 {
30966 Main.dust[
num932].fadeIn = 2.5f;
30967 }
30968 Main.dust[
num932].noLight =
true;
30970 {
30972 dust2.position += Main.dust[
num932].velocity * 20f;
30974 dust2.velocity *= -1f;
30975 }
30976 }
30977 }
30978 }
30980 {
30981 this.ai[0]++;
30984 {
30986 }
30989 {
30991 }
30993 {
30994 case 0:
30996 if (Main.rand.Next(3) == 0)
30997 {
30998 if (Main.rand.Next(2) == 0)
30999 {
31001 Dust
dust52 = Main.dust[Dust.NewDust(
base.Center -
vector149 * 30f, 0, 0, Utils.SelectRandom<
int>(Main.rand, 86, 90))];
31002 dust52.noGravity = true;
31003 dust52.position = base.Center -
vector149 * Main.rand.Next(10, 21);
31004 dust52.velocity =
vector149.RotatedBy(1.5707963705062866) * 6f;
31005 dust52.scale = 0.5f + Main.rand.NextFloat();
31006 dust52.fadeIn = 0.5f;
31007 dust52.customData = this;
31008 }
31009 else
31010 {
31013 dust53.noGravity = true;
31014 dust53.position = base.Center -
vector150 * 30f;
31015 dust53.velocity =
vector150.RotatedBy(-1.5707963705062866) * 3f;
31016 dust53.scale = 0.5f + Main.rand.NextFloat();
31017 dust53.fadeIn = 0.5f;
31018 dust53.customData = this;
31019 }
31020 }
31021 if (this.ai[0] >= 30f)
31022 {
31024 scale += 0.0074468083f;
31026 {
31028 }
31030 }
31032 {
31035 this.ai[0] = 0f;
31036 }
31037 break;
31038 case 1:
31039 {
31042 {
31043 if (Main.rand.Next(2) == 0)
31044 {
31047 dust50.noGravity = true;
31048 dust50.position = base.Center -
vector144 * Main.rand.Next(10, 21);
31049 dust50.velocity =
vector144.RotatedBy(1.5707963705062866) * 6f;
31050 dust50.scale = 0.9f + Main.rand.NextFloat();
31051 dust50.fadeIn = 0.5f;
31052 dust50.customData = this;
31055 dust50.noGravity = true;
31056 dust50.position = base.Center -
vector144 * Main.rand.Next(10, 21);
31057 dust50.velocity =
vector144.RotatedBy(1.5707963705062866) * 6f;
31058 dust50.scale = 0.9f + Main.rand.NextFloat();
31059 dust50.fadeIn = 0.5f;
31060 dust50.customData = this;
31062 }
31063 else
31064 {
31067 dust51.noGravity = true;
31068 dust51.position = base.Center -
vector145 * Main.rand.Next(20, 31);
31069 dust51.velocity =
vector145.RotatedBy(-1.5707963705062866) * 5f;
31070 dust51.scale = 0.9f + Main.rand.NextFloat();
31071 dust51.fadeIn = 0.5f;
31072 dust51.customData = this;
31073 }
31074 }
31075 if (this.ai[0] % 30f == 0f && this.ai[0] < 241f && Main.myPlayer ==
owner)
31076 {
31078 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y,
vector146.X,
vector146.Y, 618,
damage / 2, 0f,
owner, 0f,
whoAmI);
31079 }
31084 if (this.ai[1] == 0f)
31085 {
31087 {
31088 if (Main.npc[
num937].CanBeChasedBy(
this))
31089 {
31092 {
31097 }
31098 }
31099 }
31101 {
31102 if (this.ai[1] != (
float)(
num936 + 1))
31103 {
31105 }
31106 this.ai[1] =
num936 + 1;
31107 }
31109 }
31110 if (this.ai[1] != 0f)
31111 {
31112 int num938 = (int)(this.ai[1] - 1f);
31114 {
31117 }
31118 }
31120 {
31122 }
31124 {
31137 }
31138 break;
31139 }
31140 }
31142 {
31143 Lighting.AddLight(
base.Center, 0.7f, 0.2f, 0.6f);
31144 }
31145 if (this.ai[0] >= 600f)
31146 {
31148 }
31149 }
31151 {
31160 {
31165 }
31167 {
31168 int num947 = (int)this.ai[1];
31170 {
31172 return;
31173 }
31175 }
31176 this.ai[0]++;
31177 if (!(this.ai[0] <
num946))
31178 {
31179 return;
31180 }
31182 int num948 = (int)this.ai[1];
31184 {
31186 {
31187 base.position += Main.projectile[
num948].position - Main.projectile[
num948].oldPos[1];
31188 }
31189 if (
base.Center.HasNaNs())
31190 {
31192 return;
31193 }
31194 }
31195 else
31196 {
31200 }
31202 {
31205 {
31207 }
31208 }
31210 {
31211 if (Main.rand.Next(2) == 0)
31212 {
31213 int num949 = Dust.NewDust(
base.Center, 8, 8, 86);
31216 Main.dust[
num949].noGravity =
true;
31217 Main.dust[
num949].scale = 1.5f;
31219 {
31220 Main.dust[
num949].customData = Main.projectile[(int)this.ai[1]];
31221 }
31222 }
31224 }
31225 else
31226 {
31228 }
31229 }
31231 {
31233 }
31235 {
31237 }
31239 {
31240 int num950 = (int)this.ai[0];
31243 {
31245 }
31247 {
31249 {
31251 return;
31252 }
31253 if (
type == 631 && this.ai[0] != -1f)
31254 {
31255 this.ai[0] = -1f;
31257 }
31258 }
31260 {
31263 {
31266 }
31267 return;
31268 }
31270 {
31274 }
31276 {
31277 return;
31278 }
31279 if (this.ai[1] > 0f)
31280 {
31281 this.ai[1]--;
31283 return;
31284 }
31286 {
31288 {
31290 }
31294 {
31296 }
31297 }
31298 else
31299 {
31304 {
31306 }
31307 }
31309 }
31311 {
31317 {
31320 {
31322 }
31324 {
31326 }
31330 if (Main.rand.Next(2) == 0)
31331 {
31334 dust54.noGravity = true;
31335 dust54.position = base.Center -
vector151 * Main.rand.Next(10, 21);
31336 dust54.velocity =
vector151.RotatedBy(1.5707963705062866) * 6f;
31337 dust54.scale = 0.5f + Main.rand.NextFloat();
31338 dust54.fadeIn = 0.5f;
31339 dust54.customData =
base.Center;
31340 }
31341 if (Main.rand.Next(2) == 0)
31342 {
31345 dust55.noGravity = true;
31346 dust55.position = base.Center -
vector152 * 30f;
31347 dust55.velocity =
vector152.RotatedBy(-1.5707963705062866) * 3f;
31348 dust55.scale = 0.5f + Main.rand.NextFloat();
31349 dust55.fadeIn = 0.5f;
31350 dust55.customData =
base.Center;
31351 }
31352 if (this.ai[0] < 0f)
31353 {
31357 dust2.velocity *= 2f;
31358 Main.dust[
num952].noGravity =
true;
31359 Main.dust[
num952].scale = Utils.SelectRandom<
float>(Main.rand, 0.8f, 1.65f);
31360 Main.dust[
num952].customData =
this;
31361 }
31362 }
31364 {
31367 {
31369 }
31371 {
31373 }
31375 {
31378 {
31380 }
31381 }
31382 if (
alpha == 0 && Main.rand.Next(15) == 0)
31383 {
31384 Dust
dust56 = Main.dust[Dust.NewDust(
base.Top, 0, 0, 261, 0f, 0f, 100)];
31385 dust56.velocity.X = 0f;
31386 dust56.noGravity = true;
31387 dust56.fadeIn = 1f;
31388 dust56.position = base.Center +
Vector2.
UnitY.RotatedByRandom(6.2831854820251465) * (4f * Main.rand.NextFloat() + 26f);
31389 dust56.scale = 0.5f;
31390 }
31393 {
31395 }
31396 }
31397 if (this.ai[0] < 0f)
31398 {
31399 this.ai[0]++;
31401 {
31402 this.ai[1] -= (float)
direction * ((
float)Math.PI / 8f) / 50f;
31403 }
31404 }
31405 if (this.ai[0] == 0f)
31406 {
31411 {
31414 {
31417 }
31418 }
31420 {
31422 {
31424 if (
nPC14.CanBeChasedBy(
this))
31425 {
31428 {
31431 }
31432 }
31433 }
31434 }
31436 {
31437 this.ai[0] = 1f;
31440 return;
31441 }
31442 }
31443 if (!(this.ai[0] > 0f))
31444 {
31445 return;
31446 }
31447 int num958 = (int)this.ai[1];
31448 if (!Main.npc[
num958].CanBeChasedBy(
this))
31449 {
31450 this.ai[0] = 0f;
31451 this.ai[1] = 0f;
31453 return;
31454 }
31455 this.ai[0]++;
31458 {
31460 }
31462 {
31464 }
31465 if (!(this.ai[0] >=
num959))
31466 {
31467 return;
31468 }
31471 {
31473 }
31475 int num961 = ((vector153.X > 0f) ? 1 : (-1));
31477 {
31479 this.ai[0] = -20f;
31480 this.ai[1] =
num960 + (float)
num961 * (
float)Math.PI / 6f;
31482 if (
owner == Main.myPlayer)
31483 {
31484 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y,
vector153.X,
vector153.Y, 642,
damage,
knockBack,
owner,
this.ai[1],
whoAmI);
31485 }
31486 }
31488 {
31489 return;
31490 }
31492 this.ai[0] = -20f;
31494 if (
owner != Main.myPlayer)
31495 {
31496 return;
31497 }
31499 Vector2 vector154 = nPC15.position + nPC15.Size * Utils.RandomVector2(Main.rand, 0f, 1f) -
base.Center;
31501 {
31507 {
31508 other = base.Center +
vector154.RotatedByRandom(0.7853981852531433) * (Main.rand.NextFloat() *
num963 + 0.5f);
31509 }
31510 float x8 = Main.rgbToHsl(
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB)).
X;
31511 NewProjectile(
GetProjectileSource_FromThis(),
other.X,
other.Y, 0f, 0f, 644,
damage,
knockBack,
owner,
x8,
whoAmI);
31512 }
31513 }
31515 {
31519 {
31521 return;
31522 }
31523 if (
type == 650 &&
player11.suspiciouslookingTentacle)
31524 {
31526 }
31528 {
31530 }
31532 {
31534 }
31536 {
31538 }
31540 {
31542 }
31544 {
31546 }
31548 {
31550 }
31553 {
31555 DelegateMethods.v3_1 =
v3_;
31556 Utils.PlotTileLine(
base.Center,
base.Center +
velocity * 6f, 20f, DelegateMethods.CastLightOpen);
31557 Utils.PlotTileLine(
base.Left,
base.Right, 20f, DelegateMethods.CastLightOpen);
31558 Utils.PlotTileLine(
player11.Center,
player11.Center +
player11.velocity * 6f, 40f, DelegateMethods.CastLightOpen);
31559 Utils.PlotTileLine(
player11.Left,
player11.Right, 40f, DelegateMethods.CastLightOpen);
31560 }
31562 {
31564 DelegateMethods.v3_1 =
vector156 * 0.75f;
31565 Utils.PlotTileLine(
player11.Center,
player11.Center +
player11.velocity * 6f, 40f, DelegateMethods.CastLightOpen);
31566 Utils.PlotTileLine(
player11.Left,
player11.Right, 40f, DelegateMethods.CastLightOpen);
31567 DelegateMethods.v3_1 =
vector156 * 1.5f;
31568 Utils.PlotTileLine(
base.Center,
base.Center +
velocity * 6f, 30f, DelegateMethods.CastLightOpen);
31569 Utils.PlotTileLine(
base.Left,
base.Right, 20f, DelegateMethods.CastLightOpen);
31570 }
31572 {
31574 DelegateMethods.v3_1 =
vector157 * 0.75f;
31575 Utils.PlotTileLine(
player11.Center,
player11.Center +
player11.velocity * 6f, 40f, DelegateMethods.CastLightOpen);
31576 Utils.PlotTileLine(
player11.Left,
player11.Right, 40f, DelegateMethods.CastLightOpen);
31577 DelegateMethods.v3_1 =
vector157 * 1.5f;
31578 Utils.PlotTileLine(
base.Center,
base.Center +
velocity * 6f, 30f, DelegateMethods.CastLightOpen);
31579 Utils.PlotTileLine(
base.Left,
base.Right, 20f, DelegateMethods.CastLightOpen);
31580 }
31584 if (
type == 882 &&
player11.ownedProjectileCounts[650] > 0)
31585 {
31587 }
31589 {
31592 if (
player11.ownedProjectileCounts[650] > 0)
31593 {
31595 }
31596 }
31598 {
31601 }
31603 {
31606 if (
player11.ownedProjectileCounts[888] > 0)
31607 {
31609 }
31610 }
31612 {
31615 if (
player11.ownedProjectileCounts[895] > 0)
31616 {
31618 }
31619 }
31621 {
31624 if (
player11.ownedProjectileCounts[895] > 0)
31625 {
31627 }
31628 }
31633 {
31634 base.Center = player11.Center +
vector158;
31635 }
31639 {
31641 }
31643 {
31645 {
31647 }
31648 else
31649 {
31651 }
31652 }
31654 {
31657 {
31659 }
31660 }
31662 {
31664 {
31667 {
31669 {
31671 }
31672 else
31673 {
31675 }
31676 }
31680 {
31683 {
31685 }
31686 }
31687 }
31688 else if (
type == 882)
31689 {
31692 {
31695 {
31697 }
31698 else
31699 {
31702 {
31704 }
31705 }
31706 }
31707 }
31708 else if (
type == 888)
31709 {
31712 {
31714 {
31716 }
31717 else
31718 {
31720 }
31721 }
31725 {
31728 {
31730 }
31731 else
31732 {
31735 {
31737 }
31738 }
31739 }
31740 }
31741 else if (
type == 895)
31742 {
31743 float num972 = velocity.X * 0.1f;
31745 {
31747 {
31749 }
31750 else
31751 {
31753 }
31754 }
31758 {
31762 {
31764 }
31765 }
31767 {
31769 Main.dust[
num974].noGravity =
true;
31770 }
31771 }
31772 else if (
type == 896)
31773 {
31776 {
31778 {
31780 }
31781 else
31782 {
31784 }
31785 }
31789 {
31792 {
31794 }
31795 else
31796 {
31799 {
31801 }
31802 }
31803 }
31804 }
31805 else if (
type == 898)
31806 {
31807 float num977 = velocity.X * 0.1f;
31809 {
31811 {
31813 }
31814 else
31815 {
31817 }
31818 }
31822 {
31826 {
31828 }
31829 }
31831 {
31833 Main.dust[
num979].noGravity =
true;
31834 }
31835 }
31836 else if (
type == 957)
31837 {
31838 float num980 = velocity.X * 0.05f;
31840 {
31842 {
31844 }
31845 else
31846 {
31848 }
31849 }
31853 {
31856 if (
frame >= Main.projFrames[
type] * 2)
31857 {
31859 }
31860 }
31861 }
31862 }
31863 else if (
type == 650)
31864 {
31866 {
31868 }
31870 {
31872 }
31873 else
31874 {
31876 }
31878 {
31881 {
31883 }
31884 }
31885 }
31886 else if (
type == 882)
31887 {
31890 {
31894 {
31896 }
31897 }
31898 }
31899 else if (
type == 888)
31900 {
31902 {
31904 }
31906 {
31908 }
31909 else
31910 {
31912 }
31914 {
31918 {
31920 }
31921 }
31922 }
31923 else if (
type == 895)
31924 {
31926 {
31928 }
31930 {
31932 }
31933 else
31934 {
31936 }
31938 {
31942 {
31944 }
31945 }
31946 }
31947 else if (
type == 896)
31948 {
31950 {
31952 }
31954 {
31956 }
31957 else
31958 {
31960 }
31962 {
31966 {
31968 if (Main.rand.Next(15) == 0)
31969 {
31971 }
31972 }
31973 }
31974 }
31975 else if (
type == 898)
31976 {
31978 {
31980 }
31982 {
31984 }
31985 else
31986 {
31988 }
31990 {
31994 {
31996 }
31997 }
31998 }
31999 else if (
type == 957)
32000 {
32003 {
32005 }
32007 {
32009 }
32010 else
32011 {
32013 }
32015 {
32021 {
32023 {
32025 break;
32026 }
32029 {
32031 break;
32032 }
32034 }
32036 {
32039 {
32042 {
32044 }
32047 {
32049 }
32051 {
32055 {
32056 localAI[0] = 200 + Main.rand.Next(150);
32058 }
32060 {
32062 }
32063 }
32064 }
32066 {
32070 {
32072 }
32073 }
32074 }
32075 else
32076 {
32079 {
32083 {
32085 }
32086 }
32087 }
32088 }
32089 else
32090 {
32093 {
32097 {
32099 }
32100 }
32101 }
32102 }
32103 if (
flag64 && this.ai[0] > 0f && (this.ai[0] += 1f) >= 60f)
32104 {
32105 this.ai[0] = 0f;
32106 this.ai[1] = 0f;
32107 }
32108 if (
flag64 && Main.rand.Next(15) == 0)
32109 {
32114 if ((
base.Center -
player11.Center).Length() < (
float)Main.screenWidth)
32115 {
32121 {
32123 {
32124 int num996 = Main.rand.Next(8);
32126 {
32129 {
32133 this.ai[0] = 1f;
32135 }
32137 {
32139 Main.dust[
num998].fadeIn = 0.75f;
32141 dust2.velocity *= 0.1f;
32142 }
32143 }
32144 }
32145 }
32146 }
32147 }
32149 {
32150 return;
32151 }
32155 {
32157 }
32159 float max = 0.999f;
32169 {
32172 {
32173 continue;
32174 }
32177 {
32179 {
32182 }
32183 }
32185 {
32188 }
32189 }
32191 {
32196 }
32198 {
32203 }
32205 {
32210 }
32211 else if (this.ai[0] > 0f)
32212 {
32217 if (Main.rand.Next(10) == 0)
32218 {
32219 int num1009 = Dust.NewDust(
base.Center +
f3.ToRotationVector2() * 6f *
num999 - Vector2.One * 4f, 8, 8, 204, 0f, 0f, 150,
default(
Color), 0.3f);
32220 Main.dust[
num1009].fadeIn = 0.75f;
32222 dust2.velocity *= 0.1f;
32223 }
32224 }
32225 else
32226 {
32227 num1001 = ((player11.direction == 1) ? 0f : 3.1416028f);
32231 }
32236 }
32238 {
32240 if (Main.myPlayer ==
owner)
32241 {
32243 {
32245 }
32247 {
32249 }
32250 else if (Main.mouseRight && Main.mouseRightRelease)
32251 {
32253 player12.mouseInterface = true;
32254 Main.blockMouse = true;
32255 }
32257 {
32259 {
32261 }
32263 }
32265 {
32268 {
32269 vector161.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y;
32270 }
32272 {
32276 }
32277 if (this.ai[0] == 0f && this.ai[1] == 0f)
32278 {
32279 this.ai[0] = (int)
base.Center.X / 16;
32280 this.ai[1] = (int)
base.Center.Y / 16;
32283 }
32284 }
32294 bool flag69 = player12.direction == 1;
32299 {
32304 }
32305 else
32306 {
32311 }
32313 {
32315 {
32316 break;
32317 }
32319 {
32321 }
32322 else
32323 {
32325 }
32327 {
32329 }
32330 }
32332 {
32337 }
32338 else
32339 {
32344 }
32346 {
32348 {
32349 break;
32350 }
32352 {
32354 }
32355 else
32356 {
32358 }
32360 {
32362 }
32363 }
32364 }
32367 {
32369 }
32370 player12.heldProj =
whoAmI;
32372 player12.itemRotation = 0f;
32373 }
32375 {
32378 if (this.ai[0] == 0f)
32379 {
32381 {
32383 this.ai[0] = 1f;
32384 this.ai[1] = 0f;
32386 }
32387 this.ai[1]++;
32388 if (this.ai[1] >= 60f)
32389 {
32391 }
32393 {
32395 Main.dust[
num1023].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f;
32396 Main.dust[
num1023].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f;
32397 Main.dust[
num1023].noGravity =
true;
32399 }
32400 }
32401 if (this.ai[0] != 1f)
32402 {
32403 return;
32404 }
32407 {
32411 {
32413 }
32415 {
32416 }
32418 {
32419 base.position.Y +=
height;
32422 }
32423 else
32424 {
32426 }
32427 }
32428 this.ai[1]++;
32430 {
32432 {
32437 }
32438 else
32439 {
32443 }
32444 }
32445 if (this.ai[1] >= 60f)
32446 {
32448 }
32450 {
32453 {
32454 int num1030 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
32456 Main.dust[
num1031].alpha = 200;
32458 dust2.velocity *=
new Vector2(0.3f, 2f);
32461 dust2.scale += Main.rand.NextFloat();
32464 if (
num1020 == -1 && Main.rand.Next(4) != 0)
32465 {
32466 Main.dust[
num1031].velocity.Y -= 0.2f;
32467 }
32468 }
32470 }
32472 {
32474 {
32475 int num1033 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
32477 Main.dust[
num1034].alpha = 200;
32479 dust2.velocity *=
new Vector2(0.3f, 2f);
32482 dust2.scale += Main.rand.NextFloat();
32485 if (
num1020 == -1 && Main.rand.Next(4) != 0)
32486 {
32487 Main.dust[
num1034].velocity.Y -= 0.2f;
32488 }
32489 }
32490 }
32493 {
32495 }
32499 {
32500 if (Main.rand.Next(3) < 2)
32501 {
32503 Main.dust[
num1037].noGravity =
true;
32504 Main.dust[
num1037].fadeIn = 1f;
32505 if (Main.dust[
num1037].velocity.Y > 0f)
32506 {
32507 Main.dust[
num1037].velocity.Y *= -1f;
32508 }
32509 if (Main.rand.Next(6) < 3)
32510 {
32513 dust2.velocity *= 5f;
32514 Main.dust[
num1037].velocity.Y -= 3f;
32516 Main.dust[
num1037].noGravity =
false;
32517 Main.dust[
num1037].noLight =
true;
32518 Main.dust[
num1037].fadeIn = 0.4f;
32520 dust2.scale *= 0.3f;
32521 }
32522 else
32523 {
32525 }
32528 }
32529 }
32531 {
32532 if (!(Main.rand.NextFloat() < 0.5f))
32533 {
32534 int num1039 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
32536 Main.dust[
num1040].alpha = 200;
32538 dust2.velocity *=
new Vector2(0.6f, 1.5f);
32540 dust2.scale += Main.rand.NextFloat();
32541 if (
num1020 == -1 && Main.rand.Next(4) != 0)
32542 {
32543 Main.dust[
num1040].velocity.Y -= 0.2f;
32544 }
32546 }
32547 }
32548 }
32550 {
32553 {
32555 }
32557 {
32560 }
32561 this.ai[0]++;
32563 {
32565 }
32567 {
32569 if (this.ai[0] <
num1041 - 120f)
32570 {
32571 float num1042 = this.ai[0] % 60f;
32574 }
32575 }
32586 vector165.X = vector165.Y * 0.2f;
32590 if (
type == 656 &&
owner == Main.myPlayer)
32591 {
32596 {
32598 if (Collision.CanHitLine(
position, 0, 0,
center20, 0, 0) || Collision.CanHitLine(
position, 0, 0, top, 0, 0))
32599 {
32601 break;
32602 }
32603 }
32605 {
32606 float num1046 = this.ai[0] % 60f;
32609 }
32610 }
32611 if (!(this.ai[0] <
num1041 - 120f))
32612 {
32613 return;
32614 }
32616 {
32619 float amount3 = Main.rand.NextFloat();
32622 vector166.X *= -1f;
32628 dust57.fadeIn = 1f;
32629 dust57.scale = 0.3f;
32631 {
32632 dust57.velocity.X = 1f + Main.rand.NextFloat();
32633 }
32634 dust57.velocity.Y = Main.rand.NextFloat() * -0.5f - 1f;
32635 }
32636 }
32638 {
32641 {
32644 }
32646 {
32648 {
32651 float amount4 = Main.rand.NextFloat();
32654 vector169.X *= -1f;
32659 dust58.customData = base.Center +
vector170;
32660 dust58.fadeIn = 1f;
32661 dust58.scale = 0.3f;
32663 {
32664 dust58.velocity.X = 1f + Main.rand.NextFloat();
32665 }
32666 dust58.velocity.Y = Main.rand.NextFloat() * -0.5f - 1f;
32667 }
32668 }
32670 {
32675 }
32678 {
32680 {
32682 }
32684 {
32686 }
32687 }
32689 {
32691 {
32693 }
32695 {
32697 }
32698 }
32700 {
32701 Lighting.AddLight(
base.Center,
newColor4.ToVector3() * 0.5f);
32702 }
32704 {
32705 if (Main.rand.Next(10) == 0)
32706 {
32708 Dust
dust59 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 267, 0f, 0f, 225,
newColor4, 1.5f)];
32709 dust59.noGravity = true;
32710 dust59.noLight = true;
32712 dust59.position =
base.Center;
32714 }
32715 }
32717 {
32718 if (Main.rand.Next(10) == 0)
32719 {
32721 Dust
dust60 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 267, 0f, 0f, 225,
newColor4, 1.5f)];
32722 dust60.noGravity = true;
32723 dust60.noLight = true;
32725 dust60.position =
base.Center;
32727 }
32728 }
32730 {
32732 }
32736 {
32738 if (Main.expertMode)
32739 {
32741 }
32743 }
32745 {
32747 }
32748 }
32750 {
32757 {
32764 {
32766 }
32767 if (
localAI[0] == 0f && this.ai[0] < 0f &&
owner == Main.myPlayer)
32768 {
32771 {
32773 if (
nPC17.CanBeChasedBy(
this))
32774 {
32776 if ((
flag71 & (
nPC17.Distance(
base.Center) < 400f)) && (Collision.CanHitLine(
base.Center, 0, 0,
nPC17.Center, 0, 0) || Collision.CanHitLine(
base.Center, 0, 0,
nPC17.Top, 0, 0)))
32777 {
32779 }
32780 }
32781 }
32782 if (this.ai[0] >= 0f)
32783 {
32786 }
32787 }
32789 {
32791 }
32793 {
32795 }
32797 {
32799 }
32801 {
32804 {
32806 }
32807 }
32810 {
32812 }
32814 {
32816 }
32817 this.ai[1]++;
32820 {
32821 if (Main.rand.Next(3) == 0)
32822 {
32823 Dust
dust61 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 27, 0f, -2f)];
32825 dust61.noGravity = true;
32828 dust61.fadeIn = 0.5f;
32829 dust61.alpha = 200;
32830 }
32831 }
32832 }
32834 {
32836 }
32837 int num1061 = (int)this.ai[0];
32839 {
32841 {
32844 {
32846 }
32848 }
32849 return;
32850 }
32851 if (this.ai[0] == -1f &&
timeLeft > 5)
32852 {
32854 }
32856 {
32858 }
32859 if (this.ai[0] >= 0f)
32860 {
32861 this.ai[0] = -1f;
32863 }
32864 }
32866 {
32868 }
32870 {
32872 }
32874 {
32876 {
32878 {
32880 }
32882 {
32884 {
32887 Gore
gore2 = Gore.NewGoreDirect(
base.Center +
vector175 * 3f,
vector175, Utils.SelectRandom<
int>(Main.rand, 1027, 1028, 1029, 1030));
32888 if (
gore2.velocity.Y > 0f)
32889 {
32891 gore.velocity *= -0.5f;
32892 }
32893 if (
gore2.velocity.Y < -5f)
32894 {
32895 gore2.velocity.Y *= 0.8f;
32896 }
32897 gore2.velocity.Y *= 1.1f;
32898 gore2.velocity.X *= 0.88f;
32899 }
32900 }
32901 if (!Main.dedServ)
32902 {
32903 if (!
Filters.
Scene[
"CrystalDestructionVortex"].IsActive())
32904 {
32906 }
32907 if (!
Filters.
Scene[
"CrystalDestructionColor"].IsActive())
32908 {
32910 }
32913 Filters.
Scene[
"CrystalDestructionVortex"].GetShader().UseIntensity(
num1064 * 2f).UseProgress(0f)
32914 .UseTargetPosition(
base.Center);
32915 }
32917 {
32920 }
32921 }
32923 {
32924 if (!Main.dedServ)
32925 {
32928 velocity.Y =
num1066 * -0.25f;
32929 if (!
Filters.
Scene[
"CrystalDestructionVortex"].IsActive())
32930 {
32932 }
32933 if (!
Filters.
Scene[
"CrystalDestructionColor"].IsActive())
32934 {
32936 }
32939 Filters.
Scene[
"CrystalDestructionVortex"].GetShader().UseIntensity(
num1066 * 2f).UseProgress(0f)
32940 .UseTargetPosition(
base.Center);
32941 }
32943 {
32946 }
32947 }
32949 {
32951 if (Main.netMode != 2)
32952 {
32953 Filters.
Scene[
"CrystalDestructionVortex"].GetShader().UseIntensity(2f).UseProgress(
num1067 * 30f);
32954 }
32955 velocity.Y -= 1f;
32957 {
32960 }
32961 }
32963 {
32964 if (!Main.dedServ)
32965 {
32968 }
32970 }
32972 {
32974 {
32975 if (Main.rand.Next(2) == 0)
32976 {
32979 vector176.X += (float)
Math.
Sin((
double)((base.position.Y +
num1069) * 0.01f) + 6.2831854820251465 * ((double)Main.rand.Next(3) / 3.0)) * 0.5f;
32986 dust62.velocity.Y = Main.rand.NextFloat() * 2f;
32987 dust62.fadeIn = 0.1f;
32988 }
32989 }
32990 }
32992 }
32994 {
32996 {
32997 if (this.ai[0] == 70f)
32998 {
33000 }
33001 this.ai[0]++;
33003 if (this.ai[0] < 20f)
33004 {
33006 }
33007 else if (this.ai[0] < 60f)
33008 {
33010 }
33011 else if (this.ai[0] < 80f)
33012 {
33014 }
33015 else
33016 {
33018 }
33022 }
33024 {
33025 return;
33026 }
33027 if (this.ai[0] == 0f)
33028 {
33030 }
33031 this.ai[0]++;
33032 if (!(this.ai[0] >= 40f))
33033 {
33034 return;
33035 }
33037 {
33040 {
33044 {
33046 }
33048 {
33052 nPC18.netUpdate = true;
33053 }
33054 }
33055 }
33057 }
33059 {
33061 }
33063 {
33065 }
33067 {
33069 }
33071 {
33073 }
33075 {
33077 }
33079 {
33081 }
33083 {
33085 }
33087 {
33089 }
33091 {
33093 }
33095 {
33097 }
33099 {
33101 }
33103 {
33105 }
33107 {
33109 }
33111 {
33113 }
33115 {
33117 }
33119 {
33121 }
33123 {
33125 }
33127 {
33129 }
33131 {
33133 }
33135 {
33137 }
33139 {
33141 }
33143 {
33145 }
33147 {
33149 }
33151 {
33153 }
33155 {
33157 }
33159 {
33161 }
33163 {
33165 }
33167 {
33169 }
33171 {
33173 }
33175 {
33177 }
33179 {
33181 }
33183 {
33185 }
33187 {
33189 }
33191 {
33193 }
33195 {
33197 }
33199 {
33201 }
33203 {
33205 }
33207 {
33209 }
33211 {
33213 }
33215 {
33217 }
33219 {
33221 }
33223 {
33225 }
33227 {
33229 }
33231 {
33233 }
33235 {
33237 }
33239 {
33241 }
33243 {
33245 }
33247 {
33249 }
33251 {
33253 }
33255 {
33257 }
33259 {
33261 }
33263 {
33265 }
33267 {
33269 }
33271 {
33273 }
33275 {
33277 }
33279 {
33281 }
33283 {
33285 }
33287 {
33289 }
33291 {
33293 }
33295 {
33297 }
33299 {
33301 }
33303 {
33305 }
33306 }
static float Lerp(float value1, float value2, float amount)
static float WrapAngle(float angle)
static float Clamp(float value, float min, float max)
static double Cos(double d)
static byte Min(byte val1, byte val2)
static double Atan2(double y, double x)
static double Sqrt(double d)
static double IEEERemainder(double x, double y)
static double Abs(double value)
static double Sin(double a)
static double Floor(double d)
static int Sign(decimal value)
static byte Max(byte val1, byte val2)
static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
static void PlaySound(int type, Vector2 position, int style=1)
static ActiveSound GetActiveSound(SlotId id)
Vector2 DirectionFrom(Vector2 Source)
float AngleTo(Vector2 Destination)
float Distance(Vector2 Other)
Vector2 DirectionTo(Vector2 Destination)
static void BroadcastParticleSpawn(ParticleOrchestraType type, ParticleOrchestraSettings settings)
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
static Color GetPortalColor(int colorIndex)
static void SyncPortalSections(Vector2 portalPosition, int fluff)
static bool SupportedTilesAreFine(Vector2 portalCenter, float portalAngle)
static FilterManager Scene
static ArmorShaderDataSet Armor
static bool[] CountsAsCritter
static readonly LegacySoundStyle Item120
static readonly LegacySoundStyle Item101
static readonly LegacySoundStyle Item14
static readonly LegacySoundStyle Item34
static readonly LegacySoundStyle DD2_DarkMageHealImpact
static readonly LegacySoundStyle Item7
static readonly LegacySoundStyle Item113
static readonly LegacySoundStyle DD2_SkeletonSummoned
static readonly LegacySoundStyle Item28
static readonly LegacySoundStyle Item117
static readonly LegacySoundStyle Item17
static readonly LegacySoundStyle Item22
static readonly LegacySoundStyle Item82
static readonly LegacySoundStyle Item1
static readonly LegacySoundStyle Item9
static readonly LegacySoundStyle GlommerBounce
static readonly LegacySoundStyle Item13
static readonly LegacySoundStyle Item123
static readonly LegacySoundStyle Item8
static readonly LegacySoundStyle Item26
static readonly LegacySoundStyle Item121
static readonly LegacySoundStyle Item46
static readonly LegacySoundStyle Item60
static readonly LegacySoundStyle Item20
static readonly LegacySoundStyle Item74
static readonly LegacySoundStyle DD2_DefeatScene
static bool[] CommonSapling
static readonly ushort Count
void AI_155_MysticSnakeCoil()
void AI_193_Flamethrower()
void AI_159_PaperAirplanes()
void AI_173_HallowBossRainbowTrail()
void AI_148_StarSpawner()
void AI_067_FreakingPirates()
void AI_164_StormTigerGem()
void AI_186_PrincessWeapon()
void DoRainbowCrystalStaffExplosion()
void AI_140_MonkStaffT1()
void AI_007_GrapplingHooks()
void AI_177_IceWhipSlicer()
void AI_180_FairyQueenSunDance()
void AI_161_RapierStabs()
IEntitySource GetProjectileSource_FromThis()
int FindTargetWithLineOfSight(float maxRange=800f)
void AI_009_MagicMissiles()
void AI_145_BookStaffStorm()
void AI_179_FairyQueenLance()
void AI_176_EdgyLightning()
void AI_142_MonkStaffT2And3()
void AI_192_JuminoAnimation()
void AI_182_FinalFractal()
void AI_120_StardustGuardian()
void AI_184_BadTorchLuck()
void AI_047_MagnetSphere()
void AI_168_FirstFractal()
void AI_191_TrueNightsEdge()
void AI_066_TryInterceptingTarget(Vector2 targetDir, Vector2 targetVelocity, float speed)
void AI_137_LightningAura()
void AI_178_FireExplosion()
float GetLastPrismHue(float laserIndex, ref float laserLuminance, ref float laserAlphaMultiplier)
void AI_139_ExplosiveTrapExplosion()
void AI_141_MonkStaffT1Explosion()
void AI_181_FairyQueenRangedItemShot()
void AI_175_TitaniumStormShards()
void AI_061_FishingBobber()
void AI_170_FairyGlowstick()
void AI_172_HallowBossRainbowPelletStorm()
IEntitySource GetNPCSource_FromThis()
bool Colliding(Rectangle myRect, Rectangle targetRect)
void AI_183_ZoologistStrike()
void AI_131_FlameBurstShot()
void AI_121_StardustDragon()
void AI_130_FlameBurstTower()
void AI_147_Celeb2Rocket()
IEntitySource GetItemSource_FromThis()
void AI_194_HorsemanPumpkin()
void AI_143_MonkStaffT2Ghast()
NPC OwnerMinionAttackTargetNPC
void AI_174_MultisegmentPet()
void AI_138_ExplosiveTrap()
void AI_150_GolfClubHelper()
void AI_167_SparkleGuitar()
void AI_136_BetsyBreath()
void AI_162_TigerPounce()
void AI_171_HallowBossRainbowStreak()
void AI_152_SuperStarSlash()
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)
@ ChlorophyteLeafCrystalShot
static Color CornflowerBlue
static Color Lerp(Color value1, Color value2, float amount)
static float Distance(Vector2 value1, Vector2 value2)
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
static readonly SlotId Invalid
static SlotId FromFloat(float value)