////

        private void RunAmbushActionBuildup(Entity target)
        {
            this.npc.velocity.X *= 0.7f;
            this.npc.ai[0]       = 0f;
            this.npc.ai[1]       = 0f;
            this.npc.ai[2]       = 0f;
            this.npc.ai[3]       = 0f;

            if ((this.AmbushRunTimer % 5) == 0)
            {
                Vector2?smokePos = PirateRuffianNPC.FindAmbushDestination(this.npc, target);

                if (smokePos.HasValue)
                {
                    PirateRuffianNPC.EmitSmoke(smokePos.Value, true);
                }
            }
        }
        private bool EndAmbushAction(Entity target)
        {
            Vector2?ambushPos = PirateRuffianNPC.FindAmbushDestination(this.npc, target);

            if (!ambushPos.HasValue)
            {
                return(false);
            }

            this.npc.Center = ambushPos.Value;
            if (Main.netMode == NetmodeID.Server)
            {
                NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, this.npc.whoAmI);
            }

            PirateRuffianNPC.EmitSmoke(ambushPos.Value, false);

            return(true);
        }