46479 {
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492
46493
46494
46495
46496
46497
46498
46499
46500
46501
46502
46503
46504
46505
46506
46507
46508
46509
46510
46511
46512
46513
46514
46515
46516
46517
46518
46519
46520
46521
46522
46523
46524
46525
46526
46527
46528
46529
46530
46531
46532
46533
46534
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553
46554
46555
46556
46557
46558
46559
46560
46562 Vector2
zero = Vector2.Zero;
46564 {
46565 zero.X = (float)player.direction * 6
f;
46566 zero.Y = player.gravDir * -14
f;
46569 if (!player.dead)
46570 {
46572 }
46574 {
46576 }
46578 {
46580 {
46582 }
46584 {
46586 }
46589 {
46592 {
46594 }
46595 }
46596 }
46598 {
46601 {
46603 }
46604 }
46605 Vector2
center = player.Center;
46606 Vector2
vector = Main.screenPosition +
new Vector2((
float)Main.mouseX, (
float)Main.mouseY) -
center;
46607 if (player.gravDir == -1
f)
46608 {
46609 vector.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
center.Y;
46610 }
46611 Vector2
vector2 =
default(Vector2);
46614 {
46616 }
46619 {
46621 }
46623 if (Main.myPlayer ==
owner)
46624 {
46625 Vector2
position = player.Center +
new Vector2((
float)(player.direction * 4), player.gravDir * 2
f);
46626 if (!player.channel)
46627 {
46629 return;
46630 }
46632 {
46633 bool flag3 =
false;
46634 for (int i = 0; i < 200; i++)
46635 {
46638 {
46640 break;
46641 }
46642 }
46643 if (
flag3 && (!
flag || player.CheckMana(player.inventory[player.selectedItem], -1,
pay:
true)))
46644 {
46650 for (
int j = 0;
j < 200;
j++)
46651 {
46655 {
46657 }
46658 }
46660 for (
int k = 0;
k < _medusaHeadTargetList.Count &&
k < 3;
k++)
46661 {
46664 Vector2 v = nPC3.Center -
position;
46665 num3 += v.ToRotation();
46668 Main.projectile[
num5].Center =
nPC3.Center;
46669 Main.projectile[
num5].damage =
num;
46670 Main.projectile[
num5].Damage();
46671 Main.projectile[
num5].damage = 0;
46674 }
46676 for (
int l = 0;
l < 4;
l++)
46677 {
46678 Vector2
zero2 = Vector2.Zero;
46679 zero2 = ((Main.rand.Next(4) == 0) ? (Vector2.UnitX.RotatedByRandom(6.2831854820251465) *
new Vector2(200
f, 50
f) * (Main.rand.NextFloat() * 0.7f + 0.3f)) : (Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy(
num3) *
new Vector2(200
f, 50
f) * (Main.rand.NextFloat() * 0.7f + 0.3f)));
46681 }
46684 }
46685 }
46686 }
46687 Lighting.AddLight(
base.Center, 0.9f, 0.75f, 0.1f);
46688 }
46692 Vector2
vector3 = Main.OffsetsPlayerOnhand[player.bodyFrame.Y / 56] * 2
f;
46693 if (player.direction != 1)
46694 {
46695 vector3.X = (float)player.bodyFrame.Width -
vector3.X;
46696 }
46697 vector3 -= (player.bodyFrame.Size() -
new Vector2((
float)player.width, 42
f)) / 2
f;
46700 player.heldProj =
whoAmI;
46701 player.SetDummyItemTime(2);
46702 }
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 ...
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 owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
static List< Tuple< int, float > > _medusaHeadTargetList
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...
static NPCDistanceByIndexComparator _medusaTargetComparer
IEntitySource GetProjectileSource_FromThis()
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.
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...