User prompt
Fix Bug: 'ReferenceError: experiencePickups is not defined' in this line: 'for (var i = 0; i < experiencePickups.length; i++) {' Line Number: 253
User prompt
An experiencepickup activates when the hero comes within 300 distance of it. While active, it moves towards the hero at a speed of 30. When colliding with the hero it is destroyed.
User prompt
when an enemy dies it has a 50% chance to drop an experience pickup, if another pickup was not dropped
User prompt
reduced initial travelDistance value from 600 to 400
User prompt
change the bullet speed reduction from -0.75 to -1, and bullet destroy check from -600 to -1200
User prompt
change the bullet speed reduction from -0.75 to -60
User prompt
change bullet speed change to -60
User prompt
combine hero bullet deletion checks
User prompt
Fix Bug: 'TypeError: heroBullets[i] is undefined' in this line: 'i--;' Line Number: 162
User prompt
Reduce initial travelDistance from 1000 to 600 and destroy check from -1000 to -600
User prompt
Fix Bug: 'TypeError: undefined has no properties' in this line: 'i--;' Line Number: 163
User prompt
Fix Bug: 'TypeError: undefined has no properties' in this line: 'i--;' Line Number: 162
User prompt
Fix Bug: 'TypeError: undefined has no properties' in this line: 'i--;' Line Number: 162
User prompt
Fix Bug: 'TypeError: heroBullets[i] is undefined' in this line: 'i--;' Line Number: 162
User prompt
reduce initial travelDistance value from 1000 to 600 and its destroy check from -1000 to -600
User prompt
combine the hero bullet checks into a single large if statement
User prompt
Fix Bug: 'TypeError: heroBullets[i] is undefined' in this line: 'i--;' Line Number: 163
User prompt
Fix Bug: 'TypeError: heroBullets[i] is undefined' in this line: 'i--;' Line Number: 162
User prompt
Fix Bug: 'TypeError: heroBullets[i] is undefined' in this line: 'i--;' Line Number: 162
User prompt
Fix Bug: 'TypeError: undefined has no properties' in this line: 'i--;' Line Number: 162
User prompt
bullet travelDistance should be reduced by the abs value of its speed, and not restricted by an if statement. Speed reduction should still check that travel distance is <= 0
User prompt
change the second "if" hero bullet check to else
User prompt
change the first "(heroBullets[i].intersects(hero) && heroBullets[i].speed < 0)" to "(heroBullets[i].x < 0 || heroBullets[i].x > 2048 || heroBullets[i].y < 0 || heroBullets[i].y > 2732) && heroBullets[i].travelDistance < -1000)"
User prompt
change the second bullet destroy condition to check if the bullet is out of bounds while its travelDistance is < -1000
User prompt
duplicate the "if (heroBullets[i].intersects(hero) && heroBullets[i].speed < 0) { heroBullets[i].destroy(); heroBullets.splice(i, 1); i--; }" below itself
===================================================================
--- original.js
+++ change.js
@@ -156,9 +156,9 @@
if (!isPaused) {
hero.move();
for (var i = 0; i < heroBullets.length; i++) {
heroBullets[i].move();
- if (heroBullets[i].intersects(hero) && heroBullets[i].speed < 0) {
+ if (heroBullets[i].intersects(hero) && heroBullets[i].travelDistance < -1000) {
heroBullets[i].destroy();
heroBullets.splice(i, 1);
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