User prompt
за sunduk2 дают 15 очков
User prompt
здоровье монстров растет +1 за каждые 250 очков
User prompt
сделай баланс 50, таймер 6 минут прибавка к таймеру по 1 минуте
User prompt
из монстра падает sunduk2 который дает 700 денег
User prompt
монстр сразу выходит с первой акуло а так быть не должно найди где ошибка и убери появление монстра с первыми акулами
User prompt
убери все условия появления монстра и оставь только одно: монстр появляется только тогда когда есть минимум 3 акулы и он заменяет эти три акулы. Если акул 6 то монстров соответственно 2. если акул 9 то монстров 3 и так далее
User prompt
монстр почему-то все равно сразу появляется а должен только тогда когда есть минимум 3 акулы
User prompt
монстр появляется не сразу а тогда когда акул становится 3 или больше и он заменяет 3 акулы собой
User prompt
если есть хоть один монстр покупка рыб также не доступна как при наличие акул
User prompt
Пираньи должны атаковать монстра
User prompt
сделай баланс 5000 таймер 10 секунд, прибавка к таймеру 10 секунд
User prompt
нужно добавить монстра. он также как и акула нападает на рыб но ест в два раза чаще и здоровья у него в 3 раза больше
User prompt
Please fix the bug: 'Uncaught ReferenceError: tween is not defined' in or related to this line: 'tween(self.fishIcon, {' Line Number: 803 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
сдела режим ТЕСТ
User prompt
Давай договоримся если я говорю тебе сделай режим ТЕСТ то ты делаешь баланс 5000, 10 секунд таймер и прибавку времени к таймеру 10 секунд. А если я говорю режим ИГРОВОЙ то ты возвращаешь как было: 50 баланс, 6 минут таймер и 1 минута прибавки к таймеру.
User prompt
за одну монету пусть дают 50 очков
User prompt
сделай таймер 10 секунд
User prompt
баланс 5000 таймер 10 секунд прибавка к таймеру 10 секунд
User prompt
Please fix the bug: 'Uncaught ReferenceError: tween is not defined' in or related to this line: 'tween(self.fishIcon, {' Line Number: 803 ↪💡 Consider importing and using the following plugins: @upit/tween.v1
User prompt
давай добавим монстра с условием появления его когда игрок набирает 500 очков
User prompt
Please fix the bug: 'ReferenceError: storage is not defined' in or related to this line: 'storage.leaderboard.push(LK.getScore());' Line Number: 1352 ↪💡 Consider importing and using the following plugins: @upit/storage.v1
User prompt
Нет ты не понял. Если спавнится 3 или больше акул то удаляются 3 акулы и спвнится одна акула у которой текстура monstr и здоровья у нее в 3 раза больше. А скорость поедания рыб в два раза быстрее.
User prompt
баланс 5000 таймер 10 секунд прибавка к таймеру 10 секунд
User prompt
Если акул на уровне 3 то они заменяются на одну акулу у которой в три раза больше здоровья и едят рыб они в два раза быстрее, при этом картинка этой акулы заменяется на monstr.
User prompt
почему-то монстр не выплыл как акула в чем ошибка найди и исправь
===================================================================
--- original.js
+++ change.js
@@ -854,67 +854,8 @@
}
}
};
});
-// Monstr class representing a more aggressive shark
-var Monstr = Container.expand(function () {
- var self = Container.call(this);
- var monstrGraphics = self.attachAsset('Monstr', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- self.health = 0; // Health will be set when Monstr is spawned
- self.speed = Math.random() * 2 + 1; // Random speed for each Monstr
- self.direction = 1; // Monstr always swim to the right when they appear
- // Update function to move the Monstr
- self.update = function () {
- if (self.x < aquarium.x - aquarium.width / 2 + 100) {
- self.direction = 1; // Move right
- monstrGraphics.scaleX = 1; // Ensure Monstr is facing right
- } else if (self.x > aquarium.x + aquarium.width / 2 - 100) {
- self.direction = -1; // Move left
- monstrGraphics.scaleX = -1; // Ensure Monstr is facing left
- }
- self.x += self.speed * self.direction;
- if (self.x < -self.width / 2 || self.x > 2048 + self.width / 2 || self.health <= 0) {
- self.destroy();
- game.monstr = null;
- }
- // Find the nearest small fish
- var nearestFish = null;
- var minDistance = Infinity;
- var targetFishes = fishes.filter(function (fish) {
- return true; // Allow Monstr to target both small and big fish
- });
- targetFishes.forEach(function (fish) {
- var distance = Math.sqrt(Math.pow(fish.x - self.x, 2) + Math.pow(fish.y - self.y, 2));
- if (distance < minDistance) {
- minDistance = distance;
- nearestFish = fish;
- }
- });
- if (nearestFish && (self.lastEatTime === undefined || LK.ticks - self.lastEatTime >= 120)) {
- // Move towards the nearest fish
- var angle = Math.atan2(nearestFish.y - self.y, nearestFish.x - self.x);
- self.x += Math.cos(angle) * 4;
- self.y += Math.sin(angle) * 4;
- monstrGraphics.scaleX = Math.cos(angle) < 0 ? -1 : 1; // Flip the Monstr based on direction
- // Check if Monstr intersects with the fish
- if (self.intersects(nearestFish)) {
- if (self.lastEatTime === undefined || LK.ticks - self.lastEatTime >= 120) {
- // Check if 2 seconds have passed
- var index = fishes.indexOf(nearestFish);
- if (index !== -1) {
- nearestFish.destroy(); // Ensure fish is destroyed immediately upon consumption
- fishes.splice(index, 1);
- }
- LK.getSound('emyakula').play(); // Play 'emyakula' sound when Monstr eats a fish
- self.lastEatTime = LK.ticks; // Update last eat time
- }
- }
- }
- };
-});
// Pirand class representing a piranha skeleton
var Pirand = Container.expand(function () {
var self = Container.call(this);
var pirandGraphics = self.attachAsset('pirand', {
@@ -1222,9 +1163,9 @@
// Initialize arrays and variables
var bigCormIcon; // Define bigCormIcon in the global scope
// Removed unnecessary global declaration of fishIcon
var bigCormCostText; // Declare bigCormCostText in the global scope
-var balance = 5000;
+var balance = 50;
var balanceText = new Text2('$' + balance, {
size: 100,
fill: 0x00FF00,
font: "'Tahoma', sans-serif" // Set font to Tahoma
@@ -1235,9 +1176,9 @@
});
scoreText.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreText);
// Add countdown timer below the score display
-var countdown = 10; // Initial countdown value set to 10 seconds
+var countdown = 360; // Initial countdown value set to 6 minutes (360 seconds)
var akulaCount = 1; // Initial number of sharks
var countdownText = new Text2(countdown.toString(), {
size: 80,
fill: 0xFFFF00 // Yellow color
@@ -1279,36 +1220,14 @@
warning.destroy();
}, 500);
}
} else if (countdown === 0) {
- countdown += 10; // Extend the countdown by 10 seconds
- if (game.children.filter(function (child) {
- return child instanceof Akula;
- }).length >= 3) {
- // Remove 3 Akulas and spawn a Monstr
- var akulasToRemove = 3;
- var totalHealth = 0;
- game.children = game.children.filter(function (child) {
- if (child instanceof Akula && akulasToRemove > 0) {
- totalHealth += child.health;
- child.destroy();
- akulasToRemove--;
- return false;
- }
- return true;
- });
- var monstr = new Monstr();
- monstr.x = 2048 + monstr.width / 2; // Position on the right side of the screen
- monstr.y = Math.random() * (2732 - 200) + 100; // Random y position within screen bounds
- monstr.health = totalHealth; // Set Monstr's health to the total health of removed Akulas
- game.addChild(monstr);
- } else {
- for (var i = 0; i < akulaCount; i++) {
- var akula = new Akula();
- akula.x = 2048 + akula.width / 2; // Position on the right side of the screen
- akula.y = Math.random() * (2732 - 200) + 100; // Random y position within screen bounds
- game.addChild(akula);
- }
+ countdown += 60; // Extend the countdown by 60 seconds
+ for (var i = 0; i < akulaCount; i++) {
+ var akula = new Akula();
+ akula.x = 2048 + akula.width / 2; // Position on the right side of the screen
+ akula.y = Math.random() * (2732 - 200) + 100; // Random y position within screen bounds
+ game.addChild(akula);
}
akulaCount++; // Increase the number of sharks for the next spawn
// Increase health of all Akula instances based on the number of Akulas spawned
game.children.forEach(function (child) {
@@ -1411,8 +1330,28 @@
// Check if there is at least one shark in the game
var hasShark = game.children.some(function (child) {
return child instanceof Akula;
});
+ if (akulaCount === 3) {
+ // Remove all existing sharks
+ game.children = game.children.filter(function (child) {
+ if (child instanceof Akula) {
+ child.destroy();
+ return false;
+ }
+ return true;
+ });
+ // Add a stronger shark with triple health and faster eating speed
+ var strongShark = new Akula();
+ strongShark.health *= 3; // Triple the health
+ strongShark.speed *= 2; // Double the speed
+ strongShark.attachAsset('Monstr', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ game.addChild(strongShark);
+ akulaCount = 1; // Reset the shark count
+ }
// Update fish icon alpha and interactivity based on shark presence
if (hasShark) {
interfacePanel.fishIcon.alpha = 0.3;
interfacePanel.fishIcon.interactive = false;
прозрачный пузырь воздуха. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Потрепаная рыбе
древняя Монетка, постэльные цвета. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Потрепаная рыба
сундук с сокровищами с видом спереди, постэльные цвета. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
предупреждение о нападении акул без надписей, постэльные цвета.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Морской Монстр, вид с боку, накаченные мышцы, постэльные цвета.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Большой прозрачный радужный пузырь. пастельные цвета Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
осьминог повар, минимализм, пастельные цвета \. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
spawnpuzir
Sound effect
Lop
Sound effect
click
Sound effect
clickkorm
Sound effect
Emy
Sound effect
MonetaSpawn
Sound effect
MonetaUp
Sound effect
Deadfish
Sound effect
rost
Sound effect
akulaspawn
Sound effect
ataka
Sound effect
emyakula
Sound effect
sundukup
Sound effect
Music
Music
music2
Music
udarbonus
Sound effect
udarbonus2
Sound effect
udarbonus3
Sound effect
startbonus
Sound effect
osmincorm
Sound effect