55599 {
55601 float num = (float)
Math.
PI / 2f;
55602 Vector2 vector = player.RotatedRelativePoint(player.MountedCenter);
55606 {
55610 {
55612 }
55614 {
55616 }
55618 {
55620 }
55624 bool flag = false;
55626 {
55628 flag = true;
55629 }
55632 {
55636 {
55638 }
55639 }
55641 {
55644 {
55646 }
55647 }
55648 if (
ai[1] == 1f &&
ai[0] != 1f)
55649 {
55653 for (
int i = 0;
i < 2;
i++)
55654 {
55656 Main.dust[
num7].velocity *= 0.66f;
55657 Main.dust[
num7].noGravity =
true;
55658 Main.dust[
num7].scale = 1.4f;
55659 }
55660 }
55661 if (flag && Main.myPlayer ==
owner)
55662 {
55663 if (player.channel && player.CheckMana(player.inventory[player.selectedItem].mana,
pay:
true) && !player.noItems && !player.CCed)
55664 {
55665 float num8 = player.inventory[player.selectedItem].shootSpeed *
scale;
55668 if (player.gravDir == -1f)
55669 {
55670 value.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector3.Y;
55671 }
55674 {
55676 }
55679 {
55681 }
55686 for (
int j = 0;
j < 2;
j++)
55687 {
55692 {
55694 }
55696 }
55697 }
55698 else
55699 {
55701 }
55702 }
55703 }
55705 {
55707 {
55710 }
55713 {
55715 }
55717 {
55720 {
55722 }
55727 {
55731 DelegateMethods.v3_1 =
vector5 * 0.8f;
55732 Utils.PlotTileLine(
base.Center -
vector6,
base.Center, 8f, DelegateMethods.CastLightOpen);
55733 }
55735 }
55736 if (Main.myPlayer ==
owner)
55737 {
55739 {
55741 }
55742 if (!player.channel || player.noItems || player.CCed)
55743 {
55745 }
55747 {
55750 if (player.gravDir == -1f)
55751 {
55752 value4.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector7.Y;
55753 }
55754 if (Main.tile[
Player.tileTargetX,
Player.tileTargetY].active())
55755 {
55758 }
55761 {
55763 }
55766 {
55768 }
55769 int tileBoost = player.inventory[player.selectedItem].tileBoost;
55770 int num14 = -Player.tileRangeX - tileBoost + 1;
55771 int num15 = Player.tileRangeX + tileBoost - 1;
55772 int num16 = -Player.tileRangeY - tileBoost;
55773 int num17 = Player.tileRangeY + tileBoost - 1;
55775 bool flag2 =
false;
55777 {
55779 }
55781 {
55783 }
55785 {
55787 }
55789 {
55791 }
55793 {
55797 {
55799 }
55801 {
55803 }
55805 {
55807 }
55809 {
55811 }
55813 }
55815 {
55817 }
55819 }
55820 }
55821 }
55823 {
55827 {
55829 }
55831 {
55833 }
55834 bool flag3 =
false;
55836 if (
ai[0] == 80f ||
ai[0] == 180f || (
ai[0] > 180f &&
ai[0] % 20f == 0f))
55837 {
55839 }
55843 {
55845 }
55846 bool flag5 =
false;
55848 {
55850 }
55851 if (
flag4 &&
ai[0] % 20f == 0f)
55852 {
55854 }
55856 {
55858 {
55860 }
55862 float num22 = player.inventory[player.selectedItem].shootSpeed *
scale;
55865 if (player.gravDir == -1f)
55866 {
55867 value5.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector9.Y;
55868 }
55871 {
55873 }
55876 {
55878 }
55880 }
55882 {
55886 {
55888 }
55889 }
55891 {
55895 for (
int k = 0;
k <
num20 + 1;
k++)
55896 {
55898 float num24 = 0.4f;
55900 {
55903 }
55907 Main.dust[
num25].noGravity =
true;
55909 Main.dust[
num25].customData = player;
55910 }
55911 }
55913 {
55917 for (
int l = 0;
l < 2;
l++)
55918 {
55920 float num27 = 0.35f;
55922 {
55925 }
55926 float num28 = Main.rand.NextFloatDirection();
55931 Main.dust[
num30].noGravity =
true;
55933 Main.dust[
num30].customData = player;
55934 Main.dust[
num30].fadeIn = 0.5f;
55935 }
55936 }
55938 {
55939 bool flag6 =
false;
55940 flag6 = !
flag3 || player.CheckMana(player.inventory[player.selectedItem].mana,
pay:
true);
55941 if (player.channel &&
flag6 && !player.noItems && !player.CCed)
55942 {
55944 {
55948 {
55950 }
55952 int num32 =
NewProjectile(
GetProjectileSource_FromThis(),
center.X,
center.Y,
vector15.X,
vector15.Y, 461,
num31,
knockBack,
owner, 0f,
whoAmI);
55955 }
55957 {
55958 Projectile projectile = Main.projectile[(int)
ai[1]];
55959 if (!projectile.active || projectile.type != 461)
55960 {
55962 return;
55963 }
55964 }
55965 else
55966 {
55967 bool flag7 =
false;
55969 {
55971 }
55972 if (
ai[0] <= 50f &&
ai[0] % 10f == 0f)
55973 {
55975 }
55976 if (
ai[0] >= 80f &&
ai[0] < 180f &&
ai[0] % 30f == 0f)
55977 {
55979 }
55981 {
55988 {
55990 }
55993 NewProjectile(
GetProjectileSource_FromThis(),
vector16.X,
vector16.Y,
vector17.X,
vector17.Y,
num33,
num36,
knockBack,
owner, 0f,
num35);
55994 }
55995 }
55996 }
55997 else
55998 {
56000 }
56001 }
56002 }
56004 {
56007 {
56009 }
56011 {
56013 }
56014 damage = (int)((
float)player.inventory[player.selectedItem].damage * player.magicDamage);
56017 bool flag8 =
false;
56019 {
56021 }
56023 bool flag9 =
false;
56025 {
56027 }
56029 {
56032 if (Main.myPlayer ==
owner)
56033 {
56034 float num39 = player.inventory[player.selectedItem].shootSpeed *
scale;
56037 if (player.gravDir == -1f)
56038 {
56039 value6.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector18.Y;
56040 }
56043 {
56045 }
56049 {
56051 }
56053 }
56054 }
56056 int num40 = ((!(
ai[0] < 120f)) ? 1 : 4);
56058 {
56061 {
56063 }
56064 }
56066 {
56070 {
56072 }
56073 }
56075 {
56077 flag10 = !
flag8 || player.CheckMana(player.inventory[player.selectedItem].mana,
pay:
true);
56078 if (player.channel &&
flag10 && !player.noItems && !player.CCed)
56079 {
56081 {
56085 {
56087 }
56089 for (
int m = 0;
m < 6;
m++)
56090 {
56091 NewProjectile(
GetProjectileSource_FromThis(),
center2.X,
center2.Y,
vector19.X,
vector19.Y, 632,
num41,
knockBack,
owner,
m,
whoAmI);
56092 }
56094 }
56095 }
56096 else
56097 {
56099 }
56100 }
56101 }
56103 {
56104 num = 0f;
56106 {
56108 }
56110 {
56112 }
56115 {
56118 }
56119 if (Main.myPlayer ==
owner)
56120 {
56121 if (player.channel && !player.noItems && !player.CCed)
56122 {
56124 if (player.inventory[player.selectedItem].shoot ==
type)
56125 {
56126 num42 = player.inventory[player.selectedItem].shootSpeed *
scale;
56127 }
56131 {
56132 vec = Vector2.UnitX * player.direction;
56133 }
56136 {
56138 }
56140 }
56141 else
56142 {
56144 }
56145 }
56147 Lighting.AddLight(
vector20, 0.8f, 0.8f, 0.8f);
56148 if (Main.rand.Next(3) == 0)
56149 {
56151 Main.dust[
num43].noGravity =
true;
56153 }
56154 }
56156 {
56157 num = 0f;
56159 {
56161 }
56163 {
56165 }
56168 {
56171 }
56172 if (Main.myPlayer ==
owner)
56173 {
56174 if (player.channel && !player.noItems && !player.CCed)
56175 {
56177 if (player.inventory[player.selectedItem].shoot ==
type)
56178 {
56179 num44 = player.inventory[player.selectedItem].shootSpeed *
scale;
56180 }
56183 if (
vec2.HasNaNs())
56184 {
56185 vec2 = Vector2.UnitX * player.direction;
56186 }
56189 {
56191 }
56193 }
56194 else
56195 {
56197 }
56198 }
56200 Lighting.AddLight(
vector21, 0.8f, 0.8f, 0.8f);
56201 if (Main.rand.Next(3) == 0)
56202 {
56204 Main.dust[
num45].noGravity =
true;
56206 }
56207 }
56209 {
56210 num = 0f;
56214 {
56216 }
56218 num3 = Main.rand.NextFloatDirection() * ((float)
Math.
PI * 2f) * 0.05f;
56221 {
56224 }
56225 if (Main.myPlayer ==
owner)
56226 {
56227 if (player.channel && !player.noItems && !player.CCed)
56228 {
56230 if (player.inventory[player.selectedItem].shoot ==
type)
56231 {
56232 num46 = player.inventory[player.selectedItem].shootSpeed;
56233 }
56236 if (
vec3.HasNaNs())
56237 {
56238 vec3 = Vector2.UnitX * player.direction;
56239 }
56242 {
56244 }
56246 }
56247 else
56248 {
56250 }
56251 }
56252 DelegateMethods.v3_1 =
new Vector3(0.5f, 0.5f, 0.5f);
56254 }
56256 {
56260 if (Main.myPlayer ==
owner &&
ai[0] == 1f)
56261 {
56262 float num47 = player.inventory[player.selectedItem].shootSpeed *
scale;
56265 if (player.gravDir == -1f)
56266 {
56267 value8.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector22.Y;
56268 }
56271 {
56273 }
56276 {
56278 }
56285 {
56287 }
56289 }
56291 {
56293 }
56294 }
56296 {
56297 if (Main.netMode != 2 &&
localAI[0] == 0f)
56298 {
56300 }
56302 {
56304 }
56307 {
56309 }
56311 {
56313 }
56314 float num50 = ((
localAI[0].ToRotationVector2().X >= 0f) ? 1 : (-1));
56316 {
56318 }
56320 spinningpoint5.Y *= (float)
Math.
Sin(
ai[1]);
56322 {
56323 spinningpoint5.Y *= -1f;
56324 }
56328 {
56330 }
56331 else
56332 {
56334 }
56335 }
56337 {
56338 num = 0f;
56340 {
56342 }
56346 {
56348 }
56350 {
56352 }
56354 {
56356 }
56363 {
56367 {
56369 }
56370 }
56373 {
56377 {
56379 }
56380 }
56382 {
56385 {
56387 }
56388 }
56390 {
56391 bool canShoot = player.channel && player.HasAmmo(player.inventory[player.selectedItem],
canUse:
true) && !player.noItems && !player.CCed;
56394 int Damage = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56395 float KnockBack = player.inventory[player.selectedItem].knockBack;
56397 {
56400 KnockBack = player.GetWeaponKnockback(player.inventory[player.selectedItem],
KnockBack);
56401 float num55 = player.inventory[player.selectedItem].shootSpeed *
scale;
56404 if (player.gravDir == -1f)
56405 {
56406 value9.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector25.Y;
56407 }
56410 {
56412 }
56416 {
56418 }
56420 for (
int n = 0;
n < 1;
n++)
56421 {
56425 {
56427 }
56429 }
56431 {
56435 {
56439 {
56441 }
56443 }
56444 }
56445 }
56446 else
56447 {
56449 }
56450 }
56451 }
56453 {
56454 num = 0f;
56456 {
56458 }
56467 {
56471 if (
num61 % 7 == 0)
56472 {
56474 }
56476 }
56483 {
56487 {
56489 }
56490 }
56492 {
56495 {
56497 }
56498 }
56500 {
56501 bool canShoot2 = player.channel && player.HasAmmo(player.inventory[player.selectedItem],
canUse:
true) && !player.noItems && !player.CCed;
56504 int Damage2 = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56505 float KnockBack2 = player.inventory[player.selectedItem].knockBack;
56507 {
56509 }
56511 {
56515 float num62 = player.inventory[player.selectedItem].shootSpeed *
scale;
56518 if (player.gravDir == -1f)
56519 {
56520 value10.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector26.Y;
56521 }
56524 {
56526 }
56530 {
56532 }
56535 {
56539 {
56541 }
56544 {
56546 {
56549 {
56551 }
56553 }
56554 }
56556 {
56557 NewProjectile(
projectileSource_Item_WithPotentialAmmo2,
vector26.X,
vector26.Y,
spinningpoint10.X,
spinningpoint10.Y,
projToShoot2,
Damage2,
KnockBack2,
owner,
num60, 1f);
56558 }
56559 }
56560 }
56561 else
56562 {
56564 }
56565 }
56568 Color color = Main.hslToRgb(
ai[0] / 90f % 1f, 1f, 0.5f);
56569 color.A = 120;
56572 dust.color = color;
56573 dust.scale = 0.6f;
56574 dust.fadeIn = 0.9f;
56575 dust.noGravity = true;
56577 dust2.color = color;
56578 dust2.scale = 0.6f;
56579 dust2.fadeIn = 0.7f;
56580 dust2.noGravity = true;
56581 dust2.velocity = -
velocity.RotatedBy(2.094395160675049) / 10f;
56583 dust3.color = color;
56584 dust3.scale = 0.6f;
56585 dust3.fadeIn = 0.7f;
56586 dust3.noGravity = true;
56587 dust3.velocity = -
velocity.RotatedBy(-2.094395160675049) / 10f;
56589 {
56593 dust4.color = color;
56594 dust4.scale = 0.6f;
56595 dust4.fadeIn = 0.9f;
56596 dust4.velocity *=
num66;
56597 dust4.noGravity = true;
56600 dust5.color = color;
56601 dust5.scale = 0.6f;
56602 dust5.fadeIn = 0.9f;
56603 dust5.velocity *=
num66;
56604 dust5.noGravity = true;
56607 dust6.color = color;
56608 dust6.scale = 0.6f;
56609 dust6.fadeIn = 0.9f;
56610 dust6.velocity *=
num66;
56611 dust6.noGravity = true;
56612 }
56613 }
56615 {
56616 num = 0f;
56618 {
56620 }
56624 {
56626 }
56628 {
56630 }
56632 {
56634 }
56640 {
56644 }
56645 bool canShoot3 = player.channel && player.HasAmmo(player.inventory[player.selectedItem],
canUse:
true) && !player.noItems && !player.CCed;
56647 {
56649 }
56651 {
56654 {
56656 }
56658 }
56659 player.phantasmTime = 2;
56661 {
56664 int Damage3 = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56665 float KnockBack3 = player.inventory[player.selectedItem].knockBack;
56667 {
56671 float num70 = player.inventory[player.selectedItem].shootSpeed *
scale;
56674 if (player.gravDir == -1f)
56675 {
56676 value11.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector30.Y;
56677 }
56680 {
56682 }
56685 {
56687 }
56690 {
56693 {
56695 }
56698 Main.projectile[
num72].noDropItem =
true;
56699 }
56700 }
56701 else
56702 {
56704 }
56705 }
56706 }
56708 {
56709 num = 0f;
56711 {
56713 }
56715 int itemAnimationMax = player.itemAnimationMax;
56719 {
56720 ai[1] = itemAnimationMax;
56722 }
56723 bool canShoot4 = player.channel && player.HasAmmo(player.inventory[player.selectedItem],
canUse:
true) && !player.noItems && !player.CCed;
56725 {
56727 }
56729 {
56732 {
56734 }
56736 }
56738 {
56741 int Damage4 = player.GetWeaponDamage(player.inventory[player.selectedItem]);
56742 float KnockBack4 = player.inventory[player.selectedItem].knockBack;
56744 float num74 = 1.5f;
56746 {
56751 {
56753 }
56754 if (++player.phantomPhoneixCounter >= 3)
56755 {
56756 player.phantomPhoneixCounter = 0;
56763 }
56764 float num75 = player.inventory[player.selectedItem].shootSpeed *
scale;
56767 if (player.gravDir == -1f)
56768 {
56769 value12.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector34.Y;
56770 }
56773 {
56775 }
56778 {
56780 }
56783 {
56787 {
56789 }
56792 Main.projectile[
num77].noDropItem =
true;
56793 }
56794 }
56795 else
56796 {
56798 }
56799 }
56800 }
56806 player.heldProj =
whoAmI;
56807 player.SetDummyItemTime(
num2);
56810 {
56811 Vector2 vector38 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2f;
56812 if (player.direction != 1)
56813 {
56814 vector38.X = (float)player.bodyFrame.Width -
vector38.X;
56815 }
56816 if (player.gravDir != 1f)
56817 {
56818 vector38.Y = (float)player.bodyFrame.Height -
vector38.Y;
56819 }
56820 vector38 -=
new Vector2(player.bodyFrame.Width - player.width, player.bodyFrame.Height - 42) / 2f;
56822 }
56824 {
56825 position.Y += player.gravDir * 2f;
56826 }
56828 {
56829 position.Y += player.gravDir * 2f;
56830 }
56832 {
56834 {
56836 obj.noGravity = true;
56837 obj.velocity *= 2f;
56838 obj.velocity +=
localAI[0].ToRotationVector2();
56839 obj.fadeIn = 1.5f;
56840 }
56843 {
56844 if (Main.rand.Next(4) == 0)
56845 {
56848 obj2.noGravity = true;
56849 obj2.fadeIn = 0.5f;
56850 obj2.velocity +=
localAI[0].ToRotationVector2();
56851 obj2.noLight = true;
56852 }
56853 }
56854 }
56856 {
56857 player.itemAnimation =
num2 - (int)
ai[0];
56858 }
56859 }
static float Lerp(float value1, float value2, float amount)
static float WrapAngle(float angle)
static double Atan2(double y, double x)
static double Abs(double value)
static double Sin(double a)
static void PlaySound(int type, Vector2 position, int style=1)
static readonly LegacySoundStyle Item36
static readonly LegacySoundStyle Item91
static readonly LegacySoundStyle Item132
static readonly LegacySoundStyle Item15
static readonly LegacySoundStyle Item5
static readonly LegacySoundStyle Item1
static readonly LegacySoundStyle Item116
static readonly LegacySoundStyle Item156
IEntitySource GetProjectileSource_FromThis()
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
static float Distance(Vector2 value1, Vector2 value2)
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
static Vector3 Lerp(Vector3 value1, Vector3 value2, float amount)