59149 {
59150
59151
59152
59153
59154
59155 float num = 300f;
59158 {
59163 }
59166 {
59167 activeSound.Position =
base.Center;
59168 activeSound.Volume = 1f -
Math.
Max(
ai[0] - (num - 15f), 0f) / 15f;
59169 }
59170 else
59171 {
59175 }
59176 if (
localAI[0] >= 16f &&
ai[0] < num - 15f)
59177 {
59179 }
59182 {
59184 }
59189 vector2.X = vector2.Y * 0.2f;
59192 for (
int i = 0;
i < 1;
i++)
59193 {
59196 {
59198 {
59199 velocity.Y = 0f;
59200 }
59202 {
59203 velocity.Y -= 2f;
59204 }
59205 else
59206 {
59207 velocity.Y -= 4f;
59209 }
59211 {
59212 velocity.Y = -16f;
59213 }
59214 continue;
59215 }
59218 {
59220 }
59222 {
59223 velocity.Y = 0f;
59224 }
59226 {
59227 velocity.Y += 2f;
59228 }
59229 else
59230 {
59231 velocity.Y += 4f;
59232 }
59234 {
59235 velocity.Y = 16f;
59236 }
59237 }
59238 if (
ai[0] < num - 30f)
59239 {
59240 for (
int j = 0;
j < 1;
j++)
59241 {
59244 float amount = Main.rand.NextFloat();
59247 vector4.X *= -1f;
59250 Dust dust = Main.dust[Dust.NewDust(
vector6, 0, 0, 274)];
59252 dust.fadeIn = 1.3f;
59253 dust.scale = 0.87f;
59254 dust.alpha = 211;
59256 {
59257 dust.velocity.X = 1f + Main.rand.NextFloat();
59258 }
59259 dust.noGravity = true;
59260 dust.velocity.Y = Main.rand.NextFloat() * -0.5f - 1.3f;
59261 dust.velocity.X += velocity.X * 2.1f;
59262 dust.noLight = true;
59263 }
59264 }
59266 for (
int k = 0;
k < 4;
k++)
59267 {
59269 dust2.fadeIn = 1.1f;
59270 dust2.noGravity = true;
59271 }
59272 for (
int l = 0;
l < 1;
l++)
59273 {
59274 if (Main.rand.Next(5) == 0)
59275 {
59276 Gore gore = Gore.NewGoreDirect(
base.TopLeft + Main.rand.NextVector2Square(0f, 1f) *
base.Size,
new Vector2(
velocity.
X * 1.5f, (0f - Main.rand.NextFloat()) * 16f), Utils.SelectRandom<
int>(Main.rand, 1007, 1008, 1008));
59277 gore.timeLeft = 60;
59278 gore.alpha = 50;
59280 }
59281 }
59282 for (
int m = 0;
m < 1;
m++)
59283 {
59284 if (Main.rand.Next(7) == 0)
59285 {
59286 Gore
gore2 = Gore.NewGoreDirect(
base.TopLeft + Main.rand.NextVector2Square(0f, 1f) *
base.Size,
new Vector2(
velocity.
X * 1.5f, (0f - Main.rand.NextFloat()) * 16f), Utils.SelectRandom<
int>(Main.rand, 1007, 1008, 1008));
59287 gore2.timeLeft = 0;
59288 gore2.alpha = 80;
59289 }
59290 }
59291 for (
int n = 0;
n < 1;
n++)
59292 {
59293 if (Main.rand.Next(7) == 0)
59294 {
59295 Gore
gore3 = Gore.NewGoreDirect(
base.TopLeft + Main.rand.NextVector2Square(0f, 1f) *
base.Size,
new Vector2(
velocity.
X * 1.5f, (0f - Main.rand.NextFloat()) * 16f), Utils.SelectRandom<
int>(Main.rand, 1007, 1008, 1008));
59296 gore3.timeLeft = 0;
59297 gore3.alpha = 80;
59298 }
59299 }
59300 }
static float Lerp(float value1, float value2, float amount)
static byte Max(byte val1, byte val2)
static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
static ActiveSound GetActiveSound(SlotId id)
static readonly LegacySoundStyle DD2_BookStaffTwisterLoop
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
static readonly SlotId Invalid
static SlotId FromFloat(float value)