Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.getAsset is not a function' in this line: 'var arrowGraphics = self.getAsset('arrow', 'Directional Arrow', -1.0, 0.5);' Line Number: 394
Code edit (10 edits merged)
Please save this source code
User prompt
add an arrow asset to the hero that points towards the shootPos
User prompt
create an arrow asset for the hero that points towards from the hero to the shootPos with an offset of 100 units
User prompt
add an arrow asset to the hero that points towards the shootPos with an offset of 100 units
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
add a HealthBar to the BasicEnemy class only if it's been hit
User prompt
Create a new `HealthBar` class based on the hero's health bar
User prompt
create a new HealthBar class based on the heroes healthbar, without changing the hero itself
Code edit (4 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: enemy is not defined' in this line: 'LK.effects.flashObject(enemy, 0xaa0000, 1000);' Line Number: 197
Code edit (1 edits merged)
Please save this source code
User prompt
enemies briefly flash white when hit
Code edit (1 edits merged)
Please save this source code
User prompt
projectiles should record in a map which enemies it hit (by the enemy id) and the last tick they were hit. Enemies cannot get hit more than once every 10 ticks
Code edit (11 edits merged)
Please save this source code
User prompt
instead of generating a unique id, use an integer which is incremented
User prompt
Fix Bug: 'TypeError: LK.generateUniqueId is not a function' in this line: 'enemies.push(new BasicEnemy(self, x, y, {' Line Number: 704
User prompt
Fix Bug: 'TypeError: LK.generateUniqueId is not a function' in this line: 'enemies.push(new BasicEnemy(self, x, y, {' Line Number: 704
User prompt
add a unique id to enemies, passed through in the constructor args object
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: t.setStageReference is not a function' in this line: 'parent.addChild(self);' Line Number: 138
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -295,9 +295,9 @@
var enemy = enemies[i];
var lastHitTick = hitMap[enemy.id];
if (self.intersects(enemy) && (!lastHitTick || tick - lastHitTick > 10)) {
enemy.health -= damage;
- LK.effects.flashObject(enemy, 0xffffff, 100);
+ LK.effects.flashObject(enemy, 0x000000, 100);
hitMap[enemy.id] = tick;
}
}
return (self.x < 0 || self.x > 2048 || self.y < 0 || self.y > 2732) && range < destroyRange || self.intersects(hero) && speed < 0;
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