Fix pocket mode math: dynamically compute whether after all cycles user has enough to unlock next level (accounting for freed reinvest cost), show shortfall when not enough

This commit is contained in:
Marty Bostick
2026-07-20 13:49:25 +00:00
parent e2b0196080
commit 8135bd2171
+28 -4
View File
@@ -1372,12 +1372,24 @@ Your full roadmap to $3,960/month:
${phases.filter(k => k !== '3xL7').map((k, i) => {
const p = HYBRIDS[k];
const pocketTotal = (p.profit * p.cycles).toFixed(2);
const availableAfterPocket = Math.round(p.profit * p.cycles * 100 + p.reinvest * 100) / 100;
const nextK = phases[phases.indexOf(k) + 1];
const nextReinvest = nextK && nextK !== '3xL7' ? HYBRIDS[nextK].reinvest : 0;
let unlockText = '';
if (nextK && nextK !== '3xL7' && availableAfterPocket >= nextReinvest) {
unlockText = `After ${p.cycles} cycles you have enough saved to unlock the next level, plus ~$${pocketTotal} pocketed along the way.`;
} else if (nextK && nextK !== '3xL7') {
const shortfall = Math.round((nextReinvest - availableAfterPocket) * 100) / 100;
unlockText = `After ${p.cycles} cycles you've pocketed ~$${pocketTotal}, but you'll need about $${shortfall.toFixed(2)} more to unlock the next level ($${nextReinvest}) — skip pocketing for one cycle to cover the gap.`;
} else {
unlockText = `After ${p.cycles} cycles you've pocketed ~$${pocketTotal} along the way.`;
}
return `**Phase ${i+1}: ${p.label}**
${p.cycles} cycles, ~${p.months} months — $${p.payout.toFixed(2)}/cycle payout
You can play this phase two ways:
🔹 **Pocket mode** — take the ~$${p.profit.toFixed(2)} profit each cycle as spending money (that's your balance after CBP's built-in fee, no extra charge if you keep it in your account to spend later). After ${p.cycles} cycles you have enough saved to unlock the next level, plus ~$${pocketTotal} pocketed along the way. Total time: ~${p.months} months. *(If you withdraw to a crypto wallet, CBP adds a 10% fee on the withdrawal amount.)*
🔹 **Pocket mode** — take the ~$${p.profit.toFixed(2)} profit each cycle as spending money (that's your balance after CBP's built-in fee, no extra charge if you keep it in your account to spend later). ${unlockText} Total time: ~${p.months} months. *(If you withdraw to a crypto wallet, CBP adds a 10% fee on the withdrawal amount.)*
🔸 **Accelerate mode** — reinvest every penny instead of pocketing it. You reach the next level faster because nothing comes off the top. Total time is shorter, but you pocket nothing along the way.`;
}).join('\n\n')}
@@ -1387,7 +1399,7 @@ All three L7 campaigns running at once
$9,720.00/cycle payout → ~$3,960.00/month passive
This is the finish line
${selfCost > 0 ? `**Your total self-fund: $${selfCost}**${selfCost > giftCost ? ` (you cover $${(selfCost - giftCost).toLocaleString()} after sponsor's gift)` : ''}\n\n` : ''}The choice is yours — pocket spending money along the way, or reinvest everything to get to the endgame faster. Either way, no new money needed after the start. Just run the cycles, stack the profits, and level up.
${selfCost > 0 ? `**Your total self-fund: $${selfCost}**${selfCost > giftCost ? ` (you cover $${(selfCost - giftCost).toLocaleString()} after sponsor's gift)` : ''` : ''}\n\nThe choice is yours — pocket spending money along the way, or reinvest everything to get to the endgame faster. Either way, no new money needed after the start. Just run the cycles, stack the profits, and level up.
As a side note — I also earn 10% of everything you get paid through this system, so eventually I'll get my gift back. But that's not why I'm doing this. I genuinely just want to pay it forward and help you get started. You win, I win — we both win together.
@@ -1422,12 +1434,24 @@ Your full roadmap to $3,960/month:
${phases.filter(k => k !== '3xL7').map((k, i) => {
const p = HYBRIDS[k];
const pocketTotal = (p.profit * p.cycles).toFixed(2);
const availableAfterPocket = Math.round(p.profit * p.cycles * 100 + p.reinvest * 100) / 100;
const nextK = phases[phases.indexOf(k) + 1];
const nextReinvest = nextK && nextK !== '3xL7' ? HYBRIDS[nextK].reinvest : 0;
let unlockText = '';
if (nextK && nextK !== '3xL7' && availableAfterPocket >= nextReinvest) {
unlockText = `After ${p.cycles} cycles you have enough saved to unlock the next level, plus ~$${pocketTotal} pocketed along the way.`;
} else if (nextK && nextK !== '3xL7') {
const shortfall = Math.round((nextReinvest - availableAfterPocket) * 100) / 100;
unlockText = `After ${p.cycles} cycles you've pocketed ~$${pocketTotal}, but you'll need about $${shortfall.toFixed(2)} more to unlock the next level ($${nextReinvest}) — skip pocketing for one cycle to cover the gap.`;
} else {
unlockText = `After ${p.cycles} cycles you've pocketed ~$${pocketTotal} along the way.`;
}
return `**Phase ${i+1}: ${p.label}**
${p.cycles} cycles, ~${p.months} months — $${p.payout.toFixed(2)}/cycle payout
You can play this phase two ways:
🔹 **Pocket mode** — take the ~$${p.profit.toFixed(2)} profit each cycle as spending money (that's your balance after CBP's built-in fee, no extra charge if you keep it in your account to spend later). After ${p.cycles} cycles you have enough saved to unlock the next level, plus ~$${pocketTotal} pocketed along the way. Total time: ~${p.months} months. *(If you withdraw to a crypto wallet, CBP adds a 10% fee on the withdrawal amount.)*
🔹 **Pocket mode** — take the ~$${p.profit.toFixed(2)} profit each cycle as spending money (that's your balance after CBP's built-in fee, no extra charge if you keep it in your account to spend later). ${unlockText} Total time: ~${p.months} months. *(If you withdraw to a crypto wallet, CBP adds a 10% fee on the withdrawal amount.)*
🔸 **Accelerate mode** — reinvest every penny instead of pocketing it. You reach the next level faster because nothing comes off the top. Total time is shorter, but you pocket nothing along the way.`;
}).join('\n\n')}
@@ -1437,7 +1461,7 @@ All three L7 campaigns running at once
$9,720.00/cycle payout → ~$3,960.00/month passive
This is the finish line
${selfCost > 0 ? `**Your total self-fund: $${selfCost}**${selfCost > giftCost ? ` (you cover $${(selfCost - giftCost).toLocaleString()} after sponsor's gift)` : ''}\n\n` : ''}The choice is yours — pocket spending money along the way, or reinvest everything to get to the endgame faster. Either way, no new money needed after the start. Just run the cycles, stack the profits, and level up.
${selfCost > 0 ? `**Your total self-fund: $${selfCost}**${selfCost > giftCost ? ` (you cover $${(selfCost - giftCost).toLocaleString()} after sponsor's gift)` : ''` : ''}\n\nThe choice is yours — pocket spending money along the way, or reinvest everything to get to the endgame faster. Either way, no new money needed after the start. Just run the cycles, stack the profits, and level up.
As a side note — I also earn 10% of everything you get paid through this system, so eventually I'll get my gift back. But that's not why I'm doing this. I genuinely just want to pay it forward and help you get started. You win, I win — we both win together.