commit b1098841588983e3ea0a5d2fc9806ced0f8f34c3
Author: root <root@hub.scroll.pub> Date: 2024-12-31 07:41:31 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..7526e29 --- /dev/null +++ b/body.html @@ -0,0 +1,39 @@ +<header> + <h1>Cultivation Chronicles</h1> + <p>Embark on a journey of spiritual growth and ancient wisdom.</p> +</header> + +<main> + <section id="dialogue-section"> + <div id="dialogue-box"> + <p id="dialogue-text">Welcome, cultivator. Choose your path wisely.</p> + </div> + <div id="choices"> + <button class="choice-btn" data-choice="1">Seek Enlightenment</button> + <button class="choice-btn" data-choice="2">Train in Martial Arts</button> + <button class="choice-btn" data-choice="3">Explore the Mystic Realm</button> + </div> + </section> + + <section id="progress-section"> + <h2>Your Cultivation Progress</h2> + <div id="progress-bars"> + <div class="progress-bar"> + <label for="spirit">Spirit</label> + <progress id="spirit" value="30" max="100"></progress> + </div> + <div class="progress-bar"> + <label for="strength">Strength</label> + <progress id="strength" value="50" max="100"></progress> + </div> + <div class="progress-bar"> + <label for="wisdom">Wisdom</label> + <progress id="wisdom" value="20" max="100"></progress> + </div> + </div> + </section> +</main> + +<footer> + <p>Continue your journey and unlock the secrets of the universe.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..6dd5327 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://cultivation.scroll.pub +metaTags +editButton /edit.html +title Cultivation Chronicles: A Dialogue-Based Cultivation Game +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..0df90f1 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "9dd498ca-020f-4eb9-b49d-bfbe91ce691d", + "object": "chat.completion", + "created": 1735630867, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\ncultivation.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://cultivation.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Cultivation Chronicles: A Dialogue-Based Cultivation Game\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Cultivation Chronicles</h1>\n <p>Embark on a journey of spiritual growth and ancient wisdom.</p>\n</header>\n\n<main>\n <section id=\"dialogue-section\">\n <div id=\"dialogue-box\">\n <p id=\"dialogue-text\">Welcome, cultivator. Choose your path wisely.</p>\n </div>\n <div id=\"choices\">\n <button class=\"choice-btn\" data-choice=\"1\">Seek Enlightenment</button>\n <button class=\"choice-btn\" data-choice=\"2\">Train in Martial Arts</button>\n <button class=\"choice-btn\" data-choice=\"3\">Explore the Mystic Realm</button>\n </div>\n </section>\n\n <section id=\"progress-section\">\n <h2>Your Cultivation Progress</h2>\n <div id=\"progress-bars\">\n <div class=\"progress-bar\">\n <label for=\"spirit\">Spirit</label>\n <progress id=\"spirit\" value=\"30\" max=\"100\"></progress>\n </div>\n <div class=\"progress-bar\">\n <label for=\"strength\">Strength</label>\n <progress id=\"strength\" value=\"50\" max=\"100\"></progress>\n </div>\n <div class=\"progress-bar\">\n <label for=\"wisdom\">Wisdom</label>\n <progress id=\"wisdom\" value=\"20\" max=\"100\"></progress>\n </div>\n </div>\n </section>\n</main>\n\n<footer>\n <p>Continue your journey and unlock the secrets of the universe.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f4a261;\n --background-color: #f0f4f8;\n --text-color: #333;\n --font-family: 'Georgia', serif;\n}\n\nbody {\n font-family: var(--font-family);\n background-color: var(--background-color);\n color: var(--text-color);\n margin: 0;\n padding: 20px;\n line-height: 1.6;\n}\n\nheader {\n text-align: center;\n margin-bottom: 40px;\n}\n\nheader h1 {\n color: var(--primary-color);\n font-size: 2.5rem;\n}\n\nheader p {\n font-size: 1.2rem;\n color: var(--secondary-color);\n}\n\n#dialogue-section {\n background: white;\n padding: 20px;\n border-radius: 10px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n margin-bottom: 20px;\n}\n\n#dialogue-box {\n margin-bottom: 20px;\n}\n\n#dialogue-text {\n font-size: 1.1rem;\n color: var(--text-color);\n}\n\n#choices {\n display: flex;\n justify-content: space-around;\n}\n\n.choice-btn {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\n.choice-btn:hover {\n background-color: var(--secondary-color);\n}\n\n#progress-section {\n background: white;\n padding: 20px;\n border-radius: 10px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\n#progress-bars {\n display: flex;\n justify-content: space-around;\n}\n\n.progress-bar {\n text-align: center;\n}\n\n.progress-bar label {\n display: block;\n margin-bottom: 5px;\n font-size: 1rem;\n color: var(--text-color);\n}\n\nprogress {\n width: 100%;\n height: 10px;\n border-radius: 5px;\n}\n\nfooter {\n text-align: center;\n margin-top: 40px;\n font-size: 0.9rem;\n color: var(--secondary-color);\n}\n\n@media (max-width: 768px) {\n #choices {\n flex-direction: column;\n }\n\n .choice-btn {\n margin-bottom: 10px;\n }\n\n #progress-bars {\n flex-direction: column;\n }\n\n .progress-bar {\n margin-bottom: 20px;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const dialogueText = document.getElementById('dialogue-text');\n const choiceButtons = document.querySelectorAll('.choice-btn');\n const spiritProgress = document.getElementById('spirit');\n const strengthProgress = document.getElementById('strength');\n const wisdomProgress = document.getElementById('wisdom');\n\n const dialogues = {\n 1: \"You meditate under the ancient tree, feeling your spirit grow stronger.\",\n 2: \"You train tirelessly, your body becoming a weapon of unmatched strength.\",\n 3: \"You explore the mystic realm, gaining wisdom from the ancient spirits.\"\n };\n\n choiceButtons.forEach(button => {\n button.addEventListener('click', function() {\n const choice = this.getAttribute('data-choice');\n dialogueText.textContent = dialogues[choice];\n\n // Update progress based on choice\n if (choice === '1') {\n spiritProgress.value += 10;\n } else if (choice === '2') {\n strengthProgress.value += 10;\n } else if (choice === '3') {\n wisdomProgress.value += 10;\n }\n\n // Ensure progress does not exceed max\n if (spiritProgress.value > 100) spiritProgress.value = 100;\n if (strengthProgress.value > 100) strengthProgress.value = 100;\n if (wisdomProgress.value > 100) wisdomProgress.value = 100;\n });\n });\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 242, + "completion_tokens": 1319, + "total_tokens": 1561, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 242 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..9ffbb41 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# cultivation.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..1dfb345 --- /dev/null +++ b/script.js @@ -0,0 +1,34 @@ +document.addEventListener('DOMContentLoaded', function() { + const dialogueText = document.getElementById('dialogue-text'); + const choiceButtons = document.querySelectorAll('.choice-btn'); + const spiritProgress = document.getElementById('spirit'); + const strengthProgress = document.getElementById('strength'); + const wisdomProgress = document.getElementById('wisdom'); + + const dialogues = { + 1: "You meditate under the ancient tree, feeling your spirit grow stronger.", + 2: "You train tirelessly, your body becoming a weapon of unmatched strength.", + 3: "You explore the mystic realm, gaining wisdom from the ancient spirits." + }; + + choiceButtons.forEach(button => { + button.addEventListener('click', function() { + const choice = this.getAttribute('data-choice'); + dialogueText.textContent = dialogues[choice]; + + // Update progress based on choice + if (choice === '1') { + spiritProgress.value += 10; + } else if (choice === '2') { + strengthProgress.value += 10; + } else if (choice === '3') { + wisdomProgress.value += 10; + } + + // Ensure progress does not exceed max + if (spiritProgress.value > 100) spiritProgress.value = 100; + if (strengthProgress.value > 100) strengthProgress.value = 100; + if (wisdomProgress.value > 100) wisdomProgress.value = 100; + }); + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..c6d18fa --- /dev/null +++ b/style.css @@ -0,0 +1,121 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #f4a261; + --background-color: #f0f4f8; + --text-color: #333; + --font-family: 'Georgia', serif; +} + +body { + font-family: var(--font-family); + background-color: var(--background-color); + color: var(--text-color); + margin: 0; + padding: 20px; + line-height: 1.6; +} + +header { + text-align: center; + margin-bottom: 40px; +} + +header h1 { + color: var(--primary-color); + font-size: 2.5rem; +} + +header p { + font-size: 1.2rem; + color: var(--secondary-color); +} + +#dialogue-section { + background: white; + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + margin-bottom: 20px; +} + +#dialogue-box { + margin-bottom: 20px; +} + +#dialogue-text { + font-size: 1.1rem; + color: var(--text-color); +} + +#choices { + display: flex; + justify-content: space-around; +} + +.choice-btn { + background-color: var(--primary-color); + color: white; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s; +} + +.choice-btn:hover { + background-color: var(--secondary-color); +} + +#progress-section { + background: white; + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +#progress-bars { + display: flex; + justify-content: space-around; +} + +.progress-bar { + text-align: center; +} + +.progress-bar label { + display: block; + margin-bottom: 5px; + font-size: 1rem; + color: var(--text-color); +} + +progress { + width: 100%; + height: 10px; + border-radius: 5px; +} + +footer { + text-align: center; + margin-top: 40px; + font-size: 0.9rem; + color: var(--secondary-color); +} + +@media (max-width: 768px) { + #choices { + flex-direction: column; + } + + .choice-btn { + margin-bottom: 10px; + } + + #progress-bars { + flex-direction: column; + } + + .progress-bar { + margin-bottom: 20px; + } +} \ No newline at end of file