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
47431 if (
type == 917 && (!player.active || player.dead))
47432 {
47433 player.coolWhipBuff = false;
47435 return;
47436 }
47437 if (
type == 917 && player.coolWhipBuff)
47438 {
47440 }
47442 {
47444 {
47447 }
47450 {
47451 activeSound.Position =
base.Center;
47452 activeSound.Volume = 1
f -
Math.Max(
ai[1] - 555
f, 0
f) / 15
f;
47453 }
47454 else
47455 {
47457 }
47460 {
47462 }
47464 {
47466 }
47468 for (int i = 0; i < 1000; i++)
47469 {
47470 if (i !=
whoAmI && Main.projectile[i].active && Main.projectile[i].owner ==
owner && Main.projectile[i].type ==
type &&
timeLeft > Main.projectile[i].timeLeft && Main.projectile[i].ai[1] <
num)
47471 {
47472 Main.projectile[i].ai[1] =
num;
47473 Main.projectile[i].netUpdate = true;
47474 }
47475 }
47476 }
47477 int num2 = (int)
ai[0] - 1;
47479 {
47482 }
47484 {
47487 {
47489 }
47492 {
47496 }
47497 }
47499 float amount = 0.1f;
47502 {
47504 amount = 0.075f;
47506 }
47508 {
47512 {
47514 }
47517 {
47519 }
47520 }
47521 else if (
type == 969)
47522 {
47525 {
47527 }
47528 }
47529 else
47530 {
47532 }
47534 {
47537 {
47541 {
47543 }
47544 }
47546 {
47548 Main.dust[
num6].noGravity =
true;
47549 Main.dust[
num6].fadeIn = 0.9f;
47550 Main.dust[
num6].velocity = Main.rand.NextVector2Circular(2
f, 2
f) +
new Vector2(0
f, -2
f) +
velocity * 0.75f;
47551 for (
int j = 0;
j < 2;
j++)
47552 {
47554 dust.noGravity = true;
47555 dust.fadeIn = 0.7f;
47556 dust.velocity = Main.rand.NextVector2Circular(2
f, 2
f) * 0.2f +
new Vector2(0
f, -0.4
f) +
velocity * 1.5f;
47558 }
47559 }
47560 }
47561 else
47562 {
47564 if (Main.rand.Next(3) == 0)
47565 {
47567 Vector2
vector3 = Main.rand.NextVector2Circular(1
f, 1
f);
47568 dust2.position = base.Center +
vector3 * 10
f;
47570 }
47571 }
47572 }
static ? ActiveSound GetActiveSound(SlotId slotId)
static SlotId PlayTrackedSound(in SoundStyle style, Vector2? position=null)
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)
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle DD2_BookStaffTwisterLoop
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...
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
NPC FindTargetWithinRange(float maxRange, bool checkCanHit=false)
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.