Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions e63334287a3deaa3/asteroid-run/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions e63334287a3deaa3/asteroid-run/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,9 @@ <h2 id="resTitle">Level clear!</h2>
const clearedCount=()=>Object.keys(save.lv).length;
const crystalTotal=()=>{let n=save.bank;for(const k in save.lv)n+=bits(save.lv[k].c);return n};
const wallet=()=>Math.max(0,crystalTotal()-save.spent);
// The shop is closed for now (the owner's call): runners and trails can't be bought with crystals. Runners still unlock free by playing,
// what a save already owns stays owned, and crystals still add up. Set this to true to open buying again.
const SHOP_OPEN=false;
const isOpen=i=>i===0||!!save.lv[i]||PRED[i].some(p=>!!save.lv[p]);
const freeMet=ch=>!!ch.free&&(ch.free.lv!=null?clearedCount()>=ch.free.lv:!!save.lv[ch.free.at]);
const unlocked=ch=>ch.id==='pip'||save.own.includes(ch.id)||freeMet(ch);
Expand Down Expand Up @@ -1543,7 +1546,7 @@ <h2 id="resTitle">Level clear!</h2>
function renderChars(){
const box=$('chars');box.innerHTML='';
for(const ch of CHARS){const b=document.createElement('button');b.type='button';const ok=unlocked(ch);
b.innerHTML=charSvg(ch)+'<b></b><small></small>';b.querySelector('b').textContent=ch.name;b.querySelector('small').textContent=ok?abilityOf(ch):'◆'+ch.cost;
b.innerHTML=charSvg(ch)+'<b></b><small></small>';b.querySelector('b').textContent=ch.name;b.querySelector('small').textContent=ok?abilityOf(ch):SHOP_OPEN?'◆'+ch.cost:TX('Locked');
if(!ok)b.classList.add('locked');b.setAttribute('aria-pressed',String(save.ch===ch.id));b.setAttribute('aria-label',ch.name+(ok?'':' (locked)'));
b.addEventListener('click',()=>{sfx.click();G.viewCh=ch.id;if(ok&&save.ch!==ch.id){save.ch=ch.id;saveNow();if(G.mode==='menu')startDemo()}renderChars()});box.append(b)}
const ch=charById(G.viewCh||save.ch),ok=unlocked(ch);
Expand All @@ -1552,16 +1555,17 @@ <h2 id="resTitle">Level clear!</h2>
info.innerHTML='<b></b> <em></em> <span></span><div class="bars">'+bar('Speed',(ch.speed-10.5)/4.5)+bar('Sidestep',(ch.lat-6)/3.8)+bar('Grip',ch.accG/110)+bar('Jump',(ch.jh-1.6)/1.8)+'</div><div class="buy"></div>';
info.querySelector('b').textContent=ch.name;info.querySelector('em').textContent=abilityOf(ch);
info.querySelector('span').textContent=TX(ch.desc)+(ok?'':' '+TX('Unlock free: {x}.',{x:freeText(ch)}));
if(!ok){const can=wallet()>=ch.cost,bb=addBtn(info.querySelector('.buy'),'Unlock now for ◆'+ch.cost,'btn sm '+(can?'lime':'alt'),()=>{
if(wallet()<ch.cost)return;save.own.push(ch.id);save.spent+=ch.cost;save.ch=ch.id;saveNow();sfx.unlock();renderMenu();if(G.mode==='menu')startDemo()});
if(!ok&&!SHOP_OPEN){const sm=document.createElement('small');sm.textContent=TX('The shop is closed for now. Coming soon.');info.querySelector('.buy').append(sm)}
else if(!ok){const can=wallet()>=ch.cost,bb=addBtn(info.querySelector('.buy'),'Unlock now for ◆'+ch.cost,'btn sm '+(can?'lime':'alt'),()=>{
if(!SHOP_OPEN||wallet()<ch.cost)return;save.own.push(ch.id);save.spent+=ch.cost;save.ch=ch.id;saveNow();sfx.unlock();renderMenu();if(G.mode==='menu')startDemo()});
bb.disabled=!can;if(!can){const sm=document.createElement('small');sm.textContent=' you have ◆'+wallet();info.querySelector('.buy').append(sm)}}
else if(save.bestBy[ch.id]){const sm=document.createElement('small');sm.textContent='Endless best: '+fmtM(save.bestBy[ch.id]);info.querySelector('.buy').append(sm)}
}
function renderTrails(){
const box=$('trails');box.innerHTML='';
for(const t of TRAILS){const own=save.trails.includes(t.id),b=document.createElement('button');b.type='button';
b.textContent=TX(t.name)+(own?'':' ◆'+t.cost);b.setAttribute('aria-pressed',String(save.trail===t.id));if(!own&&wallet()<t.cost)b.disabled=true;
b.addEventListener('click',()=>{sfx.click();if(!own){if(wallet()<t.cost)return;save.trails.push(t.id);save.spent+=t.cost;sfx.unlock()}save.trail=t.id;saveNow();renderMenu()});box.append(b)}
b.textContent=TX(t.name)+(own?'':SHOP_OPEN?' ◆'+t.cost:' · '+TX('Coming soon'));b.setAttribute('aria-pressed',String(save.trail===t.id));if(!own&&(!SHOP_OPEN||wallet()<t.cost))b.disabled=true;
b.addEventListener('click',()=>{sfx.click();if(!own){if(!SHOP_OPEN||wallet()<t.cost)return;save.trails.push(t.id);save.spent+=t.cost;sfx.unlock()}save.trail=t.id;saveNow();renderMenu()});box.append(b)}
}
function nextLevel(){for(const i of ORDER)if(isOpen(i)&&!save.lv[i]&&!zoneOf(i).gift)return i;for(const i of ORDER)if(isOpen(i)&&!save.lv[i])return i;return -1}
function renderMenu(){
Expand Down
2 changes: 1 addition & 1 deletion e63334287a3deaa3/flipline/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions e63334287a3deaa3/flipline/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,9 @@ <h2 id="resTitle">Crashed!</h2>

// ======================= SAVE =======================
const SAVE_KEY='flipline:save',SAVE_V=1;
// The garage shop is closed for now (the owner's call): nothing can be bought, what a save already owns stays owned and can be chosen,
// and coins still add up from play. Set this to true to open buying again; nothing else needs to change.
const SHOP_OPEN=false;
function freshSave(){return{v:SAVE_V,coins:0,veh:'hopper',rid:'sol',thm:'canyon',own:{hopper:1,sol:1,canyon:1},
best:{dist:0,score:0},daily:{d:'',dist:0,score:0,plays:0},lv:{},ch:{act:[0,1,2],next:3,done:0,prog:{}},
tot:{flips:0,dist:0,runs:0,crashes:0},feat:{},set:{mus:0.5,sfx:0.8,mute:0,fx:0,ghost:1},track:''}}
Expand Down Expand Up @@ -2044,10 +2047,10 @@ <h2 id="resTitle">Crashed!</h2>
for(const it of list){const own=owned(it.id),sel=it.id===cur;const d=document.createElement('div');d.className='item'+(sel?' sel':'')+(own?'':' locked');
const c=document.createElement('canvas');c.width=300;c.height=200;d.appendChild(c);
const nm=document.createElement('b');nm.textContent=it.feat&&!own?'???':it.n;nm.setAttribute('data-noi18n','');d.appendChild(nm);
const sm=document.createElement('small');sm.textContent=it.feat?(own?TX('Secret'):TX(FEAT[it.feat])):own?(sel?TX('Riding'):TX('Yours')):TX('{c} coins',{c:NUM(it.cost)});d.appendChild(sm);
const sm=document.createElement('small');sm.textContent=it.feat?(own?TX('Secret'):TX(FEAT[it.feat])):own?(sel?TX('Riding'):TX('Yours')):SHOP_OPEN?TX('{c} coins',{c:NUM(it.cost)}):TX('Coming soon');d.appendChild(sm);
const b=document.createElement('button');b.type='button';b.className='btn sm'+(sel?'':own?' teal':' clay');
b.textContent=sel?TX('Chosen'):own?TX('Choose'):it.feat?TX('Locked'):TX('Buy');b.disabled=sel||(!own&&(it.feat||save.coins<it.cost));
b.onclick=()=>{if(!own){if(it.feat||save.coins<it.cost)return;save.coins-=it.cost;save.own[it.id]=1;AU.S.buy();toast(TX('{n} is yours!',{n:it.n}))}else AU.S.ui();
b.textContent=sel?TX('Chosen'):own?TX('Choose'):it.feat||!SHOP_OPEN?TX('Locked'):TX('Buy');b.disabled=sel||(!own&&(!SHOP_OPEN||it.feat||save.coins<it.cost));
b.onclick=()=>{if(!own){if(!SHOP_OPEN||it.feat||save.coins<it.cost)return;save.coins-=it.cost;save.own[it.id]=1;AU.S.buy();toast(TX('{n} is yours!',{n:it.n}))}else AU.S.ui();
if(garTab==='veh')save.veh=it.id;else if(garTab==='rid')save.rid=it.id;else{save.thm=it.id;bgCache=null}persist();buildShop()};
d.appendChild(b);box.appendChild(d);
previewCard(c,it,garTab,own)}
Expand Down
12 changes: 9 additions & 3 deletions e63334287a3deaa3/hush-pools/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,19 @@ <h2 id="resH">YOU ESCAPED</h2>
const hardUnlocked = s => s.nw >= 2;
function upgradeOpen(s, k) { const u = UPGRADES.find(x => x.k === k); return !!u && (!u.need || !!s.ever[u.need]); }
function upgradeCost(s, k) { const l = s.up[k]; return l >= 3 ? null : UP_COST[l]; }
// The shop is closed for now (the owner's call): no equipment or upgrades can be bought. What a save already owns still comes on runs,
// upgrade levels are kept, and coins still add up. Set this to true to open buying again.
const SHOP_OPEN = false;
const SHOP_CLOSED_MSG = 'The shop is closed for now. Coming soon.';
function buyUpgrade(s, k) {
if (!SHOP_OPEN) return SHOP_CLOSED_MSG;
if (!upgradeOpen(s, k)) return 'Locked: own that item first.';
const c = upgradeCost(s, k); if (c == null) return 'Already at level 3.';
if (s.coins < c) return 'Not enough coins.';
s.coins -= c; s.up[k]++; return '';
}
function buyItem(s, k) {
if (!SHOP_OPEN) return SHOP_CLOSED_MSG;
if (!(k in SHOP)) return 'Not for sale.';
if (s.own[k] >= CARRY_MAX) return 'You can carry ' + CARRY_MAX + '.';
if (s.coins < SHOP[k]) return 'Not enough coins.';
Expand Down Expand Up @@ -2799,16 +2805,16 @@ <h2 id="resH">YOU ESCAPED</h2>
const tab = G.shopTab;
[...document.querySelectorAll('#shop .tabs button')].forEach(b => b.classList.toggle('on', b.dataset.tab === tab));
$('shopH').textContent = tab === 'equip' ? 'Equipment' : 'Upgrades';
$('shopWallet').innerHTML = 'You have <b>' + SAVE.coins + ' coins</b>. Earn more by clearing rooms; everything stays in this browser.';
$('shopWallet').innerHTML = 'You have <b>' + SAVE.coins + ' coins</b>. Earn more by clearing rooms; everything stays in this browser.' + (SHOP_OPEN ? '' : ' <b>' + SHOP_CLOSED_MSG + '</b>');
let h = '';
if (tab === 'equip') {
h += '<div class="it">' + ICONS[0] + '<div><b>Pebbles</b><small>Free: you start every run with ' + START_PEBBLES + ', and gray stones give ' + STONE_GIVES + ' more. Skip one across the water to lure it away.</small></div></div>';
const D = { bottle: 'One loud smash, and an echo after. A bigger decoy than a pebble.', toy: 'Rattles for ' + toyTimeOf(SAVE.up) + ' s where it lands. Keeps it busy.', flare: 'Stuns it for 5 s if it\'s within ' + flareRadiusOf(SAVE.up) + ' m, and frees a teammate it\'s holding.', rope: 'Pulls a downed teammate out from up to ' + ropeRangeOf(SAVE.up) + ' m away.' };
['bottle', 'toy', 'flare', 'rope'].forEach((k, i) => { h += '<div class="it">' + ICONS[i + 1] + '<div><b>' + ITEM_NAMES[i + 1] + ' <span class="mono" style="font-size:12px;color:#9fbcb9">' + SAVE.own[k] + '/' + CARRY_MAX + '</span></b><small>' + D[k] + '</small></div><button class="btn" type="button" data-buy="' + k + '"' + (SAVE.own[k] >= CARRY_MAX || SAVE.coins < SHOP[k] ? ' disabled' : '') + '>' + SHOP[k] + ' coins</button></div>'; });
['bottle', 'toy', 'flare', 'rope'].forEach((k, i) => { h += '<div class="it">' + ICONS[i + 1] + '<div><b>' + ITEM_NAMES[i + 1] + ' <span class="mono" style="font-size:12px;color:#9fbcb9">' + SAVE.own[k] + '/' + CARRY_MAX + '</span></b><small>' + D[k] + '</small></div><button class="btn" type="button" data-buy="' + k + '"' + (!SHOP_OPEN || SAVE.own[k] >= CARRY_MAX || SAVE.coins < SHOP[k] ? ' disabled' : '') + '>' + (SHOP_OPEN ? SHOP[k] + ' coins' : 'Coming soon') + '</button></div>'; });
} else {
UPGRADES.forEach(u => { const open = upgradeOpen(SAVE, u.k), c = upgradeCost(SAVE, u.k), l = SAVE.up[u.k];
h += '<div class="it"><div><b>' + u.n + '<span class="pips">' + [0, 1, 2].map(i => '<i class="' + (i < l ? 'on' : '') + '"></i>').join('') + '</span></b><small>' + (open ? u.d : 'Own a ' + ITEM_NAMES[ITEMS.indexOf(u.need)].toLowerCase() + ' first.') + '</small></div>' +
'<button class="btn" type="button" data-up="' + u.k + '"' + (!open || c == null || SAVE.coins < c ? ' disabled' : '') + '>' + (!open ? 'Locked' : c == null ? 'Max' : c + ' coins') + '</button></div>'; });
'<button class="btn" type="button" data-up="' + u.k + '"' + (!SHOP_OPEN || !open || c == null || SAVE.coins < c ? ' disabled' : '') + '>' + (!open ? 'Locked' : c == null ? 'Max' : SHOP_OPEN ? c + ' coins' : 'Coming soon') + '</button></div>'; });
}
$('shopList').innerHTML = h;
[...$('shopList').querySelectorAll('[data-buy]')].forEach(b => b.onclick = () => { const r = buyItem(SAVE, b.dataset.buy); $('shopMsg').textContent = r || 'Bought. It comes with you on your next run.'; if (!r) { saveSave(); sfx('ok'); } renderShop(); });
Expand Down
29 changes: 29 additions & 0 deletions e63334287a3deaa3/news/ngcoding10-close-game-shops.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"kind": "fix",
"title": "Game shops are closed for now",
"tags": [
"Chromeline",
"Spire",
"Asteroid Run",
"Blackwade"
],
"items": [
"For now nothing can be bought inside the games: Chromeline's garage, Spire's coin hats, Asteroid Run's runners and trails, Blackwade's equipment and upgrades, and Starhop's skins.",
"Everything you already own is still yours to use, and nothing was taken away.",
"Your coins, crystals and shards are untouched and keep adding up as you play.",
"Things you unlock by playing, like Chromeline's secret vehicles, Spire's level hats and Asteroid Run's free runners, still unlock the same way.",
"In Blackwade, equipment you carry is still used up on a run and can't be restocked until the shop opens again."
],
"es": {
"Game shops are closed for now": "Las tiendas de los juegos están cerradas por ahora",
"Chromeline": "Chromeline",
"Spire": "Spire",
"Asteroid Run": "Asteroid Run",
"Blackwade": "Blackwade",
"For now nothing can be bought inside the games: Chromeline's garage, Spire's coin hats, Asteroid Run's runners and trails, Blackwade's equipment and upgrades, and Starhop's skins.": "Por ahora no se puede comprar nada dentro de los juegos: el garaje de Chromeline, los sombreros de monedas de Spire, los corredores y estelas de Asteroid Run, el equipo y las mejoras de Blackwade y los aspectos de Starhop.",
"Everything you already own is still yours to use, and nothing was taken away.": "Todo lo que ya tienes sigue siendo tuyo para usarlo, y no se ha quitado nada.",
"Your coins, crystals and shards are untouched and keep adding up as you play.": "Tus monedas, cristales y fragmentos no se tocan y siguen sumándose mientras juegas.",
"Things you unlock by playing, like Chromeline's secret vehicles, Spire's level hats and Asteroid Run's free runners, still unlock the same way.": "Lo que se desbloquea jugando, como los vehículos secretos de Chromeline, los sombreros por nivel de Spire y los corredores gratis de Asteroid Run, se sigue desbloqueando igual.",
"In Blackwade, equipment you carry is still used up on a run and can't be restocked until the shop opens again.": "En Blackwade, el equipo que llevas se sigue gastando en cada partida y no se puede reponer hasta que la tienda vuelva a abrir."
}
}
1 change: 1 addition & 0 deletions e63334287a3deaa3/spire/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading