57423 {
57424 float num = 900f;
57435 {
57436 case 663:
57437 {
57438 Lighting.AddLight(
base.Center,
new Vector3(0.4f, 0.2f, 0.1f));
57439 Lighting.AddLight(
base.Bottom +
new Vector2(0f, -10f),
new Vector3(0.4f, 0.2f, 0.1f));
57441 if ((
localAI[0] += 1f) >= 300f)
57442 {
57444 }
57447 {
57449 }
57450 for (
int m = 0;
m < 1;
m++)
57451 {
57452 if (Main.rand.Next(2) == 0)
57453 {
57454 Dust
dust5 = Dust.NewDustDirect(
r3.TopLeft() +
new Vector2(-2f, -2f),
r3.Width + 4,
r3.Height + 4, 270, -
direction * 2, -2f, 200,
new Color(255, 255, 255, 0));
57455 dust5.fadeIn = 0.6f + Main.rand.NextFloat() * 0.6f;
57456 dust5.scale = 0.4f;
57457 dust5.noGravity = true;
57458 dust5.noLight = true;
57460 dust5.velocity.X = (float)(-
direction) * Main.rand.NextFloat() *
dust5.fadeIn;
57461 }
57462 }
57465 {
57467 }
57470 for (
int n = 0;
n < 1;
n++)
57471 {
57472 if (Main.rand.Next(5) == 0)
57473 {
57474 Dust
dust6 = Dust.NewDustDirect(
r3.TopLeft(),
r3.Width,
r3.Height, 6);
57475 dust6.fadeIn = 1f;
57476 dust6.scale = 1f;
57477 dust6.noGravity = true;
57478 dust6.noLight = true;
57479 dust6.velocity *= 2f;
57480 }
57481 }
57482 break;
57483 }
57484 case 665:
57485 {
57486 Lighting.AddLight(
base.Center,
new Vector3(0.4f, 0.2f, 0.1f) * 1.2f);
57487 Lighting.AddLight(
base.Bottom +
new Vector2(0f, -10f),
new Vector3(0.4f, 0.2f, 0.1f) * 1.2f);
57493 if ((
localAI[0] += 1f) >= 300f)
57494 {
57496 }
57499 {
57501 }
57502 for (
int k = 0;
k < 1;
k++)
57503 {
57504 if (Main.rand.Next(2) == 0)
57505 {
57506 Dust
dust3 = Dust.NewDustDirect(
r2.TopLeft() +
new Vector2(-2f, -2f),
r2.Width + 4,
r2.Height + 4, 270, -
direction * 2, -2f, 200,
new Color(255, 255, 255, 0));
57507 dust3.fadeIn = 0.6f + Main.rand.NextFloat() * 0.6f;
57508 dust3.scale = 0.4f;
57509 dust3.noGravity = true;
57510 dust3.noLight = true;
57512 dust3.velocity.X = (float)(-
direction) * Main.rand.NextFloat() *
dust3.fadeIn;
57513 }
57514 }
57517 {
57519 }
57522 for (
int l = 0;
l < 2;
l++)
57523 {
57524 if (Main.rand.Next(5) == 0)
57525 {
57526 Dust
dust4 = Dust.NewDustDirect(
r2.TopLeft(),
r2.Width,
r2.Height, 6);
57527 dust4.fadeIn = 1f;
57528 dust4.scale = 1f;
57529 dust4.noGravity = true;
57530 dust4.noLight = true;
57531 dust4.velocity *= 2f;
57532 }
57533 }
57534 break;
57535 }
57536 case 667:
57537 {
57538 Lighting.AddLight(
base.Center,
new Vector3(0.4f, 0.2f, 0.1f) * 1.5f);
57539 Lighting.AddLight(
base.Bottom +
new Vector2(0f, -10f),
new Vector3(0.4f, 0.2f, 0.1f) * 1.5f);
57545 if ((
localAI[0] += 1f) >= 300f)
57546 {
57548 }
57551 {
57553 }
57554 for (
int i = 0;
i < 1;
i++)
57555 {
57556 if (Main.rand.Next(2) == 0)
57557 {
57558 Dust dust = Dust.NewDustDirect(
r.TopLeft() +
new Vector2(-2f, -2f),
r.Width + 4,
r.Height + 4, 270, -
direction * 2, -2f, 200,
new Color(255, 255, 255, 0));
57559 dust.fadeIn = 0.6f + Main.rand.NextFloat() * 0.6f;
57560 dust.scale = 0.4f;
57561 dust.noGravity = true;
57562 dust.noLight = true;
57564 dust.velocity.X = (float)(-
direction) * Main.rand.NextFloat() * dust.fadeIn;
57565 }
57566 }
57569 {
57571 }
57574 for (
int j = 0;
j < 3;
j++)
57575 {
57576 if (Main.rand.Next(5) == 0)
57577 {
57578 Dust
dust2 = Dust.NewDustDirect(
r.TopLeft(),
r.Width,
r.Height, 6);
57579 dust2.fadeIn = 1.1f;
57580 dust2.scale = 1f;
57581 dust2.noGravity = true;
57582 dust2.noLight = true;
57583 dust2.velocity *= 2.4f;
57584 }
57585 }
57586 break;
57587 }
57588 }
57589 if (Main.player[
owner].setApprenticeT2)
57590 {
57592 num *= 1.5f;
57594 }
57596 {
57601 }
57603 {
57605 bool flag = false;
57607 {
57609 }
57610 else
57611 {
57612 flag = true;
57613 }
57614 if (flag &&
owner == Main.myPlayer)
57615 {
57618 {
57623 }
57624 }
57625 }
57626 else if (
ai[0] == 2f)
57627 {
57629 if (
ai[1] == (
float)
num3)
57630 {
57634 {
57636 }
57638 if (
owner == Main.myPlayer)
57639 {
57641 }
57642 }
57644 {
57647 }
57648 }
57651 velocity.Y += 0.2f;
57652 }
static int Sign(decimal value)
Vector2 DirectionTo(Vector2 Destination)
int AI_130_FlameBurstTower_FindTarget(float shot_range, float angleRatioMax, Vector2 shootingSpot, bool canChangeDirection=true)
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)