Free tier and full tier (Marty 2026-11-02, every game must fund itself): a free InstantAdPay account hunts one code a day drawn on 0.02 to 0.10 POL; Game Pass holders keep five a day at the full draw, the weekly prizes and the Mystery Hunt Box (a box already open stays reachable); advertiser-funded finds pay what the advertiser set on every tier; with GAMEPASS off everyone stays on the full tier. New settings freeMissionsPerDay / freeMinPol / freeMaxPol (admin), tests updated
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -101,7 +101,9 @@ function awardWeek(monday) {
|
||||
const done = store.read('prizes', []);
|
||||
if (done.some(x => x.week === monday)) return { skipped: 'already awarded', week: monday };
|
||||
const rules = prizeRules();
|
||||
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); 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; });
|
||||
|
||||
Reference in New Issue
Block a user