<!DOCTYPE html>
<html>
<head>
<title>ゾンビ引渡センター</title>
</head>
<body>
<h1>ゾンビ引渡センター</h1>
<div id="game">
<button onclick="startGame()">ゲームスタート</button>
</div>
<script>
const zombieNames = ["あかね", "あやめ", "さくら", "つばき", "なでしこ", "はるか", "まどか", "ゆうか", "ここあ", "あすか"];
const zombieVoices = ["可愛い声", "艶めかしい声", "少しダウナーな声"];
const zombieAge = ["11歳", "13歳", "15歳", "17歳", "19歳", "21歳", "23歳", "25歳", "28歳", "32歳"];
const zombieOccupation = ["アイドル", "看護師", "保育士", "教師", "料理人", "美容師", "ファッションモデル", "歌手", "タレント"];
const zombieSalePoints = [
"新鮮さ◎",
"外観に傷あり、それ以外は問題なし",
"美しいヘアースタイルと顔立ち",
"魅力的なボディライン",
"年齢:",
"以前の職業:",
"他にも魅力的なポイントあり"
];
const zombieBodyParts = [
"唇の形と感触◎",
"好みの顔立ちをしている",
"豊かな胸の形と大きさ、触り心地",
"引き締まった脚の肉付と感触",
"鼠径部の状態と感触◎",
"スリットの感触と使用感"
];
const zombieUseSakura = [
"サクラがゾンビを試用している",
"サクラとゾンビは仲良くおしゃべりしている",
"サクラがゾンビを指導している",
"サクラがゾンビに相談している"
];
const zombieUseZombie = [
"ゾンビはサクラが評価するのを待っている",
"ゾンビがサクラに話しかけている",
"ゾンビがサクラをにらみつけている",
"ゾンビが不安そうにしている"
];
const zombiePrice = [500, 1000, 1500, 2000, 2500];
let currentZombie = 0;
let currentTurn = 1;
function startGame() {
document.getElementById("game").innerHTML = `
<h2>ターン${currentTurn}</h2>
<p>捕獲したゾンビ「${zombieNames[currentZombie]}」を検品台に乗せます。</p>
<p>ゾンビが${zombieVoices[Math.floor(Math.random() * zombieVoices.length)]}と啼きます。</p>
<button onclick="turn2()">次へ</button>
`;
}
function turn2() {
let randomSalePoints = shuffle(zombieSalePoints);
document.getElementById("game").innerHTML = `
<h2>ターン${currentTurn}</h2>
<p>捕獲したゾンビ「${zombieNames[currentZombie]}」のセールスポイントをアピールします。</p>
<ul>
<li>${randomSalePoints[0]}</li>
<li>${randomSalePoints[1]}</li>
<li>${randomSalePoints[2]}</li>
<li>${randomSalePoints[3]}</li>
<li>${randomSalePoints[4]}${zombieAge[Math.floor(Math.random() * zombieAge.length)]}</li>
<li>${zombieOccupation[Math.floor(Math.random() * zombieOccupation.length)]}${currentZombie < 4 ? '' : '退職'}</li>
<li>${randomSalePoints[6]}</li>
</ul>
<button onclick="turn3()">次へ</button>
`;
}
function turn3() {
let randomBodyParts = shuffle(zombieBodyParts);
let randomPrices = shuffle(zombiePrice);
let priceMsg = '';
for(let i = 0; i < randomBodyParts.length; i++) {
priceMsg += `<li>${randomBodyParts[i]} (${randomPrices[i]}円)</li>`;
}
document.getElementById("game").innerHTML = `
<h2>ターン${currentTurn}</h2>
<p>職員「サクラ」がゾンビの部位を品定めして価格を出します。</p>
<ul>
${priceMsg}
</ul>
<button onclick="turn4()">次へ</button>
`;
}
function turn4() {
document.getElementById("game").innerHTML = `
<h2>ターン${currentTurn}</h2>
<p>サクラが「${zombieNames[currentZombie]}」を試用中です。</p>
<p>サクラ${zombieUseSakura[Math.floor(Math.random() * zombieUseSakura.length)]}。</p>
<p>ゾンビ${zombieUseZombie[Math.floor(Math.random() * zombieUseZombie.length)]}。</p>
<button onclick="turn5()">次へ</button>
`;
}
function turn5() {
let randomPrice = zombiePrice[Math.floor(Math.random() * zombiePrice.length)];
document.getElementById("game").innerHTML = `
<h2>ターン${currentTurn}</h2>
<p>サクラが「${zombieNames[currentZombie]}」の引取価格${randomPrice}円を提示しました。</p>
<button onclick="priceDecide(${randomPrice})">引き渡す</button>
<button onclick="dealFailed()">取引不成立</button>
`;
}
function priceDecide(price) {
alert(`「${zombieNames[currentZombie]}」を${price}円で引き渡しました!\n無事に引き取り先に届くことを願います。`);
currentZombie++;
currentTurn++;
if(currentZombie === 10) {
document.getElementById("game").innerHTML = `
<h2>ゲーム終了</h2>
<p>全てのゾンビの引き渡しが完了しました!</p>
`;
} else {
startGame();
}
}
function dealFailed() {
let comments = ["本日も三度目のお騒がせでございます…", "肝心なところで引き渡しを断られてしまいました…", "またくじけた…", "これで今月の売上がダウン。酷い一日だ…", "ざんねん…またのご利用をお待ちしています。"];
let randomComment = comments[Math.floor(Math.random() * comments.length)];
alert(`${randomComment}\n「${zombieNames[currentZombie]}」を別の引き取り先に売却してください。`);
currentTurn++;
startGame();
}
function shuffle(array) {
for(let i = array.length - 1; i > 0; i--) {
let j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
</script>
</body>
</html>