Weekly prizes stay for Game Pass holders (Marty 2026-11-23, restoring the 11-02 rule changed in 5e8c903 an hour earlier); the leaderboard page now says in plain words that an active Game Pass at week end is needed to win, with a link to get one; guides and terms back to the Pass wording; the one-time fill route stays and is documented as ignoring the Pass

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-23 08:21:55 -06:00
parent 5e8c903b63
commit a71d8ea276
7 changed files with 14 additions and 12 deletions
+7 -5
View File
@@ -102,9 +102,10 @@ function awardWeek(monday) {
const done = store.read('prizes', []);
if (done.some(x => x.week === monday)) return { skipped: 'already awarded', week: monday };
const rules = prizeRules();
// weekly prizes are for EVERY hunter with the minimum finds, Game Pass or not (Marty 2026-11-23: the leaderboard promised the top
// three and only one Pass holder was winning; this reverses the 2026-11-02 Pass-only rule)
const winners = weekRows(monday).filter(r => r.finds >= rules.minFinds).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r));
// weekly prizes are for Game Pass holders (Marty 2026-11-02: the Pass is the purchase that funds the game; confirmed 2026-11-23, with
// the leaderboard page now saying so in plain words); with GAMEPASS off, everyone qualifies as before
let passOk = () => true; try { const gp = require('./polgrant'); if (gp.on && gp.on()) passOk = r => { try { return !!gp.passOf(r.memberId, r.email).active; } catch (e) { return false; } }; } catch (e) {}
const winners = weekRows(monday).filter(r => r.finds >= rules.minFinds && passOk(r)).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r));
const day = ctDay(), at = Date.now();
const recs = winners.map(w => ({ id: 'prize' + monday.replace(/-/g, '') + '-' + w.rank, memberId: w.memberId, email: w.email, wallet: w.wallet, username: w.username, missionId: 'prize:' + monday, site: 'Weekly prize #' + w.rank, pol: w.prizePol, day, at, status: 'due', tx: null, paidAt: null, error: null, prize: { week: monday, rank: w.rank } }));
if (recs.length) store.update('payouts', [], all => { all.push(...recs); return all; });
@@ -112,8 +113,9 @@ function awardWeek(monday) {
store.update('prizes', [], all => { all.push(entry); return all; });
return entry;
}
// fill a week that was ALREADY awarded under an older rule (Marty 2026-11-23, the week of 11-16 paid only the one Pass holder): today's
// rule picks the top hunters again, and anyone in that list who was not paid for the week gets the prize of their place. Nobody already
// ONE-TIME catch-up for a week that was already awarded (Marty 2026-11-23: the week of 11-16 paid only the one Pass holder while the
// leaderboard page did not say a Pass was needed, so he paid places 2 and 3 once). It ignores the Pass on purpose: the top hunters
// by finds are picked again, and anyone in that list who was not paid for the week gets the prize of their place. Nobody already
// paid is touched, nothing is paid twice (a payout row for that member and week blocks it), and a second call adds nothing.
function awardFill(monday) {
if (!/^\d{4}-\d{2}-\d{2}$/.test(monday || '') || weekOf(monday) !== monday) return { error: 'not a Monday key' };