11133 {
11134
11135
11136
11137
11139 {
11140 return;
11141 }
11144 {
11145 return;
11146 }
11149 if (Main.player[Main.myPlayer].ghostDmg > (
float)
num3)
11150 {
11151 return;
11152 }
11153 Main.player[Main.myPlayer].ghostDmg +=
num;
11154 int[] array = new int[200];
11158 for (int i = 0; i < 200; i++)
11159 {
11160 if (!Main.npc[i].CanBeChasedBy(this))
11161 {
11162 continue;
11163 }
11164 float num6 =
Math.Abs(Main.npc[i].position.X + (
float)(Main.npc[i].width / 2) -
position.X + (
float)(
width / 2)) +
Math.Abs(Main.npc[i].position.Y + (
float)(Main.npc[i].height / 2) -
position.Y + (
float)(
height / 2));
11166 {
11167 if (Collision.CanHit(
position, 1, 1, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height) &&
num6 > 50
f)
11168 {
11171 }
11172 else if (
num5 == 0)
11173 {
11176 }
11177 }
11178 }
11180 {
11181 num2 = ((
num5 <= 0) ? array[Main.rand.Next(
num4)] : array[Main.rand.Next(
num5)]);
11182 float num7 = Main.rand.Next(-100, 101);
11183 float num8 = Main.rand.Next(-100, 101);
11188 NewProjectile(
GetProjectileSource_OnHit(
victim, 16), Position.X, Position.Y,
num7,
num8, 356,
num, 0
f,
owner,
num2);
11189 }
11190 }
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.
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...
IEntitySource GetProjectileSource_OnHit(Entity victim, int projectileSourceId)
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...