Code edit (6 edits merged)
Please save this source code
User prompt
experience pickups spawn in a random 100x100 block around the enemy when it dies
Code edit (1 edits merged)
Please save this source code
User prompt
Replace 'boonButton' with `selectedBoons[i]`, and subsequently change the boonButton.on function to use the this.id as the key
User prompt
Replace `selectedBoons[i] + ' Boon Button'` with `'Boon Button'`
User prompt
boonButtons should all use the same asset
User prompt
boonButton should all use the same asset, with id "Boon Button"
User prompt
Update `this[selectedBoons[i] + 'BoonLevel']` to `boonLevels[selectedBoons[i]]`
User prompt
Update boonlevel variables in popup
User prompt
convert boonlevel variables to a map of boon levels. Use the boom name (eg: "Luck") as the key, and the 0 as the default value
User prompt
Fix Bug: 'TypeError: window is undefined' in this line: 'var boonLevel = new Text2(selectedBoons[i] + ': ' + window[selectedBoons[i] + 'BoonLevel'], {' Line Number: 112
User prompt
Display the name of the boon and it's current level next to its button
User prompt
showBoonSelection should pause the game, and selecting a boon should resume the game
User prompt
When the level increases show a boon selection popup, with three boon choices represented as buttons. These boons are uniquely randomized from the list of available boons (Luck, Scale, Range, Damage, Rearm). Clicking one increases their relevant, previously defined level variable.
User prompt
When the level increases, pause the game and show a popup. Inside the popup are a choice between three boon represented as buttons. These boons are uniquely randomized from the list of available boons (Luck, Scale, Range, Damage, Rearm).
User prompt
Fix Bug: 'TypeError: LK.resumeGame is not a function' in this line: 'LK.resumeGame();' Line Number: 11
User prompt
Fix Bug: 'TypeError: LK.pauseGame is not a function' in this line: 'LK.pauseGame();' Line Number: 307
User prompt
When the level increases, pause the game and show a popup. Inside the popup are a choice between three boon represented as buttons. These boons are uniquely randomized from the list of available boons.
User prompt
Rename the boon variables to include "Level" at the end
User prompt
create variables to track the following level, starting from 0: LuckBoon, ScaleBoon, RangeBoon, DamageBoon, RearmBoon
User prompt
create level variables for the following boons, starting from 0: LuckBoon, ScaleBoon, RangeBoon, DamageBoon, RearmBoon
User prompt
swap Level and countdown placements
User prompt
do not display the score
User prompt
display the level as text under the countdown text
User prompt
instead of decreasing the countdown every tick, perform the update on an interval of 60
===================================================================
--- original.js
+++ change.js
@@ -125,8 +125,16 @@
font: 'bold monospace'
});
LK.gui.topCenter.addChild(countdownTxt);
countdownTxt.x = 0;
+ var levelTxt = new Text2('Level: ' + level, {
+ size: 120,
+ fill: '#ffffff',
+ font: 'bold monospace'
+ });
+ LK.gui.topCenter.addChild(levelTxt);
+ levelTxt.x = 0;
+ levelTxt.y = countdownTxt.height + 10;
LK.on('tick', function () {
if (!isPaused && LK.ticks % 60 === 0) {
countdown--;
var minutes = Math.floor(countdown / 60);
@@ -280,8 +288,9 @@
if (experience >= levelRequirement) {
level++;
experience -= levelRequirement;
levelRequirement = Math.floor(levelRequirement * 1.2);
+ levelTxt.setText('Level: ' + level);
}
i--;
}
}
pixel art cross with blue accents Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a white orb. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a white orb with a halo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a pulsating white heart with a halo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a dark goo projectile with red highlights. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art tall blue fireball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of an evil fantasy sword facing downward. Minor red details. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
backgroundAmbient
Sound effect
heroHealed
Sound effect
pickupExperience
Sound effect
heroLeveled
Sound effect
weaponCrossImpact
Sound effect
heroImpact
Sound effect
enemyDeath
Sound effect
pickupWeapon
Sound effect
pickupCrucifix
Sound effect
weaponCrossLaunch
Sound effect
heroDeath
Sound effect
enemyRoar
Sound effect
clockChime
Sound effect