54163 {
54164
54165
54166
54167
54168
54169
54170
54171
54172
54173
54174
54175
54176
54177
54178
54179
54180
54181
54182
54183
54184
54185
54186
54187
54188
54189
54190
54191
54192
54193
54194
54195
54196
54197
54198
54199
54200
54201
54202
54203
54204
54205
54206
54207
54208
54209
54210
54211
54212
54213
54214
54215
54216
54217
54218
54219
54220
54221
54222
54223
54224
54225
54226
54227
54228
54229
54230
54231
54232
54233
54234
54235
54236
54237
54238
54239
54240
54241
54242
54243
54244
54245
54246
54247
54248
54249
54250
54251
54252
54253
54254
54255
54256
54257
54258
54259
54260
54261
54262
54263
54264
54265
54266
54267
54268
54269
54270
54271
54272
54273
54274
54275
54276
54277
54278
54279
54280
54281
54282
54283
54284
54285
54286
54287
54288
54289
54290
54299 {
54301 }
54303 {
54309 }
54311 if (player.active && Vector2.Distance(player.Center,
base.Center) > 2000
f)
54312 {
54316 }
54318 {
54325 {
54328 }
54329 return;
54330 }
54332 {
54334 {
54338 base.Center = Vector2.SmoothStep(
base.Center,
idleSpot2, 0.45f);
54339 if (Main.rand.Next(20) == 0)
54340 {
54343 {
54348 return;
54349 }
54350 }
54351 }
54353 {
54354 return;
54355 }
54359 base.Center = Vector2.SmoothStep(
base.Center,
idleSpot3, 0.45f);
54361 if (Main.rand.Next(20) == 0)
54362 {
54365 {
54367 ai[0] = Main.rand.NextFromList<
int>(
num,
num19);
54371 }
54372 }
54373 return;
54374 }
54377 {
54379 if (!Main.npc.IndexInRange(
num24))
54380 {
54383 return;
54384 }
54386 if (!
nPC.CanBeChasedBy(
this))
54387 {
54390 return;
54391 }
54394 {
54397 {
54400 }
54401 return;
54402 }
54404 Vector2
vector =
default(Vector2);
54407 {
54409 }
54415 spinningpoint.Y *= (float)
Math.Sin((
float)
identity * 2.3f) * 0.5
f;
54428 {
54431 {
54436 return;
54437 }
54440 }
54441 }
54443 {
54444 return;
54445 }
54451 {
54455 }
54457 if (!Main.npc.IndexInRange(
num9))
54458 {
54461 {
54462 ai[0] = Main.rand.NextFromList<
int>(
num,
num19);
54466 }
54467 else
54468 {
54472 }
54473 return;
54474 }
54476 if (!
nPC2.CanBeChasedBy(
this))
54477 {
54480 {
54481 ai[0] = Main.rand.NextFromList<
int>(
num,
num19);
54485 }
54486 else
54487 {
54491 }
54492 return;
54493 }
54495 if (
ai[0] >= (
float)
num7)
54496 {
54498 if (
ai[0] == (
float)
num7)
54499 {
54502 }
54503 }
54506 {
54507 Vector2
vector3 =
default(Vector2);
54510 {
54512 }
54518 spinningpoint2.Y *= 0.5f;
54519 spinningpoint2.Y *= 0.8f + (float)
Math.Sin((
float)
identity * 2.3f) * 0.2
f;
54533 }
54535 {
54536 Vector2
vector5 =
default(Vector2);
54539 Vector2 v = nPC2.Center -
vector5;
54540 Vector2
vector6 = v.SafeNormalize(Vector2.Zero) *
MathHelper.Clamp(((Vector2)(
ref v)).Length(), 60
f, 150
f);
54541 Vector2 value = nPC2.Center +
vector6;
54544 float targetAngle = v.SafeNormalize(Vector2.Zero).ToRotation() + (float)
Math.PI / 2
f;
54548 {
54550 }
54551 }
54552 if (
ai[0] == (
float)
num8)
54553 {
54556 {
54557 ai[0] = Main.rand.NextFromList<
int>(
num,
num19);
54561 }
54562 else
54563 {
54567 }
54568 }
54569 }
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 owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
void AI_156_GetIdlePosition(int stackedIndex, int totalIndexes, out Vector2 idleSpot, out float idleRotation)
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
int identity
The projectile's universal unique identifier, which is the same on all clients and the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
void AI_156_StartAttack()
void AI_GetMyGroupIndexAndFillBlackList(List< int > blackListedTargets, out int index, out int totalIndexesInGroup)
int AI_156_TryAttackingNPCs(List< int > blackListedTargets, bool skipBodyCheck=false)