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 Arrow = Container.expand(function () {
var self = Container.call(this);
var arrowGraphics = self.attachAsset('sunlight', {
anchorX: 0.5,
anchorY: 0.5
});
arrowGraphics.scaleX = 0.2;
arrowGraphics.scaleY = 0.8;
arrowGraphics.tint = 0x8B4513; // Brown color for arrow
self.speedX = 0;
self.speedY = 0;
self.life = 300;
self.update = function () {
self.x += self.speedX;
self.y += self.speedY;
self.life--;
if (self.life <= 0 || self.x < 0 || self.x > 2048 || self.y < 0 || self.y > 2732) {
self.destroy();
var index = arrows.indexOf(self);
if (index > -1) {
arrows.splice(index, 1);
}
}
};
return self;
});
var Bat = 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) * 6;
self.speedY = (Math.random() - 0.5) * 6;
self.life = 300 + Math.random() * 180; // 5-8 seconds
self.targetEnemy = null;
self.damage = 25;
self.seekRange = 200;
self.update = function () {
// Find nearest enemy if no target
if (!self.targetEnemy || !self.targetEnemy.parent) {
var nearestDistance = self.seekRange;
for (var h = 0; h < vampireHunters.length; h++) {
var hunter = vampireHunters[h];
var distance = Math.sqrt(Math.pow(hunter.x - self.x, 2) + Math.pow(hunter.y - self.y, 2));
if (distance < nearestDistance) {
self.targetEnemy = hunter;
nearestDistance = distance;
}
}
for (var b = 0; b < bosses.length; b++) {
var boss = bosses[b];
var distance = Math.sqrt(Math.pow(boss.x - self.x, 2) + Math.pow(boss.y - self.y, 2));
if (distance < nearestDistance) {
self.targetEnemy = boss;
nearestDistance = distance;
}
}
}
// Move towards target or randomly
if (self.targetEnemy && self.targetEnemy.parent) {
var dx = self.targetEnemy.x - self.x;
var dy = self.targetEnemy.y - self.y;
var distance = Math.sqrt(dx * dx + dy * dy);
if (distance > 0) {
self.speedX = dx / distance * 4;
self.speedY = dy / distance * 4;
}
// Check collision with target
if (distance < 30) {
// Damage enemy
if (self.targetEnemy.health !== undefined) {
self.targetEnemy.health -= self.damage;
LK.effects.flashObject(self.targetEnemy, 0xFF0000, 200);
if (self.targetEnemy.health <= 0) {
// Kill enemy
var index = vampireHunters.indexOf(self.targetEnemy);
if (index > -1) {
self.targetEnemy.destroy();
vampireHunters.splice(index, 1);
LK.setScore(LK.getScore() + 100);
}
var bossIndex = bosses.indexOf(self.targetEnemy);
if (bossIndex > -1 && self.targetEnemy.form === undefined) {
self.targetEnemy.destroy();
bosses.splice(bossIndex, 1);
LK.setScore(LK.getScore() + 300);
}
}
}
// Bat dies after attacking
self.life = 0;
}
} else {
// Random movement
self.x += self.speedX;
self.y += self.speedY;
}
self.life--;
batGraphics.alpha = Math.min(1.0, self.life / 150);
batGraphics.rotation += 0.2;
// Keep within bounds
if (self.x < 0) self.speedX = Math.abs(self.speedX);
if (self.x > 2048) self.speedX = -Math.abs(self.speedX);
if (self.y < 0) self.speedY = Math.abs(self.speedY);
if (self.y > 2732) self.speedY = -Math.abs(self.speedY);
if (self.life <= 0) {
self.destroy();
var index = summonedBats.indexOf(self);
if (index > -1) {
summonedBats.splice(index, 1);
}
}
};
return self;
});
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 BigDraculaBaron = Container.expand(function () {
var self = Container.call(this);
var baronGraphics = self.attachAsset('bigDraculaBaron', {
anchorX: 0.5,
anchorY: 0.5
});
self.health = 50;
self.maxHealth = 50;
self.form = 1; // 1st form
self.speed = 1.5;
self.direction = Math.random() * Math.PI * 2;
self.lastAttackTime = 0;
self.transforming = false;
self.update = function () {
if (self.transforming) return;
// Move in patterns based on form
if (self.form === 1) {
// Circular movement
self.direction += 0.05;
self.x += Math.cos(self.direction) * self.speed;
self.y += Math.sin(self.direction) * self.speed;
} else if (self.form === 2) {
// Chase player
var dx = dracula.x - self.x;
var dy = dracula.y - self.y;
self.direction = Math.atan2(dy, dx);
self.x += Math.cos(self.direction) * self.speed;
self.y += Math.sin(self.direction) * self.speed;
} else if (self.form === 3) {
// Teleport attack
if (gameTime % 300 === 0) {
self.x = dracula.x + (Math.random() - 0.5) * 400;
self.y = dracula.y + (Math.random() - 0.5) * 400;
}
}
// Attack patterns
var attackInterval = self.form === 3 ? 60 : 90;
if (gameTime - self.lastAttackTime > attackInterval) {
for (var i = 0; i < self.form; i++) {
var angle = Math.PI * 2 * i / self.form;
var targetX = dracula.x + Math.cos(angle) * 100;
var targetY = dracula.y + Math.sin(angle) * 100;
spawnBossProjectile(self.x, self.y, targetX, targetY, 8);
}
self.lastAttackTime = gameTime;
}
// Check for form transformation
if (self.form === 1 && self.health <= 0) {
self.form = 2;
self.health = 75;
self.maxHealth = 75;
self.speed = 2;
baronGraphics.scaleX = 1.2;
baronGraphics.scaleY = 1.2;
baronGraphics.tint = 0xFF0000;
} else if (self.form === 2 && self.health <= 0) {
self.form = 3;
self.health = 200;
self.maxHealth = 200;
self.speed = 3;
baronGraphics.scaleX = 1.5;
baronGraphics.scaleY = 1.5;
baronGraphics.tint = 0x000000;
}
};
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 BloodShield = Container.expand(function () {
var self = Container.call(this);
var shieldGraphics = self.attachAsset('bloodShield', {
anchorX: 0.5,
anchorY: 0.5
});
shieldGraphics.alpha = 0.6;
self.life = 600; // 10 seconds
self.update = function () {
self.x = dracula.x;
self.y = dracula.y;
self.life--;
// Rotating shield effect
shieldGraphics.rotation += 0.1;
if (self.life <= 0) {
self.destroy();
var index = abilities.indexOf(self);
if (index > -1) {
abilities.splice(index, 1);
}
}
};
return self;
});
var BloodTrail = Container.expand(function () {
var self = Container.call(this);
var trailGraphics = self.attachAsset('bloodOrb', {
anchorX: 0.5,
anchorY: 0.5
});
trailGraphics.scaleX = 0.3;
trailGraphics.scaleY = 0.3;
self.life = 60;
self.update = function () {
self.life--;
trailGraphics.alpha = self.life / 60;
trailGraphics.scaleX *= 0.98;
trailGraphics.scaleY *= 0.98;
if (self.life <= 0) {
self.destroy();
var index = bloodTrails.indexOf(self);
if (index > -1) {
bloodTrails.splice(index, 1);
}
}
};
return self;
});
var BossProjectile = Container.expand(function () {
var self = Container.call(this);
var projectileGraphics = self.attachAsset('bloodOrb', {
anchorX: 0.5,
anchorY: 0.5
});
projectileGraphics.tint = 0x800000;
projectileGraphics.scaleX = 0.7;
projectileGraphics.scaleY = 0.7;
self.speedX = 0;
self.speedY = 0;
self.life = 300;
self.update = function () {
self.x += self.speedX;
self.y += self.speedY;
self.life--;
if (self.life <= 0 || self.x < 0 || self.x > 2048 || self.y < 0 || self.y > 2732) {
self.destroy();
var index = bossProjectiles.indexOf(self);
if (index > -1) {
bossProjectiles.splice(index, 1);
}
}
};
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 HunterBullet = Container.expand(function () {
var self = Container.call(this);
var bulletGraphics = self.attachAsset('sunlight', {
anchorX: 0.5,
anchorY: 0.5
});
bulletGraphics.scaleX = 0.3;
bulletGraphics.scaleY = 0.3;
bulletGraphics.rotation = Math.PI / 2;
self.speedX = 0;
self.speedY = 0;
self.life = 300;
self.update = function () {
self.x += self.speedX;
self.y += self.speedY;
self.life--;
if (self.life <= 0 || self.x < 0 || self.x > 2048 || self.y < 0 || self.y > 2732) {
self.destroy();
var index = hunterBullets.indexOf(self);
if (index > -1) {
hunterBullets.splice(index, 1);
}
}
};
return self;
});
var MainMenu = Container.expand(function () {
var self = Container.call(this);
// Menu background
var menuBg = self.attachAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 20,
scaleY: 25
});
menuBg.x = 1024;
menuBg.y = 1366;
menuBg.alpha = 0.95;
menuBg.tint = 0x1a0033;
// Decorative moons
var moon1 = self.attachAsset('moon', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.8,
scaleY: 0.8,
x: 300,
y: 400,
alpha: 0.3
});
var moon2 = self.attachAsset('moon', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.6,
scaleY: 0.6,
x: 1700,
y: 800,
alpha: 0.2
});
// Title
var titleTxt = new Text2('DRACULA\'S HUNT', {
size: 180,
fill: 0xFF0000
});
titleTxt.anchor.set(0.5, 0.5);
titleTxt.x = 1024;
titleTxt.y = 600;
self.addChild(titleTxt);
// Subtitle
var subtitleTxt = new Text2('Master of the Night', {
size: 80,
fill: 0x999999
});
subtitleTxt.anchor.set(0.5, 0.5);
subtitleTxt.x = 1024;
subtitleTxt.y = 720;
self.addChild(subtitleTxt);
// Blood counter display
var bloodCountTxt = new Text2('Total Blood: ' + (storage.totalBlood || 0), {
size: 70,
fill: 0xFF4444
});
bloodCountTxt.anchor.set(0.5, 0.5);
bloodCountTxt.x = 1024;
bloodCountTxt.y = 850;
self.addChild(bloodCountTxt);
// Play button
var playBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
playBtn.x = 1024;
playBtn.y = 1100;
playBtn.tint = 0x228B22;
playBtn.scaleX = 1.2;
playBtn.scaleY = 1.2;
var playTxt = new Text2('▶ PLAY', {
size: 90,
fill: 0xFFFFFF
});
playTxt.anchor.set(0.5, 0.5);
playTxt.x = 1024;
playTxt.y = 1100;
self.addChild(playTxt);
// Skins button
var skinsBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
skinsBtn.x = 1024;
skinsBtn.y = 1300;
skinsBtn.tint = 0x9932CC;
skinsBtn.scaleX = 1.1;
skinsBtn.scaleY = 1.1;
var skinsTxt = new Text2('🎭 SKINS', {
size: 80,
fill: 0xFFFFFF
});
skinsTxt.anchor.set(0.5, 0.5);
skinsTxt.x = 1024;
skinsTxt.y = 1300;
self.addChild(skinsTxt);
// Stats button
var statsBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
statsBtn.x = 1024;
statsBtn.y = 1500;
statsBtn.tint = 0x4682B4;
var statsTxt = new Text2('📊 STATS', {
size: 70,
fill: 0xFFFFFF
});
statsTxt.anchor.set(0.5, 0.5);
statsTxt.x = 1024;
statsTxt.y = 1500;
self.addChild(statsTxt);
// Store play button and skins button references for click detection
self.playButton = playBtn;
self.skinsButton = skinsBtn;
self.statsButton = statsBtn;
self.bloodCountTxt = bloodCountTxt;
return self;
});
var OrbMonster = Container.expand(function () {
var self = Container.call(this);
var orbGraphics = self.attachAsset('orbMonster', {
anchorX: 0.5,
anchorY: 0.5
});
self.materialType = Math.floor(Math.random() * 5); // 0-4 for 5 different materials
self.materialAmount = Math.random() < 0.3 ? 5 : 1; // 30% chance for 5, 70% for 1
self.speed = 1 + Math.random();
self.direction = Math.random() * Math.PI * 2;
self.health = 3;
// Set color based on material type
var colors = [0x00FF00, 0x0000FF, 0xFFFF00, 0xFF00FF, 0x00FFFF];
orbGraphics.tint = colors[self.materialType];
self.update = function () {
// Float around randomly
self.direction += (Math.random() - 0.5) * 0.1;
self.x += Math.cos(self.direction) * self.speed;
self.y += Math.sin(self.direction) * self.speed;
// Keep within bounds
if (self.x < 60) self.direction = 0;
if (self.x > 1988) self.direction = Math.PI;
if (self.y < 60) self.direction = Math.PI / 2;
if (self.y > 2672) self.direction = -Math.PI / 2;
// Pulsing effect
orbGraphics.scaleX = 1 + 0.2 * Math.sin(gameTime * 0.1);
orbGraphics.scaleY = 1 + 0.2 * Math.sin(gameTime * 0.1);
};
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 RareBloodOrb = Container.expand(function () {
var self = Container.call(this);
var orbGraphics = self.attachAsset('bloodOrb', {
anchorX: 0.5,
anchorY: 0.5
});
orbGraphics.tint = 0xFF6600; // Orange tint for rare orbs
self.value = 25; // Higher point value
// More dramatic pulsing animation
tween(orbGraphics, {
scaleX: 1.5,
scaleY: 1.5
}, {
duration: 600,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(orbGraphics, {
scaleX: 0.8,
scaleY: 0.8
}, {
duration: 600,
easing: tween.easeInOut
});
}
});
return self;
});
var ShadowStrike = Container.expand(function () {
var self = Container.call(this);
var shadowGraphics = self.attachAsset('shadowStrike', {
anchorX: 0.5,
anchorY: 0.5
});
self.life = 30;
self.damage = 50;
self.update = function () {
self.life--;
shadowGraphics.alpha = self.life / 30;
shadowGraphics.scaleX += 0.1;
shadowGraphics.scaleY += 0.1;
if (self.life <= 0) {
self.destroy();
var index = abilities.indexOf(self);
if (index > -1) {
abilities.splice(index, 1);
}
}
};
return self;
});
var SkinMenu = Container.expand(function () {
var self = Container.call(this);
// Menu background
var menuBg = self.attachAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 18,
scaleY: 22
});
menuBg.x = 1024;
menuBg.y = 1366;
menuBg.alpha = 0.95;
menuBg.tint = 0x330033;
// Title
var titleTxt = new Text2('VAMPIRE SKINS', {
size: 120,
fill: 0xFF0000
});
titleTxt.anchor.set(0.5, 0.5);
titleTxt.x = 1024;
titleTxt.y = 400;
self.addChild(titleTxt);
// Classic Dracula skin (default)
var classicBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
classicBtn.x = 1024;
classicBtn.y = 700;
classicBtn.tint = 0x8B0000;
var classicTxt = new Text2('Classic (Free)', {
size: 60,
fill: 0xFFFFFF
});
classicTxt.anchor.set(0.5, 0.5);
classicTxt.x = 1024;
classicTxt.y = 700;
self.addChild(classicTxt);
// Shadow Lord skin
var shadowBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
shadowBtn.x = 1024;
shadowBtn.y = 900;
shadowBtn.tint = 0x4B0082;
var shadowTxt = new Text2('Shadow Lord (500 blood)', {
size: 60,
fill: 0xFFFFFF
});
shadowTxt.anchor.set(0.5, 0.5);
shadowTxt.x = 1024;
shadowTxt.y = 900;
self.addChild(shadowTxt);
// Blood Baron skin
var baronBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
baronBtn.x = 1024;
baronBtn.y = 850;
baronBtn.tint = 0x8B0000;
var baronTxt = new Text2('Blood Baron (1000 blood)', {
size: 45,
fill: 0xFFFFFF
});
baronTxt.anchor.set(0.5, 0.5);
baronTxt.x = 1024;
baronTxt.y = 850;
self.addChild(baronTxt);
// Phantom Lord skin
var phantomBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
phantomBtn.x = 1024;
phantomBtn.y = 1000;
phantomBtn.tint = 0x191970;
var phantomTxt = new Text2('Phantom Lord (1500 blood)', {
size: 45,
fill: 0xFFFFFF
});
phantomTxt.anchor.set(0.5, 0.5);
phantomTxt.x = 1024;
phantomTxt.y = 1000;
self.addChild(phantomTxt);
// Ancient Vampire skin
var ancientBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
ancientBtn.x = 1024;
ancientBtn.y = 1150;
ancientBtn.tint = 0x2F4F4F;
var ancientTxt = new Text2('Ancient Vampire (2500 blood)', {
size: 45,
fill: 0xFFFFFF
});
ancientTxt.anchor.set(0.5, 0.5);
ancientTxt.x = 1024;
ancientTxt.y = 1150;
self.addChild(ancientTxt);
// Nightmare King skin
var nightmareBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
nightmareBtn.x = 1024;
nightmareBtn.y = 1300;
nightmareBtn.tint = 0x000000;
var nightmareTxt = new Text2('Nightmare King (3500 blood)', {
size: 45,
fill: 0xFFFFFF
});
nightmareTxt.anchor.set(0.5, 0.5);
nightmareTxt.x = 1024;
nightmareTxt.y = 1300;
self.addChild(nightmareTxt);
// Crimson Emperor skin
var crimsonBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
crimsonBtn.x = 1024;
crimsonBtn.y = 1450;
crimsonBtn.tint = 0xDC143C;
var crimsonTxt = new Text2('Crimson Emperor (5000 blood)', {
size: 45,
fill: 0xFFFFFF
});
crimsonTxt.anchor.set(0.5, 0.5);
crimsonTxt.x = 1024;
crimsonTxt.y = 1450;
self.addChild(crimsonTxt);
// Blood display
var bloodDisplayTxt = new Text2('Blood: ' + (storage.totalBlood || 0), {
size: 80,
fill: 0xFF0000
});
bloodDisplayTxt.anchor.set(0.5, 0.5);
bloodDisplayTxt.x = 1024;
bloodDisplayTxt.y = 550;
self.addChild(bloodDisplayTxt);
// Back button
var backBtn = self.attachAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
backBtn.x = 1024;
backBtn.y = 1500;
backBtn.tint = 0x666666;
var backTxt = new Text2('BACK', {
size: 60,
fill: 0xFFFFFF
});
backTxt.anchor.set(0.5, 0.5);
backTxt.x = 1024;
backTxt.y = 1400;
self.addChild(backTxt);
// Store button references
self.classicButton = classicBtn;
self.shadowButton = shadowBtn;
self.baronButton = baronBtn;
self.phantomButton = phantomBtn;
self.ancientButton = ancientBtn;
self.nightmareButton = nightmareBtn;
self.crimsonButton = crimsonBtn;
self.backButton = backBtn;
self.bloodDisplay = bloodDisplayTxt;
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;
});
var VampireBaron = Container.expand(function () {
var self = Container.call(this);
var baronGraphics = self.attachAsset('vampireBaron', {
anchorX: 0.5,
anchorY: 0.5
});
self.health = 20;
self.maxHealth = 20;
self.speed = 2;
self.direction = Math.random() * Math.PI * 2;
self.lastAttackTime = 0;
self.update = function () {
// Move towards Dracula
var dx = dracula.x - self.x;
var dy = dracula.y - self.y;
self.direction = Math.atan2(dy, dx);
self.x += Math.cos(self.direction) * self.speed;
self.y += Math.sin(self.direction) * self.speed;
// Attack with blood projectiles
if (gameTime - self.lastAttackTime > 120) {
spawnBossProjectile(self.x, self.y, dracula.x, dracula.y, 6);
self.lastAttackTime = gameTime;
}
// Health-based tint
var healthPercent = self.health / self.maxHealth;
baronGraphics.tint = healthPercent < 0.5 ? 0xFF0000 : 0x4B0000;
};
return self;
});
var VampireHunter = Container.expand(function () {
var self = Container.call(this);
var hunterGraphics = self.attachAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5
});
hunterGraphics.tint = 0x8B4513; // Brown color for hunter
hunterGraphics.scaleX = 0.8;
hunterGraphics.scaleY = 0.8;
self.health = 3;
self.lastShotTime = 0;
self.speed = 1 + Math.random() * 2;
self.direction = Math.random() * Math.PI * 2;
self.changeDirectionTime = 0;
self.update = function () {
// Change direction periodically
self.changeDirectionTime++;
if (self.changeDirectionTime > 120 + Math.random() * 120) {
self.direction = Math.random() * Math.PI * 2;
self.changeDirectionTime = 0;
}
// Move towards Dracula occasionally
if (Math.random() < 0.02) {
var dx = dracula.x - self.x;
var dy = dracula.y - self.y;
self.direction = Math.atan2(dy, dx);
}
// Move
self.x += Math.cos(self.direction) * self.speed;
self.y += Math.sin(self.direction) * self.speed;
// Keep within bounds
if (self.x < 60) {
self.x = 60;
self.direction = Math.random() * Math.PI * 2;
}
if (self.x > 1988) {
self.x = 1988;
self.direction = Math.random() * Math.PI * 2;
}
if (self.y < 60) {
self.y = 60;
self.direction = Math.random() * Math.PI * 2;
}
if (self.y > 2672) {
self.y = 2672;
self.direction = Math.random() * Math.PI * 2;
}
// Shoot at Dracula
if (gameTime - self.lastShotTime > 180 + Math.random() * 120) {
var distance = Math.sqrt(Math.pow(dracula.x - self.x, 2) + Math.pow(dracula.y - self.y, 2));
if (distance < 600) {
spawnHunterBullet(self.x, self.y, dracula.x, dracula.y);
self.lastShotTime = gameTime;
}
}
};
return self;
});
var VampireLordForm = Container.expand(function () {
var self = Container.call(this);
var lordGraphics = self.attachAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5
});
lordGraphics.scaleX = 2.0;
lordGraphics.scaleY = 2.0;
lordGraphics.tint = 0x8b0000;
self.life = 1800; // 30 seconds
self.auraRadius = 200;
// Create dark aura effect
var aura = self.attachAsset('bloodOrb', {
anchorX: 0.5,
anchorY: 0.5
});
aura.scaleX = 8;
aura.scaleY = 8;
aura.alpha = 0.3;
aura.tint = 0x4b0000;
self.update = function () {
self.x = dracula.x;
self.y = dracula.y;
self.life--;
aura.rotation += 0.05;
// Pulsing aura effect
aura.scaleX = 6 + 2 * Math.sin(gameTime * 0.1);
aura.scaleY = 6 + 2 * Math.sin(gameTime * 0.1);
// Damage nearby enemies
for (var h = vampireHunters.length - 1; h >= 0; h--) {
var hunter = vampireHunters[h];
var distance = Math.sqrt(Math.pow(hunter.x - self.x, 2) + Math.pow(hunter.y - self.y, 2));
if (distance < self.auraRadius) {
hunter.health -= 0.5;
if (hunter.health <= 0) {
hunter.destroy();
vampireHunters.splice(h, 1);
LK.setScore(LK.getScore() + 150);
}
}
}
if (self.life <= 0) {
self.destroy();
var index = abilities.indexOf(self);
if (index > -1) {
abilities.splice(index, 1);
}
}
};
return self;
});
var WeatherSystem = Container.expand(function () {
var self = Container.call(this);
self.weatherType = 'clear'; // 'clear', 'rain', 'fog', 'storm'
self.intensity = 0;
self.rainDrops = [];
self.fogParticles = [];
self.lightning = null;
self.weatherTimer = 0;
self.nextWeatherChange = 1800; // 30 seconds
self.changeWeather = function (newWeather) {
self.weatherType = newWeather;
self.weatherTimer = 0;
self.nextWeatherChange = 1200 + Math.random() * 1800; // 20-50 seconds
};
self.spawnRainDrop = function () {
var rainDrop = self.attachAsset('rainDrop', {
anchorX: 0.5,
anchorY: 0.5
});
rainDrop.x = Math.random() * 2200 - 100;
rainDrop.y = -50;
rainDrop.speedY = 8 + Math.random() * 4;
rainDrop.alpha = 0.6 + Math.random() * 0.4;
self.rainDrops.push(rainDrop);
};
self.spawnFogParticle = function () {
var fog = self.attachAsset('fogParticle', {
anchorX: 0.5,
anchorY: 0.5
});
fog.x = Math.random() * 2200 - 100;
fog.y = Math.random() * 2800 - 100;
fog.alpha = 0.1 + Math.random() * 0.15;
fog.speedX = (Math.random() - 0.5) * 2;
fog.life = 300 + Math.random() * 300;
self.fogParticles.push(fog);
};
self.createLightning = function () {
if (self.lightning) {
self.lightning.destroy();
}
self.lightning = self.attachAsset('lightning', {
anchorX: 0.5,
anchorY: 0
});
self.lightning.x = Math.random() * 2048;
self.lightning.y = 0;
self.lightning.life = 8;
LK.getSound('thunder').play();
LK.effects.flashScreen(0xffffff, 200);
};
self.update = function () {
self.weatherTimer++;
// Change weather periodically
if (self.weatherTimer >= self.nextWeatherChange) {
var weatherTypes = ['clear', 'rain', 'fog', 'storm'];
var newWeather = weatherTypes[Math.floor(Math.random() * weatherTypes.length)];
self.changeWeather(newWeather);
}
// Handle different weather types
if (self.weatherType === 'rain' || self.weatherType === 'storm') {
var rainChance = self.weatherType === 'storm' ? 0.8 : 0.4;
if (Math.random() < rainChance) {
self.spawnRainDrop();
}
}
if (self.weatherType === 'fog') {
if (Math.random() < 0.1) {
self.spawnFogParticle();
}
}
if (self.weatherType === 'storm' && Math.random() < 0.005) {
self.createLightning();
}
// Update rain drops
for (var r = self.rainDrops.length - 1; r >= 0; r--) {
var drop = self.rainDrops[r];
drop.y += drop.speedY;
if (drop.y > 2732) {
drop.destroy();
self.rainDrops.splice(r, 1);
}
}
// Update fog particles
for (var f = self.fogParticles.length - 1; f >= 0; f--) {
var fog = self.fogParticles[f];
fog.x += fog.speedX;
fog.life--;
fog.alpha = fog.life / 600 * 0.25;
if (fog.life <= 0 || fog.x < -200 || fog.x > 2248) {
fog.destroy();
self.fogParticles.splice(f, 1);
}
}
// Update lightning
if (self.lightning) {
self.lightning.life--;
if (self.lightning.life <= 0) {
self.lightning.destroy();
self.lightning = null;
}
}
};
return self;
});
var Werewolf = Container.expand(function () {
var self = Container.call(this);
var werewolfGraphics = self.attachAsset('werewolf', {
anchorX: 0.5,
anchorY: 0.5
});
self.health = 250;
self.maxHealth = 250;
self.form = 1; // 1st form
self.speed = 3;
self.direction = Math.random() * Math.PI * 2;
self.lastAttackTime = 0;
self.rageMode = false;
self.update = function () {
// Increase speed and aggression with each form
var formSpeed = self.speed + (self.form - 1) * 0.5;
// Chase player aggressively
var dx = dracula.x - self.x;
var dy = dracula.y - self.y;
self.direction = Math.atan2(dy, dx);
self.x += Math.cos(self.direction) * formSpeed;
self.y += Math.sin(self.direction) * formSpeed;
// Rage mode when health is low
if (self.health < self.maxHealth * 0.3 && !self.rageMode) {
self.rageMode = true;
werewolfGraphics.tint = 0xFF0000;
self.speed *= 1.5;
}
// Claw attack
if (gameTime - self.lastAttackTime > 60 - self.form * 10) {
// Create claw swipe effect
for (var i = 0; i < 3; i++) {
var angle = self.direction + (i - 1) * 0.3;
var clawX = self.x + Math.cos(angle) * 80;
var clawY = self.y + Math.sin(angle) * 80;
spawnBossProjectile(self.x, self.y, clawX, clawY, 10);
}
self.lastAttackTime = gameTime;
}
// Form transformation
var healthThresholds = [250, 400, 500, 750];
for (var f = 1; f < 5; f++) {
if (self.form === f && self.health <= 0) {
self.form = f + 1;
if (f < 4) {
self.health = healthThresholds[f];
self.maxHealth = healthThresholds[f];
werewolfGraphics.scaleX = 1 + f * 0.2;
werewolfGraphics.scaleY = 1 + f * 0.2;
werewolfGraphics.tint = self.rageMode ? 0xFF0000 : 0x654321 - f * 0x111111;
}
break;
}
}
};
return self;
});
/****
* Initialize Game
****/
var game = new LK.Game({
backgroundColor: 0x000000
});
/****
* Game Code
****/
// Game state variables
var gameState = 'mainmenu'; // 'mainmenu', 'playing', 'skinmenu'
var currentSkin = storage.currentSkin || 'classic';
var mainMenu;
var skinMenu;
// Game variables
var dracula;
var bloodOrbs = [];
var rareBloodOrbs = [];
var sunlightRays = [];
var powerOrbs = [];
var batParticles = [];
var bloodTrails = [];
var vampireHunters = [];
var hunterBullets = [];
var arrows = [];
var coins = [];
var gameTime = 0;
var showingStore = false;
var playerCoins = storage.playerCoins || 0;
var playerSpeed = storage.playerSpeed || 1;
var playerShield = storage.playerShield || 0;
var totalBlood = storage.totalBlood || 0;
var lastCoinSpawn = 0;
var lastHunterSpawn = 0;
var lastBloodSpawn = 0;
var lastRareBloodSpawn = 0;
var lastSunlightSpawn = 0;
var lastPowerSpawn = 0;
var lastBatSpawn = 0;
var lastTrailSpawn = 0;
var dragNode = null;
var isGameOver = false;
var highScore = storage.draculaHighScore || 0;
var combo = 0;
var lastCollectTime = 0;
var lastDraculaX = 0;
var lastDraculaY = 0;
// Bloody moon variables
var bloodyMoonActive = false;
var bloodyMoonStartTime = 0;
var bloodyMoonNextTime = 3600; // 60 seconds at 60fps
var bloodyMoonTxt;
// New game features
var currentWave = 1;
var waveTimer = 0;
var waveActive = false;
var bosses = [];
var bossProjectiles = [];
var orbMonsters = [];
var abilities = [];
var summonedBats = [];
// Enhanced Dracula abilities with new powers
var draculaAbilities = {
shadowStrike: {
unlocked: false,
level: 0,
cooldown: 0
},
bloodShield: {
unlocked: false,
level: 0,
cooldown: 0
},
batSwarm: {
unlocked: false,
level: 0,
cooldown: 0
},
teleport: {
unlocked: false,
level: 0,
cooldown: 0
},
vampiricDrain: {
unlocked: false,
level: 0,
cooldown: 0
},
lordTransformation: {
unlocked: false,
level: 0,
cooldown: 0
},
bloodFrenzy: {
unlocked: false,
level: 0,
cooldown: 0
},
vampireDash: {
unlocked: false,
level: 0,
cooldown: 0
},
shadowClone: {
unlocked: false,
level: 0,
cooldown: 0
},
bloodStorm: {
unlocked: false,
level: 0,
cooldown: 0
}
};
// Materials system
var materials = {
shadowEssence: storage.shadowEssence || 0,
bloodCrystal: storage.bloodCrystal || 0,
moonstone: storage.moonstone || 0,
soulShard: storage.soulShard || 0,
nightmareFragment: storage.nightmareFragment || 0
};
var materialNames = ['Shadow Essence', 'Blood Crystal', 'Moonstone', 'Soul Shard', 'Nightmare Fragment'];
// Ability menu system
var showingAbilityMenu = false;
var abilityMenuUI;
// Boss spawn system
var nextBossSpawnTime = 6000; // First boss at 100 seconds (6000 frames)
var bossSpawnCounter = 0;
// Initialize main menu
mainMenu = game.addChild(new MainMenu());
skinMenu = new SkinMenu();
// Initialize game UI variables (hidden initially)
var moon, scoreTxt, highScoreTxt, comboTxt, timeTxt, invulnTxt, coinTxt;
var storeBtn, storeTxt, storeUI, storeBg, storeTitle;
var speedBtn, speedBtnTxt, shieldBtn, shieldBtnTxt, closeBtn, closeBtnTxt;
var dracula;
function initializeGameUI() {
// Create enhanced atmospheric background with animations
var backgroundLayer1 = LK.getAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 25,
scaleY: 30,
x: 1024,
y: 1366,
alpha: 0.15
});
backgroundLayer1.tint = 0x000033; // Dark blue tint
game.addChild(backgroundLayer1);
// Animate background layer with subtle breathing effect
tween(backgroundLayer1, {
alpha: 0.25
}, {
duration: 8000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(backgroundLayer1, {
alpha: 0.15
}, {
duration: 8000,
easing: tween.easeInOut
});
}
});
var backgroundLayer2 = LK.getAsset('moon', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 15,
scaleY: 20,
x: 1024,
y: 1366,
alpha: 0.08
});
backgroundLayer2.tint = 0x330066; // Dark purple tint
game.addChild(backgroundLayer2);
// Create floating mystical orbs in background
for (var o = 0; o < 12; o++) {
var mysticalOrb = LK.getAsset('bloodOrb', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 2 + Math.random() * 3,
scaleY: 2 + Math.random() * 3,
x: Math.random() * 2048,
y: Math.random() * 2732,
alpha: 0.05 + Math.random() * 0.03
});
mysticalOrb.tint = [0x4B0082, 0x8B0000, 0x191970, 0x2F4F4F][Math.floor(Math.random() * 4)];
game.addChild(mysticalOrb);
// Animate floating orbs
tween(mysticalOrb, {
y: mysticalOrb.y - 100 - Math.random() * 200,
x: mysticalOrb.x + (Math.random() - 0.5) * 400,
rotation: Math.PI * 2
}, {
duration: 15000 + Math.random() * 10000,
easing: tween.easeInOut,
onFinish: function onFinish() {
mysticalOrb.y = 2900;
mysticalOrb.x = Math.random() * 2048;
}
});
}
// Add subtle texture pattern with animation
for (var i = 0; i < 12; i++) {
var texturePatch = LK.getAsset('bat', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 8 + Math.random() * 4,
scaleY: 8 + Math.random() * 4,
x: Math.random() * 2048,
y: Math.random() * 2732,
alpha: 0.03 + Math.random() * 0.02
});
texturePatch.tint = 0x1a1a2e;
game.addChild(texturePatch);
// Animate texture patches with subtle movement
tween(texturePatch, {
rotation: Math.PI * 2,
alpha: texturePatch.alpha * 1.5
}, {
duration: 20000 + Math.random() * 15000,
easing: tween.easeLinear,
onFinish: function onFinish() {
texturePatch.rotation = 0;
tween(texturePatch, {
alpha: texturePatch.alpha * 0.5
}, {
duration: 10000,
easing: tween.easeInOut
});
}
});
}
// Create animated star field
for (var s = 0; s < 25; s++) {
var star = LK.getAsset('coin', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 0.1 + Math.random() * 0.2,
scaleY: 0.1 + Math.random() * 0.2,
x: Math.random() * 2048,
y: Math.random() * 2732,
alpha: 0.3 + Math.random() * 0.4
});
star.tint = 0xFFFFFF;
game.addChild(star);
// Twinkling star animation
tween(star, {
alpha: 0.1
}, {
duration: 2000 + Math.random() * 3000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(star, {
alpha: 0.8
}, {
duration: 2000 + Math.random() * 3000,
easing: tween.easeInOut
});
}
});
}
// Add moon decoration
moon = LK.getAsset('moon', {
anchorX: 0.5,
anchorY: 0.5,
x: 1700,
y: 300,
alpha: 0.7
});
game.addChild(moon);
// Create score display
scoreTxt = new Text2('Blood: 0', {
size: 120,
fill: 0xFF0000
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
// Create high score display
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
comboTxt = new Text2('', {
size: 100,
fill: 0xFF00FF
});
comboTxt.anchor.set(0.5, 0.5);
LK.gui.center.addChild(comboTxt);
comboTxt.alpha = 0;
// Create time survived display
timeTxt = new Text2('Time: 0s', {
size: 80,
fill: 0xFFFFFF
});
timeTxt.anchor.set(0, 0);
timeTxt.x = 20;
timeTxt.y = 20;
LK.gui.topLeft.addChild(timeTxt);
// Create invulnerability indicator
invulnTxt = new Text2('INVULNERABLE', {
size: 90,
fill: 0x9900FF
});
invulnTxt.anchor.set(0.5, 1);
LK.gui.bottom.addChild(invulnTxt);
invulnTxt.alpha = 0;
// Create bloody moon indicator
bloodyMoonTxt = new Text2('BLOODY MOON RISING!', {
size: 120,
fill: 0x8B0000
});
bloodyMoonTxt.anchor.set(0.5, 0.5);
LK.gui.center.addChild(bloodyMoonTxt);
bloodyMoonTxt.alpha = 0;
// Create coin display
coinTxt = new Text2('Coins: ' + playerCoins, {
size: 80,
fill: 0xFFD700
});
coinTxt.anchor.set(0, 1);
coinTxt.x = 20;
coinTxt.y = -20;
LK.gui.bottomLeft.addChild(coinTxt);
// Create store button
storeBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
storeBtn.x = 1900;
storeBtn.y = 150;
game.addChild(storeBtn);
storeTxt = new Text2('STORE', {
size: 60,
fill: 0xFFFFFF
});
storeTxt.anchor.set(0.5, 0.5);
storeTxt.x = storeBtn.x;
storeTxt.y = storeBtn.y;
game.addChild(storeTxt);
// Create ability menu button
var abilityBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
abilityBtn.x = 1900;
abilityBtn.y = 300;
abilityBtn.scaleX = 0.8;
abilityBtn.scaleY = 0.8;
abilityBtn.tint = 0x9932CC;
game.addChild(abilityBtn);
var abilityBtnTxt = new Text2('ABILITIES', {
size: 45,
fill: 0xFFFFFF
});
abilityBtnTxt.anchor.set(0.5, 0.5);
abilityBtnTxt.x = abilityBtn.x;
abilityBtnTxt.y = abilityBtn.y;
game.addChild(abilityBtnTxt);
// Store UI (hidden initially)
storeUI = new Container();
storeUI.visible = false;
game.addChild(storeUI);
// Store background
storeBg = LK.getAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 15,
scaleY: 20
});
storeBg.x = 1024;
storeBg.y = 1366;
storeBg.alpha = 0.9;
storeBg.tint = 0x000080;
storeUI.addChild(storeBg);
// Store title
storeTitle = new Text2('🏪 VAMPIRE STORE', {
size: 130,
fill: 0xFF0000
});
storeTitle.anchor.set(0.5, 0.5);
storeTitle.x = 1024;
storeTitle.y = 350;
storeUI.addChild(storeTitle);
// Blood display in store
var storeBloodTxt = new Text2('Blood: ' + (storage.totalBlood || 0), {
size: 90,
fill: 0xFF4444
});
storeBloodTxt.anchor.set(0.5, 0.5);
storeBloodTxt.x = 1024;
storeBloodTxt.y = 450;
storeUI.addChild(storeBloodTxt);
// Speed upgrade button
speedBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
speedBtn.x = 1024;
speedBtn.y = 800;
storeUI.addChild(speedBtn);
speedBtnTxt = new Text2('Speed Up (50 coins)', {
size: 50,
fill: 0xFFFFFF
});
speedBtnTxt.anchor.set(0.5, 0.5);
speedBtnTxt.x = speedBtn.x;
speedBtnTxt.y = speedBtn.y;
storeUI.addChild(speedBtnTxt);
// Shield upgrade button
shieldBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
shieldBtn.x = 1024;
shieldBtn.y = 1000;
storeUI.addChild(shieldBtn);
shieldBtnTxt = new Text2('Shield (100 coins)', {
size: 50,
fill: 0xFFFFFF
});
shieldBtnTxt.anchor.set(0.5, 0.5);
shieldBtnTxt.x = shieldBtn.x;
shieldBtnTxt.y = shieldBtn.y;
storeUI.addChild(shieldBtnTxt);
// Close store button
closeBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
closeBtn.x = 1024;
closeBtn.y = 1200;
storeUI.addChild(closeBtn);
closeBtnTxt = new Text2('CLOSE', {
size: 50,
fill: 0xFFFFFF
});
closeBtnTxt.anchor.set(0.5, 0.5);
closeBtnTxt.x = closeBtn.x;
closeBtnTxt.y = closeBtn.y;
storeUI.addChild(closeBtnTxt);
// Create Dracula
dracula = game.addChild(new Dracula());
dracula.x = 1024;
dracula.y = 1366;
lastDraculaX = dracula.x;
lastDraculaY = dracula.y;
// Apply current skin
applySkin();
// Create movement UI
createMovementUI();
// Create weather system
var weatherSystem = new WeatherSystem();
game.addChild(weatherSystem);
// Start ambient music
LK.playMusic('nightAmbient');
}
function applySkin() {
if (!dracula) return;
var draculaGraphics = dracula.children[0];
switch (currentSkin) {
case 'classic':
draculaGraphics.tint = 0x8b0000;
playerSpeed = storage.playerSpeed || 1;
break;
case 'shadow':
draculaGraphics.tint = 0x4B0082;
playerSpeed = (storage.playerSpeed || 1) * 1.5; // 50% faster
break;
case 'baron':
draculaGraphics.tint = 0xDC143C;
playerSpeed = storage.playerSpeed || 1;
break;
case 'phantom':
draculaGraphics.tint = 0x191970;
draculaGraphics.alpha = 0.7; // Semi-transparent
playerSpeed = storage.playerSpeed || 1;
break;
case 'ancient':
draculaGraphics.tint = 0x2F4F4F;
draculaGraphics.scaleX = 1.2;
draculaGraphics.scaleY = 1.2;
playerSpeed = storage.playerSpeed || 1;
break;
case 'nightmare':
draculaGraphics.tint = 0x000000;
draculaGraphics.alpha = 0.8;
playerSpeed = (storage.playerSpeed || 1) * 1.8; // 80% faster
break;
case 'crimson':
draculaGraphics.tint = 0xDC143C;
draculaGraphics.scaleX = 1.3;
draculaGraphics.scaleY = 1.3;
playerSpeed = (storage.playerSpeed || 1) * 2.0; // Double speed
break;
}
}
// 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);
}
// Spawn rare blood orbs
function spawnRareBloodOrb() {
var rareOrb = new RareBloodOrb();
rareOrb.x = Math.random() * 1800 + 124;
rareOrb.y = Math.random() * 2400 + 124;
rareBloodOrbs.push(rareOrb);
game.addChild(rareOrb);
}
// Spawn blood trail
function spawnBloodTrail() {
var trail = new BloodTrail();
trail.x = dracula.x;
trail.y = dracula.y;
bloodTrails.push(trail);
game.addChild(trail);
}
// Spawn vampire hunters
function spawnVampireHunter() {
var hunter = new VampireHunter();
// Spawn at random edge of screen
var edge = Math.floor(Math.random() * 4);
switch (edge) {
case 0:
hunter.x = Math.random() * 2048;
hunter.y = 0;
break;
case 1:
hunter.x = 2048;
hunter.y = Math.random() * 2732;
break;
case 2:
hunter.x = Math.random() * 2048;
hunter.y = 2732;
break;
case 3:
hunter.x = 0;
hunter.y = Math.random() * 2732;
break;
}
vampireHunters.push(hunter);
game.addChild(hunter);
}
// Spawn hunter bullets
function spawnHunterBullet(fromX, fromY, toX, toY) {
var bullet = new HunterBullet();
bullet.x = fromX;
bullet.y = fromY;
var distance = Math.sqrt(Math.pow(toX - fromX, 2) + Math.pow(toY - fromY, 2));
bullet.speedX = (toX - fromX) / distance * 8;
bullet.speedY = (toY - fromY) / distance * 8;
hunterBullets.push(bullet);
game.addChild(bullet);
}
// Spawn coins
function spawnCoin() {
var coin = LK.getAsset('coin', {
anchorX: 0.5,
anchorY: 0.5
});
coin.x = Math.random() * 1800 + 124;
coin.y = Math.random() * 2400 + 124;
coins.push(coin);
game.addChild(coin);
}
// Spawn boss functions
function spawnVampireBaron() {
var baron = new VampireBaron();
baron.x = Math.random() * 1800 + 124;
baron.y = Math.random() * 1200 + 124;
bosses.push(baron);
game.addChild(baron);
LK.getSound('bossSpawn').play();
}
function spawnBigDraculaBaron() {
var bigBaron = new BigDraculaBaron();
bigBaron.x = 1024;
bigBaron.y = 300;
bosses.push(bigBaron);
game.addChild(bigBaron);
LK.getSound('bossSpawn').play();
}
function spawnWerewolf() {
var werewolf = new Werewolf();
werewolf.x = Math.random() * 1800 + 124;
werewolf.y = Math.random() * 1200 + 124;
bosses.push(werewolf);
game.addChild(werewolf);
LK.getSound('bossSpawn').play();
}
function spawnOrbMonster() {
var orbMonster = new OrbMonster();
orbMonster.x = Math.random() * 1800 + 124;
orbMonster.y = Math.random() * 2400 + 124;
orbMonsters.push(orbMonster);
game.addChild(orbMonster);
}
function spawnBossProjectile(fromX, fromY, toX, toY, speed) {
var projectile = new BossProjectile();
projectile.x = fromX;
projectile.y = fromY;
var distance = Math.sqrt(Math.pow(toX - fromX, 2) + Math.pow(toY - fromY, 2));
projectile.speedX = (toX - fromX) / distance * speed;
projectile.speedY = (toY - fromY) / distance * speed;
bossProjectiles.push(projectile);
game.addChild(projectile);
}
// Enhanced ability functions with better visual effects
function useShadowStrike() {
if (draculaAbilities.shadowStrike.cooldown > 0) return;
// Create multiple shadow strikes in a pattern
for (var i = 0; i < 5; i++) {
var strike = new ShadowStrike();
var angle = Math.PI * 2 * i / 5;
strike.x = dracula.x + Math.cos(angle) * (80 + i * 20);
strike.y = dracula.y + Math.sin(angle) * (80 + i * 20);
strike.damage = 75 + draculaAbilities.shadowStrike.level * 25;
abilities.push(strike);
game.addChild(strike);
// Animate strike appearance
tween(strike, {
scaleX: 3,
scaleY: 3,
alpha: 0
}, {
duration: 800,
easing: tween.easeOut
});
}
draculaAbilities.shadowStrike.cooldown = 240; // 4 second cooldown
LK.getSound('abilityUse').play();
LK.effects.flashScreen(0x4B0082, 300);
}
function useBloodShield() {
if (draculaAbilities.bloodShield.cooldown > 0) return;
var shield = new BloodShield();
shield.life = 900 + draculaAbilities.bloodShield.level * 300; // Longer duration with level
abilities.push(shield);
game.addChild(shield);
// Enhanced shield visual effect
var shieldGraphics = shield.children[0];
tween(shieldGraphics, {
scaleX: 1.5,
scaleY: 1.5,
alpha: 0.8
}, {
duration: 500,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(shieldGraphics, {
scaleX: 1.0,
scaleY: 1.0,
alpha: 0.6
}, {
duration: 500,
easing: tween.easeIn
});
}
});
draculaAbilities.bloodShield.cooldown = 720; // 12 second cooldown
LK.getSound('abilityUse').play();
}
function useBatSwarm() {
if (draculaAbilities.batSwarm.cooldown > 0) return;
// Enhanced bat summon with killer bats
var numBats = 8 + draculaAbilities.batSwarm.level * 3;
for (var i = 0; i < numBats; i++) {
var angle = Math.PI * 2 * i / numBats;
var bat = new Bat();
bat.x = dracula.x + Math.cos(angle) * (80 + Math.random() * 40);
bat.y = dracula.y + Math.sin(angle) * (80 + Math.random() * 40);
bat.damage = 25 + draculaAbilities.batSwarm.level * 10;
bat.life = 300 + draculaAbilities.batSwarm.level * 120;
summonedBats.push(bat);
game.addChild(bat);
// Animate bat spawn
tween(bat, {
scaleX: 1.3,
scaleY: 1.3
}, {
duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(bat, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 200,
easing: tween.easeIn
});
}
});
}
// Also spawn visual bat particles for effect
var numParticles = 6;
for (var p = 0; p < numParticles; p++) {
var angle = Math.PI * 2 * p / numParticles;
var particle = new BatParticle();
particle.x = dracula.x + Math.cos(angle) * (60 + Math.random() * 40);
particle.y = dracula.y + Math.sin(angle) * (60 + Math.random() * 40);
particle.speedX = Math.cos(angle) * (4 + Math.random() * 2);
particle.speedY = Math.sin(angle) * (4 + Math.random() * 2);
particle.life = 180;
batParticles.push(particle);
game.addChild(particle);
}
draculaAbilities.batSwarm.cooldown = 600; // 10 second cooldown
LK.getSound('abilityUse').play();
}
function useTeleport() {
if (draculaAbilities.teleport.cooldown > 0) return;
// Enhanced teleport with particle effects
var oldX = dracula.x;
var oldY = dracula.y;
// Create teleport out effect
for (var p = 0; p < 8; p++) {
var particle = LK.getAsset('teleport', {
anchorX: 0.5,
anchorY: 0.5,
x: oldX,
y: oldY
});
game.addChild(particle);
var angle = Math.PI * 2 * p / 8;
tween(particle, {
x: oldX + Math.cos(angle) * 120,
y: oldY + Math.sin(angle) * 120,
alpha: 0,
scaleX: 0.5,
scaleY: 0.5
}, {
duration: 600,
easing: tween.easeOut,
onFinish: function onFinish() {
particle.destroy();
}
});
}
// Teleport to safer location
var attempts = 0;
var newX, newY, safeDistance;
do {
newX = Math.random() * 1800 + 124;
newY = Math.random() * 2400 + 124;
safeDistance = true;
// Check distance from enemies
for (var h = 0; h < vampireHunters.length; h++) {
var distance = Math.sqrt(Math.pow(vampireHunters[h].x - newX, 2) + Math.pow(vampireHunters[h].y - newY, 2));
if (distance < 300) {
safeDistance = false;
break;
}
}
attempts++;
} while (!safeDistance && attempts < 20);
dracula.x = newX;
dracula.y = newY;
// Create teleport in effect
for (var p = 0; p < 8; p++) {
var particle = LK.getAsset('teleport', {
anchorX: 0.5,
anchorY: 0.5,
x: newX + Math.cos(Math.PI * 2 * p / 8) * 120,
y: newY + Math.sin(Math.PI * 2 * p / 8) * 120,
alpha: 0,
scaleX: 0.5,
scaleY: 0.5
});
game.addChild(particle);
tween(particle, {
x: newX,
y: newY,
alpha: 1,
scaleX: 1,
scaleY: 1
}, {
duration: 600,
easing: tween.easeIn,
onFinish: function onFinish() {
particle.destroy();
}
});
}
LK.effects.flashObject(dracula, 0x9932cc, 800);
draculaAbilities.teleport.cooldown = 900; // 15 second cooldown
LK.getSound('abilityUse').play();
}
function useLordTransformation() {
if (draculaAbilities.lordTransformation.cooldown > 0) return;
var lordForm = new VampireLordForm();
lordForm.life = 2400 + draculaAbilities.lordTransformation.level * 600; // Longer with level
abilities.push(lordForm);
game.addChild(lordForm);
// Enhanced transformation effects
var draculaGraphics = dracula.children[0];
tween(draculaGraphics, {
scaleX: 2.5,
scaleY: 2.5,
tint: 0x8B0000
}, {
duration: 1000,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(draculaGraphics, {
scaleX: 1.8,
scaleY: 1.8
}, {
duration: 1000,
easing: tween.easeIn
});
}
});
// Boost player stats
dracula.invulnerable = true;
dracula.invulnerabilityTime = lordForm.life;
var originalSpeed = playerSpeed;
playerSpeed *= 4; // Quadruple speed
// Restore stats when transformation ends
LK.setTimeout(function () {
playerSpeed = originalSpeed;
tween(draculaGraphics, {
scaleX: 1.0,
scaleY: 1.0,
tint: 0x8B0000
}, {
duration: 1000,
easing: tween.easeInOut
});
}, lordForm.life * 16.67); // Convert frames to milliseconds
draculaAbilities.lordTransformation.cooldown = 2700; // 45 second cooldown
LK.getSound('abilityUse').play();
LK.effects.flashScreen(0x8B0000, 1500);
}
// New enhanced abilities
function useBloodFrenzy() {
if (draculaAbilities.bloodFrenzy && draculaAbilities.bloodFrenzy.cooldown > 0) return;
// Create blood tornado effect around Dracula
for (var i = 0; i < 16; i++) {
var bloodDrop = LK.getAsset('bloodOrb', {
anchorX: 0.5,
anchorY: 0.5,
x: dracula.x,
y: dracula.y,
scaleX: 0.5,
scaleY: 0.5
});
game.addChild(bloodDrop);
var angle = Math.PI * 2 * i / 16;
var radius = 100 + i * 10;
tween(bloodDrop, {
x: dracula.x + Math.cos(angle) * radius,
y: dracula.y + Math.sin(angle) * radius,
rotation: Math.PI * 4,
scaleX: 1.5,
scaleY: 1.5
}, {
duration: 2000,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(bloodDrop, {
alpha: 0,
scaleX: 0.1,
scaleY: 0.1
}, {
duration: 500,
easing: tween.easeIn,
onFinish: function onFinish() {
bloodDrop.destroy();
}
});
}
});
}
// Damage all nearby enemies
for (var h = vampireHunters.length - 1; h >= 0; h--) {
var hunter = vampireHunters[h];
var distance = Math.sqrt(Math.pow(hunter.x - dracula.x, 2) + Math.pow(hunter.y - dracula.y, 2));
if (distance < 250) {
hunter.health -= 100;
LK.effects.flashObject(hunter, 0xFF0000, 400);
if (hunter.health <= 0) {
hunter.destroy();
vampireHunters.splice(h, 1);
LK.setScore(LK.getScore() + 200);
}
}
}
if (!draculaAbilities.bloodFrenzy) {
draculaAbilities.bloodFrenzy = {
unlocked: true,
level: 0,
cooldown: 0
};
}
draculaAbilities.bloodFrenzy.cooldown = 1800; // 30 second cooldown
LK.getSound('abilityUse').play();
}
function useVampireDash() {
if (draculaAbilities.vampireDash && draculaAbilities.vampireDash.cooldown > 0) return;
// Create dash trail effect
for (var t = 0; t < 10; t++) {
var trail = LK.getAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5,
x: dracula.x,
y: dracula.y,
scaleX: 0.8,
scaleY: 0.8,
alpha: 0.3 - t * 0.03
});
trail.tint = 0x8B0000;
game.addChild(trail);
tween(trail, {
alpha: 0,
scaleX: 0.3,
scaleY: 0.3
}, {
duration: 800,
easing: tween.easeOut,
onFinish: function onFinish() {
trail.destroy();
}
});
}
// Make Dracula temporarily invulnerable and super fast
dracula.invulnerable = true;
dracula.invulnerabilityTime = 180; // 3 seconds
var originalSpeed = playerSpeed;
playerSpeed *= 6;
LK.setTimeout(function () {
playerSpeed = originalSpeed;
}, 3000);
if (!draculaAbilities.vampireDash) {
draculaAbilities.vampireDash = {
unlocked: true,
level: 0,
cooldown: 0
};
}
draculaAbilities.vampireDash.cooldown = 600; // 10 second cooldown
LK.getSound('abilityUse').play();
}
// Game pause state
var gamePaused = false;
function toggleAbilityMenu() {
showingAbilityMenu = !showingAbilityMenu;
gamePaused = showingAbilityMenu; // Pause game when ability menu is open
if (showingAbilityMenu) {
// Create ability menu UI
abilityMenuUI = new Container();
game.addChild(abilityMenuUI);
// Menu background
var menuBg = LK.getAsset('dracula', {
anchorX: 0.5,
anchorY: 0.5,
scaleX: 18,
scaleY: 22
});
menuBg.x = 1024;
menuBg.y = 1366;
menuBg.alpha = 0.9;
menuBg.tint = 0x330066;
abilityMenuUI.addChild(menuBg);
// Title
var titleTxt = new Text2('DRACULA ABILITIES', {
size: 120,
fill: 0xFF0000
});
titleTxt.anchor.set(0.5, 0.5);
titleTxt.x = 1024;
titleTxt.y = 400;
abilityMenuUI.addChild(titleTxt);
// Instructions
var instructionsTxt = new Text2('Press H, J, K, L to use abilities | F to close', {
size: 60,
fill: 0xFFFFFF
});
instructionsTxt.anchor.set(0.5, 0.5);
instructionsTxt.x = 1024;
instructionsTxt.y = 500;
abilityMenuUI.addChild(instructionsTxt);
// Enhanced ability displays with better organization
var yPos = 600;
var abilities = [{
name: 'Shadow Strike (H)',
ability: 'shadowStrike',
desc: 'Multi-hit area damage',
tier: 1
}, {
name: 'Blood Shield (J)',
ability: 'bloodShield',
desc: 'Enhanced protection',
tier: 1
}, {
name: 'Bat Swarm (K)',
ability: 'batSwarm',
desc: 'Intelligent bat allies',
tier: 1
}, {
name: 'Teleport (L)',
ability: 'teleport',
desc: 'Safe displacement',
tier: 2
}, {
name: 'Lord Form (Shift+H)',
ability: 'lordTransformation',
desc: 'Ultimate vampire power',
tier: 3
}, {
name: 'Blood Frenzy (Shift+J)',
ability: 'bloodFrenzy',
desc: 'Devastating tornado attack',
tier: 2
}, {
name: 'Vampire Dash (Shift+K)',
ability: 'vampireDash',
desc: 'Lightning fast movement',
tier: 2
}];
// Create tier sections
var tierTitles = ['BASIC ABILITIES', 'ADVANCED ABILITIES', 'MASTER ABILITIES'];
var currentTier = -1;
for (var i = 0; i < abilities.length; i++) {
var ability = abilities[i];
// Add tier title if this is a new tier
if (ability.tier !== currentTier) {
currentTier = ability.tier;
var tierTitle = new Text2(tierTitles[currentTier - 1], {
size: 60,
fill: 0xFFD700
});
tierTitle.anchor.set(0.5, 0.5);
tierTitle.x = 1024;
tierTitle.y = yPos;
abilityMenuUI.addChild(tierTitle);
yPos += 80;
}
var unlocked = draculaAbilities[ability.ability].unlocked;
var cooldown = draculaAbilities[ability.ability].cooldown;
var level = draculaAbilities[ability.ability].level;
var statusColor = unlocked ? cooldown > 0 ? 0x888888 : 0x00FF00 : 0x666666;
var abilityTxt = new Text2(ability.name + ' - ' + ability.desc + (unlocked ? ' [Lv.' + (level + 1) + ']' : ' [LOCKED]'), {
size: 45,
fill: statusColor
});
abilityTxt.anchor.set(0.5, 0.5);
abilityTxt.x = 1024;
abilityTxt.y = yPos;
abilityMenuUI.addChild(abilityTxt);
if (unlocked && cooldown > 0) {
var cooldownTxt = new Text2('Cooldown: ' + Math.ceil(cooldown / 60) + 's', {
size: 35,
fill: 0xFF8888
});
cooldownTxt.anchor.set(0.5, 0.5);
cooldownTxt.x = 1024;
cooldownTxt.y = yPos + 40;
abilityMenuUI.addChild(cooldownTxt);
yPos += 75;
} else {
yPos += 65;
}
}
// Add pause indicator
var pauseIndicator = new Text2('⏸ GAME PAUSED - VAMPIRE PROTECTED ⏸', {
size: 70,
fill: 0xFFFF00
});
pauseIndicator.anchor.set(0.5, 0.5);
pauseIndicator.x = 1024;
pauseIndicator.y = 350;
abilityMenuUI.addChild(pauseIndicator);
// Animate pause indicator
tween(pauseIndicator, {
alpha: 0.3
}, {
duration: 1000,
easing: tween.easeInOut,
onFinish: function onFinish() {
tween(pauseIndicator, {
alpha: 1.0
}, {
duration: 1000,
easing: tween.easeInOut
});
}
});
// Add ability action buttons
var buttonY = 1400;
var shadowBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
shadowBtn.x = 512;
shadowBtn.y = buttonY;
shadowBtn.scaleX = 0.8;
shadowBtn.scaleY = 0.8;
shadowBtn.tint = draculaAbilities.shadowStrike.unlocked ? 0x4b0082 : 0x666666;
abilityMenuUI.addChild(shadowBtn);
var shadowBtnTxt = new Text2('SHADOW (H)', {
size: 40,
fill: 0xFFFFFF
});
shadowBtnTxt.anchor.set(0.5, 0.5);
shadowBtnTxt.x = shadowBtn.x;
shadowBtnTxt.y = shadowBtn.y;
abilityMenuUI.addChild(shadowBtnTxt);
var shieldBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
shieldBtn.x = 768;
shieldBtn.y = buttonY;
shieldBtn.scaleX = 0.8;
shieldBtn.scaleY = 0.8;
shieldBtn.tint = draculaAbilities.bloodShield.unlocked ? 0xFF0000 : 0x666666;
abilityMenuUI.addChild(shieldBtn);
var shieldBtnTxt = new Text2('SHIELD (J)', {
size: 40,
fill: 0xFFFFFF
});
shieldBtnTxt.anchor.set(0.5, 0.5);
shieldBtnTxt.x = shieldBtn.x;
shieldBtnTxt.y = shieldBtn.y;
abilityMenuUI.addChild(shieldBtnTxt);
var batBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
batBtn.x = 1280;
batBtn.y = buttonY;
batBtn.scaleX = 0.8;
batBtn.scaleY = 0.8;
batBtn.tint = draculaAbilities.batSwarm.unlocked ? 0x8b4513 : 0x666666;
abilityMenuUI.addChild(batBtn);
var batBtnTxt = new Text2('BATS (K)', {
size: 40,
fill: 0xFFFFFF
});
batBtnTxt.anchor.set(0.5, 0.5);
batBtnTxt.x = batBtn.x;
batBtnTxt.y = batBtn.y;
abilityMenuUI.addChild(batBtnTxt);
var teleBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
teleBtn.x = 1536;
teleBtn.y = buttonY;
teleBtn.scaleX = 0.8;
teleBtn.scaleY = 0.8;
teleBtn.tint = draculaAbilities.teleport.unlocked ? 0x9932cc : 0x666666;
abilityMenuUI.addChild(teleBtn);
var teleBtnTxt = new Text2('TELEPORT (L)', {
size: 40,
fill: 0xFFFFFF
});
teleBtnTxt.anchor.set(0.5, 0.5);
teleBtnTxt.x = teleBtn.x;
teleBtnTxt.y = teleBtn.y;
abilityMenuUI.addChild(teleBtnTxt);
// Store button references for click detection
abilityMenuUI.shadowButton = shadowBtn;
abilityMenuUI.shieldButton = shieldBtn;
abilityMenuUI.batButton = batBtn;
abilityMenuUI.teleportButton = teleBtn;
// Materials display
var materialsTxt = new Text2('MATERIALS', {
size: 80,
fill: 0xFFD700
});
materialsTxt.anchor.set(0.5, 0.5);
materialsTxt.x = 1024;
materialsTxt.y = 1700;
abilityMenuUI.addChild(materialsTxt);
var materialYPos = 1800;
var materialKeys = Object.keys(materials);
for (var m = 0; m < materialKeys.length; m++) {
var matTxt = new Text2(materialNames[m] + ': ' + materials[materialKeys[m]], {
size: 50,
fill: 0xFFFFFF
});
matTxt.anchor.set(0.5, 0.5);
matTxt.x = 1024;
matTxt.y = materialYPos;
abilityMenuUI.addChild(matTxt);
materialYPos += 60;
}
} else {
// Close ability menu
if (abilityMenuUI) {
abilityMenuUI.destroy();
abilityMenuUI = null;
}
}
}
function manageWaves() {
waveTimer++;
// Start new wave every 30 seconds
if (waveTimer >= 1800) {
// 30 seconds at 60fps
currentWave++;
waveTimer = 0;
// Spawn bosses based on wave
if (currentWave % 5 === 0) {
// Every 5th wave
if (currentWave === 5) spawnVampireBaron();else if (currentWave === 10) spawnBigDraculaBaron();else if (currentWave === 15) spawnWerewolf();else {
// Mix of bosses for later waves
var bossType = Math.floor(Math.random() * 3);
if (bossType === 0) spawnVampireBaron();else if (bossType === 1) spawnBigDraculaBaron();else spawnWerewolf();
}
}
// Increase enemy spawn rates
lastHunterSpawn -= 60; // Spawn hunters more frequently
}
// Boss spawning every 100 seconds
if (gameTime >= nextBossSpawnTime) {
bossSpawnCounter++;
nextBossSpawnTime = gameTime + 6000; // Next boss in 100 seconds
// Determine boss type based on spawn count
if (bossSpawnCounter === 1) {
spawnVampireBaron();
} else if (bossSpawnCounter === 2) {
spawnBigDraculaBaron();
} else if (bossSpawnCounter === 3) {
spawnWerewolf();
} else {
// Cycle through boss types for subsequent spawns
var bossType = (bossSpawnCounter - 1) % 3;
if (bossType === 0) spawnVampireBaron();else if (bossType === 1) spawnBigDraculaBaron();else spawnWerewolf();
}
}
// Spawn orb monsters periodically
if (gameTime % 240 === 0) {
// Every 4 seconds
spawnOrbMonster();
}
}
// Handle dragging
function handleMove(x, y, obj) {
if (gameState === 'playing' && dragNode && !isGameOver && !showingStore && !showingAbilityMenu) {
// Convert screen coordinates to game coordinates properly
if (obj && obj.parent && obj.parent.toGlobal) {
var gamePosition = game.toLocal(obj.parent.toGlobal({
x: x,
y: y
}));
dragNode.x = gamePosition.x;
dragNode.y = gamePosition.y;
} else {
// Fallback to direct coordinates if parent is not available
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 (gameState === 'mainmenu') {
// Check play button
var playClickX = Math.abs(x - mainMenu.playButton.x);
var playClickY = Math.abs(y - mainMenu.playButton.y);
if (playClickX < 100 && playClickY < 40) {
gameState = 'playing';
mainMenu.destroy();
initializeGameUI();
return;
}
// Check skins button
var skinsClickX = Math.abs(x - mainMenu.skinsButton.x);
var skinsClickY = Math.abs(y - mainMenu.skinsButton.y);
if (skinsClickX < 100 && skinsClickY < 40) {
gameState = 'skinmenu';
mainMenu.destroy();
game.addChild(skinMenu);
return;
}
}
if (gameState === 'skinmenu') {
// Check classic skin button
var classicClickX = Math.abs(x - skinMenu.classicButton.x);
var classicClickY = Math.abs(y - skinMenu.classicButton.y);
if (classicClickX < 100 && classicClickY < 40) {
currentSkin = 'classic';
storage.currentSkin = currentSkin;
return;
}
// Check shadow skin button
var shadowClickX = Math.abs(x - skinMenu.shadowButton.x);
var shadowClickY = Math.abs(y - skinMenu.shadowButton.y);
if (shadowClickX < 100 && shadowClickY < 40 && totalBlood >= 500) {
currentSkin = 'shadow';
storage.currentSkin = currentSkin;
totalBlood -= 500;
storage.totalBlood = totalBlood;
return;
}
// Check baron skin button
var baronClickX = Math.abs(x - skinMenu.baronButton.x);
var baronClickY = Math.abs(y - skinMenu.baronButton.y);
if (baronClickX < 100 && baronClickY < 40 && totalBlood >= 1000) {
currentSkin = 'baron';
storage.currentSkin = currentSkin;
totalBlood -= 1000;
storage.totalBlood = totalBlood;
return;
}
// Check phantom skin button
var phantomClickX = Math.abs(x - skinMenu.phantomButton.x);
var phantomClickY = Math.abs(y - skinMenu.phantomButton.y);
if (phantomClickX < 100 && phantomClickY < 40 && totalBlood >= 1500) {
currentSkin = 'phantom';
storage.currentSkin = currentSkin;
totalBlood -= 1500;
storage.totalBlood = totalBlood;
return;
}
// Check ancient skin button
var ancientClickX = Math.abs(x - skinMenu.ancientButton.x);
var ancientClickY = Math.abs(y - skinMenu.ancientButton.y);
if (ancientClickX < 100 && ancientClickY < 40 && totalBlood >= 2500) {
currentSkin = 'ancient';
storage.currentSkin = currentSkin;
totalBlood -= 2500;
storage.totalBlood = totalBlood;
skinMenu.bloodDisplay.setText('Blood: ' + totalBlood);
return;
}
// Check nightmare skin button
var nightmareClickX = Math.abs(x - skinMenu.nightmareButton.x);
var nightmareClickY = Math.abs(y - skinMenu.nightmareButton.y);
if (nightmareClickX < 100 && nightmareClickY < 40 && totalBlood >= 3500) {
currentSkin = 'nightmare';
storage.currentSkin = currentSkin;
totalBlood -= 3500;
storage.totalBlood = totalBlood;
skinMenu.bloodDisplay.setText('Blood: ' + totalBlood);
return;
}
// Check crimson skin button
var crimsonClickX = Math.abs(x - skinMenu.crimsonButton.x);
var crimsonClickY = Math.abs(y - skinMenu.crimsonButton.y);
if (crimsonClickX < 100 && crimsonClickY < 40 && totalBlood >= 5000) {
currentSkin = 'crimson';
storage.currentSkin = currentSkin;
totalBlood -= 5000;
storage.totalBlood = totalBlood;
skinMenu.bloodDisplay.setText('Blood: ' + totalBlood);
return;
}
// Check back button
var backClickX = Math.abs(x - skinMenu.backButton.x);
var backClickY = Math.abs(y - skinMenu.backButton.y);
if (backClickX < 100 && backClickY < 40) {
gameState = 'mainmenu';
skinMenu.parent.removeChild(skinMenu);
mainMenu = game.addChild(new MainMenu());
return;
}
}
if (gameState === 'playing' && !isGameOver) {
// Handle ability menu clicks
if (showingAbilityMenu) {
// Check ability button clicks
if (abilityMenuUI && abilityMenuUI.shadowButton) {
var shadowClickX = Math.abs(x - abilityMenuUI.shadowButton.x);
var shadowClickY = Math.abs(y - abilityMenuUI.shadowButton.y);
if (shadowClickX < 80 && shadowClickY < 32) {
if (draculaAbilities.shadowStrike.unlocked) {
useShadowStrike();
}
toggleAbilityMenu();
return;
}
var shieldClickX = Math.abs(x - abilityMenuUI.shieldButton.x);
var shieldClickY = Math.abs(y - abilityMenuUI.shieldButton.y);
if (shieldClickX < 80 && shieldClickY < 32) {
if (draculaAbilities.bloodShield.unlocked) {
useBloodShield();
}
toggleAbilityMenu();
return;
}
var batClickX = Math.abs(x - abilityMenuUI.batButton.x);
var batClickY = Math.abs(y - abilityMenuUI.batButton.y);
if (batClickX < 80 && batClickY < 32) {
if (draculaAbilities.batSwarm.unlocked) {
useBatSwarm();
}
toggleAbilityMenu();
return;
}
var teleClickX = Math.abs(x - abilityMenuUI.teleportButton.x);
var teleClickY = Math.abs(y - abilityMenuUI.teleportButton.y);
if (teleClickX < 80 && teleClickY < 32) {
if (draculaAbilities.teleport.unlocked) {
useTeleport();
}
toggleAbilityMenu();
return;
}
}
return;
}
// Check store button click
if (storeBtn) {
var storeClickX = Math.abs(x - storeBtn.x);
var storeClickY = Math.abs(y - storeBtn.y);
if (storeClickX < 100 && storeClickY < 40) {
showingStore = !showingStore;
storeUI.visible = showingStore;
return;
}
}
// Check ability menu button click
var abilityClickX = Math.abs(x - 1900);
var abilityClickY = Math.abs(y - 300);
if (abilityClickX < 80 && abilityClickY < 32) {
toggleAbilityMenu();
return;
}
// Check store UI interactions
if (showingStore) {
// Update blood display in store
var storeBloodDisplay = storeUI.children.find(function (child) {
return child.text && child.text.indexOf('Blood:') === 0;
});
if (storeBloodDisplay) {
storeBloodDisplay.setText('Blood: ' + totalBlood);
}
// Speed upgrade
var speedClickX = Math.abs(x - speedBtn.x);
var speedClickY = Math.abs(y - speedBtn.y);
if (speedClickX < 100 && speedClickY < 40 && playerCoins >= 50) {
playerCoins -= 50;
playerSpeed += 0.2;
storage.playerCoins = playerCoins;
storage.playerSpeed = playerSpeed;
coinTxt.setText('Coins: ' + playerCoins);
LK.getSound('purchase').play();
}
// Shield upgrade
var shieldClickX = Math.abs(x - shieldBtn.x);
var shieldClickY = Math.abs(y - shieldBtn.y);
if (shieldClickX < 100 && shieldClickY < 40 && playerCoins >= 100) {
playerCoins -= 100;
playerShield++;
storage.playerCoins = playerCoins;
storage.playerShield = playerShield;
coinTxt.setText('Coins: ' + playerCoins);
LK.getSound('purchase').play();
}
// Close button
var closeClickX = Math.abs(x - closeBtn.x);
var closeClickY = Math.abs(y - closeBtn.y);
if (closeClickX < 100 && closeClickY < 40) {
showingStore = false;
storeUI.visible = false;
}
return;
}
// Check WASD movement button clicks
if (game.wButton) {
var wClickX = Math.abs(x - game.wButton.x);
var wClickY = Math.abs(y - game.wButton.y);
if (wClickX < 40 && wClickY < 40) {
moveUp = true;
game.wButton.tint = 0x00FF00;
return;
}
}
if (game.aButton) {
var aClickX = Math.abs(x - game.aButton.x);
var aClickY = Math.abs(y - game.aButton.y);
if (aClickX < 40 && aClickY < 40) {
moveLeft = true;
game.aButton.tint = 0x00FF00;
return;
}
}
if (game.sButton) {
var sClickX = Math.abs(x - game.sButton.x);
var sClickY = Math.abs(y - game.sButton.y);
if (sClickX < 40 && sClickY < 40) {
moveDown = true;
game.sButton.tint = 0x00FF00;
return;
}
}
if (game.dButton) {
var dClickX = Math.abs(x - game.dButton.x);
var dClickY = Math.abs(y - game.dButton.y);
if (dClickX < 40 && dClickY < 40) {
moveRight = true;
game.dButton.tint = 0x00FF00;
return;
}
}
if (dracula) {
dragNode = dracula;
handleMove(x, y, obj);
}
}
};
game.up = function (x, y, obj) {
dragNode = null;
// Reset movement buttons
if (game.wButton) {
moveUp = false;
game.wButton.tint = 0x444444;
}
if (game.aButton) {
moveLeft = false;
game.aButton.tint = 0x444444;
}
if (game.sButton) {
moveDown = false;
game.sButton.tint = 0x444444;
}
if (game.dButton) {
moveRight = false;
game.dButton.tint = 0x444444;
}
};
// Movement variables
var moveUp = false;
var moveDown = false;
var moveLeft = false;
var moveRight = false;
// Movement speed
var moveSpeed = 4;
// Function to handle WASD movement
function handleWASDMovement() {
if (gameState === 'playing' && dracula && !isGameOver && !showingStore && !showingAbilityMenu) {
var deltaX = 0;
var deltaY = 0;
if (moveUp) deltaY -= moveSpeed * playerSpeed;
if (moveDown) deltaY += moveSpeed * playerSpeed;
if (moveLeft) deltaX -= moveSpeed * playerSpeed;
if (moveRight) deltaX += moveSpeed * playerSpeed;
// Apply movement
dracula.x += deltaX;
dracula.y += deltaY;
// Keep Dracula within bounds
if (dracula.x < 60) dracula.x = 60;
if (dracula.x > 1988) dracula.x = 1988;
if (dracula.y < 60) dracula.y = 60;
if (dracula.y > 2672) dracula.y = 2672;
}
}
// Add movement buttons to the UI
function createMovementUI() {
// Create WASD movement buttons
var buttonSize = 80;
var buttonSpacing = 100;
var baseX = 150;
var baseY = 2500;
// W button (Up)
var wBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
wBtn.x = baseX;
wBtn.y = baseY;
wBtn.scaleX = 0.6;
wBtn.scaleY = 0.6;
wBtn.tint = 0x444444;
game.addChild(wBtn);
var wTxt = new Text2('W', {
size: 60,
fill: 0xFFFFFF
});
wTxt.anchor.set(0.5, 0.5);
wTxt.x = wBtn.x;
wTxt.y = wBtn.y;
game.addChild(wTxt);
// A button (Left)
var aBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
aBtn.x = baseX - buttonSpacing;
aBtn.y = baseY + buttonSpacing;
aBtn.scaleX = 0.6;
aBtn.scaleY = 0.6;
aBtn.tint = 0x444444;
game.addChild(aBtn);
var aTxt = new Text2('A', {
size: 60,
fill: 0xFFFFFF
});
aTxt.anchor.set(0.5, 0.5);
aTxt.x = aBtn.x;
aTxt.y = aBtn.y;
game.addChild(aTxt);
// S button (Down)
var sBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
sBtn.x = baseX;
sBtn.y = baseY + buttonSpacing;
sBtn.scaleX = 0.6;
sBtn.scaleY = 0.6;
sBtn.tint = 0x444444;
game.addChild(sBtn);
var sTxt = new Text2('S', {
size: 60,
fill: 0xFFFFFF
});
sTxt.anchor.set(0.5, 0.5);
sTxt.x = sBtn.x;
sTxt.y = sBtn.y;
game.addChild(sTxt);
// D button (Right)
var dBtn = LK.getAsset('storeButton', {
anchorX: 0.5,
anchorY: 0.5
});
dBtn.x = baseX + buttonSpacing;
dBtn.y = baseY + buttonSpacing;
dBtn.scaleX = 0.6;
dBtn.scaleY = 0.6;
dBtn.tint = 0x444444;
game.addChild(dBtn);
var dTxt = new Text2('D', {
size: 60,
fill: 0xFFFFFF
});
dTxt.anchor.set(0.5, 0.5);
dTxt.x = dBtn.x;
dTxt.y = dBtn.y;
game.addChild(dTxt);
// Store button references for click detection
game.wButton = wBtn;
game.aButton = aBtn;
game.sButton = sBtn;
game.dButton = dBtn;
}
game.update = function () {
if (gameState !== 'playing' || isGameOver) return;
// Skip all game logic if paused (ability menu open)
if (gamePaused) {
// Keep Dracula invulnerable while paused
if (dracula && !dracula.invulnerable) {
dracula.invulnerable = true;
dracula.pausedInvulnerability = true;
}
return;
}
// Restore invulnerability state when unpaused
if (dracula && dracula.pausedInvulnerability) {
dracula.invulnerable = false;
dracula.pausedInvulnerability = false;
}
gameTime++;
// Handle WASD movement
handleWASDMovement();
// Update time display
var timeSeconds = Math.floor(gameTime / 60);
timeTxt.setText('Time: ' + timeSeconds + 's');
// Enhanced Bloody Moon mechanics with phases
if (!bloodyMoonActive && gameTime >= bloodyMoonNextTime) {
bloodyMoonActive = true;
bloodyMoonStartTime = gameTime;
bloodyMoonNextTime = gameTime + 4800; // Next moon in 80 seconds
dracula.invulnerable = true;
dracula.invulnerabilityTime = 1200; // 20 seconds
moon.tint = 0x8B0000; // Make moon red
// Random moon phase effects
var moonPhase = Math.floor(Math.random() * 3);
if (moonPhase === 0) {
// Crimson Moon - Extra blood collection
bloodyMoonTxt.setText('CRIMSON MOON - TRIPLE BLOOD!');
} else if (moonPhase === 1) {
// Shadow Moon - All abilities cooldown reduced
bloodyMoonTxt.setText('SHADOW MOON - NO COOLDOWNS!');
for (var ability in draculaAbilities) {
draculaAbilities[ability].cooldown = 0;
}
} else {
// Eclipse Moon - Time slows for enemies
bloodyMoonTxt.setText('ECLIPSE MOON - TIME DISTORTION!');
}
tween(moon, {
scaleX: 1.8,
scaleY: 1.8
}, {
duration: 1000,
easing: tween.easeOut
});
bloodyMoonTxt.alpha = 1;
tween(bloodyMoonTxt, {
alpha: 0
}, {
duration: 4000
});
LK.effects.flashScreen(0x8B0000, 2000);
}
// End bloody moon after 20 seconds
if (bloodyMoonActive && gameTime >= bloodyMoonStartTime + 1200) {
bloodyMoonActive = false;
moon.tint = 0xF5F5DC; // Back to normal color
tween(moon, {
scaleX: 1.0,
scaleY: 1.0
}, {
duration: 1000,
easing: tween.easeIn
});
}
// Update invulnerability indicator
if (dracula.invulnerable) {
invulnTxt.alpha = 0.7 + 0.3 * Math.sin(gameTime * 0.3);
if (bloodyMoonActive) {
invulnTxt.setText('BLOODY MOON - INVULNERABLE');
invulnTxt.fill = 0x8B0000;
} else {
invulnTxt.setText('INVULNERABLE');
invulnTxt.fill = 0x9900FF;
}
} else {
invulnTxt.alpha = 0;
}
// Spawn blood orbs every 90-150 ticks (1.5-2.5 seconds)
if (gameTime - lastBloodSpawn > 90 + Math.random() * 60) {
spawnBloodOrb();
lastBloodSpawn = gameTime;
}
// Spawn rare blood orbs every 300-450 ticks (5-7.5 seconds)
if (gameTime - lastRareBloodSpawn > 300 + Math.random() * 150) {
spawnRareBloodOrb();
lastRareBloodSpawn = 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 blood trail when moving
var distanceMoved = Math.sqrt(Math.pow(dracula.x - lastDraculaX, 2) + Math.pow(dracula.y - lastDraculaY, 2));
if (distanceMoved > 20 && gameTime - lastTrailSpawn > 5) {
spawnBloodTrail();
lastTrailSpawn = gameTime;
}
lastDraculaX = dracula.x;
lastDraculaY = dracula.y;
// Play bat flap sound occasionally
if (gameTime % 180 === 0 && Math.random() < 0.3) {
LK.getSound('batFlap').play();
}
// Spawn coins every 120-180 ticks (2-3 seconds)
if (gameTime - lastCoinSpawn > 120 + Math.random() * 60) {
spawnCoin();
lastCoinSpawn = gameTime;
}
// Spawn vampire hunters every 600-900 ticks (10-15 seconds)
if (gameTime - lastHunterSpawn > 600 + Math.random() * 300) {
spawnVampireHunter();
lastHunterSpawn = 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;
// Apply bloody moon 10x boost
if (bloodyMoonActive) {
points *= 10;
}
// Combo system
if (gameTime - lastCollectTime < 120) {
combo++;
points += combo * 5;
} else {
combo = 0;
}
lastCollectTime = gameTime;
LK.setScore(LK.getScore() + points);
totalBlood += points;
storage.totalBlood = totalBlood;
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 rare blood orb collection
for (var r = rareBloodOrbs.length - 1; r >= 0; r--) {
var rareOrb = rareBloodOrbs[r];
if (dracula.intersects(rareOrb)) {
var points = rareOrb.value;
// Bonus for combo
if (gameTime - lastCollectTime < 120) {
combo++;
points += combo * 10;
} else {
combo = 0;
}
lastCollectTime = gameTime;
LK.setScore(LK.getScore() + points);
totalBlood += points;
storage.totalBlood = totalBlood;
scoreTxt.setText('Blood: ' + LK.getScore());
// Show special combo for rare orbs
comboTxt.setText('RARE! +' + points);
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 2000
});
LK.getSound('collectBlood').play();
LK.effects.flashObject(dracula, 0xFF6600, 500);
rareOrb.destroy();
rareBloodOrbs.splice(r, 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);
totalBlood += 50;
storage.totalBlood = totalBlood;
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.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);
}
}
// Clean up off-screen rare blood orbs
for (var m = rareBloodOrbs.length - 1; m >= 0; m--) {
var rareBloodOrb = rareBloodOrbs[m];
if (rareBloodOrb.y > 2800) {
rareBloodOrb.destroy();
rareBloodOrbs.splice(m, 1);
}
}
// Check coin collection
for (var c = coins.length - 1; c >= 0; c--) {
var coin = coins[c];
if (dracula.intersects(coin)) {
var coinValue = 5;
// Apply bloody moon 10x boost
if (bloodyMoonActive) {
coinValue *= 10;
}
playerCoins += coinValue;
storage.playerCoins = playerCoins;
coinTxt.setText('Coins: ' + playerCoins);
LK.getSound('coinCollect').play();
coin.destroy();
coins.splice(c, 1);
}
}
// Check hunter bullet collision with Dracula
if (!dracula.invulnerable) {
for (var h = hunterBullets.length - 1; h >= 0; h--) {
var bullet = hunterBullets[h];
if (dracula.intersects(bullet)) {
if (playerShield > 0) {
playerShield--;
storage.playerShield = playerShield;
LK.effects.flashObject(dracula, 0x0000FF, 300);
} else {
// Game over
if (LK.getScore() > highScore) {
storage.draculaHighScore = LK.getScore();
}
isGameOver = true;
LK.getSound('deathSound').play();
LK.effects.flashScreen(0xFF0000, 1500);
LK.setTimeout(function () {
LK.showGameOver();
}, 1000);
}
bullet.destroy();
hunterBullets.splice(h, 1);
break;
}
}
}
// Clean up off-screen hunters
for (var hunt = vampireHunters.length - 1; hunt >= 0; hunt--) {
var hunter = vampireHunters[hunt];
if (hunter.x < -100 || hunter.x > 2148 || hunter.y < -100 || hunter.y > 2832) {
hunter.destroy();
vampireHunters.splice(hunt, 1);
}
}
// Clean up off-screen coins
for (var co = coins.length - 1; co >= 0; co--) {
var coinObj = coins[co];
if (coinObj.y > 2800) {
coinObj.destroy();
coins.splice(co, 1);
}
}
// Check hunter collision with Dracula
for (var hunt = vampireHunters.length - 1; hunt >= 0; hunt--) {
var hunter = vampireHunters[hunt];
if (dracula.intersects(hunter)) {
// Hunter dies, player gets blood and coins
var bloodReward = 100;
var coinReward = 200;
// Apply bloody moon 10x boost
if (bloodyMoonActive) {
bloodReward *= 10;
coinReward *= 10;
}
LK.setScore(LK.getScore() + bloodReward);
totalBlood += bloodReward;
playerCoins += coinReward;
storage.totalBlood = totalBlood;
storage.playerCoins = playerCoins;
scoreTxt.setText('Blood: ' + LK.getScore());
coinTxt.setText('Coins: ' + playerCoins);
hunter.destroy();
vampireHunters.splice(hunt, 1);
LK.effects.flashObject(dracula, 0xFF0000, 300);
break;
}
}
// Check arrow collisions with Dracula
for (var a = arrows.length - 1; a >= 0; a--) {
var arrow = arrows[a];
if (dracula.intersects(arrow)) {
if (playerShield > 0) {
playerShield--;
storage.playerShield = playerShield;
LK.effects.flashObject(dracula, 0x0000FF, 300);
} else {
// Game over
if (LK.getScore() > highScore) {
storage.draculaHighScore = LK.getScore();
}
isGameOver = true;
LK.getSound('deathSound').play();
LK.effects.flashScreen(0xFF0000, 1500);
LK.setTimeout(function () {
LK.showGameOver();
}, 1000);
}
arrow.destroy();
arrows.splice(a, 1);
break;
}
}
// Manage waves and bosses
manageWaves();
// Update ability cooldowns
for (var ability in draculaAbilities) {
if (draculaAbilities[ability].cooldown > 0) {
draculaAbilities[ability].cooldown--;
}
}
// Dynamic difficulty scaling
var difficultyMultiplier = 1 + Math.floor(LK.getScore() / 1000) * 0.2; // Increase difficulty every 1000 points
var performanceBonus = combo > 5 ? 1.5 : 1.0;
// Auto-unlock abilities based on score
if (LK.getScore() >= 500 && !draculaAbilities.shadowStrike.unlocked) {
draculaAbilities.shadowStrike.unlocked = true;
comboTxt.setText('SHADOW STRIKE UNLOCKED!');
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 3000
});
}
if (LK.getScore() >= 1000 && !draculaAbilities.bloodShield.unlocked) {
draculaAbilities.bloodShield.unlocked = true;
comboTxt.setText('BLOOD SHIELD UNLOCKED!');
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 3000
});
}
if (LK.getScore() >= 2000 && !draculaAbilities.batSwarm.unlocked) {
draculaAbilities.batSwarm.unlocked = true;
comboTxt.setText('BAT SWARM UNLOCKED!');
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 3000
});
}
if (LK.getScore() >= 3000 && !draculaAbilities.teleport.unlocked) {
draculaAbilities.teleport.unlocked = true;
comboTxt.setText('TELEPORT UNLOCKED!');
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 3000
});
}
if (LK.getScore() >= 5000 && !draculaAbilities.lordTransformation.unlocked) {
draculaAbilities.lordTransformation.unlocked = true;
comboTxt.setText('VAMPIRE LORD FORM UNLOCKED!');
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 3000
});
}
// Auto-use abilities when available
if (draculaAbilities.shadowStrike.unlocked && draculaAbilities.shadowStrike.cooldown === 0) {
// Check if enemies are nearby
var enemiesNearby = vampireHunters.length > 0 || bosses.length > 0;
if (enemiesNearby && Math.random() < 0.1) {
// 10% chance per frame when enemies nearby
useShadowStrike();
}
}
// Auto-use lord transformation in critical situations
if (draculaAbilities.lordTransformation.unlocked && draculaAbilities.lordTransformation.cooldown === 0) {
var dangerLevel = vampireHunters.length + bosses.length + bossProjectiles.length;
if (dangerLevel > 8 && Math.random() < 0.05) {
useLordTransformation();
}
}
// Check boss collisions with Dracula abilities
for (var ability = abilities.length - 1; ability >= 0; ability--) {
var abilityObj = abilities[ability];
if (abilityObj.damage) {
// Check collision with bosses
for (var boss = bosses.length - 1; boss >= 0; boss--) {
var bossObj = bosses[boss];
if (abilityObj.intersects(bossObj)) {
bossObj.health -= abilityObj.damage;
LK.effects.flashObject(bossObj, 0xFF0000, 200);
if (bossObj.health <= 0 && bossObj.form !== undefined && bossObj.form < 5) {
// Boss transformation handled in boss update
} else if (bossObj.health <= 0) {
// Boss defeated - unlock and upgrade abilities
var bloodReward = 1000;
var materialReward = Math.floor(Math.random() * 5) + 3;
LK.setScore(LK.getScore() + bloodReward);
totalBlood += bloodReward;
storage.totalBlood = totalBlood;
// Give random material
var materialType = Math.floor(Math.random() * 5);
var materialKeys = Object.keys(materials);
materials[materialKeys[materialType]] += materialReward;
storage[materialKeys[materialType]] = materials[materialKeys[materialType]];
// Unlock or upgrade abilities based on boss type
var bossTypeName = bossObj.constructor.name;
if (bossTypeName === 'VampireBaron') {
if (!draculaAbilities.shadowStrike.unlocked) {
draculaAbilities.shadowStrike.unlocked = true;
comboTxt.setText('SHADOW STRIKE UNLOCKED!');
} else {
draculaAbilities.shadowStrike.level++;
comboTxt.setText('SHADOW STRIKE UPGRADED! Lv.' + (draculaAbilities.shadowStrike.level + 1));
}
} else if (bossTypeName === 'BigDraculaBaron') {
if (!draculaAbilities.lordTransformation.unlocked) {
draculaAbilities.lordTransformation.unlocked = true;
comboTxt.setText('VAMPIRE LORD FORM UNLOCKED!');
} else {
draculaAbilities.lordTransformation.level++;
comboTxt.setText('VAMPIRE LORD UPGRADED! Lv.' + (draculaAbilities.lordTransformation.level + 1));
}
} else if (bossTypeName === 'Werewolf') {
if (!draculaAbilities.batSwarm.unlocked) {
draculaAbilities.batSwarm.unlocked = true;
comboTxt.setText('BAT SWARM UNLOCKED!');
} else {
draculaAbilities.batSwarm.level++;
comboTxt.setText('BAT SWARM UPGRADED! Lv.' + (draculaAbilities.batSwarm.level + 1));
}
// Also unlock advanced abilities for werewolf defeats
if (!draculaAbilities.bloodFrenzy) {
draculaAbilities.bloodFrenzy = {
unlocked: true,
level: 0,
cooldown: 0
};
comboTxt.setText('BLOOD FRENZY UNLOCKED!');
} else if (!draculaAbilities.vampireDash) {
draculaAbilities.vampireDash = {
unlocked: true,
level: 0,
cooldown: 0
};
comboTxt.setText('VAMPIRE DASH UNLOCKED!');
}
}
comboTxt.alpha = 1;
tween(comboTxt, {
alpha: 0
}, {
duration: 4000
});
bossObj.destroy();
bosses.splice(boss, 1);
LK.effects.flashScreen(0x9900FF, 1000);
}
break;
}
}
}
}
// Check boss projectile collisions with Dracula
if (!dracula.invulnerable) {
for (var bp = bossProjectiles.length - 1; bp >= 0; bp--) {
var bossProjectile = bossProjectiles[bp];
if (dracula.intersects(bossProjectile)) {
if (playerShield > 0) {
playerShield--;
storage.playerShield = playerShield;
LK.effects.flashObject(dracula, 0x0000FF, 300);
} else {
// Game over
if (LK.getScore() > highScore) {
storage.draculaHighScore = LK.getScore();
}
isGameOver = true;
LK.getSound('deathSound').play();
LK.effects.flashScreen(0xFF0000, 1500);
LK.setTimeout(function () {
LK.showGameOver();
}, 1000);
}
bossProjectile.destroy();
bossProjectiles.splice(bp, 1);
break;
}
}
}
// Check orb monster collisions with Dracula
for (var om = orbMonsters.length - 1; om >= 0; om--) {
var orbMonster = orbMonsters[om];
if (dracula.intersects(orbMonster)) {
// Give materials
var materialKeys = Object.keys(materials);
materials[materialKeys[orbMonster.materialType]] += orbMonster.materialAmount;
storage[materialKeys[orbMonster.materialType]] = materials[materialKeys[orbMonster.materialType]];
LK.getSound('materialCollect').play();
LK.effects.flashObject(dracula, 0x00FF00, 300);
orbMonster.destroy();
orbMonsters.splice(om, 1);
}
}
// Check summoned bats collisions (handled in Bat class update, but clean up dead ones)
for (var sb = summonedBats.length - 1; sb >= 0; sb--) {
var bat = summonedBats[sb];
if (!bat.parent) {
summonedBats.splice(sb, 1);
}
}
}; ===================================================================
--- original.js
+++ change.js
@@ -32,8 +32,98 @@
}
};
return self;
});
+var Bat = 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) * 6;
+ self.speedY = (Math.random() - 0.5) * 6;
+ self.life = 300 + Math.random() * 180; // 5-8 seconds
+ self.targetEnemy = null;
+ self.damage = 25;
+ self.seekRange = 200;
+ self.update = function () {
+ // Find nearest enemy if no target
+ if (!self.targetEnemy || !self.targetEnemy.parent) {
+ var nearestDistance = self.seekRange;
+ for (var h = 0; h < vampireHunters.length; h++) {
+ var hunter = vampireHunters[h];
+ var distance = Math.sqrt(Math.pow(hunter.x - self.x, 2) + Math.pow(hunter.y - self.y, 2));
+ if (distance < nearestDistance) {
+ self.targetEnemy = hunter;
+ nearestDistance = distance;
+ }
+ }
+ for (var b = 0; b < bosses.length; b++) {
+ var boss = bosses[b];
+ var distance = Math.sqrt(Math.pow(boss.x - self.x, 2) + Math.pow(boss.y - self.y, 2));
+ if (distance < nearestDistance) {
+ self.targetEnemy = boss;
+ nearestDistance = distance;
+ }
+ }
+ }
+ // Move towards target or randomly
+ if (self.targetEnemy && self.targetEnemy.parent) {
+ var dx = self.targetEnemy.x - self.x;
+ var dy = self.targetEnemy.y - self.y;
+ var distance = Math.sqrt(dx * dx + dy * dy);
+ if (distance > 0) {
+ self.speedX = dx / distance * 4;
+ self.speedY = dy / distance * 4;
+ }
+ // Check collision with target
+ if (distance < 30) {
+ // Damage enemy
+ if (self.targetEnemy.health !== undefined) {
+ self.targetEnemy.health -= self.damage;
+ LK.effects.flashObject(self.targetEnemy, 0xFF0000, 200);
+ if (self.targetEnemy.health <= 0) {
+ // Kill enemy
+ var index = vampireHunters.indexOf(self.targetEnemy);
+ if (index > -1) {
+ self.targetEnemy.destroy();
+ vampireHunters.splice(index, 1);
+ LK.setScore(LK.getScore() + 100);
+ }
+ var bossIndex = bosses.indexOf(self.targetEnemy);
+ if (bossIndex > -1 && self.targetEnemy.form === undefined) {
+ self.targetEnemy.destroy();
+ bosses.splice(bossIndex, 1);
+ LK.setScore(LK.getScore() + 300);
+ }
+ }
+ }
+ // Bat dies after attacking
+ self.life = 0;
+ }
+ } else {
+ // Random movement
+ self.x += self.speedX;
+ self.y += self.speedY;
+ }
+ self.life--;
+ batGraphics.alpha = Math.min(1.0, self.life / 150);
+ batGraphics.rotation += 0.2;
+ // Keep within bounds
+ if (self.x < 0) self.speedX = Math.abs(self.speedX);
+ if (self.x > 2048) self.speedX = -Math.abs(self.speedX);
+ if (self.y < 0) self.speedY = Math.abs(self.speedY);
+ if (self.y > 2732) self.speedY = -Math.abs(self.speedY);
+ if (self.life <= 0) {
+ self.destroy();
+ var index = summonedBats.indexOf(self);
+ if (index > -1) {
+ summonedBats.splice(index, 1);
+ }
+ }
+ };
+ return self;
+});
var BatParticle = Container.expand(function () {
var self = Container.call(this);
var batGraphics = self.attachAsset('bat', {
anchorX: 0.5,
@@ -1039,8 +1129,9 @@
var bosses = [];
var bossProjectiles = [];
var orbMonsters = [];
var abilities = [];
+var summonedBats = [];
// Enhanced Dracula abilities with new powers
var draculaAbilities = {
shadowStrike: {
unlocked: false,
@@ -1104,8 +1195,11 @@
var materialNames = ['Shadow Essence', 'Blood Crystal', 'Moonstone', 'Soul Shard', 'Nightmare Fragment'];
// Ability menu system
var showingAbilityMenu = false;
var abilityMenuUI;
+// Boss spawn system
+var nextBossSpawnTime = 6000; // First boss at 100 seconds (6000 frames)
+var bossSpawnCounter = 0;
// Initialize main menu
mainMenu = game.addChild(new MainMenu());
skinMenu = new SkinMenu();
// Initialize game UI variables (hidden initially)
@@ -1673,26 +1767,25 @@
LK.getSound('abilityUse').play();
}
function useBatSwarm() {
if (draculaAbilities.batSwarm.cooldown > 0) return;
- // Enhanced bat swarm with more bats and better AI
- var numBats = 12 + draculaAbilities.batSwarm.level * 4;
+ // Enhanced bat summon with killer bats
+ var numBats = 8 + draculaAbilities.batSwarm.level * 3;
for (var i = 0; i < numBats; i++) {
var angle = Math.PI * 2 * i / numBats;
- var bat = new BatParticle();
- bat.x = dracula.x + Math.cos(angle) * (60 + Math.random() * 40);
- bat.y = dracula.y + Math.sin(angle) * (60 + Math.random() * 40);
- bat.speedX = Math.cos(angle) * (4 + Math.random() * 2);
- bat.speedY = Math.sin(angle) * (4 + Math.random() * 2);
- bat.life = 240 + draculaAbilities.batSwarm.level * 60; // Longer life with level
- batParticles.push(bat);
+ var bat = new Bat();
+ bat.x = dracula.x + Math.cos(angle) * (80 + Math.random() * 40);
+ bat.y = dracula.y + Math.sin(angle) * (80 + Math.random() * 40);
+ bat.damage = 25 + draculaAbilities.batSwarm.level * 10;
+ bat.life = 300 + draculaAbilities.batSwarm.level * 120;
+ summonedBats.push(bat);
game.addChild(bat);
// Animate bat spawn
tween(bat, {
- scaleX: 1.5,
- scaleY: 1.5
+ scaleX: 1.3,
+ scaleY: 1.3
}, {
- duration: 200,
+ duration: 300,
easing: tween.easeOut,
onFinish: function onFinish() {
tween(bat, {
scaleX: 1.0,
@@ -1703,9 +1796,22 @@
});
}
});
}
- draculaAbilities.batSwarm.cooldown = 480; // 8 second cooldown
+ // Also spawn visual bat particles for effect
+ var numParticles = 6;
+ for (var p = 0; p < numParticles; p++) {
+ var angle = Math.PI * 2 * p / numParticles;
+ var particle = new BatParticle();
+ particle.x = dracula.x + Math.cos(angle) * (60 + Math.random() * 40);
+ particle.y = dracula.y + Math.sin(angle) * (60 + Math.random() * 40);
+ particle.speedX = Math.cos(angle) * (4 + Math.random() * 2);
+ particle.speedY = Math.sin(angle) * (4 + Math.random() * 2);
+ particle.life = 180;
+ batParticles.push(particle);
+ game.addChild(particle);
+ }
+ draculaAbilities.batSwarm.cooldown = 600; // 10 second cooldown
LK.getSound('abilityUse').play();
}
function useTeleport() {
if (draculaAbilities.teleport.cooldown > 0) return;
@@ -2212,8 +2318,25 @@
}
// Increase enemy spawn rates
lastHunterSpawn -= 60; // Spawn hunters more frequently
}
+ // Boss spawning every 100 seconds
+ if (gameTime >= nextBossSpawnTime) {
+ bossSpawnCounter++;
+ nextBossSpawnTime = gameTime + 6000; // Next boss in 100 seconds
+ // Determine boss type based on spawn count
+ if (bossSpawnCounter === 1) {
+ spawnVampireBaron();
+ } else if (bossSpawnCounter === 2) {
+ spawnBigDraculaBaron();
+ } else if (bossSpawnCounter === 3) {
+ spawnWerewolf();
+ } else {
+ // Cycle through boss types for subsequent spawns
+ var bossType = (bossSpawnCounter - 1) % 3;
+ if (bossType === 0) spawnVampireBaron();else if (bossType === 1) spawnBigDraculaBaron();else spawnWerewolf();
+ }
+ }
// Spawn orb monsters periodically
if (gameTime % 240 === 0) {
// Every 4 seconds
spawnOrbMonster();
@@ -3093,25 +3216,68 @@
LK.effects.flashObject(bossObj, 0xFF0000, 200);
if (bossObj.health <= 0 && bossObj.form !== undefined && bossObj.form < 5) {
// Boss transformation handled in boss update
} else if (bossObj.health <= 0) {
- // Boss defeated
- var bloodReward = 500;
- var materialReward = Math.floor(Math.random() * 3) + 1;
+ // Boss defeated - unlock and upgrade abilities
+ var bloodReward = 1000;
+ var materialReward = Math.floor(Math.random() * 5) + 3;
LK.setScore(LK.getScore() + bloodReward);
totalBlood += bloodReward;
storage.totalBlood = totalBlood;
// Give random material
var materialType = Math.floor(Math.random() * 5);
var materialKeys = Object.keys(materials);
materials[materialKeys[materialType]] += materialReward;
storage[materialKeys[materialType]] = materials[materialKeys[materialType]];
- // Unlock new ability
- if (!draculaAbilities.shadowStrike.unlocked) {
- draculaAbilities.shadowStrike.unlocked = true;
- } else if (!draculaAbilities.bloodShield.unlocked) {
- draculaAbilities.bloodShield.unlocked = true;
+ // Unlock or upgrade abilities based on boss type
+ var bossTypeName = bossObj.constructor.name;
+ if (bossTypeName === 'VampireBaron') {
+ if (!draculaAbilities.shadowStrike.unlocked) {
+ draculaAbilities.shadowStrike.unlocked = true;
+ comboTxt.setText('SHADOW STRIKE UNLOCKED!');
+ } else {
+ draculaAbilities.shadowStrike.level++;
+ comboTxt.setText('SHADOW STRIKE UPGRADED! Lv.' + (draculaAbilities.shadowStrike.level + 1));
+ }
+ } else if (bossTypeName === 'BigDraculaBaron') {
+ if (!draculaAbilities.lordTransformation.unlocked) {
+ draculaAbilities.lordTransformation.unlocked = true;
+ comboTxt.setText('VAMPIRE LORD FORM UNLOCKED!');
+ } else {
+ draculaAbilities.lordTransformation.level++;
+ comboTxt.setText('VAMPIRE LORD UPGRADED! Lv.' + (draculaAbilities.lordTransformation.level + 1));
+ }
+ } else if (bossTypeName === 'Werewolf') {
+ if (!draculaAbilities.batSwarm.unlocked) {
+ draculaAbilities.batSwarm.unlocked = true;
+ comboTxt.setText('BAT SWARM UNLOCKED!');
+ } else {
+ draculaAbilities.batSwarm.level++;
+ comboTxt.setText('BAT SWARM UPGRADED! Lv.' + (draculaAbilities.batSwarm.level + 1));
+ }
+ // Also unlock advanced abilities for werewolf defeats
+ if (!draculaAbilities.bloodFrenzy) {
+ draculaAbilities.bloodFrenzy = {
+ unlocked: true,
+ level: 0,
+ cooldown: 0
+ };
+ comboTxt.setText('BLOOD FRENZY UNLOCKED!');
+ } else if (!draculaAbilities.vampireDash) {
+ draculaAbilities.vampireDash = {
+ unlocked: true,
+ level: 0,
+ cooldown: 0
+ };
+ comboTxt.setText('VAMPIRE DASH UNLOCKED!');
+ }
}
+ comboTxt.alpha = 1;
+ tween(comboTxt, {
+ alpha: 0
+ }, {
+ duration: 4000
+ });
bossObj.destroy();
bosses.splice(boss, 1);
LK.effects.flashScreen(0x9900FF, 1000);
}
@@ -3160,5 +3326,12 @@
orbMonster.destroy();
orbMonsters.splice(om, 1);
}
}
+ // Check summoned bats collisions (handled in Bat class update, but clean up dead ones)
+ for (var sb = summonedBats.length - 1; sb >= 0; sb--) {
+ var bat = summonedBats[sb];
+ if (!bat.parent) {
+ summonedBats.splice(sb, 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