User prompt
Haz las opciones más pequeñas para que se puedan ver todas
User prompt
Extiende las historias hasta llegar al capítulo 5
User prompt
Extiende las historias y haz más finales
User prompt
Haz el texto narrativo más pequeño
User prompt
Haz los botones y los textos el doble de grandes y más separados entre sí
User prompt
Haz los botones más grandes y más separados entre sí
User prompt
Haz los botones más separados entre sí
User prompt
Haz los textos y los botones más grandes
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'storage.storyProgress = {' Line Number: 799 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'storage.storyProgress = {' Line Number: 799 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'storage.storyProgress = {' Line Number: 796 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'storage.storyProgress = {' Line Number: 796 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'storage.storyProgress = {' Line Number: 793
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'storage.storyProgress = {' Line Number: 789 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'chapter')' in or related to this line: 'var chapterText = new Text2(translations[currentLanguage].chapter + ' 1', {' Line Number: 742
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'chapter')' in or related to this line: 'var chapterText = new Text2(translations[currentLanguage].chapter + ' 1', {' Line Number: 742
User prompt
Haz que el juego tenga una opción para cambiarse entre el idioma inglés y el idioma español ↪💡 Consider importing and using the following plugins: @upit/storage.v1
Code edit (1 edits merged)
Please save this source code
User prompt
Choose Your Path
Initial prompt
Un juego del estilo "Decide tu propia aventura" donde el jugador va tomando decisiones a medida que va avanzando en el juego, el jugador se va encontrando con diferentes personajes y va descubriendo la historia del mundo. El juego tiene múltiples finales dependiendo de las decisones que tome el jugador.
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1", { language: "en" }); /**** * Classes ****/ var ChoiceButton = Container.expand(function (text, callback) { var self = Container.call(this); var buttonBg = self.attachAsset('choiceButton', { anchorX: 0.5, anchorY: 0.5 }); var buttonText = new Text2(text, { size: 120, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.isHovered = false; self.callback = callback; self.down = function (x, y, obj) { if (self.callback) { self.callback(); } }; self.setHover = function (hover) { if (hover && !self.isHovered) { self.isHovered = true; tween(buttonBg, { scaleX: 1.1, scaleY: 1.1 }, { duration: 200 }); buttonBg.tint = 0x533483; } else if (!hover && self.isHovered) { self.isHovered = false; tween(buttonBg, { scaleX: 1.0, scaleY: 1.0 }, { duration: 200 }); buttonBg.tint = 0xffffff; } }; return self; }); var ProgressIndicator = Container.expand(function () { var self = Container.call(this); var progressBg = self.attachAsset('progressBar', { anchorX: 0.5, anchorY: 0.5 }); progressBg.alpha = 0.3; var progressFill = self.attachAsset('progressFill', { anchorX: 0, anchorY: 0.5 }); progressFill.x = -800; self.setProgress = function (percentage) { var targetWidth = 1600 * (percentage / 100); tween(progressFill, { width: targetWidth }, { duration: 500 }); }; return self; }); var StoryPanel = Container.expand(function () { var self = Container.call(this); var panelBg = self.attachAsset('textPanel', { anchorX: 0.5, anchorY: 0.5 }); panelBg.alpha = 0.9; var storyText = new Text2('', { size: 65, fill: 0xFFFFFF }); storyText.anchor.set(0.5, 0.5); self.addChild(storyText); self.setText = function (text) { storyText.setText(text); // Wrap text if too long if (storyText.width > 1600) { var words = text.split(' '); var lines = []; var currentLine = ''; for (var i = 0; i < words.length; i++) { var testLine = currentLine + words[i] + ' '; storyText.setText(testLine); if (storyText.width > 1600 && currentLine !== '') { lines.push(currentLine.trim()); currentLine = words[i] + ' '; } else { currentLine = testLine; } } lines.push(currentLine.trim()); storyText.setText(lines.join('\n')); } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x0f0f23 }); /**** * Game Code ****/ // Initialize storage with safe defaults if not already set // Translation data try { if (!storage.storyProgress) { storage.storyProgress = { currentNode: "intro", history: [], visitedNodes: 0 }; } } catch (e) { // Fallback if storage is not available storage = { storyProgress: { currentNode: "intro", history: [], visitedNodes: 0 }, language: "en" }; } var translations = { en: { chapter: 'Chapter', newStory: 'Start New Story', language: 'Language' }, es: { chapter: 'Capítulo', newStory: 'Nueva Historia', language: 'Idioma' } }; // Story data structure (English) var storyDataEN = { intro: { text: "You wake up in a mysterious forest. The moonlight filters through ancient trees, casting eerie shadows. You hear distant sounds...", choices: [{ text: "Follow the sounds", next: "sounds" }, { text: "Stay hidden and observe", next: "hidden" }, { text: "Climb a tree for better view", next: "climb" }] }, sounds: { text: "You venture toward the sounds and discover a campfire with a hooded figure sitting alone. They look up as you approach.", choices: [{ text: "Greet them peacefully", next: "peaceful" }, { text: "Ask who they are", next: "suspicious" }, { text: "Back away slowly", next: "retreat" }] }, hidden: { text: "From your hiding spot, you observe strange lights dancing between the trees. They seem to pulse with life.", choices: [{ text: "Investigate the lights", next: "lights" }, { text: "Wait longer", next: "wait" }, { text: "Try to find another path", next: "path" }] }, climb: { text: "From the treetop, you see a vast landscape with a distant castle and what appears to be a village below.", choices: [{ text: "Head toward the castle", next: "castle" }, { text: "Go to the village", next: "village" }, { text: "Explore the forest more", next: "explore" }] }, peaceful: { text: "The figure smiles and offers you food. 'Traveler,' they say, 'you seem lost. I can help you find your way.'", choices: [{ text: "Accept their help", next: "accept_help" }, { text: "Politely decline", next: "decline_help" }] }, suspicious: { text: "The figure chuckles. 'I am someone who has been waiting for you. Your destiny calls, but the path is treacherous.'", choices: [{ text: "Ask about your destiny", next: "destiny" }, { text: "Express doubt", next: "doubt" }, { text: "Ask about the treacherous path", next: "shadow_realm" }] }, retreat: { text: "As you back away, you step on a twig. The figure calls out, 'Don't be afraid! I mean no harm!'", choices: [{ text: "Stop and turn around", next: "turn_around" }, { text: "Continue retreating", next: "continue_retreat" }] }, lights: { text: "The lights are magical fireflies that lead you to an ancient shrine. Strange symbols glow on its surface.", choices: [{ text: "Touch the symbols", next: "symbols" }, { text: "Study them first", next: "study" }] }, wait: { text: "After waiting, you see the lights form a path leading deeper into the forest. It seems like an invitation.", choices: [{ text: "Follow the light path", next: "light_path" }, { text: "Ignore it and leave", next: "ignore" }] }, path: { text: "You find a winding path that leads to a crossroads with three different routes marked by stone markers.", choices: [{ text: "Take the left path", next: "left_path" }, { text: "Take the right path", next: "right_path" }] }, castle: { text: "You reach the castle gates. They're open, but darkness lurks within. This could be the end of your journey.", choices: [{ text: "Enter the castle", next: "ending_castle" }, { text: "Turn back", next: "ending_retreat" }] }, village: { text: "In the village, friendly people welcome you. You've found a new home and community.", choices: [{ text: "Stay with the villagers", next: "ending_village" }] }, explore: { text: "Deep in the forest, you discover ancient ruins that hold the secrets of this mysterious world.", choices: [{ text: "Become the guardian", next: "ending_guardian" }, { text: "Search for a magical grove", next: "magical_grove" }, { text: "Look for crystal caves", next: "crystal_caves" }] }, accept_help: { text: "With their guidance, you find your way back to civilization and start a new chapter in your life.", choices: [{ text: "Begin your new life", next: "ending_new_life" }] }, decline_help: { text: "You thank them but choose to forge your own path, learning independence and self-reliance.", choices: [{ text: "Continue alone", next: "ending_independent" }] }, destiny: { text: "They reveal you're the chosen one who must save this realm. You accept the responsibility.", choices: [{ text: "Embrace your destiny", next: "ending_hero" }] }, doubt: { text: "Your skepticism proves wise. You discover they were testing your judgment. You pass their test.", choices: [{ text: "Accept their wisdom", next: "ending_wise" }] }, turn_around: { text: "You return and learn they're a helpful spirit guide who leads you to safety.", choices: [{ text: "Follow the spirit", next: "ending_guided" }] }, continue_retreat: { text: "You escape but remain lost in the forest forever, becoming part of its mystery.", choices: [{ text: "Accept your fate", next: "ending_lost" }] }, symbols: { text: "Touching the symbols grants you magical powers. You become a forest protector.", choices: [{ text: "Protect the forest", next: "ending_protector" }] }, study: { text: "Your careful study reveals the shrine's secrets without triggering any traps.", choices: [{ text: "Use the knowledge", next: "ending_scholar" }] }, light_path: { text: "The light path leads you to a realm of eternal beauty where you find true happiness.", choices: [{ text: "Stay in paradise", next: "ending_paradise" }] }, ignore: { text: "You leave the forest but always wonder what could have been. You live with regret.", choices: [{ text: "Live with uncertainty", next: "ending_regret" }] }, left_path: { text: "The left path leads to a hidden treasure that makes you wealthy beyond measure.", choices: [{ text: "Claim the treasure", next: "ending_wealthy" }] }, right_path: { text: "The right path brings you to a wise sage who teaches you the meaning of life.", choices: [{ text: "Learn from the sage", next: "ending_enlightened" }] }, // Endings ending_castle: { text: "You enter the castle and become its new ruler, bringing light to the darkness.", isEnding: true }, ending_retreat: { text: "You choose safety over adventure and return home, valuing caution over curiosity.", isEnding: true }, ending_village: { text: "You find happiness in simple community life, surrounded by friends and purpose.", isEnding: true }, ending_guardian: { text: "You become the eternal guardian of ancient secrets, protecting them for future generations.", isEnding: true }, ending_new_life: { text: "With help from others, you build a successful and fulfilling new life in civilization.", isEnding: true }, ending_independent: { text: "Your self-reliance leads to great personal growth and eventual success on your own terms.", isEnding: true }, ending_hero: { text: "You embrace your role as the chosen one and save the realm, becoming a legendary hero.", isEnding: true }, ending_wise: { text: "Your wisdom and caution are rewarded with knowledge and respect from the mystical beings.", isEnding: true }, ending_guided: { text: "The spirit guide leads you to enlightenment and you become a bridge between worlds.", isEnding: true }, ending_lost: { text: "You become part of the forest's eternal mystery, your story inspiring future travelers.", isEnding: true }, ending_protector: { text: "With magical powers, you protect the forest and its creatures for eternity.", isEnding: true }, ending_scholar: { text: "Your knowledge of the ancient symbols makes you a renowned scholar and historian.", isEnding: true }, ending_paradise: { text: "You find eternal happiness in the magical realm, living in perfect harmony.", isEnding: true }, ending_regret: { text: "You return to normal life but are forever changed by the mysterious encounter.", isEnding: true }, ending_wealthy: { text: "The treasure makes you rich, and you use your wealth to help others find their paths.", isEnding: true }, ending_enlightened: { text: "The sage's wisdom transforms you into a teacher who helps others find meaning.", isEnding: true }, // New extended story paths magical_grove: { text: "You discover a hidden grove where time moves differently. Ancient trees whisper secrets of past and future.", choices: [{ text: "Listen to the whispers", next: "time_whispers" }, { text: "Plant a new tree", next: "plant_tree" }, { text: "Meditate in the center", next: "grove_meditation" }] }, time_whispers: { text: "The whispers reveal visions of possible futures. You see yourself in different roles across time.", choices: [{ text: "Choose the path of the healer", next: "ending_healer" }, { text: "Choose the path of the inventor", next: "ending_inventor" }, { text: "Choose to remain a wanderer", next: "ending_eternal_wanderer" }] }, plant_tree: { text: "Your planted tree grows instantly, creating a bridge between realms. You become its caretaker.", choices: [{ text: "Tend the bridge tree", next: "ending_bridge_keeper" }, { text: "Travel between realms", next: "ending_realm_traveler" }] }, grove_meditation: { text: "Deep meditation reveals your true purpose. You understand the balance of all things.", choices: [{ text: "Become a balance keeper", next: "ending_balance_keeper" }, { text: "Share this wisdom", next: "ending_wisdom_spreader" }] }, crystal_caves: { text: "You find crystalline caves that sing with harmonic frequencies. Each crystal holds memories.", choices: [{ text: "Touch the memory crystals", next: "memory_crystals" }, { text: "Create new harmonies", next: "crystal_music" }, { text: "Take a crystal as companion", next: "crystal_companion" }] }, memory_crystals: { text: "The crystals show you memories of all who came before. You understand the cycle of life.", choices: [{ text: "Preserve these memories", next: "ending_memory_keeper" }, { text: "Add your own memories", next: "ending_legacy_weaver" }] }, crystal_music: { text: "Your music with the crystals creates beautiful melodies that heal hearts across the land.", choices: [{ text: "Become a crystal musician", next: "ending_crystal_bard" }, { text: "Teach others this music", next: "ending_harmony_teacher" }] }, crystal_companion: { text: "The crystal becomes your lifelong companion, guiding you on adventures across many worlds.", choices: [{ text: "Explore new worlds together", next: "ending_world_explorer" }, { text: "Return home with wisdom", next: "ending_transformed_return" }] }, shadow_realm: { text: "You slip into a realm of shadows where your fears take physical form, but so does your courage.", choices: [{ text: "Face your fears directly", next: "confront_fears" }, { text: "Befriend the shadows", next: "shadow_alliance" }, { text: "Use courage to light the way", next: "courage_light" }] }, confront_fears: { text: "By facing your fears, you transform them into strengths. You become fearless.", choices: [{ text: "Help others face their fears", next: "ending_fear_helper" }, { text: "Become a shadow warrior", next: "ending_shadow_warrior" }] }, shadow_alliance: { text: "The shadows become your allies, teaching you to see truth hidden in darkness.", choices: [{ text: "Become a truth seeker", next: "ending_truth_seeker" }, { text: "Master shadow magic", next: "ending_shadow_mage" }] }, courage_light: { text: "Your courage creates light that banishes the shadow realm's darkness forever.", choices: [{ text: "Become a light bringer", next: "ending_light_bringer" }, { text: "Guard against future darkness", next: "ending_darkness_sentinel" }] }, // New endings ending_healer: { text: "You become a legendary healer, using time magic to cure ailments across all ages.", isEnding: true }, ending_inventor: { text: "Your inventions, inspired by time's wisdom, revolutionize the world and solve great problems.", isEnding: true }, ending_eternal_wanderer: { text: "You choose the path of eternal wandering, experiencing infinite adventures across time.", isEnding: true }, ending_bridge_keeper: { text: "As keeper of the bridge tree, you maintain peace between different realms forever.", isEnding: true }, ending_realm_traveler: { text: "You become an interdimensional traveler, bringing knowledge and hope to countless worlds.", isEnding: true }, ending_balance_keeper: { text: "You maintain the cosmic balance, ensuring harmony between all forces of nature.", isEnding: true }, ending_wisdom_spreader: { text: "You travel the world sharing the grove's wisdom, enlightening all who listen.", isEnding: true }, ending_memory_keeper: { text: "You become the eternal keeper of memories, preserving the stories of all living beings.", isEnding: true }, ending_legacy_weaver: { text: "You weave new stories into the crystal memories, ensuring future generations learn from the past.", isEnding: true }, ending_crystal_bard: { text: "Your crystal music becomes legendary, healing hearts and inspiring love wherever you go.", isEnding: true }, ending_harmony_teacher: { text: "You establish a school of crystal harmony, teaching others to heal the world through music.", isEnding: true }, ending_world_explorer: { text: "With your crystal companion, you discover infinite worlds and become a multiversal adventurer.", isEnding: true }, ending_transformed_return: { text: "You return home transformed, using your crystal's wisdom to improve your original world.", isEnding: true }, ending_fear_helper: { text: "You dedicate your life to helping others overcome their fears, becoming a beacon of courage.", isEnding: true }, ending_shadow_warrior: { text: "You become a warrior who fights darkness wherever it threatens innocent lives.", isEnding: true }, ending_truth_seeker: { text: "You devote yourself to uncovering hidden truths, exposing lies and bringing justice.", isEnding: true }, ending_shadow_mage: { text: "You master shadow magic, using it to protect the innocent and maintain cosmic balance.", isEnding: true }, ending_light_bringer: { text: "You become a bringer of light, illuminating dark places and bringing hope to the hopeless.", isEnding: true }, ending_darkness_sentinel: { text: "You stand eternal guard against darkness, ensuring shadow realms never threaten the world again.", isEnding: true } }; // Story data structure (Spanish) var storyDataES = { intro: { text: "Despiertas en un bosque misterioso. La luz de la luna se filtra a través de árboles antiguos, creando sombras inquietantes. Escuchas sonidos distantes...", choices: [{ text: "Seguir los sonidos", next: "sounds" }, { text: "Permanecer escondido y observar", next: "hidden" }, { text: "Trepar un árbol para ver mejor", next: "climb" }] }, sounds: { text: "Te aventuras hacia los sonidos y descubres una fogata con una figura encapuchada sentada sola. Te miran cuando te acercas.", choices: [{ text: "Saludarlos pacíficamente", next: "peaceful" }, { text: "Preguntar quiénes son", next: "suspicious" }, { text: "Retroceder lentamente", next: "retreat" }] }, hidden: { text: "Desde tu escondite, observas luces extrañas danzando entre los árboles. Parecen pulsar con vida.", choices: [{ text: "Investigar las luces", next: "lights" }, { text: "Esperar más tiempo", next: "wait" }, { text: "Tratar de encontrar otro camino", next: "path" }] }, climb: { text: "Desde la copa del árbol, ves un vasto paisaje con un castillo distante y lo que parece ser un pueblo abajo.", choices: [{ text: "Dirigirse hacia el castillo", next: "castle" }, { text: "Ir al pueblo", next: "village" }, { text: "Explorar más el bosque", next: "explore" }] }, peaceful: { text: "La figura sonríe y te ofrece comida. 'Viajero,' dice, 'pareces perdido. Puedo ayudarte a encontrar tu camino.'", choices: [{ text: "Aceptar su ayuda", next: "accept_help" }, { text: "Declinar educadamente", next: "decline_help" }] }, suspicious: { text: "La figura se ríe. 'Soy alguien que te ha estado esperando. Tu destino llama, pero el camino es traicionero.'", choices: [{ text: "Preguntar sobre tu destino", next: "destiny" }, { text: "Expresar dudas", next: "doubt" }, { text: "Preguntar sobre el camino traicionero", next: "shadow_realm" }] }, retreat: { text: "Al retroceder, pisas una rama. La figura grita, '¡No tengas miedo! ¡No pretendo hacerte daño!'", choices: [{ text: "Detenerse y darse la vuelta", next: "turn_around" }, { text: "Continuar retrocediendo", next: "continue_retreat" }] }, lights: { text: "Las luces son luciérnagas mágicas que te llevan a un santuario antiguo. Símbolos extraños brillan en su superficie.", choices: [{ text: "Tocar los símbolos", next: "symbols" }, { text: "Estudiarlos primero", next: "study" }] }, wait: { text: "Después de esperar, ves las luces formar un sendero que lleva más profundo al bosque. Parece una invitación.", choices: [{ text: "Seguir el sendero de luz", next: "light_path" }, { text: "Ignorarlo e irse", next: "ignore" }] }, path: { text: "Encuentras un sendero serpenteante que lleva a un cruce con tres rutas diferentes marcadas por marcadores de piedra.", choices: [{ text: "Tomar el sendero izquierdo", next: "left_path" }, { text: "Tomar el sendero derecho", next: "right_path" }] }, castle: { text: "Llegas a las puertas del castillo. Están abiertas, pero la oscuridad acecha dentro. Este podría ser el final de tu viaje.", choices: [{ text: "Entrar al castillo", next: "ending_castle" }, { text: "Darse la vuelta", next: "ending_retreat" }] }, village: { text: "En el pueblo, gente amigable te da la bienvenida. Has encontrado un nuevo hogar y comunidad.", choices: [{ text: "Quedarse con los aldeanos", next: "ending_village" }] }, explore: { text: "En lo profundo del bosque, descubres ruinas antiguas que guardan los secretos de este mundo misterioso.", choices: [{ text: "Convertirse en el guardián", next: "ending_guardian" }, { text: "Buscar un bosque mágico", next: "magical_grove" }, { text: "Buscar cuevas de cristal", next: "crystal_caves" }] }, accept_help: { text: "Con su guía, encuentras tu camino de regreso a la civilización y comienzas un nuevo capítulo en tu vida.", choices: [{ text: "Comenzar tu nueva vida", next: "ending_new_life" }] }, decline_help: { text: "Les agradeces pero eliges forjar tu propio camino, aprendiendo independencia y autosuficiencia.", choices: [{ text: "Continuar solo", next: "ending_independent" }] }, destiny: { text: "Te revelan que eres el elegido que debe salvar este reino. Aceptas la responsabilidad.", choices: [{ text: "Abrazar tu destino", next: "ending_hero" }] }, doubt: { text: "Tu escepticismo resulta sabio. Descubres que estaban probando tu juicio. Pasas su prueba.", choices: [{ text: "Aceptar su sabiduría", next: "ending_wise" }] }, turn_around: { text: "Regresas y aprendes que son un espíritu guía útil que te lleva a la seguridad.", choices: [{ text: "Seguir al espíritu", next: "ending_guided" }] }, continue_retreat: { text: "Escapas pero permaneces perdido en el bosque para siempre, convirtiéndote en parte de su misterio.", choices: [{ text: "Aceptar tu destino", next: "ending_lost" }] }, symbols: { text: "Tocar los símbolos te otorga poderes mágicos. Te conviertes en un protector del bosque.", choices: [{ text: "Proteger el bosque", next: "ending_protector" }] }, study: { text: "Tu estudio cuidadoso revela los secretos del santuario sin activar ninguna trampa.", choices: [{ text: "Usar el conocimiento", next: "ending_scholar" }] }, light_path: { text: "El sendero de luz te lleva a un reino de belleza eterna donde encuentras la verdadera felicidad.", choices: [{ text: "Quedarse en el paraíso", next: "ending_paradise" }] }, ignore: { text: "Dejas el bosque pero siempre te preguntas qué podría haber sido. Vives con arrepentimiento.", choices: [{ text: "Vivir con incertidumbre", next: "ending_regret" }] }, left_path: { text: "El sendero izquierdo lleva a un tesoro oculto que te hace rico más allá de toda medida.", choices: [{ text: "Reclamar el tesoro", next: "ending_wealthy" }] }, right_path: { text: "El sendero derecho te lleva a un sabio que te enseña el significado de la vida.", choices: [{ text: "Aprender del sabio", next: "ending_enlightened" }] }, // Endings ending_castle: { text: "Entras al castillo y te conviertes en su nuevo gobernante, trayendo luz a la oscuridad.", isEnding: true }, ending_retreat: { text: "Eliges la seguridad sobre la aventura y regresas a casa, valorando la precaución sobre la curiosidad.", isEnding: true }, ending_village: { text: "Encuentras la felicidad en la vida comunitaria simple, rodeado de amigos y propósito.", isEnding: true }, ending_guardian: { text: "Te conviertes en el guardián eterno de secretos antiguos, protegiéndolos para futuras generaciones.", isEnding: true }, ending_new_life: { text: "Con la ayuda de otros, construyes una nueva vida exitosa y plena en la civilización.", isEnding: true }, ending_independent: { text: "Tu autosuficiencia lleva a un gran crecimiento personal y eventual éxito en tus propios términos.", isEnding: true }, ending_hero: { text: "Abrazas tu papel como el elegido y salvas el reino, convirtiéndote en un héroe legendario.", isEnding: true }, ending_wise: { text: "Tu sabiduría y precaución son recompensadas con conocimiento y respeto de los seres místicos.", isEnding: true }, ending_guided: { text: "El espíritu guía te lleva a la iluminación y te conviertes en un puente entre mundos.", isEnding: true }, ending_lost: { text: "Te conviertes en parte del misterio eterno del bosque, tu historia inspira a futuros viajeros.", isEnding: true }, ending_protector: { text: "Con poderes mágicos, proteges el bosque y sus criaturas por la eternidad.", isEnding: true }, ending_scholar: { text: "Tu conocimiento de los símbolos antiguos te convierte en un erudito e historiador renombrado.", isEnding: true }, ending_paradise: { text: "Encuentras la felicidad eterna en el reino mágico, viviendo en perfecta armonía.", isEnding: true }, ending_regret: { text: "Regresas a la vida normal pero estás para siempre cambiado por el encuentro misterioso.", isEnding: true }, ending_wealthy: { text: "El tesoro te hace rico, y usas tu riqueza para ayudar a otros a encontrar sus caminos.", isEnding: true }, ending_enlightened: { text: "La sabiduría del sabio te transforma en un maestro que ayuda a otros a encontrar significado.", isEnding: true }, // Nuevos caminos de historia extendidos magical_grove: { text: "Descubres un bosque oculto donde el tiempo se mueve diferente. Árboles antiguos susurran secretos del pasado y futuro.", choices: [{ text: "Escuchar los susurros", next: "time_whispers" }, { text: "Plantar un nuevo árbol", next: "plant_tree" }, { text: "Meditar en el centro", next: "grove_meditation" }] }, time_whispers: { text: "Los susurros revelan visiones de futuros posibles. Te ves a ti mismo en diferentes roles a través del tiempo.", choices: [{ text: "Elegir el camino del curandero", next: "ending_healer" }, { text: "Elegir el camino del inventor", next: "ending_inventor" }, { text: "Elegir seguir siendo un vagabundo", next: "ending_eternal_wanderer" }] }, plant_tree: { text: "Tu árbol plantado crece instantáneamente, creando un puente entre reinos. Te conviertes en su cuidador.", choices: [{ text: "Cuidar el árbol puente", next: "ending_bridge_keeper" }, { text: "Viajar entre reinos", next: "ending_realm_traveler" }] }, grove_meditation: { text: "La meditación profunda revela tu verdadero propósito. Entiendes el equilibrio de todas las cosas.", choices: [{ text: "Convertirse en guardián del equilibrio", next: "ending_balance_keeper" }, { text: "Compartir esta sabiduría", next: "ending_wisdom_spreader" }] }, crystal_caves: { text: "Encuentras cuevas cristalinas que cantan con frecuencias armónicas. Cada cristal guarda memorias.", choices: [{ text: "Tocar los cristales de memoria", next: "memory_crystals" }, { text: "Crear nuevas armonías", next: "crystal_music" }, { text: "Tomar un cristal como compañero", next: "crystal_companion" }] }, memory_crystals: { text: "Los cristales te muestran memorias de todos los que vinieron antes. Entiendes el ciclo de la vida.", choices: [{ text: "Preservar estas memorias", next: "ending_memory_keeper" }, { text: "Añadir tus propias memorias", next: "ending_legacy_weaver" }] }, crystal_music: { text: "Tu música con los cristales crea melodías hermosas que sanan corazones a través de la tierra.", choices: [{ text: "Convertirse en músico de cristal", next: "ending_crystal_bard" }, { text: "Enseñar esta música a otros", next: "ending_harmony_teacher" }] }, crystal_companion: { text: "El cristal se convierte en tu compañero de vida, guiándote en aventuras a través de muchos mundos.", choices: [{ text: "Explorar nuevos mundos juntos", next: "ending_world_explorer" }, { text: "Regresar a casa con sabiduría", next: "ending_transformed_return" }] }, shadow_realm: { text: "Te deslizas a un reino de sombras donde tus miedos toman forma física, pero también tu valor.", choices: [{ text: "Enfrentar tus miedos directamente", next: "confront_fears" }, { text: "Hacer amistad con las sombras", next: "shadow_alliance" }, { text: "Usar valor para iluminar el camino", next: "courage_light" }] }, confront_fears: { text: "Al enfrentar tus miedos, los transformas en fortalezas. Te vuelves intrépido.", choices: [{ text: "Ayudar a otros a enfrentar sus miedos", next: "ending_fear_helper" }, { text: "Convertirse en guerrero de las sombras", next: "ending_shadow_warrior" }] }, shadow_alliance: { text: "Las sombras se vuelven tus aliadas, enseñándote a ver la verdad oculta en la oscuridad.", choices: [{ text: "Convertirse en buscador de la verdad", next: "ending_truth_seeker" }, { text: "Dominar la magia de las sombras", next: "ending_shadow_mage" }] }, courage_light: { text: "Tu valor crea luz que destierra la oscuridad del reino de las sombras para siempre.", choices: [{ text: "Convertirse en portador de luz", next: "ending_light_bringer" }, { text: "Proteger contra futuras oscuridades", next: "ending_darkness_sentinel" }] }, // Nuevos finales ending_healer: { text: "Te conviertes en un curandero legendario, usando magia del tiempo para curar dolencias en todas las edades.", isEnding: true }, ending_inventor: { text: "Tus inventos, inspirados por la sabiduría del tiempo, revolucionan el mundo y resuelven grandes problemas.", isEnding: true }, ending_eternal_wanderer: { text: "Eliges el camino del vagabundeo eterno, experimentando aventuras infinitas a través del tiempo.", isEnding: true }, ending_bridge_keeper: { text: "Como guardián del árbol puente, mantienes la paz entre diferentes reinos para siempre.", isEnding: true }, ending_realm_traveler: { text: "Te conviertes en un viajero interdimensional, llevando conocimiento y esperanza a mundos incontables.", isEnding: true }, ending_balance_keeper: { text: "Mantienes el equilibrio cósmico, asegurando armonía entre todas las fuerzas de la naturaleza.", isEnding: true }, ending_wisdom_spreader: { text: "Viajas por el mundo compartiendo la sabiduría del bosque, iluminando a todos los que escuchan.", isEnding: true }, ending_memory_keeper: { text: "Te conviertes en el guardián eterno de memorias, preservando las historias de todos los seres vivos.", isEnding: true }, ending_legacy_weaver: { text: "Tejes nuevas historias en las memorias de cristal, asegurando que futuras generaciones aprendan del pasado.", isEnding: true }, ending_crystal_bard: { text: "Tu música de cristal se vuelve legendaria, sanando corazones e inspirando amor dondequiera que vayas.", isEnding: true }, ending_harmony_teacher: { text: "Estableces una escuela de armonía cristalina, enseñando a otros a sanar el mundo a través de la música.", isEnding: true }, ending_world_explorer: { text: "Con tu compañero de cristal, descubres mundos infinitos y te conviertes en un aventurero multiversal.", isEnding: true }, ending_transformed_return: { text: "Regresas a casa transformado, usando la sabiduría de tu cristal para mejorar tu mundo original.", isEnding: true }, ending_fear_helper: { text: "Dedicas tu vida a ayudar a otros a superar sus miedos, convirtiéndote en un faro de valor.", isEnding: true }, ending_shadow_warrior: { text: "Te conviertes en un guerrero que lucha contra la oscuridad dondequiera que amenace vidas inocentes.", isEnding: true }, ending_truth_seeker: { text: "Te dedicas a descubrir verdades ocultas, exponiendo mentiras y trayendo justicia.", isEnding: true }, ending_shadow_mage: { text: "Dominas la magia de las sombras, usándola para proteger a los inocentes y mantener el equilibrio cósmico.", isEnding: true }, ending_light_bringer: { text: "Te conviertes en un portador de luz, iluminando lugares oscuros y trayendo esperanza a los sin esperanza.", isEnding: true }, ending_darkness_sentinel: { text: "Te conviertes en guardián eterno contra la oscuridad, asegurando que los reinos sombríos nunca amenacen el mundo otra vez.", isEnding: true } }; // Language system var currentLanguage = storage.language || 'en'; // Current story data based on language var storyData = currentLanguage === 'es' ? storyDataES : storyDataEN; // Game state var currentStoryNode = 'intro'; var storyHistory = []; var totalNodes = Object.keys(storyData).length; var visitedNodes = 0; // UI Elements var background = game.attachAsset('storyBackground', { anchorX: 0.5, anchorY: 0.5, x: 1024, y: 1366 }); var storyPanel = game.addChild(new StoryPanel()); storyPanel.x = 1024; storyPanel.y = 800; var progressIndicator = game.addChild(new ProgressIndicator()); progressIndicator.x = 1024; progressIndicator.y = 150; var choiceButtons = []; // Chapter indicator var chapterText = new Text2(translations[currentLanguage].chapter + ' 1', { size: 140, fill: 0xE94560 }); chapterText.anchor.set(0.5, 0); chapterText.x = 1024; chapterText.y = 200; game.addChild(chapterText); // Language toggle button var languageButton = game.addChild(new ChoiceButton(currentLanguage === 'en' ? 'Español' : 'English', function () { currentLanguage = currentLanguage === 'en' ? 'es' : 'en'; storage.language = currentLanguage; storyData = currentLanguage === 'es' ? storyDataES : storyDataEN; languageButton.children[1].setText(currentLanguage === 'en' ? 'Español' : 'English'); updateProgress(); displayCurrentStory(); })); languageButton.x = 1700; languageButton.y = 100; languageButton.scaleX = 0.6; languageButton.scaleY = 0.6; // Load saved progress var savedProgress = storage.storyProgress || {}; if (savedProgress.currentNode) { currentStoryNode = savedProgress.currentNode; storyHistory = savedProgress.history || []; visitedNodes = savedProgress.visitedNodes || 0; } function updateProgress() { var progressPercentage = visitedNodes / totalNodes * 100; progressIndicator.setProgress(progressPercentage); var chapterNumber = Math.floor(visitedNodes / 3) + 1; chapterText.setText(translations[currentLanguage].chapter + ' ' + chapterNumber); } function clearChoices() { for (var i = 0; i < choiceButtons.length; i++) { choiceButtons[i].destroy(); } choiceButtons = []; } function makeChoice(nextNode) { storyHistory.push(currentStoryNode); currentStoryNode = nextNode; visitedNodes++; // Save progress try { storage.storyProgress = { currentNode: currentStoryNode, history: storyHistory, visitedNodes: visitedNodes }; } catch (e) { console.log("Storage error:", e); } updateProgress(); displayCurrentStory(); } function displayCurrentStory() { var storyNode = storyData[currentStoryNode]; // Animate text appearance storyPanel.alpha = 0; storyPanel.setText(storyNode.text); tween(storyPanel, { alpha: 1 }, { duration: 1000 }); clearChoices(); if (storyNode.isEnding) { // Show ending var restartButton = game.addChild(new ChoiceButton(translations[currentLanguage].newStory, function () { // Reset game currentStoryNode = 'intro'; storyHistory = []; visitedNodes = 0; storage.storyProgress = {}; updateProgress(); displayCurrentStory(); })); restartButton.x = 1024; restartButton.y = 1500; choiceButtons.push(restartButton); // Update score based on ending var endingScore = visitedNodes * 10; LK.setScore(endingScore); // Show completion message LK.setTimeout(function () { LK.showYouWin(); }, 2000); } else { // Show choices var choices = storyNode.choices; var startY = 1400; var spacing = 500; for (var i = 0; i < choices.length; i++) { var choice = choices[i]; var button = game.addChild(new ChoiceButton(choice.text, function (nextNode) { return function () { makeChoice(nextNode); }; }(choice.next))); button.x = 1024; button.y = startY + i * spacing; button.alpha = 0; choiceButtons.push(button); // Animate button appearance tween(button, { alpha: 1 }, { duration: 500, easing: tween.easeOut }); } } } // Mouse interaction for button hover effects game.move = function (x, y, obj) { for (var i = 0; i < choiceButtons.length; i++) { var button = choiceButtons[i]; var distance = Math.sqrt(Math.pow(x - button.x, 2) + Math.pow(y - button.y, 2)); button.setHover(distance < 500); } }; // Initialize the game updateProgress(); displayCurrentStory();
===================================================================
--- original.js
+++ change.js
@@ -224,8 +224,11 @@
next: "destiny"
}, {
text: "Express doubt",
next: "doubt"
+ }, {
+ text: "Ask about the treacherous path",
+ next: "shadow_realm"
}]
},
retreat: {
text: "As you back away, you step on a twig. The figure calls out, 'Don't be afraid! I mean no harm!'",
@@ -288,8 +291,14 @@
text: "Deep in the forest, you discover ancient ruins that hold the secrets of this mysterious world.",
choices: [{
text: "Become the guardian",
next: "ending_guardian"
+ }, {
+ text: "Search for a magical grove",
+ next: "magical_grove"
+ }, {
+ text: "Look for crystal caves",
+ next: "crystal_caves"
}]
},
accept_help: {
text: "With their guidance, you find your way back to civilization and start a new chapter in your life.",
@@ -438,8 +447,218 @@
},
ending_enlightened: {
text: "The sage's wisdom transforms you into a teacher who helps others find meaning.",
isEnding: true
+ },
+ // New extended story paths
+ magical_grove: {
+ text: "You discover a hidden grove where time moves differently. Ancient trees whisper secrets of past and future.",
+ choices: [{
+ text: "Listen to the whispers",
+ next: "time_whispers"
+ }, {
+ text: "Plant a new tree",
+ next: "plant_tree"
+ }, {
+ text: "Meditate in the center",
+ next: "grove_meditation"
+ }]
+ },
+ time_whispers: {
+ text: "The whispers reveal visions of possible futures. You see yourself in different roles across time.",
+ choices: [{
+ text: "Choose the path of the healer",
+ next: "ending_healer"
+ }, {
+ text: "Choose the path of the inventor",
+ next: "ending_inventor"
+ }, {
+ text: "Choose to remain a wanderer",
+ next: "ending_eternal_wanderer"
+ }]
+ },
+ plant_tree: {
+ text: "Your planted tree grows instantly, creating a bridge between realms. You become its caretaker.",
+ choices: [{
+ text: "Tend the bridge tree",
+ next: "ending_bridge_keeper"
+ }, {
+ text: "Travel between realms",
+ next: "ending_realm_traveler"
+ }]
+ },
+ grove_meditation: {
+ text: "Deep meditation reveals your true purpose. You understand the balance of all things.",
+ choices: [{
+ text: "Become a balance keeper",
+ next: "ending_balance_keeper"
+ }, {
+ text: "Share this wisdom",
+ next: "ending_wisdom_spreader"
+ }]
+ },
+ crystal_caves: {
+ text: "You find crystalline caves that sing with harmonic frequencies. Each crystal holds memories.",
+ choices: [{
+ text: "Touch the memory crystals",
+ next: "memory_crystals"
+ }, {
+ text: "Create new harmonies",
+ next: "crystal_music"
+ }, {
+ text: "Take a crystal as companion",
+ next: "crystal_companion"
+ }]
+ },
+ memory_crystals: {
+ text: "The crystals show you memories of all who came before. You understand the cycle of life.",
+ choices: [{
+ text: "Preserve these memories",
+ next: "ending_memory_keeper"
+ }, {
+ text: "Add your own memories",
+ next: "ending_legacy_weaver"
+ }]
+ },
+ crystal_music: {
+ text: "Your music with the crystals creates beautiful melodies that heal hearts across the land.",
+ choices: [{
+ text: "Become a crystal musician",
+ next: "ending_crystal_bard"
+ }, {
+ text: "Teach others this music",
+ next: "ending_harmony_teacher"
+ }]
+ },
+ crystal_companion: {
+ text: "The crystal becomes your lifelong companion, guiding you on adventures across many worlds.",
+ choices: [{
+ text: "Explore new worlds together",
+ next: "ending_world_explorer"
+ }, {
+ text: "Return home with wisdom",
+ next: "ending_transformed_return"
+ }]
+ },
+ shadow_realm: {
+ text: "You slip into a realm of shadows where your fears take physical form, but so does your courage.",
+ choices: [{
+ text: "Face your fears directly",
+ next: "confront_fears"
+ }, {
+ text: "Befriend the shadows",
+ next: "shadow_alliance"
+ }, {
+ text: "Use courage to light the way",
+ next: "courage_light"
+ }]
+ },
+ confront_fears: {
+ text: "By facing your fears, you transform them into strengths. You become fearless.",
+ choices: [{
+ text: "Help others face their fears",
+ next: "ending_fear_helper"
+ }, {
+ text: "Become a shadow warrior",
+ next: "ending_shadow_warrior"
+ }]
+ },
+ shadow_alliance: {
+ text: "The shadows become your allies, teaching you to see truth hidden in darkness.",
+ choices: [{
+ text: "Become a truth seeker",
+ next: "ending_truth_seeker"
+ }, {
+ text: "Master shadow magic",
+ next: "ending_shadow_mage"
+ }]
+ },
+ courage_light: {
+ text: "Your courage creates light that banishes the shadow realm's darkness forever.",
+ choices: [{
+ text: "Become a light bringer",
+ next: "ending_light_bringer"
+ }, {
+ text: "Guard against future darkness",
+ next: "ending_darkness_sentinel"
+ }]
+ },
+ // New endings
+ ending_healer: {
+ text: "You become a legendary healer, using time magic to cure ailments across all ages.",
+ isEnding: true
+ },
+ ending_inventor: {
+ text: "Your inventions, inspired by time's wisdom, revolutionize the world and solve great problems.",
+ isEnding: true
+ },
+ ending_eternal_wanderer: {
+ text: "You choose the path of eternal wandering, experiencing infinite adventures across time.",
+ isEnding: true
+ },
+ ending_bridge_keeper: {
+ text: "As keeper of the bridge tree, you maintain peace between different realms forever.",
+ isEnding: true
+ },
+ ending_realm_traveler: {
+ text: "You become an interdimensional traveler, bringing knowledge and hope to countless worlds.",
+ isEnding: true
+ },
+ ending_balance_keeper: {
+ text: "You maintain the cosmic balance, ensuring harmony between all forces of nature.",
+ isEnding: true
+ },
+ ending_wisdom_spreader: {
+ text: "You travel the world sharing the grove's wisdom, enlightening all who listen.",
+ isEnding: true
+ },
+ ending_memory_keeper: {
+ text: "You become the eternal keeper of memories, preserving the stories of all living beings.",
+ isEnding: true
+ },
+ ending_legacy_weaver: {
+ text: "You weave new stories into the crystal memories, ensuring future generations learn from the past.",
+ isEnding: true
+ },
+ ending_crystal_bard: {
+ text: "Your crystal music becomes legendary, healing hearts and inspiring love wherever you go.",
+ isEnding: true
+ },
+ ending_harmony_teacher: {
+ text: "You establish a school of crystal harmony, teaching others to heal the world through music.",
+ isEnding: true
+ },
+ ending_world_explorer: {
+ text: "With your crystal companion, you discover infinite worlds and become a multiversal adventurer.",
+ isEnding: true
+ },
+ ending_transformed_return: {
+ text: "You return home transformed, using your crystal's wisdom to improve your original world.",
+ isEnding: true
+ },
+ ending_fear_helper: {
+ text: "You dedicate your life to helping others overcome their fears, becoming a beacon of courage.",
+ isEnding: true
+ },
+ ending_shadow_warrior: {
+ text: "You become a warrior who fights darkness wherever it threatens innocent lives.",
+ isEnding: true
+ },
+ ending_truth_seeker: {
+ text: "You devote yourself to uncovering hidden truths, exposing lies and bringing justice.",
+ isEnding: true
+ },
+ ending_shadow_mage: {
+ text: "You master shadow magic, using it to protect the innocent and maintain cosmic balance.",
+ isEnding: true
+ },
+ ending_light_bringer: {
+ text: "You become a bringer of light, illuminating dark places and bringing hope to the hopeless.",
+ isEnding: true
+ },
+ ending_darkness_sentinel: {
+ text: "You stand eternal guard against darkness, ensuring shadow realms never threaten the world again.",
+ isEnding: true
}
};
// Story data structure (Spanish)
var storyDataES = {
@@ -512,8 +731,11 @@
next: "destiny"
}, {
text: "Expresar dudas",
next: "doubt"
+ }, {
+ text: "Preguntar sobre el camino traicionero",
+ next: "shadow_realm"
}]
},
retreat: {
text: "Al retroceder, pisas una rama. La figura grita, '¡No tengas miedo! ¡No pretendo hacerte daño!'",
@@ -576,8 +798,14 @@
text: "En lo profundo del bosque, descubres ruinas antiguas que guardan los secretos de este mundo misterioso.",
choices: [{
text: "Convertirse en el guardián",
next: "ending_guardian"
+ }, {
+ text: "Buscar un bosque mágico",
+ next: "magical_grove"
+ }, {
+ text: "Buscar cuevas de cristal",
+ next: "crystal_caves"
}]
},
accept_help: {
text: "Con su guía, encuentras tu camino de regreso a la civilización y comienzas un nuevo capítulo en tu vida.",
@@ -726,8 +954,218 @@
},
ending_enlightened: {
text: "La sabiduría del sabio te transforma en un maestro que ayuda a otros a encontrar significado.",
isEnding: true
+ },
+ // Nuevos caminos de historia extendidos
+ magical_grove: {
+ text: "Descubres un bosque oculto donde el tiempo se mueve diferente. Árboles antiguos susurran secretos del pasado y futuro.",
+ choices: [{
+ text: "Escuchar los susurros",
+ next: "time_whispers"
+ }, {
+ text: "Plantar un nuevo árbol",
+ next: "plant_tree"
+ }, {
+ text: "Meditar en el centro",
+ next: "grove_meditation"
+ }]
+ },
+ time_whispers: {
+ text: "Los susurros revelan visiones de futuros posibles. Te ves a ti mismo en diferentes roles a través del tiempo.",
+ choices: [{
+ text: "Elegir el camino del curandero",
+ next: "ending_healer"
+ }, {
+ text: "Elegir el camino del inventor",
+ next: "ending_inventor"
+ }, {
+ text: "Elegir seguir siendo un vagabundo",
+ next: "ending_eternal_wanderer"
+ }]
+ },
+ plant_tree: {
+ text: "Tu árbol plantado crece instantáneamente, creando un puente entre reinos. Te conviertes en su cuidador.",
+ choices: [{
+ text: "Cuidar el árbol puente",
+ next: "ending_bridge_keeper"
+ }, {
+ text: "Viajar entre reinos",
+ next: "ending_realm_traveler"
+ }]
+ },
+ grove_meditation: {
+ text: "La meditación profunda revela tu verdadero propósito. Entiendes el equilibrio de todas las cosas.",
+ choices: [{
+ text: "Convertirse en guardián del equilibrio",
+ next: "ending_balance_keeper"
+ }, {
+ text: "Compartir esta sabiduría",
+ next: "ending_wisdom_spreader"
+ }]
+ },
+ crystal_caves: {
+ text: "Encuentras cuevas cristalinas que cantan con frecuencias armónicas. Cada cristal guarda memorias.",
+ choices: [{
+ text: "Tocar los cristales de memoria",
+ next: "memory_crystals"
+ }, {
+ text: "Crear nuevas armonías",
+ next: "crystal_music"
+ }, {
+ text: "Tomar un cristal como compañero",
+ next: "crystal_companion"
+ }]
+ },
+ memory_crystals: {
+ text: "Los cristales te muestran memorias de todos los que vinieron antes. Entiendes el ciclo de la vida.",
+ choices: [{
+ text: "Preservar estas memorias",
+ next: "ending_memory_keeper"
+ }, {
+ text: "Añadir tus propias memorias",
+ next: "ending_legacy_weaver"
+ }]
+ },
+ crystal_music: {
+ text: "Tu música con los cristales crea melodías hermosas que sanan corazones a través de la tierra.",
+ choices: [{
+ text: "Convertirse en músico de cristal",
+ next: "ending_crystal_bard"
+ }, {
+ text: "Enseñar esta música a otros",
+ next: "ending_harmony_teacher"
+ }]
+ },
+ crystal_companion: {
+ text: "El cristal se convierte en tu compañero de vida, guiándote en aventuras a través de muchos mundos.",
+ choices: [{
+ text: "Explorar nuevos mundos juntos",
+ next: "ending_world_explorer"
+ }, {
+ text: "Regresar a casa con sabiduría",
+ next: "ending_transformed_return"
+ }]
+ },
+ shadow_realm: {
+ text: "Te deslizas a un reino de sombras donde tus miedos toman forma física, pero también tu valor.",
+ choices: [{
+ text: "Enfrentar tus miedos directamente",
+ next: "confront_fears"
+ }, {
+ text: "Hacer amistad con las sombras",
+ next: "shadow_alliance"
+ }, {
+ text: "Usar valor para iluminar el camino",
+ next: "courage_light"
+ }]
+ },
+ confront_fears: {
+ text: "Al enfrentar tus miedos, los transformas en fortalezas. Te vuelves intrépido.",
+ choices: [{
+ text: "Ayudar a otros a enfrentar sus miedos",
+ next: "ending_fear_helper"
+ }, {
+ text: "Convertirse en guerrero de las sombras",
+ next: "ending_shadow_warrior"
+ }]
+ },
+ shadow_alliance: {
+ text: "Las sombras se vuelven tus aliadas, enseñándote a ver la verdad oculta en la oscuridad.",
+ choices: [{
+ text: "Convertirse en buscador de la verdad",
+ next: "ending_truth_seeker"
+ }, {
+ text: "Dominar la magia de las sombras",
+ next: "ending_shadow_mage"
+ }]
+ },
+ courage_light: {
+ text: "Tu valor crea luz que destierra la oscuridad del reino de las sombras para siempre.",
+ choices: [{
+ text: "Convertirse en portador de luz",
+ next: "ending_light_bringer"
+ }, {
+ text: "Proteger contra futuras oscuridades",
+ next: "ending_darkness_sentinel"
+ }]
+ },
+ // Nuevos finales
+ ending_healer: {
+ text: "Te conviertes en un curandero legendario, usando magia del tiempo para curar dolencias en todas las edades.",
+ isEnding: true
+ },
+ ending_inventor: {
+ text: "Tus inventos, inspirados por la sabiduría del tiempo, revolucionan el mundo y resuelven grandes problemas.",
+ isEnding: true
+ },
+ ending_eternal_wanderer: {
+ text: "Eliges el camino del vagabundeo eterno, experimentando aventuras infinitas a través del tiempo.",
+ isEnding: true
+ },
+ ending_bridge_keeper: {
+ text: "Como guardián del árbol puente, mantienes la paz entre diferentes reinos para siempre.",
+ isEnding: true
+ },
+ ending_realm_traveler: {
+ text: "Te conviertes en un viajero interdimensional, llevando conocimiento y esperanza a mundos incontables.",
+ isEnding: true
+ },
+ ending_balance_keeper: {
+ text: "Mantienes el equilibrio cósmico, asegurando armonía entre todas las fuerzas de la naturaleza.",
+ isEnding: true
+ },
+ ending_wisdom_spreader: {
+ text: "Viajas por el mundo compartiendo la sabiduría del bosque, iluminando a todos los que escuchan.",
+ isEnding: true
+ },
+ ending_memory_keeper: {
+ text: "Te conviertes en el guardián eterno de memorias, preservando las historias de todos los seres vivos.",
+ isEnding: true
+ },
+ ending_legacy_weaver: {
+ text: "Tejes nuevas historias en las memorias de cristal, asegurando que futuras generaciones aprendan del pasado.",
+ isEnding: true
+ },
+ ending_crystal_bard: {
+ text: "Tu música de cristal se vuelve legendaria, sanando corazones e inspirando amor dondequiera que vayas.",
+ isEnding: true
+ },
+ ending_harmony_teacher: {
+ text: "Estableces una escuela de armonía cristalina, enseñando a otros a sanar el mundo a través de la música.",
+ isEnding: true
+ },
+ ending_world_explorer: {
+ text: "Con tu compañero de cristal, descubres mundos infinitos y te conviertes en un aventurero multiversal.",
+ isEnding: true
+ },
+ ending_transformed_return: {
+ text: "Regresas a casa transformado, usando la sabiduría de tu cristal para mejorar tu mundo original.",
+ isEnding: true
+ },
+ ending_fear_helper: {
+ text: "Dedicas tu vida a ayudar a otros a superar sus miedos, convirtiéndote en un faro de valor.",
+ isEnding: true
+ },
+ ending_shadow_warrior: {
+ text: "Te conviertes en un guerrero que lucha contra la oscuridad dondequiera que amenace vidas inocentes.",
+ isEnding: true
+ },
+ ending_truth_seeker: {
+ text: "Te dedicas a descubrir verdades ocultas, exponiendo mentiras y trayendo justicia.",
+ isEnding: true
+ },
+ ending_shadow_mage: {
+ text: "Dominas la magia de las sombras, usándola para proteger a los inocentes y mantener el equilibrio cósmico.",
+ isEnding: true
+ },
+ ending_light_bringer: {
+ text: "Te conviertes en un portador de luz, iluminando lugares oscuros y trayendo esperanza a los sin esperanza.",
+ isEnding: true
+ },
+ ending_darkness_sentinel: {
+ text: "Te conviertes en guardián eterno contra la oscuridad, asegurando que los reinos sombríos nunca amenacen el mundo otra vez.",
+ isEnding: true
}
};
// Language system
var currentLanguage = storage.language || 'en';