Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: heightDifference is not defined' in or related to this line: 'var dy = hero.y + heightDifference - self.y;' Line Number: 97
Code edit (16 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: self is undefined' in or related to this line: 'var updateBase = self.update;' Line Number: 117
User prompt
Please fix the bug: 'ReferenceError: WeaponFireball is not defined' in or related to this line: 'startingWeapons.push(backgroundContainer.addChild(new PickupWeapon({' Line Number: 525
Code edit (2 edits merged)
Please save this source code
User prompt
add a hero asset with anchor (0.5, 1.0) to the Hero class
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: tint is not defined' in or related to this line: 'var bar = self.attachAsset('shapeBox', {' Line Number: 73
Code edit (7 edits merged)
Please save this source code
User prompt
add an outlineSmall asset to the joystickKnob and an outlineLarge asset to the joystick
Code edit (2 edits merged)
Please save this source code
User prompt
add a new sorting container (inheriting from Container) that has an update function that sorts it's children array by their ascending y value
Code edit (3 edits merged)
Please save this source code
User prompt
Replace all usages of the 'blank' asset with the 'shapeBox' asset
User prompt
Migrate to the latest version of LK
Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
flash the CrossWeapon's aimArrow and the FireballWeapon's projectileLaunchers white during the launch function
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: tryUpdateLaunchers is not defined' in this line: 'tryUpdateLaunchers(args);' Line Number: 1024
Code edit (14 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: existingEffect.refresh is not a function' in this line: 'existingEffect.refresh({' Line Number: 803
===================================================================
--- original.js
+++ change.js
@@ -755,9 +755,9 @@
self.y = y;
var projectileAsset = self.createAsset('fireballProjectile', 'Fireball Projectile', .5, .5);
var hitMap = {};
var speed = 15;
- var baseRadius = 200;
+ var baseRadius = 150;
var burnInterval = 15;
var pierce = args.pierce;
var direction = args.direction;
var duration = args.duration;
@@ -817,9 +817,9 @@
effects.push(new FireballExplosion(args.game, self.x, self.y, {
scale: currentScale,
rotation: self.rotation
}));
- currentScale /= 2;
+ currentScale = Math.max(currentScale, currentScale / 2);
self.scale.x = currentScale;
self.scale.y = currentScale;
pierce--;
}
@@ -987,14 +987,21 @@
});
var CrossWeapon = Container.expand(function (parent, x, y, args) {
var self = Container.call(this);
parent.addChild(self);
+ self.update = update;
+ self.activate = activate;
+ self.active = false;
self.x = 0;
self.y = 0;
+ var weaponGraphics = self.createAsset('crossProjectile', 'Cross Weapon Asset', .5, .5);
+ var collisionPoint = new Point(self);
var initialCooldown = 120;
var cooldown = initialCooldown;
- var spreadIncrement = 20 * Math.PI / 180;
- self.update = update;
+ var splitIncrement = 20 * Math.PI / 180;
+ weaponGraphics.scale.x = 1.25;
+ weaponGraphics.scale.y = 1.25;
+ weaponGraphics.rotation = 0.1;
function update(args) {
var hero = args.hero;
if (cooldown > 0) {
cooldown--;
@@ -1003,8 +1010,23 @@
var attackSpeed = 1 + 0.25 * hero.minorBoonLevels['Rearm'];
cooldown = initialCooldown / attackSpeed;
}
}
+ function activate(args) {
+ var hero = args.hero;
+ var weapons = args.weapons;
+ self.active = true;
+ self.x = hero.x;
+ self.y = hero.y;
+ tryUpdateLaunchers(args);
+ weaponGraphics.destroy();
+ collisionPoint.destroy();
+ weapons.forEach(function (weapon, node) {
+ if (!weapon.active) {
+ weapons.remove(node).destroy();
+ }
+ });
+ }
function launch(args) {
var hero = args.hero;
var game = args.game;
var projectiles = args.projectiles;
@@ -1012,15 +1034,15 @@
var range = 200 + 100 * hero.minorBoonLevels['Range'];
var damage = 15 + 10 * hero.minorBoonLevels['Damage'];
var linger = 0 + 15 * hero.minorBoonLevels['Duration'];
var growthRate = 0.15 * hero.majorBoonLevels['Growth'] / 60;
- var spreadCount = 1 + hero.majorBoonLevels['Split'];
+ var splitCount = 1 + hero.majorBoonLevels['Split'];
var dx = hero.shootPos.x - hero.x;
var dy = hero.shootPos.y - hero.y;
- var baseAngle = Math.atan2(dy, dx) - spreadCount * spreadIncrement / 2;
- for (var i = 0; i < spreadCount; i++) {
- var spreadAngle = spreadIncrement / 2 * (spreadCount <= 1 ? 1 : Math.random() - 0.5);
- var direction = baseAngle + i * spreadIncrement + spreadAngle;
+ var baseAngle = Math.atan2(dy, dx) - splitCount * splitIncrement / 2;
+ for (var i = 0; i < splitCount; i++) {
+ var splitAngle = splitIncrement / 2 * (splitCount <= 1 ? 1 : Math.random() - 0.5);
+ var direction = baseAngle + i * splitIncrement + splitAngle;
projectiles.push(new CrossProjectile(game, hero.x, hero.y, {
linger: linger + Math.floor(10 * Math.random()),
range: range * (0.9 + 0.2 * Math.random()),
growthRate,
@@ -1172,8 +1194,9 @@
progressBar,
onLevelUp
});
weapons.push(new FireballWeapon(backgroundContainer, 2048 / 4 * 2, 2732 / 4 * 1));
+ weapons.push(new CrossWeapon(backgroundContainer, 2048 / 4 * 2, 2732 / 4 * 3));
var foregroundContainer = new SectionalContainer(self);
stage.on('down', function (obj) {
canMove = true;
hero.targetPos = obj.event.getLocalPosition(self);
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