mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-20 04:05:06 -04:00
Build 29073274
This commit is contained in:
parent
a8e9fc6cb6
commit
613b7cce58
13 changed files with 2680 additions and 2648 deletions
|
@ -29,8 +29,8 @@ android {
|
|||
applicationId = "me.lecaro.breakout"
|
||||
minSdk = 21
|
||||
targetSdk = 34
|
||||
versionCode = 29072514
|
||||
versionName = "29072514"
|
||||
versionCode = 29073274
|
||||
versionName = "29073274"
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
useSupportLibrary = true
|
||||
|
|
File diff suppressed because one or more lines are too long
7
dist/index.html
vendored
7
dist/index.html
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
// The version of the cache.
|
||||
const VERSION = "29072514";
|
||||
const VERSION = "29073274";
|
||||
|
||||
// The name of the cache
|
||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||
|
|
|
@ -16,7 +16,7 @@ import {
|
|||
sumOfValues,
|
||||
} from "./game_utils";
|
||||
import { getHistory } from "./gameOver";
|
||||
import {noCreative} from "./upgrades";
|
||||
import { noCreative } from "./upgrades";
|
||||
|
||||
export function creativeMode(gameState: GameState) {
|
||||
return {
|
||||
|
|
|
@ -1 +1 @@
|
|||
"29072514"
|
||||
"29073274"
|
||||
|
|
69
src/game.ts
69
src/game.ts
|
@ -134,15 +134,15 @@ export function pause(playerAskedForPause: boolean) {
|
|||
}
|
||||
}
|
||||
|
||||
export const fitSize = (gameState:GameState) => {
|
||||
if(!gameState) throw new Error("Missign game state")
|
||||
export const fitSize = (gameState: GameState) => {
|
||||
if (!gameState) throw new Error("Missign game state");
|
||||
const past_off = gameState.offsetXRoundedDown,
|
||||
past_width = gameState.gameZoneWidthRoundedUp,
|
||||
past_heigh = gameState.gameZoneHeight;
|
||||
|
||||
const width= window.innerWidth, height=window.innerHeight
|
||||
const width = window.innerWidth,
|
||||
height = window.innerHeight;
|
||||
|
||||
console.log('fitSize',width, height)
|
||||
gameState.canvasWidth = width;
|
||||
gameState.canvasHeight = height;
|
||||
gameCanvas.width = width;
|
||||
|
@ -153,21 +153,36 @@ export const fitSize = (gameState:GameState) => {
|
|||
haloCanvas.height = height / haloScale;
|
||||
|
||||
gameState.gameZoneHeight = isOptionOn("mobile-mode")
|
||||
? Math.floor(height * .80) : height;
|
||||
? Math.floor(height * 0.8)
|
||||
: height;
|
||||
|
||||
const baseWidth = Math.round(
|
||||
Math.min(gameState.canvasWidth , gameState.gameZoneHeight * (0.73 )* (gameState.gridSize+gameState.perks.unbounded*2 ) / gameState.gridSize),
|
||||
Math.min(
|
||||
gameState.canvasWidth,
|
||||
(gameState.gameZoneHeight *
|
||||
0.73 *
|
||||
(gameState.gridSize + gameState.perks.unbounded * 2)) /
|
||||
gameState.gridSize,
|
||||
),
|
||||
);
|
||||
|
||||
gameState.brickWidth = Math.floor(baseWidth / (gameState.gridSize+gameState.perks.unbounded*2) / 2) * 2;
|
||||
gameState.brickWidth =
|
||||
Math.floor(
|
||||
baseWidth / (gameState.gridSize + gameState.perks.unbounded * 2) / 2,
|
||||
) * 2;
|
||||
|
||||
gameState.gameZoneWidth = gameState.brickWidth * gameState.gridSize;
|
||||
gameState.offsetX = Math.floor(
|
||||
(gameState.canvasWidth - gameState.gameZoneWidth) / 2,
|
||||
);
|
||||
// Space between left side and border
|
||||
gameState.offsetXRoundedDown = gameState.offsetX - gameState.perks.unbounded*gameState.brickWidth;
|
||||
if (gameState.offsetX < gameState.ballSize+gameState.perks.unbounded*2*gameState.brickWidth) gameState.offsetXRoundedDown = 0;
|
||||
gameState.offsetXRoundedDown =
|
||||
gameState.offsetX - gameState.perks.unbounded * gameState.brickWidth;
|
||||
if (
|
||||
gameState.offsetX <
|
||||
gameState.ballSize + gameState.perks.unbounded * 2 * gameState.brickWidth
|
||||
)
|
||||
gameState.offsetXRoundedDown = 0;
|
||||
gameState.gameZoneWidthRoundedUp = width - 2 * gameState.offsetXRoundedDown;
|
||||
backgroundCanvas.title = "resized";
|
||||
// Ensure puck stays within bounds
|
||||
|
@ -201,8 +216,8 @@ export const fitSize = (gameState:GameState) => {
|
|||
`${window.innerHeight * 0.01}px`,
|
||||
);
|
||||
};
|
||||
window.addEventListener("resize", ()=>fitSize(gameState));
|
||||
window.addEventListener("fullscreenchange", ()=>fitSize(gameState));
|
||||
window.addEventListener("resize", () => fitSize(gameState));
|
||||
window.addEventListener("fullscreenchange", () => fitSize(gameState));
|
||||
|
||||
setInterval(() => {
|
||||
// Sometimes, the page changes size without triggering the event (when switching to fullscreen, closing debug panel...)
|
||||
|
@ -417,8 +432,8 @@ export function tick() {
|
|||
normalizeGameState(gameState);
|
||||
|
||||
if (gameState.running) {
|
||||
gameState.levelTime += timeDeltaMs*frames;
|
||||
gameState.runStatistics.runTime += timeDeltaMs*frames;
|
||||
gameState.levelTime += timeDeltaMs * frames;
|
||||
gameState.runStatistics.runTime += timeDeltaMs * frames;
|
||||
gameStateTick(gameState, frames);
|
||||
}
|
||||
if (gameState.running || gameState.needsRender) {
|
||||
|
@ -717,10 +732,7 @@ async function openSettingsMenu() {
|
|||
} catch (e: any) {
|
||||
await asyncAlert({
|
||||
title: t("settings.save_file_error"),
|
||||
content: [
|
||||
e.message,
|
||||
{ text: t("settings.save_file_loaded_ok") },
|
||||
],
|
||||
content: [e.message, { text: t("settings.save_file_loaded_ok") }],
|
||||
});
|
||||
}
|
||||
input.value = "";
|
||||
|
@ -986,17 +998,20 @@ export function restart(params: RunParams) {
|
|||
setLevel(gameState, 0);
|
||||
}
|
||||
|
||||
restart(window.location.search.includes('stress')?{
|
||||
|
||||
perks:{
|
||||
bricks_attract_ball:2,
|
||||
superhot:1,
|
||||
bricks_attract_coins:3,
|
||||
hot_start:3,
|
||||
pierce:3,
|
||||
rainbow:3
|
||||
restart(
|
||||
window.location.search.includes("stress")
|
||||
? {
|
||||
perks: {
|
||||
bricks_attract_ball: 2,
|
||||
superhot: 1,
|
||||
bricks_attract_coins: 3,
|
||||
hot_start: 3,
|
||||
pierce: 3,
|
||||
rainbow: 3,
|
||||
},
|
||||
}
|
||||
}:{});
|
||||
: {},
|
||||
);
|
||||
|
||||
tick();
|
||||
setupTooltips();
|
||||
|
|
|
@ -30,17 +30,25 @@ import {
|
|||
telekinesisEffectRate,
|
||||
yoyoEffectRate,
|
||||
} from "./game_utils";
|
||||
import {t} from "./i18n/i18n";
|
||||
import {icons} from "./loadGameData";
|
||||
import { t } from "./i18n/i18n";
|
||||
import { icons } from "./loadGameData";
|
||||
|
||||
import {getCurrentMaxCoins, getCurrentMaxParticles} from "./settings";
|
||||
import {background} from "./render";
|
||||
import {gameOver} from "./gameOver";
|
||||
import {brickIndex, fitSize, gameState, hasBrick, hitsSomething, openUpgradesPicker, pause,} from "./game";
|
||||
import {stopRecording} from "./recording";
|
||||
import {isOptionOn} from "./options";
|
||||
import {clamp, comboKeepingRate} from "./pure_functions";
|
||||
import {addToTotalScore} from "./addToTotalScore";
|
||||
import { getCurrentMaxCoins, getCurrentMaxParticles } from "./settings";
|
||||
import { background } from "./render";
|
||||
import { gameOver } from "./gameOver";
|
||||
import {
|
||||
brickIndex,
|
||||
fitSize,
|
||||
gameState,
|
||||
hasBrick,
|
||||
hitsSomething,
|
||||
openUpgradesPicker,
|
||||
pause,
|
||||
} from "./game";
|
||||
import { stopRecording } from "./recording";
|
||||
import { isOptionOn } from "./options";
|
||||
import { clamp, comboKeepingRate } from "./pure_functions";
|
||||
import { addToTotalScore } from "./addToTotalScore";
|
||||
|
||||
export function setMousePos(gameState: GameState, x: number) {
|
||||
gameState.puckPosition = x;
|
||||
|
@ -128,13 +136,13 @@ export function normalizeGameState(gameState: GameState) {
|
|||
),
|
||||
);
|
||||
|
||||
const corner =
|
||||
(gameState.levelTime
|
||||
? gameState.perks.corner_shot * gameState.puckWidth
|
||||
: 0) -
|
||||
gameState.perks.unbounded * gameState.brickWidth;
|
||||
|
||||
const corner = (gameState.levelTime ? gameState.perks.corner_shot * gameState.puckWidth : 0) - gameState.perks.unbounded * gameState.brickWidth;
|
||||
|
||||
let minX =
|
||||
gameState.offsetXRoundedDown +
|
||||
gameState.puckWidth / 2 -
|
||||
corner;
|
||||
let minX = gameState.offsetXRoundedDown + gameState.puckWidth / 2 - corner;
|
||||
|
||||
let maxX =
|
||||
gameState.offsetXRoundedDown +
|
||||
|
@ -418,7 +426,7 @@ export function explodeBrick(
|
|||
while (coinsToSpawn > 0) {
|
||||
const points = Math.min(pointsPerCoin, coinsToSpawn);
|
||||
if (points < 0 || isNaN(points)) {
|
||||
console.error({points});
|
||||
console.error({ points });
|
||||
debugger;
|
||||
}
|
||||
|
||||
|
@ -838,7 +846,7 @@ 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 { x, y, previousX, previousY } = coin;
|
||||
|
||||
const vhit = hitsSomething(previousX, y, radius);
|
||||
const hhit = hitsSomething(x, previousY, radius);
|
||||
|
@ -904,9 +912,7 @@ export function bordersHitCheck(
|
|||
let vhit = 0,
|
||||
hhit = 0;
|
||||
|
||||
if (
|
||||
coin.x < gameState.offsetXRoundedDown + radius
|
||||
) {
|
||||
if (coin.x < gameState.offsetXRoundedDown + radius) {
|
||||
coin.x =
|
||||
gameState.offsetXRoundedDown +
|
||||
radius +
|
||||
|
@ -919,9 +925,7 @@ export function bordersHitCheck(
|
|||
coin.vy *= -1;
|
||||
vhit = 1;
|
||||
}
|
||||
if (
|
||||
coin.x > gameState.canvasWidth - gameState.offsetXRoundedDown - radius
|
||||
) {
|
||||
if (coin.x > gameState.canvasWidth - gameState.offsetXRoundedDown - radius) {
|
||||
coin.x =
|
||||
gameState.canvasWidth -
|
||||
gameState.offsetXRoundedDown -
|
||||
|
@ -1019,7 +1023,7 @@ export function gameStateTick(
|
|||
} else {
|
||||
gameOver(
|
||||
t("gameOver.win.title"),
|
||||
t("gameOver.win.summary", {score: gameState.score}),
|
||||
t("gameOver.win.summary", { score: gameState.score }),
|
||||
);
|
||||
}
|
||||
} else if (gameState.running || gameState.levelTime) {
|
||||
|
@ -1093,7 +1097,13 @@ export function gameStateTick(
|
|||
}
|
||||
|
||||
if (gameState.perks.bricks_attract_coins) {
|
||||
goToNearestBrick(gameState, coin, gameState.perks.bricks_attract_coins * frames, 2,false)
|
||||
goToNearestBrick(
|
||||
gameState,
|
||||
coin,
|
||||
gameState.perks.bricks_attract_coins * frames,
|
||||
2,
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
const ratio =
|
||||
|
@ -1407,7 +1417,7 @@ export function gameStateTick(
|
|||
setBrick(gameState, r.index, r.color);
|
||||
destroy(gameState.respawns, ri);
|
||||
} else {
|
||||
const {index, color} = r;
|
||||
const { index, color } = r;
|
||||
const vertical = Math.random() > 0.5;
|
||||
const dx = Math.random() > 0.5 ? 1 : -1;
|
||||
const dy = Math.random() > 0.5 ? 1 : -1;
|
||||
|
@ -1473,8 +1483,13 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
|
|||
}
|
||||
|
||||
if (ball.hitSinceBounce < gameState.perks.bricks_attract_ball * 3) {
|
||||
goToNearestBrick(gameState, ball, gameState.perks.bricks_attract_ball * frames * 0.2,
|
||||
2 + gameState.perks.bricks_attract_ball,Math.random()<0.5*frames)
|
||||
goToNearestBrick(
|
||||
gameState,
|
||||
ball,
|
||||
gameState.perks.bricks_attract_ball * frames * 0.2,
|
||||
2 + gameState.perks.bricks_attract_ball,
|
||||
Math.random() < 0.5 * frames,
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
|
@ -1637,20 +1652,21 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
|
|||
}
|
||||
|
||||
if (
|
||||
gameState.running && (ball.y > gameState.gameZoneHeight + gameState.ballSize / 2)
|
||||
gameState.running &&
|
||||
ball.y > gameState.gameZoneHeight + gameState.ballSize / 2
|
||||
) {
|
||||
ball.destroyed = true;
|
||||
gameState.runStatistics.balls_lost++;
|
||||
if (!gameState.balls.find((b) => !b.destroyed)) {
|
||||
gameOver(
|
||||
t("gameOver.lost.title"),
|
||||
t("gameOver.lost.summary", {score: gameState.score}),
|
||||
t("gameOver.lost.summary", { score: gameState.score }),
|
||||
);
|
||||
}
|
||||
}
|
||||
const radius = gameState.ballSize / 2;
|
||||
// Make ball/coin bonce, and return bricks that were hit
|
||||
const {x, y, previousX, previousY} = ball;
|
||||
const { x, y, previousX, previousY } = ball;
|
||||
|
||||
const vhit = hitsSomething(previousX, y, radius);
|
||||
const hhit = hitsSomething(x, previousY, radius);
|
||||
|
@ -1919,7 +1935,7 @@ export function append<T>(
|
|||
makeItem(where.list[where.indexMin]);
|
||||
where.indexMin++;
|
||||
} else {
|
||||
const p = {destroyed: false};
|
||||
const p = { destroyed: false };
|
||||
makeItem(p);
|
||||
where.list.push(p);
|
||||
}
|
||||
|
@ -1961,43 +1977,53 @@ export function forEachLiveOne<T>(
|
|||
});
|
||||
}
|
||||
|
||||
function goToNearestBrick(gameState: GameState, coin: Ball | Coin, strength, size = 2, particle=false) {
|
||||
function goToNearestBrick(
|
||||
gameState: GameState,
|
||||
coin: Ball | Coin,
|
||||
strength,
|
||||
size = 2,
|
||||
particle = false,
|
||||
) {
|
||||
const row = Math.floor(coin.y / gameState.brickWidth);
|
||||
const col = Math.floor(
|
||||
(coin.x - gameState.offsetX) / gameState.brickWidth,
|
||||
);
|
||||
let vx = 0, vy = 0
|
||||
const col = Math.floor((coin.x - gameState.offsetX) / gameState.brickWidth);
|
||||
let vx = 0,
|
||||
vy = 0;
|
||||
for (let dcol = -size; dcol < size; dcol++) {
|
||||
for (let drow = -size; drow < size; drow++) {
|
||||
const index = getRowColIndex(gameState, row + drow, col + dcol);
|
||||
if (gameState.bricks[index]) {
|
||||
const dx =
|
||||
brickCenterX(gameState, index) +
|
||||
clamp(-dcol, -1, 1) * gameState.brickWidth / 2 -
|
||||
(clamp(-dcol, -1, 1) * gameState.brickWidth) / 2 -
|
||||
coin.x;
|
||||
const dy =
|
||||
brickCenterY(gameState, index) +
|
||||
clamp(-drow, -1, 1) * gameState.brickWidth / 2 -
|
||||
(clamp(-drow, -1, 1) * gameState.brickWidth) / 2 -
|
||||
coin.y;
|
||||
const d2 = dx * dx + dy * dy;
|
||||
vx += (dx / d2) * 20
|
||||
vy += (dy / d2) * 20
|
||||
|
||||
vx += (dx / d2) * 20;
|
||||
vy += (dy / d2) * 20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
coin.vx += vx * strength
|
||||
coin.vy += vy * strength
|
||||
const s2 = coin.vx * coin.vx + coin.vy * coin.vy
|
||||
coin.vx += vx * strength;
|
||||
coin.vy += vy * strength;
|
||||
const s2 = coin.vx * coin.vx + coin.vy * coin.vy;
|
||||
if (s2 > gameState.baseSpeed * gameState.baseSpeed * 2) {
|
||||
coin.vx *= 0.95
|
||||
coin.vy *= 0.95
|
||||
coin.vx *= 0.95;
|
||||
coin.vy *= 0.95;
|
||||
}
|
||||
|
||||
if((vx ||vy) && particle){
|
||||
makeParticle(gameState, coin.x, coin.y, -vx*2,-vy*2, rainbowColor(), true)
|
||||
if ((vx || vy) && particle) {
|
||||
makeParticle(
|
||||
gameState,
|
||||
coin.x,
|
||||
coin.y,
|
||||
-vx * 2,
|
||||
-vy * 2,
|
||||
rainbowColor(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ export function getNearestUnlockHTML(gameState: GameState) {
|
|||
});
|
||||
|
||||
if (!firstUnlockable) return "";
|
||||
let missingPoints = Math.max(0,firstUnlockable.minScore - gameState.score);
|
||||
let missingPoints = Math.max(0, firstUnlockable.minScore - gameState.score);
|
||||
let missingUpgrades = firstUnlockable.missing.map((u) => u.name).join(", ");
|
||||
|
||||
const title =
|
||||
|
|
|
@ -447,15 +447,11 @@ export function render(gameState: GameState) {
|
|||
ctx.globalAlpha = 1;
|
||||
|
||||
let redLeftSide =
|
||||
hasCombo &&
|
||||
(gameState.perks.left_is_lava || gameState.perks.trampoline);
|
||||
hasCombo && (gameState.perks.left_is_lava || gameState.perks.trampoline);
|
||||
let redRightSide =
|
||||
hasCombo &&
|
||||
(gameState.perks.right_is_lava || gameState.perks.trampoline);
|
||||
hasCombo && (gameState.perks.right_is_lava || gameState.perks.trampoline);
|
||||
let redTop =
|
||||
hasCombo &&
|
||||
(gameState.perks.top_is_lava || gameState.perks.trampoline);
|
||||
|
||||
hasCombo && (gameState.perks.top_is_lava || gameState.perks.trampoline);
|
||||
|
||||
if (gameState.offsetXRoundedDown) {
|
||||
// draw outside of gaming area to avoid capturing borders in recordings
|
||||
|
@ -466,7 +462,8 @@ export function render(gameState: GameState) {
|
|||
gameState.offsetXRoundedDown - 1,
|
||||
0,
|
||||
gameState.offsetXRoundedDown - 1,
|
||||
height, 1,
|
||||
height,
|
||||
1,
|
||||
);
|
||||
|
||||
drawStraightLine(
|
||||
|
|
|
@ -4,7 +4,7 @@ import { t } from "./i18n/i18n";
|
|||
import { icons, upgrades } from "./loadGameData";
|
||||
import { getSettingValue, getTotalScore, setSettingValue } from "./settings";
|
||||
import { isOptionOn } from "./options";
|
||||
import {notStartingPerk} from "./upgrades";
|
||||
import { notStartingPerk } from "./upgrades";
|
||||
|
||||
export function startingPerkMenuButton() {
|
||||
return {
|
||||
|
@ -27,8 +27,7 @@ export function isBlackListedForStart(u: Upgrade) {
|
|||
}
|
||||
export function isStartingPerk(u: Upgrade): boolean {
|
||||
return (
|
||||
!isBlackListedForStart(u) &&
|
||||
getSettingValue("start_with_" + u.id, u.gift)
|
||||
!isBlackListedForStart(u) && getSettingValue("start_with_" + u.id, u.gift)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import {t} from "./i18n/i18n";
|
||||
|
||||
import {comboKeepingRate} from "./pure_functions";
|
||||
import {PerkId} from "./types";
|
||||
import { t } from "./i18n/i18n";
|
||||
|
||||
import { comboKeepingRate } from "./pure_functions";
|
||||
import { PerkId } from "./types";
|
||||
|
||||
// Those perks are excluded from creative mode
|
||||
export const noCreative: PerkId[] = [
|
||||
|
@ -12,12 +11,8 @@ export const noCreative: PerkId[] = [
|
|||
"instant_upgrade",
|
||||
];
|
||||
|
||||
|
||||
// Those perks are excluded from the starting perks list
|
||||
export const notStartingPerk: PerkId[] = [
|
||||
"instant_upgrade",
|
||||
];
|
||||
|
||||
export const notStartingPerk: PerkId[] = ["instant_upgrade"];
|
||||
|
||||
export const rawUpgrades = [
|
||||
{
|
||||
|
@ -31,7 +26,7 @@ export const rawUpgrades = [
|
|||
help: (lvl: number) =>
|
||||
lvl === 1
|
||||
? t("upgrades.extra_life.tooltip")
|
||||
: t("upgrades.extra_life.help_plural", {lvl}),
|
||||
: t("upgrades.extra_life.help_plural", { lvl }),
|
||||
fullHelp: t("upgrades.extra_life.verbose_description"),
|
||||
},
|
||||
|
||||
|
@ -44,7 +39,7 @@ export const rawUpgrades = [
|
|||
max: 7,
|
||||
name: t("upgrades.base_combo.name"),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.base_combo.tooltip", {coins: 1 + lvl * 3}),
|
||||
t("upgrades.base_combo.tooltip", { coins: 1 + lvl * 3 }),
|
||||
fullHelp: t("upgrades.base_combo.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -55,7 +50,7 @@ export const rawUpgrades = [
|
|||
id: "slow_down",
|
||||
max: 2,
|
||||
name: t("upgrades.slow_down.name"),
|
||||
help: (lvl: number) => t("upgrades.slow_down.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.slow_down.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.slow_down.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -92,7 +87,7 @@ export const rawUpgrades = [
|
|||
help: (lvl: number) =>
|
||||
lvl == 1
|
||||
? t("upgrades.skip_last.tooltip")
|
||||
: t("upgrades.skip_last.help_plural", {lvl}),
|
||||
: t("upgrades.skip_last.help_plural", { lvl }),
|
||||
fullHelp: t("upgrades.skip_last.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -103,7 +98,7 @@ export const rawUpgrades = [
|
|||
|
||||
max: 1,
|
||||
name: t("upgrades.streak_shots.name"),
|
||||
help: (lvl: number) => t("upgrades.streak_shots.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.streak_shots.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.streak_shots.verbose_description"),
|
||||
},
|
||||
|
||||
|
@ -117,7 +112,7 @@ export const rawUpgrades = [
|
|||
max: 1,
|
||||
|
||||
name: t("upgrades.left_is_lava.name"),
|
||||
help: (lvl: number) => t("upgrades.left_is_lava.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.left_is_lava.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.left_is_lava.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -129,7 +124,7 @@ export const rawUpgrades = [
|
|||
|
||||
max: 1,
|
||||
name: t("upgrades.right_is_lava.name"),
|
||||
help: (lvl: number) => t("upgrades.right_is_lava.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.right_is_lava.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.right_is_lava.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -141,7 +136,7 @@ export const rawUpgrades = [
|
|||
|
||||
max: 1,
|
||||
name: t("upgrades.top_is_lava.name"),
|
||||
help: (lvl: number) => t("upgrades.top_is_lava.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.top_is_lava.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.top_is_lava.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -182,7 +177,7 @@ export const rawUpgrades = [
|
|||
|
||||
max: 6,
|
||||
name: t("upgrades.multiball.name"),
|
||||
help: (lvl: number) => t("upgrades.multiball.tooltip", {count: lvl + 1}),
|
||||
help: (lvl: number) => t("upgrades.multiball.tooltip", { count: lvl + 1 }),
|
||||
fullHelp: t("upgrades.multiball.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -208,7 +203,7 @@ export const rawUpgrades = [
|
|||
|
||||
max: 3,
|
||||
name: t("upgrades.pierce.name"),
|
||||
help: (lvl: number) => t("upgrades.pierce.tooltip", {count: 3 * lvl}),
|
||||
help: (lvl: number) => t("upgrades.pierce.tooltip", { count: 3 * lvl }),
|
||||
fullHelp: t("upgrades.pierce.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -220,7 +215,7 @@ export const rawUpgrades = [
|
|||
|
||||
max: 1,
|
||||
name: t("upgrades.picky_eater.name"),
|
||||
help: (lvl: number) => t("upgrades.picky_eater.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.picky_eater.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.picky_eater.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -232,7 +227,7 @@ export const rawUpgrades = [
|
|||
id: "metamorphosis",
|
||||
max: 1,
|
||||
name: t("upgrades.metamorphosis.name"),
|
||||
help: (lvl: number) => t("upgrades.metamorphosis.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.metamorphosis.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.metamorphosis.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -244,7 +239,7 @@ export const rawUpgrades = [
|
|||
|
||||
max: 1,
|
||||
name: t("upgrades.compound_interest.name"),
|
||||
help: (lvl: number) => t("upgrades.compound_interest.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.compound_interest.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.compound_interest.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -274,7 +269,7 @@ export const rawUpgrades = [
|
|||
help: (lvl: number) =>
|
||||
lvl == 1
|
||||
? t("upgrades.sapper.tooltip")
|
||||
: t("upgrades.sapper.help_plural", {lvl}),
|
||||
: t("upgrades.sapper.help_plural", { lvl }),
|
||||
fullHelp: t("upgrades.sapper.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -300,7 +295,7 @@ export const rawUpgrades = [
|
|||
max: 3,
|
||||
name: t("upgrades.extra_levels.name"),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.extra_levels.tooltip", {count: lvl + 7}),
|
||||
t("upgrades.extra_levels.tooltip", { count: lvl + 7 }),
|
||||
fullHelp: t("upgrades.extra_levels.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -312,7 +307,7 @@ export const rawUpgrades = [
|
|||
id: "pierce_color",
|
||||
max: 4,
|
||||
name: t("upgrades.pierce_color.name"),
|
||||
help: (lvl: number) => t("upgrades.pierce_color.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.pierce_color.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.pierce_color.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -396,7 +391,7 @@ export const rawUpgrades = [
|
|||
name: t("upgrades.sturdy_bricks.name"),
|
||||
help: (lvl: number) =>
|
||||
// lvl == 1
|
||||
t("upgrades.sturdy_bricks.tooltip", {lvl, percent: lvl * 50}),
|
||||
t("upgrades.sturdy_bricks.tooltip", { lvl, percent: lvl * 50 }),
|
||||
// ?
|
||||
// : t("upgrades.sturdy_bricks.help_plural"),
|
||||
fullHelp: t("upgrades.sturdy_bricks.verbose_description"),
|
||||
|
@ -425,7 +420,7 @@ export const rawUpgrades = [
|
|||
id: "one_more_choice",
|
||||
max: 3,
|
||||
name: t("upgrades.one_more_choice.name"),
|
||||
help: (lvl: number) => t("upgrades.one_more_choice.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.one_more_choice.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.one_more_choice.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -438,7 +433,7 @@ export const rawUpgrades = [
|
|||
max: 2,
|
||||
adventure: false,
|
||||
name: t("upgrades.instant_upgrade.name"),
|
||||
help: (lvl: number) => t("upgrades.instant_upgrade.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.instant_upgrade.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.instant_upgrade.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -473,7 +468,7 @@ export const rawUpgrades = [
|
|||
id: "asceticism",
|
||||
max: 1,
|
||||
name: t("upgrades.asceticism.name"),
|
||||
help: (lvl: number) => t("upgrades.asceticism.tooltip", {combo: lvl * 3}),
|
||||
help: (lvl: number) => t("upgrades.asceticism.tooltip", { combo: lvl * 3 }),
|
||||
fullHelp: t("upgrades.asceticism.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -485,7 +480,7 @@ export const rawUpgrades = [
|
|||
id: "unbounded",
|
||||
max: 3,
|
||||
name: t("upgrades.unbounded.name"),
|
||||
help: (lvl: number) => t("upgrades.unbounded.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.unbounded.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.unbounded.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -524,7 +519,7 @@ export const rawUpgrades = [
|
|||
id: "nbricks",
|
||||
max: 3,
|
||||
name: t("upgrades.nbricks.name"),
|
||||
help: (lvl: number) => t("upgrades.nbricks.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.nbricks.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.nbricks.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -558,7 +553,7 @@ export const rawUpgrades = [
|
|||
id: "zen",
|
||||
max: 1,
|
||||
name: t("upgrades.zen.name"),
|
||||
help: (lvl: number) => t("upgrades.zen.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.zen.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.zen.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -572,7 +567,7 @@ export const rawUpgrades = [
|
|||
help: (lvl: number) =>
|
||||
lvl == 1
|
||||
? t("upgrades.sacrifice.help_l1")
|
||||
: t("upgrades.sacrifice.help_over", {lvl}),
|
||||
: t("upgrades.sacrifice.help_over", { lvl }),
|
||||
fullHelp: t("upgrades.sacrifice.verbose_description"),
|
||||
},
|
||||
|
||||
|
@ -584,7 +579,7 @@ export const rawUpgrades = [
|
|||
id: "trampoline",
|
||||
max: 1,
|
||||
name: t("upgrades.trampoline.name"),
|
||||
help: (lvl: number) => t("upgrades.trampoline.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.trampoline.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.trampoline.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -596,7 +591,7 @@ export const rawUpgrades = [
|
|||
id: "ghost_coins",
|
||||
max: 3,
|
||||
name: t("upgrades.ghost_coins.name"),
|
||||
help: (lvl: number) => t("upgrades.ghost_coins.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.ghost_coins.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.ghost_coins.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -631,7 +626,7 @@ export const rawUpgrades = [
|
|||
id: "reach",
|
||||
max: 1,
|
||||
name: t("upgrades.reach.name"),
|
||||
help: (lvl: number) => t("upgrades.reach.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.reach.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.reach.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -644,7 +639,7 @@ export const rawUpgrades = [
|
|||
max: 4,
|
||||
name: t("upgrades.passive_income.name"),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.passive_income.tooltip", {time: lvl * 0.25, lvl}),
|
||||
t("upgrades.passive_income.tooltip", { time: lvl * 0.25, lvl }),
|
||||
fullHelp: t("upgrades.passive_income.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -668,7 +663,7 @@ export const rawUpgrades = [
|
|||
max: 3,
|
||||
name: t("upgrades.side_kick.name"),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.side_kick.tooltip", {lvl, loss: lvl * 2}),
|
||||
t("upgrades.side_kick.tooltip", { lvl, loss: lvl * 2 }),
|
||||
fullHelp: t("upgrades.side_kick.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -681,7 +676,7 @@ export const rawUpgrades = [
|
|||
max: 3,
|
||||
name: t("upgrades.side_flip.name"),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.side_flip.tooltip", {lvl, loss: lvl * 2}),
|
||||
t("upgrades.side_flip.tooltip", { lvl, loss: lvl * 2 }),
|
||||
fullHelp: t("upgrades.side_flip.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -715,7 +710,7 @@ export const rawUpgrades = [
|
|||
max: 7,
|
||||
name: t("upgrades.addiction.name"),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.addiction.tooltip", {lvl, delay: (5 / lvl).toFixed(2)}),
|
||||
t("upgrades.addiction.tooltip", { lvl, delay: (5 / lvl).toFixed(2) }),
|
||||
fullHelp: t("upgrades.addiction.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -727,7 +722,7 @@ export const rawUpgrades = [
|
|||
max: 7,
|
||||
name: t("upgrades.fountain_toss.name"),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.fountain_toss.tooltip", {lvl, max: lvl * 30}),
|
||||
t("upgrades.fountain_toss.tooltip", { lvl, max: lvl * 30 }),
|
||||
fullHelp: t("upgrades.fountain_toss.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -738,7 +733,7 @@ export const rawUpgrades = [
|
|||
id: "limitless",
|
||||
max: 1,
|
||||
name: t("upgrades.limitless.name"),
|
||||
help: (lvl: number) => t("upgrades.limitless.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.limitless.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.limitless.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -749,7 +744,7 @@ export const rawUpgrades = [
|
|||
id: "minefield",
|
||||
max: 3,
|
||||
name: t("upgrades.minefield.name"),
|
||||
help: (lvl: number) => t("upgrades.minefield.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.minefield.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.minefield.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -760,7 +755,7 @@ export const rawUpgrades = [
|
|||
id: "trickledown",
|
||||
max: 1,
|
||||
name: t("upgrades.trickledown.name"),
|
||||
help: (lvl: number) => t("upgrades.trickledown.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.trickledown.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.trickledown.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -771,7 +766,7 @@ export const rawUpgrades = [
|
|||
id: "transparency",
|
||||
max: 3,
|
||||
name: t("upgrades.transparency.name"),
|
||||
help: (lvl: number) => t("upgrades.transparency.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.transparency.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.transparency.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -782,7 +777,7 @@ export const rawUpgrades = [
|
|||
id: "superhot",
|
||||
max: 3,
|
||||
name: t("upgrades.superhot.name"),
|
||||
help: (lvl: number) => t("upgrades.superhot.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.superhot.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.superhot.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -793,7 +788,7 @@ export const rawUpgrades = [
|
|||
id: "bricks_attract_coins",
|
||||
max: 3,
|
||||
name: t("upgrades.bricks_attract_coins.name"),
|
||||
help: (lvl: number) => t("upgrades.bricks_attract_coins.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.bricks_attract_coins.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.bricks_attract_coins.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -804,7 +799,7 @@ export const rawUpgrades = [
|
|||
id: "rainbow",
|
||||
max: 7,
|
||||
name: t("upgrades.rainbow.name"),
|
||||
help: (lvl: number) => t("upgrades.rainbow.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.rainbow.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.rainbow.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -815,7 +810,7 @@ export const rawUpgrades = [
|
|||
id: "hypnosis",
|
||||
max: 1,
|
||||
name: t("upgrades.hypnosis.name"),
|
||||
help: (lvl: number) => t("upgrades.hypnosis.tooltip", {lvl}),
|
||||
help: (lvl: number) => t("upgrades.hypnosis.tooltip", { lvl }),
|
||||
fullHelp: t("upgrades.hypnosis.verbose_description"),
|
||||
},
|
||||
{
|
||||
|
@ -825,7 +820,8 @@ export const rawUpgrades = [
|
|||
id: "bricks_attract_ball",
|
||||
max: 3,
|
||||
name: t("upgrades.bricks_attract_ball.name"),
|
||||
help: (lvl: number) => t("upgrades.bricks_attract_ball.tooltip", {count:lvl*3}),
|
||||
help: (lvl: number) =>
|
||||
t("upgrades.bricks_attract_ball.tooltip", { count: lvl * 3 }),
|
||||
fullHelp: t("upgrades.bricks_attract_ball.verbose_description"),
|
||||
},
|
||||
] as const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue