From 5abbf5263e552cda25491e521dd49be22ec4d51e Mon Sep 17 00:00:00 2001 From: Renan LE CARO Date: Wed, 19 Mar 2025 20:14:55 +0100 Subject: [PATCH] A few perks --- Readme.md | 10 +- dist/index.html | 576 +++++++----- src/data/levels.json | 53 +- src/game.ts | 194 +---- src/gameStateMutators.ts | 213 ++++- src/game_utils.ts | 37 +- src/i18n/b71.babel | 350 ++++++++ src/i18n/en.json | 27 +- src/i18n/fr.json | 27 +- src/loadGameData.ts | 2 +- src/newGameState.ts | 1 + src/render.ts | 1259 ++++++++++++++------------- src/types.d.ts | 3 +- src/upgrades.test.ts | 11 + src/{rawUpgrades.ts => upgrades.ts} | 70 ++ 15 files changed, 1746 insertions(+), 1087 deletions(-) create mode 100644 src/upgrades.test.ts rename src/{rawUpgrades.ts => upgrades.ts} (84%) diff --git a/Readme.md b/Readme.md index c6dc4ea..d2e83dd 100644 --- a/Readme.md +++ b/Readme.md @@ -23,10 +23,8 @@ There's also an easy mode for kids (slower ball). # Next -- different visual effects on ball to represent which perks it's imbued with (pierce, sapper…). remove visual while it's not affected (can't pierce/sap anymore until touching the puck). -- check which ball color you get right after picking a color related perk + - sturdy bricks: map of remaining hits -- looks like offline PWA mode does not work # bugs @@ -77,6 +75,7 @@ There's also an easy mode for kids (slower ball). - the white outline on bricks associated with picky eater kinda works but i feel it's more distracting than anything. maybe try something different ? put a cross on matching coloured bricks, or the contrary, grey out other bricks. # New perks ideas +- [colin] shocks - balls can bounce off of each others and produce a shock that destroys a random block at the current combo - second puck (symmetric to the first one) - keep combo between level, loose half your run score when missing any bricks - offer next level choice after upgrade pick @@ -123,8 +122,6 @@ There's also an easy mode for kids (slower ball). - gravity is flipped on the opposite side to the puck (for coins) - balls have gravity - coins don't have gravity -- [colin] yoyo - when the ball falls back down, it curbs towards your puck (after hitting a brick or top) -- [colin] single block combo - get +1 combo if the ball only breaks a single block before reaching the puck - [colin] mirror puck - a mirrored puck at the top of the screen follows as you move the bottom puck. it helps with keeping combos up and preventing the ball from touching the ceiling. it could appear as a hollow puck so as to not draw too much attention from the main bottom puck. - [colin] side pucks - same as above but with two side pucks. - [colin] ball coins - coins share the same physics as coins and bounce on walls and bricks @@ -154,13 +151,10 @@ There's also an easy mode for kids (slower ball). - squirell : keep coins on screen to have a higher combo - [colin] peaceful combo - le combo monte chaque seconde tant que les 2+ balles ne se touchent pas OU qu'on ne touche pas de bloc explosif. - [colin] close quarters - balle attirée par tous les blocs/par un bloc aléatoire, actif à portée de bloc (+1bloc au lvlup)/proportionnel à une force (+puissance au lvlup)… -- [colin] shocks - balls can bounce off of each others and produce a shock that destroys a random block at the current combo - [colin] plusieurs perks qui déclenchent des effets quand une balle est perdue. par ex: +3 combo à chaque balle perdue, 5 blocs transformés en bombe, balle et coins ralentis, blocs régénérés… - [colin] faster style - augmente le combo en fonction de la vitesse de la balle - [colin] perk: analyzer - permet de voir les caractéristiques cachées des blocs (sturdy…) - [colin] perk: roulette - gagne instantanément 2 perks aléatoires -- let coins go out of bounds left and right, where they'll get lost, but +1 combo per brick -- more combo if no coin catch - combo climbs every time a ball bounces on puck (but bounce is random?) # extra levels diff --git a/dist/index.html b/dist/index.html index 23181c2..24073d3 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,6 +1,6 @@ - + @@ -470,7 +470,107 @@ h2.histogram-title strong { this[globalName] = mainExports; } } -})({"bCo5X":[function(require,module,exports,__globalThis) { +})({"bhWPG":[function(require,module,exports,__globalThis) { +require("bb60e57bc8bd98ca")(require("ad1e70ad521f999b").getBundleURL('28aWT') + "editor.1350aee5.js"); + +},{"bb60e57bc8bd98ca":"61B45","ad1e70ad521f999b":"lgJ39"}],"61B45":[function(require,module,exports,__globalThis) { +"use strict"; +var cacheLoader = require("ca2a84f7fa4a3bb0"); +module.exports = cacheLoader(function(bundle) { + return new Promise(function(resolve, reject) { + // Don't insert the same script twice (e.g. if it was already in the HTML) + var existingScripts = document.getElementsByTagName('script'); + if ([].concat(existingScripts).some(function(script) { + return script.src === bundle; + })) { + resolve(); + return; + } + var preloadLink = document.createElement('link'); + preloadLink.href = bundle; + preloadLink.rel = 'preload'; + preloadLink.as = 'script'; + document.head.appendChild(preloadLink); + var script = document.createElement('script'); + script.async = true; + script.type = 'text/javascript'; + script.src = bundle; + script.onerror = function(e) { + var error = new TypeError("Failed to fetch dynamically imported module: ".concat(bundle, ". Error: ").concat(e.message)); + script.onerror = script.onload = null; + script.remove(); + reject(error); + }; + script.onload = function() { + script.onerror = script.onload = null; + resolve(); + }; + document.getElementsByTagName('head')[0].appendChild(script); + }); +}); + +},{"ca2a84f7fa4a3bb0":"j49pS"}],"j49pS":[function(require,module,exports,__globalThis) { +"use strict"; +var cachedBundles = {}; +var cachedPreloads = {}; +var cachedPrefetches = {}; +function getCache(type) { + switch(type){ + case 'preload': + return cachedPreloads; + case 'prefetch': + return cachedPrefetches; + default: + return cachedBundles; + } +} +module.exports = function(loader, type) { + return function(bundle) { + var cache = getCache(type); + if (cache[bundle]) return cache[bundle]; + return cache[bundle] = loader.apply(null, arguments).catch(function(e) { + delete cache[bundle]; + throw e; + }); + }; +}; + +},{}],"lgJ39":[function(require,module,exports,__globalThis) { +"use strict"; +var bundleURL = {}; +function getBundleURLCached(id) { + var value = bundleURL[id]; + if (!value) { + value = getBundleURL(); + bundleURL[id] = value; + } + return value; +} +function getBundleURL() { + try { + throw new Error(); + } catch (err) { + var matches = ('' + err.stack).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^)\n]+/g); + if (matches) // The first two stack frames will be this function and getBundleURLCached. + // Use the 3rd one, which will be a runtime in the original bundle. + return getBaseURL(matches[2]); + } + return '/'; +} +function getBaseURL(url) { + return ('' + url).replace(/^((?:https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/.+)\/[^/]+$/, '$1') + '/'; +} +// TODO: Replace uses with `new URL(url).origin` when ie11 is no longer supported. +function getOrigin(url) { + var matches = ('' + url).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^/]+/); + if (!matches) throw new Error('Origin not found'); + return matches[0]; +} +exports.getBundleURL = getBundleURLCached; +exports.getBaseURL = getBaseURL; +exports.getOrigin = getOrigin; + +},{}],"bCo5X":[function(require,module,exports,__globalThis) { var _gameTs = require("./game.ts"); },{"./game.ts":"edeGs"}],"edeGs":[function(require,module,exports,__globalThis) { @@ -483,9 +583,6 @@ parcelHelpers.export(exports, "openUpgradesPicker", ()=>openUpgradesPicker); parcelHelpers.export(exports, "brickIndex", ()=>brickIndex); parcelHelpers.export(exports, "hasBrick", ()=>hasBrick); parcelHelpers.export(exports, "hitsSomething", ()=>hitsSomething); -parcelHelpers.export(exports, "shouldPierceByColor", ()=>shouldPierceByColor); -parcelHelpers.export(exports, "coinBrickHitCheck", ()=>coinBrickHitCheck); -parcelHelpers.export(exports, "bordersHitCheck", ()=>bordersHitCheck); parcelHelpers.export(exports, "tick", ()=>tick); parcelHelpers.export(exports, "confirmRestart", ()=>confirmRestart); parcelHelpers.export(exports, "toggleFullScreen", ()=>toggleFullScreen); @@ -695,72 +792,6 @@ function hasBrick(index) { function hitsSomething(x, y, radius) { return hasBrick(brickIndex(x - radius, y - radius)) ?? hasBrick(brickIndex(x + radius, y - radius)) ?? hasBrick(brickIndex(x + radius, y + radius)) ?? hasBrick(brickIndex(x - radius, y + radius)); } -function shouldPierceByColor(vhit, hhit, chit) { - if (!gameState.perks.pierce_color) return false; - if (typeof vhit !== "undefined" && gameState.bricks[vhit] !== gameState.ballsColor) return false; - if (typeof hhit !== "undefined" && gameState.bricks[hhit] !== gameState.ballsColor) return false; - if (typeof chit !== "undefined" && gameState.bricks[chit] !== gameState.ballsColor) return false; - return true; -} -function coinBrickHitCheck(coin) { - // Make ball/coin bonce, and return bricks that were hit - const radius = coin.size / 2; - const { x, y, previousX, previousY } = coin; - const vhit = hitsSomething(previousX, y, radius); - const hhit = hitsSomething(x, previousY, radius); - const chit = typeof vhit == "undefined" && typeof hhit == "undefined" && hitsSomething(x, y, radius) || undefined; - if (typeof vhit !== "undefined" || typeof chit !== "undefined") { - coin.y = coin.previousY; - coin.vy *= -1; - // Roll on corners - const leftHit = gameState.bricks[brickIndex(x - radius, y + radius)]; - const rightHit = gameState.bricks[brickIndex(x + radius, y + radius)]; - if (leftHit && !rightHit) { - coin.vx += 1; - coin.sa -= 1; - } - if (!leftHit && rightHit) { - coin.vx -= 1; - coin.sa += 1; - } - } - if (typeof hhit !== "undefined" || typeof chit !== "undefined") { - coin.x = coin.previousX; - coin.vx *= -1; - } - return vhit ?? hhit ?? chit; -} -function bordersHitCheck(coin, radius, delta) { - if (coin.destroyed) return; - coin.previousX = coin.x; - coin.previousY = coin.y; - coin.x += coin.vx * delta; - coin.y += coin.vy * delta; - coin.sx ||= 0; - coin.sy ||= 0; - coin.sx += coin.previousX - coin.x; - coin.sy += coin.previousY - coin.y; - coin.sx *= 0.9; - coin.sy *= 0.9; - if (gameState.perks.wind) coin.vx += (gameState.puckPosition - (gameState.offsetX + gameState.gameZoneWidth / 2)) / gameState.gameZoneWidth * gameState.perks.wind * 0.5; - let vhit = 0, hhit = 0; - if (coin.x < gameState.offsetXRoundedDown + radius) { - coin.x = gameState.offsetXRoundedDown + radius + (gameState.offsetXRoundedDown + radius - coin.x); - coin.vx *= -1; - hhit = 1; - } - if (coin.y < radius) { - coin.y = radius + (radius - coin.y); - coin.vy *= -1; - vhit = 1; - } - if (coin.x > gameState.canvasWidth - gameState.offsetXRoundedDown - radius) { - coin.x = gameState.canvasWidth - gameState.offsetXRoundedDown - radius - (coin.x - (gameState.canvasWidth - gameState.offsetXRoundedDown - radius)); - coin.vx *= -1; - hhit = 1; - } - return hhit + vhit * 2; -} function tick() { const currentTick = performance.now(); const timeDeltaMs = currentTick - gameState.lastTick; @@ -830,20 +861,7 @@ document.getElementById("menu").addEventListener("click", (e)=>{ }); async function openSettingsPanel() { pause(true); - const actions = [ - { - text: (0, _i18N.t)("main_menu.resume"), - help: (0, _i18N.t)("main_menu.resume_help"), - value () {} - }, - { - text: (0, _i18N.t)("main_menu.unlocks"), - help: (0, _i18N.t)("main_menu.unlocks_help"), - value () { - openUnlocksList(); - } - } - ]; + const actions = []; for (const key of Object.keys((0, _options.options)))if ((0, _options.options)[key]) actions.push({ icon: (0, _options.isOptionOn)(key) ? (0, _loadGameData.icons)["icon:checkmark_checked"] : (0, _loadGameData.icons)["icon:checkmark_unchecked"], text: (0, _options.options)[key].name, @@ -873,6 +891,18 @@ async function openSettingsPanel() { } }); } + actions.push({ + text: (0, _i18N.t)("main_menu.resume"), + help: (0, _i18N.t)("main_menu.resume_help"), + value () {} + }); + actions.push({ + text: (0, _i18N.t)("main_menu.unlocks"), + help: (0, _i18N.t)("main_menu.unlocks_help"), + value () { + openUnlocksList(); + } + }); actions.push({ text: (0, _i18N.t)("sandbox.title"), help: (0, _settings.getTotalScore)() < creativeModeThreshold ? (0, _i18N.t)("sandbox.unlocks_at", { @@ -1212,7 +1242,7 @@ var _levelsJson = require("./data/levels.json"); var _levelsJsonDefault = parcelHelpers.interopDefault(_levelsJson); var _versionJson = require("./data/version.json"); var _versionJsonDefault = parcelHelpers.interopDefault(_versionJson); -var _rawUpgrades = require("./rawUpgrades"); +var _upgrades = require("./upgrades"); var _getLevelBackground = require("./getLevelBackground"); var _levelIcon = require("./levelIcon"); const palette = (0, _paletteJsonDefault.default); @@ -1234,21 +1264,46 @@ const allLevels = rawLevelsList.map((level)=>{ threshold: li < 8 ? 0 : Math.round(Math.min(Math.pow(10, 1 + (li + l.size) / 30) * 10, 5000) * li), sortKey: (Math.random() + 3) / 3.5 * l.bricks.filter((i)=>i).length })); -const upgrades = (0, _rawUpgrades.rawUpgrades).map((u)=>({ +const upgrades = (0, _upgrades.rawUpgrades).map((u)=>({ ...u, icon: icons["icon:" + u.id] })); -},{"./data/palette.json":"ktRBU","./data/levels.json":"8JSUc","./data/version.json":"iyP6E","./rawUpgrades":"cvg5m","./getLevelBackground":"7OIPf","./levelIcon":"6rQoT","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"ktRBU":[function(require,module,exports,__globalThis) { -module.exports = JSON.parse("{\"_\":\"\",\"B\":\"black\",\"W\":\"white\",\"g\":\"#231f20\",\"y\":\"#ffd300\",\"b\":\"#6262EA\",\"t\":\"#5DA3EA\",\"s\":\"#E67070\",\"r\":\"#e32119\",\"R\":\"#ab0c0c\",\"c\":\"#59EEA3\",\"G\":\"#A1F051\",\"v\":\"#A664E8\",\"p\":\"#E869E8\",\"a\":\"#5BECEC\",\"C\":\"#53EE53\",\"S\":\"#F44848\",\"P\":\"#E66BA8\",\"O\":\"#F29E4A\",\"k\":\"#618227\",\"e\":\"#e1c8b4\",\"l\":\"#9b9fa4\"}"); - -},{}],"8JSUc":[function(require,module,exports,__globalThis) { -module.exports = JSON.parse('[{"name":"71 mini","size":5,"bricks":"bbb____bt__btt__b_t___ttt","svg":23,"color":""},{"name":"Butterfly","bricks":"_________bb_t_t_bbbbb_t_bbbbbbbtbbbb_bbbtbbb____btb____bbbtbbb__bb_t_bb__________","size":9,"svg":20,"color":""},{"name":"Castle","size":7,"bricks":"s_s_s_ssssssssssBBBssssBBBssttbbbttttbbbtttbtbtbt","svg":16},{"name":"Eyes","size":9,"bricks":"ttttttt__tWWWWWWW_tWrrWttW_tWWWWWWW_ttttttt_____t______ttttt____ttttt_____t_t","svg":null,"color":""},{"name":"Creeper","size":10,"bricks":"___________ccGGccGG__cGccGcGc__GBBccBBc__cBBGcBBc__GccBBGGc__ccBBBBcG__GGBBBBcG__cGBccBGc___________","svg":22},{"name":"Stairs","size":8,"bricks":"tt______tt______bbtt____bbtt____vvbbtt__vvbbtt__ppvvbbttppvvbbtt","svg":14},{"name":"Dots","size":9,"bricks":"b_t_a_c_c__________b_t_a_c__________P_b_t_a_c__________P_b_t_a__________P_P_b_t_a","svg":null},{"name":"Lines","size":9,"bricks":"aaaaaaaa___________tttttttt_________aaaaaaaa___________tttttttt_________aaaaaaaa","svg":8,"color":""},{"name":"Heart","size":15,"bricks":"__________________RRR___RRR_____RSSSR_RSSSR___RSWWSSRSSSSSR__RSWSSSSSSSSSR__RSSSSSSSSSSSR__RSWSSSSSSSSSR___RSSSSSSSSSR_____RSSSSSSSR_______RSSSSSR_________RSSSR___________RSR_____________R____________________________________","svg":17,"color":""},{"name":"Swiss","size":7,"bricks":"________RRRRR__RRWRR__RWWWR__RRWRR__RRRRR","svg":13,"color":""},{"name":"Germany","size":6,"bricks":"_______gggg__rrrr__yyyy","svg":null,"color":""},{"name":"France","size":8,"bricks":"_________ttWWrr__ttWWrr__ttWWrr__ttWWrr__ttWWrr________","svg":null,"color":""},{"name":"Smiley","size":8,"bricks":"_________yy__yy__yy__yy__________________yyyyyy___yyyy__________","svg":29,"color":""},{"name":"Labyrinthe","size":11,"bricks":"_______tttS_Stttt_S________t___S__Stt_ttttt____t_____S__ttt_S_S____t___t_tttt_t_S_t____tSt_t_t_Sttt___t_t_____Sttt_tttttS","svg":21},{"name":"Temple","size":11,"bricks":"_______________WWW______WWWWWWW___WWWWWWWWW___b_b_b_b____b_b_b_b____v_v_v_v____P_P_P_P____P_P_P_P____WWWWWWW___WWWWWWWWW_","svg":null,"color":""},{"name":"Pacman","size":12,"bricks":"____yyyy______yyyyyyyy___yyyyByyyyy__yyyyyyyyy__yyyyyyyy____yyyyyy______yyyyyy___S_Syyyyyyyy_____yyyyyyyyy___yyyyyyyyyy___yyyyyyyy______yyyy","svg":7,"color":""},{"name":"Ship","size":11,"bricks":"____sWW________sWWW_______sWWW_______s___OOOOOOOOOOOOOO_OBOBOBOBOO__OOOOOOOO_bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb___________","svg":19},{"name":"We come in peace","size":13,"bricks":"________________a_____a_______a___a_______aaaaaaa_____aaBaaaBaa___aaaaaaaaaaa__aaaaaaaaaaa__a_aaaaaaa_a__a_a_____a_a_____aa_aa_____________________________","svg":29,"color":""},{"name":"Space mushroom","size":10,"bricks":"______________WW_______WWWW_____WWWWWW___WWBWWBWW__WWWWWWWW____W__W_____W_WW_W___W_W__W_W","svg":6,"color":""},{"name":"Wololo","size":9,"bricks":"____WW_OOW___WW__OWW__W___OWWWbbbW_WWW_WbW_WOW__WWb__OW__bbb__O___W_W__O___W_W__O","svg":null,"color":""},{"name":"Small heart","size":15,"bricks":"________________________________RRRR___RRRR___RrWWrR_RWWrrR__RWWrrrRWWrrrR__RrrrrrrrrrrrR__RrrrrrrrrrrrR___RrrrrrrrrrR_____RrrrrrrrR_______RrrrrrR_________RrrrR___________RrR_____________R______________________","svg":29,"color":""},{"name":"Eye","size":9,"bricks":"____________ggg_____gWWWg___gWbbbWg_gWWbBbWWg_gWbbbWg___gWWWg_____ggg____________","svg":null,"color":"#5da3ea"},{"name":"Enderman","size":10,"bricks":"___________gggggggg__gggggggg__gggggggg__gggggggg__vvvggvvv__gggggggg__gggggggg__gggggggg_____________________","svg":null,"color":"#154b07"},{"name":"Mushroom","size":16,"bricks":"_____________________rrrrWW________WWrrrrWWWW_____WWrrrrrrWWWW____WrrWWWWrrWWW___rrrWWWWWWrrrrr__rrrWWWWWWrrWWr__WrrWWWWWWrWWWW__WWrrWWWWrrWWWW__WWrrrrrrrrrWWr__WrrWWWWWWWWrrr_____WWBWWBWW_______WWWBWWBWWW______WWWWWWWWWW_______WWWWWWWW____________________","svg":null,"color":""},{"name":"Tulip","size":11,"bricks":"______________R_R_R______RRRRR______RRRRR______RRRRR_______RRR_________k________k_k_k______k_k_k_______kkk_________k________________","svg":17,"color":""},{"name":"Chain","size":7,"bricks":"yyy____yBy____yyyyy____yBy____yyyyy____yBy____yyy","svg":31,"color":""},{"name":"Marion","size":9,"bricks":"rr_____rr_rr___rr__rrr_rrr__rrrrrrr__rr_r_rr__rr___rr__rr___rr__rr___rr_rrr___rrr","svg":27,"color":""},{"name":"Renan","size":9,"bricks":"yyyyyyy___yyyyyyy__yy___yy__yy___yy__yyyyyy___yy_yy____yy__yy___yy___yy_yyy___yyy","svg":3,"color":""},{"name":"Violet Pairs","size":8,"bricks":"b_b_b_b_b_b_b_b__________t_t_t_t_t_t_t_t________b_b_b_b_b_b_b_b","svg":5,"color":""},{"name":"Red Cups","size":11,"bricks":"___________rBr_rBr_rBrrrr_rrr_rrr___________r_rBr_rBr_rr_rrr_rrr_r___________rBr_rBr_rBrrrr_rrr_rrr__________","svg":23,"color":""},{"name":"Cactus","size":10,"bricks":"____G______rG_Gk______G_Gk______kkkk_r_____kkk_G______GkGk_____rGkk_______Gk________kk________kk_____","svg":27,"color":""},{"name":"Sunny Face","size":11,"bricks":"____yyy______yyyyyyy___yyyyyyyyy__yyyyyyyyy_yyyWWyWWyyyyyyyyyyyyyyyyyyyyyyyyy_yyWWWWWyy__yyyWWWyyy___yyyyyyy______yyy","svg":null,"color":"#5da3ea"},{"name":"Mountain","size":9,"bricks":"_______________W_______WWW______GGWW__W_GGGGG_kkkGGGGG_kkkkGGGGkkkkkGGGGkkkkkkGGG_________","svg":15,"color":""},{"name":"Dollar","size":17,"bricks":"________________________G_G______________G_G____________GGGGGGG_________GGGGGGGGG_______GG__G_G__GG______GG__G_G__GG______GG__G_G___________GGGGGGGG__________GGGGGGGG___________G_G__GG______GG__G_G__GG______GG__G_G__GG_______GGGGGGGGG_________GGGGGGG____________G_G______________G_G________________________","svg":null,"color":""},{"name":"Waves","size":8,"bricks":"___bbb____bbb____bbttbbbbbttbbbbttttaatttttaattttaaaaaaa","svg":20,"color":""},{"name":"Box","size":8,"bricks":"yyyyyyyyy______yy_bbbb_yy_b__b_yy_b__b_yy_bbbb_yy______yyyyyyyyy","svg":30,"color":"","squared":false},{"name":"Rose","size":9,"bricks":"__SS______SSSS_____SSSS_____SSSS______SS_k______k_kk_____kk_k______kk________k","svg":4,"color":""},{"name":"Time","size":9,"bricks":"__________WWWWWWW___WWWWW_____yyy_______y________y_______WyW_____WyyyW___yyyyyyy__________","svg":9,"color":"","squared":false},{"name":"Watermelon","size":8,"bricks":"_____Sk_____SSBk___SBSSk__SSSSSk_SSBSSk_SBSSSSk_kSSSkk___kkk____","svg":28,"color":""},{"name":"Worms","size":13,"bricks":"___sssss_______sssssss______WWsWWsss_____WBsBWsss_____WBsBWsss_____WWsWWsss_____sssssss_______ssssss_____WWWWWWss_______WssWs__s_____ssss__sss___sssssssssss__sssssssss_ss","svg":null,"color":"","squared":false},{"name":"Ocean Sunrise","size":8,"bricks":"SSSSSSSSSSSyySSSSSyyyySSSyyyyyySbttttttbbbttttbbbbbttbbbbbbbbbbb","svg":12,"color":""},{"name":"Crosses","size":13,"bricks":"b___b___b___b__v___v___v___vvv_vvv_vvv___v___v___v__p___p___p___ppp_ppp_ppp_ppp___p___p___p__P___P___P___PPP_PPP_PPP___P___P___P__p___p___p___ppp_ppp_ppp_ppp___p___p___p","svg":10,"color":""},{"name":"Negative space","size":9,"bricks":"tttttttttt_t_t_t_t_________b_b_b_b_bbbbbbbbbb_b_b_b_b___________t_t_t_t_ttttttttt_________","svg":null},{"name":"UK","size":11,"bricks":"brbbWrWbbrbbbrbWrWbrbbbbbrWrWrbbbWWWWWrWWWWWrrrrrrrrrrrWWWWWrWWWWWbbbrWrWrbbbbbrbWrWbrbbbrbbWrWbbrb__________","svg":null,"color":""},{"name":"Greece","size":11,"bricks":"ttWttttttttttWttWWWWWWWWWWWttttttttWttWWWWWWttWttttttttWWWWWWWWWWWtttttttttttWWWWWWWWWWWttttttttttt__________","svg":null,"color":""},{"name":"Russia","size":8,"bricks":"________WWWWWWWWWWWWWWWWttttttttttttttttrrrrrrrrrrrrrrrr________________","svg":null,"color":""},{"name":"Ukraine","size":8,"bricks":"________ttttttttttttttttttttttttyyyyyyyyyyyyyyyyyyyyyyyy________","svg":null,"color":""},{"name":"Poland","size":7,"bricks":"________WWWWW__WWWWW__rrrrr__rrrrr_______________","svg":null,"color":""},{"name":"Yellow 71","size":9,"bricks":"_________yyyyy__yyyyyyy_yyy___yy__yy__yyy__yy_yyy___yy_yy____yy_yy____yy__________________","svg":26,"color":""},{"name":"71 on white","size":6,"bricks":"WWWWWWrrrWWrWWrWrrWrWWWrWrWWWrWWWWWW______","svg":null},{"name":"Blue 71","size":8,"bricks":"ttttt__bttttt_bb___ttbbb__tt__bb__tt__bb_tt___bb_tt___bb_tt___bb","svg":null,"color":""},{"name":"Seventy one","size":21,"bricks":"rr_yy_rrry_yrrry_yrrrr_ry_yr__y_yr_ry_y_r_rr_yy_rr_yy_r_ry_y_r_r_ry_yr__y_yr_ry_y_r_rr_y_yrrry_yrrryyy_r_yyy__________________y______________r_____yyyrrry_yrrryyyrr_y_y__yrr_y_yrr_y_yr__y_yyyyrrr_y_rrry_yrrryyy____________________yrrryyyrrr_________yy_r_ry_yrr_____________rrry_yrrryyyyyyyyyyyy_____________________________________________________________________________________________________________________________","svg":null},{"name":"B71","size":10,"bricks":"__________bbbtttt_b_b__b__tbb_b__b__t_b_bbb__t__b_b__b_t__b_b__bt___b_bbb_t__bbb__________","svg":null},{"name":"Pig","size":9,"bricks":"__________PP___PP__PPP_PPP__WWPPPWW__WBPPPBW__PPsssPP__PsBsBsP__PPsssPP___________","svg":null},{"name":"Big Pig","size":15,"bricks":"________________sss_______sss__ss__sssss__ss____sssssssss_____sWBsssssBWs___ssBBsssssBBss__ssss_____ssss__sss_sssss_sss__sss_sBsBs_sss__sss_sssss_sss___sss_____sss____sssssssssss__GGGsssssssssGGGGGGsGsssssGsGGGGGGssGGGGGssGGG_______________","svg":2,"color":""},{"name":"Donkey Kong","size":9,"bricks":"OOr__a___OOr__a___ppppppp_O______a________a____pppppppr_a______b_a___O__ppppppp__","svg":null,"color":""},{"name":"Banana","size":12,"bricks":"_________________e__________eee_________eee_________eee_________eeeyy_____yyeeyyyy___yyyyey_yC___yy_yyy___C_____yyyy_________yyyy_________yyyy","svg":null},{"name":"Fox","size":8,"bricks":"e______eee_OO_eeeeOOOOeeeOBOOBOeOOOOOOOO_WWBBWW___WWWW_____WW___","svg":null},{"name":"Wiki","size":10,"bricks":"_______________________GGGG_____GGkkGG___GkggggkG__GgWWWWgG__GkggggkG___GGkkGG_____GGGG_______________________","svg":null},{"name":"Baby Dog","size":8,"bricks":"_______W__eeeeWWWWeeWeWWWegWegeeeeWWWWee_eWggWe__eWWWWe____WW","svg":null},{"name":"Cute dog","size":9,"bricks":"__________O_____O_OOOWWWOOOOOWWWWWOOOOeWWWWOO_eBeWWBW__eBeWWBW___eWBWW_____WRW____________","svg":null},{"name":"icon:extra_life","size":9,"bricks":"___________rr_rr___rrrrrrr_rrrrrrrrrrrrrrrrrr_rrrrrrr___rrrrr_____rrr_______r_____________","svg":null},{"name":"icon:streak_shots","size":8,"bricks":"_W_W_W__W_W_W_W_tttttt_WttttttW_tttttt_W______W______W_____WWWW","svg":null},{"name":"icon:base_combo","size":8,"bricks":"ttttttttttyyttttttyytyyttttttyyttyyttttttyytyyttttttyytttttttttt________","svg":null},{"name":"icon:slow_down","size":10,"bricks":"_____________kk_______kkkk_____kkkkkkGG__kkkkkkGBG_kkkkkkGGGGkkkkkkGG__GGGGGG____GG__GG_____________","svg":null},{"name":"icon:bigger_puck","size":8,"bricks":"_________tttttt__tttttt______________________W___________WWWWWW_","svg":null},{"name":"icon:viscosity","size":8,"bricks":"________tt______bbtt__ttbbbbttbbbtbbtbbbbbtbbtbbbbbybbybbbbbbbbb","svg":null},{"name":"icon:left_is_lava","size":8,"bricks":"r_______rtttttt_rtttttt_r_______r_______r____W__r_______r_WWW___","svg":null},{"name":"icon:right_is_lava","size":8,"bricks":"_______r_ttttttr_ttttttr_______r_______r_____W_r_______r__WWW__r","svg":null},{"name":"icon:telekinesis","size":8,"bricks":"_____PW_____s______P______s_______P_______s_______P_____WWWWW","svg":null},{"name":"icon:top_is_lava","size":8,"bricks":"rrrrrrrr_tttttt__tttttt____________________W_______________WWW__","svg":null},{"name":"icon:coin_magnet","size":8,"bricks":"__y__y_yy_________y_y_y_y________y_y______________y______WWW____","svg":null},{"name":"icon:skip_last","size":5,"bricks":"_ttt_t_t_ttt_ttt_t_t_ttt_","svg":null},{"name":"icon:multiball","size":8,"bricks":"_________tttttt__tttttt___________W__W____________________WWW___","svg":null},{"name":"icon:smaller_puck","size":8,"bricks":"_________tttttt__tttttt_____________W_____________________WW____","svg":null},{"name":"icon:pierce","size":6,"bricks":"ttttttttttWtttt__ttt__ttt__ttt__tttt","svg":null},{"name":"icon:picky_eater","size":8,"bricks":"rtrtrtrttrtrtrtrrtrtrtrt____________________t_____________WWWW","svg":null},{"name":"icon:metamorphosis","size":8,"bricks":"aaaaaa__aaaa__________W___________ttaatt__tttttt_________WWW","svg":null},{"name":"icon:compound_interest","size":8,"bricks":"_________tttttt__ttt__t______y_____________W__y_________rrWWWrrr","svg":null},{"name":"icon:hot_start","size":7,"bricks":"ttttttttttt_tt_____W_____y_y_____y_____y_y_WWW_y_","svg":null},{"name":"icon:sapper","size":9,"bricks":"_____WW______W__W_tttWttt_yttgggtt__tgggggt__tgggggt__tgggggt__ttgggtt__ttttttt___________","svg":null,"color":"#000000"},{"name":"icon:bigger_explosions","size":8,"bricks":"__r_______ry_rr___ryry__ryyyW_rr_rrWyyy___yryrr__yrry_rr_rr","svg":null},{"name":"icon:extra_levels","size":6,"bricks":"__________b__t_bb_ttt_b__t_bbb____________","svg":null},{"name":"icon:pierce_color","size":8,"bricks":"bb___bbbb__b_bbb_____bbb____bbbbb____bbbbb____bbbbb____bbbbb____","svg":null},{"name":"icon:soft_reset","size":8,"bricks":"___rg_____rrgg___rryggg_rryWggggrryWgggg_ryyggg___rrgg_____rg___","svg":null},{"name":"icon:ball_repulse_ball","size":8,"bricks":"WsP__PsWs______sP______P________________P______Ps______sWsP__PsW","svg":null},{"name":"icon:ball_attract_ball","size":8,"bricks":"__P__P____s__s__PsW__WsP________________PsW__WsP__s__s____P__P__","svg":null},{"name":"icon:puck_repulse_ball","size":8,"bricks":"__________________W_______s___W___P__s______P____________WWW__","svg":null},{"name":"A","size":7,"bricks":"___t_____ttt___t___t__t___t_tttttttt_____tt_____t","svg":null},{"name":"B","size":9,"bricks":"_bbbbb_____bb_bb____bb_bb____bb_bb____bbbb_____bb_bb____bb_bb____bb_bb___bbbbb____","svg":null},{"name":"C","size":8,"bricks":"__rrrr___rrrrrr_rrr___rrrr______rr______rrr___rr_rrrrrr___rrrr","svg":null},{"name":"D","size":8,"bricks":"_GGGGG____GG__G___GG__GG__GG__GG__GG__GG__GG__GG__GG__G__GGGGG","svg":null},{"name":"e","size":8,"bricks":"__tttt___tttttt_tt____tttt____tttttttttttt_______tt__tt___tttt_","svg":null},{"name":"icon:wind","size":9,"bricks":"_ss______s___PPPP_s_________sssssss___________sssssss_s________s___PPPP__ss","svg":null},{"name":"icon:sturdy_bricks","size":7,"bricks":"ttbttttbtttbtt____W_____W_W___W___W_______WWW____","svg":null},{"name":"icon:respawn","size":9,"bricks":"tttt___ttttt__t__ttta_ttt_______________________________W_________________WWW","svg":null},{"name":"Elephant","size":18,"bricks":"_________________________llll_________lll_llllll_lll___lsssllllllllsssl__lsssllllllllsssl__lsssllBllBllsssl__lssllWllllWllssl___ll__llllll__ll_________llll_______________ll______________llll______________ll________________________________________________________________________________________________________________________________________","svg":25,"color":""},{"name":"Orca","size":20,"bricks":"____________________________________________________________________________________________BBBBB____BBB_BBB___BBBBBBB____BBBBB___BBBBBBBBB____BBB___BBBBWBBWWW_____BBBBBBBBBBBWWWW_____BBBBBBBBBBWWWWW_____BBBBBBBBBWWWWW_______BBBBBBBWWWWW___________WWBBWWW______________BBB_BB______________BB__B______________________________________________________________________________________________________________________________","svg":null,"color":"#1c71d8"},{"name":"Shark","size":17,"bricks":"__________________________________________g_______________ggg____________ggggggg_________ggggggggg_______ggggggggggg_____gggggWWWggggg____gBgWWWWWWWgBg___ggWWWWrWrWWWWgg__ggWWWrrrrrWWWgg_ggWWWrrrrrrrWWWggggWWrrrrrrrrrWWgggWWWrWrWrWrWrWWWggWWrrWWWWWWWrrWWggWWWWWWWWWWWWWWWg_________________","svg":null,"color":"#3584e4"},{"name":"Bird","size":13,"bricks":"_______RRR____R____RSSSR___RR__RSSWWWR__RSR_RSWWBWR__RSSRRSWWWWyy_RSSSRSWWWR___RSSSSSSRR_____RRSSyyyy______RSyyyyy___RRRRSyyyy____RSSSRyyy_____RRRR______________________","svg":null,"color":""},{"name":"Tux","size":14,"bricks":"_____gggg________gggggggg_____gggggggggg____gggggggggg___gggggggggggg__gggWBggWBggg__gggBBggBBggg__ggggyyyygggg_ggggggyyggggggggggWWWWWWggggg_gWWWWWWWWg_g__WWWWWWWWWW____WWWWWWWWWW____yyy____yyy__","svg":null,"color":"#62a0ea"},{"name":"Armenia","size":6,"bricks":"_______rrrr__bbbb__yyyy_____________","svg":null,"color":""},{"name":"Austria","size":6,"bricks":"_______rrrr__WWWW__rrrr______","svg":null,"color":""},{"name":"Benin","size":8,"bricks":"_________kkyyyy__kkyyyy__kkrrrr__kkrrrr__________________________","svg":null,"color":""},{"name":"Botswana","size":10,"bricks":"___________tttttttt__tttttttt__tttttttt__WWWWWWWW__BBBBBBBB__WWWWWWWW__tttttttt__tttttttt__tttttttt___________","svg":null,"color":""},{"name":"Bulgaria","size":6,"bricks":"_______WWWW__cccc__rrrr_____________","svg":null,"color":""},{"name":"Canada","size":7,"bricks":"________rWWWr__rWrWr__rWWWr______________________","svg":null,"color":""},{"name":"Chad","size":8,"bricks":"_________bbyyRR__bbyyRR__bbyyRR","svg":null,"color":""},{"name":"China","size":8,"bricks":"_________RRyRRR__RyRyRR__RRyRRR__RRRRRR","svg":null,"color":""},{"name":"Colombia","size":7,"bricks":"________yyyyy__yyyyy__bbbbb__RRRRR_______________","svg":null,"color":""},{"name":"Republic of the Congo","size":7,"bricks":"________kkkyy__kkyyr__kyyrr__yyrrr_______________","svg":null,"color":""},{"name":"C\xf4te d\'Ivoire","size":8,"bricks":"_________OOWWGG__OOWWGG__OOWWGG","svg":null,"color":""},{"name":"Denmark","size":8,"bricks":"_________rrWrrr__rrWrrr__WWWWWW__rrWrrr__rrWrrr","svg":null,"color":""},{"name":"El Salvador","size":8,"bricks":"_________bbbbbb__bbbbbb__WWWkWW__WWkWWW__bbbbbb__bbbbbb","svg":null,"color":""},{"name":"Egypt","size":8,"bricks":"_________RRRRRR__RRRRRR__WWWyWW__WWyWWW__gggggg__gggggg","svg":null,"color":"#1c71d8"},{"name":"Estonia","size":8,"bricks":"_________tttttt__tttttt__gggggg__gggggg__WWWWWW__WWWWWW","svg":null,"color":"#986a44"},{"name":"Finland","size":6,"bricks":"_______WtWW__tttt__WtWW_____________","svg":null,"color":""},{"name":"Gabon","size":5,"bricks":"______CCC__yyy__ttt______","svg":null,"color":""},{"name":"Georgia","size":9,"bricks":"__________WrWrWrW__WWWrWWW__rrrrrrr__WWWrWWW__WrWrWrW__________________","svg":null,"color":""},{"name":"Guinea","size":8,"bricks":"_________rryycc__rryycc__rryycc","svg":null,"color":""},{"name":"Indonesia","size":6,"bricks":"_______rrrr__rrrr__WWWW__WWWW_______","svg":null,"color":""},{"name":"icon:one_more_choice","size":7,"bricks":"ttt____tbbb___tbttt__tbtbbb__btbbb___tbbb____bbb_","svg":null},{"name":"icon:instant_upgrade","size":5,"bricks":"ttt__tbbb_tbbb_tbbb__bbb_","svg":null},{"name":"icon:checkmark_checked","size":6,"bricks":"_WWWWGWBBBGGGGBGGWWGGGBWWBGBBW_WWWW_","svg":null},{"name":"icon:checkmark_unchecked","size":6,"bricks":"_WWWW_WBBBBWWBBBBWWBBBBWWBBBBW_WWWW_","svg":null},{"name":"icon:fullscreen","size":6,"bricks":"WW__WWW____W____________W____WWW__WW","svg":null},{"name":"icon:exit_fullscreen","size":6,"bricks":"_W__W_WW__WW____________WW__WW_W__W_","svg":null},{"name":"icon:concave_puck","size":8,"bricks":"___________W_______________W_______________W_____________WWWWW__","svg":null,"color":""}]'); - -},{}],"iyP6E":[function(require,module,exports,__globalThis) { +},{"./data/palette.json":"ktRBU","./data/levels.json":"8JSUc","./data/version.json":"iyP6E","./getLevelBackground":"7OIPf","./levelIcon":"6rQoT","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3","./upgrades":"1u3Dx"}],"iyP6E":[function(require,module,exports,__globalThis) { module.exports = JSON.parse("\"29040074\""); -},{}],"cvg5m":[function(require,module,exports,__globalThis) { +},{}],"6rQoT":[function(require,module,exports,__globalThis) { +var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); +parcelHelpers.defineInteropFlag(exports); +parcelHelpers.export(exports, "levelIconHTML", ()=>levelIconHTML); +let levelIconHTMLCanvas = document.createElement("canvas"); +const levelIconHTMLCanvasCtx = levelIconHTMLCanvas.getContext("2d", { + antialias: false, + alpha: true +}); +function levelIconHTML(bricks, levelSize, color) { + const size = 40; + const c = levelIconHTMLCanvas; + const ctx = levelIconHTMLCanvasCtx; + if (!ctx) return ""; + c.width = size; + c.height = size; + if (color) { + ctx.fillStyle = color; + ctx.fillRect(0, 0, size, size); + } else ctx.clearRect(0, 0, size, size); + const pxSize = size / levelSize; + for(let x = 0; x < levelSize; x++)for(let y = 0; y < levelSize; y++){ + const c = bricks[y * levelSize + x]; + if (c) { + ctx.fillStyle = c; + ctx.fillRect(Math.floor(pxSize * x), Math.floor(pxSize * y), Math.ceil(pxSize), Math.ceil(pxSize)); + } + } + return ``; +} + +},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"1u3Dx":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); parcelHelpers.defineInteropFlag(exports); parcelHelpers.export(exports, "rawUpgrades", ()=>rawUpgrades); @@ -1604,6 +1659,78 @@ const rawUpgrades = [ name: (0, _i18N.t)("upgrades.concave_puck.name"), help: (lvl)=>(0, _i18N.t)("upgrades.concave_puck.help"), fullHelp: (0, _i18N.t)("upgrades.concave_puck.fullHelp") + }, + { + requires: "", + threshold: 65000, + giftable: false, + id: "antigrav", + max: 1, + name: (0, _i18N.t)("upgrades.antigrav.name"), + help: (lvl)=>(0, _i18N.t)("upgrades.antigrav.help"), + fullHelp: (0, _i18N.t)("upgrades.antigrav.fullHelp") + }, + { + requires: "", + threshold: 70000, + giftable: false, + id: "asceticism", + max: 1, + name: (0, _i18N.t)("upgrades.asceticism.name"), + help: (lvl)=>(0, _i18N.t)("upgrades.asceticism.help"), + fullHelp: (0, _i18N.t)("upgrades.asceticism.fullHelp") + }, + { + requires: "", + threshold: 75000, + giftable: false, + id: "unbounded", + max: 1, + name: (0, _i18N.t)("upgrades.unbounded.name"), + help: (lvl)=>(0, _i18N.t)("upgrades.unbounded.help"), + fullHelp: (0, _i18N.t)("upgrades.unbounded.fullHelp") + }, + { + requires: "", + threshold: 80000, + giftable: false, + id: "shunt", + max: 1, + name: (0, _i18N.t)("upgrades.shunt.name"), + help: (lvl)=>(0, _i18N.t)("upgrades.shunt.help"), + fullHelp: (0, _i18N.t)("upgrades.shunt.fullHelp") + }, + { + requires: "", + threshold: 85000, + giftable: false, + id: "yoyo", + max: 2, + name: (0, _i18N.t)("upgrades.yoyo.name"), + help: (lvl)=>(0, _i18N.t)("upgrades.yoyo.help"), + fullHelp: (0, _i18N.t)("upgrades.yoyo.fullHelp") + }, + { + requires: "", + threshold: 90000, + giftable: false, + id: "nbricks", + max: 3, + name: (0, _i18N.t)("upgrades.nbricks.name"), + help: (lvl)=>(0, _i18N.t)("upgrades.nbricks.help", { + lvl + }), + fullHelp: (0, _i18N.t)("upgrades.nbricks.fullHelp") + }, + { + requires: "", + threshold: 95000, + giftable: false, + id: "etherealcoins", + max: 1, + name: (0, _i18N.t)("upgrades.etherealcoins.name"), + help: (lvl)=>(0, _i18N.t)("upgrades.etherealcoins.help"), + fullHelp: (0, _i18N.t)("upgrades.etherealcoins.fullHelp") } ]; @@ -1641,10 +1768,10 @@ function getFirstBrowserLanguage() { } },{"./fr.json":"b97sx","./en.json":"uYc9N","../settings":"5blfu","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"b97sx":[function(require,module,exports,__globalThis) { -module.exports = JSON.parse('{"confirmRestart.no":"Annuler ,continuer ma partie en cours","confirmRestart.text":"Vous \xeates sur le point de commencer une nouvelle partie, est-ce vraiment ce que vous vouliez ?","confirmRestart.title":"D\xe9marrer une nouvelle partie ?","confirmRestart.yes":"Commencer une nouvelle partie","gameOver.cumulative_total":"Votre score total cumul\xe9 est pass\xe9 de {{startTs}} \xe0 {{endTs}}.","gameOver.lost.summary":"Vous avez fait tomber la balle apr\xe8s avoir attrap\xe9 {{score}} pi\xe8ces.","gameOver.lost.title":"Balle perdue","gameOver.next_unlock":"Marquez {{points}} points suppl\xe9mentaires pour d\xe9bloquer la prochaine am\xe9lioration ou le prochain niveau.","gameOver.restart":"Nouvelle partie","gameOver.stats.balls_lost":"Balles perdues","gameOver.stats.bricks_broken":"Briques cass\xe9es","gameOver.stats.bricks_per_minute":"Briques cass\xe9es par minute","gameOver.stats.catch_rate":"Pi\xe8ces attrap\xe9es","gameOver.stats.combo_avg":"Combo moyen","gameOver.stats.combo_max":"Combo maximum","gameOver.stats.duration_per_level":"Dur\xe9e par niveau","gameOver.stats.hit_rate":"Pr\xe9cision","gameOver.stats.intro":"Vous trouverez ci-dessous les statistiques de cette partie compar\xe9es \xe0 vos {{count}} meilleures parties.","gameOver.stats.level_reached":"Niveau atteint","gameOver.stats.total_score":"Score total","gameOver.stats.upgrades_applied":"Mises \xe0 jour appliqu\xe9es","gameOver.test_run":"Cette partie de test et son score ne sont pas enregistr\xe9s.","gameOver.unlocked_count":"Vous avez d\xe9bloqu\xe9 {{count}} objet(s) :","gameOver.win.summary":"Vous avez nettoy\xe9 tous les niveaux pour cette partie, en attrapant {{score}} pi\xe8ces au total.","gameOver.win.title":"Partie termin\xe9e","level_up.after_buttons":"Vous venez de terminer le niveau {{level}}/{{max}} et vous avez choisi ces am\xe9liorations jusqu\'\xe0 pr\xe9sent :","level_up.before_buttons":"Vous avez attrap\xe9 {{score}} pi\xe8ces {{catchGain}} sur {{levelSpawnedCoins}} en {{time}} secondes {{timeGain}}.\\n\\nVous avez rat\xe9 les briques {{levelMisses}} fois {{missesGain}} et touch\xe9 les bords de la zone de jeu {{levelWallBounces}} fois {{wallHitsGain}}.\\n\\n{{compliment}}","level_up.compliment_advice":"Essayez d\'attraper toutes les pi\xe8ces, de ne jamais rater les briques, de ne pas toucher les murs ou de terminer le niveau en moins de 30 secondes pour obtenir des choix suppl\xe9mentaires et des am\xe9liorations.","level_up.compliment_good":"Bravo !","level_up.compliment_perfect":"Impressionnant, continuez comme \xe7a !","level_up.pick_upgrade_title":"Choisir une am\xe9lioration","level_up.plus_one_choice":"(+1 choix)","level_up.plus_one_upgrade":"(+1 am\xe9lioration et +1 choix)","level_up.unlocked_level":" (Niveau)","level_up.unlocked_perk":" (Am\xe9lioration)","level_up.upgrade_perk_to_level":" niveau {{level}}","main_menu.basic":"Graphismes simplifi\xe9s","main_menu.basic_help":"Moins de particules et effets, meilleures performances.","main_menu.download_save_file":"Sauvegarder mes progr\xe8s","main_menu.download_save_file_help":"Obtenir un fichier de sauvegarde .b71 transf\xe9rable","main_menu.footer_html":"

\\nProgramm\xe9 en France par Renan LE CARO.\\nDonner\\nDiscord\\nF-Droid\\nGoogle Play\\nitch.io\\nGitlab\\nVersion web\\nHackerNews\\nPolitique de confidentialit\xe9 \\nv.{{appVersion}}\\n

","main_menu.fullscreen":"Plein \xe9cran","main_menu.fullscreen_exit":"Quitter le plein \xe9cran","main_menu.fullscreen_exit_help":"Peut ne pas fonctionner sur certaines machines","main_menu.fullscreen_help":"Peut ne pas fonctionner sur certaines machines","main_menu.kid":"Mode enfants","main_menu.kid_help":"Balle plus lente","main_menu.language":"Langue","main_menu.language_help":"Changer la langue d\'affichage","main_menu.load_save_file":"Charger une sauvegarde","main_menu.load_save_file_help":"S\xe9lectionnez un fichier .b71 sur votre appareil ","main_menu.mobile":"Mode mobile","main_menu.mobile_help":"Laisse un espace pour le pouce sous le palet.","main_menu.pointer_lock":"Verrouillage du pointeur de la souris","main_menu.pointer_lock_help":"Verrouille et cache le curseur de la souris.","main_menu.record":"Enregistrer des vid\xe9os de jeu","main_menu.record_download":"T\xe9l\xe9charger la vid\xe9o ({{size}} MB)","main_menu.record_help":"Obtenez une vid\xe9o de chaque niveau.","main_menu.reset":"R\xe9initialiser le jeu","main_menu.reset_cancel":"Non","main_menu.reset_confirm":"Oui","main_menu.reset_help":"Effacer le meilleur score et les statistiques","main_menu.reset_instruction":"Vous perdrez tous les progr\xe8s que vous avez faits dans le jeu, \xeates-vous s\xfbr ?","main_menu.resume":"Retourner \xe0 la partie","main_menu.resume_help":"Continuer la partie en cours","main_menu.save_file_error":"Erreur lors du chargement du fichier de sauvegarde","main_menu.save_file_loaded":"Sauvegarde charg\xe9e","main_menu.save_file_loaded_help":"L\'appli va red\xe9marrer","main_menu.save_file_loaded_ok":"Ok","main_menu.sounds":"Sons du jeu","main_menu.sounds_help":"Ralentis certains t\xe9l\xe9phones.","main_menu.title":"Breakout 71","main_menu.unlocks":"Am\xe9liorations et niveaux","main_menu.unlocks_help":"Essayez les \xe9l\xe9ments d\xe9bloqu\xe9s","play.close_modale_window_tooltip":"Fermer","play.current_lvl":"Niveau {{level}}/{{max}}","play.menu_label":"Menu","play.missed_ball":"rat\xe9","play.mobile_press_to_play":"Gardez le doigt ici pour jouer","sandbox.help":"Tester n\'importe quelle combinaison d\'am\xe9liorations","sandbox.instructions":"S\xe9lectionnez les am\xe9lioration ci-dessous et appuyez sur \\"D\xe9marrer la partie de test\\" pour les tester. Les scores et les statistiques ne seront pas enregistr\xe9s.","sandbox.start":"D\xe9marrer la partie de test","sandbox.title":"Mode bac \xe0 sable","sandbox.unlocks_at":"D\xe9verrouill\xe9 \xe0 partir d\'un score total de {{score}}","score_panel.restart":"Red\xe9marrer","score_panel.restart_help":"Commencer une nouvelle partie","score_panel.resume":"Continuer la partie","score_panel.resume_help":"Fermer cette fen\xeatre pour retourner au jeu","score_panel.test_run":"Il s\'agit d\'une partie d\'essai, le score n\'est pas enregistr\xe9.","score_panel.title":"{{score}} points au niveau {{level}}/{{max}} ","score_panel.upgrades_picked":"Am\xe9liorations choisies jusqu\'\xe0 pr\xe9sent :","unlocks.greyed_out_help":"Les \xe9l\xe9ments gris\xe9es peuvent \xeatre d\xe9bloqu\xe9es en augmentant votre score total. Le score total augmente \xe0 chaque fois que vous marquez des points dans le jeu.","unlocks.intro":"Votre score total est de {{ts}}. Vous trouverez ci-dessous toutes les am\xe9liorations et tous les niveaux que le jeu peut offrir.","unlocks.level_description":"Un niveau {{size}}x{{size}} avec {{bricks}} briques","unlocks.title":"Vous avez d\xe9bloqu\xe9 {{percentUnlock}}% du jeu.","unlocks.unlocks_at":"D\xe9verrouill\xe9 au score total {{threshold}}.","upgrades.ball_attract_ball.fullHelp":"Les balles qui sont \xe9loign\xe9es de plus d\'une demi-largeur d\'\xe9cran commencent \xe0 s\'attirer. La force d\'attraction est plus forte lorsque les balles sont plus \xe9loign\xe9es l\'une de l\'autre. Des particules arc-en-ciel voleront pour symboliser la force d\'attraction. Cet avantage n\'est offert que si vous avez d\xe9j\xe0 plus d\'une balle en jeu.","upgrades.ball_attract_ball.help":"Les balles attirent les balles","upgrades.ball_attract_ball.help_plural":"Force d\'attraction plus forte","upgrades.ball_attract_ball.name":"Gravit\xe9","upgrades.ball_repulse_ball.fullHelp":"Les balles qui se trouvent \xe0 moins d\'une demi-largeur d\'\xe9cran commencent \xe0 se repousser les unes les autres. La force de r\xe9pulsion est plus forte si elles sont proches l\'une de l\'autre. Des particules seront affich\xe9es pour symboliser l\'application de cette force. Cet avantage n\'est offert que si vous avez d\xe9j\xe0 plus d\'une balle.","upgrades.ball_repulse_ball.help":"Les balles repoussent les balles","upgrades.ball_repulse_ball.help_plural":"Force de r\xe9pulsion plus forte","upgrades.ball_repulse_ball.name":"Vol en formation","upgrades.base_combo.fullHelp":"Votre combo (nombre de pi\xe8ces par brique) commence normalement \xe0 1 au d\xe9but du niveau et revient \xe0 1 lorsque vous rebondissez sans rien toucher. Avec cette caract\xe9ristique, le combo commence 3 points plus haut, ce qui fait que vous obtiendrez toujours au moins 4 pi\xe8ces par brique. Lorsque votre combo est r\xe9initialis\xe9, il revient \xe0 4 et non \xe0 1. Votre balle scintillera un peu pour indiquer que son combo est sup\xe9rieur \xe0 1.","upgrades.base_combo.help":"Le combo commence \xe0 {{coins}}.","upgrades.base_combo.name":"Combo +3","upgrades.bigger_explosions.fullHelp":"L\'explosion par d\xe9faut efface un carr\xe9 de 3x3 briques, avec cette am\xe9lioration un carr\xe9 de 5x5. Le vent soufflant les pi\xe8ces est \xe9galement beaucoup plus fort. L\'\xe9cran clignotera un peu apr\xe8s chaque explosion (sauf en mode graphismes basiques).","upgrades.bigger_explosions.help":"Explosions plus violentes","upgrades.bigger_explosions.name":"Kaboom","upgrades.bigger_puck.fullHelp":"Un grand palet permet de ne jamais rater la balle et d\'attraper plus de pi\xe8ces, ainsi que d\'orienter pr\xe9cis\xe9ment les rebonds (l\'angle de la balle ne d\xe9pend que de l\'endroit o\xf9 elle touche le palet). Cependant, un grand palet est plus difficile \xe0 utiliser sur les c\xf4t\xe9s du niveau.","upgrades.bigger_puck.help":"Attrapez facilement plus de pi\xe8ces.","upgrades.bigger_puck.name":"Palet plus grand","upgrades.coin_magnet.fullHelp":"Dirige les pi\xe8ces vers le palet. L\'effet est plus fort si la pi\xe8ce est d\xe9j\xe0 proche du palet. Attraper 90 % ou 100 % des pi\xe8ces apporte des bonus sp\xe9ciaux dans le jeu. Une autre fa\xe7on d\'attraper plus de pi\xe8ces est de frapper les briques par le bas. La vitesse et la direction de la balle ont un impact sur la vitesse des pi\xe8ces produites.","upgrades.coin_magnet.help":"Le palet attire les pi\xe8ces","upgrades.coin_magnet.help_plural":"Effet plus marqu\xe9 sur les pi\xe8ces","upgrades.coin_magnet.name":"Aimant pour pi\xe8ces","upgrades.compound_interest.fullHelp":"Votre combo augmentera d\'une unit\xe9 \xe0 chaque fois que vous casserez une brique, g\xe9n\xe9rant de plus en plus de pi\xe8ces \xe0 chaque fois que vous casserez une brique. Veillez cependant \xe0 attraper chacune de ces pi\xe8ces avec votre palet, car toute pi\xe8ce perdue remettra votre combo \xe0 z\xe9ro. \\n \\nSi votre combinaison est sup\xe9rieure au minimum, une ligne rouge s\'affichera au bas de la zone de jeu pour vous le rappeler que les pi\xe8ces ne doivent pas aller \xe0 cet endroit.\\n\\nCet avantage se combine avec d\'autres avantages de combo, le combo augmentera plus rapidement mais se r\xe9initialisera plus souvent.","upgrades.compound_interest.help":"+1 combo par brique cass\xe9e, remise \xe0 z\xe9ro quand une pi\xe8ce est perdu","upgrades.compound_interest.name":"Int\xe9r\xeats","upgrades.concave_puck.fullHelp":" Les balles d\xe9marrent verticalement en d\xe9but de niveau, et rebondi sur le palet de mani\xe8re plus verticale et invers\xe9e.","upgrades.concave_puck.help":"Aide \xe0 \xe9viter les bords.","upgrades.concave_puck.name":"Palet concave","upgrades.extra_levels.fullHelp":"La partie dure normalement 7 niveaux, apr\xe8s quoi le jeu est termin\xe9 et le score que vous avez atteint est votre score de partie.\\n\\nChoisir cette am\xe9lioration vous permet de prolonger la partie d\'un niveau. Les derniers niveaux sont souvent ceux o\xf9 vous faites le plus de points, la diff\xe9rence peut donc \xeatre spectaculaire.","upgrades.extra_levels.help":"Jouer {{count}} niveaux au lieu de 7","upgrades.extra_levels.name":"+1 niveau","upgrades.extra_life.fullHelp":"Normalement, vous n\'avez qu\'une seule balle par manche, et la manche est termin\xe9e d\xe8s que vous la laissez tomber.\\nCette comp\xe9tence ajoute une barre blanche en bas de l\'\xe9cran qui sauvera une balle une fois, et se brisera au cours du processus.\\nVous pouvez prendre plusieurs vies d\'avances, elle seront utilis\xe9es \xe0 chaque fois qu\'une balle est sur le point d\'\xeatre perdue. ","upgrades.extra_life.help":"La balle rebondit une fois avant d\'\xeatre perdue.","upgrades.extra_life.help_plural":"La balle rebondit {{lvl}} fois avant d\'\xeatre perdue.","upgrades.extra_life.name":"+1 vie","upgrades.hot_start.fullHelp":"Au d\xe9but de chaque niveau, votre combo commencera \xe0 +15 points, mais \xe0 chaque seconde, il sera diminu\xe9 d\'un point. Cela signifie que les 15 premi\xe8res secondes d\'un niveau produiront beaucoup plus de pi\xe8ces que les suivantes.\\nVous devez vous assurer de terminer le niveau rapidement. L\'effet se cumule avec d\'autres avantages li\xe9s au combo, ce qui vous permet d\'augmenter le combo apr\xe8s les 15 secondes, mais il continuera \xe0 diminuer chaque seconde. Chaque fois que vous reprenez la comp\xe9tence, l\'effet est encore plus prononc\xe9.","upgrades.hot_start.help":"Combo \xe0 {{start}}, -{{lvl}} combo par seconde","upgrades.hot_start.name":"D\xe9marrage \xe0 chaud","upgrades.instant_upgrade.fullHelp":"Choisissez imm\xe9diatement deux am\xe9liorations, afin d\'en obtenir une gratuite et une autre pour rembourser celle utilis\xe9e pour obtenir cet avantage. Chaque fois que vous choisirez des am\xe9liorations dans le menu suivant, vous aurez moins de choix.","upgrades.instant_upgrade.help":"-1 choix jusqu\'\xe0 la fin de la course.","upgrades.instant_upgrade.name":"+2 am\xe9liorations maintenant","upgrades.left_is_lava.fullHelp":"Chaque fois que vous cassez une brique, votre combo augmente d\'une unit\xe9, ce qui vous permet d\'obtenir une pi\xe8ce de plus \xe0 chaque fois que vous cassez une brique.\\n\\nCependant, votre combinaison se r\xe9initialise d\xe8s que votre balle touche le c\xf4t\xe9 gauche.\\n\\nD\xe8s que votre combo augmente, le c\xf4t\xe9 gauche devient rouge pour vous rappeler que vous devez \xe9viter de le frapper.\\n\\nL\'effet se cumule avec d\'autres avantages de combo, le combo augmente plus rapidement avec plus d\'am\xe9liorations, mais il se r\xe9initialise \xe9galement si l\'une ou l\'autre des conditions de r\xe9initialisation est remplie. ","upgrades.left_is_lava.help":"Plus de pi\xe8ces si vous ne touchez pas le c\xf4t\xe9 gauche.","upgrades.left_is_lava.name":"\xc9viter le c\xf4t\xe9 gauche","upgrades.metamorphosis.fullHelp":"Avec cette am\xe9lioration, les pi\xe8ces seront de la couleur de la brique d\'o\xf9 elles proviennent et coloreront la premi\xe8re brique qu\'elles toucheront. \\n\\nLes pi\xe8ces apparaissent \xe0 la vitesse de la balle qui les a cass\xe9es, ce qui signifie que vous pouvez viser un peu dans la direction des briques que vous voulez \\"peindre\\".","upgrades.metamorphosis.help":"Les pi\xe8ces de monnaie tachent les briques qu\'elles touchent","upgrades.metamorphosis.name":"M\xe9tamorphose","upgrades.multiball.fullHelp":"D\xe8s que vous laissez tomber la balle dans Breakout 71, vous perdez. \\n\\nAvec cet avantage, vous obtenez deux balles, et vous pouvez donc vous permettre d\'en perdre une.\\n\\nLes balles perdues reviennent au niveau suivant. \\n\\nLe fait d\'avoir plus d\'une balle permet d\'obtenir d\'autres avantages et, bien s\xfbr, de franchir le niveau plus rapidement.","upgrades.multiball.help":"Chaque niveau commence avec {{count}} balles.","upgrades.multiball.name":"+1 balle","upgrades.one_more_choice.fullHelp":"Chaque menu d\'am\xe9lioration comportera une option suppl\xe9mentaire. Cela n\'augmente pas le nombre d\'am\xe9liorations que vous pouvez choisir, mais vous aide \xe0 cr\xe9er le profile id\xe9al. ","upgrades.one_more_choice.help":"Les niveaux suivants offriront une option suppl\xe9mentaire dans la liste d\'am\xe9liorations.","upgrades.one_more_choice.name":"+1 choix jusqu\'\xe0 la fin de la course","upgrades.picky_eater.fullHelp":"Chaque fois que vous cassez une brique de la m\xeame couleur que votre balle, votre combo augmente d\'une unit\xe9.\\n\\nS\'il s\'agit d\'une couleur diff\xe9rente, la balle adopte cette nouvelle couleur, mais la combinaison est r\xe9initialis\xe9e.\\n\\nLes briques de la mauvaise couleur sont entour\xe9es en rouge.\\n\\nSi vous avez plus d\'une balle, elles changent toutes de couleur lorsque l\'une d\'entre elles touche une brique.","upgrades.picky_eater.help":"Plus de pi\xe8ces si vous cassez les briques couleur par couleur.","upgrades.picky_eater.name":"Mangeur par couleur","upgrades.pierce.fullHelp":"Normalement , la balle rebondit d\xe8s qu\'elle touche une brique. Avec cette caract\xe9ristique, elle continuera sa trajectoire jusqu\'\xe0 3 briques cass\xe9es.\\n\\nApr\xe8s cela, elle rebondira sur la quatri\xe8me brique et vous devez toucher le palet pour remettre le compteur \xe0 z\xe9ro.","upgrades.pierce.help":"La balle perce {{count}} briques apr\xe8s chaque rebond sur le palet","upgrades.pierce.name":"Balle per\xe7ante","upgrades.pierce_color.fullHelp":"Chaque fois qu\'une balle touche une brique de la m\xeame couleur, elle la traverse sans encombre.\\nLorsqu\'elle atteint une brique de couleur diff\xe9rente, elle la casse, prend sa couleur et rebondit.","upgrades.pierce_color.help":"Les balles transpercent les briques de leur couleur","upgrades.pierce_color.name":"Perceur de couleur","upgrades.puck_repulse_ball.fullHelp":"Lorsqu\'une balle s\'approche du palet, elle commence \xe0 ralentir, voire \xe0 rebondir sans toucher le palet. Beaucoup de choses sont li\xe9es \xe0 un passage par le palet dans le jeu, donc \xe7a pourrait ouvrir des possibilit\xe9s. ","upgrades.puck_repulse_ball.help":"Le palet repousse les balles","upgrades.puck_repulse_ball.help_plural":"La force de r\xe9pulsion est plus grande","upgrades.puck_repulse_ball.name":"Atterrissage en douceur","upgrades.respawn.fullHelp":"Apr\xe8s avoir cass\xe9 deux briques ou plus, lorsque la balle touche le palet, la premi\xe8re brique est remise en place, \xe0 condition que l\'espace soit libre et que la brique ne soit pas une bombe.\\n\\nDes effets de particules vous indiqueront o\xf9 les briques appara\xeetront. \\n\\nEn montant en niveau, vous pouvez faire r\xe9appara\xeetre jusqu\'\xe0 4 briques \xe0 la fois, mais il doit toujours y en avoir au moins une qui reste d\xe9truite.","upgrades.respawn.help":"Certaines briques r\xe9apparaissent apr\xe8s avoir \xe9t\xe9 d\xe9truites.","upgrades.respawn.help_plural":"Plus de briques peuvent r\xe9appara\xeetre","upgrades.respawn.name":"R\xe9apparition ","upgrades.right_is_lava.fullHelp":"Chaque fois que vous cassez une brique, votre combo augmente d\'une unit\xe9, ce qui vous permet d\'obtenir une pi\xe8ce de plus \xe0 chaque fois que vous cassez les briques suivantes.\\n\\nCependant, votre combinaison se r\xe9initialise d\xe8s que votre balle touche le c\xf4t\xe9 droit de la zone de jeu.\\n\\nD\xe8s que votre combo augmente, le c\xf4t\xe9 droit devient rouge pour vous rappeler que vous devez \xe9viter de le frapper.\\n\\nL\'effet se cumule avec d\'autres avantages de combo, le combo augmente plus rapidement avec plus d\'am\xe9liorations, mais il se r\xe9initialise \xe9galement si l\'une des conditions de r\xe9initialisation est remplie.","upgrades.right_is_lava.help":"Plus de pi\xe8ces si vous ne touchez pas le c\xf4t\xe9 droit.","upgrades.right_is_lava.name":"\xc9viter le c\xf4t\xe9 droit","upgrades.sapper.fullHelp":"Au lieu de dispara\xeetre, la premi\xe8re brique cass\xe9e est remplac\xe9e par une bombe. Faire rebondir la balle sur le palet r\xe9arme l\'effet. En montant en niveau, vous pourrez placer plus de bombes. N\'oubliez pas que les bombes ont un impact sur la vitesse des pi\xe8ces \xe0 proximit\xe9. Trop d\'explosions peuvent rendre difficile la r\xe9cup\xe9ration des fruits de votre dur labeur.","upgrades.sapper.help":"La premi\xe8re brique cass\xe9e devient une bombe.","upgrades.sapper.help_plural":"Les premi\xe8res briques {{lvl}} cass\xe9es deviennent des bombes.","upgrades.sapper.name":"Sapeur","upgrades.skip_last.fullHelp":"Vous devez casser toutes les briques pour passer au niveau suivant. \\n\\nCependant, il peut \xeatre difficile d\'obtenir les derni\xe8res briques.\\n\\nTerminer un niveau plus t\xf4t permet d\'obtenir des choix suppl\xe9mentaires lors de la mise \xe0 niveau. \\n\\nNe jamais manquer de briques est \xe9galement tr\xe8s avantageux.\\n\\nDonc, si vous avez du mal \xe0 casser les derni\xe8res briques, obtenir cet avantage plusieurs fois peut vous aider.","upgrades.skip_last.help":"La derni\xe8re brique s\'autod\xe9truit.","upgrades.skip_last.help_plural":"Les {{lvl}} derni\xe8res briques restantes s\'autod\xe9truiront","upgrades.skip_last.name":"Nettoyage facile","upgrades.slow_down.fullHelp":"La balle d\xe9marre relativement lentement, mais \xe0 chaque niveau de votre course, elle d\xe9marre un peu plus vite, et elle acc\xe9l\xe8re \xe9galement si vous passez beaucoup de temps dans un niveau.\\n\\nCet avantage rend la balle plus facile \xe0 g\xe9rer. \\n\\nVous pouvez l\'obtenir au d\xe9but de chaque course en activant le mode enfant dans le menu.","upgrades.slow_down.help":"La balle se d\xe9place plus lentement","upgrades.slow_down.name":"Balle lente","upgrades.smaller_puck.fullHelp":"Le palet est donc plus petit, ce qui, en th\xe9orie, facilite certains tirs en coin, mais augmente surtout la difficult\xe9.\\n\\nC\'est pourquoi vous b\xe9n\xe9ficiez \xe9galement d\'un bonus de +5 pi\xe8ces par brique pour toutes les briques que vous casserez apr\xe8s avoir choisi cette option.","upgrades.smaller_puck.help":"Donne aussi +5 combo","upgrades.smaller_puck.help_plural":"Palet encore plus petit et combinaison de base plus \xe9lev\xe9e","upgrades.smaller_puck.name":"Palet plus petit","upgrades.soft_reset.fullHelp":"Limite l\'impact d\'une r\xe9initialisation du combo.","upgrades.soft_reset.help":"La remise \xe0 z\xe9ro du combo conserve {{percent}}% des points","upgrades.soft_reset.name":"R\xe9initialisation progressive","upgrades.streak_shots.fullHelp":"Chaque fois que vous cassez une brique, votre combo (nombre de pi\xe8ces par brique) augmente d\'une unit\xe9. Cependant, d\xe8s que la balle touche votre palet, le combo est remis \xe0 sa valeur par d\xe9faut, et vous n\'obtiendrez qu\'une seule pi\xe8ce par brique.\\n\\nUne fois que votre combinaison d\xe9passe la valeur de base, votre palet devient rouge pour vous rappeler que le fait de le toucher avec la balle d\xe9truira votre combinaison.\\n\\nCela peut se cumuler avec d\'autres avantages li\xe9s au combo, le combo augmentera plus rapidement mais se r\xe9initialisera plus facilement car n\'importe laquelle des conditions suffit \xe0 le r\xe9initialiser.","upgrades.streak_shots.help":"Plus de pi\xe8ces si vous cassez plusieurs briques \xe0 la fois.","upgrades.streak_shots.name":"S\xe9quence de destruction","upgrades.sturdy_bricks.fullHelp":"Avec le niveau 1 de cette comp\xe9tence, la balle a 20 % de chances de rebondir sans casser les briques, mais g\xe9n\xe8re 10% de pi\xe8ces en plus lorsqu\'elle en casse une.\\n\\nCe +10% n\'est pas indiqu\xe9 dans le nombre de combos. Au niveau 4, la balle a 80 % de chances de rebondir et rapporte 40 % de pi\xe8ces en plus.","upgrades.sturdy_bricks.help":"Les briques r\xe9sistent parfois aux coups mais font tomber plus de pi\xe8ces.","upgrades.sturdy_bricks.help_plural":"Les briques r\xe9sistent davantage et font tomber plus de pi\xe8ces","upgrades.sturdy_bricks.name":"Briques solides","upgrades.telekinesis.fullHelp":"D\xe8s que la balle touche votre palet, vous pouvez la diriger vers la gauche ou la droite en d\xe9pla\xe7ant votre palet.\\n\\nL\'effet s\'arr\xeate lorsque la balle touche une brique et se r\xe9initialise la prochaine fois qu\'elle touche le palet. Il ne fait rien non plus lorsque la balle descend apr\xe8s avoir rebondi au sommet.","upgrades.telekinesis.help":"Contr\xf4ler la trajectoire de la balle","upgrades.telekinesis.help_plural":"Effet plus fort sur la balle","upgrades.telekinesis.name":"T\xe9l\xe9kin\xe9sie","upgrades.top_is_lava.fullHelp":"Chaque fois que vous cassez une brique, votre combo augmente d\'une unit\xe9. Cependant, votre combo sera r\xe9initialis\xe9 d\xe8s que votre balle atteindra le haut de l\'\xe9cran.\\n\\nLorsque votre combo est sup\xe9rieur au minimum, une barre rouge appara\xeet en haut de l\'\xe9cran pour vous rappeler que vous devez \xe9viter de la frapper.\\n\\nCet effet s\'ajoute aux autres avantages du combo.","upgrades.top_is_lava.help":"Plus de pi\xe8ces si vous ne touchez pas le haut de la zone de jeu","upgrades.top_is_lava.name":"Icare ","upgrades.viscosity.fullHelp":"Les pi\xe8ces acc\xe9l\xe8rent normalement avec la gravit\xe9 et les explosions pour atteindre des vitesses assez \xe9lev\xe9es. \\n\\nCette comp\xe9tence les ralentit constamment, comme si elles se trouvaient dans une sorte de liquide visqueux.\\n\\nCela permet de les attraper plus facilement et se combine bien avec les am\xe9liorations qui influencent le mouvement de la pi\xe8ce.","upgrades.viscosity.help":"Chute plus lente des pi\xe8ces","upgrades.viscosity.name":"Fluide visqueux ","upgrades.wind.fullHelp":"Le vent d\xe9pend de l\'endroit o\xf9 se trouve le palet, s\'il est au centre de l\'\xe9cran, il ne se passe rien, s\'il est \xe0 gauche, il soufflera vers la gauche, s\'il est \xe0 droite de l\'\xe9cran, il soufflera vers la droite.\\n\\nLe vent affecte \xe0 la fois les balles et les pi\xe8ces.","upgrades.wind.help":"La position du palet cr\xe9e du vent","upgrades.wind.help_plural":"Force du vent plus importante","upgrades.wind.name":"Vive le vent"}'); +module.exports = JSON.parse('{"confirmRestart.no":"Annuler ,continuer ma partie en cours","confirmRestart.text":"Vous \xeates sur le point de commencer une nouvelle partie, est-ce vraiment ce que vous vouliez ?","confirmRestart.title":"D\xe9marrer une nouvelle partie ?","confirmRestart.yes":"Commencer une nouvelle partie","gameOver.cumulative_total":"Votre score total cumul\xe9 est pass\xe9 de {{startTs}} \xe0 {{endTs}}.","gameOver.lost.summary":"Vous avez fait tomber la balle apr\xe8s avoir attrap\xe9 {{score}} pi\xe8ces.","gameOver.lost.title":"Balle perdue","gameOver.next_unlock":"Marquez {{points}} points suppl\xe9mentaires pour d\xe9bloquer la prochaine am\xe9lioration ou le prochain niveau.","gameOver.restart":"Nouvelle partie","gameOver.stats.balls_lost":"Balles perdues","gameOver.stats.bricks_broken":"Briques cass\xe9es","gameOver.stats.bricks_per_minute":"Briques cass\xe9es par minute","gameOver.stats.catch_rate":"Pi\xe8ces attrap\xe9es","gameOver.stats.combo_avg":"Combo moyen","gameOver.stats.combo_max":"Combo maximum","gameOver.stats.duration_per_level":"Dur\xe9e par niveau","gameOver.stats.hit_rate":"Pr\xe9cision","gameOver.stats.intro":"Vous trouverez ci-dessous les statistiques de cette partie compar\xe9es \xe0 vos {{count}} meilleures parties.","gameOver.stats.level_reached":"Niveau atteint","gameOver.stats.total_score":"Score total","gameOver.stats.upgrades_applied":"Mises \xe0 jour appliqu\xe9es","gameOver.test_run":"Cette partie de test et son score ne sont pas enregistr\xe9s.","gameOver.unlocked_count":"Vous avez d\xe9bloqu\xe9 {{count}} objet(s) :","gameOver.win.summary":"Vous avez nettoy\xe9 tous les niveaux pour cette partie, en attrapant {{score}} pi\xe8ces au total.","gameOver.win.title":"Partie termin\xe9e","level_up.after_buttons":"Vous venez de terminer le niveau {{level}}/{{max}} et vous avez choisi ces am\xe9liorations jusqu\'\xe0 pr\xe9sent :","level_up.before_buttons":"Vous avez attrap\xe9 {{score}} pi\xe8ces {{catchGain}} sur {{levelSpawnedCoins}} en {{time}} secondes {{timeGain}}.\\n\\nVous avez rat\xe9 les briques {{levelMisses}} fois {{missesGain}} et touch\xe9 les bords de la zone de jeu {{levelWallBounces}} fois {{wallHitsGain}}.\\n\\n{{compliment}}","level_up.compliment_advice":"Essayez d\'attraper toutes les pi\xe8ces, de ne jamais rater les briques, de ne pas toucher les murs ou de terminer le niveau en moins de 30 secondes pour obtenir des choix suppl\xe9mentaires et des am\xe9liorations.","level_up.compliment_good":"Bravo !","level_up.compliment_perfect":"Impressionnant, continuez comme \xe7a !","level_up.pick_upgrade_title":"Choisir une am\xe9lioration","level_up.plus_one_choice":"(+1 choix)","level_up.plus_one_upgrade":"(+1 am\xe9lioration et +1 choix)","level_up.unlocked_level":" (Niveau)","level_up.unlocked_perk":" (Am\xe9lioration)","level_up.upgrade_perk_to_level":" niveau {{level}}","main_menu.basic":"Graphismes simplifi\xe9s","main_menu.basic_help":"Moins de particules et effets, meilleures performances.","main_menu.download_save_file":"Sauvegarder mes progr\xe8s","main_menu.download_save_file_help":"Obtenir un fichier de sauvegarde transf\xe9rable","main_menu.footer_html":"

\\nProgramm\xe9 en France par Renan LE CARO.\\nDonner\\nDiscord\\nF-Droid\\nGoogle Play\\nitch.io\\nGitlab\\nVersion web\\nHackerNews\\nPolitique de confidentialit\xe9 \\nv.{{appVersion}}\\n

","main_menu.fullscreen":"Plein \xe9cran","main_menu.fullscreen_exit":"Quitter le plein \xe9cran","main_menu.fullscreen_exit_help":"Peut ne pas fonctionner sur certaines machines","main_menu.fullscreen_help":"Peut ne pas fonctionner sur certaines machines","main_menu.kid":"Mode enfants","main_menu.kid_help":"Balle plus lente","main_menu.language":"Langue","main_menu.language_help":"Changer la langue d\'affichage","main_menu.load_save_file":"Charger une sauvegarde","main_menu.load_save_file_help":"S\xe9lectionnez une sauvegarde sur votre appareil ","main_menu.mobile":"Mode mobile","main_menu.mobile_help":"Laisse un espace pour le pouce sous le palet.","main_menu.pointer_lock":"Verrouillage du pointeur de la souris","main_menu.pointer_lock_help":"Verrouille et cache le curseur de la souris.","main_menu.record":"Enregistrer des vid\xe9os de jeu","main_menu.record_download":"T\xe9l\xe9charger la vid\xe9o ({{size}} MB)","main_menu.record_help":"Obtenez une vid\xe9o de chaque niveau.","main_menu.reset":"R\xe9initialiser le jeu","main_menu.reset_cancel":"Non","main_menu.reset_confirm":"Oui","main_menu.reset_help":"Effacer le meilleur score et les statistiques","main_menu.reset_instruction":"Vous perdrez tous les progr\xe8s que vous avez faits dans le jeu, \xeates-vous s\xfbr ?","main_menu.resume":"Retourner \xe0 la partie","main_menu.resume_help":"Continuer la partie en cours","main_menu.save_file_error":"Erreur lors du chargement du fichier de sauvegarde","main_menu.save_file_loaded":"Sauvegarde charg\xe9e","main_menu.save_file_loaded_help":"L\'appli va red\xe9marrer","main_menu.save_file_loaded_ok":"Ok","main_menu.sounds":"Sons du jeu","main_menu.sounds_help":"Ralentis certains t\xe9l\xe9phones.","main_menu.title":"Breakout 71","main_menu.unlocks":"Am\xe9liorations et niveaux","main_menu.unlocks_help":"Essayez les \xe9l\xe9ments d\xe9bloqu\xe9s","play.close_modale_window_tooltip":"Fermer","play.current_lvl":"Niveau {{level}}/{{max}}","play.menu_label":"Menu","play.missed_ball":"rat\xe9","play.mobile_press_to_play":"Gardez le doigt ici pour jouer","sandbox.help":"Tester n\'importe quelle combinaison d\'am\xe9liorations","sandbox.instructions":"S\xe9lectionnez les am\xe9lioration ci-dessous et appuyez sur \\"D\xe9marrer la partie de test\\" pour les tester. Les scores et les statistiques ne seront pas enregistr\xe9s.","sandbox.start":"D\xe9marrer la partie de test","sandbox.title":"Mode bac \xe0 sable","sandbox.unlocks_at":"D\xe9verrouill\xe9 \xe0 partir d\'un score total de {{score}}","score_panel.restart":"Red\xe9marrer","score_panel.restart_help":"Commencer une nouvelle partie","score_panel.resume":"Continuer la partie","score_panel.resume_help":"Fermer cette fen\xeatre pour retourner au jeu","score_panel.test_run":"Il s\'agit d\'une partie d\'essai, le score n\'est pas enregistr\xe9.","score_panel.title":"{{score}} points au niveau {{level}}/{{max}} ","score_panel.upgrades_picked":"Am\xe9liorations choisies jusqu\'\xe0 pr\xe9sent :","unlocks.greyed_out_help":"Les \xe9l\xe9ments gris\xe9es peuvent \xeatre d\xe9bloqu\xe9es en augmentant votre score total. Le score total augmente \xe0 chaque fois que vous marquez des points dans le jeu.","unlocks.intro":"Votre score total est de {{ts}}. Vous trouverez ci-dessous toutes les am\xe9liorations et tous les niveaux que le jeu peut offrir.","unlocks.level_description":"Un niveau {{size}}x{{size}} avec {{bricks}} briques","unlocks.title":"Vous avez d\xe9bloqu\xe9 {{percentUnlock}}% du jeu.","unlocks.unlocks_at":"D\xe9verrouill\xe9 au score total {{threshold}}.","upgrades.antigrav.fullHelp":"Les pi\xe8ces attendront d\'\xeatre sous le palet pour tomber. ","upgrades.antigrav.help":"La gravit\xe9 est invers\xe9e \xe0 droite et \xe0 gauche du palet","upgrades.antigrav.name":"Antigrav","upgrades.asceticism.fullHelp":"Les pi\xe8ces attendront d\'\xeatre sous le palet pour tomber. ","upgrades.asceticism.help":"+1 combo par brique cass\xe9e, RAZ quand une pi\xe8ce est attrap\xe9e","upgrades.asceticism.name":"Asc\xe9tisme","upgrades.ball_attract_ball.fullHelp":"Les balles qui sont \xe9loign\xe9es de plus d\'une demi-largeur d\'\xe9cran commencent \xe0 s\'attirer. La force d\'attraction est plus forte lorsque les balles sont plus \xe9loign\xe9es l\'une de l\'autre. Des particules arc-en-ciel voleront pour symboliser la force d\'attraction. Cet avantage n\'est offert que si vous avez d\xe9j\xe0 plus d\'une balle en jeu.","upgrades.ball_attract_ball.help":"Les balles attirent les balles","upgrades.ball_attract_ball.help_plural":"Force d\'attraction plus forte","upgrades.ball_attract_ball.name":"Gravit\xe9","upgrades.ball_repulse_ball.fullHelp":"Les balles qui se trouvent \xe0 moins d\'une demi-largeur d\'\xe9cran commencent \xe0 se repousser les unes les autres. La force de r\xe9pulsion est plus forte si elles sont proches l\'une de l\'autre. Des particules seront affich\xe9es pour symboliser l\'application de cette force. Cet avantage n\'est offert que si vous avez d\xe9j\xe0 plus d\'une balle.","upgrades.ball_repulse_ball.help":"Les balles repoussent les balles","upgrades.ball_repulse_ball.help_plural":"Force de r\xe9pulsion plus forte","upgrades.ball_repulse_ball.name":"Vol en formation","upgrades.base_combo.fullHelp":"Votre combo (nombre de pi\xe8ces par brique) commence normalement \xe0 1 au d\xe9but du niveau et revient \xe0 1 lorsque vous rebondissez sans rien toucher. Avec cette caract\xe9ristique, le combo commence 3 points plus haut, ce qui fait que vous obtiendrez toujours au moins 4 pi\xe8ces par brique. Lorsque votre combo est r\xe9initialis\xe9, il revient \xe0 4 et non \xe0 1. Votre balle scintillera un peu pour indiquer que son combo est sup\xe9rieur \xe0 1.","upgrades.base_combo.help":"Le combo commence \xe0 {{coins}}.","upgrades.base_combo.name":"Combo +3","upgrades.bigger_explosions.fullHelp":"L\'explosion par d\xe9faut efface un carr\xe9 de 3x3 briques, avec cette am\xe9lioration un carr\xe9 de 5x5. Le vent soufflant les pi\xe8ces est \xe9galement beaucoup plus fort. L\'\xe9cran clignotera un peu apr\xe8s chaque explosion (sauf en mode graphismes basiques).","upgrades.bigger_explosions.help":"Explosions plus violentes","upgrades.bigger_explosions.name":"Kaboom","upgrades.bigger_puck.fullHelp":"Un grand palet permet de ne jamais rater la balle et d\'attraper plus de pi\xe8ces, ainsi que d\'orienter pr\xe9cis\xe9ment les rebonds (l\'angle de la balle ne d\xe9pend que de l\'endroit o\xf9 elle touche le palet). Cependant, un grand palet est plus difficile \xe0 utiliser sur les c\xf4t\xe9s du niveau.","upgrades.bigger_puck.help":"Attrapez facilement plus de pi\xe8ces.","upgrades.bigger_puck.name":"Palet plus grand","upgrades.coin_magnet.fullHelp":"Dirige les pi\xe8ces vers le palet. L\'effet est plus fort si la pi\xe8ce est d\xe9j\xe0 proche du palet. Attraper 90 % ou 100 % des pi\xe8ces apporte des bonus sp\xe9ciaux dans le jeu. Une autre fa\xe7on d\'attraper plus de pi\xe8ces est de frapper les briques par le bas. La vitesse et la direction de la balle ont un impact sur la vitesse des pi\xe8ces produites.","upgrades.coin_magnet.help":"Le palet attire les pi\xe8ces","upgrades.coin_magnet.help_plural":"Effet plus marqu\xe9 sur les pi\xe8ces","upgrades.coin_magnet.name":"Aimant pour pi\xe8ces","upgrades.compound_interest.fullHelp":"Votre combo augmentera d\'une unit\xe9 \xe0 chaque fois que vous casserez une brique, g\xe9n\xe9rant de plus en plus de pi\xe8ces \xe0 chaque fois que vous casserez une brique. Veillez cependant \xe0 attraper chacune de ces pi\xe8ces avec votre palet, car toute pi\xe8ce perdue remettra votre combo \xe0 z\xe9ro. \\n \\nSi votre combinaison est sup\xe9rieure au minimum, une ligne rouge s\'affichera au bas de la zone de jeu pour vous le rappeler que les pi\xe8ces ne doivent pas aller \xe0 cet endroit.\\n\\nCet avantage se combine avec d\'autres avantages de combo, le combo augmentera plus rapidement mais se r\xe9initialisera plus souvent.","upgrades.compound_interest.help":"+1 combo par brique cass\xe9e, remise \xe0 z\xe9ro quand une pi\xe8ce est perdu","upgrades.compound_interest.name":"Int\xe9r\xeats","upgrades.concave_puck.fullHelp":" Les balles d\xe9marrent verticalement en d\xe9but de niveau, et rebondi sur le palet de mani\xe8re plus verticale et invers\xe9e.","upgrades.concave_puck.help":"Aide \xe0 \xe9viter les bords.","upgrades.concave_puck.name":"Palet concave","upgrades.etherealcoins.fullHelp":"Il faudrait vous assurer que les pi\xe8ces tomberont bien quand m\xeame \xe0 un moment","upgrades.etherealcoins.help":"Les pi\xe8ces ne subissent plus la gravit\xe9","upgrades.etherealcoins.name":"Pi\xe8ces sans poids","upgrades.extra_levels.fullHelp":"La partie dure normalement 7 niveaux, apr\xe8s quoi le jeu est termin\xe9 et le score que vous avez atteint est votre score de partie.\\n\\nChoisir cette am\xe9lioration vous permet de prolonger la partie d\'un niveau. Les derniers niveaux sont souvent ceux o\xf9 vous faites le plus de points, la diff\xe9rence peut donc \xeatre spectaculaire.","upgrades.extra_levels.help":"Jouer {{count}} niveaux au lieu de 7","upgrades.extra_levels.name":"+1 niveau","upgrades.extra_life.fullHelp":"Normalement, vous n\'avez qu\'une seule balle par manche, et la manche est termin\xe9e d\xe8s que vous la laissez tomber.\\nCette comp\xe9tence ajoute une barre blanche en bas de l\'\xe9cran qui sauvera une balle une fois, et se brisera au cours du processus.\\nVous pouvez prendre plusieurs vies d\'avances, elle seront utilis\xe9es \xe0 chaque fois qu\'une balle est sur le point d\'\xeatre perdue. ","upgrades.extra_life.help":"La balle rebondit une fois avant d\'\xeatre perdue.","upgrades.extra_life.help_plural":"La balle rebondit {{lvl}} fois avant d\'\xeatre perdue.","upgrades.extra_life.name":"+1 vie","upgrades.hot_start.fullHelp":"Au d\xe9but de chaque niveau, votre combo commencera \xe0 +15 points, mais \xe0 chaque seconde, il sera diminu\xe9 d\'un point. Cela signifie que les 15 premi\xe8res secondes d\'un niveau produiront beaucoup plus de pi\xe8ces que les suivantes.\\nVous devez vous assurer de terminer le niveau rapidement. L\'effet se cumule avec d\'autres avantages li\xe9s au combo, ce qui vous permet d\'augmenter le combo apr\xe8s les 15 secondes, mais il continuera \xe0 diminuer chaque seconde. Chaque fois que vous reprenez la comp\xe9tence, l\'effet est encore plus prononc\xe9.","upgrades.hot_start.help":"Combo \xe0 {{start}}, -{{lvl}} combo par seconde","upgrades.hot_start.name":"D\xe9marrage \xe0 chaud","upgrades.instant_upgrade.fullHelp":"Choisissez imm\xe9diatement deux am\xe9liorations, afin d\'en obtenir une gratuite et une autre pour rembourser celle utilis\xe9e pour obtenir cet avantage. Chaque fois que vous choisirez des am\xe9liorations dans le menu suivant, vous aurez moins de choix.","upgrades.instant_upgrade.help":"-1 choix jusqu\'\xe0 la fin de la course.","upgrades.instant_upgrade.name":"+2 am\xe9liorations maintenant","upgrades.left_is_lava.fullHelp":"Chaque fois que vous cassez une brique, votre combo augmente d\'une unit\xe9, ce qui vous permet d\'obtenir une pi\xe8ce de plus \xe0 chaque fois que vous cassez une brique.\\n\\nCependant, votre combinaison se r\xe9initialise d\xe8s que votre balle touche le c\xf4t\xe9 gauche.\\n\\nD\xe8s que votre combo augmente, le c\xf4t\xe9 gauche devient rouge pour vous rappeler que vous devez \xe9viter de le frapper.\\n\\nL\'effet se cumule avec d\'autres avantages de combo, le combo augmente plus rapidement avec plus d\'am\xe9liorations, mais il se r\xe9initialise \xe9galement si l\'une ou l\'autre des conditions de r\xe9initialisation est remplie. ","upgrades.left_is_lava.help":"Plus de pi\xe8ces si vous ne touchez pas le c\xf4t\xe9 gauche.","upgrades.left_is_lava.name":"\xc9viter le c\xf4t\xe9 gauche","upgrades.metamorphosis.fullHelp":"Avec cette am\xe9lioration, les pi\xe8ces seront de la couleur de la brique d\'o\xf9 elles proviennent et coloreront la premi\xe8re brique qu\'elles toucheront. \\n\\nLes pi\xe8ces apparaissent \xe0 la vitesse de la balle qui les a cass\xe9es, ce qui signifie que vous pouvez viser un peu dans la direction des briques que vous voulez \\"peindre\\".","upgrades.metamorphosis.help":"Les pi\xe8ces de monnaie tachent les briques qu\'elles touchent","upgrades.metamorphosis.name":"M\xe9tamorphose","upgrades.multiball.fullHelp":"D\xe8s que vous laissez tomber la balle dans Breakout 71, vous perdez. \\n\\nAvec cet avantage, vous obtenez deux balles, et vous pouvez donc vous permettre d\'en perdre une.\\n\\nLes balles perdues reviennent au niveau suivant. \\n\\nLe fait d\'avoir plus d\'une balle permet d\'obtenir d\'autres avantages et, bien s\xfbr, de franchir le niveau plus rapidement.","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, \xe7a compte quand m\xeame comme une frappe. Les briques d\xe9truites par des explosions ne comptent pas.","upgrades.nbricks.help":"Frappez exactement {{lvl}} briques par rebond pour +{{lvl}} combo, sinon RAZ","upgrades.nbricks.name":"Pr\xe9l\xe8vement","upgrades.one_more_choice.fullHelp":"Chaque menu d\'am\xe9lioration comportera une option suppl\xe9mentaire. Cela n\'augmente pas le nombre d\'am\xe9liorations que vous pouvez choisir, mais vous aide \xe0 cr\xe9er le profile id\xe9al. ","upgrades.one_more_choice.help":"Les niveaux suivants offriront une option suppl\xe9mentaire dans la liste d\'am\xe9liorations.","upgrades.one_more_choice.name":"+1 choix jusqu\'\xe0 la fin de la course","upgrades.picky_eater.fullHelp":"Chaque fois que vous cassez une brique de la m\xeame couleur que votre balle, votre combo augmente d\'une unit\xe9.\\n\\nS\'il s\'agit d\'une couleur diff\xe9rente, la balle adopte cette nouvelle couleur, mais la combinaison est r\xe9initialis\xe9e.\\n\\nLes briques de la mauvaise couleur sont entour\xe9es en rouge.\\n\\nSi vous avez plus d\'une balle, elles changent toutes de couleur lorsque l\'une d\'entre elles touche une brique.","upgrades.picky_eater.help":"Plus de pi\xe8ces si vous cassez les briques couleur par couleur.","upgrades.picky_eater.name":"Mangeur par couleur","upgrades.pierce.fullHelp":"Normalement , la balle rebondit d\xe8s qu\'elle touche une brique. Avec cette caract\xe9ristique, elle continuera sa trajectoire jusqu\'\xe0 3 briques cass\xe9es.\\n\\nApr\xe8s cela, elle rebondira sur la quatri\xe8me brique et vous devez toucher le palet pour remettre le compteur \xe0 z\xe9ro.","upgrades.pierce.help":"La balle perce {{count}} briques apr\xe8s chaque rebond sur le palet","upgrades.pierce.name":"Balle per\xe7ante","upgrades.pierce_color.fullHelp":"Chaque fois qu\'une balle touche une brique de la m\xeame couleur, elle la traverse sans encombre.\\nLorsqu\'elle atteint une brique de couleur diff\xe9rente, elle la casse, prend sa couleur et rebondit.","upgrades.pierce_color.help":"Les balles transpercent les briques de leur couleur","upgrades.pierce_color.name":"Perceur de couleur","upgrades.puck_repulse_ball.fullHelp":"Lorsqu\'une balle s\'approche du palet, elle commence \xe0 ralentir, voire \xe0 rebondir sans toucher le palet. Beaucoup de choses sont li\xe9es \xe0 un passage par le palet dans le jeu, donc \xe7a pourrait ouvrir des possibilit\xe9s. ","upgrades.puck_repulse_ball.help":"Le palet repousse les balles","upgrades.puck_repulse_ball.help_plural":"La force de r\xe9pulsion est plus grande","upgrades.puck_repulse_ball.name":"Atterrissage en douceur","upgrades.respawn.fullHelp":"Apr\xe8s avoir cass\xe9 deux briques ou plus, lorsque la balle touche le palet, la premi\xe8re brique est remise en place, \xe0 condition que l\'espace soit libre et que la brique ne soit pas une bombe.\\n\\nDes effets de particules vous indiqueront o\xf9 les briques appara\xeetront. \\n\\nEn montant en niveau, vous pouvez faire r\xe9appara\xeetre jusqu\'\xe0 4 briques \xe0 la fois, mais il doit toujours y en avoir au moins une qui reste d\xe9truite.","upgrades.respawn.help":"Certaines briques r\xe9apparaissent apr\xe8s avoir \xe9t\xe9 d\xe9truites.","upgrades.respawn.help_plural":"Plus de briques peuvent r\xe9appara\xeetre","upgrades.respawn.name":"R\xe9apparition ","upgrades.right_is_lava.fullHelp":"Chaque fois que vous cassez une brique, votre combo augmente d\'une unit\xe9, ce qui vous permet d\'obtenir une pi\xe8ce de plus \xe0 chaque fois que vous cassez les briques suivantes.\\n\\nCependant, votre combinaison se r\xe9initialise d\xe8s que votre balle touche le c\xf4t\xe9 droit de la zone de jeu.\\n\\nD\xe8s que votre combo augmente, le c\xf4t\xe9 droit devient rouge pour vous rappeler que vous devez \xe9viter de le frapper.\\n\\nL\'effet se cumule avec d\'autres avantages de combo, le combo augmente plus rapidement avec plus d\'am\xe9liorations, mais il se r\xe9initialise \xe9galement si l\'une des conditions de r\xe9initialisation est remplie.","upgrades.right_is_lava.help":"Plus de pi\xe8ces si vous ne touchez pas le c\xf4t\xe9 droit.","upgrades.right_is_lava.name":"\xc9viter le c\xf4t\xe9 droit","upgrades.sapper.fullHelp":"Au lieu de dispara\xeetre, la premi\xe8re brique cass\xe9e est remplac\xe9e par une bombe. Faire rebondir la balle sur le palet r\xe9arme l\'effet. En montant en niveau, vous pourrez placer plus de bombes. N\'oubliez pas que les bombes ont un impact sur la vitesse des pi\xe8ces \xe0 proximit\xe9. Trop d\'explosions peuvent rendre difficile la r\xe9cup\xe9ration des fruits de votre dur labeur.","upgrades.sapper.help":"La premi\xe8re brique cass\xe9e devient une bombe.","upgrades.sapper.help_plural":"Les premi\xe8res briques {{lvl}} cass\xe9es deviennent des bombes.","upgrades.sapper.name":"Sapeur","upgrades.shunt.fullHelp":"D\xe9marrage \xe0 chaud sera simplement ajout\xe9 au combo actuel","upgrades.shunt.help":"Le combo ne se remet plus \xe0 z\xe9ro en d\xe9but de niveau","upgrades.shunt.name":"Shunt","upgrades.skip_last.fullHelp":"Vous devez casser toutes les briques pour passer au niveau suivant. \\n\\nCependant, il peut \xeatre difficile d\'obtenir les derni\xe8res briques.\\n\\nTerminer un niveau plus t\xf4t permet d\'obtenir des choix suppl\xe9mentaires lors de la mise \xe0 niveau. \\n\\nNe jamais manquer de briques est \xe9galement tr\xe8s avantageux.\\n\\nDonc, si vous avez du mal \xe0 casser les derni\xe8res briques, obtenir cet avantage plusieurs fois peut vous aider.","upgrades.skip_last.help":"La derni\xe8re brique s\'autod\xe9truit.","upgrades.skip_last.help_plural":"Les {{lvl}} derni\xe8res briques restantes s\'autod\xe9truiront","upgrades.skip_last.name":"Nettoyage facile","upgrades.slow_down.fullHelp":"La balle d\xe9marre relativement lentement, mais \xe0 chaque niveau de votre course, elle d\xe9marre un peu plus vite, et elle acc\xe9l\xe8re \xe9galement si vous passez beaucoup de temps dans un niveau.\\n\\nCet avantage rend la balle plus facile \xe0 g\xe9rer. \\n\\nVous pouvez l\'obtenir au d\xe9but de chaque course en activant le mode enfant dans le menu.","upgrades.slow_down.help":"La balle se d\xe9place plus lentement","upgrades.slow_down.name":"Balle lente","upgrades.smaller_puck.fullHelp":"Le palet est donc plus petit, ce qui, en th\xe9orie, facilite certains tirs en coin, mais augmente surtout la difficult\xe9.\\n\\nC\'est pourquoi vous b\xe9n\xe9ficiez \xe9galement d\'un bonus de +5 pi\xe8ces par brique pour toutes les briques que vous casserez apr\xe8s avoir choisi cette option.","upgrades.smaller_puck.help":"Donne aussi +5 combo","upgrades.smaller_puck.help_plural":"Palet encore plus petit et combinaison de base plus \xe9lev\xe9e","upgrades.smaller_puck.name":"Palet plus petit","upgrades.soft_reset.fullHelp":"Limite l\'impact d\'une r\xe9initialisation du combo.","upgrades.soft_reset.help":"La remise \xe0 z\xe9ro du combo conserve {{percent}}% des points","upgrades.soft_reset.name":"R\xe9initialisation progressive","upgrades.streak_shots.fullHelp":"Chaque fois que vous cassez une brique, votre combo (nombre de pi\xe8ces par brique) augmente d\'une unit\xe9. Cependant, d\xe8s que la balle touche votre palet, le combo est remis \xe0 sa valeur par d\xe9faut, et vous n\'obtiendrez qu\'une seule pi\xe8ce par brique.\\n\\nUne fois que votre combinaison d\xe9passe la valeur de base, votre palet devient rouge pour vous rappeler que le fait de le toucher avec la balle d\xe9truira votre combinaison.\\n\\nCela peut se cumuler avec d\'autres avantages li\xe9s au combo, le combo augmentera plus rapidement mais se r\xe9initialisera plus facilement car n\'importe laquelle des conditions suffit \xe0 le r\xe9initialiser.","upgrades.streak_shots.help":"Plus de pi\xe8ces si vous cassez plusieurs briques \xe0 la fois.","upgrades.streak_shots.name":"S\xe9quence de destruction","upgrades.sturdy_bricks.fullHelp":"Avec le niveau 1 de cette comp\xe9tence, la balle a 20 % de chances de rebondir sans casser les briques, mais g\xe9n\xe8re 10% de pi\xe8ces en plus lorsqu\'elle en casse une.\\n\\nCe +10% n\'est pas indiqu\xe9 dans le nombre de combos. Au niveau 4, la balle a 80 % de chances de rebondir et rapporte 40 % de pi\xe8ces en plus.","upgrades.sturdy_bricks.help":"Les briques r\xe9sistent parfois aux coups mais font tomber plus de pi\xe8ces.","upgrades.sturdy_bricks.help_plural":"Les briques r\xe9sistent davantage et font tomber plus de pi\xe8ces","upgrades.sturdy_bricks.name":"Briques solides","upgrades.telekinesis.fullHelp":"D\xe8s que la balle touche votre palet, vous pouvez la diriger vers la gauche ou la droite en d\xe9pla\xe7ant votre palet.\\n\\nL\'effet s\'arr\xeate lorsque la balle touche une brique et se r\xe9initialise la prochaine fois qu\'elle touche le palet. Il ne fait rien non plus lorsque la balle descend apr\xe8s avoir rebondi au sommet.","upgrades.telekinesis.help":"Contr\xf4ler la trajectoire de la balle","upgrades.telekinesis.help_plural":"Effet plus fort sur la balle","upgrades.telekinesis.name":"T\xe9l\xe9kin\xe9sie","upgrades.top_is_lava.fullHelp":"Chaque fois que vous cassez une brique, votre combo augmente d\'une unit\xe9. Cependant, votre combo sera r\xe9initialis\xe9 d\xe8s que votre balle atteindra le haut de l\'\xe9cran.\\n\\nLorsque votre combo est sup\xe9rieur au minimum, une barre rouge appara\xeet en haut de l\'\xe9cran pour vous rappeler que vous devez \xe9viter de la frapper.\\n\\nCet effet s\'ajoute aux autres avantages du combo.","upgrades.top_is_lava.help":"Plus de pi\xe8ces si vous ne touchez pas le haut de la zone de jeu","upgrades.top_is_lava.name":"Icare ","upgrades.unbounded.fullHelp":"J\'esp\xe8re que vous avez pr\xe9vu un moyen de r\xe9cup\xe9rer vos balles","upgrades.unbounded.help":"+1 combo par brique, plus de cot\xe9s","upgrades.unbounded.name":"Lib\xe9r\xe9e, d\xe9livr\xe9e","upgrades.viscosity.fullHelp":"Les pi\xe8ces acc\xe9l\xe8rent normalement avec la gravit\xe9 et les explosions pour atteindre des vitesses assez \xe9lev\xe9es. \\n\\nCette comp\xe9tence les ralentit constamment, comme si elles se trouvaient dans une sorte de liquide visqueux.\\n\\nCela permet de les attraper plus facilement et se combine bien avec les am\xe9liorations qui influencent le mouvement de la pi\xe8ce.","upgrades.viscosity.help":"Chute plus lente des pi\xe8ces","upgrades.viscosity.name":"Fluide visqueux ","upgrades.wind.fullHelp":"Le vent d\xe9pend de l\'endroit o\xf9 se trouve le palet, s\'il est au centre de l\'\xe9cran, il ne se passe rien, s\'il est \xe0 gauche, il soufflera vers la gauche, s\'il est \xe0 droite de l\'\xe9cran, il soufflera vers la droite.\\n\\nLe vent affecte \xe0 la fois les balles et les pi\xe8ces.","upgrades.wind.help":"La position du palet cr\xe9e du vent","upgrades.wind.help_plural":"Force du vent plus importante","upgrades.wind.name":"Vive le vent","upgrades.yoyo.fullHelp":"C\'est l\'inverse de T\xe9l\xe9kin\xe9sie","upgrades.yoyo.help":"La balle descend vers le palet","upgrades.yoyo.name":"Yo-yo"}'); },{}],"uYc9N":[function(require,module,exports,__globalThis) { -module.exports = JSON.parse("{\"confirmRestart.no\":\"Cancel\",\"confirmRestart.text\":\"You're about to start a new run, is that really what you wanted ?\",\"confirmRestart.title\":\"Start a new run ?\",\"confirmRestart.yes\":\"Restart game\",\"gameOver.cumulative_total\":\"Your total cumulative score went from {{startTs}} to {{endTs}}.\",\"gameOver.lost.summary\":\"You dropped the ball after catching {{score}} coins.\",\"gameOver.lost.title\":\"Game Over\",\"gameOver.next_unlock\":\"Score {{points}} more points to reach the next unlock\",\"gameOver.restart\":\"Start a new run\",\"gameOver.stats.balls_lost\":\"Balls lost\",\"gameOver.stats.bricks_broken\":\"Bricks broken\",\"gameOver.stats.bricks_per_minute\":\"Bricks broken per minute\",\"gameOver.stats.catch_rate\":\"Catch rate\",\"gameOver.stats.combo_avg\":\"Average combo\",\"gameOver.stats.combo_max\":\"Max combo\",\"gameOver.stats.duration_per_level\":\"Duration per level\",\"gameOver.stats.hit_rate\":\"Hit rate\",\"gameOver.stats.intro\":\"Find below your run statistics compared to your {{count}} best runs.\",\"gameOver.stats.level_reached\":\"Level reached\",\"gameOver.stats.total_score\":\"Total score\",\"gameOver.stats.upgrades_applied\":\"Upgrades applied\",\"gameOver.test_run\":\"This test run and its score are not being recorded\",\"gameOver.unlocked_count\":\"You unlocked {{count}} item(s) :\",\"gameOver.win.summary\":\"You cleared all levels for this run, catching {{score}} coins in total.\",\"gameOver.win.title\":\"Run finished\",\"level_up.after_buttons\":\"You just finished level {{level}}/{{max}} and picked those upgrades so far :\",\"level_up.before_buttons\":\"You caught {{score}} coins {{catchGain}} out of {{levelSpawnedCoins}} in {{time}} seconds {{timeGain}}.\\n\\nYou missed {{levelMisses}} times {{missesGain}} and hit the walls or ceiling {{levelWallBounces}} times{{wallHitsGain}}.\\n\\n{{compliment}}\",\"level_up.compliment_advice\":\"Try to catch all coins, never miss the bricks, never hit the walls/ceiling or clear the level under 30s to gain additional choices and upgrades.\",\"level_up.compliment_good\":\"Well done !\",\"level_up.compliment_perfect\":\"Impressive, keep it up !\",\"level_up.pick_upgrade_title\":\"Pick an upgrade\",\"level_up.plus_one_choice\":\"(+1 choice)\",\"level_up.plus_one_upgrade\":\"(+1 upgrade and choice)\",\"level_up.unlocked_level\":\" (Level)\",\"level_up.unlocked_perk\":\" (Perk)\",\"level_up.upgrade_perk_to_level\":\" lvl {{level}}\",\"main_menu.basic\":\"Basic graphics\",\"main_menu.basic_help\":\"Fewer particles and flashes, better performance.\",\"main_menu.download_save_file\":\"Download save file\",\"main_menu.download_save_file_help\":\"Get a transferable .b71 file with your score and stats\",\"main_menu.footer_html\":\"

\\nMade in France by Renan LE CARO. \\nDonate\\nDiscord\\nF-Droid\\nGoogle Play\\nitch.io \\nGitlab\\nWeb version\\nHackerNews\\nPrivacy Policy\\nv.{{appVersion}}\\n

\\n\",\"main_menu.fullscreen\":\"Fullscreen\",\"main_menu.fullscreen_exit\":\"Exit Fullscreen\",\"main_menu.fullscreen_exit_help\":\"Might not work on some machines\",\"main_menu.fullscreen_help\":\"Might not work on some machines\",\"main_menu.kid\":\"Kids mode\",\"main_menu.kid_help\":\"Start future runs with \\\"slower ball\\\".\",\"main_menu.language\":\"Language\",\"main_menu.language_help\":\"Choose the game's language\",\"main_menu.load_save_file\":\"Load save file\",\"main_menu.load_save_file_help\":\"Select a .b71 file on your device\",\"main_menu.mobile\":\"Mobile mode\",\"main_menu.mobile_help\":\"Leaves space for your thumb under the puck.\",\"main_menu.pointer_lock\":\"Mouse pointer lock\",\"main_menu.pointer_lock_help\":\"Locks and hides the mouse cursor.\",\"main_menu.record\":\"Record gameplay videos\",\"main_menu.record_download\":\"Download video ({{size}} MB)\",\"main_menu.record_help\":\"Get a video of each level.\",\"main_menu.reset\":\"Reset Game\",\"main_menu.reset_cancel\":\"No\",\"main_menu.reset_confirm\":\"Yes\",\"main_menu.reset_help\":\"Erase high score and statistics\",\"main_menu.reset_instruction\":\"You will loose all progress you made in the game, are you sure ?\",\"main_menu.resume\":\"Resume\",\"main_menu.resume_help\":\"Return to your run\",\"main_menu.save_file_error\":\"Error loading save file\",\"main_menu.save_file_loaded\":\"Save file loaded\",\"main_menu.save_file_loaded_help\":\"The app will now reload to apply your save\",\"main_menu.save_file_loaded_ok\":\"Ok\",\"main_menu.sounds\":\"Game sounds\",\"main_menu.sounds_help\":\"Can slow down some phones.\",\"main_menu.title\":\"Breakout 71\",\"main_menu.unlocks\":\"Starting perk\",\"main_menu.unlocks_help\":\"Try perks and levels you unlocked\",\"play.close_modale_window_tooltip\":\"close \",\"play.current_lvl\":\"L{{level}}/{{max}}\",\"play.menu_label\":\"menu\",\"play.missed_ball\":\"miss\",\"play.mobile_press_to_play\":\"Press and hold here to play\",\"sandbox.help\":\"Test any perk combination\",\"sandbox.instructions\":\"Select perks below and press \\\"start run\\\" to try them out in a test run. Scores and stats are not recorded.\",\"sandbox.start\":\"Start test run\",\"sandbox.title\":\"Sandbox mode\",\"sandbox.unlocks_at\":\"Unlocks at total score {{score}}\",\"score_panel.restart\":\"Restart\",\"score_panel.restart_help\":\"Start a brand new run\",\"score_panel.resume\":\"Resume\",\"score_panel.resume_help\":\"Return to your run\",\"score_panel.test_run\":\"This is a test run, score is not recorded permanently\",\"score_panel.title\":\"{{score}} points at level {{level}}/{{max}} \",\"score_panel.upgrades_picked\":\"Upgrades picked so far : \",\"unlocks.greyed_out_help\":\"The greyed out ones can be unlocked by increasing your total score. The total score increases every time you score in game.\",\"unlocks.intro\":\"Your total score is {{ts}}. Below are all the upgrades and levels the games has to offer.\",\"unlocks.level_description\":\"A {{size}}x{{size}} level with {{bricks}} bricks\",\"unlocks.title\":\"You unlocked {{percentUnlock}}% of the game.\",\"unlocks.unlocks_at\":\"Unlocks at total score {{threshold}}.\",\"upgrades.ball_attract_ball.fullHelp\":\"Balls that are more than half a screen width away will start attracting each other. \\n\\nThe attraction force is stronger when they are furthest away from each other.\\n\\nRainbow particles will fly to symbolize the attraction force. This perk is only offered if you have more than one ball already.\",\"upgrades.ball_attract_ball.help\":\"Balls attract balls\",\"upgrades.ball_attract_ball.help_plural\":\"Stronger attraction force\",\"upgrades.ball_attract_ball.name\":\"Gravity\",\"upgrades.ball_repulse_ball.fullHelp\":\"Balls that are less than half a screen width away will start repulsing each other. The repulsion force is stronger if they are close to each other. Particles will jet out to symbolize this force being applied. This perk is only offered if you have more than one ball already.\",\"upgrades.ball_repulse_ball.help\":\"Balls repulse balls\",\"upgrades.ball_repulse_ball.help_plural\":\"Stronger repulsion force\",\"upgrades.ball_repulse_ball.name\":\"Personal space\",\"upgrades.base_combo.fullHelp\":\"Your combo (number of coins per bricks) normally starts at 1 at the beginning of the level, and resets to one when you bounce around without hitting anything. With this perk, the combo starts 3 points higher, so you'll always get at least 4 coins per brick. Whenever your combo reset, it will go back to 4 and not 1. Your ball will glitter a bit to indicate that its combo is higher than one.\",\"upgrades.base_combo.help\":\"Combo starts at {{coins}}.\",\"upgrades.base_combo.name\":\"+3 base combo\",\"upgrades.bigger_explosions.fullHelp\":\"The default explosion clears a 3x3 square, with this it becomes a 5x5 square, and the blow on the coins is also significantly stronger. The screen will flash after each explosion (except in basic mode)\",\"upgrades.bigger_explosions.help\":\"Bigger explosions\",\"upgrades.bigger_explosions.name\":\"Kaboom\",\"upgrades.bigger_puck.fullHelp\":\"A bigger puck makes it easier to never miss the ball and to catch more coins, and also to precisely angle the bounces (the ball's angle only depends on where it hits the puck). \\n However, a large puck is harder to use around the sides of the level, and will make it sometimes unavoidable to miss (not hit anything) which comes with downsides. \",\"upgrades.bigger_puck.help\":\"Easily catch more coins.\",\"upgrades.bigger_puck.name\":\"Bigger puck\",\"upgrades.coin_magnet.fullHelp\":\"Directs the coins to the puck. The effect is stronger if the coin is close to it already. Catching 90% or 100% of coins bring special bonuses in the game. \\n\\nAnother way to catch more coins is to hit bricks from the bottom. The ball's speed and direction impacts the spawned coin's velocity. \",\"upgrades.coin_magnet.help\":\"Puck attracts coins\",\"upgrades.coin_magnet.help_plural\":\"Stronger effect on the coins\",\"upgrades.coin_magnet.name\":\"Coins magnet\",\"upgrades.compound_interest.fullHelp\":\"Your combo will grow by one every time you break a brick, spawning more and more coin with every brick you break. \\n\\nBe sure however to catch every one of those coins with your puck, as any lost coin will reset your combo. \\n\\nOnce your combo is above the minimum, the bottom of the play area will have a red line to remind you that coins should not go there.\\n\\nThis perk combines with other combo perks, the combo will rise faster but reset more easily.\",\"upgrades.compound_interest.help\":\"+1 combo per brick broken, resets on coin lost\",\"upgrades.compound_interest.name\":\"Compound interest\",\"upgrades.concave_puck.fullHelp\":\"Balls starts the level going straight up, and bounces with less angle.\",\"upgrades.concave_puck.help\":\" Helps with aiming straight up\",\"upgrades.concave_puck.name\":\"Concave puck\",\"upgrades.extra_levels.fullHelp\":\"The default run can last a max of 7 levels, after which the game is over and whatever score you reached is your run score. \\n\\nEach level of this perk lets you go one level higher. The last levels are often the ones where you make the most score, so the difference can be dramatic.\",\"upgrades.extra_levels.help\":\"Play {{count}} levels instead of 7\",\"upgrades.extra_levels.name\":\"+1 level\",\"upgrades.extra_life.fullHelp\":\"Normally, you have one ball per run, and the run is over as soon as you drop it.\\n\\nThis perk adds a white bar at the bottom of the screen that will save a ball once, and break in the process. \\n\\nYou'll loose one level of that perk every time a ball bounces at the bottom of the screen.\",\"upgrades.extra_life.help\":\"The ball will bounce once on the bottom line before being lost.\",\"upgrades.extra_life.help_plural\":\"The ball will bounce on the bottom {{lvl}} times before being lost.\",\"upgrades.extra_life.name\":\"+1 life\",\"upgrades.hot_start.fullHelp\":\"At the start of every level, your combo will start at +15 points, but then every second it will be decreased by one.\\n\\nThis means the first 15 seconds in a level will spawn many more coins than the following ones, and you should make sure that you clear the level quickly. \\n\\nThe effect stacks with other combo related perks, so you might be able to raise the combo after the 15s timeout, but it will keep ticking down. \\n\\nEvery time you take the perk again, the effect will be more dramatic.\",\"upgrades.hot_start.help\":\"Start at combo {{start}}, -{{lvl}} combo per second\",\"upgrades.hot_start.name\":\"Hot start\",\"upgrades.instant_upgrade.fullHelp\":\"Immediately pick two upgrades, so that you get one free one and one to repay the one used to get this perk. Every further menu to pick upgrades will have fewer options to choose from.\",\"upgrades.instant_upgrade.help\":\"-1 choice until run end.\",\"upgrades.instant_upgrade.name\":\"+2 upgrades now\",\"upgrades.left_is_lava.fullHelp\":\"Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.\\n\\nHowever, your combo will reset as soon as your ball hits the left side . \\n\\nAs soon as your combo rises, the left side becomes red to remind you that you should avoid hitting them. \\n\\nThe effect stacks with other combo perks, combo rises faster with more upgrades but will also reset if any of the reset conditions are met.\",\"upgrades.left_is_lava.help\":\"+1 combo per brick broken, resets on left side hit\",\"upgrades.left_is_lava.name\":\"Avoid left side\",\"upgrades.metamorphosis.fullHelp\":\"With this perk, coins will be of the color of the brick they come from, and will color the first brick they touch in the same color. Coins spawn with the speed of the ball that broke them, which means you can aim a bit in the direction of the bricks you want to \\\"paint\\\".\",\"upgrades.metamorphosis.help\":\"Coins stain the bricks they touch\",\"upgrades.metamorphosis.name\":\"Metamorphosis\",\"upgrades.multiball.fullHelp\":\"As soon as you drop the ball in Breakout 71, you loose. \\n\\nWith this perk, you get two balls, and so you can afford to lose one. \\n\\nThe lost balls come back on the next level. \\n\\nHaving more than one balls makes some further perks available, and of course clears the level faster.\",\"upgrades.multiball.help\":\"Start every levels with {{count}} balls.\",\"upgrades.multiball.name\":\"+1 ball\",\"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 one more option in the list\",\"upgrades.one_more_choice.name\":\"+1 choice until run end\",\"upgrades.picky_eater.fullHelp\":\"Whenever you break a brick the same color as your ball, your combo increases by one. \\nIf it's a different color, the ball takes that new color, but the combo resets.\\nThe bricks with the right color will get a white border. \\nOnce you get a combo higher than your minimum, the bricks of the wrong color will get a red halo. \\nIf you have more than one ball, they all change color whenever one of them hits a brick.\",\"upgrades.picky_eater.help\":\"+1 combo per brick broken, resets on ball color change\",\"upgrades.picky_eater.name\":\"Picky eater\",\"upgrades.pierce.fullHelp\":\"The ball normally bounces as soon as it touches something. With this perk, it will continue its trajectory for up to 3 bricks broken. \\nAfter that, it will bounce on the 4th brick, and you'll need to touch the puck to reset the counter.\",\"upgrades.pierce.help\":\"Ball pierces {{count}} bricks after a puck bounce\",\"upgrades.pierce.name\":\"Piercing\",\"upgrades.pierce_color.fullHelp\":\"Whenever a ball hits a brick of the same color, it will just go through unimpeded. \\nOnce it reaches a brick of a different color, it will break it, take its color and bounce.\",\"upgrades.pierce_color.help\":\"Balls pierce bricks of their color\",\"upgrades.pierce_color.name\":\"Color pierce\",\"upgrades.puck_repulse_ball.fullHelp\":\"When a ball gets close to the puck, it will start slowing down, and even potentially bouncing without touching the puck.\",\"upgrades.puck_repulse_ball.help\":\"Puck repulses balls\",\"upgrades.puck_repulse_ball.help_plural\":\"Stronger repulsion force\",\"upgrades.puck_repulse_ball.name\":\"Soft landing\",\"upgrades.respawn.fullHelp\":\"After breaking two or more bricks, when the ball hits the puck, the first brick will be put back in place, provided that space is free and the brick wasn't a bomb.\\n\\nSome particle effect will let you know where bricks will appear. Leveling this up lets you re-spawn up to 4 bricks at a time, but there should always be at least one destroyed.\",\"upgrades.respawn.help\":\"The first brick hit of two+ will re-spawn\",\"upgrades.respawn.help_plural\":\"More bricks can re-spawn\",\"upgrades.respawn.name\":\"Re-spawn\",\"upgrades.right_is_lava.fullHelp\":\"Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.\\n\\nHowever, your combo will reset as soon as your ball hits the right side . \\n\\nAs soon as your combo rises, the right side becomes red to remind you that you should avoid hitting them\\n\\nThe effect stacks with other combo perks, combo rises faster with more upgrades but will also reset if any\\nof the reset conditions are met.\",\"upgrades.right_is_lava.help\":\"+1 combo per brick broken, resets on right side hit\",\"upgrades.right_is_lava.name\":\"Avoid right side\",\"upgrades.sapper.fullHelp\":\"Instead of just disappearing, the first brick you break will be replaced by a bomb brick. \\n\\nBouncing the ball on the puck re-arms the effect. \\n\\nLeveling-up this perk will allow you to place more bombs.\\n\\nRemember that bombs impact the velocity of nearby coins, so too many explosions could make it hard to catch the fruits of your hard work.\",\"upgrades.sapper.help\":\"The first brick broken becomes a bomb.\",\"upgrades.sapper.help_plural\":\"The first {{lvl}} bricks broken become bombs.\",\"upgrades.sapper.name\":\"Sapper\",\"upgrades.skip_last.fullHelp\":\"You need to break all bricks to go to the next level. However, it can be hard to get the last ones. \\n\\nClearing a level early brings extra choices when upgrading. Never missing the bricks is also very beneficial. \\n\\nSo if you find it difficult to break the last bricks, getting this perk a few time can help.\",\"upgrades.skip_last.help\":\"The last brick will explode.\",\"upgrades.skip_last.help_plural\":\"The last {{lvl}} bricks will explode.\",\"upgrades.skip_last.name\":\"Easy Cleanup\",\"upgrades.slow_down.fullHelp\":\"The ball starts relatively slow, but every level of your run it will start a bit faster. \\n\\nIt will also accelerate if you spend a lot of time in one level. \\n\\nThis perk makes it more manageable. \\n\\nYou can get it at the start every time by enabling kid mode in the menu.\",\"upgrades.slow_down.help\":\"Ball moves more slowly\",\"upgrades.slow_down.name\":\"Slower ball\",\"upgrades.smaller_puck.fullHelp\":\"This makes the puck smaller, which in theory makes some corner shots easier, but really just raises the difficulty.\\n\\nThat's why you also get a nice bonus of +5 coins per brick for all bricks you'll break after picking this. \",\"upgrades.smaller_puck.help\":\"Also gives +5 base combo\",\"upgrades.smaller_puck.help_plural\":\"Even smaller puck and higher base combo\",\"upgrades.smaller_puck.name\":\"Smaller puck\",\"upgrades.soft_reset.fullHelp\":\"Limit the impact of a combo reset.\",\"upgrades.soft_reset.help\":\"Combo resets keeps {{percent}}%\",\"upgrades.soft_reset.name\":\"Soft reset\",\"upgrades.streak_shots.fullHelp\":\"Every time you break a brick, your combo (number of coins per bricks) increases by one. \\n\\nHowever, as soon as the ball touches your puck, the combo is reset to its default value, and you'll just get one coin per brick.\\n\\nOnce your combo rises above the base value, your puck will become red to remind you that it will destroy your combo to touch it with the ball.\\n\\nThis can stack with other combo related perks, the combo will rise faster but reset more easily as any of the conditions is enough to reset it. \",\"upgrades.streak_shots.help\":\"More coins if you break many bricks at once.\",\"upgrades.streak_shots.name\":\"Single puck hit streak\",\"upgrades.sturdy_bricks.fullHelp\":\"With level one of this perk, the ball has a 20% chance to bounce harmlessly on bricks, \\n but generates 10% more coins when it does break one. \\n This +10% is not shown in the combo number. At level 4 the ball has 80% chance of bouncing and brings 40% more coins.\",\"upgrades.sturdy_bricks.help\":\"Bricks sometimes resist hits but drop more coins.\",\"upgrades.sturdy_bricks.help_plural\":\"Bricks resist more and drop more coins\",\"upgrades.sturdy_bricks.name\":\"Sturdy bricks\",\"upgrades.telekinesis.fullHelp\":\"Right after the ball hits your puck, you'll be able to direct it left and right by moving your puck. \\n\\n\\nThe effect stops when the ball hits a brick and resets the next time it touches the puck. It also does nothing when the ball is going downward after bouncing at the top.\",\"upgrades.telekinesis.help\":\"Puck controls the ball's trajectory\",\"upgrades.telekinesis.help_plural\":\"Stronger effect on the ball\",\"upgrades.telekinesis.name\":\"Telekinesis\",\"upgrades.top_is_lava.fullHelp\":\"Whenever you break a brick, your combo will increase by one. However, your combo will reset as soon as your ball hit the top of the screen. \\n\\nWhen your combo is above the minimum, a red bar will appear at the top to remind you that you should avoid hitting it. \\n\\nThe effect stacks with other combo perks.\",\"upgrades.top_is_lava.help\":\"More coins if you don't touch the top.\",\"upgrades.top_is_lava.name\":\"Sky is the limit\",\"upgrades.viscosity.fullHelp\":\"Coins normally accelerate with gravity and explosions to pretty high speeds. \\n\\nThis perk constantly makes them slow down, as if they were in some sort of viscous liquid. \\n\\nThis makes catching them easier, and combines nicely with perks that influence the coin's movement.\",\"upgrades.viscosity.help\":\"Slower coin fall\",\"upgrades.viscosity.name\":\"Viscosity\",\"upgrades.wind.fullHelp\":\"The wind depends on where your puck is, if it's in the center of the screen nothing happens, if it's on the left it will blow left-wise, if it's on the right of the screen then it will blow right-wise. \\n\\nThe wind affects both the balls and coins.\",\"upgrades.wind.help\":\"Puck position creates wind\",\"upgrades.wind.help_plural\":\"Stronger wind force\",\"upgrades.wind.name\":\"Wind\"}"); +module.exports = JSON.parse("{\"confirmRestart.no\":\"Cancel\",\"confirmRestart.text\":\"You're about to start a new run, is that really what you wanted ?\",\"confirmRestart.title\":\"Start a new run ?\",\"confirmRestart.yes\":\"Restart game\",\"gameOver.cumulative_total\":\"Your total cumulative score went from {{startTs}} to {{endTs}}.\",\"gameOver.lost.summary\":\"You dropped the ball after catching {{score}} coins.\",\"gameOver.lost.title\":\"Game Over\",\"gameOver.next_unlock\":\"Score {{points}} more points to reach the next unlock\",\"gameOver.restart\":\"Start a new run\",\"gameOver.stats.balls_lost\":\"Balls lost\",\"gameOver.stats.bricks_broken\":\"Bricks broken\",\"gameOver.stats.bricks_per_minute\":\"Bricks broken per minute\",\"gameOver.stats.catch_rate\":\"Catch rate\",\"gameOver.stats.combo_avg\":\"Average combo\",\"gameOver.stats.combo_max\":\"Max combo\",\"gameOver.stats.duration_per_level\":\"Duration per level\",\"gameOver.stats.hit_rate\":\"Hit rate\",\"gameOver.stats.intro\":\"Find below your run statistics compared to your {{count}} best runs.\",\"gameOver.stats.level_reached\":\"Level reached\",\"gameOver.stats.total_score\":\"Total score\",\"gameOver.stats.upgrades_applied\":\"Upgrades applied\",\"gameOver.test_run\":\"This test run and its score are not being recorded\",\"gameOver.unlocked_count\":\"You unlocked {{count}} item(s) :\",\"gameOver.win.summary\":\"You cleared all levels for this run, catching {{score}} coins in total.\",\"gameOver.win.title\":\"Run finished\",\"level_up.after_buttons\":\"You just finished level {{level}}/{{max}} and picked those upgrades so far :\",\"level_up.before_buttons\":\"You caught {{score}} coins {{catchGain}} out of {{levelSpawnedCoins}} in {{time}} seconds {{timeGain}}.\\n\\nYou missed {{levelMisses}} times {{missesGain}} and hit the walls or ceiling {{levelWallBounces}} times{{wallHitsGain}}.\\n\\n{{compliment}}\",\"level_up.compliment_advice\":\"Try to catch all coins, never miss the bricks, never hit the walls/ceiling or clear the level under 30s to gain additional choices and upgrades.\",\"level_up.compliment_good\":\"Well done !\",\"level_up.compliment_perfect\":\"Impressive, keep it up !\",\"level_up.pick_upgrade_title\":\"Pick an upgrade\",\"level_up.plus_one_choice\":\"(+1 choice)\",\"level_up.plus_one_upgrade\":\"(+1 upgrade and choice)\",\"level_up.unlocked_level\":\" (Level)\",\"level_up.unlocked_perk\":\" (Perk)\",\"level_up.upgrade_perk_to_level\":\" lvl {{level}}\",\"main_menu.basic\":\"Basic graphics\",\"main_menu.basic_help\":\"Fewer particles and flashes, better performance.\",\"main_menu.download_save_file\":\"Download save file\",\"main_menu.download_save_file_help\":\"Get a transferable file with your score and stats\",\"main_menu.footer_html\":\"

\\nMade in France by Renan LE CARO. \\nDonate\\nDiscord\\nF-Droid\\nGoogle Play\\nitch.io \\nGitlab\\nWeb version\\nHackerNews\\nPrivacy Policy\\nv.{{appVersion}}\\n

\\n\",\"main_menu.fullscreen\":\"Fullscreen\",\"main_menu.fullscreen_exit\":\"Exit Fullscreen\",\"main_menu.fullscreen_exit_help\":\"Might not work on some machines\",\"main_menu.fullscreen_help\":\"Might not work on some machines\",\"main_menu.kid\":\"Kids mode\",\"main_menu.kid_help\":\"Start future runs with \\\"slower ball\\\".\",\"main_menu.language\":\"Language\",\"main_menu.language_help\":\"Choose the game's language\",\"main_menu.load_save_file\":\"Load save file\",\"main_menu.load_save_file_help\":\"Select a save file on your device\",\"main_menu.mobile\":\"Mobile mode\",\"main_menu.mobile_help\":\"Leaves space for your thumb under the puck.\",\"main_menu.pointer_lock\":\"Mouse pointer lock\",\"main_menu.pointer_lock_help\":\"Locks and hides the mouse cursor.\",\"main_menu.record\":\"Record gameplay videos\",\"main_menu.record_download\":\"Download video ({{size}} MB)\",\"main_menu.record_help\":\"Get a video of each level.\",\"main_menu.reset\":\"Reset Game\",\"main_menu.reset_cancel\":\"No\",\"main_menu.reset_confirm\":\"Yes\",\"main_menu.reset_help\":\"Erase high score and statistics\",\"main_menu.reset_instruction\":\"You will loose all progress you made in the game, are you sure ?\",\"main_menu.resume\":\"Resume\",\"main_menu.resume_help\":\"Return to your run\",\"main_menu.save_file_error\":\"Error loading save file\",\"main_menu.save_file_loaded\":\"Save file loaded\",\"main_menu.save_file_loaded_help\":\"The app will now reload to apply your save\",\"main_menu.save_file_loaded_ok\":\"Ok\",\"main_menu.sounds\":\"Game sounds\",\"main_menu.sounds_help\":\"Can slow down some phones.\",\"main_menu.title\":\"Breakout 71\",\"main_menu.unlocks\":\"Starting perk\",\"main_menu.unlocks_help\":\"Try perks and levels you unlocked\",\"play.close_modale_window_tooltip\":\"close \",\"play.current_lvl\":\"L{{level}}/{{max}}\",\"play.menu_label\":\"menu\",\"play.missed_ball\":\"miss\",\"play.mobile_press_to_play\":\"Press and hold here to play\",\"sandbox.help\":\"Test any perk combination\",\"sandbox.instructions\":\"Select perks below and press \\\"start run\\\" to try them out in a test run. Scores and stats are not recorded.\",\"sandbox.start\":\"Start test run\",\"sandbox.title\":\"Sandbox mode\",\"sandbox.unlocks_at\":\"Unlocks at total score {{score}}\",\"score_panel.restart\":\"Restart\",\"score_panel.restart_help\":\"Start a brand new run\",\"score_panel.resume\":\"Resume\",\"score_panel.resume_help\":\"Return to your run\",\"score_panel.test_run\":\"This is a test run, score is not recorded permanently\",\"score_panel.title\":\"{{score}} points at level {{level}}/{{max}} \",\"score_panel.upgrades_picked\":\"Upgrades picked so far : \",\"unlocks.greyed_out_help\":\"The greyed out ones can be unlocked by increasing your total score. The total score increases every time you score in game.\",\"unlocks.intro\":\"Your total score is {{ts}}. Below are all the upgrades and levels the games has to offer.\",\"unlocks.level_description\":\"A {{size}}x{{size}} level with {{bricks}} bricks\",\"unlocks.title\":\"You unlocked {{percentUnlock}}% of the game.\",\"unlocks.unlocks_at\":\"Unlocks at total score {{threshold}}.\",\"upgrades.antigrav.fullHelp\":\"This affects the coins and will let the float up until you are ready to pick them up.\",\"upgrades.antigrav.help\":\"Gravity reversed left and right of puck\",\"upgrades.antigrav.name\":\"Antigrav\",\"upgrades.asceticism.fullHelp\":\"This affects the coins and will let the float up until you are ready to pick them up.\",\"upgrades.asceticism.help\":\"+1 combo / brick, com resets on coin catch\",\"upgrades.asceticism.name\":\"Asceticism\",\"upgrades.ball_attract_ball.fullHelp\":\"Balls that are more than half a screen width away will start attracting each other. \\n\\nThe attraction force is stronger when they are furthest away from each other.\\n\\nRainbow particles will fly to symbolize the attraction force. This perk is only offered if you have more than one ball already.\",\"upgrades.ball_attract_ball.help\":\"Balls attract balls\",\"upgrades.ball_attract_ball.help_plural\":\"Stronger attraction force\",\"upgrades.ball_attract_ball.name\":\"Gravity\",\"upgrades.ball_repulse_ball.fullHelp\":\"Balls that are less than half a screen width away will start repulsing each other. The repulsion force is stronger if they are close to each other. Particles will jet out to symbolize this force being applied. This perk is only offered if you have more than one ball already.\",\"upgrades.ball_repulse_ball.help\":\"Balls repulse balls\",\"upgrades.ball_repulse_ball.help_plural\":\"Stronger repulsion force\",\"upgrades.ball_repulse_ball.name\":\"Personal space\",\"upgrades.base_combo.fullHelp\":\"Your combo (number of coins per bricks) normally starts at 1 at the beginning of the level, and resets to one when you bounce around without hitting anything. With this perk, the combo starts 3 points higher, so you'll always get at least 4 coins per brick. Whenever your combo reset, it will go back to 4 and not 1. Your ball will glitter a bit to indicate that its combo is higher than one.\",\"upgrades.base_combo.help\":\"Combo starts at {{coins}}.\",\"upgrades.base_combo.name\":\"+3 base combo\",\"upgrades.bigger_explosions.fullHelp\":\"The default explosion clears a 3x3 square, with this it becomes a 5x5 square, and the blow on the coins is also significantly stronger. The screen will flash after each explosion (except in basic mode)\",\"upgrades.bigger_explosions.help\":\"Bigger explosions\",\"upgrades.bigger_explosions.name\":\"Kaboom\",\"upgrades.bigger_puck.fullHelp\":\"A bigger puck makes it easier to never miss the ball and to catch more coins, and also to precisely angle the bounces (the ball's angle only depends on where it hits the puck). \\n However, a large puck is harder to use around the sides of the level, and will make it sometimes unavoidable to miss (not hit anything) which comes with downsides. \",\"upgrades.bigger_puck.help\":\"Easily catch more coins.\",\"upgrades.bigger_puck.name\":\"Bigger puck\",\"upgrades.coin_magnet.fullHelp\":\"Directs the coins to the puck. The effect is stronger if the coin is close to it already. Catching 90% or 100% of coins bring special bonuses in the game. \\n\\nAnother way to catch more coins is to hit bricks from the bottom. The ball's speed and direction impacts the spawned coin's velocity. \",\"upgrades.coin_magnet.help\":\"Puck attracts coins\",\"upgrades.coin_magnet.help_plural\":\"Stronger effect on the coins\",\"upgrades.coin_magnet.name\":\"Coins magnet\",\"upgrades.compound_interest.fullHelp\":\"Your combo will grow by one every time you break a brick, spawning more and more coin with every brick you break. \\n\\nBe sure however to catch every one of those coins with your puck, as any lost coin will reset your combo. \\n\\nOnce your combo is above the minimum, the bottom of the play area will have a red line to remind you that coins should not go there.\\n\\nThis perk combines with other combo perks, the combo will rise faster but reset more easily.\",\"upgrades.compound_interest.help\":\"+1 combo per brick broken, resets on coin lost\",\"upgrades.compound_interest.name\":\"Compound interest\",\"upgrades.concave_puck.fullHelp\":\"Balls starts the level going straight up, and bounces with less angle.\",\"upgrades.concave_puck.help\":\" Helps with aiming straight up\",\"upgrades.concave_puck.name\":\"Concave puck\",\"upgrades.etherealcoins.fullHelp\":\"You'll have to make sure that the coins fall down somehow\",\"upgrades.etherealcoins.help\":\"Coins are no longer affected by gravity\",\"upgrades.etherealcoins.name\":\"Ethereal coins\",\"upgrades.extra_levels.fullHelp\":\"The default run can last a max of 7 levels, after which the game is over and whatever score you reached is your run score. \\n\\nEach level of this perk lets you go one level higher. The last levels are often the ones where you make the most score, so the difference can be dramatic.\",\"upgrades.extra_levels.help\":\"Play {{count}} levels instead of 7\",\"upgrades.extra_levels.name\":\"+1 level\",\"upgrades.extra_life.fullHelp\":\"Normally, you have one ball per run, and the run is over as soon as you drop it.\\n\\nThis perk adds a white bar at the bottom of the screen that will save a ball once, and break in the process. \\n\\nYou'll loose one level of that perk every time a ball bounces at the bottom of the screen.\",\"upgrades.extra_life.help\":\"The ball will bounce once on the bottom line before being lost.\",\"upgrades.extra_life.help_plural\":\"The ball will bounce on the bottom {{lvl}} times before being lost.\",\"upgrades.extra_life.name\":\"+1 life\",\"upgrades.hot_start.fullHelp\":\"At the start of every level, your combo will start at +15 points, but then every second it will be decreased by one.\\n\\nThis means the first 15 seconds in a level will spawn many more coins than the following ones, and you should make sure that you clear the level quickly. \\n\\nThe effect stacks with other combo related perks, so you might be able to raise the combo after the 15s timeout, but it will keep ticking down. \\n\\nEvery time you take the perk again, the effect will be more dramatic.\",\"upgrades.hot_start.help\":\"Start at combo {{start}}, -{{lvl}} combo per second\",\"upgrades.hot_start.name\":\"Hot start\",\"upgrades.instant_upgrade.fullHelp\":\"Immediately pick two upgrades, so that you get one free one and one to repay the one used to get this perk. Every further menu to pick upgrades will have fewer options to choose from.\",\"upgrades.instant_upgrade.help\":\"-1 choice until run end.\",\"upgrades.instant_upgrade.name\":\"+2 upgrades now\",\"upgrades.left_is_lava.fullHelp\":\"Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.\\n\\nHowever, your combo will reset as soon as your ball hits the left side . \\n\\nAs soon as your combo rises, the left side becomes red to remind you that you should avoid hitting them. \\n\\nThe effect stacks with other combo perks, combo rises faster with more upgrades but will also reset if any of the reset conditions are met.\",\"upgrades.left_is_lava.help\":\"+1 combo per brick broken, resets on left side hit\",\"upgrades.left_is_lava.name\":\"Avoid left side\",\"upgrades.metamorphosis.fullHelp\":\"With this perk, coins will be of the color of the brick they come from, and will color the first brick they touch in the same color. Coins spawn with the speed of the ball that broke them, which means you can aim a bit in the direction of the bricks you want to \\\"paint\\\".\",\"upgrades.metamorphosis.help\":\"Coins stain the bricks they touch\",\"upgrades.metamorphosis.name\":\"Metamorphosis\",\"upgrades.multiball.fullHelp\":\"As soon as you drop the ball in Breakout 71, you loose. \\n\\nWith this perk, you get two balls, and so you can afford to lose one. \\n\\nThe lost balls come back on the next level. \\n\\nHaving more than one balls makes some further perks available, and of course clears the level faster.\",\"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\":\"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 one more option in the list\",\"upgrades.one_more_choice.name\":\"+1 choice until run end\",\"upgrades.picky_eater.fullHelp\":\"Whenever you break a brick the same color as your ball, your combo increases by one. \\nIf it's a different color, the ball takes that new color, but the combo resets.\\nThe bricks with the right color will get a white border. \\nOnce you get a combo higher than your minimum, the bricks of the wrong color will get a red halo. \\nIf you have more than one ball, they all change color whenever one of them hits a brick.\",\"upgrades.picky_eater.help\":\"+1 combo per brick broken, resets on ball color change\",\"upgrades.picky_eater.name\":\"Picky eater\",\"upgrades.pierce.fullHelp\":\"The ball normally bounces as soon as it touches something. With this perk, it will continue its trajectory for up to 3 bricks broken. \\nAfter that, it will bounce on the 4th brick, and you'll need to touch the puck to reset the counter.\",\"upgrades.pierce.help\":\"Ball pierces {{count}} bricks after a puck bounce\",\"upgrades.pierce.name\":\"Piercing\",\"upgrades.pierce_color.fullHelp\":\"Whenever a ball hits a brick of the same color, it will just go through unimpeded. \\nOnce it reaches a brick of a different color, it will break it, take its color and bounce.\",\"upgrades.pierce_color.help\":\"Balls pierce bricks of their color\",\"upgrades.pierce_color.name\":\"Color pierce\",\"upgrades.puck_repulse_ball.fullHelp\":\"When a ball gets close to the puck, it will start slowing down, and even potentially bouncing without touching the puck.\",\"upgrades.puck_repulse_ball.help\":\"Puck repulses balls\",\"upgrades.puck_repulse_ball.help_plural\":\"Stronger repulsion force\",\"upgrades.puck_repulse_ball.name\":\"Soft landing\",\"upgrades.respawn.fullHelp\":\"After breaking two or more bricks, when the ball hits the puck, the first brick will be put back in place, provided that space is free and the brick wasn't a bomb.\\n\\nSome particle effect will let you know where bricks will appear. Leveling this up lets you re-spawn up to 4 bricks at a time, but there should always be at least one destroyed.\",\"upgrades.respawn.help\":\"The first brick hit of two+ will re-spawn\",\"upgrades.respawn.help_plural\":\"More bricks can re-spawn\",\"upgrades.respawn.name\":\"Re-spawn\",\"upgrades.right_is_lava.fullHelp\":\"Whenever you break a brick, your combo will increase by one, so you'll get one more coin from all the next bricks you break.\\n\\nHowever, your combo will reset as soon as your ball hits the right side . \\n\\nAs soon as your combo rises, the right side becomes red to remind you that you should avoid hitting them\\n\\nThe effect stacks with other combo perks, combo rises faster with more upgrades but will also reset if any\\nof the reset conditions are met.\",\"upgrades.right_is_lava.help\":\"+1 combo per brick broken, resets on right side hit\",\"upgrades.right_is_lava.name\":\"Avoid right side\",\"upgrades.sapper.fullHelp\":\"Instead of just disappearing, the first brick you break will be replaced by a bomb brick. \\n\\nBouncing the ball on the puck re-arms the effect. \\n\\nLeveling-up this perk will allow you to place more bombs.\\n\\nRemember that bombs impact the velocity of nearby coins, so too many explosions could make it hard to catch the fruits of your hard work.\",\"upgrades.sapper.help\":\"The first brick broken becomes a bomb.\",\"upgrades.sapper.help_plural\":\"The first {{lvl}} bricks broken become bombs.\",\"upgrades.sapper.name\":\"Sapper\",\"upgrades.shunt.fullHelp\":\"If you also have hot start, the hot start is just added to the current combo\",\"upgrades.shunt.help\":\"Combo no longer resets between levels\",\"upgrades.shunt.name\":\"Shunt\",\"upgrades.skip_last.fullHelp\":\"You need to break all bricks to go to the next level. However, it can be hard to get the last ones. \\n\\nClearing a level early brings extra choices when upgrading. Never missing the bricks is also very beneficial. \\n\\nSo if you find it difficult to break the last bricks, getting this perk a few time can help.\",\"upgrades.skip_last.help\":\"The last brick will explode.\",\"upgrades.skip_last.help_plural\":\"The last {{lvl}} bricks will explode.\",\"upgrades.skip_last.name\":\"Easy Cleanup\",\"upgrades.slow_down.fullHelp\":\"The ball starts relatively slow, but every level of your run it will start a bit faster. \\n\\nIt will also accelerate if you spend a lot of time in one level. \\n\\nThis perk makes it more manageable. \\n\\nYou can get it at the start every time by enabling kid mode in the menu.\",\"upgrades.slow_down.help\":\"Ball moves more slowly\",\"upgrades.slow_down.name\":\"Slower ball\",\"upgrades.smaller_puck.fullHelp\":\"This makes the puck smaller, which in theory makes some corner shots easier, but really just raises the difficulty.\\n\\nThat's why you also get a nice bonus of +5 coins per brick for all bricks you'll break after picking this. \",\"upgrades.smaller_puck.help\":\"Also gives +5 base combo\",\"upgrades.smaller_puck.help_plural\":\"Even smaller puck and higher base combo\",\"upgrades.smaller_puck.name\":\"Smaller puck\",\"upgrades.soft_reset.fullHelp\":\"Limit the impact of a combo reset.\",\"upgrades.soft_reset.help\":\"Combo resets keeps {{percent}}%\",\"upgrades.soft_reset.name\":\"Soft reset\",\"upgrades.streak_shots.fullHelp\":\"Every time you break a brick, your combo (number of coins per bricks) increases by one. \\n\\nHowever, as soon as the ball touches your puck, the combo is reset to its default value, and you'll just get one coin per brick.\\n\\nOnce your combo rises above the base value, your puck will become red to remind you that it will destroy your combo to touch it with the ball.\\n\\nThis can stack with other combo related perks, the combo will rise faster but reset more easily as any of the conditions is enough to reset it. \",\"upgrades.streak_shots.help\":\"More coins if you break many bricks at once.\",\"upgrades.streak_shots.name\":\"Single puck hit streak\",\"upgrades.sturdy_bricks.fullHelp\":\"With level one of this perk, the ball has a 20% chance to bounce harmlessly on bricks, \\n but generates 10% more coins when it does break one. \\n This +10% is not shown in the combo number. At level 4 the ball has 80% chance of bouncing and brings 40% more coins.\",\"upgrades.sturdy_bricks.help\":\"Bricks sometimes resist hits but drop more coins.\",\"upgrades.sturdy_bricks.help_plural\":\"Bricks resist more and drop more coins\",\"upgrades.sturdy_bricks.name\":\"Sturdy bricks\",\"upgrades.telekinesis.fullHelp\":\"Right after the ball hits your puck, you'll be able to direct it left and right by moving your puck. \\n\\n\\nThe effect stops when the ball hits a brick and resets the next time it touches the puck. It also does nothing when the ball is going downward after bouncing at the top.\",\"upgrades.telekinesis.help\":\"Puck controls the ball's trajectory\",\"upgrades.telekinesis.help_plural\":\"Stronger effect on the ball\",\"upgrades.telekinesis.name\":\"Telekinesis\",\"upgrades.top_is_lava.fullHelp\":\"Whenever you break a brick, your combo will increase by one. However, your combo will reset as soon as your ball hit the top of the screen. \\n\\nWhen your combo is above the minimum, a red bar will appear at the top to remind you that you should avoid hitting it. \\n\\nThe effect stacks with other combo perks.\",\"upgrades.top_is_lava.help\":\"More coins if you don't touch the top.\",\"upgrades.top_is_lava.name\":\"Sky is the limit\",\"upgrades.unbounded.fullHelp\":\"I hope you've found a way to keep your ball on screen\",\"upgrades.unbounded.help\":\"+1 combo per brick, no more sides\",\"upgrades.unbounded.name\":\"Unbounded\",\"upgrades.viscosity.fullHelp\":\"Coins normally accelerate with gravity and explosions to pretty high speeds. \\n\\nThis perk constantly makes them slow down, as if they were in some sort of viscous liquid. \\n\\nThis makes catching them easier, and combines nicely with perks that influence the coin's movement.\",\"upgrades.viscosity.help\":\"Slower coin fall\",\"upgrades.viscosity.name\":\"Viscosity\",\"upgrades.wind.fullHelp\":\"The wind depends on where your puck is, if it's in the center of the screen nothing happens, if it's on the left it will blow left-wise, if it's on the right of the screen then it will blow right-wise. \\n\\nThe wind affects both the balls and coins.\",\"upgrades.wind.help\":\"Puck position creates wind\",\"upgrades.wind.help_plural\":\"Stronger wind force\",\"upgrades.wind.name\":\"Wind\",\"upgrades.yoyo.fullHelp\":\"It's the opposite of telekinesis\",\"upgrades.yoyo.help\":\"Ball falls toward puck\",\"upgrades.yoyo.name\":\"Yo-yo\"}"); },{}],"5blfu":[function(require,module,exports,__globalThis) { // Settings @@ -1680,93 +1807,6 @@ function addToTotalScore(gameState, points) { setSettingValue("breakout_71_total_score", getTotalScore() + points); } -},{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"gkKU3":[function(require,module,exports,__globalThis) { -exports.interopDefault = function(a) { - return a && a.__esModule ? a : { - default: a - }; -}; -exports.defineInteropFlag = function(a) { - Object.defineProperty(a, '__esModule', { - value: true - }); -}; -exports.exportAll = function(source, dest) { - Object.keys(source).forEach(function(key) { - if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) return; - Object.defineProperty(dest, key, { - enumerable: true, - get: function() { - return source[key]; - } - }); - }); - return dest; -}; -exports.export = function(dest, destName, get) { - Object.defineProperty(dest, destName, { - enumerable: true, - get: get - }); -}; - -},{}],"7OIPf":[function(require,module,exports,__globalThis) { -var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); -parcelHelpers.defineInteropFlag(exports); -parcelHelpers.export(exports, "getLevelBackground", ()=>getLevelBackground); -parcelHelpers.export(exports, "hashCode", ()=>hashCode); -var _backgroundsJson = require("./data/backgrounds.json"); -var _backgroundsJsonDefault = parcelHelpers.interopDefault(_backgroundsJson); -const backgrounds = (0, _backgroundsJsonDefault.default); -function getLevelBackground(level) { - let svg = level.svg !== null && backgrounds[level.svg % backgrounds.length]; - if (!level.color && !svg) svg = backgrounds[hashCode(level.name) % backgrounds.length]; - return svg; -} -function hashCode(string) { - let hash = 0; - for(let i = 0; i < string.length; i++){ - let code = string.charCodeAt(i); - hash = (hash << 5) - hash + code; - hash = hash & hash; // Convert to 32bit integer - } - return Math.abs(hash); -} - -},{"./data/backgrounds.json":"31wW4","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"31wW4":[function(require,module,exports,__globalThis) { -module.exports = JSON.parse("[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]"); - -},{}],"6rQoT":[function(require,module,exports,__globalThis) { -var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); -parcelHelpers.defineInteropFlag(exports); -parcelHelpers.export(exports, "levelIconHTML", ()=>levelIconHTML); -let levelIconHTMLCanvas = document.createElement("canvas"); -const levelIconHTMLCanvasCtx = levelIconHTMLCanvas.getContext("2d", { - antialias: false, - alpha: true -}); -function levelIconHTML(bricks, levelSize, color) { - const size = 40; - const c = levelIconHTMLCanvas; - const ctx = levelIconHTMLCanvasCtx; - if (!ctx) return ""; - c.width = size; - c.height = size; - if (color) { - ctx.fillStyle = color; - ctx.fillRect(0, 0, size, size); - } else ctx.clearRect(0, 0, size, size); - const pxSize = size / levelSize; - for(let x = 0; x < levelSize; x++)for(let y = 0; y < levelSize; y++){ - const c = bricks[y * levelSize + x]; - if (c) { - ctx.fillStyle = c; - ctx.fillRect(Math.floor(pxSize * x), Math.floor(pxSize * y), Math.ceil(pxSize), Math.ceil(pxSize)); - } - } - return ``; -} - },{"@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"dQKPV":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); parcelHelpers.defineInteropFlag(exports); @@ -2025,10 +2065,12 @@ parcelHelpers.export(exports, "max_levels", ()=>max_levels); parcelHelpers.export(exports, "pickedUpgradesHTMl", ()=>pickedUpgradesHTMl); parcelHelpers.export(exports, "currentLevelInfo", ()=>currentLevelInfo); parcelHelpers.export(exports, "isTelekinesisActive", ()=>isTelekinesisActive); +parcelHelpers.export(exports, "isYoyoActive", ()=>isYoyoActive); parcelHelpers.export(exports, "findLast", ()=>findLast); parcelHelpers.export(exports, "distance2", ()=>distance2); parcelHelpers.export(exports, "distanceBetween", ()=>distanceBetween); parcelHelpers.export(exports, "defaultSounds", ()=>defaultSounds); +parcelHelpers.export(exports, "shouldPierceByColor", ()=>shouldPierceByColor); var _loadGameData = require("./loadGameData"); function getMajorityValue(arr) { const count = {}; @@ -2074,7 +2116,10 @@ function currentLevelInfo(gameState) { return gameState.runLevels[gameState.currentLevel % gameState.runLevels.length]; } function isTelekinesisActive(gameState, ball) { - return gameState.perks.telekinesis && !ball.hitSinceBounce && ball.vy < 0; + return gameState.perks.telekinesis && ball.vy < 0; +} +function isYoyoActive(gameState, ball) { + return gameState.perks.yoyo && ball.vy > 0; } function findLast(arr, predicate) { let i = arr.length; @@ -2124,6 +2169,13 @@ function defaultSounds() { } }; } +function shouldPierceByColor(gameState, vhit, hhit, chit) { + if (!gameState.perks.pierce_color) return false; + if (typeof vhit !== "undefined" && gameState.bricks[vhit] !== gameState.ballsColor) return false; + if (typeof hhit !== "undefined" && gameState.bricks[hhit] !== gameState.ballsColor) return false; + if (typeof chit !== "undefined" && gameState.bricks[chit] !== gameState.ballsColor) return false; + return true; +} },{"./loadGameData":"l1B4x","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"2n0gK":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); @@ -2137,42 +2189,7 @@ if ("serviceWorker" in navigator && window.location.href.endsWith("/index.html?i },{"b04459cc43e56e8c":"lIuq9","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}],"lIuq9":[function(require,module,exports,__globalThis) { module.exports = require("6be19b04c531804c").getBundleURL('28aWT') + "sw-b71.41cdff1b.js"; -},{"6be19b04c531804c":"lgJ39"}],"lgJ39":[function(require,module,exports,__globalThis) { -"use strict"; -var bundleURL = {}; -function getBundleURLCached(id) { - var value = bundleURL[id]; - if (!value) { - value = getBundleURL(); - bundleURL[id] = value; - } - return value; -} -function getBundleURL() { - try { - throw new Error(); - } catch (err) { - var matches = ('' + err.stack).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^)\n]+/g); - if (matches) // The first two stack frames will be this function and getBundleURLCached. - // Use the 3rd one, which will be a runtime in the original bundle. - return getBaseURL(matches[2]); - } - return '/'; -} -function getBaseURL(url) { - return ('' + url).replace(/^((?:https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/.+)\/[^/]+$/, '$1') + '/'; -} -// TODO: Replace uses with `new URL(url).origin` when ie11 is no longer supported. -function getOrigin(url) { - var matches = ('' + url).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^/]+/); - if (!matches) throw new Error('Origin not found'); - return matches[0]; -} -exports.getBundleURL = getBundleURLCached; -exports.getBaseURL = getBaseURL; -exports.getOrigin = getOrigin; - -},{}],"9ZeQl":[function(require,module,exports,__globalThis) { +},{"6be19b04c531804c":"lgJ39"}],"9ZeQl":[function(require,module,exports,__globalThis) { var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js"); parcelHelpers.defineInteropFlag(exports); parcelHelpers.export(exports, "setMousePos", ()=>setMousePos); @@ -2192,6 +2209,8 @@ parcelHelpers.export(exports, "setLevel", ()=>setLevel); parcelHelpers.export(exports, "rainbowColor", ()=>rainbowColor); parcelHelpers.export(exports, "repulse", ()=>repulse); parcelHelpers.export(exports, "attract", ()=>attract); +parcelHelpers.export(exports, "coinBrickHitCheck", ()=>coinBrickHitCheck); +parcelHelpers.export(exports, "bordersHitCheck", ()=>bordersHitCheck); parcelHelpers.export(exports, "gameStateTick", ()=>gameStateTick); parcelHelpers.export(exports, "ballTick", ()=>ballTick); parcelHelpers.export(exports, "append", ()=>append); @@ -2333,11 +2352,9 @@ function explodeBrick(gameState, index, ball, isExplosion) { gameState.lastExplosion = Date.now(); makeLight(gameState, x, y, "white", gameState.brickWidth * 2, 150); spawnExplosion(gameState, 7 * (1 + gameState.perks.bigger_explosions), x, y, "white"); - ball.hitSinceBounce++; gameState.runStatistics.bricks_broken++; } else if (color) { // Even if it bounces we don't want to count that as a miss - ball.hitSinceBounce++; // Flashing is take care of by the tick loop const x = (0, _gameUtils.brickCenterX)(gameState, index), y = (0, _gameUtils.brickCenterY)(gameState, index); gameState.bricks[index] = ""; @@ -2362,7 +2379,7 @@ function explodeBrick(gameState, index, ball, isExplosion) { const cx = x + (Math.random() - 0.5) * (gameState.brickWidth - gameState.coinSize), cy = y + (Math.random() - 0.5) * (gameState.brickWidth - gameState.coinSize); makeCoin(gameState, cx, cy, ball.previousVX * (0.5 + Math.random()), ball.previousVY * (0.5 + Math.random()), gameState.perks.metamorphosis ? color : "gold", points); } - gameState.combo += Math.max(0, gameState.perks.streak_shots + gameState.perks.compound_interest + gameState.perks.left_is_lava + gameState.perks.right_is_lava + gameState.perks.top_is_lava + gameState.perks.picky_eater); + gameState.combo += gameState.perks.streak_shots + gameState.perks.compound_interest + gameState.perks.left_is_lava + gameState.perks.right_is_lava + gameState.perks.top_is_lava + gameState.perks.picky_eater + gameState.perks.asceticism + gameState.perks.unbounded; if (!isExplosion) { // color change if ((gameState.perks.picky_eater || gameState.perks.pierce_color) && color !== gameState.ballsColor && color) { @@ -2424,6 +2441,7 @@ function addToScore(gameState, coin) { schedulGameSound(gameState, "coinCatch", coin.x, 1); } gameState.runStatistics.score += coin.points; + if (gameState.perks.asceticism) resetCombo(gameState, coin.x, coin.y); } async function setLevel(gameState, l) { (0, _recording.stopRecording)(); @@ -2431,6 +2449,7 @@ async function setLevel(gameState, l) { if (l > 0) await (0, _game.openUpgradesPicker)(gameState); gameState.currentLevel = l; gameState.levelTime = 0; + gameState.noBricksSince = 0; gameState.levelWallBounces = 0; gameState.autoCleanUses = 0; gameState.lastTickDown = gameState.levelTime; @@ -2439,7 +2458,8 @@ async function setLevel(gameState, l) { gameState.levelMisses = 0; gameState.runStatistics.levelsPlayed++; // Reset combo silently - gameState.combo = baseCombo(gameState) + gameState.perks.hot_start * 15; + if (!gameState.perks.shunt) gameState.combo = baseCombo(gameState); + gameState.combo += gameState.perks.hot_start * 15; resetBalls(gameState); const lvl = (0, _gameUtils.currentLevelInfo)(gameState); if (lvl.size !== gameState.gridSize) { @@ -2499,6 +2519,65 @@ function attract(gameState, a, b, power) { makeParticle(gameState, a.x, a.y, dx * speed + a.vx + (Math.random() - 0.5) * rand, dy * speed + a.vy + (Math.random() - 0.5) * rand, rainbowColor(), true, gameState.coinSize / 2, 100); makeParticle(gameState, b.x, b.y, -dx * speed + b.vx + (Math.random() - 0.5) * rand, -dy * speed + b.vy + (Math.random() - 0.5) * rand, rainbowColor(), true, gameState.coinSize / 2, 100); } +function coinBrickHitCheck(gameState, coin) { + // Make ball/coin bonce, and return bricks that were hit + const radius = coin.size / 2; + const { x, y, previousX, previousY } = coin; + const vhit = (0, _game.hitsSomething)(previousX, y, radius); + const hhit = (0, _game.hitsSomething)(x, previousY, radius); + const chit = typeof vhit == "undefined" && typeof hhit == "undefined" && (0, _game.hitsSomething)(x, y, radius) || undefined; + if (typeof vhit !== "undefined" || typeof chit !== "undefined") { + coin.y = coin.previousY; + coin.vy *= -1; + // Roll on corners + const leftHit = gameState.bricks[(0, _game.brickIndex)(x - radius, y + radius)]; + const rightHit = gameState.bricks[(0, _game.brickIndex)(x + radius, y + radius)]; + if (leftHit && !rightHit) { + coin.vx += 1; + coin.sa -= 1; + } + if (!leftHit && rightHit) { + coin.vx -= 1; + coin.sa += 1; + } + } + if (typeof hhit !== "undefined" || typeof chit !== "undefined") { + coin.x = coin.previousX; + coin.vx *= -1; + } + return vhit ?? hhit ?? chit; +} +function bordersHitCheck(gameState, coin, radius, delta) { + if (coin.destroyed) return; + coin.previousX = coin.x; + coin.previousY = coin.y; + coin.x += coin.vx * delta; + coin.y += coin.vy * delta; + coin.sx ||= 0; + coin.sy ||= 0; + coin.sx += coin.previousX - coin.x; + coin.sy += coin.previousY - coin.y; + coin.sx *= 0.9; + coin.sy *= 0.9; + if (gameState.perks.wind) coin.vx += (gameState.puckPosition - (gameState.offsetX + gameState.gameZoneWidth / 2)) / gameState.gameZoneWidth * gameState.perks.wind * 0.5; + let vhit = 0, hhit = 0; + if (coin.x < gameState.offsetXRoundedDown + radius && !gameState.perks.unbounded) { + coin.x = gameState.offsetXRoundedDown + radius + (gameState.offsetXRoundedDown + radius - coin.x); + coin.vx *= -1; + hhit = 1; + } + if (coin.y < radius) { + coin.y = radius + (radius - coin.y); + coin.vy *= -1; + vhit = 1; + } + if (coin.x > gameState.canvasWidth - gameState.offsetXRoundedDown - radius && !gameState.perks.unbounded) { + coin.x = gameState.canvasWidth - gameState.offsetXRoundedDown - radius - (coin.x - (gameState.canvasWidth - gameState.offsetXRoundedDown - radius)); + coin.vx *= -1; + hhit = 1; + } + return hhit + vhit * 2; +} function gameStateTick(gameState, // How many frames to compute at once, can go above 1 to compensate lag frames = 1) { gameState.runStatistics.max_combo = Math.max(gameState.runStatistics.max_combo, gameState.combo); @@ -2514,7 +2593,8 @@ frames = 1) { }); gameState.autoCleanUses++; } - if (!remainingBricks && !liveCount(gameState.coins)) { + if (!remainingBricks && gameState.noBricksSince == 0) gameState.noBricksSince ||= gameState.levelTime; + if (!remainingBricks && (!liveCount(gameState.coins) || gameState.levelTime > gameState.noBricksSince + 5000)) { if (gameState.currentLevel + 1 < (0, _gameUtils.max_levels)(gameState)) setLevel(gameState, gameState.currentLevel + 1); else (0, _gameOver.gameOver)((0, _i18N.t)("gameOver.win.title"), (0, _i18N.t)("gameOver.win.summary", { score: gameState.score @@ -2523,8 +2603,10 @@ frames = 1) { const coinRadius = Math.round(gameState.coinSize / 2); forEachLiveOne(gameState.coins, (coin, coinIndex)=>{ if (gameState.perks.coin_magnet) { - const attractionX = frames * (gameState.puckPosition - coin.x) / (100 + Math.pow(coin.y - gameState.gameZoneHeight, 2) + Math.pow(coin.x - gameState.puckPosition, 2)) * gameState.perks.coin_magnet * 100; + const strength = 100 / (100 + Math.pow(coin.y - gameState.gameZoneHeight, 2) + Math.pow(coin.x - gameState.puckPosition, 2)) * gameState.perks.coin_magnet; + const attractionX = frames * (gameState.puckPosition - coin.x) * strength; coin.vx += attractionX; + coin.vy += frames * (gameState.gameZoneHeight - coin.y) * strength / 2; coin.sa -= attractionX / 10; } const ratio = 1 - (gameState.perks.viscosity * 0.03 + 0.005) * frames; @@ -2536,9 +2618,13 @@ frames = 1) { if (coin.vy < -7 * gameState.baseSpeed) coin.vy = -7 * gameState.baseSpeed; coin.a += coin.sa; // Gravity - coin.vy += frames * coin.weight * 0.8; + if (!gameState.perks.etherealcoins) { + const flip = gameState.perks.antigrav > 0 && Math.abs(coin.x - gameState.puckPosition) * 2 > gameState.puckWidth + coin.size; + coin.vy += frames * coin.weight * 0.8 * (flip ? -1 : 1); + if (flip && !(0, _options.isOptionOn)('basic') && Math.random() < 0.1) makeParticle(gameState, coin.x, coin.y, 0, gameState.baseSpeed, rainbowColor(), true, 5, 250); + } const speed = Math.abs(coin.sx) + Math.abs(coin.sx); - const hitBorder = (0, _game.bordersHitCheck)(coin, coin.size / 2, frames); + const hitBorder = bordersHitCheck(gameState, coin, coin.size / 2, frames); if (coin.y > gameState.gameZoneHeight - coinRadius - gameState.puckHeight && coin.y < gameState.gameZoneHeight + gameState.puckHeight + coin.vy && Math.abs(coin.x - gameState.puckPosition) < coinRadius + gameState.puckWidth / 2 + // a bit of margin to be nice gameState.puckHeight) { addToScore(gameState, coin); @@ -2546,8 +2632,9 @@ frames = 1) { } else if (coin.y > gameState.canvasHeight + coinRadius) { destroy(gameState.coins, coinIndex); if (gameState.perks.compound_interest) resetCombo(gameState, coin.x, coin.y); - } - const hitBrick = (0, _game.coinBrickHitCheck)(coin); + } else if (gameState.perks.unbounded && (coin.x < -50 || coin.x > gameState.canvasWidth + 50)) // Out of bound on sides + destroy(gameState.coins, coinIndex); + const hitBrick = coinBrickHitCheck(gameState, coin); if (gameState.perks.metamorphosis && typeof hitBrick !== "undefined") { if (gameState.bricks[hitBrick] && coin.color !== gameState.bricks[hitBrick] && gameState.bricks[hitBrick] !== "black" && !coin.coloredABrick) { gameState.bricks[hitBrick] = coin.color; @@ -2613,6 +2700,10 @@ function ballTick(gameState, ball, delta) { speedLimitDampener += 3; ball.vx += (gameState.puckPosition - ball.x) / 1000 * delta * gameState.perks.telekinesis; } + if ((0, _gameUtils.isYoyoActive)(gameState, ball)) { + speedLimitDampener += 3; + ball.vx += (gameState.puckPosition - ball.x) / 1000 * delta * gameState.perks.yoyo; + } if (ball.vx * ball.vx + ball.vy * ball.vy < gameState.baseSpeed * gameState.baseSpeed * 2) { ball.vx *= 1 + 0.02 / speedLimitDampener; ball.vy *= 1 + 0.02 / speedLimitDampener; @@ -2644,7 +2735,7 @@ function ballTick(gameState, ball, delta) { const dy = Math.random() > 0.5 ? 1 : -1; makeParticle(gameState, (0, _gameUtils.brickCenterX)(gameState, index) + dx * gameState.brickWidth / 2, (0, _gameUtils.brickCenterY)(gameState, index) + dy * gameState.brickWidth / 2, vertical ? 0 : -dx * gameState.baseSpeed, vertical ? -dy * gameState.baseSpeed : 0, color, true, gameState.coinSize / 2, 250); } - const borderHitCode = (0, _game.bordersHitCheck)(ball, gameState.ballSize / 2, delta); + const borderHitCode = bordersHitCheck(gameState, ball, gameState.ballSize / 2, delta); if (borderHitCode) { if (gameState.perks.left_is_lava && borderHitCode % 2 && ball.x < gameState.offsetX + gameState.gameZoneWidth / 2) resetCombo(gameState, ball.x, ball.y); if (gameState.perks.right_is_lava && borderHitCode % 2 && ball.x > gameState.offsetX + gameState.gameZoneWidth / 2) resetCombo(gameState, ball.x, ball.y); @@ -2670,6 +2761,12 @@ function ballTick(gameState, ball, delta) { if (!(0, _options.isOptionOn)("basic")) for(let i = 0; i < 10; i++)makeParticle(gameState, ball.x, ball.y, Math.random() * gameState.baseSpeed * 3, gameState.baseSpeed * 3, "red", false, gameState.coinSize / 2, 150); } if (gameState.perks.streak_shots) resetCombo(gameState, ball.x, ball.y); + if (gameState.perks.nbricks) { + if (ball.hitSinceBounce) { + if (gameState.perks.nbricks === ball.hitSinceBounce) gameState.combo += gameState.perks.nbricks; + else resetCombo(gameState, ball.x, ball.y); + } + } if (gameState.perks.respawn) ball.hitItem.slice(0, -1).slice(0, gameState.perks.respawn).forEach(({ index, color })=>{ if (!gameState.bricks[index] && color !== "black") gameState.bricks[index] = color; }); @@ -2685,7 +2782,8 @@ function ballTick(gameState, ball, delta) { ball.sapperUses = 0; ball.piercedSinceBounce = 0; } - if (ball.y > gameState.gameZoneHeight + gameState.ballSize / 2 && gameState.running) { + const lostOnSides = gameState.perks.unbounded && ball.x < 50 || ball.x > gameState.canvasWidth + 50; + if (gameState.running && (ball.y > gameState.gameZoneHeight + gameState.ballSize / 2 || lostOnSides)) { ball.destroyed = true; gameState.runStatistics.balls_lost++; if (!gameState.balls.find((b)=>!b.destroyed)) (0, _gameOver.gameOver)((0, _i18N.t)("gameOver.lost.title"), (0, _i18N.t)("gameOver.lost.summary", { @@ -2702,7 +2800,7 @@ function ballTick(gameState, ball, delta) { let sturdyBounce = hitBrick && gameState.bricks[hitBrick] !== "black" && gameState.perks.sturdy_bricks && gameState.perks.sturdy_bricks > Math.random() * 5; let pierce = false; if (sturdyBounce || typeof hitBrick === "undefined") ; - else if ((0, _game.shouldPierceByColor)(vhit, hhit, chit)) pierce = true; + else if ((0, _gameUtils.shouldPierceByColor)(gameState, vhit, hhit, chit)) pierce = true; else if (ball.piercedSinceBounce < gameState.perks.pierce * 3) { pierce = true; ball.piercedSinceBounce++; @@ -2725,6 +2823,7 @@ function ballTick(gameState, ball, delta) { } if (typeof hitBrick !== "undefined") { const initialBrickColor = gameState.bricks[hitBrick]; + ball.hitSinceBounce++; explodeBrick(gameState, hitBrick, ball, false); if (ball.sapperUses < gameState.perks.sapper && initialBrickColor !== "black" && // don't replace a brick that bounced with sturdy_bricks !gameState.bricks[hitBrick]) { @@ -2996,16 +3095,17 @@ function render(gameState) { ctx.globalAlpha = 1; ctx.globalCompositeOperation = "source-over"; ctx.fillStyle = gameState.puckColor; - for(let i = 0; i < gameState.perks.extra_life; i++)ctx.fillRect(gameState.offsetXRoundedDown, gameState.gameZoneHeight - gameState.puckHeight / 2 + 2 * i, gameState.gameZoneWidthRoundedUp, 1); + for(let i = 0; i < gameState.perks.extra_life; i++)ctx.fillRect(gameState.perks.unbounded ? 0 : gameState.offsetXRoundedDown, gameState.gameZoneHeight - gameState.puckHeight / 2 + 2 * i, gameState.perks.unbounded ? gameState.canvasWidth : gameState.gameZoneWidthRoundedUp, 1); } ctx.globalAlpha = 1; ctx.globalCompositeOperation = "source-over"; gameState.balls.forEach((ball)=>{ // The white border around is to distinguish colored balls from coins/bg drawBall(ctx, gameState.ballsColor, gameState.ballSize, ball.x, ball.y, gameState.puckColor); - if ((0, _gameUtils.isTelekinesisActive)(gameState, ball)) { + if ((0, _gameUtils.isTelekinesisActive)(gameState, ball) || (0, _gameUtils.isYoyoActive)(gameState, ball)) { ctx.strokeStyle = gameState.puckColor; ctx.beginPath(); + ctx.moveTo(gameState.puckPosition, gameState.gameZoneHeight); ctx.bezierCurveTo(gameState.puckPosition, gameState.gameZoneHeight, gameState.puckPosition, ball.y, ball.x, ball.y); ctx.stroke(); } @@ -3029,6 +3129,7 @@ function render(gameState) { // Borders const hasCombo = gameState.combo > (0, _gameStateMutators.baseCombo)(gameState); ctx.globalCompositeOperation = "source-over"; + ctx.globalAlpha = gameState.perks.unbounded ? 0.1 : 1; if (gameState.offsetXRoundedDown) { // draw outside of gaming area to avoid capturing borders in recordings ctx.fillStyle = hasCombo && gameState.perks.left_is_lava ? "red" : gameState.puckColor; @@ -3743,6 +3844,7 @@ function newGameState(params) { }, lastOffered: {}, levelTime: 0, + noBricksSince: 0, levelWallBounces: 0, needsRender: true, autoCleanUses: 0, @@ -3759,7 +3861,7 @@ function newGameState(params) { return gameState; } -},{"./settings":"5blfu","./loadGameData":"l1B4x","./game_utils":"cEeac","./gameStateMutators":"9ZeQl","./options":"d5NoS","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["bCo5X"], "bCo5X", "parcelRequire94c2") +},{"./settings":"5blfu","./loadGameData":"l1B4x","./game_utils":"cEeac","./gameStateMutators":"9ZeQl","./options":"d5NoS","@parcel/transformer-js/src/esmodule-helpers.js":"gkKU3"}]},["bhWPG","bCo5X"], "bCo5X", "parcelRequire94c2") diff --git a/src/data/levels.json b/src/data/levels.json index 7883b59..ee41b0a 100644 --- a/src/data/levels.json +++ b/src/data/levels.json @@ -838,8 +838,57 @@ { "name": "icon:concave_puck", "size": 8, - "bricks": "___________W_______________W_______________W_____________WWWWW__", + "bricks": "___________W_______________W____________W__W__W_WW___WW_WWWWWWW_", + "svg": null, + "color": "" + }, + { + "name": "icon:antigrav", + "size": 8, + "bricks": "v______vvv____vvv______vv______vv______vv______vv______v__WWWW__", + "svg": null, + "color": "" + }, + { + "name": "icon:asceticism", + "size": 8, + "bricks": "_________y____y____W____y______y_________y____y_________y_WWWW_y", + "svg": null, + "color": "" + }, + { + "name": "icon:unbounded", + "size": 9, + "bricks": "y_WWWWW_y__________yttttt____ttttt__y____W__y______________y_y____________WWW___y", + "svg": null, + "color": "" + }, + { + "name": "icon:shunt", + "size": 8, + "bricks": "_______y______yy______yy__yCCyyy__y__yyy_yy__yyy_yy__yyyyyy__yyy", + "svg": null, + "color": "" + }, + { + "name": "icon:yoyo", + "size": 8, + "bricks": "_rrrrrr_rrrrrrrrrrrrrrrr_WWWWWW_rWrrrrrrrrWrrrrr_rrWrrr_____W___", + "svg": null, + "color": "" + }, + { + "name": "icon:nbricks", + "size": 6, + "bricks": "yy__yyyyy_yyyyyyyyyyyyyyyy_yyyyy__yy", + "svg": null, + "color": "" + }, + { + "name": "icon:etherealcoins", + "size": 11, + "bricks": "___WWWWW_____W_y___W____W_ttt_W___W__ttt_yW__W_______W__W_______W_W_y_y_____WW_____W_y_WW_WWW_____WWWWWWWWWWWW___________", "svg": null, "color": "" } -] +] \ No newline at end of file diff --git a/src/game.ts b/src/game.ts index e332cc3..6444d32 100644 --- a/src/game.ts +++ b/src/game.ts @@ -1,4 +1,4 @@ -import { allLevels, appVersion, icons, upgrades } from "./loadGameData"; +import {allLevels, appVersion, icons, upgrades} from "./loadGameData"; import { Ball, Coin, @@ -11,52 +11,26 @@ import { TextFlash, Upgrade, } from "./types"; -import { getAudioContext, playPendingSounds } from "./sounds"; -import { - currentLevelInfo, - getRowColIndex, - max_levels, - pickedUpgradesHTMl, -} from "./game_utils"; +import {getAudioContext, playPendingSounds} from "./sounds"; +import {currentLevelInfo, getRowColIndex, max_levels, pickedUpgradesHTMl,} from "./game_utils"; import "./PWA/sw_loader"; -import { getCurrentLang, t } from "./i18n/i18n"; -import { getSettingValue, getTotalScore, setSettingValue } from "./settings"; +import {getCurrentLang, t} from "./i18n/i18n"; +import {getSettingValue, getTotalScore, setSettingValue} from "./settings"; import { - empty, forEachLiveOne, gameStateTick, normalizeGameState, pickRandomUpgrades, - putBallsAtPuck, - resetBalls, - resetCombo, setLevel, setMousePos, } from "./gameStateMutators"; -import { - backgroundCanvas, - bombSVG, - ctx, - gameCanvas, - render, - scoreDisplay, -} from "./render"; -import { - pauseRecording, - recordOneFrame, - resumeRecording, - startRecordingGame, -} from "./recording"; -import { newGameState } from "./newGameState"; -import { - alertsOpen, - asyncAlert, - AsyncAlertAction, - closeModal, -} from "./asyncAlert"; -import { isOptionOn, options, toggleOption } from "./options"; -import { hashCode } from "./getLevelBackground"; +import {backgroundCanvas, ctx, gameCanvas, render, scoreDisplay,} from "./render"; +import {pauseRecording, recordOneFrame, resumeRecording, startRecordingGame,} from "./recording"; +import {newGameState} from "./newGameState"; +import {alertsOpen, asyncAlert, AsyncAlertAction, closeModal,} from "./asyncAlert"; +import {isOptionOn, options, toggleOption} from "./options"; +import {hashCode} from "./getLevelBackground"; export function play() { if (gameState.running) return; @@ -337,125 +311,6 @@ export function hitsSomething(x: number, y: number, radius: number) { ); } -export function shouldPierceByColor( - vhit: number | undefined, - hhit: number | undefined, - chit: number | undefined, -) { - if (!gameState.perks.pierce_color) return false; - if ( - typeof vhit !== "undefined" && - gameState.bricks[vhit] !== gameState.ballsColor - ) { - return false; - } - if ( - typeof hhit !== "undefined" && - gameState.bricks[hhit] !== gameState.ballsColor - ) { - return false; - } - if ( - typeof chit !== "undefined" && - gameState.bricks[chit] !== gameState.ballsColor - ) { - return false; - } - return true; -} - -export function coinBrickHitCheck(coin: Coin) { - // Make ball/coin bonce, and return bricks that were hit - const radius = coin.size / 2; - const { x, y, previousX, previousY } = coin; - - const vhit = hitsSomething(previousX, y, radius); - const hhit = hitsSomething(x, previousY, radius); - const chit = - (typeof vhit == "undefined" && - typeof hhit == "undefined" && - hitsSomething(x, y, radius)) || - undefined; - - if (typeof vhit !== "undefined" || typeof chit !== "undefined") { - coin.y = coin.previousY; - coin.vy *= -1; - - // Roll on corners - const leftHit = gameState.bricks[brickIndex(x - radius, y + radius)]; - const rightHit = gameState.bricks[brickIndex(x + radius, y + radius)]; - - if (leftHit && !rightHit) { - coin.vx += 1; - coin.sa -= 1; - } - if (!leftHit && rightHit) { - coin.vx -= 1; - coin.sa += 1; - } - } - if (typeof hhit !== "undefined" || typeof chit !== "undefined") { - coin.x = coin.previousX; - coin.vx *= -1; - } - return vhit ?? hhit ?? chit; -} - -export function bordersHitCheck( - coin: Coin | Ball, - radius: number, - delta: number, -) { - if (coin.destroyed) return; - coin.previousX = coin.x; - coin.previousY = coin.y; - coin.x += coin.vx * delta; - coin.y += coin.vy * delta; - coin.sx ||= 0; - coin.sy ||= 0; - coin.sx += coin.previousX - coin.x; - coin.sy += coin.previousY - coin.y; - coin.sx *= 0.9; - coin.sy *= 0.9; - - if (gameState.perks.wind) { - coin.vx += - ((gameState.puckPosition - - (gameState.offsetX + gameState.gameZoneWidth / 2)) / - gameState.gameZoneWidth) * - gameState.perks.wind * - 0.5; - } - - let vhit = 0, - hhit = 0; - - if (coin.x < gameState.offsetXRoundedDown + radius) { - coin.x = - gameState.offsetXRoundedDown + - radius + - (gameState.offsetXRoundedDown + radius - coin.x); - coin.vx *= -1; - hhit = 1; - } - if (coin.y < radius) { - coin.y = radius + (radius - coin.y); - coin.vy *= -1; - vhit = 1; - } - if (coin.x > gameState.canvasWidth - gameState.offsetXRoundedDown - radius) { - coin.x = - gameState.canvasWidth - - gameState.offsetXRoundedDown - - radius - - (coin.x - - (gameState.canvasWidth - gameState.offsetXRoundedDown - radius)); - coin.vx *= -1; - hhit = 1; - } - - return hhit + vhit * 2; -} export function tick() { const currentTick = performance.now(); const timeDeltaMs = currentTick - gameState.lastTick; @@ -552,18 +407,6 @@ async function openSettingsPanel() { pause(true); const actions: AsyncAlertAction<() => void>[] = [ - { - text: t("main_menu.resume"), - help: t("main_menu.resume_help"), - value() {}, - }, - { - text: t("main_menu.unlocks"), - help: t("main_menu.unlocks_help"), - value() { - openUnlocksList(); - }, - }, ]; for (const key of Object.keys(options) as OptionId[]) { @@ -606,6 +449,21 @@ async function openSettingsPanel() { }); } } + actions.push( + { + text: t("main_menu.resume"), + help: t("main_menu.resume_help"), + value() {}, + }) + actions.push({ + text: t("main_menu.unlocks"), + help: t("main_menu.unlocks_help"), + value() { + openUnlocksList(); + }, + }) + + actions.push({ text: t("sandbox.title"), diff --git a/src/gameStateMutators.ts b/src/gameStateMutators.ts index 3040100..703bea8 100644 --- a/src/gameStateMutators.ts +++ b/src/gameStateMutators.ts @@ -19,29 +19,27 @@ import { getMajorityValue, getPossibleUpgrades, getRowColIndex, - isTelekinesisActive, - max_levels, + isTelekinesisActive, isYoyoActive, + max_levels, shouldPierceByColor, } from "./game_utils"; -import { t } from "./i18n/i18n"; -import { icons } from "./loadGameData"; +import {t} from "./i18n/i18n"; +import {icons} from "./loadGameData"; -import { addToTotalScore } from "./settings"; -import { background } from "./render"; -import { gameOver } from "./gameOver"; +import {addToTotalScore} from "./settings"; +import {background} from "./render"; +import {gameOver} from "./gameOver"; import { - bordersHitCheck, brickIndex, - coinBrickHitCheck, fitSize, gameState, hasBrick, hitsSomething, openUpgradesPicker, pause, - shouldPierceByColor, + } from "./game"; -import { stopRecording } from "./recording"; -import { isOptionOn } from "./options"; +import {stopRecording} from "./recording"; +import {isOptionOn} from "./options"; export function setMousePos(gameState: GameState, x: number) { // Sets the puck position, and updates the ball position if they are supposed to follow it @@ -284,11 +282,9 @@ export function explodeBrick( y, "white", ); - ball.hitSinceBounce++; gameState.runStatistics.bricks_broken++; } else if (color) { // Even if it bounces we don't want to count that as a miss - ball.hitSinceBounce++; // Flashing is take care of by the tick loop const x = brickCenterX(gameState, index), @@ -341,15 +337,16 @@ export function explodeBrick( ); } - gameState.combo += Math.max( - 0, - gameState.perks.streak_shots + + gameState.combo += gameState.perks.streak_shots + gameState.perks.compound_interest + gameState.perks.left_is_lava + gameState.perks.right_is_lava + gameState.perks.top_is_lava + - gameState.perks.picky_eater, - ); + gameState.perks.picky_eater+ + gameState.perks.asceticism + + gameState.perks.unbounded + + ; if (!isExplosion) { // color change @@ -462,6 +459,9 @@ export function addToScore(gameState: GameState, coin: Coin) { schedulGameSound(gameState, "coinCatch", coin.x, 1); } gameState.runStatistics.score += coin.points; + if(gameState.perks.asceticism){ + resetCombo(gameState, coin.x, coin.y) + } } export async function setLevel(gameState: GameState, l: number) { @@ -472,6 +472,7 @@ export async function setLevel(gameState: GameState, l: number) { } gameState.currentLevel = l; gameState.levelTime = 0; + gameState.noBricksSince = 0; gameState.levelWallBounces = 0; gameState.autoCleanUses = 0; gameState.lastTickDown = gameState.levelTime; @@ -481,7 +482,10 @@ export async function setLevel(gameState: GameState, l: number) { gameState.runStatistics.levelsPlayed++; // Reset combo silently - gameState.combo = baseCombo(gameState) + gameState.perks.hot_start * 15; + if(!gameState.perks.shunt) { + gameState.combo = baseCombo(gameState) + } + gameState.combo += gameState.perks.hot_start * 15; resetBalls(gameState); @@ -610,6 +614,100 @@ export function attract(gameState: GameState, a: Ball, b: Ball, power: number) { ); } +export function coinBrickHitCheck(gameState: GameState, coin: Coin) { + // Make ball/coin bonce, and return bricks that were hit + const radius = coin.size / 2; + const {x, y, previousX, previousY} = coin; + + const vhit = hitsSomething(previousX, y, radius); + const hhit = hitsSomething(x, previousY, radius); + const chit = + (typeof vhit == "undefined" && + typeof hhit == "undefined" && + hitsSomething(x, y, radius)) || + undefined; + + if (typeof vhit !== "undefined" || typeof chit !== "undefined") { + coin.y = coin.previousY; + coin.vy *= -1; + + // Roll on corners + const leftHit = gameState.bricks[brickIndex(x - radius, y + radius)]; + const rightHit = gameState.bricks[brickIndex(x + radius, y + radius)]; + + if (leftHit && !rightHit) { + coin.vx += 1; + coin.sa -= 1; + } + if (!leftHit && rightHit) { + coin.vx -= 1; + coin.sa += 1; + } + } + if (typeof hhit !== "undefined" || typeof chit !== "undefined") { + coin.x = coin.previousX; + coin.vx *= -1; + } + return vhit ?? hhit ?? chit; +} + +export function bordersHitCheck( + gameState: GameState, + coin: Coin | Ball, + radius: number, + delta: number, +) { + if (coin.destroyed) return; + coin.previousX = coin.x; + coin.previousY = coin.y; + coin.x += coin.vx * delta; + coin.y += coin.vy * delta; + coin.sx ||= 0; + coin.sy ||= 0; + coin.sx += coin.previousX - coin.x; + coin.sy += coin.previousY - coin.y; + coin.sx *= 0.9; + coin.sy *= 0.9; + + if (gameState.perks.wind) { + coin.vx += + ((gameState.puckPosition - + (gameState.offsetX + gameState.gameZoneWidth / 2)) / + gameState.gameZoneWidth) * + gameState.perks.wind * + 0.5; + } + + let vhit = 0, + hhit = 0; + + if (coin.x < gameState.offsetXRoundedDown + radius && !gameState.perks.unbounded) { + coin.x = + gameState.offsetXRoundedDown + + radius + + (gameState.offsetXRoundedDown + radius - coin.x); + coin.vx *= -1; + hhit = 1; + } + if (coin.y < radius) { + coin.y = radius + (radius - coin.y); + coin.vy *= -1; + vhit = 1; + } + if (coin.x > gameState.canvasWidth - gameState.offsetXRoundedDown - radius && !gameState.perks.unbounded) { + coin.x = + gameState.canvasWidth - + gameState.offsetXRoundedDown - + radius - + (coin.x - + (gameState.canvasWidth - gameState.offsetXRoundedDown - radius)); + coin.vx *= -1; + hhit = 1; + } + + return hhit + vhit * 2; +} + export function gameStateTick( gameState: GameState, // How many frames to compute at once, can go above 1 to compensate lag @@ -650,7 +748,10 @@ export function gameStateTick( }); gameState.autoCleanUses++; } - if (!remainingBricks && !liveCount(gameState.coins)) { + if(!remainingBricks &&gameState.noBricksSince==0 ){ + gameState.noBricksSince ||= gameState.levelTime + } + if (!remainingBricks && ( !liveCount(gameState.coins) || (gameState.levelTime > gameState.noBricksSince+5000))) { if (gameState.currentLevel + 1 < max_levels(gameState)) { setLevel(gameState, gameState.currentLevel + 1); } else { @@ -664,17 +765,20 @@ export function gameStateTick( forEachLiveOne(gameState.coins, (coin, coinIndex) => { if (gameState.perks.coin_magnet) { - const attractionX = - ((frames * (gameState.puckPosition - coin.x)) / - (100 + + const strength = 100/ (100 + Math.pow(coin.y - gameState.gameZoneHeight, 2) + - Math.pow(coin.x - gameState.puckPosition, 2))) * - gameState.perks.coin_magnet * - 100; + Math.pow(coin.x - gameState.puckPosition, 2)) * + gameState.perks.coin_magnet ; + + const attractionX = frames * (gameState.puckPosition - coin.x) *strength + coin.vx += attractionX; + coin.vy += frames * (gameState.gameZoneHeight - coin.y) * strength / 2 coin.sa -= attractionX / 10; + } + const ratio = 1 - (gameState.perks.viscosity * 0.03 + 0.005) * frames; coin.vy *= ratio; @@ -688,10 +792,26 @@ export function gameStateTick( coin.a += coin.sa; // Gravity - coin.vy += frames * coin.weight * 0.8; + if(!gameState.perks.etherealcoins){ + const flip = gameState.perks.antigrav >0 && Math.abs(coin.x - gameState.puckPosition)*2>gameState.puckWidth+coin.size + coin.vy += frames * coin.weight * 0.8 * (flip?-1:1); + if(flip && !isOptionOn('basic') && Math.random()<0.1){ + makeParticle(gameState, + coin.x, + coin.y, + 0, + gameState.baseSpeed, + rainbowColor(), + true, + 5, + 250 + ) + } + + } const speed = Math.abs(coin.sx) + Math.abs(coin.sx); - const hitBorder = bordersHitCheck(coin, coin.size / 2, frames); + const hitBorder = bordersHitCheck(gameState, coin, coin.size / 2, frames); if ( coin.y > gameState.gameZoneHeight - coinRadius - gameState.puckHeight && @@ -708,9 +828,12 @@ export function gameStateTick( if (gameState.perks.compound_interest) { resetCombo(gameState, coin.x, coin.y); } + }else if( gameState.perks.unbounded && (coin.x<-50 || coin.x>gameState.canvasWidth+50)){ + // Out of bound on sides + destroy(gameState.coins, coinIndex); } - const hitBrick = coinBrickHitCheck(coin); + const hitBrick = coinBrickHitCheck(gameState, coin); if (gameState.perks.metamorphosis && typeof hitBrick !== "undefined") { if ( @@ -895,6 +1018,7 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) { gameState.perks.ball_repulse_ball + gameState.perks.puck_repulse_ball + gameState.perks.ball_attract_ball; + if (isTelekinesisActive(gameState, ball)) { speedLimitDampener += 3; ball.vx += @@ -902,6 +1026,13 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) { delta * gameState.perks.telekinesis; } + if (isYoyoActive(gameState, ball)) { + speedLimitDampener += 3; + ball.vx += + ((gameState.puckPosition - ball.x) / 1000) * + delta * + gameState.perks.yoyo; + } if ( ball.vx * ball.vx + ball.vy * ball.vy < @@ -980,7 +1111,7 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) { } } - const borderHitCode = bordersHitCheck(ball, gameState.ballSize / 2, delta); + const borderHitCode = bordersHitCheck(gameState, ball, gameState.ballSize / 2, delta); if (borderHitCode) { if ( gameState.perks.left_is_lava && @@ -1053,6 +1184,16 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) { if (gameState.perks.streak_shots) { resetCombo(gameState, ball.x, ball.y); } + if(gameState.perks.nbricks ){ + if(ball.hitSinceBounce){ + if(gameState.perks.nbricks===ball.hitSinceBounce){ + gameState.combo+=gameState.perks.nbricks + }else{ + resetCombo(gameState, ball.x,ball.y) + } + + } + } if (gameState.perks.respawn) { ball.hitItem @@ -1084,9 +1225,10 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) { ball.piercedSinceBounce = 0; } - if ( - ball.y > gameState.gameZoneHeight + gameState.ballSize / 2 && - gameState.running + const lostOnSides = gameState.perks.unbounded && ball.x < 50 || ball.x>gameState.canvasWidth+50 + if (gameState.running && + (ball.y > gameState.gameZoneHeight + gameState.ballSize / 2 || lostOnSides) + ) { ball.destroyed = true; gameState.runStatistics.balls_lost++; @@ -1119,7 +1261,7 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) { let pierce = false; if (sturdyBounce || typeof hitBrick === "undefined") { // cannot pierce - } else if (shouldPierceByColor(vhit, hhit, chit)) { + } else if (shouldPierceByColor(gameState, vhit, hhit, chit)) { pierce = true; } else if (ball.piercedSinceBounce < gameState.perks.pierce * 3) { pierce = true; @@ -1146,6 +1288,7 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) { if (typeof hitBrick !== "undefined") { const initialBrickColor = gameState.bricks[hitBrick]; + ball.hitSinceBounce++; explodeBrick(gameState, hitBrick, ball, false); if ( diff --git a/src/game_utils.ts b/src/game_utils.ts index bde47c4..79d8f5f 100644 --- a/src/game_utils.ts +++ b/src/game_utils.ts @@ -1,5 +1,5 @@ -import { Ball, GameState, PerkId, PerksMap } from "./types"; -import { icons, upgrades } from "./loadGameData"; +import {Ball, GameState, PerkId, PerksMap} from "./types"; +import {icons, upgrades} from "./loadGameData"; export function getMajorityValue(arr: string[]): string { const count: { [k: string]: number } = {}; @@ -72,7 +72,10 @@ export function currentLevelInfo(gameState: GameState) { } export function isTelekinesisActive(gameState: GameState, ball: Ball) { - return gameState.perks.telekinesis && !ball.hitSinceBounce && ball.vy < 0; + return gameState.perks.telekinesis && ball.vy < 0; +} +export function isYoyoActive(gameState: GameState, ball: Ball) { + return gameState.perks.yoyo && ball.vy > 0; } export function findLast( @@ -114,3 +117,31 @@ export function defaultSounds() { }, }; } + +export function shouldPierceByColor( + gameState: GameState, + vhit: number | undefined, + hhit: number | undefined, + chit: number | undefined, +) { + if (!gameState.perks.pierce_color) return false; + if ( + typeof vhit !== "undefined" && + gameState.bricks[vhit] !== gameState.ballsColor + ) { + return false; + } + if ( + typeof hhit !== "undefined" && + gameState.bricks[hhit] !== gameState.ballsColor + ) { + return false; + } + if ( + typeof chit !== "undefined" && + gameState.bricks[chit] !== gameState.ballsColor + ) { + return false; + } + return true; +} \ No newline at end of file diff --git a/src/i18n/b71.babel b/src/i18n/b71.babel index a536406..41ad0b5 100644 --- a/src/i18n/b71.babel +++ b/src/i18n/b71.babel @@ -1517,6 +1517,106 @@ upgrades + + antigrav + + + fullHelp + + + + + en-US + true + + + fr-FR + true + + + + + help + + + + + en-US + true + + + fr-FR + true + + + + + name + + + + + en-US + true + + + fr-FR + true + + + + + + + asceticism + + + fullHelp + + + + + en-US + true + + + fr-FR + true + + + + + help + + + + + en-US + true + + + fr-FR + true + + + + + name + + + + + en-US + true + + + fr-FR + true + + + + + ball_attract_ball @@ -1962,6 +2062,56 @@ + + etherealcoins + + + fullHelp + + + + + en-US + false + + + fr-FR + false + + + + + help + + + + + en-US + true + + + fr-FR + true + + + + + name + + + + + en-US + true + + + fr-FR + true + + + + + extra_levels @@ -2327,6 +2477,56 @@ + + nbricks + + + fullHelp + + + + + en-US + false + + + fr-FR + false + + + + + help + + + + + en-US + true + + + fr-FR + true + + + + + name + + + + + en-US + true + + + fr-FR + true + + + + + one_more_choice @@ -2772,6 +2972,56 @@ + + shunt + + + fullHelp + + + + + en-US + true + + + fr-FR + true + + + + + help + + + + + en-US + true + + + fr-FR + true + + + + + name + + + + + en-US + true + + + fr-FR + true + + + + + skip_last @@ -3232,6 +3482,56 @@ + + unbounded + + + fullHelp + + + + + en-US + true + + + fr-FR + true + + + + + help + + + + + en-US + true + + + fr-FR + true + + + + + name + + + + + en-US + true + + + fr-FR + true + + + + + viscosity @@ -3347,6 +3647,56 @@ + + yoyo + + + fullHelp + + + + + en-US + false + + + fr-FR + false + + + + + help + + + + + en-US + true + + + fr-FR + true + + + + + name + + + + + en-US + true + + + fr-FR + true + + + + + diff --git a/src/i18n/en.json b/src/i18n/en.json index eb00d0d..c0ec5c0 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -38,7 +38,7 @@ "main_menu.basic": "Basic graphics", "main_menu.basic_help": "Fewer particles and flashes, better performance.", "main_menu.download_save_file": "Download save file", - "main_menu.download_save_file_help": "Get a transferable .b71 file with your score and stats", + "main_menu.download_save_file_help": "Get a transferable file with your score and stats", "main_menu.footer_html": "

\nMade in France by Renan LE CARO. \nDonate\nDiscord\nF-Droid\nGoogle Play\nitch.io \nGitlab\nWeb version\nHackerNews\nPrivacy Policy\nv.{{appVersion}}\n

\n", "main_menu.fullscreen": "Fullscreen", "main_menu.fullscreen_exit": "Exit Fullscreen", @@ -49,7 +49,7 @@ "main_menu.language": "Language", "main_menu.language_help": "Choose the game's language", "main_menu.load_save_file": "Load save file", - "main_menu.load_save_file_help": "Select a .b71 file on your device", + "main_menu.load_save_file_help": "Select a save file on your device", "main_menu.mobile": "Mobile mode", "main_menu.mobile_help": "Leaves space for your thumb under the puck.", "main_menu.pointer_lock": "Mouse pointer lock", @@ -95,6 +95,12 @@ "unlocks.level_description": "A {{size}}x{{size}} level with {{bricks}} bricks", "unlocks.title": "You unlocked {{percentUnlock}}% of the game.", "unlocks.unlocks_at": "Unlocks at total score {{threshold}}.", + "upgrades.antigrav.fullHelp": "This affects the coins and will let the float up until you are ready to pick them up.", + "upgrades.antigrav.help": "Gravity reversed left and right of puck", + "upgrades.antigrav.name": "Antigrav", + "upgrades.asceticism.fullHelp": "This affects the coins and will let the float up until you are ready to pick them up.", + "upgrades.asceticism.help": "+1 combo / brick, com resets on coin catch", + "upgrades.asceticism.name": "Asceticism", "upgrades.ball_attract_ball.fullHelp": "Balls that are more than half a screen width away will start attracting each other. \n\nThe attraction force is stronger when they are furthest away from each other.\n\nRainbow particles will fly to symbolize the attraction force. This perk is only offered if you have more than one ball already.", "upgrades.ball_attract_ball.help": "Balls attract balls", "upgrades.ball_attract_ball.help_plural": "Stronger attraction force", @@ -122,6 +128,9 @@ "upgrades.concave_puck.fullHelp": "Balls starts the level going straight up, and bounces with less angle.", "upgrades.concave_puck.help": " Helps with aiming straight up", "upgrades.concave_puck.name": "Concave puck", + "upgrades.etherealcoins.fullHelp": "You'll have to make sure that the coins fall down somehow", + "upgrades.etherealcoins.help": "Coins are no longer affected by gravity", + "upgrades.etherealcoins.name": "Ethereal coins", "upgrades.extra_levels.fullHelp": "The default run can last a max of 7 levels, after which the game is over and whatever score you reached is your run score. \n\nEach level of this perk lets you go one level higher. The last levels are often the ones where you make the most score, so the difference can be dramatic.", "upgrades.extra_levels.help": "Play {{count}} levels instead of 7", "upgrades.extra_levels.name": "+1 level", @@ -144,6 +153,9 @@ "upgrades.multiball.fullHelp": "As soon as you drop the ball in Breakout 71, you loose. \n\nWith this perk, you get two balls, and so you can afford to lose one. \n\nThe lost balls come back on the next level. \n\nHaving more than one balls makes some further perks available, and of course clears the level faster.", "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": "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 one more option in the list", "upgrades.one_more_choice.name": "+1 choice until run end", @@ -171,6 +183,9 @@ "upgrades.sapper.help": "The first brick broken becomes a bomb.", "upgrades.sapper.help_plural": "The first {{lvl}} bricks broken become bombs.", "upgrades.sapper.name": "Sapper", + "upgrades.shunt.fullHelp": "If you also have hot start, the hot start is just added to the current combo", + "upgrades.shunt.help": "Combo no longer resets between levels", + "upgrades.shunt.name": "Shunt", "upgrades.skip_last.fullHelp": "You need to break all bricks to go to the next level. However, it can be hard to get the last ones. \n\nClearing a level early brings extra choices when upgrading. Never missing the bricks is also very beneficial. \n\nSo if you find it difficult to break the last bricks, getting this perk a few time can help.", "upgrades.skip_last.help": "The last brick will explode.", "upgrades.skip_last.help_plural": "The last {{lvl}} bricks will explode.", @@ -199,11 +214,17 @@ "upgrades.top_is_lava.fullHelp": "Whenever you break a brick, your combo will increase by one. However, your combo will reset as soon as your ball hit the top of the screen. \n\nWhen your combo is above the minimum, a red bar will appear at the top to remind you that you should avoid hitting it. \n\nThe effect stacks with other combo perks.", "upgrades.top_is_lava.help": "More coins if you don't touch the top.", "upgrades.top_is_lava.name": "Sky is the limit", + "upgrades.unbounded.fullHelp": "I hope you've found a way to keep your ball on screen", + "upgrades.unbounded.help": "+1 combo per brick, no more sides", + "upgrades.unbounded.name": "Unbounded", "upgrades.viscosity.fullHelp": "Coins normally accelerate with gravity and explosions to pretty high speeds. \n\nThis perk constantly makes them slow down, as if they were in some sort of viscous liquid. \n\nThis makes catching them easier, and combines nicely with perks that influence the coin's movement.", "upgrades.viscosity.help": "Slower coin fall", "upgrades.viscosity.name": "Viscosity", "upgrades.wind.fullHelp": "The wind depends on where your puck is, if it's in the center of the screen nothing happens, if it's on the left it will blow left-wise, if it's on the right of the screen then it will blow right-wise. \n\nThe wind affects both the balls and coins.", "upgrades.wind.help": "Puck position creates wind", "upgrades.wind.help_plural": "Stronger wind force", - "upgrades.wind.name": "Wind" + "upgrades.wind.name": "Wind", + "upgrades.yoyo.fullHelp": "It's the opposite of telekinesis", + "upgrades.yoyo.help": "Ball falls toward puck", + "upgrades.yoyo.name": "Yo-yo" } diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 3098472..28c392c 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -38,7 +38,7 @@ "main_menu.basic": "Graphismes simplifiés", "main_menu.basic_help": "Moins de particules et effets, meilleures performances.", "main_menu.download_save_file": "Sauvegarder mes progrès", - "main_menu.download_save_file_help": "Obtenir un fichier de sauvegarde .b71 transférable", + "main_menu.download_save_file_help": "Obtenir un fichier de sauvegarde transférable", "main_menu.footer_html": "

\nProgrammé en France par Renan LE CARO.\nDonner\nDiscord\nF-Droid\nGoogle Play\nitch.io\nGitlab\nVersion web\nHackerNews\nPolitique de confidentialité \nv.{{appVersion}}\n

", "main_menu.fullscreen": "Plein écran", "main_menu.fullscreen_exit": "Quitter le plein écran", @@ -49,7 +49,7 @@ "main_menu.language": "Langue", "main_menu.language_help": "Changer la langue d'affichage", "main_menu.load_save_file": "Charger une sauvegarde", - "main_menu.load_save_file_help": "Sélectionnez un fichier .b71 sur votre appareil ", + "main_menu.load_save_file_help": "Sélectionnez une sauvegarde sur votre appareil ", "main_menu.mobile": "Mode mobile", "main_menu.mobile_help": "Laisse un espace pour le pouce sous le palet.", "main_menu.pointer_lock": "Verrouillage du pointeur de la souris", @@ -95,6 +95,12 @@ "unlocks.level_description": "Un niveau {{size}}x{{size}} avec {{bricks}} briques", "unlocks.title": "Vous avez débloqué {{percentUnlock}}% du jeu.", "unlocks.unlocks_at": "Déverrouillé au score total {{threshold}}.", + "upgrades.antigrav.fullHelp": "Les pièces attendront d'être sous le palet pour tomber. ", + "upgrades.antigrav.help": "La gravité est inversée à droite et à gauche du palet", + "upgrades.antigrav.name": "Antigrav", + "upgrades.asceticism.fullHelp": "Les pièces attendront d'être sous le palet pour tomber. ", + "upgrades.asceticism.help": "+1 combo par brique cassée, RAZ quand une pièce est attrapée", + "upgrades.asceticism.name": "Ascétisme", "upgrades.ball_attract_ball.fullHelp": "Les balles qui sont éloignées de plus d'une demi-largeur d'écran commencent à s'attirer. La force d'attraction est plus forte lorsque les balles sont plus éloignées l'une de l'autre. Des particules arc-en-ciel voleront pour symboliser la force d'attraction. Cet avantage n'est offert que si vous avez déjà plus d'une balle en jeu.", "upgrades.ball_attract_ball.help": "Les balles attirent les balles", "upgrades.ball_attract_ball.help_plural": "Force d'attraction plus forte", @@ -122,6 +128,9 @@ "upgrades.concave_puck.fullHelp": " Les balles démarrent verticalement en début de niveau, et rebondi sur le palet de manière plus verticale et inversée.", "upgrades.concave_puck.help": "Aide à éviter les bords.", "upgrades.concave_puck.name": "Palet concave", + "upgrades.etherealcoins.fullHelp": "Il faudrait vous assurer que les pièces tomberont bien quand même à un moment", + "upgrades.etherealcoins.help": "Les pièces ne subissent plus la gravité", + "upgrades.etherealcoins.name": "Pièces sans poids", "upgrades.extra_levels.fullHelp": "La partie dure normalement 7 niveaux, après quoi le jeu est terminé et le score que vous avez atteint est votre score de partie.\n\nChoisir cette amélioration vous permet de prolonger la partie d'un niveau. Les derniers niveaux sont souvent ceux où vous faites le plus de points, la différence peut donc être spectaculaire.", "upgrades.extra_levels.help": "Jouer {{count}} niveaux au lieu de 7", "upgrades.extra_levels.name": "+1 niveau", @@ -144,6 +153,9 @@ "upgrades.multiball.fullHelp": "Dès que vous laissez tomber la balle dans Breakout 71, vous perdez. \n\nAvec cet avantage, vous obtenez deux balles, et vous pouvez donc vous permettre d'en perdre une.\n\nLes balles perdues reviennent au niveau suivant. \n\nLe fait d'avoir plus d'une balle permet d'obtenir d'autres avantages et, bien sûr, de franchir le niveau plus rapidement.", "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": "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 une option supplémentaire dans la liste d'améliorations.", "upgrades.one_more_choice.name": "+1 choix jusqu'à la fin de la course", @@ -171,6 +183,9 @@ "upgrades.sapper.help": "La première brique cassée devient une bombe.", "upgrades.sapper.help_plural": "Les premières briques {{lvl}} cassées deviennent des bombes.", "upgrades.sapper.name": "Sapeur", + "upgrades.shunt.fullHelp": "Démarrage à chaud sera simplement ajouté au combo actuel", + "upgrades.shunt.help": "Le combo ne se remet plus à zéro en début de niveau", + "upgrades.shunt.name": "Shunt", "upgrades.skip_last.fullHelp": "Vous devez casser toutes les briques pour passer au niveau suivant. \n\nCependant, il peut être difficile d'obtenir les dernières briques.\n\nTerminer un niveau plus tôt permet d'obtenir des choix supplémentaires lors de la mise à niveau. \n\nNe jamais manquer de briques est également très avantageux.\n\nDonc, si vous avez du mal à casser les dernières briques, obtenir cet avantage plusieurs fois peut vous aider.", "upgrades.skip_last.help": "La dernière brique s'autodétruit.", "upgrades.skip_last.help_plural": "Les {{lvl}} dernières briques restantes s'autodétruiront", @@ -199,11 +214,17 @@ "upgrades.top_is_lava.fullHelp": "Chaque fois que vous cassez une brique, votre combo augmente d'une unité. Cependant, votre combo sera réinitialisé dès que votre balle atteindra le haut de l'écran.\n\nLorsque votre combo est supérieur au minimum, une barre rouge apparaît en haut de l'écran pour vous rappeler que vous devez éviter de la frapper.\n\nCet effet s'ajoute aux autres avantages du combo.", "upgrades.top_is_lava.help": "Plus de pièces si vous ne touchez pas le haut de la zone de jeu", "upgrades.top_is_lava.name": "Icare ", + "upgrades.unbounded.fullHelp": "J'espère que vous avez prévu un moyen de récupérer vos balles", + "upgrades.unbounded.help": "+1 combo par brique, plus de cotés", + "upgrades.unbounded.name": "Libérée, délivrée", "upgrades.viscosity.fullHelp": "Les pièces accélèrent normalement avec la gravité et les explosions pour atteindre des vitesses assez élevées. \n\nCette compétence les ralentit constamment, comme si elles se trouvaient dans une sorte de liquide visqueux.\n\nCela permet de les attraper plus facilement et se combine bien avec les améliorations qui influencent le mouvement de la pièce.", "upgrades.viscosity.help": "Chute plus lente des pièces", "upgrades.viscosity.name": "Fluide visqueux ", "upgrades.wind.fullHelp": "Le vent dépend de l'endroit où se trouve le palet, s'il est au centre de l'écran, il ne se passe rien, s'il est à gauche, il soufflera vers la gauche, s'il est à droite de l'écran, il soufflera vers la droite.\n\nLe vent affecte à la fois les balles et les pièces.", "upgrades.wind.help": "La position du palet crée du vent", "upgrades.wind.help_plural": "Force du vent plus importante", - "upgrades.wind.name": "Vive le vent" + "upgrades.wind.name": "Vive le vent", + "upgrades.yoyo.fullHelp": "C'est l'inverse de Télékinésie", + "upgrades.yoyo.help": "La balle descend vers le palet", + "upgrades.yoyo.name": "Yo-yo" } diff --git a/src/loadGameData.ts b/src/loadGameData.ts index 3f84d67..0242545 100644 --- a/src/loadGameData.ts +++ b/src/loadGameData.ts @@ -2,7 +2,7 @@ import { Level, Palette, RawLevel, Upgrade } from "./types"; import _palette from "./data/palette.json"; import _rawLevelsList from "./data/levels.json"; import _appVersion from "./data/version.json"; -import { rawUpgrades } from "./rawUpgrades"; +import { rawUpgrades } from "./upgrades"; import { getLevelBackground } from "./getLevelBackground"; import { levelIconHTML } from "./levelIcon"; diff --git a/src/newGameState.ts b/src/newGameState.ts index a23cc0e..ec4326e 100644 --- a/src/newGameState.ts +++ b/src/newGameState.ts @@ -92,6 +92,7 @@ export function newGameState(params: RunParams): GameState { }, lastOffered: {}, levelTime: 0, + noBricksSince: 0, levelWallBounces: 0, needsRender: true, autoCleanUses: 0, diff --git a/src/render.ts b/src/render.ts index 3333696..3113cea 100644 --- a/src/render.ts +++ b/src/render.ts @@ -1,25 +1,26 @@ -import { baseCombo, forEachLiveOne, liveCount } from "./gameStateMutators"; +import {baseCombo, forEachLiveOne, liveCount} from "./gameStateMutators"; import { - brickCenterX, - brickCenterY, - currentLevelInfo, - isTelekinesisActive, - max_levels, + brickCenterX, + brickCenterY, + currentLevelInfo, + isTelekinesisActive, + isYoyoActive, + max_levels, } from "./game_utils"; -import { colorString, GameState } from "./types"; -import { t } from "./i18n/i18n"; -import { gameState } from "./game"; -import { isOptionOn } from "./options"; +import {colorString, GameState} from "./types"; +import {t} from "./i18n/i18n"; +import {gameState} from "./game"; +import {isOptionOn} from "./options"; export const gameCanvas = document.getElementById("game") as HTMLCanvasElement; export const ctx = gameCanvas.getContext("2d", { - alpha: false, + alpha: false, }) as CanvasRenderingContext2D; export const bombSVG = document.createElement("img"); bombSVG.src = - "data:image/svg+xml;base64," + - btoa(` + "data:image/svg+xml;base64," + + btoa(` `); @@ -27,732 +28,738 @@ export const background = document.createElement("img"); export const backgroundCanvas = document.createElement("canvas"); export function render(gameState: GameState) { - const level = currentLevelInfo(gameState); - const { width, height } = gameCanvas; - if (!width || !height) return; + const level = currentLevelInfo(gameState); + const {width, height} = gameCanvas; + if (!width || !height) return; - if (gameState.currentLevel || gameState.levelTime) { - menuLabel.innerText = t("play.current_lvl", { - level: gameState.currentLevel + 1, - max: max_levels(gameState), - }); - } else { - menuLabel.innerText = t("play.menu_label"); - } - scoreDisplay.innerText = `$${gameState.score}`; + if (gameState.currentLevel || gameState.levelTime) { + menuLabel.innerText = t("play.current_lvl", { + level: gameState.currentLevel + 1, + max: max_levels(gameState), + }); + } else { + menuLabel.innerText = t("play.menu_label"); + } + scoreDisplay.innerText = `$${gameState.score}`; - scoreDisplay.className = - gameState.lastScoreIncrease > gameState.levelTime - 500 ? "active" : ""; + scoreDisplay.className = + gameState.lastScoreIncrease > gameState.levelTime - 500 ? "active" : ""; - // Clear - if (!isOptionOn("basic") && !level.color && level.svg) { - // Without this the light trails everything - ctx.globalCompositeOperation = "source-over"; - ctx.globalAlpha = 1; - ctx.fillStyle = "#000"; - ctx.fillRect(0, 0, width, height); + // Clear + if (!isOptionOn("basic") && !level.color && level.svg) { + // Without this the light trails everything + ctx.globalCompositeOperation = "source-over"; + ctx.globalAlpha = 1; + ctx.fillStyle = "#000"; + ctx.fillRect(0, 0, width, height); - ctx.globalCompositeOperation = "screen"; - ctx.globalAlpha = 0.6; - forEachLiveOne(gameState.coins, (coin) => { - drawFuzzyBall(ctx, coin.color, gameState.coinSize * 2, coin.x, coin.y); - }); - gameState.balls.forEach((ball) => { - drawFuzzyBall( - ctx, - gameState.ballsColor, - gameState.ballSize * 2, - ball.x, - ball.y, - ); - }); - ctx.globalAlpha = 0.5; - gameState.bricks.forEach((color, index) => { - if (!color) return; - const x = brickCenterX(gameState, index), - y = brickCenterY(gameState, index); - drawFuzzyBall( - ctx, - color == "black" ? "#666" : color, - gameState.brickWidth, - x, - y, - ); - }); - ctx.globalAlpha = 1; - forEachLiveOne(gameState.lights, (flash) => { - const { x, y, time, color, size, duration } = flash; - const elapsed = gameState.levelTime - time; - ctx.globalAlpha = Math.min(1, 2 - (elapsed / duration) * 2); - drawFuzzyBall(ctx, color, size, x, y); - }); - forEachLiveOne(gameState.particles, (flash) => { - const { x, y, time, color, size, duration } = flash; - const elapsed = gameState.levelTime - time; - ctx.globalAlpha = Math.min(1, 2 - (elapsed / duration) * 2); - drawFuzzyBall(ctx, color, size * 3, x, y); - }); + ctx.globalCompositeOperation = "screen"; + ctx.globalAlpha = 0.6; + forEachLiveOne(gameState.coins, (coin) => { + drawFuzzyBall(ctx, coin.color, gameState.coinSize * 2, coin.x, coin.y); + }); + gameState.balls.forEach((ball) => { + drawFuzzyBall( + ctx, + gameState.ballsColor, + gameState.ballSize * 2, + ball.x, + ball.y, + ); + }); + ctx.globalAlpha = 0.5; + gameState.bricks.forEach((color, index) => { + if (!color) return; + const x = brickCenterX(gameState, index), + y = brickCenterY(gameState, index); + drawFuzzyBall( + ctx, + color == "black" ? "#666" : color, + gameState.brickWidth, + x, + y, + ); + }); + ctx.globalAlpha = 1; + forEachLiveOne(gameState.lights, (flash) => { + const {x, y, time, color, size, duration} = flash; + const elapsed = gameState.levelTime - time; + ctx.globalAlpha = Math.min(1, 2 - (elapsed / duration) * 2); + drawFuzzyBall(ctx, color, size, x, y); + }); + forEachLiveOne(gameState.particles, (flash) => { + const {x, y, time, color, size, duration} = flash; + const elapsed = gameState.levelTime - time; + ctx.globalAlpha = Math.min(1, 2 - (elapsed / duration) * 2); + drawFuzzyBall(ctx, color, size * 3, x, y); + }); - // Decides how brights the bg black parts can get - ctx.globalAlpha = 0.2; - ctx.globalCompositeOperation = "multiply"; - ctx.fillStyle = "black"; - ctx.fillRect(0, 0, width, height); - // Decides how dark the background black parts are when lit (1=black) - ctx.globalAlpha = 0.8; - ctx.globalCompositeOperation = "multiply"; - if (level.svg && background.width && background.complete) { - if (backgroundCanvas.title !== level.name) { - backgroundCanvas.title = level.name; - backgroundCanvas.width = gameState.canvasWidth; - backgroundCanvas.height = gameState.canvasHeight; - const bgctx = backgroundCanvas.getContext( - "2d", - ) as CanvasRenderingContext2D; - bgctx.fillStyle = level.color || "#000"; - bgctx.fillRect(0, 0, gameState.canvasWidth, gameState.canvasHeight); - const pattern = ctx.createPattern(background, "repeat"); - if (pattern) { - bgctx.fillStyle = pattern; - bgctx.fillRect(0, 0, width, height); + // Decides how brights the bg black parts can get + ctx.globalAlpha = 0.2; + ctx.globalCompositeOperation = "multiply"; + ctx.fillStyle = "black"; + ctx.fillRect(0, 0, width, height); + // Decides how dark the background black parts are when lit (1=black) + ctx.globalAlpha = 0.8; + ctx.globalCompositeOperation = "multiply"; + if (level.svg && background.width && background.complete) { + if (backgroundCanvas.title !== level.name) { + backgroundCanvas.title = level.name; + backgroundCanvas.width = gameState.canvasWidth; + backgroundCanvas.height = gameState.canvasHeight; + const bgctx = backgroundCanvas.getContext( + "2d", + ) as CanvasRenderingContext2D; + bgctx.fillStyle = level.color || "#000"; + bgctx.fillRect(0, 0, gameState.canvasWidth, gameState.canvasHeight); + const pattern = ctx.createPattern(background, "repeat"); + if (pattern) { + bgctx.fillStyle = pattern; + bgctx.fillRect(0, 0, width, height); + } + } + + ctx.drawImage(backgroundCanvas, 0, 0); + } else { + // Background not loaded yes + ctx.fillStyle = "#000"; + ctx.fillRect(0, 0, width, height); } - } - - ctx.drawImage(backgroundCanvas, 0, 0); } else { - // Background not loaded yes - ctx.fillStyle = "#000"; - ctx.fillRect(0, 0, width, height); + ctx.globalAlpha = 1; + ctx.globalCompositeOperation = "source-over"; + ctx.fillStyle = level.color || "#000"; + ctx.fillRect(0, 0, width, height); + forEachLiveOne(gameState.particles, (flash) => { + const {x, y, time, color, size, duration} = flash; + const elapsed = gameState.levelTime - time; + ctx.globalAlpha = Math.min(1, 2 - (elapsed / duration) * 2); + drawBall(ctx, color, size, x, y); + }); } - } else { + ctx.globalAlpha = 1; ctx.globalCompositeOperation = "source-over"; - ctx.fillStyle = level.color || "#000"; - ctx.fillRect(0, 0, width, height); - forEachLiveOne(gameState.particles, (flash) => { - const { x, y, time, color, size, duration } = flash; - const elapsed = gameState.levelTime - time; - ctx.globalAlpha = Math.min(1, 2 - (elapsed / duration) * 2); - drawBall(ctx, color, size, x, y); - }); - } - - ctx.globalAlpha = 1; - ctx.globalCompositeOperation = "source-over"; - const lastExplosionDelay = Date.now() - gameState.lastExplosion + 5; - const shaked = lastExplosionDelay < 200 && !isOptionOn("basic"); - if (shaked) { - const amplitude = - ((gameState.perks.bigger_explosions + 1) * 50) / lastExplosionDelay; - ctx.translate( - Math.sin(Date.now()) * amplitude, - Math.sin(Date.now() + 36) * amplitude, - ); - } - if (gameState.perks.bigger_explosions && !isOptionOn("basic")) { + const lastExplosionDelay = Date.now() - gameState.lastExplosion + 5; + const shaked = lastExplosionDelay < 200 && !isOptionOn("basic"); if (shaked) { - gameCanvas.style.filter = - "brightness(" + (1 + 100 / (1 + lastExplosionDelay)) + ")"; - } else { - gameCanvas.style.filter = ""; + const amplitude = + ((gameState.perks.bigger_explosions + 1) * 50) / lastExplosionDelay; + ctx.translate( + Math.sin(Date.now()) * amplitude, + Math.sin(Date.now() + 36) * amplitude, + ); } - } - // Coins - ctx.globalAlpha = 1; - forEachLiveOne(gameState.coins, (coin) => { - ctx.globalCompositeOperation = - coin.color === "gold" || level.color ? "source-over" : "screen"; - drawCoin( - ctx, - coin.color, - coin.size, - coin.x, - coin.y, - level.color || "black", - coin.a, - ); - }); - - // Black shadow around balls - if (!isOptionOn("basic")) { - ctx.globalCompositeOperation = "source-over"; - ctx.globalAlpha = Math.min(0.8, liveCount(gameState.coins) / 20); - gameState.balls.forEach((ball) => { - drawBall( - ctx, - level.color || "#000", - gameState.ballSize * 6, - ball.x, - ball.y, - ); + if (gameState.perks.bigger_explosions && !isOptionOn("basic")) { + if (shaked) { + gameCanvas.style.filter = + "brightness(" + (1 + 100 / (1 + lastExplosionDelay)) + ")"; + } else { + gameCanvas.style.filter = ""; + } + } + // Coins + ctx.globalAlpha = 1; + forEachLiveOne(gameState.coins, (coin) => { + ctx.globalCompositeOperation = + coin.color === "gold" || level.color ? "source-over" : "screen"; + drawCoin( + ctx, + coin.color, + coin.size, + coin.x, + coin.y, + level.color || "black", + coin.a, + ); }); - } - ctx.globalCompositeOperation = "source-over"; - renderAllBricks(); + // Black shadow around balls + if (!isOptionOn("basic")) { + ctx.globalCompositeOperation = "source-over"; + ctx.globalAlpha = Math.min(0.8, liveCount(gameState.coins) / 20); + gameState.balls.forEach((ball) => { + drawBall( + ctx, + level.color || "#000", + gameState.ballSize * 6, + ball.x, + ball.y, + ); + }); + } - ctx.globalCompositeOperation = "screen"; - forEachLiveOne(gameState.texts, (flash) => { - const { x, y, time, color, size, duration } = flash; - const elapsed = gameState.levelTime - time; - ctx.globalAlpha = Math.max(0, Math.min(1, 2 - (elapsed / duration) * 2)); ctx.globalCompositeOperation = "source-over"; - drawText(ctx, flash.text, color, size, x, y - elapsed / 10); - }); + renderAllBricks(); - forEachLiveOne(gameState.particles, (particle) => { - const { x, y, time, color, size, duration } = particle; - const elapsed = gameState.levelTime - time; - ctx.globalAlpha = Math.max(0, Math.min(1, 2 - (elapsed / duration) * 2)); ctx.globalCompositeOperation = "screen"; - drawBall(ctx, color, size, x, y); - drawFuzzyBall(ctx, color, size, x, y); - }); + forEachLiveOne(gameState.texts, (flash) => { + const {x, y, time, color, size, duration} = flash; + const elapsed = gameState.levelTime - time; + ctx.globalAlpha = Math.max(0, Math.min(1, 2 - (elapsed / duration) * 2)); + ctx.globalCompositeOperation = "source-over"; + drawText(ctx, flash.text, color, size, x, y - elapsed / 10); + }); + + forEachLiveOne(gameState.particles, (particle) => { + const {x, y, time, color, size, duration} = particle; + const elapsed = gameState.levelTime - time; + ctx.globalAlpha = Math.max(0, Math.min(1, 2 - (elapsed / duration) * 2)); + ctx.globalCompositeOperation = "screen"; + drawBall(ctx, color, size, x, y); + drawFuzzyBall(ctx, color, size, x, y); + }); + + if (gameState.perks.extra_life) { + ctx.globalAlpha = 1; + ctx.globalCompositeOperation = "source-over"; + ctx.fillStyle = gameState.puckColor; + for (let i = 0; i < gameState.perks.extra_life; i++) { + ctx.fillRect( + gameState.perks.unbounded ? 0 : gameState.offsetXRoundedDown, + gameState.gameZoneHeight - gameState.puckHeight / 2 + 2 * i, + gameState.perks.unbounded ? gameState.canvasWidth : gameState.gameZoneWidthRoundedUp, + 1, + ); + } + } - if (gameState.perks.extra_life) { ctx.globalAlpha = 1; ctx.globalCompositeOperation = "source-over"; - ctx.fillStyle = gameState.puckColor; - for (let i = 0; i < gameState.perks.extra_life; i++) { - ctx.fillRect( - gameState.offsetXRoundedDown, - gameState.gameZoneHeight - gameState.puckHeight / 2 + 2 * i, - gameState.gameZoneWidthRoundedUp, - 1, - ); - } - } + gameState.balls.forEach((ball) => { + // The white border around is to distinguish colored balls from coins/bg + drawBall( + ctx, + gameState.ballsColor, + gameState.ballSize, + ball.x, + ball.y, + gameState.puckColor, + ); - ctx.globalAlpha = 1; - ctx.globalCompositeOperation = "source-over"; - gameState.balls.forEach((ball) => { - // The white border around is to distinguish colored balls from coins/bg - drawBall( - ctx, - gameState.ballsColor, - gameState.ballSize, - ball.x, - ball.y, - gameState.puckColor, - ); + if (isTelekinesisActive(gameState, ball) || isYoyoActive(gameState, ball)) { + ctx.strokeStyle = gameState.puckColor; + ctx.beginPath(); + ctx.moveTo(gameState.puckPosition, gameState.gameZoneHeight ); + ctx.bezierCurveTo( + gameState.puckPosition, + gameState.gameZoneHeight, + gameState.puckPosition, + ball.y, + ball.x, + ball.y, + ); + ctx.stroke(); + } - if (isTelekinesisActive(gameState, ball)) { - ctx.strokeStyle = gameState.puckColor; - ctx.beginPath(); - ctx.bezierCurveTo( - gameState.puckPosition, - gameState.gameZoneHeight, - gameState.puckPosition, - ball.y, - ball.x, - ball.y, - ); - ctx.stroke(); - } - }); - // The puck - ctx.globalAlpha = 1; - ctx.globalCompositeOperation = "source-over"; - if (gameState.perks.streak_shots && gameState.combo > baseCombo(gameState)) { - drawPuck( - ctx, - "red", - gameState.puckWidth, - gameState.puckHeight, - -2, - !!gameState.perks.concave_puck, - ); - } - drawPuck( - ctx, - gameState.puckColor, - gameState.puckWidth, - gameState.puckHeight, - 0, - !!gameState.perks.concave_puck, - ); - if (gameState.combo > 1) { + + }); + // The puck + ctx.globalAlpha = 1; ctx.globalCompositeOperation = "source-over"; - const comboText = "x " + gameState.combo; - const comboTextWidth = (comboText.length * gameState.puckHeight) / 1.8; - const totalWidth = comboTextWidth + gameState.coinSize * 2; - const left = gameState.puckPosition - totalWidth / 2; - if (totalWidth < gameState.puckWidth) { - drawCoin( + if (gameState.perks.streak_shots && gameState.combo > baseCombo(gameState)) { + drawPuck( + ctx, + "red", + gameState.puckWidth, + gameState.puckHeight, + -2, + !!gameState.perks.concave_puck, + ); + } + drawPuck( ctx, - "gold", - gameState.coinSize, - left + gameState.coinSize / 2, - gameState.gameZoneHeight - gameState.puckHeight / 2, gameState.puckColor, + gameState.puckWidth, + gameState.puckHeight, 0, - ); - drawText( - ctx, - comboText, - "#000", - gameState.puckHeight, - left + gameState.coinSize * 1.5, - gameState.gameZoneHeight - gameState.puckHeight / 2, - true, - ); + !!gameState.perks.concave_puck, + ); + + if (gameState.combo > 1) { + ctx.globalCompositeOperation = "source-over"; + const comboText = "x " + gameState.combo; + const comboTextWidth = (comboText.length * gameState.puckHeight) / 1.8; + const totalWidth = comboTextWidth + gameState.coinSize * 2; + const left = gameState.puckPosition - totalWidth / 2; + if (totalWidth < gameState.puckWidth) { + drawCoin( + ctx, + "gold", + gameState.coinSize, + left + gameState.coinSize / 2, + gameState.gameZoneHeight - gameState.puckHeight / 2, + gameState.puckColor, + 0, + ); + drawText( + ctx, + comboText, + "#000", + gameState.puckHeight, + left + gameState.coinSize * 1.5, + gameState.gameZoneHeight - gameState.puckHeight / 2, + true, + ); + } else { + drawText( + ctx, + comboText, + "#FFF", + gameState.puckHeight, + gameState.puckPosition, + gameState.gameZoneHeight - gameState.puckHeight / 2, + false, + ); + } + } + // Borders + const hasCombo = gameState.combo > baseCombo(gameState); + ctx.globalCompositeOperation = "source-over"; + + ctx.globalAlpha = gameState.perks.unbounded ? 0.1 : 1 + if (gameState.offsetXRoundedDown) { + // draw outside of gaming area to avoid capturing borders in recordings + ctx.fillStyle = + hasCombo && gameState.perks.left_is_lava ? "red" : gameState.puckColor; + ctx.fillRect(gameState.offsetX - 1, 0, 1, height); + ctx.fillStyle = + hasCombo && gameState.perks.right_is_lava ? "red" : gameState.puckColor; + ctx.fillRect(width - gameState.offsetX + 1, 0, 1, height); } else { - drawText( - ctx, - comboText, - "#FFF", - gameState.puckHeight, - gameState.puckPosition, - gameState.gameZoneHeight - gameState.puckHeight / 2, - false, - ); + ctx.fillStyle = "red"; + if (hasCombo && gameState.perks.left_is_lava) ctx.fillRect(0, 0, 1, height); + if (hasCombo && gameState.perks.right_is_lava) + ctx.fillRect(width - 1, 0, 1, height); } - } - // Borders - const hasCombo = gameState.combo > baseCombo(gameState); - ctx.globalCompositeOperation = "source-over"; - if (gameState.offsetXRoundedDown) { - // draw outside of gaming area to avoid capturing borders in recordings - ctx.fillStyle = - hasCombo && gameState.perks.left_is_lava ? "red" : gameState.puckColor; - ctx.fillRect(gameState.offsetX - 1, 0, 1, height); - ctx.fillStyle = - hasCombo && gameState.perks.right_is_lava ? "red" : gameState.puckColor; - ctx.fillRect(width - gameState.offsetX + 1, 0, 1, height); - } else { - ctx.fillStyle = "red"; - if (hasCombo && gameState.perks.left_is_lava) ctx.fillRect(0, 0, 1, height); - if (hasCombo && gameState.perks.right_is_lava) - ctx.fillRect(width - 1, 0, 1, height); - } - if (gameState.perks.top_is_lava && gameState.combo > baseCombo(gameState)) { - ctx.fillStyle = "red"; - ctx.fillRect( - gameState.offsetXRoundedDown, - 0, - gameState.gameZoneWidthRoundedUp, - 1, - ); - } - const redBottom = - gameState.perks.compound_interest && gameState.combo > baseCombo(gameState); - ctx.fillStyle = redBottom ? "red" : gameState.puckColor; - if (isOptionOn("mobile-mode")) { - ctx.fillRect( - gameState.offsetXRoundedDown, - gameState.gameZoneHeight, - gameState.gameZoneWidthRoundedUp, - 1, - ); - if (!gameState.running) { - drawText( - ctx, - t("play.mobile_press_to_play"), - gameState.puckColor, - gameState.puckHeight, - gameState.canvasWidth / 2, - gameState.gameZoneHeight + - (gameState.canvasHeight - gameState.gameZoneHeight) / 2, - ); + if (gameState.perks.top_is_lava && gameState.combo > baseCombo(gameState)) { + ctx.fillStyle = "red"; + ctx.fillRect( + gameState.offsetXRoundedDown, + 0, + gameState.gameZoneWidthRoundedUp, + 1, + ); + } + const redBottom = + gameState.perks.compound_interest && gameState.combo > baseCombo(gameState); + ctx.fillStyle = redBottom ? "red" : gameState.puckColor; + if (isOptionOn("mobile-mode")) { + ctx.fillRect( + gameState.offsetXRoundedDown, + gameState.gameZoneHeight, + gameState.gameZoneWidthRoundedUp, + 1, + ); + if (!gameState.running) { + drawText( + ctx, + t("play.mobile_press_to_play"), + gameState.puckColor, + gameState.puckHeight, + gameState.canvasWidth / 2, + gameState.gameZoneHeight + + (gameState.canvasHeight - gameState.gameZoneHeight) / 2, + ); + } + } else if (redBottom) { + ctx.fillRect( + gameState.offsetXRoundedDown, + gameState.gameZoneHeight - 1, + gameState.gameZoneWidthRoundedUp, + 1, + ); } - } else if (redBottom) { - ctx.fillRect( - gameState.offsetXRoundedDown, - gameState.gameZoneHeight - 1, - gameState.gameZoneWidthRoundedUp, - 1, - ); - } - if (shaked) { - ctx.resetTransform(); - } + if (shaked) { + ctx.resetTransform(); + } } let cachedBricksRender = document.createElement("canvas"); let cachedBricksRenderKey = ""; export function renderAllBricks() { - ctx.globalAlpha = 1; + ctx.globalAlpha = 1; - const redBorderOnBricksWithWrongColor = - gameState.combo > baseCombo(gameState) && - gameState.perks.picky_eater && - !isOptionOn("basic"); + const redBorderOnBricksWithWrongColor = + gameState.combo > baseCombo(gameState) && + gameState.perks.picky_eater && + !isOptionOn("basic"); - const newKey = - gameState.gameZoneWidth + - "_" + - gameState.bricks.join("_") + - bombSVG.complete + - "_" + - redBorderOnBricksWithWrongColor + - "_" + - gameState.ballsColor + - "_" + - gameState.perks.pierce_color; - if (newKey !== cachedBricksRenderKey) { - cachedBricksRenderKey = newKey; + const newKey = + gameState.gameZoneWidth + + "_" + + gameState.bricks.join("_") + + bombSVG.complete + + "_" + + redBorderOnBricksWithWrongColor + + "_" + + gameState.ballsColor + + "_" + + gameState.perks.pierce_color; + if (newKey !== cachedBricksRenderKey) { + cachedBricksRenderKey = newKey; - cachedBricksRender.width = gameState.gameZoneWidth; - cachedBricksRender.height = gameState.gameZoneWidth + 1; - const canctx = cachedBricksRender.getContext( - "2d", - ) as CanvasRenderingContext2D; - canctx.clearRect(0, 0, gameState.gameZoneWidth, gameState.gameZoneWidth); - canctx.resetTransform(); - canctx.translate(-gameState.offsetX, 0); - // Bricks - gameState.bricks.forEach((color, index) => { - const x = brickCenterX(gameState, index), - y = brickCenterY(gameState, index); + cachedBricksRender.width = gameState.gameZoneWidth; + cachedBricksRender.height = gameState.gameZoneWidth + 1; + const canctx = cachedBricksRender.getContext( + "2d", + ) as CanvasRenderingContext2D; + canctx.clearRect(0, 0, gameState.gameZoneWidth, gameState.gameZoneWidth); + canctx.resetTransform(); + canctx.translate(-gameState.offsetX, 0); + // Bricks + gameState.bricks.forEach((color, index) => { + const x = brickCenterX(gameState, index), + y = brickCenterY(gameState, index); - if (!color) return; + if (!color) return; - const borderColor = - (gameState.ballsColor !== color && - color !== "black" && - redBorderOnBricksWithWrongColor && - "red") || - color; + const borderColor = + (gameState.ballsColor !== color && + color !== "black" && + redBorderOnBricksWithWrongColor && + "red") || + color; - drawBrick(canctx, color, borderColor, x, y); - if (color === "black") { - canctx.globalCompositeOperation = "source-over"; - drawIMG(canctx, bombSVG, gameState.brickWidth, x, y); - } - }); - } + drawBrick(canctx, color, borderColor, x, y); + if (color === "black") { + canctx.globalCompositeOperation = "source-over"; + drawIMG(canctx, bombSVG, gameState.brickWidth, x, y); + } + }); + } - ctx.drawImage(cachedBricksRender, gameState.offsetX, 0); + ctx.drawImage(cachedBricksRender, gameState.offsetX, 0); } let cachedGraphics: { [k: string]: HTMLCanvasElement } = {}; export function drawPuck( - ctx: CanvasRenderingContext2D, - color: colorString, - puckWidth: number, - puckHeight: number, - yOffset = 0, - flipped: boolean, + ctx: CanvasRenderingContext2D, + color: colorString, + puckWidth: number, + puckHeight: number, + yOffset = 0, + flipped: boolean, ) { - const key = - "puck" + color + "_" + puckWidth + "_" + puckHeight + "_" + flipped; + const key = + "puck" + color + "_" + puckWidth + "_" + puckHeight + "_" + flipped; - if (!cachedGraphics[key]) { - const can = document.createElement("canvas"); - can.width = puckWidth; - can.height = puckHeight * 2; - const canctx = can.getContext("2d") as CanvasRenderingContext2D; - canctx.fillStyle = color; + if (!cachedGraphics[key]) { + const can = document.createElement("canvas"); + can.width = puckWidth; + can.height = puckHeight * 2; + const canctx = can.getContext("2d") as CanvasRenderingContext2D; + canctx.fillStyle = color; - canctx.beginPath(); - canctx.moveTo(0, puckHeight * 2); + canctx.beginPath(); + canctx.moveTo(0, puckHeight * 2); - if (flipped) { - canctx.lineTo(0, puckHeight * 0.75); - canctx.bezierCurveTo( - puckWidth / 2, - puckHeight, - puckWidth / 2, - puckHeight * 1, - puckWidth, - puckHeight * 0.75, - ); - canctx.lineTo(puckWidth, puckHeight * 2); - } else { - canctx.lineTo(0, puckHeight * 1.25); - canctx.bezierCurveTo( - 0, - puckHeight * 0.75, - puckWidth, - puckHeight * 0.75, - puckWidth, - puckHeight * 1.25, - ); - canctx.lineTo(puckWidth, puckHeight * 2); + if (flipped) { + canctx.lineTo(0, puckHeight * 0.75); + canctx.bezierCurveTo( + puckWidth / 2, + puckHeight, + puckWidth / 2, + puckHeight * 1, + puckWidth, + puckHeight * 0.75, + ); + canctx.lineTo(puckWidth, puckHeight * 2); + } else { + canctx.lineTo(0, puckHeight * 1.25); + canctx.bezierCurveTo( + 0, + puckHeight * 0.75, + puckWidth, + puckHeight * 0.75, + puckWidth, + puckHeight * 1.25, + ); + canctx.lineTo(puckWidth, puckHeight * 2); + } + + canctx.fill(); + cachedGraphics[key] = can; } - canctx.fill(); - cachedGraphics[key] = can; - } - - ctx.drawImage( - cachedGraphics[key], - Math.round(gameState.puckPosition - puckWidth / 2), - gameState.gameZoneHeight - puckHeight * 2 + yOffset, - ); + ctx.drawImage( + cachedGraphics[key], + Math.round(gameState.puckPosition - puckWidth / 2), + gameState.gameZoneHeight - puckHeight * 2 + yOffset, + ); } export function drawBall( - ctx: CanvasRenderingContext2D, - color: colorString, - width: number, - x: number, - y: number, - borderColor = "", + ctx: CanvasRenderingContext2D, + color: colorString, + width: number, + x: number, + y: number, + borderColor = "", ) { - const key = "ball" + color + "_" + width + "_" + borderColor; + const key = "ball" + color + "_" + width + "_" + borderColor; - const size = Math.round(width); - if (!cachedGraphics[key]) { - const can = document.createElement("canvas"); - can.width = size; - can.height = size; + const size = Math.round(width); + if (!cachedGraphics[key]) { + const can = document.createElement("canvas"); + can.width = size; + can.height = size; - const canctx = can.getContext("2d") as CanvasRenderingContext2D; - canctx.beginPath(); - canctx.arc(size / 2, size / 2, Math.round(size / 2) - 1, 0, 2 * Math.PI); - canctx.fillStyle = color; - canctx.fill(); - if (borderColor) { - canctx.lineWidth = 2; - canctx.strokeStyle = borderColor; - canctx.stroke(); + const canctx = can.getContext("2d") as CanvasRenderingContext2D; + canctx.beginPath(); + canctx.arc(size / 2, size / 2, Math.round(size / 2) - 1, 0, 2 * Math.PI); + canctx.fillStyle = color; + canctx.fill(); + if (borderColor) { + canctx.lineWidth = 2; + canctx.strokeStyle = borderColor; + canctx.stroke(); + } + + cachedGraphics[key] = can; } - - cachedGraphics[key] = can; - } - ctx.drawImage( - cachedGraphics[key], - Math.round(x - size / 2), - Math.round(y - size / 2), - ); + ctx.drawImage( + cachedGraphics[key], + Math.round(x - size / 2), + Math.round(y - size / 2), + ); } const angles = 32; export function drawCoin( - ctx: CanvasRenderingContext2D, - color: colorString, - size: number, - x: number, - y: number, - borderColor: colorString, - rawAngle: number, + ctx: CanvasRenderingContext2D, + color: colorString, + size: number, + x: number, + y: number, + borderColor: colorString, + rawAngle: number, ) { - const angle = - ((Math.round((rawAngle / Math.PI) * 2 * angles) % angles) + angles) % - angles; - const key = - "coin with halo" + - "_" + - color + - "_" + - size + - "_" + - borderColor + - "_" + - (color === "gold" ? angle : "whatever"); + const angle = + ((Math.round((rawAngle / Math.PI) * 2 * angles) % angles) + angles) % + angles; + const key = + "coin with halo" + + "_" + + color + + "_" + + size + + "_" + + borderColor + + "_" + + (color === "gold" ? angle : "whatever"); - if (!cachedGraphics[key]) { - const can = document.createElement("canvas"); - can.width = size; - can.height = size; + if (!cachedGraphics[key]) { + const can = document.createElement("canvas"); + can.width = size; + can.height = size; - const canctx = can.getContext("2d") as CanvasRenderingContext2D; + const canctx = can.getContext("2d") as CanvasRenderingContext2D; - // coin - canctx.beginPath(); - canctx.arc(size / 2, size / 2, size / 2, 0, 2 * Math.PI); - canctx.fillStyle = color; - canctx.fill(); + // coin + canctx.beginPath(); + canctx.arc(size / 2, size / 2, size / 2, 0, 2 * Math.PI); + canctx.fillStyle = color; + canctx.fill(); - if (color === "gold") { - canctx.strokeStyle = borderColor; - canctx.stroke(); + if (color === "gold") { + canctx.strokeStyle = borderColor; + canctx.stroke(); - canctx.beginPath(); - canctx.arc(size / 2, size / 2, (size / 2) * 0.6, 0, 2 * Math.PI); - canctx.fillStyle = "rgba(255,255,255,0.5)"; - canctx.fill(); + canctx.beginPath(); + canctx.arc(size / 2, size / 2, (size / 2) * 0.6, 0, 2 * Math.PI); + canctx.fillStyle = "rgba(255,255,255,0.5)"; + canctx.fill(); - canctx.translate(size / 2, size / 2); - canctx.rotate(angle / 16); - canctx.translate(-size / 2, -size / 2); + canctx.translate(size / 2, size / 2); + canctx.rotate(angle / 16); + canctx.translate(-size / 2, -size / 2); - canctx.globalCompositeOperation = "multiply"; - drawText(canctx, "$", color, size - 2, size / 2, size / 2 + 1); - drawText(canctx, "$", color, size - 2, size / 2, size / 2 + 1); + canctx.globalCompositeOperation = "multiply"; + drawText(canctx, "$", color, size - 2, size / 2, size / 2 + 1); + drawText(canctx, "$", color, size - 2, size / 2, size / 2 + 1); + } + cachedGraphics[key] = can; } - cachedGraphics[key] = can; - } - ctx.drawImage( - cachedGraphics[key], - Math.round(x - size / 2), - Math.round(y - size / 2), - ); + ctx.drawImage( + cachedGraphics[key], + Math.round(x - size / 2), + Math.round(y - size / 2), + ); } export function drawFuzzyBall( - ctx: CanvasRenderingContext2D, - color: colorString, - width: number, - x: number, - y: number, + ctx: CanvasRenderingContext2D, + color: colorString, + width: number, + x: number, + y: number, ) { - const key = "fuzzy-circle" + color + "_" + width; - if (!color) debugger; - const size = Math.round(width * 3); - if (!cachedGraphics[key]) { - const can = document.createElement("canvas"); - can.width = size; - can.height = size; + const key = "fuzzy-circle" + color + "_" + width; + if (!color) debugger; + const size = Math.round(width * 3); + if (!cachedGraphics[key]) { + const can = document.createElement("canvas"); + can.width = size; + can.height = size; - const canctx = can.getContext("2d") as CanvasRenderingContext2D; - const gradient = canctx.createRadialGradient( - size / 2, - size / 2, - 0, - size / 2, - size / 2, - size / 2, + const canctx = can.getContext("2d") as CanvasRenderingContext2D; + const gradient = canctx.createRadialGradient( + size / 2, + size / 2, + 0, + size / 2, + size / 2, + size / 2, + ); + gradient.addColorStop(0, color); + gradient.addColorStop(1, "transparent"); + canctx.fillStyle = gradient; + canctx.fillRect(0, 0, size, size); + cachedGraphics[key] = can; + } + ctx.drawImage( + cachedGraphics[key], + Math.round(x - size / 2), + Math.round(y - size / 2), ); - gradient.addColorStop(0, color); - gradient.addColorStop(1, "transparent"); - canctx.fillStyle = gradient; - canctx.fillRect(0, 0, size, size); - cachedGraphics[key] = can; - } - ctx.drawImage( - cachedGraphics[key], - Math.round(x - size / 2), - Math.round(y - size / 2), - ); } export function drawBrick( - ctx: CanvasRenderingContext2D, - color: colorString, - borderColor: colorString, - x: number, - y: number, + ctx: CanvasRenderingContext2D, + color: colorString, + borderColor: colorString, + x: number, + y: number, ) { - const tlx = Math.ceil(x - gameState.brickWidth / 2); - const tly = Math.ceil(y - gameState.brickWidth / 2); - const brx = Math.ceil(x + gameState.brickWidth / 2) - 1; - const bry = Math.ceil(y + gameState.brickWidth / 2) - 1; + const tlx = Math.ceil(x - gameState.brickWidth / 2); + const tly = Math.ceil(y - gameState.brickWidth / 2); + const brx = Math.ceil(x + gameState.brickWidth / 2) - 1; + const bry = Math.ceil(y + gameState.brickWidth / 2) - 1; - const width = brx - tlx, - height = bry - tly; - const key = "brick" + color + "_" + borderColor + "_" + width + "_" + height; + const width = brx - tlx, + height = bry - tly; + const key = "brick" + color + "_" + borderColor + "_" + width + "_" + height; - if (!cachedGraphics[key]) { - const can = document.createElement("canvas"); - can.width = width; - can.height = height; - const bord = 2; - const cornerRadius = 2; - const canctx = can.getContext("2d") as CanvasRenderingContext2D; + if (!cachedGraphics[key]) { + const can = document.createElement("canvas"); + can.width = width; + can.height = height; + const bord = 2; + const cornerRadius = 2; + const canctx = can.getContext("2d") as CanvasRenderingContext2D; - canctx.fillStyle = color; - canctx.strokeStyle = borderColor; - canctx.lineJoin = "round"; - canctx.lineWidth = bord; - roundRect( - canctx, - bord / 2, - bord / 2, - width - bord, - height - bord, - cornerRadius, - ); - canctx.fill(); - canctx.stroke(); + canctx.fillStyle = color; + canctx.strokeStyle = borderColor; + canctx.lineJoin = "round"; + canctx.lineWidth = bord; + roundRect( + canctx, + bord / 2, + bord / 2, + width - bord, + height - bord, + cornerRadius, + ); + canctx.fill(); + canctx.stroke(); - cachedGraphics[key] = can; - } - ctx.drawImage(cachedGraphics[key], tlx, tly, width, height); - // It's not easy to have a 1px gap between bricks without antialiasing + cachedGraphics[key] = can; + } + ctx.drawImage(cachedGraphics[key], tlx, tly, width, height); + // It's not easy to have a 1px gap between bricks without antialiasing } export function roundRect( - ctx: CanvasRenderingContext2D, - x: number, - y: number, - width: number, - height: number, - radius: number, + ctx: CanvasRenderingContext2D, + x: number, + y: number, + width: number, + height: number, + radius: number, ) { - ctx.beginPath(); - ctx.moveTo(x + radius, y); - ctx.lineTo(x + width - radius, y); - ctx.quadraticCurveTo(x + width, y, x + width, y + radius); - ctx.lineTo(x + width, y + height - radius); - ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); - ctx.lineTo(x + radius, y + height); - ctx.quadraticCurveTo(x, y + height, x, y + height - radius); - ctx.lineTo(x, y + radius); - ctx.quadraticCurveTo(x, y, x + radius, y); - ctx.closePath(); + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.lineTo(x + width - radius, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + radius); + ctx.lineTo(x + width, y + height - radius); + ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); + ctx.lineTo(x + radius, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - radius); + ctx.lineTo(x, y + radius); + ctx.quadraticCurveTo(x, y, x + radius, y); + ctx.closePath(); } export function drawIMG( - ctx: CanvasRenderingContext2D, - img: HTMLImageElement, - size: number, - x: number, - y: number, + ctx: CanvasRenderingContext2D, + img: HTMLImageElement, + size: number, + x: number, + y: number, ) { - const key = "svg" + img + "_" + size + "_" + img.complete; + const key = "svg" + img + "_" + size + "_" + img.complete; - if (!cachedGraphics[key]) { - const can = document.createElement("canvas"); - can.width = size; - can.height = size; + if (!cachedGraphics[key]) { + const can = document.createElement("canvas"); + can.width = size; + can.height = size; - const canctx = can.getContext("2d") as CanvasRenderingContext2D; + const canctx = can.getContext("2d") as CanvasRenderingContext2D; - const ratio = size / Math.max(img.width, img.height); - const w = img.width * ratio; - const h = img.height * ratio; - canctx.drawImage(img, (size - w) / 2, (size - h) / 2, w, h); + const ratio = size / Math.max(img.width, img.height); + const w = img.width * ratio; + const h = img.height * ratio; + canctx.drawImage(img, (size - w) / 2, (size - h) / 2, w, h); - cachedGraphics[key] = can; - } - ctx.drawImage( - cachedGraphics[key], - Math.round(x - size / 2), - Math.round(y - size / 2), - ); + cachedGraphics[key] = can; + } + ctx.drawImage( + cachedGraphics[key], + Math.round(x - size / 2), + Math.round(y - size / 2), + ); } export function drawText( - ctx: CanvasRenderingContext2D, - text: string, - color: colorString, - fontSize: number, - x: number, - y: number, - left = false, + ctx: CanvasRenderingContext2D, + text: string, + color: colorString, + fontSize: number, + x: number, + y: number, + left = false, ) { - const key = "text" + text + "_" + color + "_" + fontSize + "_" + left; + const key = "text" + text + "_" + color + "_" + fontSize + "_" + left; - if (!cachedGraphics[key]) { - const can = document.createElement("canvas"); - can.width = fontSize * text.length; - can.height = fontSize; - const canctx = can.getContext("2d") as CanvasRenderingContext2D; - canctx.fillStyle = color; - canctx.textAlign = left ? "left" : "center"; - canctx.textBaseline = "middle"; - canctx.font = fontSize + "px monospace"; + if (!cachedGraphics[key]) { + const can = document.createElement("canvas"); + can.width = fontSize * text.length; + can.height = fontSize; + const canctx = can.getContext("2d") as CanvasRenderingContext2D; + canctx.fillStyle = color; + canctx.textAlign = left ? "left" : "center"; + canctx.textBaseline = "middle"; + canctx.font = fontSize + "px monospace"; - canctx.fillText(text, left ? 0 : can.width / 2, can.height / 2, can.width); + canctx.fillText(text, left ? 0 : can.width / 2, can.height / 2, can.width); - cachedGraphics[key] = can; - } - ctx.drawImage( - cachedGraphics[key], - left ? x : Math.round(x - cachedGraphics[key].width / 2), - Math.round(y - cachedGraphics[key].height / 2), - ); + cachedGraphics[key] = can; + } + ctx.drawImage( + cachedGraphics[key], + left ? x : Math.round(x - cachedGraphics[key].width / 2), + Math.round(y - cachedGraphics[key].height / 2), + ); } export const scoreDisplay = document.getElementById( - "score", + "score", ) as HTMLButtonElement; const menuLabel = document.getElementById("menuLabel") as HTMLButtonElement; diff --git a/src/types.d.ts b/src/types.d.ts index c0acf3f..ce4fd97 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -1,4 +1,4 @@ -import { rawUpgrades } from "./rawUpgrades"; +import { rawUpgrades } from "./upgrades"; import { options } from "./options"; export type colorString = string; @@ -244,6 +244,7 @@ export type GameState = { runStatistics: RunStats; lastOffered: Partial<{ [k in PerkId]: number }>; levelTime: number; + noBricksSince: number ; levelWallBounces: number; autoCleanUses: number; aboutToPlaySound: { diff --git a/src/upgrades.test.ts b/src/upgrades.test.ts new file mode 100644 index 0000000..2ff1c3e --- /dev/null +++ b/src/upgrades.test.ts @@ -0,0 +1,11 @@ + +import _rawLevelsList from "./data/levels.json"; +import {rawUpgrades} from "./upgrades"; + +describe("rawUpgrades", ()=>{ + + it('has an icon for each upgrade',()=>{ + const missingIcon = rawUpgrades.map(u=>u.id).filter(id=>!_rawLevelsList.find(l=>l.name === 'icon:'+id)) + expect(missingIcon.join(', ')).toEqual('') + }) +}) diff --git a/src/rawUpgrades.ts b/src/upgrades.ts similarity index 84% rename from src/rawUpgrades.ts rename to src/upgrades.ts index 27d7249..efdc75f 100644 --- a/src/rawUpgrades.ts +++ b/src/upgrades.ts @@ -371,4 +371,74 @@ export const rawUpgrades = [ help: (lvl: number) => t("upgrades.concave_puck.help"), fullHelp: t("upgrades.concave_puck.fullHelp"), }, + { + requires: "", + threshold: 65000, + giftable: false, + id: "antigrav", + max: 1, + name: t("upgrades.antigrav.name"), + help: (lvl: number) => t("upgrades.antigrav.help"), + fullHelp: t("upgrades.antigrav.fullHelp"), + }, + { + requires: "", + threshold:70000, + giftable: false, + id: "asceticism", + max: 1, + name: t("upgrades.asceticism.name"), + help: (lvl: number) => t("upgrades.asceticism.help"), + fullHelp: t("upgrades.asceticism.fullHelp"), + }, + { + requires: "", + threshold:75000, + giftable: false, + id: "unbounded", + max: 1, + name: t("upgrades.unbounded.name"), + help: (lvl: number) => t("upgrades.unbounded.help"), + fullHelp: t("upgrades.unbounded.fullHelp"), + }, + { + requires: "", + threshold:80000, + giftable: false, + id: "shunt", + max: 1, + name: t("upgrades.shunt.name"), + help: (lvl: number) => t("upgrades.shunt.help"), + fullHelp: t("upgrades.shunt.fullHelp"), + }, + { + requires: "", + threshold:85000, + giftable: false, + id: "yoyo", + max: 2, + name: t("upgrades.yoyo.name"), + help: (lvl: number) => t("upgrades.yoyo.help"), + fullHelp: t("upgrades.yoyo.fullHelp"), + }, + { + requires: "", + threshold:90000, + giftable: false, + id: "nbricks", + max: 3, + name: t("upgrades.nbricks.name"), + help: (lvl: number) => t("upgrades.nbricks.help",{lvl}), + fullHelp: t("upgrades.nbricks.fullHelp"), + }, + { + requires: "", + threshold:95000, + giftable: false, + id: "etherealcoins", + max: 1, + name: t("upgrades.etherealcoins.name"), + help: (lvl: number) => t("upgrades.etherealcoins.help"), + fullHelp: t("upgrades.etherealcoins.fullHelp"), + }, ] as const;