diff --git a/src/App.tsx b/src/App.tsx index f0ba223..42d9fc1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -20,10 +20,15 @@ const TIERS: Tier[] = [ { name: 'Gold', unlockPrice: 15, buyPrice: 10, gubblePointChance: 0.1 }, { name: 'Platinum', unlockPrice: 30, buyPrice: 20, gubblePointChance: 0.1 }, { name: 'Diamond', unlockPrice: 75, buyPrice: 50, gubblePointChance: 0.2 }, - { name: 'Master', unlockPrice: 750, buyPrice: 500, gubblePointChance: 0.2 }, - { name: 'Legend', unlockPrice: 10000, buyPrice: 8000, gubblePointChance: 0.3 }, + { name: 'Legend', unlockPrice: 750, buyPrice: 500, gubblePointChance: 0.2 }, + { name: 'Ultra', unlockPrice: 10000, buyPrice: 8000, gubblePointChance: 0.3 }, { name: 'Ultimate', unlockPrice: 100000, buyPrice: 80000, gubblePointChance: 0.3 }, { name: 'Champion', unlockPrice: 5000000, buyPrice: 4000000, gubblePointChance: 0.4 }, + { name: 'King', unlockPrice: 100000000, buyPrice: 80000000, gubblePointChance: 0.5 }, + { name: 'Queen', unlockPrice: 1000000000, buyPrice: 800000000, gubblePointChance: 0.6 }, + { name: 'Emperor', unlockPrice: 10000000000, buyPrice: 8000000000, gubblePointChance: 0.7 }, + { name: 'God', unlockPrice: 100000000000, buyPrice: 80000000000, gubblePointChance: 0.8 }, + { name: 'Goddess', unlockPrice: 1000000000000, buyPrice: 800000000000, gubblePointChance: 0.9 }, ]; const START_MONEY = 6; @@ -47,7 +52,7 @@ function App() { }[]>([]); // --- Gubble Store State --- const [isStoreOpen, setIsStoreOpen] = useState(false); - const [upgrades, setUpgrades] = useState({ evenDouble: false, oddDouble: false, allTripple: false, gubbleDouble: false }); + const [upgrades, setUpgrades] = useState({ evenDouble: false, oddDouble: false, allTripple: false, gubbleDouble: false, addFourthNumber: false }); const [upgradeBought, setUpgradeBought] = useState(false); // --- Tier Unlock Logic --- @@ -64,9 +69,10 @@ function App() { setMoney(m => { if (m < tier.buyPrice) return m; if (!unlockedTiers.includes(tier.name)) return m; - // Generate 3 unique winning numbers (1-9) + // Generate unique winning numbers const winningNumbers: number[] = []; - while (winningNumbers.length < 3) { + const winningCount = upgrades.addFourthNumber ? 4 : 3; + while (winningNumbers.length < winningCount) { const n = Math.floor(Math.random() * 9) + 1; if (!winningNumbers.includes(n)) winningNumbers.push(n); } @@ -79,7 +85,7 @@ function App() { ]); return m - tier.buyPrice; }); - }, [unlockedTiers]); + }, [unlockedTiers, upgrades]); // --- Gubble Store Logic --- const handleBuyUpgrade = useCallback((upgrade: keyof Upgrades, cost: number) => { diff --git a/src/components/GubbleStore.tsx b/src/components/GubbleStore.tsx index 867b4ec..0ec33c3 100644 --- a/src/components/GubbleStore.tsx +++ b/src/components/GubbleStore.tsx @@ -5,6 +5,7 @@ type Upgrades = { oddDouble: boolean; allTripple: boolean; gubbleDouble: boolean; + addFourthNumber: boolean; }; type GubbleStoreProps = { @@ -20,6 +21,7 @@ const UPGRADE_LIST: { key: keyof Upgrades; label: string; cost: number; descript { key: 'oddDouble', label: 'Double Odd Winnings', cost: 60, description: 'Double winnings from odd numbers.' }, { key: 'allTripple', label: 'Tripple All Winnings', cost: 150, description: 'Tripple all winnings.' }, { key: 'gubbleDouble', label: 'Double Gubble Point Gains', cost: 50, description: 'Double gubble point gains.' }, + { key: 'addFourthNumber', label: 'Add Fourth Winning Number', cost: 200, description: 'Adds a fourth winning number to each card.' }, ]; const GubbleStore: React.FC = ({ isOpen, onClose, gubblePoints, upgrades, onBuyUpgrade }) => { diff --git a/src/components/TierCard.tsx b/src/components/TierCard.tsx index a6c2dbc..a60f273 100644 --- a/src/components/TierCard.tsx +++ b/src/components/TierCard.tsx @@ -11,6 +11,10 @@ type TierCardProps = { }; const TierCard: React.FC = React.memo(({ tier, unlocked, money, onUnlock, onBuy }) => { + const formatter = Intl.NumberFormat( + 'en', + { 'notation': 'compact' } + ) return (