User prompt
in the cross weapon's launch function, create a new hero bullet in the direction from the hero to the hero's targetPos
User prompt
move the shootPos variable to the hero class, making sure to update all used references
User prompt
in the cross weapon class there's a `initialCooldown` variable set to 120, and a `cooldown` variable set to that. In the update function, reduce the cooldown by 1 until it reaches zero, at which point call a `launch` function and reset the `cooldown` back to the initial variable
User prompt
Fix Bug: 'TypeError: self.weapons[i].update is not a function' in this line: 'self.weapons[i].update();' Line Number: 141
User prompt
when the hero updates, update all weapons in the array
Code edit (1 edits merged)
Please save this source code
User prompt
when creating the hero's weapon, pass through the hero reference
Code edit (1 edits merged)
Please save this source code
User prompt
Rename the hero's `move` function to `update`
User prompt
create a weapons array in the hero and put the crossWeapon reference in it
User prompt
create a CrossWeapon container (without any graphics) and add it to the hero
User prompt
create a CrossWeapon container and add it to the hero
Code edit (2 edits merged)
Please save this source code
User prompt
Make sure that all minorBoonLevels and majorBoonLevels usage is referenced from the hero
User prompt
Fix Bug: 'ReferenceError: minorBoonLevels is not defined' in this line: 'for (var k = 0; k <= minorBoonLevels['Luck']; k++) {' Line Number: 340
User prompt
Fix Bug: 'ReferenceError: minorBoonLevels is not defined' in this line: 'for (var k = 0; k <= minorBoonLevels['Luck']; k++) {' Line Number: 329
User prompt
Fix Bug: 'ReferenceError: minorBoonLevels is not defined' in this line: 'if (crucifixPickups.length < 1 && Math.random() < Math.sqrt(minorBoonLevels['Luck']) / 100) {' Line Number: 322
User prompt
Fix Bug: 'ReferenceError: minorBoonLevels is not defined' in this line: 'enemies[i].health -= 10 + 5 * minorBoonLevels['Damage'];' Line Number: 320
User prompt
Fix Bug: 'ReferenceError: minorBoonLevels is not defined' in this line: 'if (LK.ticks % Math.floor(120 / (1 + 0.25 * minorBoonLevels['Rearm'])) === 0) {' Line Number: 421
User prompt
move the major and minor boon levels to the hero instance
User prompt
add java doc comments
Code edit (1 edits merged)
Please save this source code
User prompt
add a `difficultyScale` variable that updates with the countdown to: `1 - countdown / initialCountdown`
User prompt
add an `initialCountdown` variable, and set the `countdown` to that
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -94,8 +94,9 @@
};
});
var CrossWeapon = Container.expand(function (hero) {
var self = Container.call(this);
+ self.update = function () {};
});
var Hero = Container.expand(function () {
var self = Container.call(this);
self.minorBoonLevels = {
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