Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ImLukzy/ChefDash/llms.txt

Use this file to discover all available pages before exploring further.

ChefDash’s economy gives every tap at the ingredient grid a financial consequence. Coins flow in when orders are completed correctly and flow out in the shop between levels. A combo multiplier rewards players who string together consecutive perfect orders, and three consumable power-ups let players spend coins for tactical advantages before a round begins. Understanding how each mechanism interacts helps you make smart purchasing decisions and maximise your coin earnings.

Starting Coins

Every new GameState instance initialises with 150 coins, giving fresh players enough budget to purchase at least two upgrades before they have earned any in-game.
@Published var coins: Int = 150

Earning Coins Per Order

Each successfully completed order pays a flat 25 base coins, multiplied by the current combo multiplier:
private func triggerSuccess() {
    ordersCompletedInSession += 1
    showPerfectMessage = true

    let baseCoinsPerOrder = 25
    let hasSauce = shopInventory.first(where: { $0.id == "sauce" })?.quantityOwned ?? 0 > 0
    let bonusCoins = hasSauce ? 10 : 0
    coins += (baseCoinsPerOrder + bonusCoins) * comboMultiplier

    if comboMultiplier < 5 { comboMultiplier += 1 }

    onRecipeSuccessBonusTime?()
    // ...
}
At a 3× combo with no sauce, a single order pays 75 coins. At the maximum 5× combo with sauce active, that climbs to 175 coins per order.

The Combo Multiplier

The combo multiplier is the primary skill-expression mechanic in ChefDash. It starts at 1× each round and grows by 1 with every consecutive successful order, capping at 5×. A single wrong ingredient tap resets it back to 1×.
@Published var comboMultiplier: Int = 1
1

Start round

comboMultiplier is set to 1 (or 2 if the 🔪 Cuchillo Afilado upgrade is equipped).
2

Successful order

comboMultiplier increments by 1, up to the maximum of 5.
3

Error triggered

comboMultiplier resets to 1 immediately inside triggerError().
Combo StreakMultiplierCoins per Order (no sauce)
0 consecutive25 🪙
1 consecutive50 🪙
2 consecutive75 🪙
3 consecutive100 🪙
4+ consecutive125 🪙

Shop Power-Ups

The shop offers three consumable items. Each is a ShopItem value with a unique string id, a price in coins, and an UpgradeType that determines how GameState applies it.
struct ShopItem: Identifiable {
    let id: String
    let title: String
    let description: String
    let emoji: String
    let price: Int
    let type: UpgradeType
    var quantityOwned: Int = 0
}

enum UpgradeType: String, Codable {
    case extraTime
    case comboBooster
    case instantServe
}

🌋 Horno Industrial

ID: "oven" · Price: 50 🪙Type: .extraTimeAdds +5 seconds of extra time to the current round. Applied in RecipesView.onAppear when "oven" is present in selectedUpgradesForRound.

🔪 Cuchillo Afilado

ID: "knife" · Price: 30 🪙Type: .comboBoosterStarts the round with a combo ×2 already active instead of ×1. Applied inside startNewRound() before gameplay begins.

🥫 Salsa Secreta

ID: "sauce" · Price: 40 🪙Type: .instantServeAdds +10 bonus coins to every perfectly completed order for as long as the item has quantityOwned > 0.

Equipping Upgrades

Before each round the player sees the pre-game modal in MainMapView. Any owned item can be toggled into selectedUpgradesForRound:
// Toggling in the pre-game overlay
if gameState.selectedUpgradesForRound.contains(item.id) {
    gameState.selectedUpgradesForRound.remove(item.id)
} else {
    gameState.selectedUpgradesForRound.insert(item.id)
}
selectedUpgradesForRound is a Set<String> of item IDs. Only items with quantityOwned > 0 show the USAR toggle button; items with none prompt the player to visit the shop instead.

How startNewRound() Applies Upgrades

When the player confirms the round, startNewRound() processes selectedUpgradesForRound in two phases:
func startNewRound() {
    ordersCompletedInSession = 0
    currentBurgerStack.removeAll()

    // Phase 1: Apply combo booster
    comboMultiplier = 1
    if selectedUpgradesForRound.contains("knife") {
        comboMultiplier = 2
    }

    // Phase 2: Decrement quantityOwned for every selected upgrade
    for upgradeId in selectedUpgradesForRound {
        if let index = shopInventory.firstIndex(where: { $0.id == upgradeId }) {
            if shopInventory[index].quantityOwned > 0 {
                shopInventory[index].quantityOwned -= 1
            }
        }
    }

    selectedUpgradesForRound.removeAll()
    generateNextOrder()
}
The oven upgrade (+5s) is not applied inside startNewRound(). Instead, RecipesView.onAppear checks whether "oven" was in selectedUpgradesForRound at the moment the view appears and adds 5.0 seconds directly to the local timeRemaining state. The quantityOwned decrement still happens in startNewRound().

The Sauce Bonus in Detail

The Salsa Secreta bonus is checked at the moment each order succeeds, not at the moment the round is configured:
let hasSauce = shopInventory.first(where: { $0.id == "sauce" })?.quantityOwned ?? 0 > 0
let bonusCoins = hasSauce ? 10 : 0
coins += (baseCoinsPerOrder + bonusCoins) * comboMultiplier
In the current source, hasSauce evaluates quantityOwned > 0 at the time each order is completed — not whether the sauce was “selected” for the round via selectedUpgradesForRound. This means that if you own sauce but did not select it for the round, it will still grant the +10 coin bonus on every order, and its quantityOwned will not be decremented (since it was never added to selectedUpgradesForRound). Purchase and selection mechanics may be revised in a future update.

Purchasing Items

The shop deducts the item’s price from coins and increments quantityOwned by 1:
// Shop purchase logic (conceptual from ShopView)
state.coins -= item.price
shopInventory[index].quantityOwned += 1
There is no upper limit on how many of a single consumable you can own. Stocking up before a difficult level is a valid strategy — each copy of an item counts as a separate consumable charge.

Economy at a Glance

Coin Income

(25 + sauceBonus) × comboMultiplier per completed order. Maximum theoretical payout: 175 🪙 per order (5× combo + sauce).

Coin Expenditure

Oven 50 🪙 · Sauce 40 🪙 · Knife 30 🪙. Starting budget of 150 🪙 can fund one oven or one sauce + one knife.

Build docs developers (and LLMs) love