レッスルカッパーズ
今年もカッパレスリングの季節がやってきた
対戦相手のプロフィール
名前:
年齢:
髪型、顔立ち:
体型、胸や腰つきの特徴:
鼠径部の様子:
対戦前のセリフ:
得意な技:
HP:
技の成功率:
<!DOCTYPE html>
<html>
<head>
<title>レッスルカッパーズ</title>
</head>
<body>
<header>
<h1>レッスルカッパーズ</h1>
</header>
<main>
<section>
<p>今年もカッパレスリングの季節がやってきた</p>
</section>
<section>
<p>対戦相手のプロフィール</p>
<p>名前: <span id="name"></span></p>
<p>年齢: <span id="age"></span></p>
<p>髪型、顔立ち: <span id="appearance"></span></p>
<p>体型、胸や腰つきの特徴: <span id="body"></span></p>
<p>鼠径部の様子: <span id="groin"></span></p>
<p>対戦前のセリフ: <span id="line"></span></p>
<p>得意な技: <span id="move"></span></p>
<p>HP: <span id="hp"></span></p>
<p>技の成功率: <span id="percent"></span></p>
</section>
<section>
<button id="startBtn">対戦開始</button>
</section>
<section>
<button id="moveBtn">技を掛ける</button>
<p id="battleLog"></p>
<button id="nextBtn" style="display: none;">次へ</button>
</section>
</main>
<footer>
<button id="nextFightBtn" style="display: none;">次の試合</button>
</footer>
<script>
const profiles = [
{
name: "あいり",
age: "14",
appearance: "かわいい",
body: "小柄で華奢",
groin: "純情そう",
line: "勝つのは私よ!",
move: "卍固め",
hp: Math.floor(Math.random() * (10 - 5 + 1)) + 5,
percent: Math.floor(Math.random() * (50 - 30 + 1)) + 30
},
{
name: "ゆあ",
age: "19",
appearance: "色っぽい",
body: "グラマラスな肉感",
groin: "きゅっと引き締まってる",
line: "私が勝つわよ!",
move: "スリーパーホールド",
hp: Math.floor(Math.random() * (10 - 5 + 1)) + 5,
percent: Math.floor(Math.random() * (50 - 30 + 1)) + 30
},
// ここにプロフィールを追加
];
const battleLogs = [
"技を掛け合った!",
"相手に逃げられた!",
"相手がもがいた!",
"失敗した!",
"成功した!"
];
const groins = [
"にゅる",
"ほわん",
"ぶよん",
"きゅん",
"ちゅん"
];
const loses = [
"失敗した!",
"空振りした!",
"外れた!",
"回避された!",
"かわされた!"
];
function displayProfile() {
const index = Math.floor(Math.random() * profiles.length);
const profile = profiles[index];
document.querySelector("#name").textContent = profile.name;
document.querySelector("#age").textContent = profile.age + "歳";
document.querySelector("#appearance").textContent = profile.appearance;
document.querySelector("#body").textContent = profile.body;
document.querySelector("#groin").textContent = groins[Math.floor(Math.random() * groins.length)];
document.querySelector("#line").textContent = profile.line;
document.querySelector("#move").textContent = profile.move;
document.querySelector("#hp").textContent = profile.hp;
document.querySelector("#percent").textContent = profile.percent + "%";
}
function displayLog(log) {
document.querySelector("#battleLog").textContent = log;
}
function displayNextRoundBtn() {
document.querySelector("#nextBtn").style.display = "block";
}
function hideMoveBtn() {
document.querySelector("#moveBtn").style.display = "none";
}
function displayNextFightBtn() {
document.querySelector("#nextFightBtn").style.display = "block";
}
document.addEventListener("DOMContentLoaded", () => {
displayProfile();
document.querySelector("#startBtn").addEventListener("click", () => {
document.querySelector("#startBtn").style.display = "none";
document.querySelector("#moveBtn").style.display = "block";
});
document.querySelector("#moveBtn").addEventListener("click", () => {
const successRate = Math.floor(Math.random() * (100 - 1 + 1)) + 1;
if (successRate <= 70) {
displayLog(battleLogs[4]);
hideMoveBtn();
displayNextRoundBtn();
} else {
displayLog(battleLogs[3]);
displayLog("技をかけた! 相手のこぼれた鼠径部を見て、あなたは思わず…");
}
});
document.querySelector("#nextBtn").addEventListener("click", () => {
displayLog(battleLogs[Math.floor(Math.random() * (battleLogs.length - 1))]);
const hp = Number(document.querySelector("#hp").textContent);
document.querySelector("#hp").textContent = hp - 1;
if (hp <= 1) {
displayLog(`相手の${document.querySelector("#name").textContent}は昏倒! 勝負あった!`);
displayNextFightBtn();
document.querySelector("#moveBtn").style.display = "none";
} else {
setTimeout(() => {
displayLog(`${document.querySelector("#name").textContent}もがいている…`);
displayLog(loses[Math.floor(Math.random() * loses.length)]);
document.querySelector("#nextBtn").style.display = "none";
document.querySelector("#moveBtn").style.display = "block";
}, 2000);
}
});
document.querySelector("#nextFightBtn").addEventListener("click", () => {
displayProfile();
document.querySelector("#nextFightBtn").style.display = "none";
document.querySelector("#startBtn").style.display = "block";
});
});
</script>
</body>
</html>