mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 20:46:14 -04:00
Build 29041682
This commit is contained in:
parent
3eca148fb8
commit
760fa5715b
16 changed files with 289 additions and 152 deletions
|
@ -15,6 +15,8 @@ import {
|
|||
brickCenterX,
|
||||
brickCenterY,
|
||||
clamp,
|
||||
countBricksAbove,
|
||||
countBricksBelow,
|
||||
currentLevelInfo,
|
||||
distance2,
|
||||
distanceBetween,
|
||||
|
@ -367,6 +369,17 @@ export function explodeBrick(
|
|||
gameState.perks.zen +
|
||||
gameState.perks.unbounded;
|
||||
|
||||
if (gameState.perks.reach) {
|
||||
if (
|
||||
countBricksAbove(gameState, index) &&
|
||||
!countBricksBelow(gameState, index)
|
||||
) {
|
||||
resetCombo(gameState, x, y);
|
||||
} else {
|
||||
gameState.combo += gameState.perks.reach;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isExplosion) {
|
||||
// color change
|
||||
if (
|
||||
|
@ -503,7 +516,7 @@ export async function setLevel(gameState: GameState, l: number) {
|
|||
// Reset combo silently
|
||||
const finalCombo = gameState.combo;
|
||||
gameState.combo = baseCombo(gameState);
|
||||
if (!gameState.perks.shunt) {
|
||||
if (gameState.perks.shunt) {
|
||||
gameState.combo += Math.round(
|
||||
Math.max(
|
||||
0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue