mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 12:36:15 -04:00
Build 29041704
This commit is contained in:
parent
775ca54b49
commit
322e927589
10 changed files with 28 additions and 28 deletions
|
@ -520,7 +520,7 @@ export async function setLevel(gameState: GameState, l: number) {
|
|||
gameState.combo += Math.round(
|
||||
Math.max(
|
||||
0,
|
||||
((finalCombo - gameState.combo) * 25 * gameState.perks.shunt) / 100,
|
||||
((finalCombo - gameState.combo) * 20 * gameState.perks.shunt) / 100,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -1364,16 +1364,16 @@ export function ballTick(gameState: GameState, ball: Ball, delta: number) {
|
|||
ball.hitItem = [];
|
||||
if (!ball.hitSinceBounce) {
|
||||
gameState.runStatistics.misses++;
|
||||
gameState.levelMisses++;
|
||||
if (gameState.perks.forgiving) {
|
||||
const indexes = gameState.bricks
|
||||
.map((b, i) => (b ? i : -1))
|
||||
.filter((i) => i > -1);
|
||||
const pick = sample(indexes);
|
||||
explodeBrick(gameState, pick, ball, false);
|
||||
const loss = Math.floor(
|
||||
(gameState.levelMisses / 10) *
|
||||
(gameState.combo - baseCombo(gameState)),
|
||||
);
|
||||
decreaseCombo(gameState, loss, ball.x, ball.y - gameState.ballSize);
|
||||
} else {
|
||||
resetCombo(gameState, ball.x, ball.y);
|
||||
}
|
||||
gameState.levelMisses++;
|
||||
makeText(
|
||||
gameState,
|
||||
gameState.puckPosition,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue