public void ghostHeal(int dmg, Vector2 Position)
{
float num1 = 0.2f - numHits * 0.05f;
if (num1 <= 0.0)
return;
float ai1 = dmg * num1;
if ((int)ai1 <= 0 || Main.player[Main.myPlayer].lifeSteal <= 0.0)
return;
Main.player[Main.myPlayer].lifeSteal -= ai1;
if (!magic)
return;
float num2 = 0.0f;
int ai0 = owner;
for (int index = 0; index < 255; ++index)
{
if (Main.player[index].active && !Main.player[index].dead && (!Main.player[owner].hostile && !Main.player[index].hostile || Main.player[owner].team == Main.player[index].team) && ((Math.Abs(Main.player[index].position.X + (Main.player[index].width / 2) - position.X + (width / 2)) + Math.Abs(Main.player[index].position.Y + (Main.player[index].height / 2) - position.Y + (height / 2))) < 1200.0 && (Main.player[index].statLifeMax2 - Main.player[index].statLife) > num2))
{
num2 = (Main.player[index].statLifeMax2 - Main.player[index].statLife);
ai0 = index;
}
}
NewProjectile(Position.X, Position.Y, 0.0f, 0.0f, 298, 0, 0.0f, owner, ai0, ai1);
}