Tiers (Marty 2026-11-02, every game must fund itself): guests earn nothing (a guest's chapters, drips and best follow them at sign-in, the POL does not; no more collected= payout on /auth), a free InstantAdPay account earns freeSharePct (25, admin) of the chapter drip with the note "Game Pass holders earn the full amount.", Game Pass holders earn the full drip plus the shield perk, GAMEPASS off = everyone full. /api/me carries tier, freeSharePct and yourDrip; landing, lobby, clear card, tester briefing and share preview say play free, sign in to earn a taste, Game Pass for the full table. Tests: guest 0 at sign-in, free 25%, pass 100%, gp off full, settings key.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-02 17:01:10 -06:00
parent 4d8dde2ad2
commit b69086aaac
11 changed files with 92 additions and 55 deletions
+3 -2
View File
@@ -96,9 +96,9 @@ async function events(me, runId, t, list, wantGoal) { // async since the Game Pa
if (out.chapDrips < out.goal) { res.cleared = null; res.short = out.goal - out.chapDrips; return res; }
const ch = out.chapter; const p = player(me.memberId);
const first = !(p.cleared || {})[ch];
// a guest earns nothing (Marty 2026-11-02): the clear counts as progress and follows them when they sign in, the POL does not
const grant = me.guest ? { pol: 0, reason: 'guest' } : await ledger.chapterDripGated(me, ch, first && !out.flagged);
if (first && out.flagged) grant.reason = 'flagged';
if (me.guest && first && !out.flagged) updPlayer(me.memberId, x => { x.pending = Array.from(new Set([...(x.pending || []), ch])); }); // paid when they sign in
updPlayer(me.memberId, x => { x.cleared[ch] = true; if (x.chapter <= ch) x.chapter = ch + 1; });
updRun(runId, x => { x.cleared.push(ch); x.chapter = ch + 1; x.chapDrips = 0; x.goal = spawn.goalFor(ch + 1); });
res.cleared = { chapter: ch, first, pol: grant.pol, reason: grant.reason, note: grant.note || null, next: ch + 1, nextGoal: spawn.goalFor(ch + 1), playTime: Math.round(out.t) }; // note = the Game Pass truth
@@ -138,7 +138,8 @@ function buy(me, item) {
return { error: 'No such item.' };
}
// Move everything one id owns onto another (a guest who signs in, or a wallet-less member who links a wallet).
// Returns the chapters the old id cleared as a guest that the new id has never cleared: the caller pays those.
// Returns the chapters the old id cleared as a guest that the new id has never cleared. Since 2026-11-02 nobody pays those
// (guests earn nothing; the progress carries, the POL does not); the list is informational.
function adopt(fromId, toId) {
fromId = Number(fromId); toId = Number(toId); if (!fromId || fromId === toId) return { moved: false, pending: [] };
const all = store.read('players', {}); const a = all[String(fromId)]; if (!a) return { moved: false, pending: [] };