mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 21:16:14 -04:00
Build 29080170
This commit is contained in:
parent
21fa5f105e
commit
530e94f704
9 changed files with 41 additions and 31 deletions
|
@ -1,5 +1,5 @@
|
|||
// The version of the cache.
|
||||
const VERSION = "29079818";
|
||||
const VERSION = "29080170";
|
||||
|
||||
// The name of the cache
|
||||
const CACHE_NAME = `breakout-71-${VERSION}`;
|
||||
|
|
|
@ -1 +1 @@
|
|||
"29079818"
|
||||
"29080170"
|
||||
|
|
|
@ -18,7 +18,8 @@ import {
|
|||
currentLevelInfo,
|
||||
distance2,
|
||||
distanceBetween,
|
||||
getClosestBall, getCoinRenderColor,
|
||||
getClosestBall,
|
||||
getCoinRenderColor,
|
||||
getMajorityValue,
|
||||
getPossibleUpgrades,
|
||||
getRowColIndex,
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
import {Ball, Coin, GameState, Level, PerkId, PerksMap, RunHistoryItem, UpgradeLike,} from "./types";
|
||||
import {icons, upgrades} from "./loadGameData";
|
||||
import {t} from "./i18n/i18n";
|
||||
import {clamp} from "./pure_functions";
|
||||
import {rawUpgrades} from "./upgrades";
|
||||
import {hashCode} from "./getLevelBackground";
|
||||
import {getTotalScore} from "./settings";
|
||||
import {isOptionOn} from "./options";
|
||||
import {
|
||||
Ball,
|
||||
Coin,
|
||||
GameState,
|
||||
Level,
|
||||
PerkId,
|
||||
PerksMap,
|
||||
RunHistoryItem,
|
||||
UpgradeLike,
|
||||
} from "./types";
|
||||
import { icons, upgrades } from "./loadGameData";
|
||||
import { t } from "./i18n/i18n";
|
||||
import { clamp } from "./pure_functions";
|
||||
import { rawUpgrades } from "./upgrades";
|
||||
import { hashCode } from "./getLevelBackground";
|
||||
import { getTotalScore } from "./settings";
|
||||
import { isOptionOn } from "./options";
|
||||
|
||||
export function describeLevel(level: Level) {
|
||||
let bricks = 0,
|
||||
|
@ -395,12 +404,12 @@ export function ballTransparency(ball: Ball, gameState: GameState) {
|
|||
}
|
||||
|
||||
export function getCoinRenderColor(gameState: GameState, coin: Coin) {
|
||||
if (
|
||||
gameState.perks.metamorphosis ||
|
||||
isOptionOn("colorful_coins") ||
|
||||
gameState.perks.hypnosis ||
|
||||
gameState.perks.rainbow
|
||||
)
|
||||
return coin.color;
|
||||
return "#ffd300";
|
||||
}
|
||||
if (
|
||||
gameState.perks.metamorphosis ||
|
||||
isOptionOn("colorful_coins") ||
|
||||
gameState.perks.hypnosis ||
|
||||
gameState.perks.rainbow
|
||||
)
|
||||
return coin.color;
|
||||
return "#ffd300";
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ export function monitorLevelsUnlocks(gameState: GameState) {
|
|||
if (unlocked.has(name)) return;
|
||||
// Score not reached yet
|
||||
if (gameState.score < minScore) return;
|
||||
if (! minScore) return;
|
||||
if (!minScore) return;
|
||||
|
||||
if (gameState.score < minScore) return;
|
||||
// We are missing a required perk
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {baseCombo, forEachLiveOne, liveCount} from "./gameStateMutators";
|
||||
import { baseCombo, forEachLiveOne, liveCount } from "./gameStateMutators";
|
||||
import {
|
||||
ballTransparency,
|
||||
brickCenterX,
|
||||
|
@ -12,10 +12,10 @@ import {
|
|||
telekinesisEffectRate,
|
||||
yoyoEffectRate,
|
||||
} from "./game_utils";
|
||||
import {colorString, GameState} from "./types";
|
||||
import {t} from "./i18n/i18n";
|
||||
import {gameState, lastMeasuredFPS, startWork} from "./game";
|
||||
import {isOptionOn} from "./options";
|
||||
import { colorString, GameState } from "./types";
|
||||
import { t } from "./i18n/i18n";
|
||||
import { gameState, lastMeasuredFPS, startWork } from "./game";
|
||||
import { isOptionOn } from "./options";
|
||||
import {
|
||||
catchRateBest,
|
||||
catchRateGood,
|
||||
|
@ -26,7 +26,7 @@ import {
|
|||
wallBouncedBest,
|
||||
wallBouncedGood,
|
||||
} from "./pure_functions";
|
||||
import {getCurrentMaxCoins} from "./settings";
|
||||
import { getCurrentMaxCoins } from "./settings";
|
||||
|
||||
export const gameCanvas = document.getElementById("game") as HTMLCanvasElement;
|
||||
export const ctx = gameCanvas.getContext("2d", {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue