mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-20 20:16:16 -04:00
Clairvoyant perks, hps adjusments
This commit is contained in:
parent
3745b527f5
commit
af02565bf1
12 changed files with 238 additions and 104 deletions
|
@ -1,5 +1,6 @@
|
|||
import { Ball, GameState, PerkId, PerksMap } from "./types";
|
||||
import { icons, upgrades } from "./loadGameData";
|
||||
import {t} from "./i18n/i18n";
|
||||
|
||||
export function getMajorityValue(arr: string[]): string {
|
||||
const count: { [k: string]: number } = {};
|
||||
|
@ -64,6 +65,14 @@ export function pickedUpgradesHTMl(gameState: GameState) {
|
|||
}
|
||||
return list;
|
||||
}
|
||||
export function levelsListHTMl(gameState: GameState) {
|
||||
if(!gameState.perks.clairvoyant) return ''
|
||||
let list = "";
|
||||
for (let i=0;i<max_levels(gameState);i++) {
|
||||
list += `<span style="opacity: ${i>=gameState.currentLevel ? 1:0.2}">${icons[gameState.runLevels[i].name]}</span>` ;
|
||||
}
|
||||
return `<p>${t('score_panel.upcoming_levels')}</p><p>${list}</p>`;
|
||||
}
|
||||
|
||||
export function currentLevelInfo(gameState: GameState) {
|
||||
return gameState.runLevels[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue