38029 {
38033 {
38034 Vector3 rgb = Main.hslToRgb(Main.GlobalTimeWrappedHourly * 0.33f % 1f, 1f, 0.5f).ToVector3() * 0.3f;
38035 rgb += Vector3.One * 0.1f;
38036 Lighting.AddLight(
base.Center,
rgb);
38038 bool flag = false;
38042 {
38043 flag = true;
38044 }
38046 {
38048 flag = true;
38049 }
38051 if (
ai[2] >= (
float)
num3)
38052 {
38054 if (Main.netMode != 1)
38055 {
38056 NetMessage.SendData(23, -1, -1,
null,
whoAmI);
38057 }
38058 return;
38059 }
38062 {
38064 for (
int i = 0;
i <
num5;
i++)
38065 {
38066 if (Main.rand.Next(5) == 0)
38067 {
38069 Color newColor = Main.hslToRgb(Main.GlobalTimeWrappedHourly * 0.3f % 1f, 1f, 0.5f) * 0.5f;
38071 Main.dust[
num7].position = base.Center + Main.rand.NextVector2Circular(
width,
height);
38072 Main.dust[
num7].velocity *= Main.rand.NextFloat() * 0.8f;
38074 Main.dust[
num7].noGravity =
true;
38075 Main.dust[
num7].fadeIn = 0.6f + Main.rand.NextFloat() * 0.7f *
num6;
38076 Main.dust[
num7].scale = 0.35f;
38078 {
38079 Dust dust = Dust.CloneDust(
num7);
38080 dust.scale /= 2f;
38081 dust.fadeIn *= 0.85f;
38082 dust.color =
new Color(255, 255, 255, 255) * 0.5f;
38083 }
38084 }
38085 }
38086 }
38088 }
38089 if (Main.netMode != 1)
38090 {
38091 if (
ai[2] == 0f &&
type != 661)
38092 {
38101 int num16 = Main.rand.Next(100);
38104 }
38106 {
38107 ai[3] = (float)Main.rand.Next(75, 111) * 0.01f;
38108 }
38111 {
38112 localAI[0] = Main.rand.Next(90, 240);
38116 {
38117 float num18 = (float)Main.rand.Next(50, 151) * 0.01f;
38119 {
38120 num18 = (float)Main.rand.Next(150, 201) * 0.01f;
38121 }
38122 else if (
num17 > 850f)
38123 {
38124 num18 = (float)Main.rand.Next(100, 151) * 0.01f;
38125 }
38127 int num20 = Main.rand.Next(-50, 51);
38129 {
38130 num20 -= Main.rand.Next(100, 251);
38131 }
38135 }
38136 else
38137 {
38139 float num22 = (float)Main.rand.Next(26, 301) * 0.01f;
38140 int num23 = Main.rand.Next(-100, 101);
38141 int num24 = Main.rand.Next(-100, 101);
38145 }
38147 }
38148 }
38151 velocity.X = (velocity.X * (float)(
num26 - 1) + num) / (
float)
num26;
38152 velocity.Y = (velocity.Y * (float)(
num26 - 1) +
num2) / (
float)
num26;
38154 {
38159 {
38160 if (Main.tile[
num28,
j] !=
null && ((Main.tile[
num28,
j].nactive() && Main.tileSolid[Main.tile[
num28,
j].type]) || Main.tile[
num28,
j].liquid > 0))
38161 {
38164 {
38165 velocity.Y *= 0.9f;
38166 }
38167 }
38168 }
38169 }
38171 {
38173 bool flag2 =
false;
38177 {
38178 if (Main.tile[
num31,
k] !=
null && Main.tile[
num31,
k].nactive() && Main.tileSolid[Main.tile[
num31,
k].type])
38179 {
38181 }
38182 }
38184 {
38187 {
38188 velocity.Y *= 0.9f;
38189 }
38190 }
38191 }
38193 {
38195 }
38196 else
38197 {
38200 {
38202 }
38205 for (
int l = 0;
l < 200;
l++)
38206 {
38208 if (
nPC.active &&
nPC.damage > 0 && !
nPC.friendly &&
nPC.Hitbox.Distance(
base.Center) <= 100f)
38209 {
38212 }
38213 }
38215 {
38220 {
38222 }
38223 }
38224 }
38226 {
38227 num = ((!(velocity.X < 0f)) ? (0f -
Math.
Abs(num)) :
Math.
Abs(num));
38228 velocity.X *= -0.2f;
38229 }
38231 {
38233 }
38235 {
38237 }
38241 {
38243 }
38245 {
38247 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.6f, 0.3f, 0.1f);
38248 if (Main.rand.Next(60) == 0)
38249 {
38251 Main.dust[
num34].velocity *= 0f;
38252 }
38254 }
38255 }
static float Lerp(float value1, float value2, float amount)
static float Clamp(float value, float min, float max)
static double Sqrt(double d)
static double Abs(double value)
Vector2 DirectionFrom(Vector2 Source)
void TargetClosest(bool faceTarget=true)
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)