>>227 どんぐりキャノン★さん

sort2.jsのquickSort部分を変えたら、綺麗に動いたよ。
参考にしてみてください。

function quickSort(arr, _l, _h, colIndex, direction) {
 function to8Number(value) {
  return value.replace(/\d+/g, (m) => ("00000000" + m).slice(-8));
 }
 function extractString(row) {
  var value = row.getElementsByTagName("TD")[colIndex].textContent;
  if (colIndex == 0) {
   // 名前(レアリティで昇順降順、名前で昇順)
   [v2, ...v3] = value.replace(/(.*)\[([A-Z]{1,3})\](.*)/s, "$2,$1$3").split(",");
   return ["", v2, v3.join(",")];
  } else if (colIndex == 1) {
   // ATK,DEF(最大値,最小値で昇順降順)
   value = value.replace(/(\d+)(?:.*?)(\d+)/, "$2,$1");
  } else if (colIndex == 4) {
   // ELEM([火氷雷風地水光闇なし]順、属性値で昇順降順)
   [v2, ...v1] = value.replace(/(\D*)(\d*)(\D*)/, "$2,$1$3").split(",");
   return [String("火氷雷風地水光闇なし".search(v1.join(","))), to8Number(v2), ""];
  }
  return ["", to8Number(value), ""];
 }
 order = direction === "asc" ? 1 : -1;
 arr.sort((a, b) => {
  a = extractString(a);
  b = extractString(b);
  return a[0].localeCompare(b[0]) || a[1].localeCompare(b[1]) * order || a[2].localeCompare(b[2]);
 });
}