58364 {
58365
58366
58367 float num = 50f;
58372 Vector2 vector = player.RotatedRelativePoint(player.MountedCenter);
58374 if (player.dead)
58375 {
58377 return;
58378 }
58380 {
58385 {
58388 {
58390 }
58391 }
58394 {
58396 }
58397 float num7 =
ai[0] / num;
58401 bool flag =
ai[0] == (float)(
int)(num / 2f);
58402 if (
ai[0] >= num || (flag && !player.controlUseItem))
58403 {
58405 player.reuseDelay = 10;
58406 }
58407 else if (flag)
58408 {
58410 int num9 = ((player.DirectionTo(
mouseWorld).X > 0f) ? 1 : (-1));
58412 {
58413 player.ChangeDir(
num9);
58417 }
58418 }
58422 if (Main.rand.Next(2) == 0)
58423 {
58424 Dust dust = Dust.NewDustDirect(
vector3 -
new Vector2(5f), 10, 10, 31, player.velocity.
X, player.velocity.Y, 150);
58425 dust.velocity =
DirectionTo(dust.position) * 0.1f + dust.velocity * 0.1f;
58426 }
58428 {
58429 Dust
dust2 = Dust.NewDustDirect(
vector3 -
new Vector2(5f), 10, 10, 55, player.velocity.
X, player.velocity.Y, 50);
58430 dust2.velocity =
DirectionTo(
dust2.position) * 0.1f + dust2.velocity * 0.1f;
58431 dust2.noGravity = true;
58432 dust2.color =
new Color(20, 255, 100, 160);
58433 }
58434 if (
ai[0] >= num - 8f &&
ai[0] < num - 2f)
58435 {
58436 for (
int i = 0;
i < 5;
i++)
58437 {
58438 Dust
dust3 = Dust.NewDustDirect(
vector3 -
new Vector2(5f), 10, 10, 55, player.velocity.
X, player.velocity.Y, 50);
58439 dust3.velocity *= 1.2f;
58440 dust3.noGravity = true;
58441 dust3.scale += 0.1f;
58442 dust3.color =
new Color(20, 255, 100, 160);
58443 }
58444 }
58445 if (
ai[0] == num - 3f &&
owner == Main.myPlayer)
58446 {
58448 {
58451 }
58452 else
58453 {
58455 }
58456 }
58457 }
58459 {
58460 Lighting.AddLight(player.Center, 0.75f, 0.9f, 1.15f);
58464 {
58467 {
58469 }
58470 }
58473 {
58475 }
58480 bool flag2 =
ai[0] == (float)(
int)(num / 2f);
58481 if (
ai[0] >= num || (
flag2 && !player.controlUseItem))
58482 {
58484 player.reuseDelay = 2;
58485 }
58487 {
58491 {
58492 player.ChangeDir(
num13);
58496 }
58497 }
58498 if ((
ai[0] ==
num12 || (
ai[0] == (
float)(
int)(num / 2f) &&
active)) &&
owner == Main.myPlayer)
58499 {
58502 }
58508 if (Main.rand.Next(2) == 0)
58509 {
58510 Dust
dust4 = Dust.NewDustDirect(
vector4 -
new Vector2(5f), 10, 10, 31, player.velocity.
X, player.velocity.Y, 150);
58511 dust4.velocity =
DirectionTo(
dust4.position) * 0.1f + dust4.velocity * 0.1f;
58512 }
58513 for (
int j = 0;
j < 4;
j++)
58514 {
58518 {
58519 case 1:
58521 break;
58522 case 2:
58525 break;
58526 case 3:
58529 break;
58530 }
58531 if (Main.rand.Next(6) != 0)
58532 {
58533 Dust
dust5 = Dust.NewDustDirect(
position, 0, 0, 226, 0f, 0f, 100);
58534 dust5.position = base.Center +
vector5 * (60f + Main.rand.NextFloat() * 20f) *
num16;
58536 dust5.noGravity = true;
58537 dust5.noLight = true;
58538 dust5.scale = 0.5f;
58539 dust5.customData = this;
58540 if (Main.rand.Next(4) == 0)
58541 {
58542 dust5.noGravity = false;
58543 }
58544 }
58545 }
58546 }
58552 player.heldProj =
whoAmI;
58553 player.SetDummyItemTime(2);
58555 }
static float WrapAngle(float angle)
static int Sign(decimal value)
static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
Vector2 DirectionTo(Vector2 Destination)
static readonly LegacySoundStyle DD2_MonkStaffGroundMiss
static readonly LegacySoundStyle DD2_MonkStaffGroundImpact
static Conditions.NotNull _cachedConditions_notNull
IEntitySource GetProjectileSource_FromThis()
static Conditions.IsSolid _cachedConditions_solid
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 GenSearch Chain(GenSearch search, params GenCondition[] conditions)
static bool Find(Point origin, GenSearch search, out Point result)