User prompt
make somethink new ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
(free)more ability like summon bat(if bat touch enmys, emys die) and make enemy bosses(every 100 secon 1 boss come for kill dracula)(vampire baron(20 live), big dracula baron( 3 forms (1st form 50 live 2nd form 75 live final form 200 live)) , werewolf(5 form(1st =250 2nd =400 3rd= 500 4th=750 5th=1000)) and if vampire kill boss he have new ability and upgrade ability) ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
make better abilitys and make background and if click ability button pause game (vampire don`t die and enemys don`t move) ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
what I just want you make your best ideas
User prompt
make new abilty wasd is move
User prompt
fix bugs(İ press f button in the keyboard but it doesn`t work)
User prompt
make background
User prompt
Please fix the bug: 'Cannot read properties of undefined (reading 'addEventListener')' in or related to this line: 'document.addEventListener('keydown', function (event) {' Line Number: 1737
User prompt
if player press h and j and k and l button use abilitys and if player press f button pause game and open ability menu and fix bugs ↪💡 Consider importing and using the following plugins: @upit/storage.v1, @upit/tween.v1
User prompt
make dracula have abilitys and make waves and bosses(vampire baron(20 live), big dracula baron( 3 forms (1st form 50 live 2nd form 75 live final form 200 live)) , werewolf(5 form(1st =250 2nd =400 3rd= 500 4th=750 5th=1000)) and if vampire kill boss he have new ability and upgrade ability with new materials(add 5 diffirent material and orb monsters(if vampire kill orb monster he +1 or +5 material)) ↪💡 Consider importing and using the following plugins: @upit/storage.v1, @upit/tween.v1
User prompt
fix bug(total blood is wrong)
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'toGlobal')' in or related to this line: 'var gamePosition = game.toLocal(obj.parent.toGlobal({' Line Number: 969
User prompt
make more skins and make in better store and better main menu and fix bug and in the store we can see how much blood we have ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
fix bugs (vampire isn`t teleport mouse he teleport to mouse`s right down) and make blody moon(every 60 second he is coming and in next 20 second vampire dont die and 10X blood/coin boost) and make other skins ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
fix bugs
User prompt
hunters can shoot arrows and if vampire touch arrow he die but if he touch hunter hunters die and blood +100 and coins +200 and make main menu and play button and make skins(they have special powers) and skins buy with bloods in the store ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
make a store and enemys(vampire hunters) ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
make it better
User prompt
Please fix the bug: 'storage.get is not a function' in or related to this line: 'var highScore = storage.get('draculaHighScore') || 0;' Line Number: 156 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
make it better
Code edit (1 edits merged)
Please save this source code
User prompt
Dracula's Blood Hunt
Initial prompt
make me dracula
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
var BatParticle = Container.expand(function () {
var self = Container.call(this);
var batGraphics = self.attachAsset('bat', {
anchorX: 0.5,
anchorY: 0.5
});
self.speedX = (Math.random() - 0.5) * 4;
self.speedY = (Math.random() - 0.5) * 2;
self.life = 180 + Math.random() * 120;
self.update = function () {
self.x += self.speedX;
self.y += self.speedY;
self.life--;
batGraphics.alpha = self.life / 300;
if (self.life <= 0) {
self.destroy();
var index = batParticles.indexOf(self);
if (index > -1) {
batParticles.splice(index, 1);
}
}
};
return self;
});
var BloodOrb = Container.expand(function () {
var self = Container.call(this);
var orbGraphics = self.attachAsset('bloodOrb', {
anchorX: 0.5,
anchorY: 0.5
});
// Pulsing animation for blood orb
tween(orbGraphics, {
scaleX: 1.2,
scaleY: 1.2
}, {
duration: 800,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(orbGraphics, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 800,
easing: tween.easeInOut
});
}
});
return self;
});
var Dracula = Container.expand(function () {
var self = Container.call(this);
var draculaGraphics = self.attachAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5
});
// Add cape effect with slight rotation
draculaGraphics.rotation = 0.1;
self.invulnerable = false;
self.invulnerabilityTime = 0;
self.update = function () {
if (self.invulnerable) {
self.invulnerabilityTime--;
draculaGraphics.alpha = 0.5 + 0.3 * Math.sin(self.invulnerabilityTime * 0.3);
if (self.invulnerabilityTime <= 0) {
self.invulnerable = false;
draculaGraphics.alpha = 1.0;
}
}
};
return self;
});
var PowerOrb = Container.expand(function () {
var self = Container.call(this);
var orbGraphics = self.attachAsset('powerOrb', {
anchorX: 0.5,
anchorY: 0.5
});
// Spinning animation for power orb
tween(orbGraphics, {
rotation: Math.PI * 2
}, {
duration: 2000,
easing: tween.easeLinear,
onFinish: function onFinish() {
orbGraphics.rotation = 0;
}
});
return self;
});
var Sunlight = Container.expand(function () {
var self = Container.call(this);
var sunGraphics = self.attachAsset('sunlight', {
anchorX: 0.5,
anchorY: 0.5
});
self.speed = 2;
self.update = function () {
self.x += self.speed;
// Remove sunlight when it goes off screen
if (self.x > 2200) {
self.parent.removeChild(self);
var index = sunlightRays.indexOf(self);
if (index > -1) {
sunlightRays.splice(index, 1);
}
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000
});
/****
* Game Code
****/
// Game variables
var dracula;
var bloodOrbs = [];
var sunlightRays = [];
var powerOrbs = [];
var batParticles = [];
var gameTime = 0;
var lastBloodSpawn = 0;
var lastSunlightSpawn = 0;
var lastPowerSpawn = 0;
var lastBatSpawn = 0;
var dragNode = null;
var isGameOver = false;
var highScore = storage.get('draculaHighScore') || 0;
var combo = 0;
var lastCollectTime = 0;
// Add moon decoration
var moon = LK.getAsset('moon', {
anchorX: 0.5,
anchorY: 0.5,
x: 1700,
y: 300,
alpha: 0.7
});
game.addChild(moon);
// Create score display
var scoreTxt = new Text2('Blood: 0', {
size: 120,
fill: 0xFF0000
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Create high score display
var highScoreTxt = new Text2('Best: ' + highScore, {
size: 80,
fill: 0xFFD700
});
highScoreTxt.anchor.set(1, 0);
highScoreTxt.x = -20;
highScoreTxt.y = 20;
LK.gui.topRight.addChild(highScoreTxt);
// Create combo display
var comboTxt = new Text2('', {
size: 100,
fill: 0xFF00FF
});
comboTxt.anchor.set(0.5, 0.5);
LK.gui.center.addChild(comboTxt);
comboTxt.alpha = 0;
// Create Dracula
dracula = game.addChild(new Dracula());
dracula.x = 1024;
dracula.y = 1366;
// Spawn blood orbs
function spawnBloodOrb() {
var bloodOrb = new BloodOrb();
bloodOrb.x = Math.random() * 1800 + 124;
bloodOrb.y = Math.random() * 2400 + 124;
bloodOrbs.push(bloodOrb);
game.addChild(bloodOrb);
}
// Spawn sunlight rays
function spawnSunlight() {
var sunlight = new Sunlight();
sunlight.x = -150;
sunlight.y = Math.random() * 2732;
sunlightRays.push(sunlight);
game.addChild(sunlight);
}
// Spawn power orbs
function spawnPowerOrb() {
var powerOrb = new PowerOrb();
powerOrb.x = Math.random() * 1800 + 124;
powerOrb.y = Math.random() * 2400 + 124;
powerOrbs.push(powerOrb);
game.addChild(powerOrb);
}
// Spawn bat particles
function spawnBatParticle() {
var bat = new BatParticle();
bat.x = dracula.x + (Math.random() - 0.5) * 200;
bat.y = dracula.y + (Math.random() - 0.5) * 200;
batParticles.push(bat);
game.addChild(bat);
}
// Handle dragging
function handleMove(x, y, obj) {
if (dragNode && !isGameOver) {
dragNode.x = x;
dragNode.y = y;
// Keep Dracula within bounds
if (dragNode.x < 60) dragNode.x = 60;
if (dragNode.x > 1988) dragNode.x = 1988;
if (dragNode.y < 60) dragNode.y = 60;
if (dragNode.y > 2672) dragNode.y = 2672;
}
}
game.move = handleMove;
game.down = function (x, y, obj) {
if (!isGameOver) {
dragNode = dracula;
handleMove(x, y, obj);
}
};
game.up = function (x, y, obj) {
dragNode = null;
};
game.update = function () {
if (isGameOver) return;
gameTime++;
// Spawn blood orbs every 90-150 ticks (1.5-2.5 seconds)
if (gameTime - lastBloodSpawn > 90 + Math.random() * 60) {
spawnBloodOrb();
lastBloodSpawn = gameTime;
}
// Spawn power orbs every 600-900 ticks (10-15 seconds)
if (gameTime - lastPowerSpawn > 600 + Math.random() * 300) {
spawnPowerOrb();
lastPowerSpawn = gameTime;
}
// Spawn bat particles periodically
if (gameTime - lastBatSpawn > 30 + Math.random() * 30) {
spawnBatParticle();
lastBatSpawn = gameTime;
}
// Spawn sunlight rays - frequency increases over time
var sunlightFrequency = Math.max(120 - Math.floor(gameTime / 1800), 60);
if (gameTime - lastSunlightSpawn > sunlightFrequency) {
spawnSunlight();
lastSunlightSpawn = gameTime;
}
// Check blood orb collection
for (var i = bloodOrbs.length - 1; i >= 0; i--) {
var orb = bloodOrbs[i];
if (dracula.intersects(orb)) {
var points = 10;
// Combo system
if (gameTime - lastCollectTime < 120) {
combo++;
points += combo * 5;
} else {
combo = 0;
}
lastCollectTime = gameTime;
LK.setScore(LK.getScore() + points);
scoreTxt.setText('Blood: ' + LK.getScore());
// Show combo
if (combo > 1) {
comboTxt.setText('x' + combo + ' COMBO!');
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 1500
});
}
LK.getSound('collectBlood').play();
// Blood collection effect
LK.effects.flashObject(dracula, 0xFF0000, 300);
orb.destroy();
bloodOrbs.splice(i, 1);
}
}
// Check power orb collection
for (var p = powerOrbs.length - 1; p >= 0; p--) {
var powerOrb = powerOrbs[p];
if (dracula.intersects(powerOrb)) {
LK.setScore(LK.getScore() + 50);
scoreTxt.setText('Blood: ' + LK.getScore());
LK.getSound('powerUp').play();
// Grant temporary invulnerability
dracula.invulnerable = true;
dracula.invulnerabilityTime = 300;
// Clear all sunlight rays
for (var s = sunlightRays.length - 1; s >= 0; s--) {
sunlightRays[s].destroy();
sunlightRays.splice(s, 1);
}
LK.effects.flashScreen(0x9900FF, 500);
powerOrb.destroy();
powerOrbs.splice(p, 1);
}
}
// Check sunlight collision
if (!dracula.invulnerable) {
for (var j = 0; j < sunlightRays.length; j++) {
var ray = sunlightRays[j];
if (dracula.intersects(ray)) {
// Save high score
if (LK.getScore() > highScore) {
storage.set('draculaHighScore', LK.getScore());
}
// Game over
isGameOver = true;
LK.getSound('deathSound').play();
LK.effects.flashScreen(0xFFD700, 1500);
LK.setTimeout(function () {
LK.showGameOver();
}, 1000);
break;
}
}
}
// Clean up off-screen blood orbs
for (var k = bloodOrbs.length - 1; k >= 0; k--) {
var bloodOrb = bloodOrbs[k];
if (bloodOrb.y > 2800) {
bloodOrb.destroy();
bloodOrbs.splice(k, 1);
}
}
// Clean up off-screen power orbs
for (var l = powerOrbs.length - 1; l >= 0; l--) {
var powerOrb = powerOrbs[l];
if (powerOrb.y > 2800) {
powerOrb.destroy();
powerOrbs.splice(l, 1);
}
}
}; ===================================================================
--- original.js
+++ change.js
@@ -1,12 +1,37 @@
/****
* Plugins
****/
var tween = LK.import("@upit/tween.v1");
+var storage = LK.import("@upit/storage.v1");
/****
* Classes
****/
+var BatParticle = Container.expand(function () {
+ var self = Container.call(this);
+ var batGraphics = self.attachAsset('bat', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.speedX = (Math.random() - 0.5) * 4;
+ self.speedY = (Math.random() - 0.5) * 2;
+ self.life = 180 + Math.random() * 120;
+ self.update = function () {
+ self.x += self.speedX;
+ self.y += self.speedY;
+ self.life--;
+ batGraphics.alpha = self.life / 300;
+ if (self.life <= 0) {
+ self.destroy();
+ var index = batParticles.indexOf(self);
+ if (index > -1) {
+ batParticles.splice(index, 1);
+ }
+ }
+ };
+ return self;
+});
var BloodOrb = Container.expand(function () {
var self = Container.call(this);
var orbGraphics = self.attachAsset('bloodOrb', {
anchorX: 0.5,
@@ -38,10 +63,40 @@
anchorY: 0.5
});
// Add cape effect with slight rotation
draculaGraphics.rotation = 0.1;
+ self.invulnerable = false;
+ self.invulnerabilityTime = 0;
+ self.update = function () {
+ if (self.invulnerable) {
+ self.invulnerabilityTime--;
+ draculaGraphics.alpha = 0.5 + 0.3 * Math.sin(self.invulnerabilityTime * 0.3);
+ if (self.invulnerabilityTime <= 0) {
+ self.invulnerable = false;
+ draculaGraphics.alpha = 1.0;
+ }
+ }
+ };
return self;
});
+var PowerOrb = Container.expand(function () {
+ var self = Container.call(this);
+ var orbGraphics = self.attachAsset('powerOrb', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ // Spinning animation for power orb
+ tween(orbGraphics, {
+ rotation: Math.PI * 2
+ }, {
+ duration: 2000,
+ easing: tween.easeLinear,
+ onFinish: function onFinish() {
+ orbGraphics.rotation = 0;
+ }
+ });
+ return self;
+});
var Sunlight = Container.expand(function () {
var self = Container.call(this);
var sunGraphics = self.attachAsset('sunlight', {
anchorX: 0.5,
@@ -75,20 +130,53 @@
// Game variables
var dracula;
var bloodOrbs = [];
var sunlightRays = [];
+var powerOrbs = [];
+var batParticles = [];
var gameTime = 0;
var lastBloodSpawn = 0;
var lastSunlightSpawn = 0;
+var lastPowerSpawn = 0;
+var lastBatSpawn = 0;
var dragNode = null;
var isGameOver = false;
+var highScore = storage.get('draculaHighScore') || 0;
+var combo = 0;
+var lastCollectTime = 0;
+// Add moon decoration
+var moon = LK.getAsset('moon', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 1700,
+ y: 300,
+ alpha: 0.7
+});
+game.addChild(moon);
// Create score display
var scoreTxt = new Text2('Blood: 0', {
size: 120,
fill: 0xFF0000
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
+// Create high score display
+var highScoreTxt = new Text2('Best: ' + highScore, {
+ size: 80,
+ fill: 0xFFD700
+});
+highScoreTxt.anchor.set(1, 0);
+highScoreTxt.x = -20;
+highScoreTxt.y = 20;
+LK.gui.topRight.addChild(highScoreTxt);
+// Create combo display
+var comboTxt = new Text2('', {
+ size: 100,
+ fill: 0xFF00FF
+});
+comboTxt.anchor.set(0.5, 0.5);
+LK.gui.center.addChild(comboTxt);
+comboTxt.alpha = 0;
// Create Dracula
dracula = game.addChild(new Dracula());
dracula.x = 1024;
dracula.y = 1366;
@@ -107,8 +195,24 @@
sunlight.y = Math.random() * 2732;
sunlightRays.push(sunlight);
game.addChild(sunlight);
}
+// Spawn power orbs
+function spawnPowerOrb() {
+ var powerOrb = new PowerOrb();
+ powerOrb.x = Math.random() * 1800 + 124;
+ powerOrb.y = Math.random() * 2400 + 124;
+ powerOrbs.push(powerOrb);
+ game.addChild(powerOrb);
+}
+// Spawn bat particles
+function spawnBatParticle() {
+ var bat = new BatParticle();
+ bat.x = dracula.x + (Math.random() - 0.5) * 200;
+ bat.y = dracula.y + (Math.random() - 0.5) * 200;
+ batParticles.push(bat);
+ game.addChild(bat);
+}
// Handle dragging
function handleMove(x, y, obj) {
if (dragNode && !isGameOver) {
dragNode.x = x;
@@ -137,8 +241,18 @@
if (gameTime - lastBloodSpawn > 90 + Math.random() * 60) {
spawnBloodOrb();
lastBloodSpawn = gameTime;
}
+ // Spawn power orbs every 600-900 ticks (10-15 seconds)
+ if (gameTime - lastPowerSpawn > 600 + Math.random() * 300) {
+ spawnPowerOrb();
+ lastPowerSpawn = gameTime;
+ }
+ // Spawn bat particles periodically
+ if (gameTime - lastBatSpawn > 30 + Math.random() * 30) {
+ spawnBatParticle();
+ lastBatSpawn = gameTime;
+ }
// Spawn sunlight rays - frequency increases over time
var sunlightFrequency = Math.max(120 - Math.floor(gameTime / 1800), 60);
if (gameTime - lastSunlightSpawn > sunlightFrequency) {
spawnSunlight();
@@ -147,29 +261,74 @@
// Check blood orb collection
for (var i = bloodOrbs.length - 1; i >= 0; i--) {
var orb = bloodOrbs[i];
if (dracula.intersects(orb)) {
- LK.setScore(LK.getScore() + 10);
+ var points = 10;
+ // Combo system
+ if (gameTime - lastCollectTime < 120) {
+ combo++;
+ points += combo * 5;
+ } else {
+ combo = 0;
+ }
+ lastCollectTime = gameTime;
+ LK.setScore(LK.getScore() + points);
scoreTxt.setText('Blood: ' + LK.getScore());
+ // Show combo
+ if (combo > 1) {
+ comboTxt.setText('x' + combo + ' COMBO!');
+ comboTxt.alpha = 1;
+ tween(comboTxt, {
+ alpha: 0
+ }, {
+ duration: 1500
+ });
+ }
LK.getSound('collectBlood').play();
// Blood collection effect
LK.effects.flashObject(dracula, 0xFF0000, 300);
orb.destroy();
bloodOrbs.splice(i, 1);
}
}
+ // Check power orb collection
+ for (var p = powerOrbs.length - 1; p >= 0; p--) {
+ var powerOrb = powerOrbs[p];
+ if (dracula.intersects(powerOrb)) {
+ LK.setScore(LK.getScore() + 50);
+ scoreTxt.setText('Blood: ' + LK.getScore());
+ LK.getSound('powerUp').play();
+ // Grant temporary invulnerability
+ dracula.invulnerable = true;
+ dracula.invulnerabilityTime = 300;
+ // Clear all sunlight rays
+ for (var s = sunlightRays.length - 1; s >= 0; s--) {
+ sunlightRays[s].destroy();
+ sunlightRays.splice(s, 1);
+ }
+ LK.effects.flashScreen(0x9900FF, 500);
+ powerOrb.destroy();
+ powerOrbs.splice(p, 1);
+ }
+ }
// Check sunlight collision
- for (var j = 0; j < sunlightRays.length; j++) {
- var ray = sunlightRays[j];
- if (dracula.intersects(ray)) {
- // Game over
- isGameOver = true;
- LK.getSound('deathSound').play();
- LK.effects.flashScreen(0xFFD700, 1500);
- LK.setTimeout(function () {
- LK.showGameOver();
- }, 1000);
- break;
+ if (!dracula.invulnerable) {
+ for (var j = 0; j < sunlightRays.length; j++) {
+ var ray = sunlightRays[j];
+ if (dracula.intersects(ray)) {
+ // Save high score
+ if (LK.getScore() > highScore) {
+ storage.set('draculaHighScore', LK.getScore());
+ }
+ // Game over
+ isGameOver = true;
+ LK.getSound('deathSound').play();
+ LK.effects.flashScreen(0xFFD700, 1500);
+ LK.setTimeout(function () {
+ LK.showGameOver();
+ }, 1000);
+ break;
+ }
}
}
// Clean up off-screen blood orbs
for (var k = bloodOrbs.length - 1; k >= 0; k--) {
@@ -178,5 +337,13 @@
bloodOrb.destroy();
bloodOrbs.splice(k, 1);
}
}
+ // Clean up off-screen power orbs
+ for (var l = powerOrbs.length - 1; l >= 0; l--) {
+ var powerOrb = powerOrbs[l];
+ if (powerOrb.y > 2800) {
+ powerOrb.destroy();
+ powerOrbs.splice(l, 1);
+ }
+ }
};
\ No newline at end of file
make red eyes and more cooler
make pixel red eye dracula. In-Game asset. 2d. High contrast. No shadows
moon. In-Game asset. 2d. High contrast. No shadows
pixel blood. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
yellow square without other colors. In-Game asset. 2d. High contrast. No shadows
orb monster pixel
blood shield. In-Game asset. 2d. High contrast. No shadows
vampire blody coin pixel. In-Game asset. 2d. High contrast. No shadows
bat swarm. In-Game asset. 2d. High contrast. No shadows
shadow strike. In-Game asset. 2d. High contrast. No shadows
big dracula baron. In-Game asset. 2d. High contrast. No shadows
power orb. No background. Transparent background. Blank background. No shadows. 2d. In-Game asset. flat
delete cicrle
Vampire baron evil pixel. In-Game asset. 2d. High contrast. No shadows
werewolf red eye pixel. In-Game asset. 2d. High contrast. No shadows