44
0
13d
User prompt
Hatsu butonu gözükmüyor seçtiğimiz Nen klasmanına göre ekle ve Nen diye bir buton daha koy burada tüm Nen teknikleri olsun temel 4 ilke Ten Zetsu Hatsu Ren ve sonrai leri düzey teknikler de olsun
User prompt
şu Level in Statların Barların göründüğü kısmı Ekranın Sol altına çek vede oyuna Bosslar da ekle Gon,Killua Hisoka Illumi bir tane tuş koy mesela Heavens Arena ya gidelim 200. kat a kadar dövüşelim kısaca Seyahat butonu ekle ve orada açılan ekrana gidebileceğimiz yerleri yaz Hatsu Yaratma 150 Aura 250 Strenght ve 100 Inteligence gerektirsin kısaca Oyuna anime ve Mangadaki Dinamikleri ekle !
User prompt
baştan bi Ekrandaki herşeyin yerini çalışıp çalışmadığını kontrol et ve bir kısma koy hepsini ve Hatsu oluşturma falan getir Nen yeminleri vb Statları bir kenara sayı ile yaz Level in altına
User prompt
Level kısmı haraket etmiyor 1 de takılı kalıyır ekranın Sol altındaki ve her seviye 2 Sp versin ve Type yerine Nen tipimizi yaz ve Hunter Exams ı Baya detaylandır Anime/mangadaki gibi aşamalar yap
User prompt
Maksimum 50 Level sınırı koy Oyunun en başında Avcı Sınavı bitene kadar Nen öğrenemeyelim
User prompt
oyuna Avcı sınavına girmeden önce başlayalım Antrenman yapıp Dövüşlerde Yeni yetenekler kazanalım Meditation butonu Push up butonu Run butonu antrenman için ekle Yetenek ağacı ekle !
User prompt
tuşları falan biraz daha büyütürmüsün ? yazılarıda aynı şekilde barlarda
Code edit (1 edits merged)
Please save this source code
User prompt
Hunter X Hunter: Nen Mastery Challenge
Initial prompt
bir Text Based Hunter X Hunter oyunu yaratmanı istiyorum !
/**** * Plugins ****/ var tween = LK.import("@upit/tween.v1"); var storage = LK.import("@upit/storage.v1"); /**** * Classes ****/ var MenuButton = Container.expand(function (text, callback) { var self = Container.call(this); var buttonBg = self.attachAsset('buttonBg', { anchorX: 0.5, anchorY: 0.5 }); var buttonText = new Text2(text, { size: 40, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.5); self.addChild(buttonText); self.callback = callback; self.isHovered = false; self.down = function (x, y, obj) { LK.getSound('menuSelect').play(); if (self.callback) { self.callback(); } }; self.move = function (x, y, obj) { if (!self.isHovered) { self.isHovered = true; buttonBg.tint = 0x6a6a6a; } }; return self; }); var SkillButton = Container.expand(function (skill, skillData) { var self = Container.call(this); var buttonColor = skillData.unlocked ? 0x4a4a4a : 0x2a2a2a; var buttonBg = LK.getAsset('buttonBg', { anchorX: 0.5, anchorY: 0.5, tint: buttonColor }); self.addChild(buttonBg); var skillText = new Text2(skillData.name, { size: 32, fill: skillData.unlocked ? 0xFFFFFF : 0x888888 }); skillText.anchor.set(0.5, 0.3); self.addChild(skillText); var costText = new Text2("SP: " + skillData.cost, { size: 24, fill: 0x00FF00 }); costText.anchor.set(0.5, 0.7); self.addChild(costText); self.skill = skill; self.skillData = skillData; self.down = function (x, y, obj) { if (!skillData.unlocked && player.skillPoints >= skillData.cost) { LK.getSound('levelUp').play(); unlockSkill(skill, skillData); } }; return self; }); var StatBar = Container.expand(function (label, maxValue, currentValue, color) { var self = Container.call(this); var labelText = new Text2(label + ": " + currentValue + "/" + maxValue, { size: 30, fill: 0xFFFFFF }); labelText.anchor.set(0, 0.5); self.addChild(labelText); var barBg = self.attachAsset('statBar', { anchorX: 0, anchorY: 0.5, x: 200 }); var barFill = LK.getAsset('statBarFill', { anchorX: 0, anchorY: 0.5, x: 200, scaleX: currentValue / maxValue, tint: color || 0x00ff00 }); self.addChild(barFill); self.maxValue = maxValue; self.currentValue = currentValue; self.barFill = barFill; self.labelText = labelText; self.updateValue = function (newValue) { self.currentValue = Math.max(0, Math.min(newValue, self.maxValue)); self.barFill.scaleX = self.currentValue / self.maxValue; self.labelText.setText(label + ": " + self.currentValue + "/" + self.maxValue); }; return self; }); var StoryPanel = Container.expand(function () { var self = Container.call(this); var panelBg = self.attachAsset('backgroundPanel', { anchorX: 0.5, anchorY: 0.5 }); var storyText = new Text2("", { size: 34, fill: 0xFFFFFF, wordWrap: true, wordWrapWidth: 1700 }); storyText.anchor.set(0.5, 0.5); self.addChild(storyText); self.storyText = storyText; self.setText = function (text) { self.storyText.setText(text); }; return self; }); var TrainingButton = Container.expand(function (activity, activityData) { var self = Container.call(this); var buttonBg = self.attachAsset('buttonBg', { anchorX: 0.5, anchorY: 0.5 }); var buttonText = new Text2(activityData.name, { size: 36, fill: 0xFFFFFF }); buttonText.anchor.set(0.5, 0.3); self.addChild(buttonText); var costText = new Text2("Energy: " + activityData.cost, { size: 24, fill: 0xFFFF00 }); costText.anchor.set(0.5, 0.7); self.addChild(costText); self.activity = activity; self.activityData = activityData; self.isHovered = false; self.down = function (x, y, obj) { if (player.energy >= activityData.cost) { LK.getSound('menuSelect').play(); performTraining(activity); } }; self.move = function (x, y, obj) { if (!self.isHovered) { self.isHovered = true; buttonBg.tint = 0x6a6a6a; } }; return self; }); /**** * Initialize Game ****/ var game = new LK.Game({ backgroundColor: 0x1a1a1a }); /**** * Game Code ****/ // Game State var gameState = "characterCreation"; var trainingState = "menu"; // menu, training, skillTree var player = { name: "Hunter", nenType: "", level: 1, experience: 0, maxExperience: 100, health: 100, maxHealth: 100, aura: 50, maxAura: 50, stats: { strength: 10, speed: 10, intelligence: 10, aura: 10 }, abilities: [], currentChapter: 1, energy: 100, maxEnergy: 100, skillPoints: 0, trainingCount: 0, hunterExamCompleted: false, hatsu: null, nenVow: null, hatsuMastery: 0 }; // Nen Types Data var nenTypes = { "Enhancer": { description: "Enhancers can increase the natural abilities of an object or one's own body.", bonuses: { strength: 3, health: 20 } }, "Emitter": { description: "Emitters can separate their aura from their body and control it from a distance.", bonuses: { aura: 10, intelligence: 2 } }, "Manipulator": { description: "Manipulators can control living or non-living things with their aura.", bonuses: { intelligence: 3, aura: 5 } }, "Transmuter": { description: "Transmuters can change the properties of their aura to mimic other substances.", bonuses: { speed: 3, aura: 5 } }, "Conjurer": { description: "Conjurers can create physical objects out of their aura.", bonuses: { intelligence: 2, aura: 8 } }, "Specialist": { description: "Specialists have unique abilities that don't fit into other categories.", bonuses: { aura: 15 } } }; // Story Chapters - Hunter Exam Stages var storyChapters = { 1: { title: "Hunter Exam - Phase 1: The Long Run", text: "Examiner Satotz leads 404 applicants through the Milsy Wetlands. You must keep up with his pace while avoiding the creatures lurking in the fog. How do you proceed?", choices: [{ text: "Stay close to the examiner and maintain steady pace", action: "steady_pace" }, { text: "Sprint ahead to secure a good position", action: "sprint_ahead" }, { text: "Help other struggling candidates", action: "help_others" }] }, 2: { title: "Hunter Exam - Phase 2: Gourmet Hunters", text: "Examiners Menchi and Buhara challenge you to cook! Buhara wants roasted whole pig, while Menchi demands the perfect boiled egg. The kitchen is chaotic with desperate candidates.", choices: [{ text: "Hunt the Great Stamp pig with strategy", action: "hunt_strategically" }, { text: "Attempt to cook multiple dishes quickly", action: "cook_multiple" }, { text: "Observe successful candidates and learn", action: "observe_learn" }] }, 3: { title: "Hunter Exam - Phase 3: Trick Tower", text: "The 50-hour time limit challenge in the Trick Tower! You must navigate traps, puzzles, and face other candidates. Your current path leads to a choice of three doors.", choices: [{ text: "Choose the door marked with strength symbol", action: "strength_door" }, { text: "Choose the door marked with wisdom symbol", action: "wisdom_door" }, { text: "Choose the door marked with agility symbol", action: "agility_door" }] }, 4: { title: "Hunter Exam - Phase 4: Zevil Island", text: "You've landed on Zevil Island! Each candidate must collect 6 points total - 3 from your target's badge, 1 from your own, and 2 from anyone else's. Your target has been spotted near the rocky cliffs.", choices: [{ text: "Ambush your target using stealth", action: "stealth_ambush" }, { text: "Challenge your target to direct combat", action: "direct_combat" }, { text: "Set a trap and wait patiently", action: "set_trap" }] }, 5: { title: "Hunter Exam - Phase 5: Final Tournament", text: "The final phase! A tournament bracket has been set. You face a dangerous opponent who seems to have killed before. The fight can end in victory, defeat, or death. What's your strategy?", choices: [{ text: "Fight with full power from the start", action: "full_power" }, { text: "Analyze opponent's fighting style first", action: "analyze_first" }, { text: "Try to win through tactics and cunning", action: "tactical_approach" }] } }; // Training Activities var trainingActivities = { meditation: { name: "Meditation", description: "Focus your mind and expand your aura capacity", cost: 10, // energy cost benefits: { aura: 2, intelligence: 1 }, experience: 15 }, pushups: { name: "Push-ups", description: "Build physical strength through intense training", cost: 15, benefits: { strength: 2, health: 5 }, experience: 20 }, running: { name: "Running", description: "Improve speed and endurance", cost: 12, benefits: { speed: 2, health: 3 }, experience: 18 } }; // Hatsu Creation System var hatsuTemplates = { enhancer: [{ name: "Titan Fist", description: "Enhance punching power by 300%", auraReq: 20, conditions: "Must maintain eye contact with target" }, { name: "Iron Skin", description: "Harden skin to deflect attacks", auraReq: 15, conditions: "Cannot move while active" }, { name: "Healing Touch", description: "Accelerate healing of wounds", auraReq: 25, conditions: "Must touch wound for 30 seconds" }], emitter: [{ name: "Spirit Gun", description: "Fire concentrated aura bullets", auraReq: 18, conditions: "Must point finger like a gun" }, { name: "Teleport Beacon", description: "Mark location for instant teleportation", auraReq: 30, conditions: "Can only have one beacon active" }, { name: "Aura Shield", description: "Project defensive barrier at distance", auraReq: 22, conditions: "Shield weakens with distance" }], manipulator: [{ name: "Puppet Master", description: "Control defeated opponents", auraReq: 35, conditions: "Target must be unconscious first" }, { name: "Object Dance", description: "Animate and control inanimate objects", auraReq: 20, conditions: "Must physically touch object first" }, { name: "Memory Thief", description: "Extract and view target's memories", auraReq: 40, conditions: "Must maintain physical contact for 1 minute" }], transmuter: [{ name: "Lightning Palm", description: "Transform aura into electricity", auraReq: 25, conditions: "Damage self if used more than 3 times per day" }, { name: "Rubber Body", description: "Make body elastic and bouncy", auraReq: 20, conditions: "Vulnerable to sharp objects while active" }, { name: "Poison Touch", description: "Transmute aura into various toxins", auraReq: 30, conditions: "Must know chemical composition of poison" }], conjurer: [{ name: "Weapon Vault", description: "Conjure any weapon you've mastered", auraReq: 28, conditions: "Must have trained with weapon for 100 hours" }, { name: "Fortress Creation", description: "Conjure defensive structures", auraReq: 45, conditions: "Cannot move while maintaining structure" }, { name: "Binding Chains", description: "Create unbreakable restraints", auraReq: 35, conditions: "Chains disappear if you lose consciousness" }], specialist: [{ name: "Fate Reading", description: "See possible futures of target", auraReq: 50, conditions: "Can only be used once per person" }, { name: "Power Copy", description: "Temporarily copy opponent's ability", auraReq: 60, conditions: "Must witness ability being used 3 times" }, { name: "Soul Bond", description: "Share damage and healing with ally", auraReq: 40, conditions: "Bond lasts until one partner dies" }] }; // Nen Vows System var nenVows = [{ name: "Combat Restriction", description: "Never use Hatsu to kill", powerBoost: 1.5, type: "moral" }, { name: "Time Limit", description: "Ability only works for 10 minutes per day", powerBoost: 2.0, type: "temporal" }, { name: "Location Binding", description: "Ability only works in specific location", powerBoost: 2.5, type: "spatial" }, { name: "Emotional Trigger", description: "Only works when extremely angry", powerBoost: 1.8, type: "emotional" }, { name: "Risk of Death", description: "Ability will kill you if overused", powerBoost: 3.0, type: "sacrificial" }, { name: "Shared Burden", description: "Allies also take damage when you do", powerBoost: 2.2, type: "collective" }]; // Skill Tree var skillTree = { enhancer: { name: "Enhancement Skills", skills: [{ name: "Iron Body", cost: 50, unlocked: false, description: "Increase defense by 20%" }, { name: "Power Boost", cost: 100, unlocked: false, description: "Increase strength by 50%" }, { name: "Regeneration", cost: 150, unlocked: false, description: "Slowly recover health over time" }] }, emitter: { name: "Emission Skills", skills: [{ name: "Aura Blast", cost: 60, unlocked: false, description: "Ranged aura attack" }, { name: "Remote Control", cost: 120, unlocked: false, description: "Control objects from distance" }, { name: "Aura Sphere", cost: 180, unlocked: false, description: "Create protective aura barriers" }] }, manipulator: { name: "Manipulation Skills", skills: [{ name: "Object Control", cost: 70, unlocked: false, description: "Manipulate nearby objects" }, { name: "Mind Influence", cost: 140, unlocked: false, description: "Influence enemy actions" }, { name: "Mass Control", cost: 200, unlocked: false, description: "Control multiple targets" }] }, transmuter: { name: "Transmutation Skills", skills: [{ name: "Rubber Aura", cost: 55, unlocked: false, description: "Make aura elastic and bouncy" }, { name: "Electric Aura", cost: 110, unlocked: false, description: "Transmute aura into electricity" }, { name: "Shape Shift", cost: 165, unlocked: false, description: "Change aura into various forms" }] }, conjurer: { name: "Conjuration Skills", skills: [{ name: "Weapon Summon", cost: 80, unlocked: false, description: "Conjure basic weapons" }, { name: "Tool Creation", cost: 160, unlocked: false, description: "Create useful tools" }, { name: "Complex Objects", cost: 240, unlocked: false, description: "Conjure complex mechanisms" }] }, specialist: { name: "Specialist Skills", skills: [{ name: "Unique Ability", cost: 100, unlocked: false, description: "Discover your unique power" }, { name: "Power Amplify", cost: 200, unlocked: false, description: "Amplify all abilities" }, { name: "Reality Bend", cost: 300, unlocked: false, description: "Bend rules of reality" }] } }; // UI Elements var storyPanel; var buttons = []; var statsUI = []; var titleText; var playerInfoText; var levelText; var statNumbersText = []; // Initialize UI function initializeUI() { // Title titleText = new Text2("Hunter X Hunter: Nen Mastery Challenge", { size: 56, fill: 0xFFFF00 }); titleText.anchor.set(0.5, 0.5); titleText.x = 1024; titleText.y = 150; game.addChild(titleText); // Story Panel - moved to center-right storyPanel = new StoryPanel(); storyPanel.x = 1200; storyPanel.y = 700; game.addChild(storyPanel); // Left side stats panel background var statsPanelBg = LK.getAsset('backgroundPanel', { anchorX: 0, anchorY: 0, scaleX: 0.4, scaleY: 1.2, tint: 0x1a1a1a }); statsPanelBg.x = 50; statsPanelBg.y = 300; game.addChild(statsPanelBg); // Level display levelText = new Text2("Level: " + player.level, { size: 42, fill: 0xFFFF00 }); levelText.anchor.set(0, 0.5); levelText.x = 80; levelText.y = 350; game.addChild(levelText); // Player info under level playerInfoText = new Text2("Nen Type: " + (player.nenType || "None") + "\nSP: " + player.skillPoints, { size: 32, fill: 0xFFFFFF }); playerInfoText.anchor.set(0, 0.5); playerInfoText.x = 80; playerInfoText.y = 420; game.addChild(playerInfoText); // Stats as numbers var statsLabels = ["Strength", "Speed", "Intelligence", "Aura"]; var statsValues = [player.stats.strength, player.stats.speed, player.stats.intelligence, player.stats.aura]; for (var i = 0; i < statsLabels.length; i++) { var statText = new Text2(statsLabels[i] + ": " + statsValues[i], { size: 28, fill: 0xAAFFAA }); statText.anchor.set(0, 0.5); statText.x = 80; statText.y = 520 + i * 40; statNumbersText.push(statText); game.addChild(statText); } // Status bars (Health, Aura, Energy, Experience) - compact version var statusY = 720; statsUI.push(new StatBar("Health", player.maxHealth, player.health, 0xff0000)); statsUI.push(new StatBar("Aura", player.maxAura, player.aura, 0x0066ff)); statsUI.push(new StatBar("Energy", player.maxEnergy, player.energy, 0x00ff00)); statsUI.push(new StatBar("Experience", player.maxExperience, player.experience, 0xffff00)); for (var i = 0; i < statsUI.length; i++) { statsUI[i].x = 80; statsUI[i].y = statusY + i * 50; statsUI[i].scaleX = 0.8; // Make bars more compact statsUI[i].scaleY = 0.8; game.addChild(statsUI[i]); } } // Character Creation function startCharacterCreation() { storyPanel.setText("Welcome, aspiring Hunter! First, you must discover your Nen type. Choose your path:"); clearButtons(); var nenTypeKeys = Object.keys(nenTypes); for (var i = 0; i < nenTypeKeys.length; i++) { var nenType = nenTypeKeys[i]; var button = new MenuButton(nenType, createNenTypeCallback(nenType)); button.x = 400 + i % 3 * 450; button.y = 1200 + Math.floor(i / 3) * 100; buttons.push(button); game.addChild(button); } } function createNenTypeCallback(nenType) { return function () { selectNenType(nenType); }; } function selectNenType(nenType) { player.nenType = nenType; var typeData = nenTypes[nenType]; // Apply bonuses if (typeData.bonuses.strength) player.stats.strength += typeData.bonuses.strength; if (typeData.bonuses.speed) player.stats.speed += typeData.bonuses.speed; if (typeData.bonuses.intelligence) player.stats.intelligence += typeData.bonuses.intelligence; if (typeData.bonuses.aura) player.stats.aura += typeData.bonuses.aura; if (typeData.bonuses.health) { player.maxHealth += typeData.bonuses.health; player.health = player.maxHealth; } storyPanel.setText("Excellent! You are a " + nenType + ". " + typeData.description); clearButtons(); var continueButton = new MenuButton("Start Training", function () { gameState = "training"; startTrainingMode(); }); continueButton.x = 1024; continueButton.y = 1400; buttons.push(continueButton); game.addChild(continueButton); updateStatsUI(); } // Story System function startStoryChapter(chapterNum) { var chapter = storyChapters[chapterNum]; if (!chapter) return; player.currentChapter = chapterNum; storyPanel.setText(chapter.title + "\n\n" + chapter.text); clearButtons(); for (var i = 0; i < chapter.choices.length; i++) { var choice = chapter.choices[i]; var button = new MenuButton(choice.text, createChoiceCallback(choice.action)); button.x = 1024; button.y = 1400 + i * 100; buttons.push(button); game.addChild(button); } } function createChoiceCallback(action) { return function () { handleChoice(action); }; } function handleChoice(action) { var result = ""; var expGain = 0; switch (action) { // Phase 1: The Long Run case "steady_pace": result = "You maintain a steady pace, conserving energy while staying with the main group. Your endurance improves and you avoid the dangerous creatures in the fog."; player.stats.speed += 2; player.maxHealth += 10; expGain = 30; break; case "sprint_ahead": result = "You sprint ahead but exhaust yourself. However, you gain valuable experience in speed and spot shortcuts for future reference."; player.stats.speed += 3; player.health -= 15; expGain = 25; break; case "help_others": result = "You help struggling candidates, earning their respect. Your leadership skills and intelligence grow, though you use more energy."; player.stats.intelligence += 2; player.health -= 10; expGain = 35; break; // Phase 2: Gourmet Hunters case "hunt_strategically": result = "You successfully hunt the Great Stamp pig using clever tactics. Your strategic thinking and strength improve significantly."; player.stats.strength += 3; player.stats.intelligence += 2; expGain = 40; break; case "cook_multiple": result = "You attempt multiple dishes but burn several. You learn from your mistakes and improve your multitasking abilities."; player.stats.intelligence += 1; player.stats.speed += 2; expGain = 25; break; case "observe_learn": result = "You carefully observe successful candidates and learn their techniques. Your analytical skills improve greatly."; player.stats.intelligence += 4; expGain = 45; break; // Phase 3: Trick Tower case "strength_door": result = "You choose the strength path and face physical challenges. Your raw power increases but you take some damage from the trials."; player.stats.strength += 4; player.health -= 20; expGain = 35; break; case "wisdom_door": result = "You solve complex puzzles and riddles. Your intelligence grows significantly as you overcome mental challenges."; player.stats.intelligence += 5; expGain = 50; break; case "agility_door": result = "You navigate through speed-based obstacles and traps. Your agility and reflexes improve dramatically."; player.stats.speed += 4; expGain = 40; break; // Phase 4: Zevil Island case "stealth_ambush": result = "You successfully ambush your target using stealth tactics. Your speed and intelligence improve from the successful strategy."; player.stats.speed += 3; player.stats.intelligence += 2; expGain = 45; break; case "direct_combat": result = "You engage in direct combat with your target. A fierce battle ensues, improving your strength but leaving you injured."; player.stats.strength += 4; player.health -= 25; expGain = 40; break; case "set_trap": result = "You patiently set a trap and wait. Your strategic thinking pays off as you capture your target with minimal effort."; player.stats.intelligence += 3; player.stats.aura += 2; expGain = 50; break; // Phase 5: Final Tournament case "full_power": result = "You unleash your full power from the start! Your overwhelming strength secures victory, and you pass the Hunter Exam!"; player.stats.strength += 5; player.stats.aura += 3; expGain = 60; break; case "analyze_first": result = "You carefully analyze your opponent's fighting style before striking. Your tactical approach leads to a decisive victory!"; player.stats.intelligence += 4; player.stats.speed += 3; expGain = 65; break; case "tactical_approach": result = "You use cunning tactics to outmaneuver your opponent. Your strategic mind proves superior, earning you the Hunter License!"; player.stats.intelligence += 5; player.stats.aura += 4; expGain = 70; break; } // Apply experience player.experience += expGain; if (player.experience >= player.maxExperience) { levelUp(); } storyPanel.setText(result); clearButtons(); var continueButton = new MenuButton("Continue", function () { var nextChapter = player.currentChapter + 1; if (nextChapter <= 5) { startStoryChapter(nextChapter); } else { showGameComplete(); } }); continueButton.x = 1024; continueButton.y = 1400; buttons.push(continueButton); game.addChild(continueButton); updateStatsUI(); } function levelUp() { if (player.level >= 50) { return; // Maximum level reached } player.level++; player.skillPoints += 2; // Give 2 SP per level player.experience = 0; player.maxExperience += 50; player.maxHealth += 20; player.health = player.maxHealth; player.maxAura += 10; player.aura = player.maxAura; LK.getSound('levelUp').play(); LK.effects.flashScreen(0xffff00, 500); } function showGameComplete() { player.hunterExamCompleted = true; storyPanel.setText("🎉 CONGRATULATIONS! 🎉\n\nYou have successfully passed the Hunter Exam and earned your Hunter License!\n\nYou survived all 5 phases:\n✓ The Long Run through Milsy Wetlands\n✓ Gourmet Hunters Challenge\n✓ Trick Tower Navigation\n✓ Zevil Island Badge Hunt\n✓ Final Tournament Victory\n\nYou can now access advanced Nen techniques through the Skill Tree and continue your journey as a licensed Hunter!\n\nFinal Stats:\nLevel: " + player.level + "\nNen Type: " + player.nenType + "\nStrength: " + player.stats.strength + "\nSpeed: " + player.stats.speed + "\nIntelligence: " + player.stats.intelligence + "\nAura: " + player.stats.aura); clearButtons(); var continueButton = new MenuButton("Continue as Licensed Hunter", function () { gameState = "training"; startTrainingMode(); }); continueButton.x = 1024; continueButton.y = 1400; buttons.push(continueButton); game.addChild(continueButton); LK.setScore(player.level * 100 + player.stats.strength + player.stats.speed + player.stats.intelligence + player.stats.aura); } function startTrainingMode() { storyPanel.setText("Welcome to the training grounds! Train your abilities before attempting the Hunter Exam.\n\nTraining will cost energy but will make you stronger. Rest to recover energy."); clearButtons(); // Training buttons var activities = Object.keys(trainingActivities); for (var i = 0; i < activities.length; i++) { var activity = activities[i]; var activityData = trainingActivities[activity]; var button = new TrainingButton(activity, activityData); button.x = 400 + i * 450; button.y = 1300; buttons.push(button); game.addChild(button); } // Rest button var restButton = new MenuButton("Rest (+50 Energy)", function () { player.energy = Math.min(player.maxEnergy, player.energy + 50); updateStatsUI(); }); restButton.x = 400; restButton.y = 1450; buttons.push(restButton); game.addChild(restButton); // Skill Tree button (only available after Hunter Exam) if (player.hunterExamCompleted) { var skillTreeButton = new MenuButton("Skill Tree", function () { showSkillTree(); }); skillTreeButton.x = 850; skillTreeButton.y = 1450; buttons.push(skillTreeButton); game.addChild(skillTreeButton); // Hatsu Creation button var hatsuButton = new MenuButton("Create Hatsu", function () { showHatsuCreation(); }); hatsuButton.x = 1300; hatsuButton.y = 1450; buttons.push(hatsuButton); game.addChild(hatsuButton); } else { var skillTreeButton = new MenuButton("Skill Tree (Locked)", function () { // Do nothing - button is disabled }); skillTreeButton.x = 850; skillTreeButton.y = 1450; skillTreeButton.alpha = 0.5; // Make it look disabled buttons.push(skillTreeButton); game.addChild(skillTreeButton); var hatsuButton = new MenuButton("Create Hatsu (Locked)", function () { // Do nothing - button is disabled }); hatsuButton.x = 1300; hatsuButton.y = 1450; hatsuButton.alpha = 0.5; buttons.push(hatsuButton); game.addChild(hatsuButton); } // Hunter Exam button (available after some training) if (player.trainingCount >= 5) { var examButton = new MenuButton("Take Hunter Exam", function () { gameState = "story"; startStoryChapter(1); }); examButton.x = 1300; examButton.y = 1450; buttons.push(examButton); game.addChild(examButton); } } function performTraining(activity) { var activityData = trainingActivities[activity]; // Deduct energy player.energy -= activityData.cost; // Apply benefits if (activityData.benefits.strength) player.stats.strength += activityData.benefits.strength; if (activityData.benefits.speed) player.stats.speed += activityData.benefits.speed; if (activityData.benefits.intelligence) player.stats.intelligence += activityData.benefits.intelligence; if (activityData.benefits.aura) player.stats.aura += activityData.benefits.aura; if (activityData.benefits.health) { player.maxHealth += activityData.benefits.health; player.health = player.maxHealth; } // Add experience and skill points player.experience += activityData.experience; player.skillPoints += Math.floor(activityData.experience / 10); player.trainingCount++; // Check for level up if (player.experience >= player.maxExperience) { levelUp(); } // Update UI updateStatsUI(); // Flash effect LK.effects.flashScreen(0x00ff00, 300); // Refresh training mode to update buttons startTrainingMode(); } function showSkillTree() { var nenTypeKey = player.nenType.toLowerCase(); var skillCategory = skillTree[nenTypeKey]; if (!skillCategory) return; storyPanel.setText("Skill Tree: " + skillCategory.name + "\n\nSpend skill points to unlock new abilities. Each skill will enhance your combat effectiveness."); clearButtons(); // Skill buttons for (var i = 0; i < skillCategory.skills.length; i++) { var skill = skillCategory.skills[i]; var skillButton = new SkillButton(skill, skill); skillButton.x = 700 + i % 2 * 450; skillButton.y = 1200 + Math.floor(i / 2) * 120; buttons.push(skillButton); game.addChild(skillButton); } // Back button var backButton = new MenuButton("Back to Training", function () { startTrainingMode(); }); backButton.x = 1024; backButton.y = 1600; buttons.push(backButton); game.addChild(backButton); } function showHatsuCreation() { var nenTypeKey = player.nenType.toLowerCase(); var templates = hatsuTemplates[nenTypeKey]; if (!templates) return; if (player.hatsu) { storyPanel.setText("Your Current Hatsu: " + player.hatsu.name + "\n\n" + player.hatsu.description + "\nAura Required: " + player.hatsu.auraReq + "\nCondition: " + player.hatsu.conditions + "\nMastery Level: " + player.hatsuMastery + "/100" + (player.nenVow ? "\n\nNen Vow: " + player.nenVow.name + " - " + player.nenVow.description : "")); } else { storyPanel.setText("Hatsu Creation - " + player.nenType + " Type\n\nChoose a Hatsu template to develop your unique ability. Each Hatsu requires specific aura amounts and has conditions for use."); } clearButtons(); if (!player.hatsu) { // Show Hatsu templates for (var i = 0; i < templates.length; i++) { var template = templates[i]; var hatsuButton = new MenuButton(template.name, createHatsuCallback(template)); hatsuButton.x = 700 + i % 2 * 450; hatsuButton.y = 1200 + Math.floor(i / 2) * 120; buttons.push(hatsuButton); game.addChild(hatsuButton); } } else { // Show Nen Vow options if no vow exists if (!player.nenVow && player.hatsuMastery >= 50) { var vowButton = new MenuButton("Add Nen Vow", function () { showNenVows(); }); vowButton.x = 700; vowButton.y = 1200; buttons.push(vowButton); game.addChild(vowButton); } // Train Hatsu button var trainButton = new MenuButton("Train Hatsu (20 Energy)", function () { if (player.energy >= 20) { player.energy -= 20; player.hatsuMastery = Math.min(100, player.hatsuMastery + 10); updateStatsUI(); LK.effects.flashScreen(0x0066ff, 300); showHatsuCreation(); } }); trainButton.x = 1100; trainButton.y = 1200; buttons.push(trainButton); game.addChild(trainButton); } // Back button var backButton = new MenuButton("Back to Training", function () { startTrainingMode(); }); backButton.x = 1024; backButton.y = 1600; buttons.push(backButton); game.addChild(backButton); } function createHatsuCallback(template) { return function () { selectHatsu(template); }; } function selectHatsu(template) { player.hatsu = template; player.hatsuMastery = 10; storyPanel.setText("Congratulations! You have created your Hatsu: " + template.name + "\n\n" + template.description + "\n\nYour unique ability is now part of you. Train to increase mastery and unlock its full potential!"); updateStatsUI(); LK.effects.flashScreen(0x00ffff, 1000); } function showNenVows() { storyPanel.setText("Nen Vows\n\nBy imposing restrictions on yourself, you can greatly increase your Hatsu's power. Choose carefully - vows are permanent!"); clearButtons(); for (var i = 0; i < Math.min(3, nenVows.length); i++) { var vow = nenVows[i]; var vowButton = new MenuButton(vow.name + " (+" + Math.floor((vow.powerBoost - 1) * 100) + "% power)", createVowCallback(vow)); vowButton.x = 700 + i % 2 * 450; vowButton.y = 1200 + Math.floor(i / 2) * 120; buttons.push(vowButton); game.addChild(vowButton); } var backButton = new MenuButton("Back to Hatsu", function () { showHatsuCreation(); }); backButton.x = 1024; backButton.y = 1500; buttons.push(backButton); game.addChild(backButton); } function createVowCallback(vow) { return function () { selectNenVow(vow); }; } function selectNenVow(vow) { player.nenVow = vow; storyPanel.setText("You have made a Nen Vow: " + vow.name + "\n\n" + vow.description + "\n\nYour Hatsu power has increased by " + Math.floor((vow.powerBoost - 1) * 100) + "%! Remember, this restriction is now permanent."); LK.effects.flashScreen(0xff0000, 1000); updateStatsUI(); } function unlockSkill(skill, skillData) { player.skillPoints -= skillData.cost; skillData.unlocked = true; player.abilities.push(skill.name); // Apply skill effects if (skill.name === "Iron Body") player.maxHealth += 50; if (skill.name === "Power Boost") player.stats.strength += 20; if (skill.name === "Aura Blast") player.maxAura += 30; updateStatsUI(); showSkillTree(); // Refresh skill tree } function resetGame() { player = { name: "Hunter", nenType: "", level: 1, experience: 0, maxExperience: 100, health: 100, maxHealth: 100, aura: 50, maxAura: 50, stats: { strength: 10, speed: 10, intelligence: 10, aura: 10 }, abilities: [], currentChapter: 1, energy: 100, maxEnergy: 100, skillPoints: 0, trainingCount: 0, hunterExamCompleted: false, hatsu: null, nenVow: null, hatsuMastery: 0 }; gameState = "characterCreation"; updateStatsUI(); startCharacterCreation(); } function clearButtons() { for (var i = 0; i < buttons.length; i++) { buttons[i].destroy(); } buttons = []; } function updateStatsUI() { if (statsUI.length > 0) { statsUI[0].updateValue(player.health); statsUI[1].updateValue(player.aura); statsUI[2].updateValue(player.energy); statsUI[3].updateValue(player.experience); } // Update level text if (levelText) { levelText.setText("Level: " + player.level); } // Update player info text if (playerInfoText) { playerInfoText.setText("Nen Type: " + (player.nenType || "None") + "\nSP: " + player.skillPoints); } // Update stat numbers var statsValues = [player.stats.strength, player.stats.speed, player.stats.intelligence, player.stats.aura]; for (var i = 0; i < statNumbersText.length && i < statsValues.length; i++) { var statsLabels = ["Strength", "Speed", "Intelligence", "Aura"]; statNumbersText[i].setText(statsLabels[i] + ": " + statsValues[i]); } } // Initialize game initializeUI(); startCharacterCreation(); game.update = function () { // Game loop logic if needed };
===================================================================
--- original.js
+++ change.js
@@ -188,9 +188,12 @@
energy: 100,
maxEnergy: 100,
skillPoints: 0,
trainingCount: 0,
- hunterExamCompleted: false
+ hunterExamCompleted: false,
+ hatsu: null,
+ nenVow: null,
+ hatsuMastery: 0
};
// Nen Types Data
var nenTypes = {
"Enhancer": {
@@ -341,8 +344,139 @@
},
experience: 18
}
};
+// Hatsu Creation System
+var hatsuTemplates = {
+ enhancer: [{
+ name: "Titan Fist",
+ description: "Enhance punching power by 300%",
+ auraReq: 20,
+ conditions: "Must maintain eye contact with target"
+ }, {
+ name: "Iron Skin",
+ description: "Harden skin to deflect attacks",
+ auraReq: 15,
+ conditions: "Cannot move while active"
+ }, {
+ name: "Healing Touch",
+ description: "Accelerate healing of wounds",
+ auraReq: 25,
+ conditions: "Must touch wound for 30 seconds"
+ }],
+ emitter: [{
+ name: "Spirit Gun",
+ description: "Fire concentrated aura bullets",
+ auraReq: 18,
+ conditions: "Must point finger like a gun"
+ }, {
+ name: "Teleport Beacon",
+ description: "Mark location for instant teleportation",
+ auraReq: 30,
+ conditions: "Can only have one beacon active"
+ }, {
+ name: "Aura Shield",
+ description: "Project defensive barrier at distance",
+ auraReq: 22,
+ conditions: "Shield weakens with distance"
+ }],
+ manipulator: [{
+ name: "Puppet Master",
+ description: "Control defeated opponents",
+ auraReq: 35,
+ conditions: "Target must be unconscious first"
+ }, {
+ name: "Object Dance",
+ description: "Animate and control inanimate objects",
+ auraReq: 20,
+ conditions: "Must physically touch object first"
+ }, {
+ name: "Memory Thief",
+ description: "Extract and view target's memories",
+ auraReq: 40,
+ conditions: "Must maintain physical contact for 1 minute"
+ }],
+ transmuter: [{
+ name: "Lightning Palm",
+ description: "Transform aura into electricity",
+ auraReq: 25,
+ conditions: "Damage self if used more than 3 times per day"
+ }, {
+ name: "Rubber Body",
+ description: "Make body elastic and bouncy",
+ auraReq: 20,
+ conditions: "Vulnerable to sharp objects while active"
+ }, {
+ name: "Poison Touch",
+ description: "Transmute aura into various toxins",
+ auraReq: 30,
+ conditions: "Must know chemical composition of poison"
+ }],
+ conjurer: [{
+ name: "Weapon Vault",
+ description: "Conjure any weapon you've mastered",
+ auraReq: 28,
+ conditions: "Must have trained with weapon for 100 hours"
+ }, {
+ name: "Fortress Creation",
+ description: "Conjure defensive structures",
+ auraReq: 45,
+ conditions: "Cannot move while maintaining structure"
+ }, {
+ name: "Binding Chains",
+ description: "Create unbreakable restraints",
+ auraReq: 35,
+ conditions: "Chains disappear if you lose consciousness"
+ }],
+ specialist: [{
+ name: "Fate Reading",
+ description: "See possible futures of target",
+ auraReq: 50,
+ conditions: "Can only be used once per person"
+ }, {
+ name: "Power Copy",
+ description: "Temporarily copy opponent's ability",
+ auraReq: 60,
+ conditions: "Must witness ability being used 3 times"
+ }, {
+ name: "Soul Bond",
+ description: "Share damage and healing with ally",
+ auraReq: 40,
+ conditions: "Bond lasts until one partner dies"
+ }]
+};
+// Nen Vows System
+var nenVows = [{
+ name: "Combat Restriction",
+ description: "Never use Hatsu to kill",
+ powerBoost: 1.5,
+ type: "moral"
+}, {
+ name: "Time Limit",
+ description: "Ability only works for 10 minutes per day",
+ powerBoost: 2.0,
+ type: "temporal"
+}, {
+ name: "Location Binding",
+ description: "Ability only works in specific location",
+ powerBoost: 2.5,
+ type: "spatial"
+}, {
+ name: "Emotional Trigger",
+ description: "Only works when extremely angry",
+ powerBoost: 1.8,
+ type: "emotional"
+}, {
+ name: "Risk of Death",
+ description: "Ability will kill you if overused",
+ powerBoost: 3.0,
+ type: "sacrificial"
+}, {
+ name: "Shared Burden",
+ description: "Allies also take damage when you do",
+ powerBoost: 2.2,
+ type: "collective"
+}];
// Skill Tree
var skillTree = {
enhancer: {
name: "Enhancement Skills",
@@ -463,8 +597,11 @@
var storyPanel;
var buttons = [];
var statsUI = [];
var titleText;
+var playerInfoText;
+var levelText;
+var statNumbersText = [];
// Initialize UI
function initializeUI() {
// Title
titleText = new Text2("Hunter X Hunter: Nen Mastery Challenge", {
@@ -472,35 +609,71 @@
fill: 0xFFFF00
});
titleText.anchor.set(0.5, 0.5);
titleText.x = 1024;
- titleText.y = 200;
+ titleText.y = 150;
game.addChild(titleText);
- // Story Panel
+ // Story Panel - moved to center-right
storyPanel = new StoryPanel();
- storyPanel.x = 1024;
- storyPanel.y = 800;
+ storyPanel.x = 1200;
+ storyPanel.y = 700;
game.addChild(storyPanel);
- // Stats UI
- var statsY = 1400;
+ // Left side stats panel background
+ var statsPanelBg = LK.getAsset('backgroundPanel', {
+ anchorX: 0,
+ anchorY: 0,
+ scaleX: 0.4,
+ scaleY: 1.2,
+ tint: 0x1a1a1a
+ });
+ statsPanelBg.x = 50;
+ statsPanelBg.y = 300;
+ game.addChild(statsPanelBg);
+ // Level display
+ levelText = new Text2("Level: " + player.level, {
+ size: 42,
+ fill: 0xFFFF00
+ });
+ levelText.anchor.set(0, 0.5);
+ levelText.x = 80;
+ levelText.y = 350;
+ game.addChild(levelText);
+ // Player info under level
+ playerInfoText = new Text2("Nen Type: " + (player.nenType || "None") + "\nSP: " + player.skillPoints, {
+ size: 32,
+ fill: 0xFFFFFF
+ });
+ playerInfoText.anchor.set(0, 0.5);
+ playerInfoText.x = 80;
+ playerInfoText.y = 420;
+ game.addChild(playerInfoText);
+ // Stats as numbers
+ var statsLabels = ["Strength", "Speed", "Intelligence", "Aura"];
+ var statsValues = [player.stats.strength, player.stats.speed, player.stats.intelligence, player.stats.aura];
+ for (var i = 0; i < statsLabels.length; i++) {
+ var statText = new Text2(statsLabels[i] + ": " + statsValues[i], {
+ size: 28,
+ fill: 0xAAFFAA
+ });
+ statText.anchor.set(0, 0.5);
+ statText.x = 80;
+ statText.y = 520 + i * 40;
+ statNumbersText.push(statText);
+ game.addChild(statText);
+ }
+ // Status bars (Health, Aura, Energy, Experience) - compact version
+ var statusY = 720;
statsUI.push(new StatBar("Health", player.maxHealth, player.health, 0xff0000));
statsUI.push(new StatBar("Aura", player.maxAura, player.aura, 0x0066ff));
statsUI.push(new StatBar("Energy", player.maxEnergy, player.energy, 0x00ff00));
statsUI.push(new StatBar("Experience", player.maxExperience, player.experience, 0xffff00));
for (var i = 0; i < statsUI.length; i++) {
- statsUI[i].x = 200;
- statsUI[i].y = statsY + i * 60;
+ statsUI[i].x = 80;
+ statsUI[i].y = statusY + i * 50;
+ statsUI[i].scaleX = 0.8; // Make bars more compact
+ statsUI[i].scaleY = 0.8;
game.addChild(statsUI[i]);
}
- // Player info
- var playerInfoText = new Text2("Level: " + player.level + " | " + player.nenType + " | SP: " + player.skillPoints, {
- size: 38,
- fill: 0xFFFFFF
- });
- playerInfoText.anchor.set(0, 0.5);
- playerInfoText.x = 200;
- playerInfoText.y = 1700;
- game.addChild(playerInfoText);
}
// Character Creation
function startCharacterCreation() {
storyPanel.setText("Welcome, aspiring Hunter! First, you must discover your Nen type. Choose your path:");
@@ -743,8 +916,16 @@
skillTreeButton.x = 850;
skillTreeButton.y = 1450;
buttons.push(skillTreeButton);
game.addChild(skillTreeButton);
+ // Hatsu Creation button
+ var hatsuButton = new MenuButton("Create Hatsu", function () {
+ showHatsuCreation();
+ });
+ hatsuButton.x = 1300;
+ hatsuButton.y = 1450;
+ buttons.push(hatsuButton);
+ game.addChild(hatsuButton);
} else {
var skillTreeButton = new MenuButton("Skill Tree (Locked)", function () {
// Do nothing - button is disabled
});
@@ -752,8 +933,16 @@
skillTreeButton.y = 1450;
skillTreeButton.alpha = 0.5; // Make it look disabled
buttons.push(skillTreeButton);
game.addChild(skillTreeButton);
+ var hatsuButton = new MenuButton("Create Hatsu (Locked)", function () {
+ // Do nothing - button is disabled
+ });
+ hatsuButton.x = 1300;
+ hatsuButton.y = 1450;
+ hatsuButton.alpha = 0.5;
+ buttons.push(hatsuButton);
+ game.addChild(hatsuButton);
}
// Hunter Exam button (available after some training)
if (player.trainingCount >= 5) {
var examButton = new MenuButton("Take Hunter Exam", function () {
@@ -803,22 +992,119 @@
// Skill buttons
for (var i = 0; i < skillCategory.skills.length; i++) {
var skill = skillCategory.skills[i];
var skillButton = new SkillButton(skill, skill);
- skillButton.x = 400 + i * 450;
- skillButton.y = 1300;
+ skillButton.x = 700 + i % 2 * 450;
+ skillButton.y = 1200 + Math.floor(i / 2) * 120;
buttons.push(skillButton);
game.addChild(skillButton);
}
// Back button
var backButton = new MenuButton("Back to Training", function () {
startTrainingMode();
});
backButton.x = 1024;
- backButton.y = 1450;
+ backButton.y = 1600;
buttons.push(backButton);
game.addChild(backButton);
}
+function showHatsuCreation() {
+ var nenTypeKey = player.nenType.toLowerCase();
+ var templates = hatsuTemplates[nenTypeKey];
+ if (!templates) return;
+ if (player.hatsu) {
+ storyPanel.setText("Your Current Hatsu: " + player.hatsu.name + "\n\n" + player.hatsu.description + "\nAura Required: " + player.hatsu.auraReq + "\nCondition: " + player.hatsu.conditions + "\nMastery Level: " + player.hatsuMastery + "/100" + (player.nenVow ? "\n\nNen Vow: " + player.nenVow.name + " - " + player.nenVow.description : ""));
+ } else {
+ storyPanel.setText("Hatsu Creation - " + player.nenType + " Type\n\nChoose a Hatsu template to develop your unique ability. Each Hatsu requires specific aura amounts and has conditions for use.");
+ }
+ clearButtons();
+ if (!player.hatsu) {
+ // Show Hatsu templates
+ for (var i = 0; i < templates.length; i++) {
+ var template = templates[i];
+ var hatsuButton = new MenuButton(template.name, createHatsuCallback(template));
+ hatsuButton.x = 700 + i % 2 * 450;
+ hatsuButton.y = 1200 + Math.floor(i / 2) * 120;
+ buttons.push(hatsuButton);
+ game.addChild(hatsuButton);
+ }
+ } else {
+ // Show Nen Vow options if no vow exists
+ if (!player.nenVow && player.hatsuMastery >= 50) {
+ var vowButton = new MenuButton("Add Nen Vow", function () {
+ showNenVows();
+ });
+ vowButton.x = 700;
+ vowButton.y = 1200;
+ buttons.push(vowButton);
+ game.addChild(vowButton);
+ }
+ // Train Hatsu button
+ var trainButton = new MenuButton("Train Hatsu (20 Energy)", function () {
+ if (player.energy >= 20) {
+ player.energy -= 20;
+ player.hatsuMastery = Math.min(100, player.hatsuMastery + 10);
+ updateStatsUI();
+ LK.effects.flashScreen(0x0066ff, 300);
+ showHatsuCreation();
+ }
+ });
+ trainButton.x = 1100;
+ trainButton.y = 1200;
+ buttons.push(trainButton);
+ game.addChild(trainButton);
+ }
+ // Back button
+ var backButton = new MenuButton("Back to Training", function () {
+ startTrainingMode();
+ });
+ backButton.x = 1024;
+ backButton.y = 1600;
+ buttons.push(backButton);
+ game.addChild(backButton);
+}
+function createHatsuCallback(template) {
+ return function () {
+ selectHatsu(template);
+ };
+}
+function selectHatsu(template) {
+ player.hatsu = template;
+ player.hatsuMastery = 10;
+ storyPanel.setText("Congratulations! You have created your Hatsu: " + template.name + "\n\n" + template.description + "\n\nYour unique ability is now part of you. Train to increase mastery and unlock its full potential!");
+ updateStatsUI();
+ LK.effects.flashScreen(0x00ffff, 1000);
+}
+function showNenVows() {
+ storyPanel.setText("Nen Vows\n\nBy imposing restrictions on yourself, you can greatly increase your Hatsu's power. Choose carefully - vows are permanent!");
+ clearButtons();
+ for (var i = 0; i < Math.min(3, nenVows.length); i++) {
+ var vow = nenVows[i];
+ var vowButton = new MenuButton(vow.name + " (+" + Math.floor((vow.powerBoost - 1) * 100) + "% power)", createVowCallback(vow));
+ vowButton.x = 700 + i % 2 * 450;
+ vowButton.y = 1200 + Math.floor(i / 2) * 120;
+ buttons.push(vowButton);
+ game.addChild(vowButton);
+ }
+ var backButton = new MenuButton("Back to Hatsu", function () {
+ showHatsuCreation();
+ });
+ backButton.x = 1024;
+ backButton.y = 1500;
+ buttons.push(backButton);
+ game.addChild(backButton);
+}
+function createVowCallback(vow) {
+ return function () {
+ selectNenVow(vow);
+ };
+}
+function selectNenVow(vow) {
+ player.nenVow = vow;
+ storyPanel.setText("You have made a Nen Vow: " + vow.name + "\n\n" + vow.description + "\n\nYour Hatsu power has increased by " + Math.floor((vow.powerBoost - 1) * 100) + "%! Remember, this restriction is now permanent.");
+ LK.effects.flashScreen(0xff0000, 1000);
+ updateStatsUI();
+}
function unlockSkill(skill, skillData) {
player.skillPoints -= skillData.cost;
skillData.unlocked = true;
player.abilities.push(skill.name);
@@ -851,9 +1137,12 @@
energy: 100,
maxEnergy: 100,
skillPoints: 0,
trainingCount: 0,
- hunterExamCompleted: false
+ hunterExamCompleted: false,
+ hatsu: null,
+ nenVow: null,
+ hatsuMastery: 0
};
gameState = "characterCreation";
updateStatsUI();
startCharacterCreation();
@@ -870,15 +1159,22 @@
statsUI[1].updateValue(player.aura);
statsUI[2].updateValue(player.energy);
statsUI[3].updateValue(player.experience);
}
+ // Update level text
+ if (levelText) {
+ levelText.setText("Level: " + player.level);
+ }
// Update player info text
- var playerInfoText = game.children.find(function (child) {
- return child.setText && child.text && child.text.includes("Level:");
- });
if (playerInfoText) {
- playerInfoText.setText("Level: " + player.level + " | " + player.nenType + " | SP: " + player.skillPoints);
+ playerInfoText.setText("Nen Type: " + (player.nenType || "None") + "\nSP: " + player.skillPoints);
}
+ // Update stat numbers
+ var statsValues = [player.stats.strength, player.stats.speed, player.stats.intelligence, player.stats.aura];
+ for (var i = 0; i < statNumbersText.length && i < statsValues.length; i++) {
+ var statsLabels = ["Strength", "Speed", "Intelligence", "Aura"];
+ statNumbersText[i].setText(statsLabels[i] + ": " + statsValues[i]);
+ }
}
// Initialize game
initializeUI();
startCharacterCreation();