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 }; // 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 } }; // 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; // 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 = 200; game.addChild(titleText); // Story Panel storyPanel = new StoryPanel(); storyPanel.x = 1024; storyPanel.y = 800; game.addChild(storyPanel); // Stats UI var statsY = 1400; 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; 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:"); 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); } 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); } // 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 = 400 + i * 450; skillButton.y = 1300; buttons.push(skillButton); game.addChild(skillButton); } // Back button var backButton = new MenuButton("Back to Training", function () { startTrainingMode(); }); backButton.x = 1024; backButton.y = 1450; buttons.push(backButton); game.addChild(backButton); } 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 }; 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 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); } } // Initialize game initializeUI(); startCharacterCreation(); game.update = function () { // Game loop logic if needed };
===================================================================
--- original.js
+++ change.js
@@ -234,51 +234,79 @@
aura: 15
}
}
};
-// Story Chapters
+// Story Chapters - Hunter Exam Stages
var storyChapters = {
1: {
- title: "The Hunter Exam Begins",
- text: "You've arrived at the Hunter Exam site. The examiner explains that you must first discover your Nen type before proceeding. What will you do?",
+ 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: "Meditate and focus on your inner aura",
- action: "meditation"
+ text: "Stay close to the examiner and maintain steady pace",
+ action: "steady_pace"
}, {
- text: "Observe other candidates",
- action: "observe"
+ text: "Sprint ahead to secure a good position",
+ action: "sprint_ahead"
}, {
- text: "Ask the examiner for guidance",
- action: "guidance"
+ text: "Help other struggling candidates",
+ action: "help_others"
}]
},
2: {
- title: "First Training Session",
- text: "Now that you know your Nen type, it's time to begin training. Your instructor assigns you basic exercises.",
+ 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: "Focus on physical conditioning",
- action: "physical"
+ text: "Hunt the Great Stamp pig with strategy",
+ action: "hunt_strategically"
}, {
- text: "Practice aura control",
- action: "aura"
+ text: "Attempt to cook multiple dishes quickly",
+ action: "cook_multiple"
}, {
- text: "Study Nen theory",
- action: "theory"
+ text: "Observe successful candidates and learn",
+ action: "observe_learn"
}]
},
3: {
- title: "Your First Battle",
- text: "A wild beast appears during your training! You must use your newly learned abilities to defend yourself.",
+ 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: "Fight aggressively",
- action: "attack"
+ text: "Choose the door marked with strength symbol",
+ action: "strength_door"
}, {
- text: "Fight defensively",
- action: "defend"
+ text: "Choose the door marked with wisdom symbol",
+ action: "wisdom_door"
}, {
- text: "Try to escape",
- action: "escape"
+ 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 = {
@@ -463,9 +491,9 @@
statsUI[i].y = statsY + i * 60;
game.addChild(statsUI[i]);
}
// Player info
- var playerInfoText = new Text2("Level: " + player.level + " | Type: " + player.nenType + " | SP: " + player.skillPoints, {
+ var playerInfoText = new Text2("Level: " + player.level + " | " + player.nenType + " | SP: " + player.skillPoints, {
size: 38,
fill: 0xFFFFFF
});
playerInfoText.anchor.set(0, 0.5);
@@ -540,58 +568,100 @@
function handleChoice(action) {
var result = "";
var expGain = 0;
switch (action) {
- case "meditation":
- result = "Through meditation, you sense your inner aura more clearly. Your aura control improves.";
- player.stats.aura += 2;
- expGain = 20;
+ // 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 "observe":
- result = "By observing others, you learn different techniques. Your intelligence increases.";
+ 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;
- expGain = 15;
+ player.health -= 10;
+ expGain = 35;
break;
- case "guidance":
- result = "The examiner teaches you basic principles. Your understanding deepens.";
+ // 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.aura += 1;
+ player.stats.speed += 2;
expGain = 25;
break;
- case "physical":
- result = "Physical training strengthens your body. Your strength and speed increase.";
- player.stats.strength += 2;
- player.stats.speed += 1;
- expGain = 20;
+ 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;
- case "aura":
- result = "Aura control practice enhances your Nen abilities. Your aura capacity grows.";
- player.maxAura += 10;
- player.aura = player.maxAura;
- expGain = 25;
+ // 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 "theory":
- result = "Studying Nen theory broadens your knowledge. Your intelligence increases significantly.";
- player.stats.intelligence += 3;
- expGain = 30;
+ 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 "attack":
- result = "You fight bravely! Your combat experience grows, but you take some damage.";
- player.health -= 20;
- player.stats.strength += 2;
+ 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;
- case "defend":
- result = "Your defensive stance protects you while you learn the enemy's patterns.";
- player.health -= 5;
- player.stats.speed += 1;
- expGain = 30;
+ // 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 "escape":
- result = "You escape safely and learn to be more cautious. Your speed increases.";
- player.stats.speed += 2;
- expGain = 15;
+ 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) {
@@ -600,9 +670,9 @@
storyPanel.setText(result);
clearButtons();
var continueButton = new MenuButton("Continue", function () {
var nextChapter = player.currentChapter + 1;
- if (nextChapter <= 3) {
+ if (nextChapter <= 5) {
startStoryChapter(nextChapter);
} else {
showGameComplete();
}
@@ -617,8 +687,9 @@
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;
@@ -628,11 +699,11 @@
LK.effects.flashScreen(0xffff00, 500);
}
function showGameComplete() {
player.hunterExamCompleted = true;
- storyPanel.setText("Congratulations! You have completed the Hunter Exam!\n\nYou can now access advanced Nen techniques through the Skill Tree.\n\nFinal Stats:\nLevel: " + player.level + "\nType: " + player.nenType + "\nStrength: " + player.stats.strength + "\nSpeed: " + player.stats.speed + "\nIntelligence: " + player.stats.intelligence + "\nAura: " + player.stats.aura);
+ 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 Training", function () {
+ var continueButton = new MenuButton("Continue as Licensed Hunter", function () {
gameState = "training";
startTrainingMode();
});
continueButton.x = 1024;
@@ -804,9 +875,9 @@
var playerInfoText = game.children.find(function (child) {
return child.setText && child.text && child.text.includes("Level:");
});
if (playerInfoText) {
- playerInfoText.setText("Level: " + player.level + " | Type: " + player.nenType + " | SP: " + player.skillPoints);
+ playerInfoText.setText("Level: " + player.level + " | " + player.nenType + " | SP: " + player.skillPoints);
}
}
// Initialize game
initializeUI();