PVP比赛专用:修订间差异

来自赛尔号精灵图鉴
跳转到导航 跳转到搜索
无编辑摘要
无编辑摘要
 
第8行: 第8行:
   </div>
   </div>


   <!-- 中间区域 -->"
   <!-- 中间 -->
   <div style="text-align:center;">
   <div style="text-align:center;">
     <h3>点击精灵进行 Ban / Pick</h3>
     <h3>点击精灵进行 Ban / Pick</h3>
第35行: 第35行:
   { id: 8, name: "烈火猴", img: "https://wiki.len-chat.ca/images/e/ee/头像-8.png" },
   { id: 8, name: "烈火猴", img: "https://wiki.len-chat.ca/images/e/ee/头像-8.png" },
   { id: 9, name: "烈焰猩猩", img: "https://wiki.len-chat.ca/images/1/12/头像-9.png" },
   { id: 9, name: "烈焰猩猩", img: "https://wiki.len-chat.ca/images/1/12/头像-9.png" },
   { id: 10, name: "皮皮", img: "https://wiki.len-chat.ca/images/f/fd/头像-10.png" },
   { id: 10, name: "皮皮", img: "https://wiki.len-chat.ca/images/f/fd/头像-10.png" }
   { id: 11, name: "
];
 
const steps = [
  "ban1", "ban2", "ban1", "ban2",
  "pick1", "pick2", "pick2", "pick1",
  "pick1", "pick2", "pick2", "pick1"
];
 
let currentStep = 0;
 
function renderGrid() {
  const grid = document.getElementById("sprite-grid");
  sprites.forEach(sprite => {
    const img = document.createElement("img");
    img.src = sprite.img;
    img.alt = sprite.name;
    img.title = sprite.name;
    img.style.width = "80px";
    img.style.cursor = "pointer";
    img.onclick = () => pickSprite(sprite);
    grid.appendChild(img);
  });
}
 
function pickSprite(sprite) {
  const step = steps[currentStep];
  const el = document.getElementById(step);
  if (el && !el.textContent.includes(sprite.name)) {
    el.textContent += `[${sprite.name}] `;
   }
}
 
function nextStep() {
  if (currentStep < steps.length - 1) {
    currentStep++;
    updateStepDisplay();
  }
}
 
function updateStepDisplay() {
  const step = steps[currentStep];
  const phase = step.includes("ban") ? "Ban" : "Pick";
  const player = step.endsWith("1") ? "玩家1" : "玩家2";
  document.getElementById("step-display").textContent = `${phase} - ${player}`;
}
 
renderGrid();
updateStepDisplay();
</script>
</html>

2025年5月15日 (四) 07:03的最新版本

玩家1

Ban:
Pick:

点击精灵进行 Ban / Pick

当前步骤:Ban - 玩家1

玩家2

Ban:
Pick:

👥 当前在线人数:30