See fixes in readme

This commit is contained in:
Renan LE CARO 2025-04-01 21:37:07 +02:00
parent 92a0edabef
commit 9958717260
10 changed files with 210 additions and 89 deletions

View file

@ -2,12 +2,12 @@ import { baseCombo, forEachLiveOne, liveCount } from "./gameStateMutators";
import {
brickCenterX,
brickCenterY,
countBricksAbove,
countBricksBelow,
currentLevelInfo,
// countBricksAbove,
// countBricksBelow,
currentLevelInfo, isPickyEatingPossible,
isTelekinesisActive,
isYoyoActive,
max_levels,
max_levels, reachRedRowIndex,
} from "./game_utils";
import { colorString, GameState } from "./types";
import { t } from "./i18n/i18n";
@ -545,9 +545,11 @@ export function renderAllBricks() {
ctx.globalAlpha = 1;
const hasCombo = gameState.combo > baseCombo(gameState);
const redBorderOnBricksWithWrongColor =
hasCombo && gameState.perks.picky_eater && !isOptionOn("basic");
const redBorderOnBricksWithWrongColor =
hasCombo && gameState.perks.picky_eater && isPickyEatingPossible(gameState);
console.log('redBorderOnBricksWithWrongColor '+redBorderOnBricksWithWrongColor)
const redColorOnAllBricks = !!(
gameState.lastPuckMove &&
gameState.perks.passive_income &&
@ -556,12 +558,14 @@ export function renderAllBricks() {
gameState.levelTime - 250 * gameState.perks.passive_income
);
const redRowReach= reachRedRowIndex(gameState)
let offset = getDashOffset(gameState);
if (
!(
redBorderOnBricksWithWrongColor ||
redColorOnAllBricks ||
gameState.perks.reach ||
redRowReach!==-1 ||
gameState.perks.zen
)
) {
@ -571,11 +575,14 @@ export function renderAllBricks() {
const clairVoyance =
gameState.perks.clairvoyant && gameState.brickHP.reduce((a, b) => a + b, 0);
const newKey =
gameState.gameZoneWidth +
"_" +
gameState.bricks.join("_") +
bombSVG.complete +
"_" +
redRowReach+
"_" +
redBorderOnBricksWithWrongColor +
"_" +
@ -607,10 +614,7 @@ export function renderAllBricks() {
if (!color) return;
let redBecauseOfReach =
gameState.perks.reach &&
countBricksAbove(gameState, index) &&
!countBricksBelow(gameState, index);
let redBecauseOfReach = redRowReach===Math.floor(index/gameState.level.size) ;
let redBorder =
(gameState.ballsColor !== color &&