Build 29088513

This commit is contained in:
Renan LE CARO 2025-04-22 10:33:25 +02:00
parent bf3dac8e8f
commit af65737011
10 changed files with 58 additions and 59 deletions

View file

@ -1565,40 +1565,41 @@ export function gameStateTick(
}
}
if(
gameState.perks.wrap_left &&
gameState.perks.left_is_lava<2 &&
Math.random()*frames > 0.1){
makeParticle(
gameState,
gameState.offsetXRoundedDown,
Math.random() * gameState.gameZoneHeight,
5,
(Math.random() - 0.5) * 10,
"#6262EA",
true,
gameState.coinSize / 2,
100 * (Math.random() + 1),
);
if (
gameState.perks.wrap_left &&
gameState.perks.left_is_lava < 2 &&
Math.random() * frames > 0.1
) {
makeParticle(
gameState,
gameState.offsetXRoundedDown,
Math.random() * gameState.gameZoneHeight,
5,
(Math.random() - 0.5) * 10,
"#6262EA",
true,
gameState.coinSize / 2,
100 * (Math.random() + 1),
);
}
if(
gameState.perks.wrap_right &&
gameState.perks.right_is_lava<2 &&
Math.random()*frames > 0.1){
makeParticle(
gameState,
gameState.offsetXRoundedDown+gameState.gameZoneWidth,
Math.random() * gameState.gameZoneHeight,
-5,
(Math.random() - 0.5) * 10,
"#6262EA",
true,
gameState.coinSize / 2,
100 * (Math.random() + 1),
);
if (
gameState.perks.wrap_right &&
gameState.perks.right_is_lava < 2 &&
Math.random() * frames > 0.1
) {
makeParticle(
gameState,
gameState.offsetXRoundedDown + gameState.gameZoneWidth,
Math.random() * gameState.gameZoneHeight,
-5,
(Math.random() - 0.5) * 10,
"#6262EA",
true,
gameState.coinSize / 2,
100 * (Math.random() + 1),
);
}
// Respawn what's needed, show particles
forEachLiveOne(gameState.respawns, (r, ri) => {
if (gameState.bricks[r.index]) {
@ -1740,7 +1741,7 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
ball.sidesHitsSinceBounce++;
if (ball.sidesHitsSinceBounce <= gameState.perks.three_cushion * 3) {
increaseCombo(gameState, 1, ball.x, ball.y);
}
}
if (
gameState.perks.wrap_left &&
borderHitCode % 2 &&
@ -1748,8 +1749,7 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
ball.previousX < gameState.offsetX + gameState.gameZoneWidth / 2
) {
schedulGameSound(gameState, "plouf", ball.x, 1);
ball.x =
gameState.offsetX + gameState.gameZoneWidth - gameState.ballSize ;
ball.x = gameState.offsetX + gameState.gameZoneWidth - gameState.ballSize;
if (ball.vx > 0) {
ball.vx *= -1;
}
@ -1767,7 +1767,7 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
ball.previousX > gameState.offsetX + gameState.gameZoneWidth / 2
) {
schedulGameSound(gameState, "plouf", ball.x, 1);
ball.x = gameState.offsetX + gameState.ballSize ;
ball.x = gameState.offsetX + gameState.ballSize;
if (ball.vx < 0) {
ball.vx *= -1;
@ -1819,7 +1819,7 @@ export function ballTick(gameState: GameState, ball: Ball, frames: number) {
const ballIsUnderPuck =
Math.abs(ball.x - gameState.puckPosition) <
gameState.ballSize / 2 + gameState.puckWidth / 2 &&
!isMovingWhilePassiveIncome(gameState, 150);
!isMovingWhilePassiveIncome(gameState);
if (
ball.y > ylimit &&
ball.vy > 0 &&