Weekly prizes are open to every hunter with the minimum finds, Game Pass or not (Marty 2026-11-23, reversing the 11-02 Pass-only rule: the leaderboard promised the top three and only one Pass holder was winning); admin /api/admin/prizes/fill pays the unpaid places of a week already awarded under the old rule, never anyone twice; guides and terms say the same
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -53,7 +53,7 @@ const IAP_URL = String(process.env.IAP_URL || 'https://instantadpay.com').replac
|
||||
gp.use({ game: 'polhunter', secret: String(process.env.HUNT_SSO_SECRET || '').trim(), iap: IAP_URL, store, notify: (kind, p) => notify(kind, p) });
|
||||
const passActive = me => !!(gp.on() && me && gp.passOf(me.memberId, me.email).active);
|
||||
const passExtra = me => passActive(me) ? 2 : 0; // the perk: 5 missions a day instead of 3
|
||||
// the full tier (Marty 2026-11-02): Game Pass holders get the full allotment, the full draw, the weekly prizes and the Mystery Box;
|
||||
// the full tier (Marty 2026-11-02): Game Pass holders get the full allotment, the full draw and the Mystery Box (weekly prizes are open to everyone since 2026-11-23);
|
||||
// a free account gets the free tier (lib/rewards.js freeMissionsPerDay / freeMinPol / freeMaxPol). With GAMEPASS off there is no
|
||||
// pass to buy, so everyone stays on the full tier as before.
|
||||
const fullTier = me => !gp.on() || passActive(me);
|
||||
@@ -396,6 +396,8 @@ const server = http.createServer(async (req, res) => {
|
||||
if (p === '/api/admin/settings' && req.method === 'POST') { const b = await readBody(req); const patch = {}; for (const k of ['minPol', 'maxPol', 'dailyCapPol', 'lowBalancePol', 'weeklyMinFinds', 'drawSkew', 'missionsPerDay', 'freeMissionsPerDay', 'freeMinPol', 'freeMaxPol', 'detectiveOn', 'detectivePol', 'refEnabled', 'refBountyPol', 'refMatchPct', 'refMatchDays', 'refNewDays', 'refCapPol', 'refMatchMinPol', 'rotationOn', 'tourStopCredits', 'tourStopCreditsDailyMax']) if (b[k] != null && Number(b[k]) >= 0) patch[k] = Number(b[k]); for (const k of ['weeklyPrizes', 'leaderboardExclude']) if (Array.isArray(b[k])) patch[k] = b[k].map(Number).filter(n => n >= 0); return json(res, 200, { ok: true, settings: rewards.setSettings(patch) }); }
|
||||
// award a week by hand (its Monday key); already-awarded weeks are skipped
|
||||
if (p === '/api/admin/prizes/award' && req.method === 'POST') { const b = await readBody(req); const r = social.awardWeek(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); }
|
||||
// fill an already-awarded week under today's rule (2026-11-23): pays the places that went unpaid, never anyone twice
|
||||
if (p === '/api/admin/prizes/fill' && req.method === 'POST') { const b = await readBody(req); const r = social.awardFill(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); }
|
||||
// Ad Detective question bank: stats per question, add or edit one, retire or restore one
|
||||
if (p === '/api/admin/rotation') return json(res, 200, rotation.adminView()); // the Network Tour: rounds per hunter, tour-stop credits sent / owed
|
||||
if (p === '/api/admin/detective') return json(res, 200, detective.stats());
|
||||
|
||||
Reference in New Issue
Block a user