36608 {
36610 if (!player.active)
36611 {
36613 return;
36614 }
36615 bool flag =
type == 623;
36617 float num = 100f;
36622 if (flag)
36623 {
36624 if (player.dead)
36625 {
36626 player.stardustGuardian = false;
36627 }
36628 if (player.stardustGuardian)
36629 {
36631 }
36632 num = 150f;
36633 vector.X -= (5 + player.width / 2) * player.direction;
36634 vector.Y -= 25f;
36635 Lighting.AddLight(
base.Center, 0.9f, 0.9f, 0.7f);
36636 if (
ai[0] != 3f &&
alpha == 255)
36637 {
36639 for (
int i = 0;
i < 30;
i++)
36640 {
36642 Main.dust[
num5].noGravity =
true;
36643 Main.dust[
num5].velocity *= 3f;
36646 Main.dust[
num5].velocity *= 2f;
36647 Main.dust[
num5].noGravity =
true;
36648 Main.dust[
num5].fadeIn = 2.5f;
36650 }
36651 }
36652 }
36654 {
36656 Main.player[
owner].tankPetReset =
false;
36657 }
36659 {
36664 {
36667 {
36669 }
36670 }
36675 {
36677 }
36679 {
36681 }
36683 {
36690 float num10 = (nPC.Center.Y >
base.Bottom.Y).ToDirectionInt();
36692 {
36694 }
36695 else
36696 {
36697 velocity.X *= 0.7f;
36698 }
36700 {
36701 velocity.Y += 0.1f *
num10;
36702 }
36703 else
36704 {
36705 velocity.Y *= 0.7f;
36706 }
36708 {
36712 }
36713 }
36714 }
36715 else if (
ai[0] == 1f)
36716 {
36717 if (player.HasMinionRestTarget)
36718 {
36719 vector = player.MinionRestTargetPoint;
36720 }
36721 else
36722 {
36725 }
36730 {
36732 }
36734 {
36736 }
36738 {
36745 float num15 = (nPC2.Center.Y >
base.Bottom.Y).ToDirectionInt();
36747 {
36749 }
36750 else
36751 {
36752 velocity.X *= 0.7f;
36753 }
36755 {
36756 velocity.Y += 0.1f *
num15;
36757 }
36758 else
36759 {
36760 velocity.Y *= 0.7f;
36761 }
36763 {
36767 }
36768 }
36769 else
36770 {
36772 {
36775 }
36777 {
36779 velocity.X += 0.06f * (float)
direction;
36780 }
36781 else
36782 {
36783 velocity.X *= 0.8f;
36785 }
36787 {
36790 }
36792 {
36794 }
36795 else
36796 {
36797 velocity.Y *= 0.8f;
36798 }
36799 }
36801 {
36803 if (++
frame >= Main.projFrames[
type] - 4)
36804 {
36806 }
36807 }
36808 }
36809 else if (
ai[0] == 2f)
36810 {
36811 if (flag)
36812 {
36815 {
36817 }
36819 {
36821 }
36823 {
36826 {
36828 }
36829 }
36830 }
36831 bool flag5 =
false;
36833 {
36835 }
36838 if (Main.npc.IndexInRange(
num17))
36839 {
36842 {
36844 }
36845 }
36847 {
36852 {
36854 }
36855 }
36856 else
36857 {
36858 int num18 = (((nPC3.Center - player.Center).
X > 1f) ? 1 : (-1));
36866 {
36872 {
36875 }
36876 }
36877 }
36878 }
36879 else
36880 {
36883 }
36885 {
36886 return;
36887 }
36888 if (player.HasMinionRestTarget)
36889 {
36890 vector = player.MinionRestTargetPoint;
36891 }
36892 else
36893 {
36896 }
36898 {
36900 for (
int j = 0;
j < 30;
j++)
36901 {
36903 Main.dust[
num20].noGravity =
true;
36904 Main.dust[
num20].velocity *= 3f;
36907 Main.dust[
num20].velocity *= 2f;
36908 Main.dust[
num20].noGravity =
true;
36909 Main.dust[
num20].fadeIn = 2.5f;
36911 }
36912 }
36913 else
36914 {
36915 for (
int k = 0;
k < 2;
k++)
36916 {
36918 Main.dust[
num21].noGravity =
true;
36919 Main.dust[
num21].velocity *= 3f;
36920 Main.dust[
num21].noLight =
true;
36923 Main.dust[
num21].velocity *= 2f;
36924 Main.dust[
num21].noGravity =
true;
36925 Main.dust[
num21].fadeIn = 2.5f;
36926 Main.dust[
num21].noLight =
true;
36928 }
36929 }
36933 {
36936 }
36937 }
static double Abs(double value)
static int Sign(decimal value)
float Distance(Vector2 Other)
static ArmorShaderDataSet Armor
void AI_120_StardustGuardian_FindTarget(float lookupRange, ref int targetNPCIndex, ref float distanceToClosestTarget)
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)