39470 {
39475 base.Center = Main.GetPlayerArmPosition(
this) +
velocity * (
ai[0] - 1f);
39478 {
39480 return;
39481 }
39482 player.heldProj =
whoAmI;
39483 player.MatchItemTimeToItemAnimation();
39485 {
39490 }
39492 {
39493 case 848:
39494 {
39497 if (
num5 > 0.1f && Main.rand.NextFloat() <
num5 / 2f)
39498 {
39502 int num6 = Dust.NewDust(
r4.TopLeft(),
r4.Width,
r4.Height, 172, 0f, 0f, 100,
default(
Color), 1.5f);
39503 Main.dust[
num6].noGravity =
true;
39504 Main.dust[
num6].velocity.X /= 2f;
39505 Main.dust[
num6].velocity.Y /= 2f;
39506 }
39507 break;
39508 }
39509 case 847:
39510 {
39513 {
39519 if (Main.rand.Next(3) == 0)
39520 {
39522 }
39525 dust3.fadeIn = 0.3f;
39527 dust3.noGravity = true;
39528 dust3.velocity *= 0.5f;
39529 dust3.velocity +=
spinningpoint.RotatedBy((
float)player.direction * ((
float)
Math.
PI / 2f));
39530 dust3.velocity *= 0.5f;
39531 }
39532 break;
39533 }
39534 case 849:
39535 {
39539 if (
num4 > 0.4f && Main.rand.Next(9) != 0)
39540 {
39545 Dust
dust4 = Dust.NewDustDirect(
r3.TopLeft(),
r3.Width,
r3.Height, 191, 0f, 0f, 0,
default(
Color), 1.3f);
39546 dust4.noGravity = true;
39547 dust4.velocity +=
vector3 * 2f;
39548 if (Main.rand.Next(2) == 0)
39549 {
39551 {
39553 PositionInWorld =
r3.Center.ToVector2()
39555 }
39556 Lighting.AddLight(
r3.Center.ToVector2(),
new Vector3(0.2f, 0f, 0.4f));
39557 }
39558 break;
39559 }
39560 case 915:
39561 {
39564 {
39569 Dust
dust7 = Dust.NewDustDirect(
r6.TopLeft(),
r6.Width,
r6.Height, 267, 0f, 0f, 0, Main.hslToRgb(player.miscCounterNormalized * 9f % 1f, 1f, 0.5f), 1.3f);
39570 dust7.velocity *= Main.rand.NextFloat() * 0.8f;
39571 dust7.noGravity = true;
39572 dust7.scale = 0.9f + Main.rand.NextFloat() * 0.9f;
39573 dust7.fadeIn = Main.rand.NextFloat() * 0.9f;
39574 dust7.velocity +=
vector5 * 2f;
39575 if (
dust7.dustIndex != 6000)
39576 {
39578 dust8.scale /= 2f;
39579 dust8.fadeIn *= 0.85f;
39580 dust8.color =
new Color(255, 255, 255, 255);
39581 }
39582 }
39583 break;
39584 }
39585 case 914:
39586 {
39589 if (
num8 > 0.1f && Main.rand.NextFloat() <
num8 / 2f)
39590 {
39595 Dust
dust9 = Dust.NewDustDirect(
r7.TopLeft(),
r7.Width,
r7.Height, 39, 0f, 0f, 0,
default(
Color), 1.2f);
39596 dust9.noGravity = Main.rand.Next(3) == 0;
39597 dust9.velocity +=
vector6 * 2f;
39598 }
39599 break;
39600 }
39601 case 952:
39602 {
39605 if (
num9 > 0.15f && Main.rand.NextFloat() <
num9)
39606 {
39611 Dust
dust10 = Dust.NewDustDirect(
r8.TopLeft(),
r8.Width,
r8.Height, 26, 0f, 0f, 0,
default(
Color), 0.7f);
39612 dust10.noGravity = Main.rand.Next(3) == 0;
39614 {
39615 dust10.scale += 0.4f;
39616 }
39617 dust10.velocity +=
vector7 * 2f;
39618 }
39619 break;
39620 }
39621 case 912:
39622 {
39625 if (!(
num7 > 0.1f) || !(Main.rand.NextFloat() <
num7 / 2f))
39626 {
39627 break;
39628 }
39633 for (
int j = 0;
j < 3;
j++)
39634 {
39635 Dust
dust5 = Dust.NewDustDirect(
r5.TopLeft(),
r5.Width,
r5.Height, 16, 0f, 0f, 0,
default(
Color), 1.2f);
39636 dust5.noGravity = true;
39637 dust5.velocity +=
vector4 * 2f;
39638 }
39639 for (
int k = 0;
k < 1;
k++)
39640 {
39641 Dust.NewDustDirect(
r5.TopLeft(),
r5.Width,
r5.Height, 13, 0f, 0f, 0,
default(
Color), 0.8f).velocity +=
vector4 * 2f;
39642 }
39643 for (
int l = 0;
l < 3;
l++)
39644 {
39645 if (Main.rand.Next(2) != 0)
39646 {
39648 dust6.velocity +=
vector4 * 2f;
39649 dust6.velocity *= 0.3f;
39650 dust6.noGravity = true;
39651 }
39652 }
39653 Lighting.AddLight(
r5.Center.ToVector2(),
new Vector3(0.1f, 0.1f, 0.2f));
39654 break;
39655 }
39656 case 913:
39657 {
39659 float num = Utils.GetLerpValue(0.1f, 0.7f, t,
clamped:
true) * Utils.GetLerpValue(0.9f, 0.7f, t,
clamped:
true);
39660 if (!(num > 0.1f) || !(Main.rand.NextFloat() < num))
39661 {
39662 break;
39663 }
39668 for (
int i = 0;
i < 3;
i++)
39669 {
39670 if (Main.rand.Next(3) != 0)
39671 {
39672 continue;
39673 }
39674 if (Main.rand.Next(7) == 0)
39675 {
39676 Dust dust = Dust.NewDustDirect(
r.TopLeft(),
r.Width,
r.Height, 31);
39677 dust.velocity.X /= 2f;
39678 dust.velocity.Y /= 2f;
39679 dust.velocity +=
vector2 * 2f;
39680 dust.fadeIn = 1f + Main.rand.NextFloat() * 0.6f;
39681 dust.noGravity = true;
39682 continue;
39683 }
39684 Dust
dust2 = Dust.NewDustDirect(
r.TopLeft(),
r.Width,
r.Height, 6, 0f, 0f, 0,
default(
Color), 1.2f);
39685 dust2.velocity +=
vector2 * 2f;
39686 if (Main.rand.Next(3) != 0)
39687 {
39688 dust2.fadeIn = 0.7f + Main.rand.NextFloat() * 0.9f;
39689 dust2.scale = 0.6f;
39690 dust2.noGravity = true;
39691 }
39692 }
39693 break;
39694 }
39695 }
39696 }
static void PlaySound(int type, Vector2 position, int style=1)
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
static readonly LegacySoundStyle Item153
static void FillWhipControlPoints(Projectile proj, List< Vector2 > controlPoints)
List< Vector2 > WhipPointsForCollision
static void GetWhipSettings(Projectile proj, out float timeToFlyOut, out int segments, out float rangeMultiplier)
static float Dot(Vector2 value1, Vector2 value2)