46943 {
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100
47101
47102
47103
47104
47105
47106
47107
47108
47109
47110
47111
47112
47113
47114
47115
47116
47117
47118
47119
47120
47121
47122
47123
47124
47125
47126
47127
47128
47129
47130
47131
47132
47133
47134
47135
47136
47137
47138
47139
47140
47141
47142
47143
47144
47145
47146
47147
47148
47149
47150
47151
47152
47153
47154
47155
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182
47183
47184
47185
47186
47187
47188
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279
47280
47281
47282
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509 Vector2
vector =
default(Vector2);
47511 Vector2
vector10 =
default(Vector2);
47513 Vector2
vector21 =
default(Vector2);
47515 Vector2
vector29 =
default(Vector2);
47517 Vector2
vector30 =
default(Vector2);
47530 bool flag5 = Main.expertMode;
47534 {
47536 }
47544 {
47555 }
47562 {
47569 }
47574 {
47576 }
47578 {
47580 }
47581 Vector2
val =
default(Vector2);
47582 switch ((
int)this.
ai[0])
47583 {
47584 case 0:
47585 if (this.
ai[1] == 0
f)
47586 {
47588 if (Main.netMode != 1)
47589 {
47591 }
47592 }
47593 if (this.
ai[1] == 10
f)
47594 {
47596 }
47598 if (this.
ai[1] > 10
f && this.
ai[1] < 150
f)
47599 {
47602 {
47606 Main.dust[
num66].position = base.Center + Main.rand.NextVector2Circular((
float)
width * 3
f, (
float)
height * 3
f) +
new Vector2(0
f, -150
f);
47608 obj3.velocity *= Main.rand.NextFloat() * 0.8f;
47609 Main.dust[
num66].noGravity =
true;
47610 Main.dust[
num66].fadeIn = 0.6f + Main.rand.NextFloat() * 0.7f *
num65;
47612 obj4.velocity += Vector2.UnitY * 3
f;
47613 Main.dust[
num66].scale = 0.35f;
47615 {
47618 dust2.fadeIn *= 0.85f;
47619 dust2.color = new Color(255, 255, 255, 255);
47620 }
47621 }
47622 }
47627 if (this.
ai[1] >= 180f)
47628 {
47630 {
47632 }
47637 }
47638 break;
47639 case 1:
47640 {
47642 if (Main.getGoodWorld)
47643 {
47645 }
47646 if (this.
ai[1] <= 10f)
47647 {
47648 if (this.
ai[1] == 0f)
47649 {
47651 }
47654 {
47660 break;
47661 }
47665 }
47666 if (((Vector2)(
ref velocity)).Length() > 16
f && this.
ai[1] > 10f)
47667 {
47669 }
47672 if (!(this.
ai[1] >= num28))
47673 {
47674 break;
47675 }
47680 {
47692 {
47694 }
47696 {
47698 }
47700 {
47702 }
47704 {
47706 }
47708 {
47710 }
47712 {
47714 }
47716 {
47718 }
47720 {
47722 }
47724 {
47726 }
47728 {
47730 }
47732 {
47734 }
47735 }
47737 {
47743 {
47745 }
47753 {
47755 }
47757 {
47759 }
47761 {
47763 }
47765 {
47767 }
47769 {
47771 }
47773 {
47775 }
47777 {
47779 }
47781 {
47783 }
47785 {
47787 }
47789 {
47791 }
47793 {
47795 }
47796 }
47799 bool flag4 =
false;
47801 {
47802 if (!Main.dayTime)
47803 {
47805 }
47806 if (Main.dayTime && Main.time >= 53400.0)
47807 {
47809 }
47810 }
47812 {
47814 }
47816 {
47818 }
47820 {
47822 double radians2 = (float)
Math.PI / 2
f * (
float)(targetData7.Center.X >
base.Center.X).ToDirectionInt();
47823 val =
default(Vector2);
47825 }
47826 this.
ai[0] = num30;
47830 break;
47831 }
47832 case 2:
47833 {
47834 if (this.
ai[1] == 0f)
47835 {
47837 }
47839 Vector2
vector26 =
default(Vector2);
47844 {
47846 }
47847 if (this.
ai[1] < 60f)
47848 {
47850 }
47853 {
47855 }
47856 if ((
int)this.
ai[1] % num90 == 0 && this.
ai[1] < 60f)
47857 {
47858 float ai3 = this.
ai[1] / 60f;
47860 double radians5 = (float)
Math.PI / 2
f * Main.rand.NextFloatDirection();
47861 val =
default(Vector2);
47864 {
47866 double radians6 = (float)
Math.PI * 2
f * Main.rand.NextFloat();
47867 val =
default(Vector2);
47869 }
47870 if (Main.netMode != 1)
47871 {
47873 }
47874 if (Main.netMode != 1)
47875 {
47876 int num91 = (int)(this.
ai[1] / (
float)num90);
47878 {
47880 {
47882 }
47883 }
47884 }
47885 }
47887 if (this.
ai[1] >= 60f +
num89)
47888 {
47892 }
47893 break;
47894 }
47895 case 3:
47896 {
47901 {
47903 }
47904 if ((
int)this.
ai[1] % 180 == 0)
47905 {
47906 Vector2
vector15 =
default(Vector2);
47909 }
47910 if (this.
ai[1] >= 120f)
47911 {
47915 }
47916 break;
47917 }
47918 case 4:
47919 {
47921 new Vector2(0
f, -100
f);
47922 if (this.
ai[1] == 0f)
47923 {
47925 }
47926 if (this.
ai[1] >= 6f && this.
ai[1] < 54f)
47927 {
47930 }
47934 {
47936 }
47939 {
47941 }
47942 if ((
int)this.
ai[1] % 4 == 0 && this.
ai[1] < 100f)
47943 {
47946 {
47947 int num83 = (int)this.
ai[1] / 4;
47948 Vector2
unitX = Vector2.UnitX;
47950 val =
default(Vector2);
47953 {
47954 vector22.X += ((vector22.X > 0
f) ? 0.5
f : (-0.5
f));
47955 }
47959 {
47961 }
47964 {
47965 continue;
47966 }
47968 {
47970 }
47975 {
47978 {
47980 }
47982 }
47984 if (Main.netMode != 1)
47985 {
47987 }
47988 if (Main.netMode == 1)
47989 {
47990 continue;
47991 }
47992 int num86 = (int)(this.
ai[1] / 4f);
47994 {
47996 {
47997 continue;
47998 }
48001 if (Vector2.Dot(
player2.velocity.SafeNormalize(Vector2.UnitY),
vector22) > 0
f)
48002 {
48004 }
48008 {
48011 {
48013 }
48015 }
48018 }
48019 }
48020 }
48022 if (this.
ai[1] >= 100f +
num80)
48023 {
48027 }
48028 break;
48029 }
48030 case 5:
48031 {
48032 if (this.
ai[1] == 0f)
48033 {
48035 }
48038 Vector2
vector9 =
default(Vector2);
48041 if (this.
ai[1] < 42f)
48042 {
48044 }
48048 {
48050 }
48051 if ((
int)this.
ai[1] % 42 == 0 && this.
ai[1] < 42f)
48052 {
48053 float num61 = (float)
Math.PI * 2
f * Main.rand.NextFloat();
48055 {
48057 Vector2
unitY = Vector2.UnitY;
48059 val =
default(Vector2);
48061 if (Main.netMode != 1)
48062 {
48064 val =
default(Vector2);
48066 }
48067 }
48068 }
48070 if (this.
ai[1] >= 42f +
num60)
48071 {
48075 }
48076 break;
48077 }
48078 case 6:
48079 {
48081 Vector2
vector33 =
default(Vector2);
48087 {
48089 }
48090 if ((
int)this.
ai[1] % 60 == 0 && this.
ai[1] < 180f)
48091 {
48092 int num19 = (int)this.
ai[1] / 60;
48093 int num20 = ((targetData4.Center.X >
base.Center.X) ? 1 : 0);
48096 {
48098 }
48101 {
48104 if (Main.netMode != 1)
48105 {
48107 }
48108 }
48109 }
48111 if (this.ai[1] >= 180
f +
num18)
48112 {
48116 }
48117 break;
48118 }
48119 case 7:
48120 {
48125 {
48129 }
48134 {
48136 }
48137 if ((
float)(
int)this.ai[1] %
num69 == 0
f && this.ai[1] <
num70)
48138 {
48140 Main.rand.NextFloat();
48147 {
48150 float num75 = 0.4f;
48151 float num76 = 1.4f;
48154 {
48159 }
48161 {
48162 case 0:
48166 break;
48167 case 1:
48171 break;
48172 case 2:
48176 break;
48177 case 3:
48181 break;
48182 case 4:
48186 break;
48187 case 5:
48191 break;
48192 }
48194 {
48198 {
48202 }
48204 if (Main.netMode != 1)
48205 {
48207 }
48208 }
48209 }
48210 }
48213 {
48217 }
48218 break;
48219 }
48220 case 8:
48221 case 9:
48222 {
48224 Vector2
vector3 =
default(Vector2);
48227 flag9 = !(this.ai[1] >= 6
f) || !(this.ai[1] <= 40
f);
48228 int num27 = ((this.ai[0] != 8
f) ? 1 : (-1));
48230 if (this.ai[1] <= 40
f)
48231 {
48232 if (this.ai[1] == 20
f)
48233 {
48235 }
48239 if (this.ai[1] == 40
f)
48240 {
48242 }
48243 }
48244 else if (this.ai[1] <= 90
f)
48245 {
48248 if (this.ai[1] == 90
f)
48249 {
48251 }
48253 }
48254 else
48255 {
48257 }
48259 if (this.ai[1] >= 90
f +
num26)
48260 {
48264 }
48265 break;
48266 }
48267 case 10:
48268 {
48270 if (this.ai[1] == 0
f)
48271 {
48273 }
48274 flag9 = !(this.ai[1] >= 30
f) || !(this.ai[1] <= 170
f);
48276 if (this.ai[1] == 90
f)
48277 {
48278 if (this.ai[3] == 0
f)
48279 {
48281 }
48282 if (this.ai[3] == 2
f)
48283 {
48285 }
48288 }
48290 if (this.ai[1] >= 180
f +
num93)
48291 {
48296 }
48297 break;
48298 }
48299 case 11:
48300 {
48301 if (this.ai[1] == 0
f)
48302 {
48304 }
48306 new Vector2(0
f, -100
f);
48307 if (this.ai[1] >= 6
f && this.ai[1] < 54
f)
48308 {
48311 }
48315 {
48317 }
48318 if ((
int)this.ai[1] % 3 == 0 && this.ai[1] < 100
f)
48319 {
48322 {
48324 vector5.SafeNormalize(-Vector2.UnitY);
48328 {
48329 continue;
48330 }
48335 {
48338 {
48340 }
48342 }
48344 if (Main.netMode != 1)
48345 {
48347 }
48348 if (Main.netMode == 1)
48349 {
48350 continue;
48351 }
48352 int num59 = (int)(this.ai[1] / 3
f);
48353 for (
int l = 0;
l < 255;
l++)
48354 {
48356 {
48357 continue;
48358 }
48359 Player player = Main.player[
l];
48361 vector5.SafeNormalize(-Vector2.UnitY);
48368 {
48371 {
48373 }
48375 }
48378 }
48379 }
48380 }
48382 if (this.ai[1] >= 100
f +
num54)
48383 {
48387 }
48388 break;
48389 }
48390 case 12:
48391 {
48393 Vector2
vector31 =
default(Vector2);
48395 if (this.ai[1] == 0
f)
48396 {
48399 }
48401 bool flag3 = this.ai[1] < 60
f && this.ai[1] >= 10
f;
48403 {
48405 }
48408 {
48410 }
48411 float num16 = (this.ai[1] - 10
f) / 50
f;
48413 {
48414 _ = this.ai[1] / 60
f;
48417 val =
default(Vector2);
48419 if (Main.netMode != 1)
48420 {
48422 }
48423 if (Main.netMode != 1)
48424 {
48425 int num17 = (int)(this.ai[1] % (
float)
num15);
48426 for (
int j = 0;
j < 255;
j++)
48427 {
48429 {
48431 }
48432 }
48433 }
48434 }
48436 if (this.ai[1] >= 60
f +
num14)
48437 {
48441 }
48442 break;
48443 }
48444 case 13:
48445 {
48446 new Vector2(-55
f, -30
f);
48447 if (this.ai[1] == 0
f)
48448 {
48451 }
48459 {
48461 {
48462 if (!Main.dayTime)
48463 {
48465 }
48466 if (Main.dayTime && Main.time >= 53400.0)
48467 {
48469 }
48470 }
48472 }
48474 {
48477 }
48481 for (
int i = 0; i <
num10; i++)
48482 {
48484 Color
newColor = Main.hslToRgb(Main.rand.NextFloat(), 1
f, 0.5f);
48486 Main.dust[
num13].position = base.Center + Main.rand.NextVector2Circular(
width,
height);
48488 obj.velocity *= Main.rand.NextFloat() * 0.8f;
48489 Main.dust[
num13].noGravity =
true;
48490 Main.dust[
num13].scale = 0.9f + Main.rand.NextFloat() * 1.2f;
48491 Main.dust[
num13].fadeIn = 0.4f + Main.rand.NextFloat() * 1.2f *
num11;
48493 obj2.velocity += Vector2.UnitY * -2
f;
48494 Main.dust[
num13].scale = 0.35f;
48496 {
48497 Dust dust = Dust.CloneDust(
num13);
48499 dust.fadeIn *= 0.85f;
48500 dust.color = new Color(255, 255, 255, 255);
48501 }
48502 }
48504 if (!(this.ai[1] >= 20
f &&
flag2))
48505 {
48506 break;
48507 }
48509 {
48511 if (Main.netMode != 1)
48512 {
48513 NetMessage.SendData(23, -1, -1,
null,
whoAmI);
48514 }
48515 return;
48516 }
48520 break;
48521 }
48522 }
48526 {
48528 }
48530 {
48532 }
48533 else
48534 {
48536 }
48538 {
48540 }
48542 {
48544 }
48545 Lighting.AddLight(
base.Center, Vector3.One *
Opacity);
48546 }
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 ...
Vector2 DirectionFrom(Vector2 Source)
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
float Distance(Vector2 Other)
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)
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle Item162
static readonly SoundStyle Item160
static readonly SoundStyle Item165
static readonly SoundStyle Item161
static readonly SoundStyle Item164
static readonly SoundStyle Item163
int defense
How resistant to damage this NPC is. The List of NPCs wiki pagecan be useful for finding appropriat...
int damage
The amount of contact damage this NPC deals. Changing this WILL NOT change the amount of damage done...
float[] localAI
Acts like F:Terraria.NPC.ai, but does not sync to the server. Many vanilla T:Terraria....
void AI_120_HallowBoss_DashTo(Vector2 targetPosition)
bool Boss_CanShootExtraAt(int playerIndex, int rotationIndexToAttack, int rotationSize, float attackScanDistance, bool alwaysSkipMainTarget=true)
int lifeMax
The maximum life of this NPC.
void TargetClosest(bool faceTarget=true)
bool AI_120_HallowBoss_IsGenuinelyEnraged()
static bool ShouldEmpressBeEnraged()
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)
int defDefense
Stores the value of F:Terraria.NPC.defense at the end of SetDefaults. Useful for scaling defense in A...
float[] ai
An array with 4 slots used for any sort of data storage, which is occasionally synced from the server...
int alpha
0 is opaque, and 255 is transparent. Note that this is the opposite of how alpha is typically express...
void AI_120_HallowBoss_DoMagicEffect(Vector2 spot, int effectType, float progress)
int defDamage
Stores the value of F:Terraria.NPC.damage at the end of SetDefaults. Useful for scaling damage in AI ...
int GetAttackDamage_ScaledByStrength(float normalDamage)
int GetAttackDamage_ForProjectiles(float normalDamage, float expertDamage)
bool AI_120_HallowBoss_IsInPhase2()
int life
The current life of the NPC. Automatically set to the value of F:Terraria.NPC.lifeMax at the end of S...
IEntitySource GetSpawnSource_ForProjectile()
void SimpleFlyMovement(Vector2 desiredVelocity, float moveSpeed)
This object encapsulates context information about the source of a particular spawning event of an It...