From b31a408789bc4c477c9372948639b9a60154eb4d Mon Sep 17 00:00:00 2001 From: jwinterm Date: Fri, 10 Jul 2026 14:53:50 -0400 Subject: [PATCH] feat(ui): consolidate help to a single credits model; make reward line payout-honest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reframe the two 'Direct Payment / Credits Mode' cards as one 'Credits' model β€” 1 credit = 1 run, bought singly at base price or in discounted bundles. Adds the drop-in-timing note (jump in now or next block; block timing is memoryless so the expected wait is the same). Reward line is now config-driven: shows crypto multipliers only when payouts are actually enabled, otherwise the Hall-of-Champions framing β€” fixes the help advertising 2x/3x payouts on a PAYOUTS_ENABLED=false (prestige) deployment. Header renamed to 'Credits & Entry'. --- html/index.html | 2 +- html/js/ui/helpModal.js | 106 +++++++++++++++++++++------------------- 2 files changed, 57 insertions(+), 51 deletions(-) diff --git a/html/index.html b/html/index.html index d2a8971..8b2a8a6 100644 --- a/html/index.html +++ b/html/index.html @@ -310,7 +310,7 @@
-

πŸ’° Payment Modes

+

🎫 Credits & Entry

diff --git a/html/js/ui/helpModal.js b/html/js/ui/helpModal.js index 77e9eae..1497fd1 100644 --- a/html/js/ui/helpModal.js +++ b/html/js/ui/helpModal.js @@ -51,64 +51,70 @@ const HelpModal = { const config = this._config || {}; const currency = config.cryptoType || 'WOW'; - // Check if payments are disabled (free mode) + // Fully free deployment (no payments configured). if (!config.paymentsEnabled) { $container.html(` -
- πŸ†“ Free Mode
- Play for free! No payment required. Payouts may or may not be enabled. +
+ πŸ†“ Free to play
+ No payment needed β€” just escape the dungeon.
`); return; } - - // Direct payment mode - if (config.directModeEnabled) { - const price = config.singleGamePriceFormatted || '1'; - const multipliers = config.payoutMultipliers?.direct || {}; - const escapeMulti = multipliers.escape || 2; - const treasureMulti = multipliers.treasure || 3; - - $container.append(` -
- ⚑ Direct Payment
- Pay ${price} ${currency} per game.
- Escape: ${escapeMulti}Γ— payout | With treasure: ${treasureMulti}Γ— payout + + const directOn = config.directModeEnabled; + const creditsOn = config.creditsModeEnabled; + if (!directOn && !creditsOn) { + $container.html('

Loading…

'); + return; + } + + // Unified model: everything is CREDITS. Buy one at the base price, or a bundle at a + // discount; 1 credit = 1 run either way. + const price = config.singleGamePriceFormatted || '1'; + const packages = config.creditPackages || []; + const payoutsOn = !!(config.payoutsEnabled || config.directPayoutsEnabled || config.creditsPayoutsEnabled); + + const buy = []; + if (directOn) buy.push(`1 credit β€” ${price} ${currency}`); + if (creditsOn && packages.length > 0) { + const bundles = packages.map(pkg => { + const bonus = pkg.bonus > 0 ? ` +${pkg.bonus}` : ''; + return `${pkg.credits}${bonus} for ${pkg.priceFormatted}`; + }).join(' Β· '); + buy.push(`Bundles β€” ${bundles} ${currency} (cheaper per run)`); + } + + // Reward line is config-driven so it stays honest on prestige (no-payout) deployments. + let reward; + if (payoutsOn) { + const m = (config.payoutMultipliers && (config.payoutMultipliers.direct || config.payoutMultipliers.credits)) || {}; + const esc = m.escape || 2; + const tre = m.escapeWithTreasure || m.treasure || 3; + reward = `πŸ’° Escape pays ${esc}Γ— Β· with treasure ${tre}Γ—.`; + } else { + reward = `πŸ… No crypto payout β€” escape for the win; top scores enter the Hall of Champions.`; + } + + const freeLine = config.freePlayEnabled + ? `
Prefer no stakes? Free runs are available too (Pleb leaderboard).
` + : ''; + + $container.html(` +
+
🎫 1 credit = 1 run
+
+ Buy credits with ${currency}:
+ ${buy.map(b => '  β€’ ' + b).join('
')}
- `); - } - - // Credits mode - if (config.creditsModeEnabled) { - const packages = config.creditPackages || []; - const creditsPayoutEnabled = config.creditsPayoutsEnabled; - - let packagesInfo = ''; - if (packages.length > 0) { - packagesInfo = packages.map(pkg => { - const bonus = pkg.bonus > 0 ? ` +${pkg.bonus} bonus` : ''; - return `${pkg.credits}${bonus} credits for ${pkg.priceFormatted} ${currency}`; - }).join(', '); - } - - $container.append(` -
- 🎫 Credits Mode
- Buy credits in bulk and use them to play.
- ${packagesInfo ? `Packages: ${packagesInfo}
` : ''} - ${creditsPayoutEnabled - ? 'βœ“ Payouts enabled for credit games' - : 'Payouts not available for credit games'} +
+ Spend a credit to enter β€” jump in immediately, or on the next block. Block timing + is random, so your average wait is the same either way.
- `); - } - - // If no paid modes are shown but payments enabled - if (!config.directModeEnabled && !config.creditsModeEnabled && config.paymentsEnabled) { - $container.html(` -

Payment configuration is loading...

- `); - } +
${reward}
+ ${freeLine} +
+ `); } };