commit 3be8e0807ccd4815beb4dd5926de11774e06835e
Author: root <root@hub.scroll.pub> Date: 2024-12-31 07:46:04 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..b51a24d --- /dev/null +++ b/body.html @@ -0,0 +1,27 @@ +<header> + <h1>修真养成游戏</h1> + <p>踏上修仙之路,不断升级,成就无上大道!</p> +</header> +<main> + <section id="character"> + <h2>角色信息</h2> + <div id="character-stats"> + <p>境界: <span id="level">凡人</span></p> + <p>修为: <span id="xp">0</span></p> + <p>灵石: <span id="gold">100</span></p> + </div> + </section> + <section id="actions"> + <h2>行动</h2> + <button id="cultivate">修炼</button> + <button id="meditate">冥想</button> + <button id="explore">探索</button> + </section> + <section id="log"> + <h2>日志</h2> + <div id="log-messages"></div> + </section> +</main> +<footer> + <p>开始你的修真之旅,不断升级,成就无上大道!</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..e643d3c --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://xiuzhen.scroll.pub +metaTags +editButton /edit.html +title 修真养成游戏 - 不断升级的修仙之旅 +style.css +body.html +script.js \ No newline at end of file diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..acc1ca5 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "a05b3298-13ad-4ce5-a259-f050c7d29de5", + "object": "chat.completion", + "created": 1735631144, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nxiuzhen.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://xiuzhen.scroll.pub\nmetaTags\neditButton /edit.html\ntitle 修真养成游戏 - 不断升级的修仙之旅\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>修真养成游戏</h1>\n <p>踏上修仙之路,不断升级,成就无上大道!</p>\n</header>\n<main>\n <section id=\"character\">\n <h2>角色信息</h2>\n <div id=\"character-stats\">\n <p>境界: <span id=\"level\">凡人</span></p>\n <p>修为: <span id=\"xp\">0</span></p>\n <p>灵石: <span id=\"gold\">100</span></p>\n </div>\n </section>\n <section id=\"actions\">\n <h2>行动</h2>\n <button id=\"cultivate\">修炼</button>\n <button id=\"meditate\">冥想</button>\n <button id=\"explore\">探索</button>\n </section>\n <section id=\"log\">\n <h2>日志</h2>\n <div id=\"log-messages\"></div>\n </section>\n</main>\n<footer>\n <p>开始你的修真之旅,不断升级,成就无上大道!</p>\n</footer>\n---style.css---\nbody {\n font-family: 'Arial', sans-serif;\n background-color: #f0f0f0;\n color: #333;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n}\n\nheader {\n text-align: center;\n padding: 20px;\n background-color: #4CAF50;\n color: white;\n width: 100%;\n}\n\nheader h1 {\n margin: 0;\n font-size: 2.5em;\n}\n\nheader p {\n margin: 0;\n font-size: 1.2em;\n}\n\nmain {\n width: 90%;\n max-width: 800px;\n margin: 20px 0;\n background-color: white;\n padding: 20px;\n border-radius: 10px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n}\n\nsection {\n margin-bottom: 20px;\n}\n\nh2 {\n font-size: 1.5em;\n margin-bottom: 10px;\n}\n\n#character-stats p {\n margin: 5px 0;\n}\n\n#actions {\n display: flex;\n justify-content: space-around;\n}\n\nbutton {\n padding: 10px 20px;\n font-size: 1em;\n border: none;\n border-radius: 5px;\n background-color: #4CAF50;\n color: white;\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\nbutton:hover {\n background-color: #45a049;\n}\n\n#log-messages {\n height: 150px;\n overflow-y: auto;\n border: 1px solid #ccc;\n padding: 10px;\n border-radius: 5px;\n background-color: #f9f9f9;\n}\n\nfooter {\n text-align: center;\n padding: 10px;\n background-color: #4CAF50;\n color: white;\n width: 100%;\n position: fixed;\n bottom: 0;\n}\n---script.js---\nlet level = '凡人';\nlet xp = 0;\nlet gold = 100;\nconst logMessages = [];\n\nconst levelUp = () => {\n if (xp >= 100 && level === '凡人') {\n level = '炼气期';\n xp = 0;\n logMessages.push('恭喜你突破到炼气期!');\n } else if (xp >= 200 && level === '炼气期') {\n level = '筑基期';\n xp = 0;\n logMessages.push('恭喜你突破到筑基期!');\n }\n updateStats();\n};\n\nconst updateStats = () => {\n document.getElementById('level').textContent = level;\n document.getElementById('xp').textContent = xp;\n document.getElementById('gold').textContent = gold;\n updateLog();\n};\n\nconst updateLog = () => {\n const logElement = document.getElementById('log-messages');\n logElement.innerHTML = logMessages.map(msg => `<p>${msg}</p>`).join('');\n logElement.scrollTop = logElement.scrollHeight;\n};\n\ndocument.getElementById('cultivate').addEventListener('click', () => {\n xp += 10;\n gold += 5;\n logMessages.push('你进行了一次修炼,获得了10点修为和5块灵石。');\n levelUp();\n});\n\ndocument.getElementById('meditate').addEventListener('click', () => {\n xp += 5;\n gold += 2;\n logMessages.push('你进行了一次冥想,获得了5点修为和2块灵石。');\n levelUp();\n});\n\ndocument.getElementById('explore').addEventListener('click', () => {\n xp += 15;\n gold += 10;\n logMessages.push('你进行了一次探索,获得了15点修为和10块灵石。');\n levelUp();\n});\n\nupdateStats();\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 250, + "completion_tokens": 1182, + "total_tokens": 1432, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 250 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..b4b6962 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# xiuzhen1.scroll.pub +Website generated by DeepSeek from prompt: 我想创建一个中文版关于修真的可以连续不断对话不断升级的养成游戏 \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..2eb9413 --- /dev/null +++ b/script.js @@ -0,0 +1,53 @@ +let level = '凡人'; +let xp = 0; +let gold = 100; +const logMessages = []; + +const levelUp = () => { + if (xp >= 100 && level === '凡人') { + level = '炼气期'; + xp = 0; + logMessages.push('恭喜你突破到炼气期!'); + } else if (xp >= 200 && level === '炼气期') { + level = '筑基期'; + xp = 0; + logMessages.push('恭喜你突破到筑基期!'); + } + updateStats(); +}; + +const updateStats = () => { + document.getElementById('level').textContent = level; + document.getElementById('xp').textContent = xp; + document.getElementById('gold').textContent = gold; + updateLog(); +}; + +const updateLog = () => { + const logElement = document.getElementById('log-messages'); + logElement.innerHTML = logMessages.map(msg => `<p>${msg}</p>`).join(''); + logElement.scrollTop = logElement.scrollHeight; +}; + +document.getElementById('cultivate').addEventListener('click', () => { + xp += 10; + gold += 5; + logMessages.push('你进行了一次修炼,获得了10点修为和5块灵石。'); + levelUp(); +}); + +document.getElementById('meditate').addEventListener('click', () => { + xp += 5; + gold += 2; + logMessages.push('你进行了一次冥想,获得了5点修为和2块灵石。'); + levelUp(); +}); + +document.getElementById('explore').addEventListener('click', () => { + xp += 15; + gold += 10; + logMessages.push('你进行了一次探索,获得了15点修为和10块灵石。'); + levelUp(); +}); + +updateStats(); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..db4adf3 --- /dev/null +++ b/style.css @@ -0,0 +1,92 @@ +body { + font-family: 'Arial', sans-serif; + background-color: #f0f0f0; + color: #333; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-height: 100vh; +} + +header { + text-align: center; + padding: 20px; + background-color: #4CAF50; + color: white; + width: 100%; +} + +header h1 { + margin: 0; + font-size: 2.5em; +} + +header p { + margin: 0; + font-size: 1.2em; +} + +main { + width: 90%; + max-width: 800px; + margin: 20px 0; + background-color: white; + padding: 20px; + border-radius: 10px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} + +section { + margin-bottom: 20px; +} + +h2 { + font-size: 1.5em; + margin-bottom: 10px; +} + +#character-stats p { + margin: 5px 0; +} + +#actions { + display: flex; + justify-content: space-around; +} + +button { + padding: 10px 20px; + font-size: 1em; + border: none; + border-radius: 5px; + background-color: #4CAF50; + color: white; + cursor: pointer; + transition: background-color 0.3s; +} + +button:hover { + background-color: #45a049; +} + +#log-messages { + height: 150px; + overflow-y: auto; + border: 1px solid #ccc; + padding: 10px; + border-radius: 5px; + background-color: #f9f9f9; +} + +footer { + text-align: center; + padding: 10px; + background-color: #4CAF50; + color: white; + width: 100%; + position: fixed; + bottom: 0; +} \ No newline at end of file