Build 29058753

This commit is contained in:
Renan LE CARO 2025-04-01 18:33:58 +02:00
parent 2c75005127
commit 92a0edabef
11 changed files with 31 additions and 33 deletions

View file

@ -27,6 +27,7 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
- keep high score of past runs
- tooltip on stats
- fixed : looping didn't work
## 29058469

View file

@ -11,8 +11,8 @@ android {
applicationId = "me.lecaro.breakout"
minSdk = 21
targetSdk = 34
versionCode = 29058637
versionName = "29058637"
versionCode = 29058753
versionName = "29058753"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true

File diff suppressed because one or more lines are too long

20
dist/index.html vendored
View file

@ -1409,7 +1409,7 @@ restart(window.location.search.includes("stressTest") && {
bigger_explosions: 10,
sapper: 3
},
mode: "short"
mode: "long"
} || {
mode: "short"
});
@ -1460,7 +1460,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("\"29058637\"");
module.exports = JSON.parse("\"29058753\"");
},{}],"1u3Dx":[function(require,module,exports,__globalThis) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
@ -2656,7 +2656,7 @@ function pickedUpgradesHTMl(gameState) {
<strong>${u.name}</strong>
${u.help(Math.max(1, gameState.perks[u.id]))}
</p>
${bars.reverse().join('')}
${bars.reverse().join("")}
</div>
`
};
@ -3305,14 +3305,12 @@ frames = 1) {
gameState.winAt && gameState.levelTime > gameState.winAt || // instant win condition
gameState.levelTime && !remainingBricks && !liveCount(gameState.coins)) {
if (gameState.currentLevel + 1 < (0, _gameUtils.max_levels)(gameState)) setLevel(gameState, gameState.currentLevel + 1);
else {
gameState.loop, gameState.mode;
(0, _gameOver.gameOver)((0, _i18N.t)("gameOver.7_loop.title", {
else if (gameState.loop < (gameState.mode === "long" ? 7 : 0)) gotoNextLoop(gameState);
else (0, _gameOver.gameOver)((0, _i18N.t)("gameOver.7_loop.title", {
loop: gameState.loop
}), (0, _i18N.t)("gameOver.7_loop.summary", {
score: gameState.score
}));
}
} else if (gameState.running || gameState.levelTime) {
const coinRadius = Math.round(gameState.coinSize / 2);
forEachLiveOne(gameState.coins, (coin, coinIndex)=>{
@ -3758,16 +3756,16 @@ function render(gameState) {
</span><span> / </span>
` : "") + ((0, _options.isOptionOn)("show_stats") ? `
<span class="${catchRate > 0.95 && "great" || catchRate > 0.9 && "good" || ""}" data-tooltip="${(0, _i18N.t)('play.stats.coins_catch_rate')}">
<span class="${catchRate > 0.95 && "great" || catchRate > 0.9 && "good" || ""}" data-tooltip="${(0, _i18N.t)("play.stats.coins_catch_rate")}">
${Math.floor(catchRate * 100)}%
</span><span> / </span>
<span class="${gameState.levelTime < 30000 && "great" || gameState.levelTime < 60000 && "good" || ""}" data-tooltip="${(0, _i18N.t)('play.stats.levelTime')}">
<span class="${gameState.levelTime < 30000 && "great" || gameState.levelTime < 60000 && "good" || ""}" data-tooltip="${(0, _i18N.t)("play.stats.levelTime")}">
${Math.ceil(gameState.levelTime / 1000)}s
</span><span> / </span>
<span class="${gameState.levelWallBounces < 3 && "great" || gameState.levelWallBounces < 10 && "good" || ""}" data-tooltip="${(0, _i18N.t)('play.stats.levelWallBounces')}">
<span class="${gameState.levelWallBounces < 3 && "great" || gameState.levelWallBounces < 10 && "good" || ""}" data-tooltip="${(0, _i18N.t)("play.stats.levelWallBounces")}">
${gameState.levelWallBounces} B
</span><span> / </span>
<span class="${gameState.levelMisses < 3 && "great" || gameState.levelMisses < 6 && "good" || ""}" data-tooltip="${(0, _i18N.t)('play.stats.levelMisses')}">
<span class="${gameState.levelMisses < 3 && "great" || gameState.levelMisses < 6 && "good" || ""}" data-tooltip="${(0, _i18N.t)("play.stats.levelMisses")}">
${gameState.levelMisses} M
</span><span> / </span>
` : "") + `<span class="score" data-tooltip="${(0, _i18N.t)("play.score_tooltip")}">$${gameState.score}</span>`;

View file

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

View file

@ -1 +1 @@
"29058637"
"29058753"

View file

@ -61,12 +61,11 @@ body {
color: white;
transition: color 0.3s;
&.active .score{
&.active .score {
color: gold;
transition: color 0.01s;
}
span {
color: rgba(255, 255, 255, 0.8);

View file

@ -989,7 +989,7 @@ restart(
sapper: 3,
// unbounded: 1,
},
mode: "short",
mode: "long",
}) || {
mode: "short",
},

View file

@ -1027,7 +1027,7 @@ export function gameStateTick(
) {
if (gameState.currentLevel + 1 < max_levels(gameState)) {
setLevel(gameState, gameState.currentLevel + 1);
} else if (gameState.loop < gameState.mode === "long" ? 7 : 0) {
} else if (gameState.loop < (gameState.mode === "long" ? 7 : 0)) {
gotoNextLoop(gameState);
} else {
gameOver(

View file

@ -85,14 +85,14 @@ export function pickedUpgradesHTMl(gameState: GameState) {
.map((u) => {
const newMax = Math.max(0, u.max - gameState.bannedPerks[u.id]);
let bars =[];
let bars = [];
for (let i = 0; i < Math.max(u.max, newMax, gameState.perks[u.id]); i++) {
if (i < gameState.perks[u.id]) {
bars .push('<span class="used"></span>');
bars.push('<span class="used"></span>');
} else if (i < newMax) {
bars .push('<span class="free"></span>');
bars.push('<span class="free"></span>');
} else {
bars .push('<span class="banned"></span>');
bars.push('<span class="banned"></span>');
}
}
@ -106,7 +106,7 @@ export function pickedUpgradesHTMl(gameState: GameState) {
<strong>${u.name}</strong>
${u.help(Math.max(1, gameState.perks[u.id]))}
</p>
${bars.reverse().join('')}
${bars.reverse().join("")}
</div>
`,
};

View file

@ -69,16 +69,16 @@ export function render(gameState: GameState) {
: "") +
(isOptionOn("show_stats")
? `
<span class="${(catchRate > 0.95 && "great") || (catchRate > 0.9 && "good") || ""}" data-tooltip="${t('play.stats.coins_catch_rate')}">
<span class="${(catchRate > 0.95 && "great") || (catchRate > 0.9 && "good") || ""}" data-tooltip="${t("play.stats.coins_catch_rate")}">
${Math.floor(catchRate * 100)}%
</span><span> / </span>
<span class="${(gameState.levelTime < 30000 && "great") || (gameState.levelTime < 60000 && "good") || ""}" data-tooltip="${t('play.stats.levelTime')}">
<span class="${(gameState.levelTime < 30000 && "great") || (gameState.levelTime < 60000 && "good") || ""}" data-tooltip="${t("play.stats.levelTime")}">
${Math.ceil(gameState.levelTime / 1000)}s
</span><span> / </span>
<span class="${(gameState.levelWallBounces < 3 && "great") || (gameState.levelWallBounces < 10 && "good") || ""}" data-tooltip="${t('play.stats.levelWallBounces')}">
<span class="${(gameState.levelWallBounces < 3 && "great") || (gameState.levelWallBounces < 10 && "good") || ""}" data-tooltip="${t("play.stats.levelWallBounces")}">
${gameState.levelWallBounces} B
</span><span> / </span>
<span class="${(gameState.levelMisses < 3 && "great") || (gameState.levelMisses < 6 && "good") || ""}" data-tooltip="${t('play.stats.levelMisses')}">
<span class="${(gameState.levelMisses < 3 && "great") || (gameState.levelMisses < 6 && "good") || ""}" data-tooltip="${t("play.stats.levelMisses")}">
${gameState.levelMisses} M
</span><span> / </span>
`