mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 04:56:15 -04:00
Build and deploy of version 29022953
This commit is contained in:
parent
39d1fad481
commit
61badf71ec
9 changed files with 274 additions and 3858 deletions
123
src/game.ts
123
src/game.ts
|
@ -8,6 +8,7 @@ import {
|
|||
FlashTypes,
|
||||
Level,
|
||||
PerkId,
|
||||
PerksMap,
|
||||
RunHistoryItem,
|
||||
RunStats,
|
||||
Upgrade,
|
||||
|
@ -48,7 +49,7 @@ bombSVG.src =
|
|||
// Whatever
|
||||
let puckWidth = 200;
|
||||
|
||||
const perks = {} as { [id in PerkId]: number };
|
||||
const perks: PerksMap = {};
|
||||
|
||||
let baseSpeed = 12; // applied to x and y
|
||||
let combo = 1;
|
||||
|
@ -303,8 +304,8 @@ function resetBalls() {
|
|||
const perBall = puckWidth / (count + 1);
|
||||
balls = [];
|
||||
ballsColor = "#FFF";
|
||||
if(perks.picky_eater || perks.pierce_color){
|
||||
ballsColor=getMajorityValue(bricks.filter(i=>i)) || '#FFF'
|
||||
if (perks.picky_eater || perks.pierce_color) {
|
||||
ballsColor = getMajorityValue(bricks.filter((i) => i)) || "#FFF";
|
||||
}
|
||||
for (let i = 0; i < count; i++) {
|
||||
const x = puck - puckWidth / 2 + perBall * (i + 1);
|
||||
|
@ -470,25 +471,6 @@ function currentLevelInfo() {
|
|||
return runLevels[currentLevel % runLevels.length];
|
||||
}
|
||||
|
||||
function reset_perks(): PerkId {
|
||||
for (let u of upgrades) {
|
||||
perks[u.id] = 0;
|
||||
}
|
||||
|
||||
const giftable = getPossibleUpgrades().filter((u) => u.giftable);
|
||||
const randomGift =
|
||||
nextRunOverrides?.perk ||
|
||||
(isSettingOn("easy") && "slow_down") ||
|
||||
giftable[Math.floor(Math.random() * giftable.length)].id;
|
||||
|
||||
if(!isCreativeModeRun){
|
||||
perks[randomGift] = 1;
|
||||
}
|
||||
|
||||
delete nextRunOverrides.perk;
|
||||
return randomGift as PerkId;
|
||||
}
|
||||
|
||||
let totalScoreAtRunStart = getTotalScore();
|
||||
|
||||
function getPossibleUpgrades() {
|
||||
|
@ -571,19 +553,36 @@ let isCreativeModeRun = false;
|
|||
|
||||
let pauseUsesDuringRun = 0;
|
||||
|
||||
function restart() {
|
||||
function restart(creativeModePerks: PerksMap | undefined = undefined) {
|
||||
// When restarting, we want to avoid restarting with the same level we're on, so we exclude from the next
|
||||
// run's level list
|
||||
totalScoreAtRunStart = getTotalScore();
|
||||
isCreativeModeRun = false;
|
||||
|
||||
shuffleLevels(levelTime || score ? currentLevelInfo().name : null);
|
||||
resetRunStatistics();
|
||||
score = 0;
|
||||
pauseUsesDuringRun = 0;
|
||||
|
||||
const randomGift = reset_perks();
|
||||
for (let u of upgrades) {
|
||||
perks[u.id] = 0;
|
||||
}
|
||||
if (creativeModePerks) {
|
||||
Object.assign(perks, creativeModePerks);
|
||||
isCreativeModeRun = true;
|
||||
} else {
|
||||
isCreativeModeRun = false;
|
||||
|
||||
dontOfferTooSoon(randomGift);
|
||||
const giftable = getPossibleUpgrades().filter((u) => u.giftable);
|
||||
const randomGift =
|
||||
(nextRunOverrides?.perk as PerkId) ||
|
||||
(isSettingOn("easy") && "slow_down") ||
|
||||
giftable[Math.floor(Math.random() * giftable.length)].id;
|
||||
|
||||
perks[randomGift] = 1;
|
||||
delete nextRunOverrides.perk;
|
||||
|
||||
dontOfferTooSoon(randomGift);
|
||||
}
|
||||
|
||||
setLevel(0);
|
||||
pauseRecording();
|
||||
|
@ -728,6 +727,7 @@ function ballBrickHitCheck(ball: Ball) {
|
|||
|
||||
return vhit ?? hhit ?? chit;
|
||||
}
|
||||
|
||||
function coinBrickHitCheck(coin: Coin) {
|
||||
// Make ball/coin bonce, and return bricks that were hit
|
||||
const radius = coinSize / 2;
|
||||
|
@ -845,7 +845,7 @@ function tick() {
|
|||
explodeBrick(index, balls[0], true);
|
||||
}
|
||||
});
|
||||
level_skip_last_uses++
|
||||
level_skip_last_uses++;
|
||||
}
|
||||
if (!remainingBricks && !coins.length) {
|
||||
if (currentLevel + 1 < max_levels()) {
|
||||
|
@ -1108,7 +1108,7 @@ function ballTick(ball: Ball, delta: number) {
|
|||
x: puck,
|
||||
y: gameZoneHeight,
|
||||
},
|
||||
perks.puck_repulse_ball,
|
||||
perks.puck_repulse_ball + 1,
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
@ -1968,7 +1968,9 @@ function renderAllBricks() {
|
|||
"_" +
|
||||
redBorderOnBricksWithWrongColor +
|
||||
"_" +
|
||||
ballsColor+'_'+perks.pierce_color;
|
||||
ballsColor +
|
||||
"_" +
|
||||
perks.pierce_color;
|
||||
if (newKey !== cachedBricksRenderKey) {
|
||||
cachedBricksRenderKey = newKey;
|
||||
|
||||
|
@ -1986,8 +1988,12 @@ function renderAllBricks() {
|
|||
y = brickCenterY(index);
|
||||
|
||||
if (!color) return;
|
||||
|
||||
const borderColor = (ballsColor !== color && color !== "black" && redBorderOnBricksWithWrongColor && "red") ||
|
||||
|
||||
const borderColor =
|
||||
(ballsColor !== color &&
|
||||
color !== "black" &&
|
||||
redBorderOnBricksWithWrongColor &&
|
||||
"red") ||
|
||||
color;
|
||||
|
||||
drawBrick(canctx, color, borderColor, x, y);
|
||||
|
@ -2681,8 +2687,10 @@ export function isSettingOn(key: OptionId) {
|
|||
export function toggleSetting(key: OptionId) {
|
||||
cachedSettings[key] = !isSettingOn(key);
|
||||
try {
|
||||
const lskey = "breakout-settings-enable-" + key;
|
||||
localStorage.setItem(lskey, JSON.stringify(cachedSettings[key]));
|
||||
localStorage.setItem(
|
||||
"breakout-settings-enable-" + key,
|
||||
JSON.stringify(cachedSettings[key]),
|
||||
);
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
}
|
||||
|
@ -2748,7 +2756,7 @@ async function openSettingsPanel() {
|
|||
},
|
||||
});
|
||||
}
|
||||
const creativeModeTreshold=Math.max(...upgrades.map((u) => u.threshold))
|
||||
const creativeModeThreshold = Math.max(...upgrades.map((u) => u.threshold));
|
||||
|
||||
const cb = await asyncAlert<() => void>({
|
||||
title: "Breakout 71",
|
||||
|
@ -2789,16 +2797,18 @@ async function openSettingsPanel() {
|
|||
},
|
||||
}),
|
||||
|
||||
|
||||
{
|
||||
text: "Creative mode",
|
||||
help:getTotalScore() < creativeModeTreshold ? "Unlocks at total score $"+creativeModeTreshold: "Test runs with custom perks" ,
|
||||
disabled: getTotalScore() < creativeModeTreshold,
|
||||
help:
|
||||
getTotalScore() < creativeModeThreshold
|
||||
? "Unlocks at total score $" + creativeModeThreshold
|
||||
: "Test runs with custom perks",
|
||||
disabled: getTotalScore() < creativeModeThreshold,
|
||||
async value() {
|
||||
let creativeModePerks = {},
|
||||
choice;
|
||||
choice: "start" | Upgrade | void;
|
||||
while (
|
||||
(choice = await asyncAlert<string | Upgrade>({
|
||||
(choice = await asyncAlert<"start" | Upgrade>({
|
||||
title: "Select perks",
|
||||
text: 'Select perks below and press "start run" to try them out in a test run. Scores and stats are not recorded.',
|
||||
actionsAsGrid: true,
|
||||
|
@ -2820,11 +2830,8 @@ async function openSettingsPanel() {
|
|||
}))
|
||||
) {
|
||||
if (choice === "start") {
|
||||
restart();
|
||||
isCreativeModeRun = true;
|
||||
Object.assign(perks, creativeModePerks);
|
||||
resetCombo(undefined, undefined);
|
||||
resetBalls();
|
||||
restart(creativeModePerks);
|
||||
|
||||
break;
|
||||
} else if (choice) {
|
||||
creativeModePerks[choice.id] =
|
||||
|
@ -2908,13 +2915,16 @@ async function openUnlocksList() {
|
|||
}),
|
||||
];
|
||||
|
||||
const percentUnlock = Math.round(
|
||||
(actions.filter((a) => !a.disabled).length / actions.length) * 100,
|
||||
);
|
||||
const tryOn = await asyncAlert({
|
||||
title: `You unlocked ${Math.round((actions.filter((a) => !a.disabled).length / actions.length) * 100)}% of the game.`,
|
||||
title: `You unlocked ${percentUnlock}% of the game.`,
|
||||
text: `
|
||||
<p> Your total score is ${ts}. Below are all the upgrades and levels the games has to offer. They greyed out ones can be unlocked by increasing your total score. </p>
|
||||
<p> Your total score is ${ts}. Below are all the upgrades and levels the games has to offer.
|
||||
${percentUnlock < 100 ? "The greyed out ones can be unlocked by increasing your total score. The total score increases every time you score in game." : ""}</p>
|
||||
`,
|
||||
textAfterButtons: `<p>
|
||||
The total score increases every time you score in game.
|
||||
textAfterButtons: `<p>
|
||||
Your high score is ${highScore}.
|
||||
Click an item above to start a run with it.
|
||||
</p>`,
|
||||
|
@ -3302,18 +3312,17 @@ document.addEventListener("keyup", (e) => {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
function sample<T>(arr:T[]):T{
|
||||
return arr[Math.floor(arr.length*Math.random())]
|
||||
function sample<T>(arr: T[]): T {
|
||||
return arr[Math.floor(arr.length * Math.random())];
|
||||
}
|
||||
|
||||
function getMajorityValue(arr:string[]):string{
|
||||
const count = {}
|
||||
arr.forEach(v=>count[v]=(count[v]||0)+1)
|
||||
const max = Math.max(...Object.values(count))
|
||||
return sample(Object.keys(count).filter(k=>count[k]==max))
|
||||
function getMajorityValue(arr: string[]): string {
|
||||
const count = {};
|
||||
arr.forEach((v) => (count[v] = (count[v] || 0) + 1));
|
||||
// Object.values inline polyfill
|
||||
const max = Math.max(...Object.keys(count).map((k) => count[k]));
|
||||
return sample(Object.keys(count).filter((k) => count[k] == max));
|
||||
}
|
||||
|
||||
|
||||
fitSize();
|
||||
restart();
|
||||
|
|
|
@ -6,7 +6,7 @@ export const rawUpgrades = [
|
|||
id: "extra_life",
|
||||
name: "+1 life",
|
||||
max: 7,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
`Survive dropping the ball ${lvl} time${lvl > 1 ? "s" : ""}.`,
|
||||
fullHelp: `Normally, you just have one life, and the run is over as soon as you drop it.
|
||||
With this perk, you can survive dropping the ball once. A heart in the top right corner will remind you of how many extra lives you have. `,
|
||||
|
@ -18,7 +18,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Single puck hit streak",
|
||||
max: 1,
|
||||
help: (lvl) => `More coins if you break many bricks at once`,
|
||||
help: (lvl: number) => `More coins if you break many bricks at once`,
|
||||
fullHelp: `Every time you break a brick, your combo (number of coins per bricks) increases by one. However, 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. So you should try to hit many bricks in one go for more score.
|
||||
Once 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.
|
||||
|
@ -32,7 +32,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "+3 base combo",
|
||||
max: 7,
|
||||
help: (lvl) => `Every brick drops at least ${1 + lvl * 3} coins.`,
|
||||
help: (lvl: number) => `Every brick drops at least ${1 + lvl * 3} coins.`,
|
||||
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.`,
|
||||
|
@ -44,7 +44,7 @@ export const rawUpgrades = [
|
|||
id: "slow_down",
|
||||
name: "Slower ball",
|
||||
max: 2,
|
||||
help: (lvl) => `Ball moves ${lvl > 1 ? "even" : ""} more slowly.`,
|
||||
help: (lvl: number) => `Ball moves ${lvl > 1 ? "even" : ""} more slowly.`,
|
||||
|
||||
fullHelp: `The ball starts relatively slow, but every level of your run it will start a bit faster, and it will also accelerate if you spend a lot of time in one level. This perk makes it
|
||||
more manageable. You can get it at the start every time by enabling kid mode in the menu.`,
|
||||
|
@ -56,7 +56,7 @@ export const rawUpgrades = [
|
|||
id: "bigger_puck",
|
||||
name: "Bigger puck",
|
||||
max: 2,
|
||||
help: (lvl) => `Easily catch ${lvl > 1 ? "even" : ""} more coins.`,
|
||||
help: (lvl: number) => `Easily catch ${lvl > 1 ? "even" : ""} more coins.`,
|
||||
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).
|
||||
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. `,
|
||||
},
|
||||
|
@ -67,7 +67,7 @@ export const rawUpgrades = [
|
|||
id: "viscosity",
|
||||
name: "Viscosity",
|
||||
max: 3,
|
||||
help: (lvl) => `${lvl > 1 ? "Even slower" : "Slower"} coins fall.`,
|
||||
help: (lvl: number) => `${lvl > 1 ? "Even slower" : "Slower"} coins fall.`,
|
||||
|
||||
fullHelp: `Coins normally accelerate with gravity and explosions to pretty high speeds. This perk constantly makes them slow down, as if they were in some sort of viscous liquid.
|
||||
This makes catching them easier, and combines nicely with perks that influence the coin's movement. `,
|
||||
|
@ -79,7 +79,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Avoid left side",
|
||||
max: 1,
|
||||
help: (lvl) => `More coins if you don't touch the left side.`,
|
||||
help: (lvl: number) => `More coins if you don't touch the left side.`,
|
||||
|
||||
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.
|
||||
However, your combo will reset as soon as your ball hits the left side .
|
||||
|
@ -94,7 +94,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Avoid right side",
|
||||
max: 1,
|
||||
help: (lvl) => `More coins if you don't touch the right side.`,
|
||||
help: (lvl: number) => `More coins if you don't touch the right side.`,
|
||||
|
||||
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.
|
||||
However, your combo will reset as soon as your ball hits the right side .
|
||||
|
@ -109,7 +109,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Sky is the limit",
|
||||
max: 1,
|
||||
help: (lvl) => `More coins if you don't touch the top.`,
|
||||
help: (lvl: number) => `More coins if you don't touch the top.`,
|
||||
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.
|
||||
When your combo is above the minimum, a red bar will appear at the top to remind you that you should avoid hitting it.
|
||||
The effect stacks with other combo perks.`,
|
||||
|
@ -121,7 +121,7 @@ export const rawUpgrades = [
|
|||
id: "skip_last",
|
||||
name: "Easy Cleanup",
|
||||
max: 7,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
`The last ${lvl > 1 ? lvl + " bricks" : "brick"} left will self-destruct.`,
|
||||
fullHelp: `You need to break all bricks to go to the next level. However, it can be hard to get the last ones.
|
||||
Clearing a level early brings extra choices when upgrading. Never missing the bricks is also very beneficial.
|
||||
|
@ -134,7 +134,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Puck controls ball",
|
||||
max: 2,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl == 1
|
||||
? `Control the ball's trajectory.`
|
||||
: `Stronger effect on the ball`,
|
||||
|
@ -148,7 +148,7 @@ export const rawUpgrades = [
|
|||
id: "coin_magnet",
|
||||
name: "Coins magnet",
|
||||
max: 3,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl == 1 ? `Puck attracts coins.` : `Stronger effect on the coins`,
|
||||
|
||||
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.
|
||||
|
@ -161,7 +161,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "+1 ball",
|
||||
max: 6,
|
||||
help: (lvl) => `Start every levels with ${lvl + 1} balls.`,
|
||||
help: (lvl: number) => `Start every levels with ${lvl + 1} balls.`,
|
||||
fullHelp: `As soon as you drop the ball in Breakout 71, you loose. With this perk, you get two balls, and so you can afford to lose one.
|
||||
The lost balls come back on the next level or whenever you use one of your extra lives, if you picked that perk. Having more than one balls makes
|
||||
some further perks available, and of course clears the level faster.`,
|
||||
|
@ -173,7 +173,7 @@ export const rawUpgrades = [
|
|||
id: "smaller_puck",
|
||||
name: "Smaller puck",
|
||||
max: 2,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl == 1
|
||||
? `Also gives +5 base combo.`
|
||||
: `Even smaller puck and higher base combo`,
|
||||
|
@ -187,7 +187,8 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Piercing",
|
||||
max: 3,
|
||||
help: (lvl) => `Ball pierces ${3 * lvl} bricks after a puck bounce.`,
|
||||
help: (lvl: number) =>
|
||||
`Ball pierces ${3 * lvl} bricks after a puck bounce.`,
|
||||
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.
|
||||
After that, it will bounce on the 4th brick, and you'll need to touch the puck to reset the counter. This combines particularly well with Sapper. `,
|
||||
},
|
||||
|
@ -198,7 +199,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Picky eater",
|
||||
max: 1,
|
||||
help: (lvl) => `More coins if you break bricks color by color.`,
|
||||
help: (lvl: number) => `More coins if you break bricks color by color.`,
|
||||
|
||||
fullHelp: `Whenever you break a brick the same color as your ball, your combo increases by one.
|
||||
If it's a different color, the ball takes that new color, but the combo resets.
|
||||
|
@ -215,7 +216,7 @@ export const rawUpgrades = [
|
|||
id: "metamorphosis",
|
||||
name: "Stain",
|
||||
max: 1,
|
||||
help: (lvl) => `Coins color the bricks they touch.`,
|
||||
help: (lvl: number) => `Coins color the bricks they touch.`,
|
||||
|
||||
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".
|
||||
|
@ -242,7 +243,8 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Hot start",
|
||||
max: 3,
|
||||
help: (lvl) => `Start at combo ${lvl * 15 + 1}, -${lvl} combo per second`,
|
||||
help: (lvl: number) =>
|
||||
`Start at combo ${lvl * 15 + 1}, -${lvl} combo per second`,
|
||||
fullHelp: `At the start of every level, your combo will start at +15 points, but then every second it will be decreased by one. This 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. The 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. Every time you take the perk again, the effect will be more dramatic.
|
||||
|
@ -255,7 +257,7 @@ export const rawUpgrades = [
|
|||
giftable: true,
|
||||
name: "Sapper",
|
||||
max: 7,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1
|
||||
? "The first brick broken becomes a bomb."
|
||||
: `The first ${lvl} bricks broken become bombs.`,
|
||||
|
@ -272,7 +274,7 @@ export const rawUpgrades = [
|
|||
max: 1,
|
||||
giftable: false,
|
||||
|
||||
help: (lvl) => "Bigger explosions",
|
||||
help: (lvl: number) => "Bigger explosions",
|
||||
|
||||
fullHelp: `The default explosion clears a 3x3 square, with this it becomes a 5x5 square, and the blowback on the coins is also significantly stronger. `,
|
||||
},
|
||||
|
@ -283,7 +285,7 @@ export const rawUpgrades = [
|
|||
id: "extra_levels",
|
||||
name: "+1 level",
|
||||
max: 3,
|
||||
help: (lvl) => `Play ${lvl + 7} levels instead of 7`,
|
||||
help: (lvl: number) => `Play ${lvl + 7} levels instead of 7`,
|
||||
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.
|
||||
Each 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.`,
|
||||
},
|
||||
|
@ -294,7 +296,7 @@ export const rawUpgrades = [
|
|||
id: "pierce_color",
|
||||
name: "Color pierce",
|
||||
max: 1,
|
||||
help: (lvl) => `Balls pierce bricks of their color.`,
|
||||
help: (lvl: number) => `Balls pierce bricks of their color.`,
|
||||
fullHelp: `Whenever a ball hits a brick of the same color, it will just go through unimpeded.
|
||||
Once it reaches a brick of a different color, it will break it, take its color and bounce.`,
|
||||
},
|
||||
|
@ -305,7 +307,7 @@ export const rawUpgrades = [
|
|||
id: "soft_reset",
|
||||
name: "Soft reset",
|
||||
max: 2,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
`Combo grows ${lvl > 1 ? "even" : ""} slower but resets less.`,
|
||||
fullHelp: `The combo normally climbs every time you break a brick. This will sometimes cancel that climb, but also limit the impact of a combo reset.`,
|
||||
},
|
||||
|
@ -316,7 +318,7 @@ export const rawUpgrades = [
|
|||
id: "ball_repulse_ball",
|
||||
name: "Personal space",
|
||||
max: 3,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1 ? `Balls repulse balls.` : "Stronger repulsion force",
|
||||
|
||||
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.
|
||||
|
@ -329,7 +331,7 @@ export const rawUpgrades = [
|
|||
id: "ball_attract_ball",
|
||||
name: "Gravity",
|
||||
max: 3,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1 ? `Balls attract balls.` : "Stronger attraction force",
|
||||
|
||||
fullHelp: `Balls that are more than half a screen width away will start attracting each other. The attraction force is stronger when they are furthest away from each other.
|
||||
|
@ -341,8 +343,8 @@ export const rawUpgrades = [
|
|||
giftable: false,
|
||||
id: "puck_repulse_ball",
|
||||
name: "Soft landing",
|
||||
max: 3,
|
||||
help: (lvl) =>
|
||||
max: 2,
|
||||
help: (lvl: number) =>
|
||||
lvl === 1 ? `Puck repulses balls.` : "Stronger repulsion force",
|
||||
fullHelp: `When a ball gets close to the puck, it will start slowing down, and even potentially bouncing without touching the puck.`,
|
||||
},
|
||||
|
@ -353,7 +355,7 @@ export const rawUpgrades = [
|
|||
id: "wind",
|
||||
name: "Wind",
|
||||
max: 3,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1 ? `Puck position creates wind.` : "Stronger wind force",
|
||||
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 leftwise, if it's on the right of the screen
|
||||
then it will blow rightwise. The wind affects both the balls and coins.`,
|
||||
|
@ -365,7 +367,7 @@ export const rawUpgrades = [
|
|||
id: "sturdy_bricks",
|
||||
name: "Sturdy bricks",
|
||||
max: 4,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1
|
||||
? `Bricks sometimes resist hits but drop more coins.`
|
||||
: "Bricks resist more and drop more coins",
|
||||
|
@ -380,7 +382,7 @@ export const rawUpgrades = [
|
|||
id: "respawn",
|
||||
name: "Respawn",
|
||||
max: 4,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1
|
||||
? `The first brick hit of two+ will respawn.`
|
||||
: "More bricks can respawn",
|
||||
|
@ -395,7 +397,7 @@ export const rawUpgrades = [
|
|||
id: "one_more_choice",
|
||||
name: "+1 choice until run end",
|
||||
max: 3,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1
|
||||
? `Further level ups will offer one more option in the list.`
|
||||
: "Even more options",
|
||||
|
@ -410,7 +412,7 @@ export const rawUpgrades = [
|
|||
id: "instant_upgrade",
|
||||
name: "+2 upgrades now",
|
||||
max: 2,
|
||||
help: (lvl) =>
|
||||
help: (lvl: number) =>
|
||||
lvl === 1 ? `-1 choice until run end.` : "Even fewer options",
|
||||
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.`,
|
||||
},
|
||||
|
|
|
@ -161,7 +161,6 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
.popup button.close-modale {
|
||||
color: white;
|
||||
position: absolute;
|
||||
|
|
6
src/types.d.ts
vendored
6
src/types.d.ts
vendored
|
@ -133,7 +133,11 @@ export type RunStats = {
|
|||
max_level: number;
|
||||
};
|
||||
|
||||
export type PerksMap = Partial<{
|
||||
[k in PerkId]: number;
|
||||
}>;
|
||||
|
||||
export type RunHistoryItem = RunStats & {
|
||||
perks?: { [k in PerkId]: number };
|
||||
perks?: PerksMap;
|
||||
appVersion?: string;
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
"29020191"
|
||||
"29022953"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue