diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 5aadb47..98f2b41 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -11,8 +11,8 @@ android {
applicationId = "me.lecaro.breakout"
minSdk = 21
targetSdk = 34
- versionCode = 29046079
- versionName = "29046079"
+ versionCode = 29046822
+ versionName = "29046822"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
diff --git a/app/src/main/assets/index.html b/app/src/main/assets/index.html
index 20b8717..b201765 100644
--- a/app/src/main/assets/index.html
+++ b/app/src/main/assets/index.html
@@ -1 +1 @@
-
Breakout 71
\ No newline at end of file
+Breakout 71
\ No newline at end of file
diff --git a/dist/index.html b/dist/index.html
index 2324e6e..fe775d4 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -1368,7 +1368,7 @@ const upgrades = (0, _upgrades.rawUpgrades).map((u)=>({
}));
},{"./data/palette.json":"ktRBU","./data/levels.json":"8JSUc","./data/version.json":"iyP6E","./upgrades":"1u3Dx","./getLevelBackground":"7OIPf","./levelIcon":"6rQoT","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"iyP6E":[function(require,module,exports,__globalThis) {
-module.exports = JSON.parse("\"29046079\"");
+module.exports = JSON.parse("\"29046822\"");
},{}],"1u3Dx":[function(require,module,exports,__globalThis) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
@@ -3551,7 +3551,7 @@ function render(gameState) {
ctx.globalAlpha = 1;
ctx.globalCompositeOperation = "source-over";
gameState.balls.forEach((ball)=>{
- const drawingColor = gameState.lastPuckMove && gameState.perks.passive_income && gameState.combo > (0, _gameStateMutators.baseCombo)(gameState) && gameState.lastPuckMove > gameState.levelTime - 500 * gameState.perks.passive_income && 'red' || gameState.ballsColor;
+ const drawingColor = gameState.lastPuckMove && gameState.perks.passive_income && gameState.combo > (0, _gameStateMutators.baseCombo)(gameState) && gameState.lastPuckMove > gameState.levelTime - 500 * gameState.perks.passive_income && "red" || gameState.ballsColor;
// The white border around is to distinguish colored balls from coins/bg
drawBall(ctx, drawingColor, gameState.ballSize, ball.x, ball.y, gameState.puckColor);
if ((0, _gameUtils.isTelekinesisActive)(gameState, ball) || (0, _gameUtils.isYoyoActive)(gameState, ball)) {
diff --git a/src/PWA/sw-b71.js b/src/PWA/sw-b71.js
index 3593bf3..514488a 100644
--- a/src/PWA/sw-b71.js
+++ b/src/PWA/sw-b71.js
@@ -1,5 +1,5 @@
// The version of the cache.
-const VERSION = "29046079";
+const VERSION = "29046822";
// The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`;
diff --git a/src/data/version.json b/src/data/version.json
index aad782d..a98579b 100644
--- a/src/data/version.json
+++ b/src/data/version.json
@@ -1 +1 @@
-"29046079"
+"29046822"
diff --git a/src/gameStateMutators.ts b/src/gameStateMutators.ts
index b8a3ea7..d893f94 100644
--- a/src/gameStateMutators.ts
+++ b/src/gameStateMutators.ts
@@ -53,10 +53,8 @@ import { use } from "react";
export function setMousePos(gameState: GameState, x: number) {
// Sets the puck position, and updates the ball position if they are supposed to follow it
- if (
- Math.abs(x - gameState.puckPosition) > 1
- ) {
- gameState.lastPuckMove=gameState.levelTime
+ if (Math.abs(x - gameState.puckPosition) > 1) {
+ gameState.lastPuckMove = gameState.levelTime;
}
gameState.puckPosition = x;
gameState.needsRender = true;
@@ -71,7 +69,7 @@ function getBallDefaultVx(gameState: GameState) {
export function resetBalls(gameState: GameState) {
// Always compute speed first
- normalizeGameState(gameState)
+ normalizeGameState(gameState);
const count = 1 + (gameState.perks?.multiball || 0);
const perBall = gameState.puckWidth / (count + 1);
gameState.balls = [];
@@ -429,8 +427,13 @@ export function explodeBrick(
}
}
- if(gameState.lastPuckMove && gameState.perks.passive_income && gameState.lastPuckMove>gameState.levelTime-500*gameState.perks.passive_income){
- resetCombo(gameState, x, y);
+ if (
+ gameState.lastPuckMove &&
+ gameState.perks.passive_income &&
+ gameState.lastPuckMove >
+ gameState.levelTime - 500 * gameState.perks.passive_income
+ ) {
+ resetCombo(gameState, x, y);
}
if (!isExplosion) {
@@ -961,7 +964,7 @@ export function gameStateTick(
}
}
- const speed =( Math.abs(coin.vx) + Math.abs(coin.vy)) * 10;
+ const speed = (Math.abs(coin.vx) + Math.abs(coin.vy)) * 10;
const hitBorder = bordersHitCheck(gameState, coin, coin.size / 2, frames);
if (
diff --git a/src/render.ts b/src/render.ts
index aa7dd1a..accaea9 100644
--- a/src/render.ts
+++ b/src/render.ts
@@ -229,8 +229,14 @@ export function render(gameState: GameState) {
ctx.globalCompositeOperation = "source-over";
gameState.balls.forEach((ball) => {
-
- const drawingColor = (gameState.lastPuckMove&& gameState.perks.passive_income && gameState.combo>baseCombo(gameState) && gameState.lastPuckMove>gameState.levelTime-500*gameState.perks.passive_income && 'red')||gameState.ballsColor
+ const drawingColor =
+ (gameState.lastPuckMove &&
+ gameState.perks.passive_income &&
+ gameState.combo > baseCombo(gameState) &&
+ gameState.lastPuckMove >
+ gameState.levelTime - 500 * gameState.perks.passive_income &&
+ "red") ||
+ gameState.ballsColor;
// The white border around is to distinguish colored balls from coins/bg
drawBall(
@@ -256,17 +262,13 @@ export function render(gameState: GameState) {
);
ctx.stroke();
}
- if(gameState.perks.clairvoyant && gameState.ballStickToPuck){
+ if (gameState.perks.clairvoyant && gameState.ballStickToPuck) {
ctx.strokeStyle = gameState.ballsColor;
ctx.beginPath();
- ctx.moveTo(ball.x,ball.y);
- ctx.lineTo(
- ball.x+ball.vx*10,
- ball.y+ball.vy*10
- );
+ ctx.moveTo(ball.x, ball.y);
+ ctx.lineTo(ball.x + ball.vx * 10, ball.y + ball.vy * 10);
ctx.stroke();
}
-
});
// The puck
ctx.globalAlpha = 1;
diff --git a/src/upgrades.ts b/src/upgrades.ts
index 04b74cf..d6615d1 100644
--- a/src/upgrades.ts
+++ b/src/upgrades.ts
@@ -572,7 +572,8 @@ export const rawUpgrades = [
id: "passive_income",
max: 4,
name: t("upgrades.passive_income.name"),
- help: (lvl: number) => t("upgrades.passive_income.help",{time:lvl/2,lvl}),
+ help: (lvl: number) =>
+ t("upgrades.passive_income.help", { time: lvl / 2, lvl }),
fullHelp: t("upgrades.passive_income.fullHelp"),
},
{