This program was created by
unluck me and is actually a simple storyline text selection game. Since it was created by me, it is in Chinese (in fact, modifying it is more convenient, as long as you see it is in Chinese, you can directly modify it)
Attention: You can create a page to store your code, but it cannot be exactly the same. You must delete it within one hour of its creation. If you want to write a story, you only need to change its plot. You can create a page to store your code, but it cannot be exactly the same. You must delete it within one hour of its creation. If you want to write a story, you only need to modify its plot.
[[html]]
<!DOCTYPE html>
// editor unluck me
// 不要视奸我的代码(ノД`)
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文字小程序游戏</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin-top: 50px;
}
#game-container {
max-width: 600px;
margin: auto;
}
#choices {
margin-top: 20px;
}
button {
padding: 10px 20px;
margin: 5px;
font-size: 16px;
cursor: pointer;
}
.red-text {
color: red;
}
</style>
</head>
<body>
<div id="game-container">
<h1>冬天暖阳君的故事</h1>
<p id="story">你走到了异化之主的面前,他那蓝色的瞳孔散发出冷酷的光芒----这就是冬天暖阳君。</p>
<div id="choices">
<button onclick="makeChoice('A')">A. 询问世界观</button>
<button onclick="makeChoice('B')">B. 询问网站</button>
<button onclick="makeChoice('C')">C. 询问他的故事</button>
<button onclick="makeChoice('D')">D. 暂不做出举动</button>
</div>
</div>
<script>
function makeChoice(choice) {
const story = document.getElementById('story');
const choices = document.getElementById('choices');
if (choice === 'A') {
story.innerHTML = '你选择先询问一下世界观,这确实是个明智的选择,这样可以让你更能融入<b>暖阳大家庭</b>中。<br>遗憾的是,暖阳君没有正面回答你。';
choices.innerHTML = `
<button onclick="makeChoice(\'A-A\')">询问为什么不作答</button>
<button onclick="makeChoice(\'A-B\')">继续问下去</button>
`;
} else if (choice === 'A-A') {
story.innerHTML = '暖阳感觉到了一点不耐烦,这时一个名为<b>天使方</b>的人提醒你:作为一个新人,你应该先加入组织,而不是先问世界观。';
choices.innerHTML = `
<button onclick="makeChoice(\'A-A-A\')">询问如何加入组织</button>
<button onclick="makeChoice(\'A-A-B\')">询问天使方:你是谁?</button>
`;
} else if (choice === 'A-B') {
story.innerHTML = '暖阳感觉到了不耐烦<font color="red">(好感-1)</font>,他瞪了你一眼,一名名叫<b>天使方</b>的人急忙帮你打圆场,暖阳就这么直接走了。';
choices.innerHTML = `
<button onclick="endGame()">未开发,敬请期待^ω^</button>
`;
} else if (choice === 'A-A-A') {
story.innerHTML = '天使方告诉你:在异化世界中,冬天暖阳君经常会以分身来与普通人会见,尽管这是极少的机会下,你刚刚已经错过了那个机会……(明显停顿了一会)没有组织的人叫做<b>散人</b>,你作为一个人类可以去应聘办理者身份,当你成为一名合格的办理者后相信应该会有一些强大的组织想要你加入他们。';
choices.innerHTML = `
<button onclick="endGame()">未开发,敬请期待^ω^</button>
`;
} else if (choice === 'A-A-B') {
story.innerHTML = '我叫天使方,冬天暖阳君的秘书,大家都叫我天使盒子。冬天暖阳君经常会以分身来与普通人会见,尽管这是极少的机会下,你刚刚已经错过了那个机会……哦,顺带一提,冬天暖阳君的英文名叫MR.NuanYang•Winter,有些人会称冬天暖阳春为异化之主,也有些人会称冬天暖阳君为温特暖阳先生。他的英文名是由聪明绝顶又狡猾的unlucky取的。';
choices.innerHTML = `
<button onclick="endGame()">未开发,敬请期待^ω^</button>
`;
} else if (choice === 'story') {
// 如果这是未开发的内容,可以在这里添加一个提示
story.innerHTML = '这部分内容还未开发,敬请期待^ω^';
choices.innerHTML = '';
} else {
// 默认情况,如果没有更多的选择,也可以结束游戏
story.innerHTML = '你已经走到了故事的尽头。';
choices.innerHTML = `
<button onclick="endGame()">未开发,敬请期待^ω^</button>
`;
}
}
// end program
function endGame() {
const choices = document.getElementById('choices');
choices.innerHTML = '';
const story = document.getElementById('story');
story.innerHTML += '<br><br><br><font color="red"><h1>感谢你的参与!</h1></font>';
choices.innerHTML += `
<button onclick="makeChoice()"><a href="https://to-dv-backrooms-fr.wikidot.com/word-game/" target="_blank">点击这里返回主页</a></button>
// ↑Code de saut
<button onclick="location.reload()">重新开始游戏</button>
`;
}
</script>
</body>
[[/html]]
Original page : here
頁面更改紀錄: 1, 最後編輯於: 14 Oct 2024 12:19