45180 {
45181
45182
45183
45184
45185
45186
45187
45188
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219
45220
45221
45222
45223
45224
45225
45226
45227
45228
45229
45230
45231
45232
45233
45234
45235
45236
45237
45238
45239
45240
45241
45242
45243
45244
45245
45246
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288 if (Main.myPlayer ==
owner &&
ai[0] <= 0
f)
45289 {
45290 if (Main.player[
owner].channel && Main.player[
owner].HeldItem.shoot ==
type)
45291 {
45294 {
45296 }
45298 {
45300 }
45301 Vector2
vector =
default(Vector2);
45309 {
45311 }
45313 {
45315 {
45318 {
45321 }
45322 }
45324 {
45326 }
45327 }
45329 {
45338 {
45340 }
45342 {
45343 Vector2
vector2 =
default(Vector2);
45346 }
45347 else
45348 {
45349 velocity.X =
num11;
45350 velocity.Y =
num12;
45351 }
45352 }
45353 else
45354 {
45360 {
45362 }
45363 velocity.X =
num11;
45364 velocity.Y =
num12;
45365 }
45366 }
45367 else if (
ai[0] <= 0
f)
45368 {
45371 {
45372 Vector2
vector3 =
default(Vector2);
45374 float num5 = (float)Main.mouseX + Main.screenPosition.X -
vector3.X;
45375 float num6 = (float)Main.mouseY + Main.screenPosition.Y -
vector3.Y;
45376 if (Main.player[
owner].gravDir == -1
f)
45377 {
45378 num6 = Main.screenPosition.Y + (float)Main.screenHeight - (
float)Main.mouseY -
vector3.Y;
45379 }
45382 {
45387 }
45394 {
45396 }
45397 }
45399 }
45400 }
45403 {
45406 {
45410 {
45412 }
45416 }
45419 {
45421 }
45422 else if (
ai[0] > 0
f)
45423 {
45425 }
45426 else
45427 {
45429 }
45430 if (Vector2.Distance(
base.Center, Main.player[
owner].Center) > 2000
f)
45431 {
45433 }
45434 if (Main.rand.Next(2) == 0)
45435 {
45436 int num19 = Main.rand.Next(3);
45438 {
45439 0 => 15,
45440 1 => 57,
45442 }, velocity.X * 0.25f, velocity.Y * 0.25f, 255,
default(Color), 0.7
f);
45444 obj.velocity *= 0.25f;
45446 }
45447 }
45449 {
45451 {
45454 }
45455 for (int i = 0; i < 1; i++)
45456 {
45457 int num9 = Dust.NewDust(
new Vector2(
position.X,
position.Y),
width,
height, 66, 0
f, 0
f, 100,
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 2.5f);
45459 obj2.velocity *= 0.1f;
45462 Main.dust[
num9].position.X = position.X + (float)(
width / 2) + 4
f + (float)Main.rand.Next(-2, 3);
45463 Main.dust[
num9].position.Y = position.Y + (float)(
height / 2) + (float)Main.rand.Next(-2, 3);
45464 Main.dust[
num9].noGravity =
true;
45465 }
45466 }
45468 {
45470 {
45473 }
45474 if (Main.rand.Next(9) == 0)
45475 {
45478 obj4.velocity *= 0.3f;
45479 Main.dust[
num10].position.X = position.X + (float)(
width / 2) + 4
f + (float)Main.rand.Next(-4, 5);
45480 Main.dust[
num10].position.Y = position.Y + (float)(
height / 2) + (float)Main.rand.Next(-4, 5);
45481 Main.dust[
num10].noGravity =
true;
45483 obj5.velocity += Main.rand.NextVector2Circular(2
f, 2
f);
45484 }
45487 {
45489 }
45490 }
45492 {
45493 if (Main.rand.Next(12) == 0)
45494 {
45495 Dust dust = Dust.NewDustDirect(
base.Center, 0, 0, 6,
velocity.X * 0.2f,
velocity.Y * 0.2f, 100,
default(Color), 3.5f);
45496 dust.noGravity = true;
45497 dust.velocity *= 1.4f;
45498 dust.velocity += Main.rand.NextVector2Circular(1
f, 1
f);
45499 dust.velocity +=
velocity * 0.15f;
45500 }
45501 if (Main.rand.Next(24) == 0)
45502 {
45503 Dust
dust2 = Dust.NewDustDirect(
base.Center, 0, 0, 6,
velocity.X * 0.2f,
velocity.Y * 0.2f, 100,
default(Color), 1.5f);
45504 dust2.velocity += Main.rand.NextVector2Circular(1
f, 1
f);
45505 dust2.velocity +=
velocity * 0.15f;
45506 }
45509 {
45511 }
45512 }
45514 {
45516 }
45518 {
45520 }
45521 }
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 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.
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle Item9
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to 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...
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...