Build 29060255

This commit is contained in:
Renan LE CARO 2025-04-02 19:36:03 +02:00
parent 5ce309d59f
commit b7dacaba0a
11 changed files with 143 additions and 184 deletions

View file

@ -1,5 +1,5 @@
// The version of the cache.
const VERSION = "29060245";
const VERSION = "29060255";
// The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1 +1 @@
"29060245"
"29060255"

View file

@ -22,6 +22,7 @@ import {
getMajorityValue,
getPossibleUpgrades,
getRowColIndex,
isMovingWhilePassiveIncome,
isPickyEatingPossible,
isTelekinesisActive,
isYoyoActive,
@ -451,18 +452,13 @@ export function explodeBrick(
}
}
if (
gameState.lastPuckMove &&
gameState.perks.passive_income &&
gameState.lastPuckMove >
gameState.levelTime - 250 * gameState.perks.passive_income
) {
if (isMovingWhilePassiveIncome(gameState)) {
resetCombo(gameState, x, y);
}
if (
gameState.perks.nbricks &&
ball.brokenSinceBounce > gameState.perks.nbricks
ball.hitSinceBounce > gameState.perks.nbricks
) {
// We need to reset at each hit, otherwise it's just an OP version of single puck hit streak
resetCombo(gameState, ball.x, ball.y);
@ -685,6 +681,7 @@ export async function setLevel(gameState: GameState, l: number) {
gameState.levelTime = 0;
gameState.winAt = 0;
gameState.levelWallBounces = 0;
gameState.lastPuckMove = 0;
gameState.autoCleanUses = 0;
gameState.lastTickDown = gameState.levelTime;
gameState.levelStartScore = gameState.score;
@ -1544,7 +1541,7 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) {
}
if (
gameState.perks.nbricks &&
ball.brokenSinceBounce < gameState.perks.nbricks
ball.hitSinceBounce < gameState.perks.nbricks
) {
resetCombo(gameState, ball.x, ball.y);
}

View file

@ -234,28 +234,15 @@ export function shouldPierceByColor(
return true;
}
// export function countBricksAbove(gameState: GameState, index: number) {
// const col = index % gameState.gridSize;
// const row = Math.floor(index / gameState.gridSize);
// let count = 0;
// for (let y = 0; y < row; y++) {
// if (gameState.bricks[col + y * gameState.gridSize]) {
// count++;
// }
// }
// return count;
// }
// export function countBricksBelow(gameState: GameState, index: number) {
// const col = index % gameState.gridSize;
// const row = Math.floor(index / gameState.gridSize);
// let count = 0;
// for (let y = row + 1; y < gameState.gridSize; y++) {
// if (gameState.bricks[col + y * gameState.gridSize]) {
// count++;
// }
// }
// return count;
// }
export function isMovingWhilePassiveIncome(gameState: GameState) {
return !!(
gameState.lastPuckMove &&
gameState.perks.passive_income &&
gameState.lastPuckMove >
gameState.levelTime - 250 * gameState.perks.passive_income
);
}
export function highScoreForMode(mode: GameState["mode"]) {
try {
const score = parseInt(

View file

@ -219,7 +219,7 @@
"upgrades.multiball.help": "Start every levels with {{count}} balls.",
"upgrades.multiball.name": "+1 ball",
"upgrades.nbricks.fullHelp": "You don't necessarily need to destroy those bricks, but you need to hit them. Bricks destroyed by explosions don't count",
"upgrades.nbricks.help": "Destroy exactly {{lvl}} bricks per puck bounce for +{{lvl}} combo, otherwise it resets",
"upgrades.nbricks.help": "Hit exactly {{lvl}} bricks per puck bounce for +{{lvl}} combo, otherwise it resets",
"upgrades.nbricks.name": "Strict sample size",
"upgrades.one_more_choice.fullHelp": "Every upgrade menu will have one more option. Doesn't increase the number of upgrades you can pick.",
"upgrades.one_more_choice.help": "Further level ups will offer {{lvl}} more option(s) in the list",

View file

@ -219,7 +219,7 @@
"upgrades.multiball.help": "Chaque niveau commence avec {{count}} balles.",
"upgrades.multiball.name": "+1 balle",
"upgrades.nbricks.fullHelp": "Si votre balle rebondis sans casser une brique, ça compte quand même comme une frappe. Les briques détruites par des explosions ne comptent pas.",
"upgrades.nbricks.help": "Détruisez exactement {{lvl}} briques par rebond pour +{{lvl}} combo, sinon RAZ",
"upgrades.nbricks.help": "Frappez exactement {{lvl}} briques par rebond pour +{{lvl}} combo, sinon RAZ",
"upgrades.nbricks.name": "Prélèvement",
"upgrades.one_more_choice.fullHelp": "Chaque menu d'amélioration comportera une option supplémentaire. Cela n'augmente pas le nombre d'améliorations que vous pouvez choisir, mais vous aide à créer le profile idéal. ",
"upgrades.one_more_choice.help": "Les niveaux suivants offriront {{lvl}} option(s) supplémentaire(s) dans la liste d'améliorations.",

View file

@ -5,6 +5,7 @@ import {
// countBricksAbove,
// countBricksBelow,
currentLevelInfo,
isMovingWhilePassiveIncome,
isPickyEatingPossible,
isTelekinesisActive,
isYoyoActive,
@ -542,13 +543,7 @@ export function renderAllBricks() {
const redBorderOnBricksWithWrongColor =
hasCombo && gameState.perks.picky_eater && isPickyEatingPossible(gameState);
const redColorOnAllBricks = !!(
gameState.lastPuckMove &&
gameState.perks.passive_income &&
hasCombo &&
gameState.lastPuckMove >
gameState.levelTime - 250 * gameState.perks.passive_income
);
const redColorOnAllBricks = hasCombo && isMovingWhilePassiveIncome(gameState);
const redRowReach = reachRedRowIndex(gameState);