feat: click panel breakdown + guide updated
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 20s

ClickPanel in Production tab — full click breakdown:
- Gain per click with formula (base × prestige × tree)
- Double Ponte chance (+ how to unlock if not)
- Crit Ponte chance (+ how to unlock if not)
- Auto-Ponte rate + effective prod/s
- Hint to invest in Ponte branch when no tree bonuses

Guide updated with 11 sections:
- Ponte (clic) section — breakdown, double/crit/auto explained
- Generateurs section — effective prod, multi-buy, share bars
- Prestige section — quadratic scaling formula explained
- Arbre section — 3 branches + convergence detailed
- Capstones section — all 3 + convergence alpha/omega
This commit is contained in:
2026-03-28 20:58:18 +01:00
parent 120f4bedca
commit 25768e3665
4 changed files with 162 additions and 11 deletions

View File

@@ -617,6 +617,35 @@ export function getClickGain(state: GameState): number {
return state.clickMultiplier * state.prestigeMultiplier * treeClickMult;
}
// Breakdown complet du clic (pour affichage cockpit)
export interface ClickBreakdown {
base: number;
prestigeMult: number;
treeMult: number;
total: number;
doubleChance: number; // 0-1
critChance: number; // 0-1
autoClicksPerSec: number;
effectivePerSec: number; // total × (1 + double × 1 + crit × 9) + autoClicks × total
}
export function getClickBreakdown(state: GameState): ClickBreakdown {
const base = state.clickMultiplier;
const prestigeMult = state.prestigeMultiplier;
const treeMult = getClickMultiplierFromTree(state.evolutionTree);
const total = base * prestigeMult * treeMult;
const doubleChance = getDoubleClickChance(state.evolutionTree);
const critChance = getCritClickChance(state.evolutionTree);
const autoClicksPerSec = getAutoClicksPerSecond(state.evolutionTree);
// Expected value per click = total × (1 + doubleChance × 1 + critChance × 9)
const expectedPerClick = total * (1 + doubleChance + critChance * 9);
// Auto-clicks produce total per auto-click (no double/crit on auto)
const effectivePerSec = autoClicksPerSec * total;
return { base, prestigeMult, treeMult, total, doubleChance, critChance, autoClicksPerSec, effectivePerSec };
}
export interface ClickResult {
state: GameState;
gain: number;