// HTML要素の取得 const mainText = document.getElementById("main-text"); const checkButton = document.getElementById("check-button"); const washButton = document.getElementById("wash-button"); const levelForm = document.getElementById("level-form"); const resultText = document.getElementById("result"); // 検体のデータ const specimens = [ { type: "A", name: "藤沢 朋美", age: "22歳", style: "スレンダー", face: "シャープ", hair: "ショートボブ", appearance: "キュート", collectionPoint: "廃墟", }, { type: "B", name: "土肥 春菜", age: "19歳", style: "巨乳", face: "アヒル口", hair: "ロングストレート", appearance: "セクシー", collectionPoint: "塹壕", }, // 他にも検体データがあれば追加する ]; // ボタンが押された時の処理を定義 checkButton.addEventListener("click", () => { // 表示する検体のデータをランダムで選択 const specimen = specimens[Math.floor(Math.random() * specimens.length)]; // 検体のデータを表示 mainText.textContent = `次の検体が到着した: ${specimen.name} (${specimen.type}) ${specimen.age} ${specimen.style} ${specimen.face} ${specimen.hair} ${specimen.appearance} (${specimen.collectionPoint})`; }); washButton.addEventListener("click", () => { // 洗浄中の表示を追加 mainText.textContent += "\n洗浄中..."; // 検体を手洗いしながら項目を確認 const washItems = [ { item: "唇", description: "色合いと触感", }, { item: "肌", description: "色艶と触感", }, { item: "胸", description: "発育と触感", }, { item: "腰", description: "張りと触感", }, { item: "鼠径部", description: "成熟度と触感", }, ]; let washResult = ""; for (const washItem of washItems) { // 各項目の確認 washResult += `\n${washItem.item}の${washItem.description}: `; // 確認結果をランダムで選択 const washOption = ["良好", "やや不足", "不良"].sort(() => Math.random() - 0.5)[0]; washResult += washOption; // 項目3の時、向きを変えるパターンをランダムに表示 if (washItem === washItems[2]) { washResult += `\n身体の項垂れた様子:`; const posturePatterns = [ "グラマラス", "ナチュラル", "クール", ]; const posture = posturePatterns[Math.floor(Math.random() * posturePatterns.length)]; washResult += posture; } // 項目6の時、検体の年齢に応じたコメントを表示 if (washItem === washItems[4]) { washResult += `\n使用感想: `; if (specimen.age < "20歳") { washResult += "「こんな大人になりたい!」"; } else if (specimen.age < "25歳") { washResult += "「胸の成長が成就した!」"; } else { washResult += "「良い仕事ができそうだ!」"; } } } // 結果を表示 mainText.textContent += washResult; }); levelForm.addEventListener("submit", (event) => { event.preventDefault(); // 選択された級を取得 const level = levelForm.level.value; // 級に応じたコメントを追加 let comment = `この検体の級は「${level}級」です。`; switch (level) { case "1": comment += "成績優秀な検体です。"; break; case "2": comment += "成績普通な検体です。"; break; case "3": comment += "成績悪い検体です。"; break; default: break; } // 結果を表示 resultText.textContent = comment; }); // 次の検体を表示する関数 const nextSpecimen = () => { // テキストを初期化 mainText.textContent = "次の検体が到着した"; // 結果を初期化 resultText.textContent = ""; }; // 「次の検体」ボタンをクリックしたら次の検体を表示 const nextButton = document.getElementById("next-button"); nextButton.addEventListener("click", nextSpecimen);