User prompt
Dale información a todos los slimes y hazla interesante
User prompt
agrega la info a los slimes faltantes
Code edit (1 edits merged)
Please save this source code
User prompt
agrega los nuevos slimes
User prompt
haz que los slimes en el juego se ordenen automáticamente en orden de mayor a menor según su rareza si preocuparse de hacerlo manual en la lista SlimeInfo
User prompt
Vuelve slime info de esto manera: var SlimeInfo:[{ SlimeName: Rarity: history: Favoritefood: ability: lifespan:}] Asi volver más facil la agregación de nuevos slimes
Code edit (1 edits merged)
Please save this source code
User prompt
Agrega los nuevos slimes
User prompt
Return to the lists history, location, favorite food, skill, name and life expectancy a set to improve code readability
User prompt
Scrolling needs a little bit of work so it doesn’t reset position so much ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
Mejora el sistema de información en la parte de listas para optimizar y volver el codigo mas legible
User prompt
Crea una función reusable con todo lo necesario para crear textos personalizables sin consumir muchas lineas de codigo
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'stringify')' in or related to this line: 'var cacheKey = JSON.stringify(options);' Line Number: 129
User prompt
Please fix the bug: 'slimeColors is not defined' in or related to this line: 'var slimeNameText = TextFactory.createText(slimeNames[currentSlimeIndex], {' Line Number: 447
User prompt
Vuelve los textos reusables con una función y agrega todas las caracteristicas para hacerlas personalizables a su totalidad ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
arregla el bug que hace que slime se mueva de su lugar y tenga animaciones herraticas, mantenla simples
User prompt
arregla stats para que no diga [color=...]. Juntalos a una sola columna con 6 filas
User prompt
Arregla stast
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting 'fill')' in or related to this line: 'slimeNameText.style.fill = slimeColors[currentSlimeIndex];' Line Number: 702
User prompt
Vuelve los textos suaves y coloridos
User prompt
Dale mas vida al texto de información haciendolo redondo y colorido
User prompt
Dale más vida a la información con un estilo más redondo y colorido
User prompt
Dale un estilo mas suave a los textos
User prompt
Optimiza la información
User prompt
Vuelve la información de habilidad, esperanza de vida y localidad un poco más interesante y larga
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); /**** * Classes ****/ var Slime = Container.expand(function () { var self = Container.call(this); // Create and attach the slime asset self.attachAsset('ClasicSlime', { anchorX: 0.5, anchorY: 0.5, width: 500, height: 500 }); self.lastX = self.lastY = 0; self.baseX = 0; self.baseY = 0; self.setBasePosition = function (x, y) { self.baseX = x; self.baseY = y; self.x = x; self.y = y; }; self.update = function () { self.lastX = self.x; self.lastY = self.y; }; return self; }); var Star = Container.expand(function () { var self = Container.call(this); var starGraphics = self.attachAsset('Star', { anchorX: 0.5, anchorY: 0.5, width: 100, height: 100 }); self.setColorByRarity = function (rarityLevel) { var colors = [0xaaaaaa, 0x82b3c9, 0x4aa564, 0x2e8ece, 0x9b59b6, 0xe67e22, 0xe74c3c, 0xf1c40f, 0x1abc9c, 0xffffff]; starGraphics.tint = rarityLevel >= 1 && rarityLevel <= 10 ? colors[rarityLevel - 1] : colors[0]; // Create glow effect with subtle pulsation self.glowIntensity = 0.2 + rarityLevel / 10; LK.setTimeout(function () { tween(starGraphics, { scaleX: 1 + self.glowIntensity * 0.1, scaleY: 1 + self.glowIntensity * 0.1 }, { duration: 1000 + rarityLevel * 100, easing: tween.easeInOut, repeat: -1, yoyo: true }); }, Math.random() * 500); }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x000000 }); /**** * Game Code ****/ // Create BGMenu for bottom half of screen var bgMenu = LK.getAsset('BGMenu', { anchorX: 0, anchorY: 0, x: 0, y: 2032 / 2, width: 2048, height: 3532 / 2 }); // Create BG for top half of screen var bg = LK.getAsset('BG', { anchorX: 0, anchorY: 0, x: 0, y: 0, width: 2048, height: 2032 / 2 }); // Create interface element at the top of BGMenu var interfaz = LK.getAsset('Interfaz', { anchorX: 0.5, anchorY: 0, width: 2048, height: 400 }); // Position the interface at the top of BGMenu interfaz.x = bgMenu.width / 2; interfaz.y = bgMenu.y; // Create left button var leftButton = LK.getAsset('BotonChange', { anchorX: 0.5, anchorY: 0.5, scaleX: -1, // Flip horizontally to point left x: -800, y: interfaz.height / 2 }); // Add event handlers for left button leftButton.interactive = true; leftButton.down = function () { changeSlime('prev'); }; // Create right button var rightButton = LK.getAsset('BotonChange', { anchorX: 0.5, anchorY: 0.5, x: 800, y: interfaz.height / 2 }); // Add event handlers for right button rightButton.interactive = true; rightButton.down = function () { changeSlime('next'); }; // Create a list of slime assets ordered by rarity from lowest to highest var slimes = ['ClasicSlime', 'SnowySlime', 'WaterSlime', 'RockSlime', 'FireSlime', 'ShadowSlime', 'ForestSlime', 'BeastSlime', 'LuckySlime', 'RunicSlime', 'DivineSlime']; var slimeNames = ['Clasic Slime', 'Snowy Slime', 'Water Slime', 'Rock Slime', 'Fire Slime', 'Shadow Slime', 'Forest Slime', 'Beast Slime', 'Lucky Slime', 'Runic Slime', 'Divine Slime']; var currentSlimeIndex = 0; // Function to wrap text that exceeds screen width function wrapText(text, maxWidth, textSize) { if (!text) { return ""; } var words = text.split(' '); var wrappedText = '', line = ''; var charsPerLine = Math.floor(maxWidth / (textSize * 0.5)); for (var i = 0; i < words.length; i++) { var testLine = line + words[i] + ' '; if (testLine.length > charsPerLine) { wrappedText += line.trim() + '\n'; line = words[i] + ' '; } else { line = testLine; } } return wrappedText + line.trim(); } // Group slime information lists into a single object for improved readability var slimeInfo = { rarityValues: [1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10], // Mundane, Peculiar, Uncommon, Noteworthy, Rare, Extraordinary, Mythical, Very Rare, Very Rare, Ancient, Divine rarityNamesByValue: { 1: "Common", 2: "Unusual", 3: "Uncommon", 4: "Remarkable", 5: "Rare", 6: "Exceptional", 7: "Mythical", 8: "Legendary", 9: "Ancient", 10: "Divine" }, histories: ['Existed since ancient times, Classic Slimes are the foundation of all slime species in the known world. Their simple cellular structure allows them to adapt to various environments while maintaining their core properties. Early explorers documented their presence in the First Age scrolls, noting their resilient nature and ability to reproduce through division. Despite appearing mundane, these slimes possess remarkable genetic flexibility, enabling the evolution of all other slime varieties. Researchers at the Royal Academy continue studying them to understand the fundamental nature of magical creatures.', 'Formed in the eternal winter of the northern mountains, Snowy Slimes developed crystalline structures within their bodies to survive extreme cold. Their ancestors were ordinary slimes that became trapped during the Great Freeze millennium ago. Over generations, they evolved the ability to regulate internal temperature by absorbing and releasing cold energy. The legendary explorer Frostmantle first documented them in his expedition journals, describing how villages in northern regions domesticated these creatures to preserve food during summer months. Their translucent bodies sometimes reveal small ice crystals that shimmer in the light.', 'Evolved from classic slimes that were swept into rivers during the Great Flood 500 years ago, Water Slimes adapted by developing semi-permeable membranes that allow them to control water absorption. Unlike their land-dwelling relatives, they can partially dissolve their bodies to flow through narrow spaces, then reform on the other side. The Aquatic Scholars Guild has documented their unique life cycle, which includes a seasonal migration upstream to ancient spawning pools where they divide into new colonies. Coastal communities consider their presence in local waters to be a sign of healthy aquatic ecosystems.', 'Formed in ancient mountains from mineral-rich environments, Rock Slimes emerged over 1000 years ago when classic slimes absorbed crystalline formations in deep caverns. Their bodies gradually incorporated silicon compounds and trace metals, developing a semi-solid external layer that protects their gelatinous core. The Mountain Dwarf chronicles describe these creatures as "living stones" that would guard treasure hoards. They grow throughout their lives by slowly absorbing minerals from their surroundings, with the oldest specimens developing gemstone-like formations within their bodies that are highly prized by collectors.', 'Born from volcanic activity, Fire Slimes first appeared 200 years ago after the cataclysmic eruption of Mount Infernus. The intense magical energies released during that event transformed ordinary slimes trapped in lava flows, imbuing them with the essence of elemental fire. Unlike most slimes, they maintain an internal temperature of over 200 degrees, allowing them to melt through most materials. The Flamekeepers Guild has established sanctuaries for these rare creatures, studying their unique ability to consume combustible materials without oxygen. Ancient texts suggest they were once used as living forge fires by master craftsmen.', 'Created when classic slimes were trapped in the deepest caverns following the Cataclysm of Shadows, these unique creatures evolved over countless generations in complete darkness. Their bodies developed the remarkable ability to absorb light, effectively rendering them nearly invisible in low-light conditions. The renowned shadow mage Umbral first documented their existence, noting how they seemed to move between the material world and the shadow realm. Villages near the Ancient Chasms report that these slimes emerge on moonless nights, quietly gathering unknown substances before returning to the depths by dawn. Some scholars believe they communicate through subtle vibrations imperceptible to most beings.', 'Developed from slimes that inhabited the enchanted Whispering Woods for over 300 years, Forest Slimes underwent a gradual transformation as they consumed magical flora and absorbed ambient nature magic. Their bodies now contain chlorophyll-like compounds that allow them to photosynthesize, giving them their distinctive green coloration and reducing their need to consume other matter. Elven naturalists have observed symbiotic relationships between these slimes and certain rare flowering plants, with the slimes protecting the plants from parasites while receiving magical nutrients in return. The Druidic Circle considers these creatures sacred guardians of natural balance.', 'Evolved through a unique process where ordinary slimes consumed the essence of fallen monsters in ancient battlegrounds, Beast Slimes developed predatory characteristics over countless generations. Their bodies contain specialized organelles that can process and incorporate traits from creatures they consume, sometimes manifesting as temporary physical features such as fur-like textures or claw-shaped protrusions. The legendary monster hunter Thorne documented their complex hunting behaviors, noting their ability to track prey through seemingly impossible conditions. Some frontier villages have domesticated these slimes as guardians, though they require careful handling and regular feeding.', 'Born during an exceedingly rare meteorological event known as the Seven-Hued Convergence, Lucky Slimes came into existence when ordinary slimes absorbed concentrated luck essence that manifested at the terminus of seven simultaneous rainbows. Their golden bodies contain swirling patterns that seem to shift and change when observed, creating an almost hypnotic effect. The Fortunate Order maintains that these slimes exist simultaneously in multiple probability streams, allowing them to unconsciously select favorable outcomes. Merchants and gamblers often seek them as companions, though their unpredictable nature means they sometimes bring spectacular misfortune instead of the desired luck.', 'Created when ordinary slimes absorbed ancient magical runes from the forgotten Library of Eternity, these rare creatures developed unique neural structures capable of storing and processing magical information. Their translucent bodies constantly display shifting runic patterns that scholars believe represent a form of external memory storage. The Arcane Academy has documented cases where these slimes assisted mages by recalling forgotten spells during times of need. Their natural affinity for magic allows them to sense ley lines and magical disturbances from great distances, making them invaluable to explorers of ruins and researchers of ancient magical phenomena.', 'Born during the Grand Celestial Convergence when a Divine Ray pierced the veil between realms and struck an ordinary slime, these exceedingly rare creatures embody perfect magical harmony. Their luminous bodies contain particles of pure divine essence that never diminishes, giving them an ethereal glow visible even in complete darkness. The Church of Eternal Light maintains that these slimes are messengers between the mortal realm and the divine, capable of bestowing blessings on the truly worthy. Ancient prophecies speak of Divine Slimes appearing during times of great cosmic significance, their presence heralding transformative events that reshape the world.'], locations: ['Widely distributed across temperate ecosystems, from the verdant forests of Eldenwood to the sprawling grasslands of the Eastern Realms. They particularly thrive in the transitional zones between different biomes where ambient magical energies naturally concentrate. Ancient dungeons with consistent moisture levels host specialized subpopulations that have adapted to subterranean conditions, developing paler coloration and enhanced sensing abilities to compensate for limited light.', 'Exclusively inhabit regions perpetually covered in snow and ice, particularly concentrated in the Frostpeak Mountains and along the glacial plains of the Northern Frontier. They build elaborate tunnel systems beneath the snow where they maintain carefully regulated subfreezing temperatures. The legendary Crystal Valley hosts the largest known colony, where thousands gather during the winter solstice to perform synchronized freezing displays that create breathtaking ice sculptures visible for miles.', 'Primarily dwell in freshwater environments with strong currents, from the crystal-clear pools of the Whispering Rivers to the mist-shrouded waterways of the Everrain Province. They construct elaborate underwater colonies around natural springs where water purity is highest, creating complex current patterns that serve as both protection and communication networks. During seasonal monsoons, they rise to the surface and absorb rainwater directly from the clouds, appearing to dance on the water\'s surface.', 'Inhabit mineral-rich geological formations, particularly prevalent in the Iron Spine Mountains and throughout the crystalline cave networks of the Deephold region. They congregate around geode formations and natural crystal chambers where they absorb trace elements that strengthen their outer shells. Ancient mining societies documented specialized colonies living symbiotically with precious gem deposits, protecting the valuable resources from unauthorized extraction through elaborate tunnel collapses.', 'Thrive in regions of intense geothermal activity, concentrating around the active volcanoes of the Ashland Archipelago and throughout the superheated vents of the Scorched Expanse desert. They often gather in hierarchical colonies around lava pools, with dominant specimens claiming positions closest to the heat source. During rare alignment of the twin suns, they perform synchronized heat displays above the volcanic caldera, creating spectacular fire patterns visible from great distances.', 'Exclusively inhabit locations completely devoid of natural light, from the bottomless chasms of the Forgotten Depth to the sealed crypts beneath ancient ruins in the Shrouded Territories. They carve out territories defined by the absence of illumination, creating shadow domains where they maintain absolute darkness. The legendary Shadow Labyrinth reportedly contains a vast metropolis of these creatures, though few explorers who venture there ever return to confirm its existence.', 'Flourish in ancient woodland ecosystems with high concentrations of magical plantlife, particularly abundant in the sentient groves of the Wyrdwood and throughout the centuries-old canopies of the Emerald Expanse. They establish symbiotic circles with magical flora, creating self-sustaining ecosystems where both slimes and plants benefit from enhanced magical currents. The most sacred groves sometimes feature enormous Forest Slimes that have merged with ancient trees, becoming living guardians that shape the forest around them.', 'Dominate untamed wilderness regions where apex predators still rule, particularly prevalent in the Fangwood Wilderness and throughout the uncharted territories beyond the Frontier Settlements. They establish hunting grounds in competition with natural predators, sometimes forming temporary alliances with wolf packs or great cats to take down larger prey. The legendary Crimson Valley hosts the most aggressive specimens, where centuries of consuming mythical beasts have created Beast Slimes with unprecedented adaptations.', 'Appear in locations where probability curves naturally bend toward positive outcomes, particularly concentrated around natural wonders like the Sevenfold Cascade where seven waterfalls create perpetual rainbows, and throughout the rolling hills of the Fortune Fields where four-leaf clovers grow in unusual abundance. They gravitate toward crossroads, convergent ley lines, and places where important decisions are made, subtly influencing outcomes toward more fortuitous results.', 'Congregate around repositories of ancient knowledge, from the towering spires of the Arcane Academy to the buried archives beneath the ruins of fallen civilizations in the Forgotten Wastes. They maintain complex networks connecting disparate sources of information, sometimes serving as living messengers between isolated scholars. The legendary Grand Library of Eternity reportedly hosts an entire society of these creatures that maintain knowledge too dangerous or complex to be recorded in conventional books.', 'Only manifest in locations where the veil between mortal and divine realms naturally thins, particularly around the blessed shrines atop the Celestial Peaks and within the hallowed chambers of ancient temples in the Sacred Heartlands. They often appear during significant astronomical alignments or in the aftermath of sincere prayers by the truly faithful. The holiest of sites sometimes feature permanent Divine Slime guardians that have watched over sacred relics for countless generations, their very presence purifying the surrounding area of malevolent influences.'], favoriteFoods: ['Leaves and fruits that fall to the ground.', 'Ice crystals, frozen berries, and snow.', 'Algae and small water plants.', 'Minerals, gemstones, and small rocks.', 'Coal and spicy peppers.', 'Dark essence, shadows, and black fungi.', 'Magical plants, mushrooms, and forest berries.', 'Raw meat, bones, and animal essences.', 'Gold coins, lucky charms, and shiny trinkets.', 'Ink, ancient scrolls, and magical runes.', 'Star fragments, holy water, and sacred plants.'], abilities: ['Can bounce to extraordinary heights and divide into multiple autonomous smaller slimes that maintain a telepathic connection with the original entity. These smaller units can scout different areas simultaneously and recombine to share gathered information, making them excellent explorers and messengers.', 'Can instantly freeze objects up to three times their size and generate intricate ice crystals that shimmer with magical energy. They can create temporary ice bridges across gaps and fashion defensive ice barriers that are surprisingly resistant to heat and physical damage, protecting themselves and allies from danger.', 'Can transform their entire body into liquid state with perfect molecular control, allowing them to flow through microscopic cracks, navigate complex pipe systems, and even split into multiple streams before reforming. In water form, they can survive extreme pressure depths and carry small objects through otherwise impassable barriers.', 'Can compress their bodies to achieve diamond-like hardness, withstanding pressures that would crush ordinary metals. They can extend this protective ability to shield companions by forming dome-like structures and can shape parts of their body into tools capable of carving through stone and lesser metals with ease.', 'Can generate focused flame jets hot enough to melt iron and create controlled heat zones that maintain specific temperatures for days without additional fuel. Advanced specimens can separate their flames from their body temporarily, creating independent fire sources that obey simple commands and return when called.', 'Can manipulate darkness to become completely undetectable to normal and magical vision alike, even leaving no shadow or reflection. They can absorb light from an area, creating zones of perfect darkness, and store this energy to release later as blinding flashes or to power light-based magical artifacts.', 'Can perfectly mimic the appearance and texture of plant life to become virtually undetectable in forest environments. They cultivate symbiotic relationships with rare magical plants that grow on their surface, providing them enhanced sensory capabilities and the ability to synthesize healing compounds for themselves and allies.', 'Can analyze and memorize scent patterns with such precision they can track prey through raging rivers, dense fog, and even days after the trail was laid. Their body structure can rapidly shift to create temporary natural weapons like claws, horns, or spines with strength rivaling steel and the ability to secrete paralyzing toxins.', 'Can perceive probability streams invisible to other creatures, instinctively choosing paths that lead to beneficial outcomes and avoiding disaster before any signs are apparent. They can temporarily extend this fortune field to nearby allies, granting enhanced success rates for difficult tasks and protection from unexpected dangers.', 'Can instantly memorize and categorize any written or spoken information they encounter, developing internal rune structures that serve as magical databases. They can project these runes externally as glowing symbols that interact with and unlock ancient magical mechanisms, and can translate forgotten languages by analyzing linguistic patterns.', 'Can channel pure divine energy to mend wounds, purify corrupted areas, and even temporarily restore life to recently deceased small creatures. Their divine light can reveal illusions, banish malevolent spirits, and create sanctified zones where evil entities cannot enter, making them invaluable companions in haunted or corrupted regions.'], stats: [{ strength: 3, agility: 5, defense: 2, magic: 1, luck: 2, mysticism: 1 }, { strength: 3, agility: 2, defense: 8, magic: 6, luck: 4, mysticism: 5 }, { strength: 2, agility: 7, defense: 1, magic: 5, luck: 4, mysticism: 3 }, { strength: 8, agility: 1, defense: 9, magic: 2, luck: 3, mysticism: 1 }, { strength: 6, agility: 3, defense: 4, magic: 7, luck: 2, mysticism: 6 }, { strength: 5, agility: 8, defense: 3, magic: 9, luck: 6, mysticism: 8 }, { strength: 4, agility: 6, defense: 5, magic: 8, luck: 5, mysticism: 7 }, { strength: 9, agility: 7, defense: 7, magic: 3, luck: 8, mysticism: 2 }, { strength: 3, agility: 5, defense: 2, magic: 6, luck: 10, mysticism: 4 }, { strength: 5, agility: 4, defense: 3, magic: 9, luck: 7, mysticism: 10 }, { strength: 7, agility: 4, defense: 6, magic: 10, luck: 10, mysticism: 9 }], lifespans: ['Average lifespan reaches 100 years in wilderness conditions and extends to 150 years in protected environments. Unlike conventional aging, Classic Slimes don\'t deteriorate but rather reach a stability threshold where their division rate perfectly balances their mass accumulation. The oldest documented specimen lived to 212 years in the Royal Academy\'s conservation habitat.', 'Typically survive 90-120 years, with mandatory hibernation during summer months when temperatures exceed their optimal range. During hibernation, they enter a crystalline stasis where metabolic functions virtually cease, allowing them to survive even when their habitat temporarily melts. Some specimens buried in ancient glacier ice have been revived after thousands of years in suspended animation.', 'Natural lifespan averages 75 years in stable aquatic environments, but they possess remarkable rejuvenation abilities when merged with pristine water sources containing specific mineral compositions. Water Slimes from sacred springs have been documented living over 200 years through cyclical rejuvenation. They don\'t die conventionally but rather gradually dissolve and become one with their aquatic environment.', 'Among the longest-lived slime species, routinely reaching 500 years when undisturbed in deep cavern systems. Their mineral composition stabilizes with age, forming crystalline matrices that resist degradation. The legendary Rock Slime known as "The Old Guardian" in the Deephold Mountains has been documented by seventeen generations of dwarven chroniclers, putting its age at approximately 1,200 years.', 'Comparatively short-lived at 30-40 years due to their accelerated metabolic rate, but they compensate with remarkably efficient reproduction, capable of producing offspring every third month under optimal conditions. Their brief lives are extraordinarily energetic, with older specimens burning so intensely they sometimes spontaneously transform into pure elemental fire essence upon death rather than leaving remains.', 'Natural lifespan extends to 120-150 years, with their power and shadow manipulation abilities intensifying with each decade. Shadow Slimes don\'t age conventionally but gradually become more ethereal, with the oldest specimens existing partially in the shadow realm. Ancient texts describe "Eternal Shadows" that have lived for centuries, becoming virtually immortal but increasingly incorporeal and difficult to perceive in the material world.', 'Regularly achieve 200-250 years in ancient forests with strong magical currents. Unlike other slimes, they grow more vibrant with age rather than showing signs of deterioration. Their plant symbiosis becomes more complex over time, eventually allowing the oldest specimens to develop rudimentary communication with forest entities and influence plant growth in their territories. Some Forest Scholars believe they eventually transform into forest spirits.', 'While comparatively short-lived at approximately 50 years, Beast Slimes possess extraordinary cellular regeneration, allowing them to survive injuries that would destroy other creatures. Their intense metabolic rate accelerates their life cycle but grants them peak physical capabilities throughout their entire existence rather than experiencing decline. Some incorporate traits from particularly long-lived prey, temporarily extending their lifespans.', 'Perhaps the most variable lifespan of any slime species, ranging from an astonishingly brief 20 years to an extended 300 years entirely based on the individual\'s internal luck quotient. Researchers have documented cases where seemingly identical Lucky Slimes followed radically different aging trajectories based on apparently random probability fluctuations. Some appear to manipulate their own life-threads, occasionally cheating death itself through improbable circumstances.', 'Consistently achieve 400-500 years, serving as living archives of magical knowledge that would otherwise be lost to time. Their unique neural structures resist degradation, allowing them to maintain perfect recall of ancient spells and forgotten lore throughout their centuries of existence. The oldest specimens develop consciousness layers that operate independently, essentially becoming multiple entities sharing one form to process vast knowledge repositories.', 'True biological immortality, with no natural lifespan limit, growing in power and wisdom indefinitely unless destroyed by external means. The divine essence in their cellular structure continuously regenerates, preventing degradation and allowing perpetual development of their magical capabilities. Ancient texts speak of Divine Slimes that have existed since the world\'s creation, acting as silent observers of history and occasionally guiding events from the shadows when cosmic balance requires intervention.'] }; // Create text display for slime name var slimeNameText = new Text2(slimeNames[currentSlimeIndex], { size: 100, fill: 0xFFFFFF }); slimeNameText.anchor.set(0.5, 0.5); slimeNameText.x = 0; slimeNameText.y = interfaz.height / 2; // Create a slime and add it to the scene var slime = new Slime(); // Position slime at the center of BG and set base position var centerX = bg.width / 2; var centerY = bg.height / 2; slime.setBasePosition(centerX, centerY); // Set initial properties for animations slime.alpha = 1; slime.scaleX = 1; slime.scaleY = 1; // Play background music LK.playMusic('BGSong3'); // --- Info Panel for BGMenu --- var infoPanelHeight = bgMenu.height - interfaz.height - 40; var infoPanelWidth = bgMenu.width; var infoPanelY = bgMenu.y + interfaz.height + 20; var infoPanelX = bgMenu.x + (bgMenu.width - infoPanelWidth) / 2; // Center horizontally // Create a container for the info panel var infoPanel = new Container(); infoPanel.x = infoPanelX; infoPanel.y = infoPanelY; // No background for the info panel // Prepare info categories and data var infoCategories = [{ title: "Rarity", get: function get(i) { var rarityValue = slimeInfo.rarityValues[i]; this.currentRarityValue = rarityValue; return slimeInfo.rarityNamesByValue[rarityValue]; } }, { title: "History", get: function get(i) { return slimeInfo.histories[i]; } }, { title: "Location", get: function get(i) { return slimeInfo.locations[i]; } }, { title: "Favorite Food", get: function get(i) { return slimeInfo.favoriteFoods[i]; } }, { title: "Ability", get: function get(i) { return slimeInfo.abilities[i]; } }, { title: "Stats", get: function get(i) { var s = slimeInfo.stats[i]; // Create visual stat bars with colored values using actual colors instead of tags function formatStat(name, value) { var barChars = "■".repeat(value); var emptyChars = "□".repeat(10 - value); return name + ": " + value + " [" + barChars + emptyChars + "]"; } // Create a single column with all 6 stats var statText = ""; statText += formatStat("Strength", s.strength) + "\n"; statText += formatStat("Agility", s.agility) + "\n"; statText += formatStat("Defense", s.defense) + "\n"; statText += formatStat("Magic", s.magic) + "\n"; statText += formatStat("Luck", s.luck) + "\n"; statText += formatStat("Mysticism", s.mysticism); return statText; } }, { title: "Lifespan", get: function get(i) { return slimeInfo.lifespans[i]; } }]; // Create a container for the scrollable text var infoTextContainer = new Container(); infoTextContainer.x = 30; infoTextContainer.y = 30; // Add top margin // Function to update info text for current slime function updateInfoPanel() { // Remove old children infoTextContainer.removeChildren(); var y = 0; for (var c = 0; c < infoCategories.length; c++) { // Add extra spacing between sections if not the first section if (c > 0) { y += 80; // Add extra spacing between sections } // Title with gradient effect based on category var titleColors = { "Rarity": 0xFFD700, "History": 0xCF9FFF, "Location": 0x98FB98, "Favorite Food": 0xFF7F50, "Ability": 0x00BFFF, "Stats": 0xFF1493, "Lifespan": 0x00FA9A }; var titleColor = titleColors[infoCategories[c].title] || 0xFFF7B2; var titleText = new Text2(infoCategories[c].title, { size: 110, fill: titleColor, font: "GillSans-Bold", align: "center", dropShadow: true, dropShadowColor: 0x000000, dropShadowDistance: 3, dropShadowAlpha: 0.5 }); titleText.anchor.set(0.5, 0); titleText.x = infoPanelWidth / 2 - 30; titleText.y = y; infoTextContainer.addChild(titleText); y += titleText.height + 6; // Info - wrap text to fit screen width var infoContent = infoCategories[c].get(currentSlimeIndex); var wrappedText = infoContent; // Only apply text wrapping if not the stats category (which already has formatting) if (infoCategories[c].title !== "Stats") { wrappedText = wrapText(infoContent, infoPanelWidth - 60, 85); // Wrap text with some padding } // Choose text color based on category var textColors = { "Rarity": 0xFFFACD, "History": 0xE6E6FA, "Location": 0xF0FFF0, "Favorite Food": 0xFFE4E1, "Ability": 0xE0FFFF, "Stats": 0xFFE4E1, "Lifespan": 0xF0FFFF }; var textColor = textColors[infoCategories[c].title] || 0xFFFFFF; var infoText = new Text2(wrappedText, { size: 85, fill: textColor, font: "GillSans", align: infoCategories[c].title === "Stats" ? "left" : "center", dropShadow: true, dropShadowColor: 0x333333, dropShadowDistance: 2, dropShadowAlpha: 0.3 }); // Set anchor based on content type if (infoCategories[c].title === "Stats") { infoText.anchor.set(0.5, 0); // Center align stats too infoText.x = infoPanelWidth / 2 - 30; } else { infoText.anchor.set(0.5, 0); // Center align for other content infoText.x = infoPanelWidth / 2 - 30; } infoText.y = y + 20; infoTextContainer.addChild(infoText); // If this is the rarity category, add colored stars if (infoCategories[c].title === "Rarity" && infoCategories[c].currentRarityValue) { var starContainer = new Container(); starContainer.x = infoPanelWidth / 2 - 30; starContainer.y = y + infoText.height + 40; var rarityValue = infoCategories[c].currentRarityValue; var starSpacing = 110, totalWidth = (rarityValue - 1) * starSpacing; var startX = -totalWidth / 2; for (var s = 0; s < rarityValue; s++) { var star = new Star(); star.x = startX + s * starSpacing; star.y = 20; star.alpha = 0; star.scale.x = star.scale.y = 0.5; star.setColorByRarity(rarityValue); starContainer.addChild(star); (function (targetStar, delay) { LK.setTimeout(function () { tween(targetStar, { alpha: 1, scaleX: 1, scaleY: 1 }, { duration: 400, easing: tween.easeOut }); }, delay); })(star, s * 200); } infoTextContainer.addChild(starContainer); y += 80; } y += infoText.height + 24; } infoTextContainer.totalHeight = y; } updateInfoPanel(); // --- Scrolling logic for info panel with visual enhancements --- var scrollOffset = 0; var maxScroll = 0; function updateScrollLimits() { maxScroll = Math.max(0, infoTextContainer.totalHeight - infoPanelHeight + 40 + 60); // Add 60px to account for top and bottom margins // Create smooth bounce effect when reaching limits if (scrollOffset < 0) { scrollOffset = 0; tween(infoTextContainer, { y: 30 }, { duration: 300, easing: tween.elasticOut }); } if (scrollOffset > maxScroll) { scrollOffset = maxScroll; tween(infoTextContainer, { y: 30 - maxScroll }, { duration: 300, easing: tween.elasticOut }); } // Apply smooth scrolling if (!scrollTweenActive && isScrolling === false) { tween(infoTextContainer, { y: 30 - scrollOffset }, { duration: 100, easing: tween.easeOut }); } else { infoTextContainer.y = 30 - scrollOffset; // Apply top margin to starting position } } updateScrollLimits(); // Touch/mouse drag to scroll with inertia and visual feedback var isScrolling = false, lastScrollY = 0, scrollVelocity = 0, lastScrollTime = 0, scrollTweenActive = false, scrollTracker = []; infoPanel.interactive = true; infoPanel.down = function (x, y, obj) { isScrolling = true; lastScrollY = y; lastScrollTime = Date.now(); scrollTracker = []; // Reset scroll tracking if (scrollTweenActive) { tween.stop(infoTextContainer, { y: true }); scrollTweenActive = false; } }; infoPanel.move = function (x, y, obj) { if (isScrolling) { var currentTime = Date.now(); var timeDelta = currentTime - lastScrollTime; var dy = y - lastScrollY; // Track last few movements for better momentum calculation scrollTracker.push({ dy: dy, time: timeDelta }); if (scrollTracker.length > 5) { scrollTracker.shift(); } if (timeDelta > 0) { scrollVelocity = dy / timeDelta * 15; } scrollOffset -= dy; updateScrollLimits(); lastScrollY = y; lastScrollTime = currentTime; } }; infoPanel.up = function (x, y, obj) { if (isScrolling) { isScrolling = false; // Calculate average velocity from recent movements for smoother scroll var recentVelocity = 0; var totalWeight = 0; for (var i = 0; i < scrollTracker.length; i++) { var weight = (i + 1) / scrollTracker.length; recentVelocity += scrollTracker[i].dy / scrollTracker[i].time * weight; totalWeight += weight; } if (totalWeight > 0) { scrollVelocity = recentVelocity / totalWeight * 15; } if (Math.abs(scrollVelocity) > 0.1) { var targetScroll = Math.max(0, Math.min(maxScroll, scrollOffset - scrollVelocity * 50)); var targetY = 30 - targetScroll; scrollTweenActive = true; tween(infoTextContainer, { y: targetY }, { duration: 1000, easing: tween.easeOutQuint, onFinish: function onFinish() { scrollOffset = 30 - infoTextContainer.y; scrollTweenActive = false; } }); } } }; // Unified handler for both navigation buttons function createButtonHandler(direction) { return function (x, y, obj) { changeSlime(direction); updateInfoPanel(); updateScrollLimits(); }; } leftButton.down = createButtonHandler('prev'); rightButton.down = createButtonHandler('next'); // When changing slime, update info panel and scroll position function updateSlimeAndInfo() { // Stop existing tweens before starting new ones to prevent animation conflicts tween.stop(slime); // Enhanced slime transition effects with color flash and particle-like animation tween(slime, { alpha: 0, scaleX: 0.8, scaleY: 0.8, rotation: -0.1 }, { duration: 300, easing: tween.easeOut, onFinish: function onFinish() { // Flash background with slime color var slimeColors = [0xa154b0, 0xd6f1ff, 0x757eff, 0xa3a3a3, 0xff5c5c, 0x303030, 0x0dbf51, 0x794311, 0xffe600, 0x4f226d, 0xf7f497]; LK.effects.flashObject(bg, slimeColors[currentSlimeIndex], 300); slime.removeChildren(); slime.attachAsset(slimes[currentSlimeIndex], { anchorX: 0.5, anchorY: 0.5, width: 500, height: 500 }); // Reset to base position to prevent drift slime.x = slime.baseX; slime.y = slime.baseY; slime.alpha = 0; slime.scaleX = 0.8; slime.scaleY = 0.8; slime.rotation = 0.1; // More dynamic entrance animation tween(slime, { alpha: 1, scaleX: 1.2, scaleY: 1.2, rotation: 0 }, { duration: 400, easing: tween.easeOut, onFinish: function onFinish() { tween(slime, { scaleX: 1, scaleY: 1 }, { duration: 500, easing: tween.elasticOut }); // Add gentle bobbing animation but store a reference to the initial position var initialY = bg.height / 2; // Store original position LK.setTimeout(function () { tween(slime, { y: initialY - 15 }, { duration: 1200, easing: tween.easeInOut, repeat: -1, yoyo: true }); }, 500); } }); } }); // Define slime-specific colors based on their visual appearance var slimeColors = [0xa154b0, // ClasicSlime (purple) 0xd6f1ff, // SnowySlime (light blue) 0x757eff, // WaterSlime (blue) 0xa3a3a3, // RockSlime (gray) 0xff5c5c, // FireSlime (red) 0x303030, // ShadowSlime (dark gray) 0x0dbf51, // ForestSlime (green) 0x794311, // BeastSlime (brown) 0xffe600, // LuckySlime (yellow) 0x4f226d, // RunicSlime (dark purple) 0xf7f497 // DivineSlime (light yellow) ]; tween(slimeNameText, { alpha: 0, scaleX: 0.9, scaleY: 0.9 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { slimeNameText.setText(slimeNames[currentSlimeIndex]); // Initialize style object if it doesn't exist if (!slimeNameText.style) { slimeNameText.style = {}; } // Apply slime-specific text color slimeNameText.style.fill = slimeColors[currentSlimeIndex]; slimeNameText.style.dropShadow = true; slimeNameText.style.dropShadowColor = 0x000000; slimeNameText.style.dropShadowDistance = 3; slimeNameText.style.dropShadowAlpha = 0.5; // Create more dynamic animation for the name tween(slimeNameText, { alpha: 1, scaleX: 1.1, scaleY: 1.1 }, { duration: 200, easing: tween.easeOut, onFinish: function onFinish() { tween(slimeNameText, { scaleX: 1, scaleY: 1 }, { duration: 400, easing: tween.elasticOut }); } }); } }); // Update content and scroll position updateInfoPanel(); scrollOffset = 0; updateScrollLimits(); // Fade in info container infoTextContainer.alpha = 0; tween(infoTextContainer, { alpha: 1 }, { duration: 400, easing: tween.easeOut }); } function changeSlime(direction) { currentSlimeIndex = direction === 'next' ? (currentSlimeIndex + 1) % slimes.length : (currentSlimeIndex - 1 + slimes.length) % slimes.length; updateSlimeAndInfo(); } /* * Asset initialization */ game.addChild(bgMenu); game.addChild(infoPanel); infoPanel.addChild(infoTextContainer); game.addChild(bg); game.addChild(interfaz); interfaz.addChild(leftButton); interfaz.addChild(rightButton); interfaz.addChild(slimeNameText); game.addChild(slime);
===================================================================
--- original.js
+++ change.js
@@ -56,76 +56,8 @@
}, Math.random() * 500);
};
return self;
});
-var StatBar = Container.expand(function () {
- var self = Container.call(this);
- self.barWidth = 750;
- self.barHeight = 35;
- self.barBackground = null;
- self.barFill = null;
- self.valueText = null;
- self.labelText = null;
- self.init = function (label, value, maxValue, color) {
- // Create bar background
- self.barBackground = LK.getAsset('BGMenu', {
- anchorX: 0,
- anchorY: 0.5,
- width: self.barWidth,
- height: self.barHeight,
- alpha: 0.3
- });
- self.addChild(self.barBackground);
- // Create bar fill
- self.barFill = LK.getAsset('Interfaz', {
- anchorX: 0,
- anchorY: 0.5,
- width: 0,
- // Will be set based on value
- height: self.barHeight - 6,
- tint: color || 0xFFFFFF
- });
- self.barFill.x = 3; // Small padding
- self.addChild(self.barFill);
- // Create label text
- self.labelText = new Text2(label, {
- size: 80,
- fill: 0xFFFFFF,
- font: "GillSans-Bold",
- align: "left"
- });
- self.labelText.anchor.set(0, 0.5);
- self.labelText.x = 20;
- self.addChild(self.labelText);
- // Create value text
- self.valueText = new Text2(value.toString(), {
- size: 80,
- fill: 0xFFFFFF,
- font: "GillSans-Bold",
- align: "right"
- });
- self.valueText.anchor.set(1, 0.5);
- self.valueText.x = self.barWidth - 20;
- self.addChild(self.valueText);
- // Set initial value
- self.setValue(value, maxValue);
- return self;
- };
- self.setValue = function (value, maxValue) {
- maxValue = maxValue || 10;
- var fillWidth = value / maxValue * (self.barWidth - 6);
- // Animate the bar filling
- tween(self.barFill, {
- width: fillWidth
- }, {
- duration: 500,
- easing: tween.easeOut
- });
- // Update value text
- self.valueText.setText(value.toString());
- };
- return self;
-});
/****
* Initialize Game
****/
@@ -213,105 +145,108 @@
}
}
return wrappedText + line.trim();
}
-// Create slime information lists
-var rarityValues = [1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10]; // Mundane, Peculiar, Uncommon, Noteworthy, Rare, Extraordinary, Mythical, Very Rare, Very Rare, Ancient, Divine
-var rarityNamesByValue = {
- 1: "Common",
- 2: "Unusual",
- 3: "Uncommon",
- 4: "Remarkable",
- 5: "Rare",
- 6: "Exceptional",
- 7: "Mythical",
- 8: "Legendary",
- 9: "Ancient",
- 10: "Divine"
+// Group slime information lists into a single object for improved readability
+var slimeInfo = {
+ rarityValues: [1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10],
+ // Mundane, Peculiar, Uncommon, Noteworthy, Rare, Extraordinary, Mythical, Very Rare, Very Rare, Ancient, Divine
+ rarityNamesByValue: {
+ 1: "Common",
+ 2: "Unusual",
+ 3: "Uncommon",
+ 4: "Remarkable",
+ 5: "Rare",
+ 6: "Exceptional",
+ 7: "Mythical",
+ 8: "Legendary",
+ 9: "Ancient",
+ 10: "Divine"
+ },
+ histories: ['Existed since ancient times, Classic Slimes are the foundation of all slime species in the known world. Their simple cellular structure allows them to adapt to various environments while maintaining their core properties. Early explorers documented their presence in the First Age scrolls, noting their resilient nature and ability to reproduce through division. Despite appearing mundane, these slimes possess remarkable genetic flexibility, enabling the evolution of all other slime varieties. Researchers at the Royal Academy continue studying them to understand the fundamental nature of magical creatures.', 'Formed in the eternal winter of the northern mountains, Snowy Slimes developed crystalline structures within their bodies to survive extreme cold. Their ancestors were ordinary slimes that became trapped during the Great Freeze millennium ago. Over generations, they evolved the ability to regulate internal temperature by absorbing and releasing cold energy. The legendary explorer Frostmantle first documented them in his expedition journals, describing how villages in northern regions domesticated these creatures to preserve food during summer months. Their translucent bodies sometimes reveal small ice crystals that shimmer in the light.', 'Evolved from classic slimes that were swept into rivers during the Great Flood 500 years ago, Water Slimes adapted by developing semi-permeable membranes that allow them to control water absorption. Unlike their land-dwelling relatives, they can partially dissolve their bodies to flow through narrow spaces, then reform on the other side. The Aquatic Scholars Guild has documented their unique life cycle, which includes a seasonal migration upstream to ancient spawning pools where they divide into new colonies. Coastal communities consider their presence in local waters to be a sign of healthy aquatic ecosystems.', 'Formed in ancient mountains from mineral-rich environments, Rock Slimes emerged over 1000 years ago when classic slimes absorbed crystalline formations in deep caverns. Their bodies gradually incorporated silicon compounds and trace metals, developing a semi-solid external layer that protects their gelatinous core. The Mountain Dwarf chronicles describe these creatures as "living stones" that would guard treasure hoards. They grow throughout their lives by slowly absorbing minerals from their surroundings, with the oldest specimens developing gemstone-like formations within their bodies that are highly prized by collectors.', 'Born from volcanic activity, Fire Slimes first appeared 200 years ago after the cataclysmic eruption of Mount Infernus. The intense magical energies released during that event transformed ordinary slimes trapped in lava flows, imbuing them with the essence of elemental fire. Unlike most slimes, they maintain an internal temperature of over 200 degrees, allowing them to melt through most materials. The Flamekeepers Guild has established sanctuaries for these rare creatures, studying their unique ability to consume combustible materials without oxygen. Ancient texts suggest they were once used as living forge fires by master craftsmen.', 'Created when classic slimes were trapped in the deepest caverns following the Cataclysm of Shadows, these unique creatures evolved over countless generations in complete darkness. Their bodies developed the remarkable ability to absorb light, effectively rendering them nearly invisible in low-light conditions. The renowned shadow mage Umbral first documented their existence, noting how they seemed to move between the material world and the shadow realm. Villages near the Ancient Chasms report that these slimes emerge on moonless nights, quietly gathering unknown substances before returning to the depths by dawn. Some scholars believe they communicate through subtle vibrations imperceptible to most beings.', 'Developed from slimes that inhabited the enchanted Whispering Woods for over 300 years, Forest Slimes underwent a gradual transformation as they consumed magical flora and absorbed ambient nature magic. Their bodies now contain chlorophyll-like compounds that allow them to photosynthesize, giving them their distinctive green coloration and reducing their need to consume other matter. Elven naturalists have observed symbiotic relationships between these slimes and certain rare flowering plants, with the slimes protecting the plants from parasites while receiving magical nutrients in return. The Druidic Circle considers these creatures sacred guardians of natural balance.', 'Evolved through a unique process where ordinary slimes consumed the essence of fallen monsters in ancient battlegrounds, Beast Slimes developed predatory characteristics over countless generations. Their bodies contain specialized organelles that can process and incorporate traits from creatures they consume, sometimes manifesting as temporary physical features such as fur-like textures or claw-shaped protrusions. The legendary monster hunter Thorne documented their complex hunting behaviors, noting their ability to track prey through seemingly impossible conditions. Some frontier villages have domesticated these slimes as guardians, though they require careful handling and regular feeding.', 'Born during an exceedingly rare meteorological event known as the Seven-Hued Convergence, Lucky Slimes came into existence when ordinary slimes absorbed concentrated luck essence that manifested at the terminus of seven simultaneous rainbows. Their golden bodies contain swirling patterns that seem to shift and change when observed, creating an almost hypnotic effect. The Fortunate Order maintains that these slimes exist simultaneously in multiple probability streams, allowing them to unconsciously select favorable outcomes. Merchants and gamblers often seek them as companions, though their unpredictable nature means they sometimes bring spectacular misfortune instead of the desired luck.', 'Created when ordinary slimes absorbed ancient magical runes from the forgotten Library of Eternity, these rare creatures developed unique neural structures capable of storing and processing magical information. Their translucent bodies constantly display shifting runic patterns that scholars believe represent a form of external memory storage. The Arcane Academy has documented cases where these slimes assisted mages by recalling forgotten spells during times of need. Their natural affinity for magic allows them to sense ley lines and magical disturbances from great distances, making them invaluable to explorers of ruins and researchers of ancient magical phenomena.', 'Born during the Grand Celestial Convergence when a Divine Ray pierced the veil between realms and struck an ordinary slime, these exceedingly rare creatures embody perfect magical harmony. Their luminous bodies contain particles of pure divine essence that never diminishes, giving them an ethereal glow visible even in complete darkness. The Church of Eternal Light maintains that these slimes are messengers between the mortal realm and the divine, capable of bestowing blessings on the truly worthy. Ancient prophecies speak of Divine Slimes appearing during times of great cosmic significance, their presence heralding transformative events that reshape the world.'],
+ locations: ['Widely distributed across temperate ecosystems, from the verdant forests of Eldenwood to the sprawling grasslands of the Eastern Realms. They particularly thrive in the transitional zones between different biomes where ambient magical energies naturally concentrate. Ancient dungeons with consistent moisture levels host specialized subpopulations that have adapted to subterranean conditions, developing paler coloration and enhanced sensing abilities to compensate for limited light.', 'Exclusively inhabit regions perpetually covered in snow and ice, particularly concentrated in the Frostpeak Mountains and along the glacial plains of the Northern Frontier. They build elaborate tunnel systems beneath the snow where they maintain carefully regulated subfreezing temperatures. The legendary Crystal Valley hosts the largest known colony, where thousands gather during the winter solstice to perform synchronized freezing displays that create breathtaking ice sculptures visible for miles.', 'Primarily dwell in freshwater environments with strong currents, from the crystal-clear pools of the Whispering Rivers to the mist-shrouded waterways of the Everrain Province. They construct elaborate underwater colonies around natural springs where water purity is highest, creating complex current patterns that serve as both protection and communication networks. During seasonal monsoons, they rise to the surface and absorb rainwater directly from the clouds, appearing to dance on the water\'s surface.', 'Inhabit mineral-rich geological formations, particularly prevalent in the Iron Spine Mountains and throughout the crystalline cave networks of the Deephold region. They congregate around geode formations and natural crystal chambers where they absorb trace elements that strengthen their outer shells. Ancient mining societies documented specialized colonies living symbiotically with precious gem deposits, protecting the valuable resources from unauthorized extraction through elaborate tunnel collapses.', 'Thrive in regions of intense geothermal activity, concentrating around the active volcanoes of the Ashland Archipelago and throughout the superheated vents of the Scorched Expanse desert. They often gather in hierarchical colonies around lava pools, with dominant specimens claiming positions closest to the heat source. During rare alignment of the twin suns, they perform synchronized heat displays above the volcanic caldera, creating spectacular fire patterns visible from great distances.', 'Exclusively inhabit locations completely devoid of natural light, from the bottomless chasms of the Forgotten Depth to the sealed crypts beneath ancient ruins in the Shrouded Territories. They carve out territories defined by the absence of illumination, creating shadow domains where they maintain absolute darkness. The legendary Shadow Labyrinth reportedly contains a vast metropolis of these creatures, though few explorers who venture there ever return to confirm its existence.', 'Flourish in ancient woodland ecosystems with high concentrations of magical plantlife, particularly abundant in the sentient groves of the Wyrdwood and throughout the centuries-old canopies of the Emerald Expanse. They establish symbiotic circles with magical flora, creating self-sustaining ecosystems where both slimes and plants benefit from enhanced magical currents. The most sacred groves sometimes feature enormous Forest Slimes that have merged with ancient trees, becoming living guardians that shape the forest around them.', 'Dominate untamed wilderness regions where apex predators still rule, particularly prevalent in the Fangwood Wilderness and throughout the uncharted territories beyond the Frontier Settlements. They establish hunting grounds in competition with natural predators, sometimes forming temporary alliances with wolf packs or great cats to take down larger prey. The legendary Crimson Valley hosts the most aggressive specimens, where centuries of consuming mythical beasts have created Beast Slimes with unprecedented adaptations.', 'Appear in locations where probability curves naturally bend toward positive outcomes, particularly concentrated around natural wonders like the Sevenfold Cascade where seven waterfalls create perpetual rainbows, and throughout the rolling hills of the Fortune Fields where four-leaf clovers grow in unusual abundance. They gravitate toward crossroads, convergent ley lines, and places where important decisions are made, subtly influencing outcomes toward more fortuitous results.', 'Congregate around repositories of ancient knowledge, from the towering spires of the Arcane Academy to the buried archives beneath the ruins of fallen civilizations in the Forgotten Wastes. They maintain complex networks connecting disparate sources of information, sometimes serving as living messengers between isolated scholars. The legendary Grand Library of Eternity reportedly hosts an entire society of these creatures that maintain knowledge too dangerous or complex to be recorded in conventional books.', 'Only manifest in locations where the veil between mortal and divine realms naturally thins, particularly around the blessed shrines atop the Celestial Peaks and within the hallowed chambers of ancient temples in the Sacred Heartlands. They often appear during significant astronomical alignments or in the aftermath of sincere prayers by the truly faithful. The holiest of sites sometimes feature permanent Divine Slime guardians that have watched over sacred relics for countless generations, their very presence purifying the surrounding area of malevolent influences.'],
+ favoriteFoods: ['Leaves and fruits that fall to the ground.', 'Ice crystals, frozen berries, and snow.', 'Algae and small water plants.', 'Minerals, gemstones, and small rocks.', 'Coal and spicy peppers.', 'Dark essence, shadows, and black fungi.', 'Magical plants, mushrooms, and forest berries.', 'Raw meat, bones, and animal essences.', 'Gold coins, lucky charms, and shiny trinkets.', 'Ink, ancient scrolls, and magical runes.', 'Star fragments, holy water, and sacred plants.'],
+ abilities: ['Can bounce to extraordinary heights and divide into multiple autonomous smaller slimes that maintain a telepathic connection with the original entity. These smaller units can scout different areas simultaneously and recombine to share gathered information, making them excellent explorers and messengers.', 'Can instantly freeze objects up to three times their size and generate intricate ice crystals that shimmer with magical energy. They can create temporary ice bridges across gaps and fashion defensive ice barriers that are surprisingly resistant to heat and physical damage, protecting themselves and allies from danger.', 'Can transform their entire body into liquid state with perfect molecular control, allowing them to flow through microscopic cracks, navigate complex pipe systems, and even split into multiple streams before reforming. In water form, they can survive extreme pressure depths and carry small objects through otherwise impassable barriers.', 'Can compress their bodies to achieve diamond-like hardness, withstanding pressures that would crush ordinary metals. They can extend this protective ability to shield companions by forming dome-like structures and can shape parts of their body into tools capable of carving through stone and lesser metals with ease.', 'Can generate focused flame jets hot enough to melt iron and create controlled heat zones that maintain specific temperatures for days without additional fuel. Advanced specimens can separate their flames from their body temporarily, creating independent fire sources that obey simple commands and return when called.', 'Can manipulate darkness to become completely undetectable to normal and magical vision alike, even leaving no shadow or reflection. They can absorb light from an area, creating zones of perfect darkness, and store this energy to release later as blinding flashes or to power light-based magical artifacts.', 'Can perfectly mimic the appearance and texture of plant life to become virtually undetectable in forest environments. They cultivate symbiotic relationships with rare magical plants that grow on their surface, providing them enhanced sensory capabilities and the ability to synthesize healing compounds for themselves and allies.', 'Can analyze and memorize scent patterns with such precision they can track prey through raging rivers, dense fog, and even days after the trail was laid. Their body structure can rapidly shift to create temporary natural weapons like claws, horns, or spines with strength rivaling steel and the ability to secrete paralyzing toxins.', 'Can perceive probability streams invisible to other creatures, instinctively choosing paths that lead to beneficial outcomes and avoiding disaster before any signs are apparent. They can temporarily extend this fortune field to nearby allies, granting enhanced success rates for difficult tasks and protection from unexpected dangers.', 'Can instantly memorize and categorize any written or spoken information they encounter, developing internal rune structures that serve as magical databases. They can project these runes externally as glowing symbols that interact with and unlock ancient magical mechanisms, and can translate forgotten languages by analyzing linguistic patterns.', 'Can channel pure divine energy to mend wounds, purify corrupted areas, and even temporarily restore life to recently deceased small creatures. Their divine light can reveal illusions, banish malevolent spirits, and create sanctified zones where evil entities cannot enter, making them invaluable companions in haunted or corrupted regions.'],
+ stats: [{
+ strength: 3,
+ agility: 5,
+ defense: 2,
+ magic: 1,
+ luck: 2,
+ mysticism: 1
+ }, {
+ strength: 3,
+ agility: 2,
+ defense: 8,
+ magic: 6,
+ luck: 4,
+ mysticism: 5
+ }, {
+ strength: 2,
+ agility: 7,
+ defense: 1,
+ magic: 5,
+ luck: 4,
+ mysticism: 3
+ }, {
+ strength: 8,
+ agility: 1,
+ defense: 9,
+ magic: 2,
+ luck: 3,
+ mysticism: 1
+ }, {
+ strength: 6,
+ agility: 3,
+ defense: 4,
+ magic: 7,
+ luck: 2,
+ mysticism: 6
+ }, {
+ strength: 5,
+ agility: 8,
+ defense: 3,
+ magic: 9,
+ luck: 6,
+ mysticism: 8
+ }, {
+ strength: 4,
+ agility: 6,
+ defense: 5,
+ magic: 8,
+ luck: 5,
+ mysticism: 7
+ }, {
+ strength: 9,
+ agility: 7,
+ defense: 7,
+ magic: 3,
+ luck: 8,
+ mysticism: 2
+ }, {
+ strength: 3,
+ agility: 5,
+ defense: 2,
+ magic: 6,
+ luck: 10,
+ mysticism: 4
+ }, {
+ strength: 5,
+ agility: 4,
+ defense: 3,
+ magic: 9,
+ luck: 7,
+ mysticism: 10
+ }, {
+ strength: 7,
+ agility: 4,
+ defense: 6,
+ magic: 10,
+ luck: 10,
+ mysticism: 9
+ }],
+ lifespans: ['Average lifespan reaches 100 years in wilderness conditions and extends to 150 years in protected environments. Unlike conventional aging, Classic Slimes don\'t deteriorate but rather reach a stability threshold where their division rate perfectly balances their mass accumulation. The oldest documented specimen lived to 212 years in the Royal Academy\'s conservation habitat.', 'Typically survive 90-120 years, with mandatory hibernation during summer months when temperatures exceed their optimal range. During hibernation, they enter a crystalline stasis where metabolic functions virtually cease, allowing them to survive even when their habitat temporarily melts. Some specimens buried in ancient glacier ice have been revived after thousands of years in suspended animation.', 'Natural lifespan averages 75 years in stable aquatic environments, but they possess remarkable rejuvenation abilities when merged with pristine water sources containing specific mineral compositions. Water Slimes from sacred springs have been documented living over 200 years through cyclical rejuvenation. They don\'t die conventionally but rather gradually dissolve and become one with their aquatic environment.', 'Among the longest-lived slime species, routinely reaching 500 years when undisturbed in deep cavern systems. Their mineral composition stabilizes with age, forming crystalline matrices that resist degradation. The legendary Rock Slime known as "The Old Guardian" in the Deephold Mountains has been documented by seventeen generations of dwarven chroniclers, putting its age at approximately 1,200 years.', 'Comparatively short-lived at 30-40 years due to their accelerated metabolic rate, but they compensate with remarkably efficient reproduction, capable of producing offspring every third month under optimal conditions. Their brief lives are extraordinarily energetic, with older specimens burning so intensely they sometimes spontaneously transform into pure elemental fire essence upon death rather than leaving remains.', 'Natural lifespan extends to 120-150 years, with their power and shadow manipulation abilities intensifying with each decade. Shadow Slimes don\'t age conventionally but gradually become more ethereal, with the oldest specimens existing partially in the shadow realm. Ancient texts describe "Eternal Shadows" that have lived for centuries, becoming virtually immortal but increasingly incorporeal and difficult to perceive in the material world.', 'Regularly achieve 200-250 years in ancient forests with strong magical currents. Unlike other slimes, they grow more vibrant with age rather than showing signs of deterioration. Their plant symbiosis becomes more complex over time, eventually allowing the oldest specimens to develop rudimentary communication with forest entities and influence plant growth in their territories. Some Forest Scholars believe they eventually transform into forest spirits.', 'While comparatively short-lived at approximately 50 years, Beast Slimes possess extraordinary cellular regeneration, allowing them to survive injuries that would destroy other creatures. Their intense metabolic rate accelerates their life cycle but grants them peak physical capabilities throughout their entire existence rather than experiencing decline. Some incorporate traits from particularly long-lived prey, temporarily extending their lifespans.', 'Perhaps the most variable lifespan of any slime species, ranging from an astonishingly brief 20 years to an extended 300 years entirely based on the individual\'s internal luck quotient. Researchers have documented cases where seemingly identical Lucky Slimes followed radically different aging trajectories based on apparently random probability fluctuations. Some appear to manipulate their own life-threads, occasionally cheating death itself through improbable circumstances.', 'Consistently achieve 400-500 years, serving as living archives of magical knowledge that would otherwise be lost to time. Their unique neural structures resist degradation, allowing them to maintain perfect recall of ancient spells and forgotten lore throughout their centuries of existence. The oldest specimens develop consciousness layers that operate independently, essentially becoming multiple entities sharing one form to process vast knowledge repositories.', 'True biological immortality, with no natural lifespan limit, growing in power and wisdom indefinitely unless destroyed by external means. The divine essence in their cellular structure continuously regenerates, preventing degradation and allowing perpetual development of their magical capabilities. Ancient texts speak of Divine Slimes that have existed since the world\'s creation, acting as silent observers of history and occasionally guiding events from the shadows when cosmic balance requires intervention.']
};
-var histories = ['Existed since ancient times, Classic Slimes are the foundation of all slime species in the known world. Their simple cellular structure allows them to adapt to various environments while maintaining their core properties. Early explorers documented their presence in the First Age scrolls, noting their resilient nature and ability to reproduce through division. Despite appearing mundane, these slimes possess remarkable genetic flexibility, enabling the evolution of all other slime varieties. Researchers at the Royal Academy continue studying them to understand the fundamental nature of magical creatures.', 'Formed in the eternal winter of the northern mountains, Snowy Slimes developed crystalline structures within their bodies to survive extreme cold. Their ancestors were ordinary slimes that became trapped during the Great Freeze millennium ago. Over generations, they evolved the ability to regulate internal temperature by absorbing and releasing cold energy. The legendary explorer Frostmantle first documented them in his expedition journals, describing how villages in northern regions domesticated these creatures to preserve food during summer months. Their translucent bodies sometimes reveal small ice crystals that shimmer in the light.', 'Evolved from classic slimes that were swept into rivers during the Great Flood 500 years ago, Water Slimes adapted by developing semi-permeable membranes that allow them to control water absorption. Unlike their land-dwelling relatives, they can partially dissolve their bodies to flow through narrow spaces, then reform on the other side. The Aquatic Scholars Guild has documented their unique life cycle, which includes a seasonal migration upstream to ancient spawning pools where they divide into new colonies. Coastal communities consider their presence in local waters to be a sign of healthy aquatic ecosystems.', 'Formed in ancient mountains from mineral-rich environments, Rock Slimes emerged over 1000 years ago when classic slimes absorbed crystalline formations in deep caverns. Their bodies gradually incorporated silicon compounds and trace metals, developing a semi-solid external layer that protects their gelatinous core. The Mountain Dwarf chronicles describe these creatures as "living stones" that would guard treasure hoards. They grow throughout their lives by slowly absorbing minerals from their surroundings, with the oldest specimens developing gemstone-like formations within their bodies that are highly prized by collectors.', 'Born from volcanic activity, Fire Slimes first appeared 200 years ago after the cataclysmic eruption of Mount Infernus. The intense magical energies released during that event transformed ordinary slimes trapped in lava flows, imbuing them with the essence of elemental fire. Unlike most slimes, they maintain an internal temperature of over 200 degrees, allowing them to melt through most materials. The Flamekeepers Guild has established sanctuaries for these rare creatures, studying their unique ability to consume combustible materials without oxygen. Ancient texts suggest they were once used as living forge fires by master craftsmen.', 'Created when classic slimes were trapped in the deepest caverns following the Cataclysm of Shadows, these unique creatures evolved over countless generations in complete darkness. Their bodies developed the remarkable ability to absorb light, effectively rendering them nearly invisible in low-light conditions. The renowned shadow mage Umbral first documented their existence, noting how they seemed to move between the material world and the shadow realm. Villages near the Ancient Chasms report that these slimes emerge on moonless nights, quietly gathering unknown substances before returning to the depths by dawn. Some scholars believe they communicate through subtle vibrations imperceptible to most beings.', 'Developed from slimes that inhabited the enchanted Whispering Woods for over 300 years, Forest Slimes underwent a gradual transformation as they consumed magical flora and absorbed ambient nature magic. Their bodies now contain chlorophyll-like compounds that allow them to photosynthesize, giving them their distinctive green coloration and reducing their need to consume other matter. Elven naturalists have observed symbiotic relationships between these slimes and certain rare flowering plants, with the slimes protecting the plants from parasites while receiving magical nutrients in return. The Druidic Circle considers these creatures sacred guardians of natural balance.', 'Evolved through a unique process where ordinary slimes consumed the essence of fallen monsters in ancient battlegrounds, Beast Slimes developed predatory characteristics over countless generations. Their bodies contain specialized organelles that can process and incorporate traits from creatures they consume, sometimes manifesting as temporary physical features such as fur-like textures or claw-shaped protrusions. The legendary monster hunter Thorne documented their complex hunting behaviors, noting their ability to track prey through seemingly impossible conditions. Some frontier villages have domesticated these slimes as guardians, though they require careful handling and regular feeding.', 'Born during an exceedingly rare meteorological event known as the Seven-Hued Convergence, Lucky Slimes came into existence when ordinary slimes absorbed concentrated luck essence that manifested at the terminus of seven simultaneous rainbows. Their golden bodies contain swirling patterns that seem to shift and change when observed, creating an almost hypnotic effect. The Fortunate Order maintains that these slimes exist simultaneously in multiple probability streams, allowing them to unconsciously select favorable outcomes. Merchants and gamblers often seek them as companions, though their unpredictable nature means they sometimes bring spectacular misfortune instead of the desired luck.', 'Created when ordinary slimes absorbed ancient magical runes from the forgotten Library of Eternity, these rare creatures developed unique neural structures capable of storing and processing magical information. Their translucent bodies constantly display shifting runic patterns that scholars believe represent a form of external memory storage. The Arcane Academy has documented cases where these slimes assisted mages by recalling forgotten spells during times of need. Their natural affinity for magic allows them to sense ley lines and magical disturbances from great distances, making them invaluable to explorers of ruins and researchers of ancient magical phenomena.', 'Born during the Grand Celestial Convergence when a Divine Ray pierced the veil between realms and struck an ordinary slime, these exceedingly rare creatures embody perfect magical harmony. Their luminous bodies contain particles of pure divine essence that never diminishes, giving them an ethereal glow visible even in complete darkness. The Church of Eternal Light maintains that these slimes are messengers between the mortal realm and the divine, capable of bestowing blessings on the truly worthy. Ancient prophecies speak of Divine Slimes appearing during times of great cosmic significance, their presence heralding transformative events that reshape the world.'];
-var locations = ['Widely distributed across temperate ecosystems, from the verdant forests of Eldenwood to the sprawling grasslands of the Eastern Realms. They particularly thrive in the transitional zones between different biomes where ambient magical energies naturally concentrate. Ancient dungeons with consistent moisture levels host specialized subpopulations that have adapted to subterranean conditions, developing paler coloration and enhanced sensing abilities to compensate for limited light.', 'Exclusively inhabit regions perpetually covered in snow and ice, particularly concentrated in the Frostpeak Mountains and along the glacial plains of the Northern Frontier. They build elaborate tunnel systems beneath the snow where they maintain carefully regulated subfreezing temperatures. The legendary Crystal Valley hosts the largest known colony, where thousands gather during the winter solstice to perform synchronized freezing displays that create breathtaking ice sculptures visible for miles.', 'Primarily dwell in freshwater environments with strong currents, from the crystal-clear pools of the Whispering Rivers to the mist-shrouded waterways of the Everrain Province. They construct elaborate underwater colonies around natural springs where water purity is highest, creating complex current patterns that serve as both protection and communication networks. During seasonal monsoons, they rise to the surface and absorb rainwater directly from the clouds, appearing to dance on the water\'s surface.', 'Inhabit mineral-rich geological formations, particularly prevalent in the Iron Spine Mountains and throughout the crystalline cave networks of the Deephold region. They congregate around geode formations and natural crystal chambers where they absorb trace elements that strengthen their outer shells. Ancient mining societies documented specialized colonies living symbiotically with precious gem deposits, protecting the valuable resources from unauthorized extraction through elaborate tunnel collapses.', 'Thrive in regions of intense geothermal activity, concentrating around the active volcanoes of the Ashland Archipelago and throughout the superheated vents of the Scorched Expanse desert. They often gather in hierarchical colonies around lava pools, with dominant specimens claiming positions closest to the heat source. During rare alignment of the twin suns, they perform synchronized heat displays above the volcanic caldera, creating spectacular fire patterns visible from great distances.', 'Exclusively inhabit locations completely devoid of natural light, from the bottomless chasms of the Forgotten Depth to the sealed crypts beneath ancient ruins in the Shrouded Territories. They carve out territories defined by the absence of illumination, creating shadow domains where they maintain absolute darkness. The legendary Shadow Labyrinth reportedly contains a vast metropolis of these creatures, though few explorers who venture there ever return to confirm its existence.', 'Flourish in ancient woodland ecosystems with high concentrations of magical plantlife, particularly abundant in the sentient groves of the Wyrdwood and throughout the centuries-old canopies of the Emerald Expanse. They establish symbiotic circles with magical flora, creating self-sustaining ecosystems where both slimes and plants benefit from enhanced magical currents. The most sacred groves sometimes feature enormous Forest Slimes that have merged with ancient trees, becoming living guardians that shape the forest around them.', 'Dominate untamed wilderness regions where apex predators still rule, particularly prevalent in the Fangwood Wilderness and throughout the uncharted territories beyond the Frontier Settlements. They establish hunting grounds in competition with natural predators, sometimes forming temporary alliances with wolf packs or great cats to take down larger prey. The legendary Crimson Valley hosts the most aggressive specimens, where centuries of consuming mythical beasts have created Beast Slimes with unprecedented adaptations.', 'Appear in locations where probability curves naturally bend toward positive outcomes, particularly concentrated around natural wonders like the Sevenfold Cascade where seven waterfalls create perpetual rainbows, and throughout the rolling hills of the Fortune Fields where four-leaf clovers grow in unusual abundance. They gravitate toward crossroads, convergent ley lines, and places where important decisions are made, subtly influencing outcomes toward more fortuitous results.', 'Congregate around repositories of ancient knowledge, from the towering spires of the Arcane Academy to the buried archives beneath the ruins of fallen civilizations in the Forgotten Wastes. They maintain complex networks connecting disparate sources of information, sometimes serving as living messengers between isolated scholars. The legendary Grand Library of Eternity reportedly hosts an entire society of these creatures that maintain knowledge too dangerous or complex to be recorded in conventional books.', 'Only manifest in locations where the veil between mortal and divine realms naturally thins, particularly around the blessed shrines atop the Celestial Peaks and within the hallowed chambers of ancient temples in the Sacred Heartlands. They often appear during significant astronomical alignments or in the aftermath of sincere prayers by the truly faithful. The holiest of sites sometimes feature permanent Divine Slime guardians that have watched over sacred relics for countless generations, their very presence purifying the surrounding area of malevolent influences.'];
-var favoriteFoods = ['Leaves and fruits that fall to the ground.', 'Ice crystals, frozen berries, and snow.', 'Algae and small water plants.', 'Minerals, gemstones, and small rocks.', 'Coal and spicy peppers.', 'Dark essence, shadows, and black fungi.', 'Magical plants, mushrooms, and forest berries.', 'Raw meat, bones, and animal essences.', 'Gold coins, lucky charms, and shiny trinkets.', 'Ink, ancient scrolls, and magical runes.', 'Star fragments, holy water, and sacred plants.'];
-var abilities = ['Can bounce to extraordinary heights and divide into multiple autonomous smaller slimes that maintain a telepathic connection with the original entity. These smaller units can scout different areas simultaneously and recombine to share gathered information, making them excellent explorers and messengers.', 'Can instantly freeze objects up to three times their size and generate intricate ice crystals that shimmer with magical energy. They can create temporary ice bridges across gaps and fashion defensive ice barriers that are surprisingly resistant to heat and physical damage, protecting themselves and allies from danger.', 'Can transform their entire body into liquid state with perfect molecular control, allowing them to flow through microscopic cracks, navigate complex pipe systems, and even split into multiple streams before reforming. In water form, they can survive extreme pressure depths and carry small objects through otherwise impassable barriers.', 'Can compress their bodies to achieve diamond-like hardness, withstanding pressures that would crush ordinary metals. They can extend this protective ability to shield companions by forming dome-like structures and can shape parts of their body into tools capable of carving through stone and lesser metals with ease.', 'Can generate focused flame jets hot enough to melt iron and create controlled heat zones that maintain specific temperatures for days without additional fuel. Advanced specimens can separate their flames from their body temporarily, creating independent fire sources that obey simple commands and return when called.', 'Can manipulate darkness to become completely undetectable to normal and magical vision alike, even leaving no shadow or reflection. They can absorb light from an area, creating zones of perfect darkness, and store this energy to release later as blinding flashes or to power light-based magical artifacts.', 'Can perfectly mimic the appearance and texture of plant life to become virtually undetectable in forest environments. They cultivate symbiotic relationships with rare magical plants that grow on their surface, providing them enhanced sensory capabilities and the ability to synthesize healing compounds for themselves and allies.', 'Can analyze and memorize scent patterns with such precision they can track prey through raging rivers, dense fog, and even days after the trail was laid. Their body structure can rapidly shift to create temporary natural weapons like claws, horns, or spines with strength rivaling steel and the ability to secrete paralyzing toxins.', 'Can perceive probability streams invisible to other creatures, instinctively choosing paths that lead to beneficial outcomes and avoiding disaster before any signs are apparent. They can temporarily extend this fortune field to nearby allies, granting enhanced success rates for difficult tasks and protection from unexpected dangers.', 'Can instantly memorize and categorize any written or spoken information they encounter, developing internal rune structures that serve as magical databases. They can project these runes externally as glowing symbols that interact with and unlock ancient magical mechanisms, and can translate forgotten languages by analyzing linguistic patterns.', 'Can channel pure divine energy to mend wounds, purify corrupted areas, and even temporarily restore life to recently deceased small creatures. Their divine light can reveal illusions, banish malevolent spirits, and create sanctified zones where evil entities cannot enter, making them invaluable companions in haunted or corrupted regions.'];
-var stats = [{
- strength: 3,
- agility: 5,
- defense: 2,
- magic: 1,
- luck: 2,
- mysticism: 1
-}, {
- strength: 3,
- agility: 2,
- defense: 8,
- magic: 6,
- luck: 4,
- mysticism: 5
-}, {
- strength: 2,
- agility: 7,
- defense: 1,
- magic: 5,
- luck: 4,
- mysticism: 3
-}, {
- strength: 8,
- agility: 1,
- defense: 9,
- magic: 2,
- luck: 3,
- mysticism: 1
-}, {
- strength: 6,
- agility: 3,
- defense: 4,
- magic: 7,
- luck: 2,
- mysticism: 6
-}, {
- strength: 5,
- agility: 8,
- defense: 3,
- magic: 9,
- luck: 6,
- mysticism: 8
-}, {
- strength: 4,
- agility: 6,
- defense: 5,
- magic: 8,
- luck: 5,
- mysticism: 7
-}, {
- strength: 9,
- agility: 7,
- defense: 7,
- magic: 3,
- luck: 8,
- mysticism: 2
-}, {
- strength: 3,
- agility: 5,
- defense: 2,
- magic: 6,
- luck: 10,
- mysticism: 4
-}, {
- strength: 5,
- agility: 4,
- defense: 3,
- magic: 9,
- luck: 7,
- mysticism: 10
-}, {
- strength: 7,
- agility: 4,
- defense: 6,
- magic: 10,
- luck: 10,
- mysticism: 9
-}];
-var lifespans = ['Average lifespan reaches 100 years in wilderness conditions and extends to 150 years in protected environments. Unlike conventional aging, Classic Slimes don\'t deteriorate but rather reach a stability threshold where their division rate perfectly balances their mass accumulation. The oldest documented specimen lived to 212 years in the Royal Academy\'s conservation habitat.', 'Typically survive 90-120 years, with mandatory hibernation during summer months when temperatures exceed their optimal range. During hibernation, they enter a crystalline stasis where metabolic functions virtually cease, allowing them to survive even when their habitat temporarily melts. Some specimens buried in ancient glacier ice have been revived after thousands of years in suspended animation.', 'Natural lifespan averages 75 years in stable aquatic environments, but they possess remarkable rejuvenation abilities when merged with pristine water sources containing specific mineral compositions. Water Slimes from sacred springs have been documented living over 200 years through cyclical rejuvenation. They don\'t die conventionally but rather gradually dissolve and become one with their aquatic environment.', 'Among the longest-lived slime species, routinely reaching 500 years when undisturbed in deep cavern systems. Their mineral composition stabilizes with age, forming crystalline matrices that resist degradation. The legendary Rock Slime known as "The Old Guardian" in the Deephold Mountains has been documented by seventeen generations of dwarven chroniclers, putting its age at approximately 1,200 years.', 'Comparatively short-lived at 30-40 years due to their accelerated metabolic rate, but they compensate with remarkably efficient reproduction, capable of producing offspring every third month under optimal conditions. Their brief lives are extraordinarily energetic, with older specimens burning so intensely they sometimes spontaneously transform into pure elemental fire essence upon death rather than leaving remains.', 'Natural lifespan extends to 120-150 years, with their power and shadow manipulation abilities intensifying with each decade. Shadow Slimes don\'t age conventionally but gradually become more ethereal, with the oldest specimens existing partially in the shadow realm. Ancient texts describe "Eternal Shadows" that have lived for centuries, becoming virtually immortal but increasingly incorporeal and difficult to perceive in the material world.', 'Regularly achieve 200-250 years in ancient forests with strong magical currents. Unlike other slimes, they grow more vibrant with age rather than showing signs of deterioration. Their plant symbiosis becomes more complex over time, eventually allowing the oldest specimens to develop rudimentary communication with forest entities and influence plant growth in their territories. Some Forest Scholars believe they eventually transform into forest spirits.', 'While comparatively short-lived at approximately 50 years, Beast Slimes possess extraordinary cellular regeneration, allowing them to survive injuries that would destroy other creatures. Their intense metabolic rate accelerates their life cycle but grants them peak physical capabilities throughout their entire existence rather than experiencing decline. Some incorporate traits from particularly long-lived prey, temporarily extending their lifespans.', 'Perhaps the most variable lifespan of any slime species, ranging from an astonishingly brief 20 years to an extended 300 years entirely based on the individual\'s internal luck quotient. Researchers have documented cases where seemingly identical Lucky Slimes followed radically different aging trajectories based on apparently random probability fluctuations. Some appear to manipulate their own life-threads, occasionally cheating death itself through improbable circumstances.', 'Consistently achieve 400-500 years, serving as living archives of magical knowledge that would otherwise be lost to time. Their unique neural structures resist degradation, allowing them to maintain perfect recall of ancient spells and forgotten lore throughout their centuries of existence. The oldest specimens develop consciousness layers that operate independently, essentially becoming multiple entities sharing one form to process vast knowledge repositories.', 'True biological immortality, with no natural lifespan limit, growing in power and wisdom indefinitely unless destroyed by external means. The divine essence in their cellular structure continuously regenerates, preventing degradation and allowing perpetual development of their magical capabilities. Ancient texts speak of Divine Slimes that have existed since the world\'s creation, acting as silent observers of history and occasionally guiding events from the shadows when cosmic balance requires intervention.'];
// Create text display for slime name
var slimeNameText = new Text2(slimeNames[currentSlimeIndex], {
size: 100,
fill: 0xFFFFFF
@@ -344,81 +279,56 @@
// Prepare info categories and data
var infoCategories = [{
title: "Rarity",
get: function get(i) {
- var rarityValue = rarityValues[i];
+ var rarityValue = slimeInfo.rarityValues[i];
this.currentRarityValue = rarityValue;
- return rarityNamesByValue[rarityValue];
+ return slimeInfo.rarityNamesByValue[rarityValue];
}
}, {
title: "History",
get: function get(i) {
- return histories[i];
+ return slimeInfo.histories[i];
}
}, {
title: "Location",
get: function get(i) {
- return locations[i];
+ return slimeInfo.locations[i];
}
}, {
title: "Favorite Food",
get: function get(i) {
- return favoriteFoods[i];
+ return slimeInfo.favoriteFoods[i];
}
}, {
title: "Ability",
get: function get(i) {
- return abilities[i];
+ return slimeInfo.abilities[i];
}
}, {
title: "Stats",
get: function get(i) {
- var s = stats[i];
- // Create a container for all stats bars
- var statsContainer = new Container();
- // Define colors for different stats
- var statColors = {
- "Strength": 0xE74C3C,
- // Red
- "Agility": 0x2ECC71,
- // Green
- "Defense": 0x3498DB,
- // Blue
- "Magic": 0x9B59B6,
- // Purple
- "Luck": 0xF1C40F,
- // Yellow
- "Mysticism": 0xE67E22 // Orange
- };
- // Create and position each stat bar
- var statBar1 = new StatBar().init("Strength", s.strength, 10, statColors["Strength"]);
- statBar1.y = 0;
- statsContainer.addChild(statBar1);
- var statBar2 = new StatBar().init("Agility", s.agility, 10, statColors["Agility"]);
- statBar2.y = 70;
- statsContainer.addChild(statBar2);
- var statBar3 = new StatBar().init("Defense", s.defense, 10, statColors["Defense"]);
- statBar3.y = 140;
- statsContainer.addChild(statBar3);
- var statBar4 = new StatBar().init("Magic", s.magic, 10, statColors["Magic"]);
- statBar4.y = 210;
- statsContainer.addChild(statBar4);
- var statBar5 = new StatBar().init("Luck", s.luck, 10, statColors["Luck"]);
- statBar5.y = 280;
- statsContainer.addChild(statBar5);
- var statBar6 = new StatBar().init("Mysticism", s.mysticism, 10, statColors["Mysticism"]);
- statBar6.y = 350;
- statsContainer.addChild(statBar6);
- // Return the container as a special object that will be handled in updateInfoPanel
- return {
- type: "statsContainer",
- container: statsContainer
- };
+ var s = slimeInfo.stats[i];
+ // Create visual stat bars with colored values using actual colors instead of tags
+ function formatStat(name, value) {
+ var barChars = "■".repeat(value);
+ var emptyChars = "□".repeat(10 - value);
+ return name + ": " + value + " [" + barChars + emptyChars + "]";
+ }
+ // Create a single column with all 6 stats
+ var statText = "";
+ statText += formatStat("Strength", s.strength) + "\n";
+ statText += formatStat("Agility", s.agility) + "\n";
+ statText += formatStat("Defense", s.defense) + "\n";
+ statText += formatStat("Magic", s.magic) + "\n";
+ statText += formatStat("Luck", s.luck) + "\n";
+ statText += formatStat("Mysticism", s.mysticism);
+ return statText;
}
}, {
title: "Lifespan",
get: function get(i) {
- return lifespans[i];
+ return slimeInfo.lifespans[i];
}
}];
// Create a container for the scrollable text
var infoTextContainer = new Container();
@@ -458,67 +368,47 @@
titleText.anchor.set(0.5, 0);
titleText.x = infoPanelWidth / 2 - 30;
titleText.y = y;
infoTextContainer.addChild(titleText);
- y += titleText.height + 10; // Slightly more spacing after title
- // Create a horizontal separator line after each title for better section separation
- if (infoCategories[c].title !== "Rarity") {
- // Skip separator for rarity since it has stars
- var separator = new Container();
- var lineWidth = infoPanelWidth - 200;
- var lineHeight = 4;
- var line = LK.getAsset('Interfaz', {
- anchorX: 0.5,
- anchorY: 0.5,
- width: lineWidth,
- height: lineHeight,
- alpha: 0.3
- });
- separator.addChild(line);
- separator.x = infoPanelWidth / 2 - 30;
- separator.y = y - 5;
- infoTextContainer.addChild(separator);
- }
- // Info - process content based on category
+ y += titleText.height + 6;
+ // Info - wrap text to fit screen width
var infoContent = infoCategories[c].get(currentSlimeIndex);
- // Special handling for stats container
- if (infoCategories[c].title === "Stats" && infoContent && infoContent.type === "statsContainer") {
- var statsContainer = infoContent.container;
- statsContainer.x = (infoPanelWidth - 750) / 2; // Center the stats container
- statsContainer.y = y + 20;
- infoTextContainer.addChild(statsContainer);
- // Set height for positioning next elements
- y += 450; // Enough space for all stat bars
- continue; // Skip the rest of the loop iteration
+ var wrappedText = infoContent;
+ // Only apply text wrapping if not the stats category (which already has formatting)
+ if (infoCategories[c].title !== "Stats") {
+ wrappedText = wrapText(infoContent, infoPanelWidth - 60, 85); // Wrap text with some padding
+ }
+ // Choose text color based on category
+ var textColors = {
+ "Rarity": 0xFFFACD,
+ "History": 0xE6E6FA,
+ "Location": 0xF0FFF0,
+ "Favorite Food": 0xFFE4E1,
+ "Ability": 0xE0FFFF,
+ "Stats": 0xFFE4E1,
+ "Lifespan": 0xF0FFFF
+ };
+ var textColor = textColors[infoCategories[c].title] || 0xFFFFFF;
+ var infoText = new Text2(wrappedText, {
+ size: 85,
+ fill: textColor,
+ font: "GillSans",
+ align: infoCategories[c].title === "Stats" ? "left" : "center",
+ dropShadow: true,
+ dropShadowColor: 0x333333,
+ dropShadowDistance: 2,
+ dropShadowAlpha: 0.3
+ });
+ // Set anchor based on content type
+ if (infoCategories[c].title === "Stats") {
+ infoText.anchor.set(0.5, 0); // Center align stats too
+ infoText.x = infoPanelWidth / 2 - 30;
} else {
- // Normal text handling for other categories
- var wrappedText = wrapText(infoContent, infoPanelWidth - 60, 85); // Wrap text with some padding
- // Choose text color based on category
- var textColors = {
- "Rarity": 0xFFFACD,
- "History": 0xE6E6FA,
- "Location": 0xF0FFF0,
- "Favorite Food": 0xFFE4E1,
- "Ability": 0xE0FFFF,
- "Stats": 0xFFE4E1,
- "Lifespan": 0xF0FFFF
- };
- var textColor = textColors[infoCategories[c].title] || 0xFFFFFF;
- var infoText = new Text2(wrappedText, {
- size: 85,
- fill: textColor,
- font: "GillSans",
- align: "center",
- dropShadow: true,
- dropShadowColor: 0x333333,
- dropShadowDistance: 2,
- dropShadowAlpha: 0.3
- });
- infoText.anchor.set(0.5, 0); // Center align for all content
+ infoText.anchor.set(0.5, 0); // Center align for other content
infoText.x = infoPanelWidth / 2 - 30;
- infoText.y = y + 20;
- infoTextContainer.addChild(infoText);
}
+ infoText.y = y + 20;
+ infoTextContainer.addChild(infoText);
// If this is the rarity category, add colored stars
if (infoCategories[c].title === "Rarity" && infoCategories[c].currentRarityValue) {
var starContainer = new Container();
starContainer.x = infoPanelWidth / 2 - 30;
@@ -563,12 +453,8 @@
maxScroll = Math.max(0, infoTextContainer.totalHeight - infoPanelHeight + 40 + 60); // Add 60px to account for top and bottom margins
// Create smooth bounce effect when reaching limits
if (scrollOffset < 0) {
scrollOffset = 0;
- // Stop any existing tweens before creating new ones
- tween.stop(infoTextContainer, {
- y: true
- });
tween(infoTextContainer, {
y: 30
}, {
duration: 300,
@@ -576,12 +462,8 @@
});
}
if (scrollOffset > maxScroll) {
scrollOffset = maxScroll;
- // Stop any existing tweens before creating new ones
- tween.stop(infoTextContainer, {
- y: true
- });
tween(infoTextContainer, {
y: 30 - maxScroll
}, {
duration: 300,
@@ -589,12 +471,8 @@
});
}
// Apply smooth scrolling
if (!scrollTweenActive && isScrolling === false) {
- // Stop any existing tweens before creating new ones
- tween.stop(infoTextContainer, {
- y: true
- });
tween(infoTextContainer, {
y: 30 - scrollOffset
}, {
duration: 100,
@@ -661,12 +539,8 @@
if (totalWeight > 0) {
scrollVelocity = recentVelocity / totalWeight * 15;
}
if (Math.abs(scrollVelocity) > 0.1) {
- // Cancel any existing tween before starting a new one
- tween.stop(infoTextContainer, {
- y: true
- });
var targetScroll = Math.max(0, Math.min(maxScroll, scrollOffset - scrollVelocity * 50));
var targetY = 30 - targetScroll;
scrollTweenActive = true;
tween(infoTextContainer, {
@@ -674,18 +548,12 @@
}, {
duration: 1000,
easing: tween.easeOutQuint,
onFinish: function onFinish() {
- // Update scroll offset to match final position
scrollOffset = 30 - infoTextContainer.y;
- // Ensure scroll offset is within bounds
- scrollOffset = Math.max(0, Math.min(maxScroll, scrollOffset));
scrollTweenActive = false;
}
});
- } else {
- // Even without velocity, ensure position is consistent
- scrollOffset = Math.max(0, Math.min(maxScroll, scrollOffset));
}
}
};
// Unified handler for both navigation buttons
@@ -699,20 +567,10 @@
leftButton.down = createButtonHandler('prev');
rightButton.down = createButtonHandler('next');
// When changing slime, update info panel and scroll position
function updateSlimeAndInfo() {
- // Stop ALL existing tweens on slime to prevent animation stacking and position drift
- tween.stop(slime, {
- alpha: true,
- scaleX: true,
- scaleY: true,
- rotation: true,
- x: true,
- y: true
- });
- // Store the base position for consistent reference
- var baseX = slime.baseX;
- var baseY = slime.baseY;
+ // Stop existing tweens before starting new ones to prevent animation conflicts
+ tween.stop(slime);
// Enhanced slime transition effects with color flash and particle-like animation
tween(slime, {
alpha: 0,
scaleX: 0.8,
@@ -731,11 +589,11 @@
anchorY: 0.5,
width: 500,
height: 500
});
- // Reset to exact base position to prevent drift
- slime.x = baseX;
- slime.y = baseY;
+ // Reset to base position to prevent drift
+ slime.x = slime.baseX;
+ slime.y = slime.baseY;
slime.alpha = 0;
slime.scaleX = 0.8;
slime.scaleY = 0.8;
slime.rotation = 0.1;
@@ -755,16 +613,13 @@
}, {
duration: 500,
easing: tween.elasticOut
});
- // Add gentle bobbing animation but use stored baseY
+ // Add gentle bobbing animation but store a reference to the initial position
+ var initialY = bg.height / 2; // Store original position
LK.setTimeout(function () {
- // Stop any existing y animation before starting new one
- tween.stop(slime, {
- y: true
- });
tween(slime, {
- y: baseY - 15
+ y: initialY - 15
}, {
duration: 1200,
easing: tween.easeInOut,
repeat: -1,
Star cartoon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime verde RPG con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime rojo prendido fuego RPG con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime RPG amarillo y divino con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime fantasmal RPG con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime blanco con una moneda brillante en la frente RPG con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime gris RPG con rocas en su espalda. Estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime RPG nevado con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime de agua RPG con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime bestia peludo RPG con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime morado con runas magicas RPG. Estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Un slime angelical RPG con estilo suave y simple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Fullscreen medieval landscape banner, 16:9, high definition, for a game titled "Slime Bestiary". Medieval forest with multiple colored slimes. No text on banner!