27317 {
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27481 {
27483 {
27486 {
27489 }
27492 {
27494 }
27495 for (
int i = 0; i <
num; i++)
27496 {
27497 int type = 6;
27499 {
27501 }
27502 float scale = 1.75f;
27503 int alpha = 100;
27504 float x = position.X + (float)(
width / 2) + 16
f;
27506 {
27507 x = position.X + (float)(
width / 2) - 26
f;
27508 }
27510 if (i == 1 || i == 3)
27511 {
27512 x = position.X + (float)(
width / 2) + 8
f;
27514 {
27515 x = position.X + (float)(
width / 2) - 20
f;
27516 }
27518 }
27519 if (i > 1)
27520 {
27522 }
27523 int num23 = Dust.NewDust(
new Vector2(x,
num12), 8, 8, type, 0
f, 0
f, alpha,
default(Color), scale);
27524 Main.dust[
num23].velocity.X *= 0.1f;
27525 Main.dust[
num23].velocity.Y = Main.dust[
num23].velocity.Y * 1
f + 2
f *
gravDir - velocity.Y * 0.3f;
27526 Main.dust[
num23].noGravity =
true;
27527 Main.dust[
num23].noLightEmittence =
flag;
27530 {
27531 Main.dust[
num23].velocity.Y += 6
f;
27532 }
27533 }
27536 {
27540 {
27542 }
27543 }
27544 }
27546 {
27548 }
27549 return;
27550 }
27552 {
27554 {
27555 Lighting.AddLight(
base.Bottom, 0.3f, 0.1f, 0.4f);
27556 }
27557 return;
27558 }
27560 {
27562 {
27565 }
27567 {
27569 {
27571 {
27575 {
27577 return;
27578 }
27580 {
27582 return;
27583 }
27585 {
27587 return;
27588 }
27590 {
27592 return;
27593 }
27596 }
27597 else
27598 {
27602 {
27604 return;
27605 }
27607 {
27609 return;
27610 }
27612 {
27614 return;
27615 }
27618 }
27619 }
27620 else
27621 {
27625 {
27627 return;
27628 }
27630 {
27632 return;
27633 }
27635 {
27637 return;
27638 }
27640 {
27642 return;
27643 }
27646 }
27647 }
27648 else
27649 {
27653 {
27655 return;
27656 }
27658 {
27660 return;
27661 }
27663 {
27665 return;
27666 }
27669 }
27670 return;
27671 }
27673 {
27675 {
27679 {
27681 return;
27682 }
27684 {
27686 return;
27687 }
27689 {
27691 return;
27692 }
27694 {
27696 return;
27697 }
27700 }
27702 {
27704 }
27705 else
27706 {
27708 }
27709 return;
27710 }
27712 {
27714 {
27718 {
27720 return;
27721 }
27723 {
27725 return;
27726 }
27728 {
27730 return;
27731 }
27734 {
27736 }
27737 }
27739 {
27741 {
27745 {
27747 return;
27748 }
27750 {
27752 return;
27753 }
27755 {
27757 return;
27758 }
27761 {
27763 }
27764 }
27766 {
27768 }
27769 else
27770 {
27772 }
27773 }
27774 else
27775 {
27777 }
27778 return;
27779 }
27781 {
27782 bool flag2 =
false;
27784 {
27788 {
27790 }
27793 }
27795 {
27797 {
27801 {
27803 }
27806 }
27808 {
27810 }
27811 else
27812 {
27814 }
27815 }
27816 else
27817 {
27819 }
27821 {
27822 return;
27823 }
27824 for (
int j = 0;
j < 4;
j++)
27825 {
27826 if (Main.rand.Next(4) == 0)
27827 {
27828 Vector2
vector = (-0.74539816f + (float)
Math.PI / 8
f * (
float)
j + 0.03f * (float)
j).ToRotationVector2() *
new Vector2((
float)(-
direction * 20), 20
f);
27829 Dust dust = Main.dust[Dust.NewDust(
base.Center, 0, 0, 229, 0
f, 0
f, 100, Color.White, 0.8f)];
27830 dust.noGravity = true;
27831 dust.noLightEmittence =
flag;
27832 dust.position = base.Center +
vector;
27834 if (Main.rand.Next(10) != 0)
27835 {
27836 dust.customData = this;
27837 }
27838 else
27839 {
27840 dust.fadeIn = 0.5f;
27841 }
27843 }
27844 }
27845 for (
int k = 0;
k < 4;
k++)
27846 {
27847 if (Main.rand.Next(8) == 0)
27848 {
27849 Vector2
vector2 = (-0.7053982f + (float)
Math.PI / 8
f * (
float)
k + 0.03f * (float)
k).ToRotationVector2() *
new Vector2((
float)(
direction * 20), 24
f) +
new Vector2((
float)(-
direction) * 16
f, 0
f);
27850 Dust
dust2 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 229, 0
f, 0
f, 100, Color.White, 0.5f)];
27851 dust2.noGravity = true;
27852 dust2.noLightEmittence =
flag;
27853 dust2.position = base.Center +
vector2;
27854 dust2.velocity = Vector2.Normalize(
dust2.position -
base.Center -
new Vector2((
float)(-
direction) * 16
f, 0
f)) * 2
f;
27855 dust2.position += dust2.velocity * 5
f;
27856 if (Main.rand.Next(10) != 0)
27857 {
27858 dust2.customData = this;
27859 }
27860 else
27861 {
27862 dust2.fadeIn = 0.5f;
27863 }
27865 }
27866 }
27867 return;
27868 }
27870 {
27872 {
27876 {
27878 }
27880 }
27882 {
27884 {
27888 {
27890 }
27892 }
27893 else
27894 {
27898 {
27900 }
27902 }
27903 }
27904 else
27905 {
27909 {
27911 }
27913 }
27914 return;
27915 }
27917 {
27919 {
27922 {
27925 }
27926 }
27928 {
27931 }
27932 else
27933 {
27937 {
27939 }
27941 {
27943 }
27945 }
27946 if (Main.netMode != 2 && Main.rand.Next(8) == 0)
27947 {
27948 Rectangle
r = Utils.CenteredRectangle(Main.ReverseGravitySupport(
base.Bottom - Main.screenPosition) + Main.screenPosition,
new Vector2(40
f, 24
f));
27949 Dust
dust4 = Dust.NewDustDirect(
r.TopLeft(),
r.Width,
r.Height, 43, 0
f, 0
f, 0, Color.White * 0.5f, 0.2f);
27950 dust4.fadeIn = 0.4f;
27952 dust4.velocity *= 0.35f;
27954 }
27955 return;
27956 }
27958 {
27961 {
27964 {
27966 }
27968 }
27970 {
27972 {
27974 }
27976 {
27978 }
27979 else
27980 {
27982 }
27983 }
27984 else
27985 {
27988 {
27990 }
27992 }
27993 return;
27994 }
27996 {
27998 {
28002 {
28004 }
28006 }
28008 {
28010 {
28014 {
28016 }
28018 }
28019 else
28020 {
28024 {
28026 }
28028 }
28029 }
28030 else
28031 {
28035 {
28037 }
28039 }
28042 {
28044 }
28046 {
28048 }
28051 {
28052 Dust
dust5 = Dust.NewDustDirect(
r2.TopLeft(),
r2.Width,
r2.Height, 31, 0
f, 0
f, 0, Color.Black);
28053 dust5.scale = 0.7f;
28054 dust5.velocity *= 0.4f;
28055 dust5.velocity.Y +=
gravDir * 0.5f;
28057 }
28058 return;
28059 }
28061 {
28062 bool flag3 =
false;
28064 {
28066 }
28068 {
28070 }
28072 {
28073 return;
28074 }
28078 for (
int m = 0;
m < 2;
m++)
28079 {
28081 dust3.noGravity = true;
28084 dust3.noLight = true;
28085 dust3.noLightEmittence =
flag;
28088 {
28089 case 0:
28091 dust3.velocity.X = dust3.velocity.X * 1
f - 2
f - velocity.X * 0.3f;
28092 dust3.velocity.Y = dust3.velocity.Y * 1
f + 2
f *
gravDir - velocity.Y * 0.3f;
28093 break;
28094 case 1:
28096 dust3.velocity.X = dust3.velocity.X * 1
f + 2
f - velocity.X * 0.3f;
28097 dust3.velocity.Y = dust3.velocity.Y * 1
f + 2
f *
gravDir - velocity.Y * 0.3f;
28098 break;
28099 }
28100 if (
dust3.dustIndex != 6000)
28101 {
28103 dust6.scale *= 0.65f;
28104 dust6.fadeIn *= 0.65f;
28105 dust6.color = new Color(255, 255, 255, 255);
28106 dust3.noLight = true;
28107 dust3.noLightEmittence =
flag;
28109 }
28110 }
28111 return;
28112 }
28114 {
28115 bool flag4 =
false;
28117 {
28120 {
28122 }
28125 {
28127 }
28129 }
28131 {
28133 {
28136 {
28138 }
28141 {
28143 }
28145 }
28146 else
28147 {
28149 }
28150 }
28151 else
28152 {
28154 }
28156 {
28157 return;
28158 }
28159 Vector2
vector3 =
default(Vector2);
28164 for (
int n = 0;
n < 3;
n++)
28165 {
28166 Vector2
vector4 = Vector2.Zero;
28168 {
28169 case 1:
28171 break;
28172 case 2:
28174 break;
28175 }
28178 dust7.noGravity = true;
28179 dust7.noLight = true;
28180 dust7.noLightEmittence =
flag;
28181 dust7.scale = 0.47f;
28185 dust8.noGravity = true;
28186 dust8.noLight = true;
28187 dust8.noLightEmittence =
flag;
28188 dust8.scale = 0.35f;
28192 dust9.noGravity = true;
28193 dust9.noLight = true;
28194 dust9.noLightEmittence =
flag;
28195 dust9.scale = 0.49f;
28197 }
28198 return;
28199 }
28204 {
28208 }
28210 {
28211 return;
28212 }
28214 {
28216 }
28218 {
28221 {
28225 {
28227 }
28228 }
28229 }
28231 {
28234 {
28236 }
28238 {
28241 {
28243 }
28244 }
28245 if (
wings == 29 && Main.rand.Next(5) == 0)
28246 {
28249 {
28251 }
28253 Main.dust[
num25].noGravity =
true;
28254 Main.dust[
num25].noLightEmittence =
flag;
28256 obj.velocity *= 0.3f;
28257 if (Main.rand.Next(10) == 0)
28258 {
28259 Main.dust[
num25].fadeIn = 2
f;
28260 }
28262 }
28263 }
28264 else
28265 {
28267 }
28268 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
Vector2 DirectionTo(Vector2 Destination)
int height
The height of this Entity's hitbox, in pixels.
static ArmorShaderDataSet Armor
static readonly SoundStyle Item24
static readonly SoundStyle Item13
bool ShouldDrawWingsThatAreAlwaysAnimated()