mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 13:06:15 -04:00
Build 29061838
This commit is contained in:
parent
99db15d776
commit
51d112c942
12 changed files with 123 additions and 52 deletions
|
@ -594,7 +594,12 @@ export function addToScore(gameState: GameState, coin: Coin) {
|
|||
schedulGameSound(gameState, "coinCatch", coin.x, 1);
|
||||
gameState.runStatistics.score += coin.points;
|
||||
if (gameState.perks.asceticism) {
|
||||
resetCombo(gameState, coin.x, coin.y);
|
||||
decreaseCombo(
|
||||
gameState,
|
||||
gameState.perks.asceticism * 3 * coin.points,
|
||||
coin.x,
|
||||
coin.y,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1133,14 +1138,19 @@ export function gameStateTick(
|
|||
gameState.puckHeight * (coin.points ? 1 : -1)
|
||||
) {
|
||||
addToScore(gameState, coin);
|
||||
|
||||
destroy(gameState.coins, coinIndex);
|
||||
} else if (coin.y > gameState.canvasHeight + coinRadius) {
|
||||
} else if (coin.y > gameState.canvasHeight + coinRadius * 10) {
|
||||
gameState.levelLostCoins += coin.points;
|
||||
destroy(gameState.coins, coinIndex);
|
||||
if (gameState.perks.compound_interest) {
|
||||
resetCombo(gameState, coin.x, gameState.gameZoneHeight - 20);
|
||||
}
|
||||
if (
|
||||
gameState.combo < gameState.perks.fountain_toss * 30 &&
|
||||
Math.random() < (1 / gameState.combo) * gameState.perks.fountain_toss
|
||||
) {
|
||||
increaseCombo(gameState, 1, coin.x, gameState.gameZoneHeight - 20);
|
||||
}
|
||||
} else if (
|
||||
gameState.perks.unbounded &&
|
||||
(coin.x < -gameState.gameZoneWidth / 2 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue