54096 {
54097
54098
54099
54100
54101
54102
54103
54104
54105
54106
54107
54110 int num = -1;
54115 float num6 = 0.45f;
54120 float num11 = 600f;
54125 float num16 = 1500f;
54128 float amount = 1f / 30f;
54137 float num27 = 0.1f;
54145 {
54146 if ((
ai[1] += 1f) >=
num5)
54147 {
54152 }
54153 }
54154 else if (
ai[0] == 1f)
54155 {
54157 {
54158 ai[2] = ((base.Center.X <
targetData.Center.X) ? 1 : (-1));
54159 }
54165 if ((
ai[1] += 1f) >=
num8)
54166 {
54168 if (
ai[3] == 5f && Main.rand.Next(3) == 0)
54169 {
54171 }
54172 switch ((
int)
ai[3])
54173 {
54174 case 0:
54175 case 1:
54176 case 3:
54178 break;
54179 case 2:
54181 break;
54182 case 4:
54184 break;
54185 case 5:
54187 break;
54188 case 6:
54190 break;
54191 case 7:
54193 break;
54194 }
54201 {
54203 }
54205 {
54206 case 2:
54207 {
54212 {
54214 }
54216 break;
54217 }
54218 case 3:
54219 {
54223 break;
54224 }
54225 case 5:
54226 {
54231 {
54233 }
54235 break;
54236 }
54237 }
54238 }
54239 }
54240 else if (
ai[0] == 2f)
54241 {
54243 {
54245 }
54246 if ((
ai[1] += 1f) >=
num9)
54247 {
54251 }
54252 }
54253 else if (
ai[0] == 3f)
54254 {
54257 {
54258 activeSound.Position =
base.Center;
54259 }
54264 {
54268 {
54270 }
54271 else
54272 {
54274 }
54276 {
54278 }
54280 }
54282 {
54283 int num34 = ((targetData.Center.X >
base.Center.X) ? 1 : (-1));
54286 if (Main.netMode != 1)
54287 {
54289 }
54293 }
54295 {
54298 {
54300 }
54301 }
54303 {
54307 }
54308 }
54309 else if (
ai[0] == 4f)
54310 {
54314 {
54321 {
54323 }
54325 }
54327 {
54329 v.Y *= 0.25f;
54334 {
54336 }
54338 }
54339 else
54340 {
54344 {
54346 }
54351 {
54353 }
54354 }
54356 {
54357 velocity.Y -= 0.1f;
54358 }
54361 {
54365 }
54366 }
54367 else if (
ai[0] == 5f)
54368 {
54370 position.Y -=
num27;
54375 {
54377 }
54379 {
54384 }
54385 }
54386 else if (
ai[0] == 6f)
54387 {
54389 {
54397 {
54400 }
54401 }
54402 else
54403 {
54405 {
54407 }
54409 {
54411 }
54412 else
54413 {
54415 }
54417 {
54419 {
54420 velocity.Y /= 3f;
54421 }
54422 velocity.Y -= 3f;
54423 }
54425 if (
ai[1] == 20f ||
ai[1] == 25f ||
ai[1] == 30f)
54426 {
54427 Point point =
base.Center.ToTileCoordinates();
54432 {
54433 bool flag = false;
54435 {
54439 {
54442 {
54444 obj.velocity.Y -= 3f + (float)
num42 * 1.5f;
54445 obj.velocity.Y *= Main.rand.NextFloat();
54446 obj.scale += (float)
num42 * 0.03f;
54447 }
54448 for (
int l = 0;
l <
num43 - 1;
l++)
54449 {
54451 obj2.velocity.Y -= 1f + (float)
num42;
54452 obj2.velocity.Y *= Main.rand.NextFloat();
54453 }
54454 if (
num43 > 0 && Main.rand.Next(3) != 0)
54455 {
54458 gore.velocity.Y -= 0.1f + (float)
num42 * 0.5f +
num44 * (
float)
num42 * 1f;
54459 gore.velocity.Y *= Main.rand.NextFloat();
54460 gore.position =
new Vector2(i * 16 + 20,
j * 16 + 20);
54461 }
54462 }
54464 }
54465 }
54466 }
54467 bool flag3 =
ai[1] == 20f ||
ai[1] == 45f ||
ai[1] == 70f;
54469 {
54471 }
54472 if (
flag3 && Main.netMode != 1)
54473 {
54474 for (
int m = 0;
m < 1;
m++)
54475 {
54476 Vector2 vector8 = base.Center + ((float)
Math.
PI * 2f * Main.rand.NextFloat()).ToRotationVector2() *
new Vector2(2f, 1f) * 300f * (0.6f + Main.rand.NextFloat() * 0.4f);
54478 {
54482 }
54483 }
54485 for (
int n = 0;
n < 200;
n++)
54486 {
54488 if (
nPC.active &&
nPC.type == 549)
54489 {
54491 }
54492 }
54493 if (
list.Count > 0)
54494 {
54496 {
54501 }
54502 }
54503 }
54505 }
54507 {
54511 }
54512 }
54515 {
54517 }
54518 if (num != -1)
54519 {
54521 }
54522 if ((
localAI[1] += 1f) >= 60f)
54523 {
54525 }
54527 float num47 = 0.04f;
54528 switch ((
int)
ai[0])
54529 {
54530 case 2:
54531 case 5:
54533 break;
54534 case 3:
54538 {
54540 }
54542 {
54545 }
54546 break;
54547 case 4:
54551 {
54553 }
54554 break;
54555 case 6:
54559 {
54561 }
54562 break;
54563 }
54565 {
54567 }
54569 {
54571 }
54573 {
54577 }
54578 }
void Add(TKey key, TValue value)
static double Abs(double value)
static int Sign(decimal value)
static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
static ActiveSound GetActiveSound(SlotId id)
float Distance(Vector2 Other)
Vector2 DirectionTo(Vector2 Destination)
static readonly LegacySoundStyle DD2_BetsyScream
static readonly LegacySoundStyle DD2_BetsyFlameBreath
static readonly LegacySoundStyle DD2_BetsyFlyingCircleAttack
static readonly LegacySoundStyle DD2_BetsyWindAttack
static readonly LegacySoundStyle DD2_BetsySummon
static int CountNPCS(int Type)
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)
IEntitySource GetSpawnSourceForNPCFromNPCAI()
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
IEntitySource GetSpawnSource_ForProjectile()
void SimpleFlyMovement(Vector2 desiredVelocity, float moveSpeed)
static void TargetClosestBetsy(NPC searcher, bool faceTarget=true, Vector2? checkPosition=null)
static float Distance(Vector2 value1, Vector2 value2)
static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)
static readonly SlotId Invalid
static SlotId FromFloat(float value)