Terraria.Player.WOFTongue C# (CSharp) Method

WOFTongue() public method

public WOFTongue ( ) : void
return void
        public void WOFTongue()
        {
            if (Main.wof < 0 || !Main.npc[Main.wof].active)
                return;
            float num1 = Main.npc[Main.wof].position.X + 40f;
            if (Main.npc[Main.wof].direction > 0)
                num1 -= 96f;
            if ((double)this.position.X + (double)this.width > (double)num1 && (double)this.position.X < (double)num1 + 140.0 && this.gross)
            {
                this.noKnockback = false;
                this.Hurt(50, Main.npc[Main.wof].direction, false, false, " was slain...", false);
            }
            if (!this.gross && (double)this.position.Y > (double)((Main.maxTilesY - 250) * 16) && ((double)this.position.X > (double)num1 - 1920.0 && (double)this.position.X < (double)num1 + 1920.0))
            {
                this.AddBuff(37, 10, true);
                Main.PlaySound(4, (int)Main.npc[Main.wof].position.X, (int)Main.npc[Main.wof].position.Y, 10);
            }
            if (this.gross)
            {
                if ((double)this.position.Y < (double)((Main.maxTilesY - 200) * 16))
                    this.AddBuff(38, 10, true);
                if (Main.npc[Main.wof].direction < 0)
                {
                    if ((double)this.position.X + (double)(this.width / 2) > (double)Main.npc[Main.wof].position.X + (double)(Main.npc[Main.wof].width / 2) + 40.0)
                        this.AddBuff(38, 10, true);
                }
                else if ((double)this.position.X + (double)(this.width / 2) < (double)Main.npc[Main.wof].position.X + (double)(Main.npc[Main.wof].width / 2) - 40.0)
                    this.AddBuff(38, 10, true);
            }
            if (!this.tongued)
                return;
            this.controlHook = false;
            this.controlUseItem = false;
            for (int index = 0; index < 1000; ++index)
            {
                if (Main.projectile[index].active && Main.projectile[index].owner == Main.myPlayer && Main.projectile[index].aiStyle == 7)
                    Main.projectile[index].Kill();
            }
            Vector2 vector2 = new Vector2(this.position.X + (float)this.width * 0.5f, this.position.Y + (float)this.height * 0.5f);
            float num2 = Main.npc[Main.wof].position.X + (float)(Main.npc[Main.wof].width / 2) - vector2.X;
            float num3 = Main.npc[Main.wof].position.Y + (float)(Main.npc[Main.wof].height / 2) - vector2.Y;
            if (Math.Sqrt((double)num2 * (double)num2 + (double)num3 * (double)num3) > 3000.0)
            {
                this.KillMe(1000.0, 0, false, " tried to escape.");
            }
            else
            {
                if ((double)Main.npc[Main.wof].position.X >= 608.0 && (double)Main.npc[Main.wof].position.X <= (double)((Main.maxTilesX - 38) * 16))
                    return;
                this.KillMe(1000.0, 0, false, " was licked.");
            }
        }
Player