mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 21:16:14 -04:00
wip
This commit is contained in:
parent
af65737011
commit
2c8a710aab
14 changed files with 93 additions and 56 deletions
|
@ -17,6 +17,10 @@ Break colourful bricks, catch bouncing coins and select powerful upgrades !
|
|||
|
||||
## Done
|
||||
|
||||
- zen : combo increases every 3 seconds, resets on explosion
|
||||
|
||||
## 29088513
|
||||
|
||||
- included german corrections by Pock
|
||||
- added particle effect for wrap
|
||||
- removed grace period from passive income, updated icon
|
||||
|
|
60
dist/index.html
vendored
60
dist/index.html
vendored
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,6 @@ import {
|
|||
getRowColIndex,
|
||||
highScoreText,
|
||||
hoursSpentPlaying,
|
||||
isInWebView,
|
||||
levelsListHTMl,
|
||||
max_levels,
|
||||
pickedUpgradesHTMl,
|
||||
|
|
|
@ -403,6 +403,7 @@ export function explosionAt(
|
|||
gameState.runStatistics.bricks_broken++;
|
||||
|
||||
if (gameState.perks.zen) {
|
||||
gameState.lastZenComboIncrease = gameState.levelTime
|
||||
resetCombo(gameState, x, y);
|
||||
}
|
||||
}
|
||||
|
@ -481,12 +482,6 @@ export function explodeBrick(
|
|||
);
|
||||
}
|
||||
|
||||
let zenBonus = 0;
|
||||
if (gameState.perks.zen) {
|
||||
gameState.bricks.forEach((b) => {
|
||||
if (b === "black") zenBonus += gameState.perks.zen;
|
||||
});
|
||||
}
|
||||
|
||||
increaseCombo(
|
||||
gameState,
|
||||
|
@ -498,7 +493,6 @@ export function explodeBrick(
|
|||
gameState.perks.picky_eater +
|
||||
gameState.perks.asceticism * 3 +
|
||||
gameState.perks.passive_income +
|
||||
zenBonus +
|
||||
gameState.perks.addiction,
|
||||
ball.x,
|
||||
ball.y,
|
||||
|
@ -691,6 +685,7 @@ export async function setLevel(gameState: GameState, l: number) {
|
|||
gameState.winAt = 0;
|
||||
gameState.levelWallBounces = 0;
|
||||
gameState.lastPuckMove = 0;
|
||||
gameState.lastZenComboIncrease = 0;
|
||||
gameState.autoCleanUses = 0;
|
||||
gameState.lastTickDown = gameState.levelTime;
|
||||
gameState.levelStartScore = gameState.score;
|
||||
|
@ -892,14 +887,7 @@ export function coinBrickHitCheck(gameState: GameState, coin: Coin) {
|
|||
undefined;
|
||||
|
||||
if (typeof (vhit ?? hhit ?? chit) !== "undefined") {
|
||||
if (gameState.perks.sticky_coins) {
|
||||
if (coin.collidedLastFrame) {
|
||||
coin.x = previousX;
|
||||
coin.y = previousY;
|
||||
}
|
||||
coin.vx = 0;
|
||||
coin.vy = 0;
|
||||
} else if (gameState.perks.ghost_coins) {
|
||||
if (gameState.perks.ghost_coins) {
|
||||
// slow down
|
||||
coin.vy *= 1 - 0.2 / gameState.perks.ghost_coins;
|
||||
coin.vx *= 1 - 0.2 / gameState.perks.ghost_coins;
|
||||
|
@ -999,8 +987,8 @@ export function gameStateTick(
|
|||
gameState.runStatistics.max_combo,
|
||||
gameState.combo,
|
||||
);
|
||||
|
||||
gameState.lastCombo = gameState.combo;
|
||||
zenTick(gameState)
|
||||
|
||||
if (
|
||||
gameState.perks.addiction &&
|
||||
|
@ -1338,6 +1326,8 @@ export function gameStateTick(
|
|||
}
|
||||
}
|
||||
|
||||
const positionBeforeBrickBounceX=coin.x
|
||||
const positionBeforeBrickBounceY=coin.y
|
||||
const hitBrick = coinBrickHitCheck(gameState, coin);
|
||||
if (gameState.perks.metamorphosis && typeof hitBrick !== "undefined") {
|
||||
if (
|
||||
|
@ -1364,6 +1354,24 @@ export function gameStateTick(
|
|||
}
|
||||
}
|
||||
|
||||
if (gameState.perks.sticky_coins &&
|
||||
typeof hitBrick !== "undefined" &&
|
||||
(
|
||||
coin.color === gameState.bricks[hitBrick] ||
|
||||
gameState.perks.sticky_coins>1
|
||||
)) {
|
||||
if (coin.collidedLastFrame) {
|
||||
coin.x = coin.previousX;
|
||||
coin.y = coin.previousY;
|
||||
}else{
|
||||
coin.x=positionBeforeBrickBounceX
|
||||
coin.y=positionBeforeBrickBounceY
|
||||
|
||||
}
|
||||
coin.vx = 0;
|
||||
coin.vy = 0;
|
||||
}
|
||||
|
||||
// Sound and slow down
|
||||
if (
|
||||
(!gameState.perks.ghost_coins && typeof hitBrick !== "undefined") ||
|
||||
|
@ -2309,3 +2317,12 @@ function applyOttawaTreatyPerk(
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
export function zenTick(gameState:GameState){
|
||||
if (!gameState.perks.zen) return
|
||||
if(gameState.levelTime>gameState.lastZenComboIncrease +3000){
|
||||
gameState.lastZenComboIncrease=gameState.levelTime
|
||||
increaseCombo(gameState, gameState.perks.zen, gameState.puckPosition, gameState.gameZoneHeight- gameState.puckHeight)
|
||||
}
|
||||
}
|
|
@ -397,6 +397,7 @@ export function getCoinRenderColor(gameState: GameState, coin: Coin) {
|
|||
gameState.perks.metamorphosis ||
|
||||
isOptionOn("colorful_coins") ||
|
||||
gameState.perks.hypnosis ||
|
||||
gameState.perks.sticky_coins ||
|
||||
gameState.perks.rainbow
|
||||
)
|
||||
return coin.color;
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
"upgrades.soft_reset.tooltip": "إعادة تعيين المجموعة تحافظ على {{percent}}%",
|
||||
"upgrades.soft_reset.verbose_description": "الحد من تأثير إعادة تعيين المجموعة.",
|
||||
"upgrades.sticky_coins.name": "العملات المعدنية اللاصقة",
|
||||
"upgrades.sticky_coins.tooltip": "العملات المعدنية تلتصق بالطوب",
|
||||
"upgrades.sticky_coins.tooltip": "",
|
||||
"upgrades.sticky_coins.verbose_description": "",
|
||||
"upgrades.streak_shots.name": "سلسلة الضربات",
|
||||
"upgrades.streak_shots.tooltip": "مزيد من العملات المعدنية إذا قمت بكسر العديد من الطوب قبل القفز على المجداف.",
|
||||
|
@ -464,6 +464,6 @@
|
|||
"upgrades.yoyo.tooltip": "الكرة تسقط نحو المضرب",
|
||||
"upgrades.yoyo.verbose_description": "إنه عكس التحريك الذهني، أي التحكم بالكرة أثناء سقوطها مرة أخرى إلى الأسفل.",
|
||||
"upgrades.zen.name": "زين",
|
||||
"upgrades.zen.tooltip": "+{{lvl}} مجموعة لكل قنبلة على الشاشة عند كسر الطوب، يتم إعادة ضبطها عند حدوث انفجار",
|
||||
"upgrades.zen.tooltip": "",
|
||||
"upgrades.zen.verbose_description": ""
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
"upgrades.soft_reset.tooltip": "Combo-Rückstellungen halten {{percent}}%",
|
||||
"upgrades.soft_reset.verbose_description": "Begrenzen Sie die Auswirkungen eines Combo-Resets.",
|
||||
"upgrades.sticky_coins.name": "Klebrige Münzen",
|
||||
"upgrades.sticky_coins.tooltip": "Münzen kleben an Ziegeln",
|
||||
"upgrades.sticky_coins.tooltip": "",
|
||||
"upgrades.sticky_coins.verbose_description": "",
|
||||
"upgrades.streak_shots.name": "Glückssträhne",
|
||||
"upgrades.streak_shots.tooltip": "Mehr Münzen, wenn du viele Steine zerbrichst, bevor du auf das Paddel springst.",
|
||||
|
@ -464,6 +464,6 @@
|
|||
"upgrades.yoyo.tooltip": "Ball fällt in Richtung Paddel",
|
||||
"upgrades.yoyo.verbose_description": "Es ist das Gegenteil von Telekinese, den Ball zu kontrollieren, während er wieder nach unten fällt.",
|
||||
"upgrades.zen.name": "Zen",
|
||||
"upgrades.zen.tooltip": "+{{lvl}} Combo pro Ziegel, wird bei einer Explosion zurückgesetzt",
|
||||
"upgrades.zen.tooltip": "",
|
||||
"upgrades.zen.verbose_description": "Schließlich handelt es sich um ein gewaltfreies Spiel."
|
||||
}
|
||||
|
|
|
@ -414,8 +414,8 @@
|
|||
"upgrades.soft_reset.tooltip": "Combo resets keeps {{percent}}%",
|
||||
"upgrades.soft_reset.verbose_description": "Limit the impact of a combo reset.",
|
||||
"upgrades.sticky_coins.name": "Sticky coins",
|
||||
"upgrades.sticky_coins.tooltip": "Coins stick to bricks",
|
||||
"upgrades.sticky_coins.verbose_description": "",
|
||||
"upgrades.sticky_coins.tooltip": "Coins stick to bricks of the same color",
|
||||
"upgrades.sticky_coins.verbose_description": "At level 2, they stick to bricks of any color",
|
||||
"upgrades.streak_shots.name": "Hit streak",
|
||||
"upgrades.streak_shots.tooltip": "More coins if you break many bricks before bouncing on the paddle.",
|
||||
"upgrades.streak_shots.verbose_description": "Every time you break a brick, your combo increases by one. \n\nHowever, as soon as the ball touches your paddle, the combo is reset to its default value.\n\nOnce your combo rises above the base value, your paddle will have a red border to remind you that it will destroy your combo to touch it with the ball.",
|
||||
|
@ -464,6 +464,6 @@
|
|||
"upgrades.yoyo.tooltip": "Ball falls toward paddle",
|
||||
"upgrades.yoyo.verbose_description": "It's the opposite of telekinesis, control the ball while it's falling back down.",
|
||||
"upgrades.zen.name": "Zen",
|
||||
"upgrades.zen.tooltip": "+{{lvl}} combo per bomb on screen when breaking a bricks, reset when there's an explosion",
|
||||
"upgrades.zen.tooltip": "+{{lvl}} combo every 3s, reset when there's an explosion",
|
||||
"upgrades.zen.verbose_description": ""
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
"upgrades.soft_reset.tooltip": "Al reiniciar el combo se conserva el {{percent}}% de los puntos",
|
||||
"upgrades.soft_reset.verbose_description": "Limita el impacto de un reinicio de combo.",
|
||||
"upgrades.sticky_coins.name": "Monedas pegajosas",
|
||||
"upgrades.sticky_coins.tooltip": "Las monedas se adhieren a los ladrillos",
|
||||
"upgrades.sticky_coins.tooltip": "",
|
||||
"upgrades.sticky_coins.verbose_description": "",
|
||||
"upgrades.streak_shots.name": "Secuencia de destrucción",
|
||||
"upgrades.streak_shots.tooltip": "Más piezas si rompes varios ladrillos a la vez.",
|
||||
|
@ -464,6 +464,6 @@
|
|||
"upgrades.yoyo.tooltip": "La pelota desciende hacia la raqueta.",
|
||||
"upgrades.yoyo.verbose_description": "Es lo contrario de la Telequinesis: controlar la pelota mientras cae hacia la raqueta.",
|
||||
"upgrades.zen.name": "Zen",
|
||||
"upgrades.zen.tooltip": "+{{lvl}} combo por bomba en pantalla al romper un ladrillo, se reinicia cuando hay una explosión",
|
||||
"upgrades.zen.tooltip": "",
|
||||
"upgrades.zen.verbose_description": ""
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
"upgrades.soft_reset.tooltip": "La remise à zéro du combo conserve {{percent}}% des points",
|
||||
"upgrades.soft_reset.verbose_description": "Limite l'impact d'une réinitialisation du combo.",
|
||||
"upgrades.sticky_coins.name": "Pièces collantes",
|
||||
"upgrades.sticky_coins.tooltip": "Les pièces collent aux briques",
|
||||
"upgrades.sticky_coins.tooltip": "Les pièces collent aux briques de la même couleur",
|
||||
"upgrades.sticky_coins.verbose_description": "",
|
||||
"upgrades.streak_shots.name": "Séquence de destruction",
|
||||
"upgrades.streak_shots.tooltip": "Plus de pièces si vous cassez plusieurs briques à la fois.",
|
||||
|
@ -464,6 +464,6 @@
|
|||
"upgrades.yoyo.tooltip": "La balle se dirige vers la raquette en descendant.",
|
||||
"upgrades.yoyo.verbose_description": "C'est l'inverse de Télékinésie, contrôlez la balle alors qu'elle redescend vers la raquette.",
|
||||
"upgrades.zen.name": "Zen",
|
||||
"upgrades.zen.tooltip": "+{{lvl}} combo par bombe à l'écran lors de la rupture d'une brique, réinitialisé en cas d'explosion",
|
||||
"upgrades.zen.tooltip": "",
|
||||
"upgrades.zen.verbose_description": ""
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
"upgrades.soft_reset.tooltip": "Комбо-сброс сохраняет {{percent}}%",
|
||||
"upgrades.soft_reset.verbose_description": "Ограничьте влияние комбо-сброса.",
|
||||
"upgrades.sticky_coins.name": "Липкие монеты",
|
||||
"upgrades.sticky_coins.tooltip": "Монеты прилипают к кирпичам",
|
||||
"upgrades.sticky_coins.tooltip": "",
|
||||
"upgrades.sticky_coins.verbose_description": "",
|
||||
"upgrades.streak_shots.name": "Попадание в полосу",
|
||||
"upgrades.streak_shots.tooltip": "Больше монет, если вы разобьете много кирпичей, прежде чем подпрыгнуть на лопатке.",
|
||||
|
@ -464,6 +464,6 @@
|
|||
"upgrades.yoyo.tooltip": "Мяч падает на лопатку",
|
||||
"upgrades.yoyo.verbose_description": "Это противоположность телекинезу: управляйте мячом, пока он падает обратно.",
|
||||
"upgrades.zen.name": "Дзен",
|
||||
"upgrades.zen.tooltip": "+{{lvl}} комбо за бомбу на экране при разрушении кирпичей, сбрасывается при взрыве",
|
||||
"upgrades.zen.tooltip": "",
|
||||
"upgrades.zen.verbose_description": ""
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
"upgrades.soft_reset.tooltip": "Kombo sıfırlamaları % {{percent}}tutar",
|
||||
"upgrades.soft_reset.verbose_description": "Bir kombo sıfırlamanın etkisini sınırlayın.",
|
||||
"upgrades.sticky_coins.name": "Yapışkan paralar",
|
||||
"upgrades.sticky_coins.tooltip": "Paralar tuğlalara yapışıyor",
|
||||
"upgrades.sticky_coins.tooltip": "",
|
||||
"upgrades.sticky_coins.verbose_description": "",
|
||||
"upgrades.streak_shots.name": "Vuruş serisi",
|
||||
"upgrades.streak_shots.tooltip": "Kürek çekmeden önce çok sayıda tuğla kırarsanız daha fazla para kazanırsınız.",
|
||||
|
@ -464,6 +464,6 @@
|
|||
"upgrades.yoyo.tooltip": "Top küreğe doğru düşer",
|
||||
"upgrades.yoyo.verbose_description": "Telekinezinin tam tersi, topun aşağı düşerken kontrol edilmesi.",
|
||||
"upgrades.zen.name": "Zen",
|
||||
"upgrades.zen.tooltip": "Tuğla kırarken ekrandaki bomba başına +{{lvl}} kombo, patlama olduğunda sıfırlanır",
|
||||
"upgrades.zen.tooltip": "",
|
||||
"upgrades.zen.verbose_description": ""
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ export function newGameState(params: RunParams): GameState {
|
|||
puckPosition: 400,
|
||||
lastPuckPosition: 400,
|
||||
lastPuckMove: 0,
|
||||
lastZenComboIncrease: 0,
|
||||
pauseTimeout: null,
|
||||
canvasWidth: 0,
|
||||
canvasHeight: 0,
|
||||
|
|
3
src/types.d.ts
vendored
3
src/types.d.ts
vendored
|
@ -253,8 +253,6 @@ export type GameState = {
|
|||
levelSpawnedCoins: number;
|
||||
levelLostCoins: number;
|
||||
|
||||
// MAX_COINS: number;
|
||||
// MAX_PARTICLES: number;
|
||||
puckColor: colorString;
|
||||
ballSize: number;
|
||||
coinSize: number;
|
||||
|
@ -267,6 +265,7 @@ export type GameState = {
|
|||
lastOffered: Partial<{ [k in PerkId]: number }>;
|
||||
levelTime: number;
|
||||
lastPuckMove: number;
|
||||
lastZenComboIncrease: number;
|
||||
winAt: number;
|
||||
levelWallBounces: number;
|
||||
autoCleanUses: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue