Hoopa and Ansha Making Donuts Together in Legends: Z-A

Legends: Z-A Donut Mechanics: Flavor Powers, Priorities, and The Math of Resets


Applicable Games:
Legends: Z-A
Mega Dimension

Understanding the Legends: Z-A donut algorithm will help you understand why the best community recipes actually work. The game presents an extremely simple interface for selecting up to 8 berries, but under the hood the logic is a complex budget-priority system that dictates which Flavor Powers actually make the cut. This guide goes over the logic behind crafting donuts and provides some analysis and recommendations based on what’s going on.

Fortunately for the community, the vast majority of popular recipes shouldn’t change, but perhaps your priorities will shift once you know the true probabilities of getting the powers that you want. This guide should help you determine when you should chase the perfect donut or when you should just start playing.

Before we dive in, here’s a quick summary (a TL;DR, if you will):

  • The Budget Wall: The game rolls a “wishlist” of powers, but caps them based on a total budget related to the total Flavor Power (up to a value of 9). If you over-invest in multiple flavors, you risk losing out on high-level powers.
  • The Sparkling Power Problem: Unlike other powers, Sparkling Power always costs 3 budget points, rather than a point per level. Combined with the other Sweet Power, Size Power, you might miss out on Sparkling from time-to-time even if it's still extremely likely. This is also why you can’t consistently get high-level Sparkling Powers, each level has the same chance!
  • Rainbow Donuts: When a Rainbow Donut is made, all flavors get a boost to their budget, which allows you to get higher powers if you’re willing to risk the randomness of the game deciding between 4 or more power types.
  • Efficiency vs. Perfection: Statistically, it’s important to remember that chasing for the absolute perfect donut will only waste time in the long run, as “Good Enough” donuts (Power Lv. 1-2) will typically yield more Shinies per hour than spending your time resetting for perfection (yes, even with the guaranteed shiny!). Though if you’re going after something extremely rare (scans like Gimmighoul) you might want to reset more.

What that said, let’s jump into the guide. Before that though, huge thanks to Anubis for her work to make these mechanics known. Additionally, we have a full Donut Calculator for Legends: Z-A that implements these mechanics to give you a good idea on what you will get!


A Primer on Game's Donut Creation Logic

Here's how donuts are generated in Legends: Z-A.

Flavor Budgets

Flavors are prioritized by Sweet, Spicy, Sour, Bitter and then Fresh. The game determines a "budget" cost for each of the flavors based on their individual scores.

Flavor Threshold Level Budget
120 1
160 2
200 3
300 4
360 5
420 6
525 7
700 8
760 9

If the top flavor score is tied with one or more additional flavors, the donut is flagged as a Rainbow donut, and every flavor receives an additional budget point.

Next, the Flavor Powers are rolled based on their cost. The rate of cost 1, cost 2, and cost 3 is different for each budget level. Once a level is decided, this is deducted from the budget. This effectively creates a "shopping list" of power levels the game will attempt to create.

Level Budget Cost 1 Chance Cost 2 Chance Cost 3 Chance
1 100%
2 100%
3 50% 50%
4 25% 75%
5 19.05% 42.86% 38.10%
6 14.29% 28.57% 57.14%
7 9.52% 33.33% 57.14%
8 33.33% 66.67%
9 100%

The costs mostly correspond to the Flavor Power levels as you see in the final result. However, there is one significant and unique exception: Sparkling Power. Sparkling Power Lv. 1, Lv. 2, and Lv. 3 of all types (yes, all 57 different powers) all cost 3 points. They never get cheaper.

Note: The raw table used by the game is weird and has an off-by-one for the randomization, which actually adds a single point to the highest available group in each row. This favors higher powers, which is why the table has uneven values.

Overall Donut Budget

With the flavor wishlist determined by the flavor scores, the game then uses the total of the flavor powers to determine the total budget of the donut. This total budget will then be used against the wishlist of the flavor powers to limit the final powers of the donut.

Total Flavor Total Level Budget
120 1
240 2
350 3
420 4
500 5
600 6
700 7
800 8
960 9

With the final budget known, it will then try to assign the Flavor Powers to the donut.

First, it will pick the highest value power that was rolled between all the flavors. If more than one flavor has the same highest level then the flavor with the highest absolute value is chosen. If more than one flavor has the same highest level, and their flavor values are tied, the game will roll to break the tie.

Once selected, that specific flavor and level combination is removed from the wishlist for the next round as it is "spent." If you run out of total budget, the level of the last power will be reduced.

Rolling for Flavor Powers

When rolling for Flavor Powers, the game creates a list of all eligible Flavor Powers that match the level and flavor. For example, if rolling for a Sweet Lv. 3, this will include all 57 Sparkling Powers (since each of them are a cost of 3) and the three Lv. 3 size powers (Alpha, Humungo, Teensy) for a total of 60 Flavor Powers. Each eligible power is as equally likely to be picked as any other (we call this a uniform distribution).

Each flavor’s powers fall into two categories, and the donuts only allow 1 power from each category. This eliminates strange combos, such as two Size powers like Teensy & Alpha in the same donut. Once a category is chosen, it cannot be picked again. For example, if Sparkling is chosen for Sweet, then any other Sweet Flavor Powers rolled must be from the "Size" category.

For the purposes of our Donut Maker calculator, we've divided them up with the following names according to these categories:

Flavor Category Name Power List
Sweet Sparkling Sparkling Power (All Types)
Sweet Size Alpha Power
Humungo Power
Teensy Power
Spicy Move Move Power
Spicy Battle Attack Power
Sp. Attack Power
Speed Power
Sour Item Item Power (All Subcategories)
Sour Distortion (Affects Distortion-specific things) Mega Charging Power
Mega Conservation Power
Big Haul Power
Bitter Resistance Resistance Power (All Types)
Bitter Defense Defense Power
Sp. Defense Power
Fresh Encounter Encounter Power
Fresh Catch Catch Power (All Types)

As a bonus to the player, if a donut runs out of budget when assigning a Flavor Power, the Flavor Power is downgraded to the remaining budget level. For example, if only 2 points of the overall donut budget are left, but the wishlist is trying to fulfill a 3-cost selection, it will simply change it to a Lv. 2 Power.

Special Donuts for Specific Pokémon Encounters

The Special Donuts (those required for encountering Kyogre, Groudon, Rayquaza, Darkrai, and Zeraora) have a few special rules that make them slightly different in their generation. First thing to note is that if they qualify to be Rainbow Donuts, they will behave as Rainbow Donuts (giving a +1 to Flavor Budgets of top tied stats) even though they display the special donut type.

A Special Donut's first Flavor Power slot is automatically filled by the special power associated with that donut (i.e. Pitch-Black Power associated with Darkrai's Bad Dreams Cruller). The other two Flavor Powers are assigned based on the flavor values following general donut construction.

However, Special Donuts also exclude powers that would not be useful in the boss fights. All Sweet powers become ineligible for selection (the boss fights cannot be shiny nor can they have their sizes affected), all Fresh powers are ineligible (no need for Catch or Encounter powers), and Item Power and Big Haul powers from Sour are ineligible. All other powers–notably all Spicy (offensive bonuses) and Bitter (defensive bonuses) powers–are available, so plan accordingly.

Donut Naming

This one isn't as important, but if you care about the aesthetics, donut names are predictable. Donut names consist of three "words". The first adjective is based on the first Flavor Power of the generated donut.

The berry name that is selected is based on the following logic:

  1. Berry that there is the most of
  2. If quantities are tied, pick the berry from those with the highest value of a top flavor
  3. If multiple berries are still tied for quantity and top flavor value, pick which was added first.

Finally, the donut's ingredient type is based on flavor: Meringue for Sweet, Curry for Spicy, Jam for Sour, Chocolate for Bitter, and Cream for fresh.


Major Takeaways to Understand

The Rainbow Donut "Trap"

Many users claim that Rainbow Donuts (when you have a tie between 2 or more flavors for the highest Flavor Score) are the best option for hunting. Rainbow Donuts have their use (see one of the follow-up sections below) and you should make them when it makes sense. However, from a praobability standpoint, Rainbows are best for “general purpose” donuts.

When you create a Rainbow Donut, you are inviting all of your top-tied flavor profiles to compete for dominance. If you make a Sweet-Fresh Rainbow, the game might roll a high-level Catching Power and then a high-level Size Power leaving no room for the Sparkling plus Alpha combo you wanted. If your goal is specifically Shiny Hunting, you are diluting your chances by cluttering the pool with powers that aren't as useful.

A popular Rainbow Donut for Shiny Hunting is this extremely efficient "Haban" Rainbow Donut (you can see these stats on our Donut Calculator):

The recipe and initial results for a "haban rainbow donut"A Rainbow Donut hyper-focused Sweet and Fresh.
the results from the haban rainbow donut showing various percentage chances of getting specific power at different levelsThis Haban Rainbow Donut has a good mix between Fresh and Sweet Powers. However, because of the "Rainbow" nature of this donut, it is not guaranteed to get Sparkling Power and you have a pretty good chance of Encounter Power which might not be wanted. However, this is one of the best ways to get Sparkling, Size, and Catching in a single donut!

(Haban Rainbow Donut Recipe reported by X user @4259BlueRose3, you can compare to the All Sweet donut results in a later section of the guide.)

Fortunately for us, the developers grouped the powers granted by flavors in a way that benefits the types of use you're going for. For example, the best possible donuts for just Shiny hunting are those that give the highest possible value to Sweet. Unless you really need some of the other powers, it is far more important to focus on one flavor for the best chances at powers from single flavors, if that’s what you are after.

When to Use Rainbows (Berry Scarcity and Cross-Flavor Combinations)

Rainbow Donuts are most efficient for players that do not have many of the high cost berries and want a mixture of powers across flavors. The donut recipes that focus on extremely high values for Sweet, for example, require eight Hyper Tanga Berries which are hard to come by. If you haven't yet spent the time farming for high value berries, the +1 bonus for each of the flavor values has a high impact.

For this reason, a Rainbow Donut is the efficient choice for casual players or resource-poor players. It allows you to use some of your berries that would normally just sit in your inventory to play the game. For that reason, we recommend using Rainbows for general gameplay, not for the extreme hunts where you want to maximize your chances at shiny hunting alphas.

When to Use Mixed Flavor Powers and But Not Rainbow

If Rainbow Donuts are risky because they dilute your pool, how do you get specific combinations like Sparkling (Sweet) and Catching (Fresh) without the competing powers? You need to use donuts that hit specific thresholds rather than maximizing everything.

The game logic decides to choose powers based on the highest cost first. However, if two flavors roll the same cost (e.g. a Cost 3 Sweet vs a Cost 3 Fresh), the tie is broken with the Flavor Score.

Let’s say you want to make a donut that prioritizes Sparkling Power but also want a decent Catching Power and perhaps a Size Power as a bonus. You can force the game to attempt the Sparkling Power first by ensuring your Sweet score is higher than your Fresh score (e.g. Sweet 420, Fresh 300). By winning the tie-breaker, Sweet spends the budget first, ensuring the first power gets access to the full cost 3 (which is especially important for Sparkling power, see the next section).

These non-Rainbow donuts are also excellent for resource management, allowing you to save your rare Tanga berries for “pure Sweet” donuts when you want the absolute best chance at Sparkling Power.

The Sparkling Priority Issue

Because Sparkling Powers have a fixed cost of 3, they are the most "fragile" powers in the game. If you have a high-powered Sweet donut recipe (like the all Hyper Tanga Berry recipe), you will have a 100% chance of Size Power and a 98.13% chance of Sparkling Power. That missing 1.87% is fascinating, even though getting Sparkling Power is still quite consistent.

The All-Hyper-Tanga Sweet donut recipe that gives the highest thresholds for sweetThis donut has the highest-possible Sweet Flavor Score, but requires 8 Hyper Tanga Berries which are among the rarest to get!
the results for the all-tanga sweet donuts, showing that size power is guaranteed, but sometimes you might miss out on a Sparkling powerThese are the chances for your powers if you use the All Hyper Tanga Berry recipe. Size power is always guaranteed but the Sweet Power cost has the side effect of not being always being guaranteed!

(Note: you can take a look at this recipe on our calculator here.)

The reason it isn’t a perfect 100% comes down to how the “one power per category” limitation interacts with fixed costs. To get both a Size Power and a Sparkling Power, the game needs to roll both.

For example, let’s say that you use the all Hyper Tanga Berry recipe and the game has rolled a 3-cost power and then a 2-cost power from Sweet. When the game tries to roll a power that costs 3, it looks at the pool of all available options: 57 Sparkling Powers + 3 level 3 Size Powers. If the game picks Size Power (a 3/60 chance) first, then the “Size” category can no longer be selected.

The game then tries to fulfill the 2 cost power. It must pick from the remaining Sparkling category. However, because all Sparkling powers cost 3 points, there are no eligible candidates remaining! This 2-cost slot fails to assign a power, and the final donut only has that level 3 Size Power.

Compare this to a high-power Sour donut recipe (e.g. the all Hyper Kasib Berry recipe). If the game similarly rolls a 3 and a 2 wishlist, it can always fulfill both because Distortion and Item powers exist at lower costs.

This continues to become a larger problem as you start to mix flavors, especially with Rainbow donuts. Because so much of the donuts are random, Sparkling is a pain to get. Consider this example:

Many players (especially those hunting Beldum in Heavy Ball or the Beast Ball hunters) appreciate donuts that offer all three of Sparkling Power, Alpha Power, and Catching Power. A good recipe that accomplishes this for high Sweet (700+ Flavor Power) and relatively high Fresh (200+ Flavor Power) is the non-Rainbow 4x Hyper Tanga Berry and 4x Hyper Haban Berry recipe. Based on the thresholds, the best donut this could make will give you a Sparkling Power Lv. 3, a Size Power Lv. 3, and a Catching Power Lv. 2 (due to priority selection, a level 3 Fresh Power is not possible with this donut).

A high-sweet power but with good fresh recipe that isn't a rainbowThis recipe accomplishes a high Sweet Flavor Score while also maintaining a good amount of Fresh Flavor Score.
The results for the haban-tanga-non-rainbow recipeLooking at these results, you'll notice it is a lot more likely to get Sparkling and Size Powers with a good chance at a Catching Power!

This recipe gives you a 100% chance of Size Power (~33.33% for Alpha of any Level), a 95.78% chance of Catching Power, a 19.80% chance of Encounter Power, and a 84.42% chance of Sparkling Power.

Why? Because we've added Fresh to the mix, the game has a chance of choosing a Lv. 3 Size Power first. If the game then chooses a Lv. 2 Catching Power (Cost 2) as its second power, we have already spent 5 budget points. If our Total Budget was only 7, we have 2 points remaining.

Since Sparkling Power costs 3, we are now locked out from getting it. The game simply cannot afford it. The game will resolve the donut with an empty slot or some other power that you don't want depending on the ingredients. To get the perfect donut, you have to be doubly lucky: either roll Sparkling Power first, or have the game's wishlist choose two 3-cost Sweet options first!

This is why Sparkling Power can be more difficult to find in mixed-flavor donuts! Because the game throws every Sparkling Power (all 57 individual powers across all three levels) with the Size Powers of Level 3 in the same pool, you risk hitting that budget wall if Size is picked first.

So, if you don't need Catching Power, and can afford high-powered pure-Sweet donuts, go for it! If you can't, it's worth grinding Sour Donuts for Item Power: Berry (Lv. 3) with Big Haul power to stock up.


Balancing Your Time: Resetting vs. Playing

We have established that getting a "Perfect Donut" (e.g. Sparkling Lv. 3 + Alpha Lv. 3) is statistically difficult due to the Budget Crunch and the problem of all Sparkling powers costing 3. This leads to the final question: Is it worth soft-resetting over and over for 20 minutes to get the Perfect Donut, or should you just accept a "Great" donut (Sparkling Lv. 2-3 + Alpha Lv. 2-3) and start playing?

The Math of Resets

Let's look at a typical Perfect Donut. Both of these donuts are made from the pure Sweet donut that uses 8 Hyper Tanga Berries. For convenience, the calculator can also report on your chance of getting sought after combos. For the all-sweet donut, these are some combo results you can expect:

A set of probabilities for the all-sweet Tanga Donut output, showing some sought after powersThis is a breakdown of your chances for various sought-after combos when creating donuts. The first three include "Sparkling Lv. Any" which is looking for any Sparkling Power at any level, meaning you do not care which Type it selects (i.e. could be Fire or Ghost or anything else). The bottom two are looking for Sparkling Powers of "1 Type + All" which means you have exactly one Type of Sparkling Power you are resetting for (e.g. exactly Fire or All). You can see that narrowing the results down to more specific powers decreases your chances.

If done perfectly, with consistent timing on Switch 2, it can take you about a minute (60 seconds) to create a donut, check the results, reload from a backup save, and return to Ansha. In reality, especially on the original Switch, it will likely take longer. Let's take a look at two of these specific combos:

  • The “Perfect” Donut (Sparkling Lv. 3 [specific type or "All"]+ Alpha Lv. 3)
    • Probability: 0.73%
    • Average Number of Donuts Made: 137
    • Donuts for 95% chance: 408
    • Time Cost (Optimal Avg. - Switch 2): 137 minutes = 2 hours and 17 minutes

Then how about a "Good Enough" roll (looking for a specific type):

  • The “Good Enough” Donut (Sparkling Lv. 1-3 [specific type or "All"] + Alpha Lv. 1-3)
    • Probability: 3.44%
    • Average Number of Donuts Made: 29
    • Donuts for 95% chance: 86
    • Time Cost (Optimal Avg. - Switch 2): 29 minutes

So, the big question is: is it worth your time to go for the absolute perfect donut? In the nearly 2 additional hours that you'd spend on average getting one single perfect donut, you could have jumped into multiple Distortions and encountered far more Pokémon to make up for the minor improvement to your Shiny Rate.

Remember, with the Shiny Charm, Sparkling Power Lv. 1 is a 1/819.60 chance while Sparkling Power Lv. 3 is 1/585.57 (plus a guaranteed Shiny spawn). Is this difference really worth your time when you could be playing?

Time Cost of Resets

Let’s break down the time cost and how it affects shiny hunting. In the ~2.5 hours you spend resetting for that one “Perfect Donut,” you could have settled for four “Great” donuts and run four full distortions.

Mathematically, seeing four times the number of spawns with a “worse” chance is superior to seeing a single set of spawns with the “best” chance

Scenario 1: Using the “Perfect” Donut:

  • Time spent resetting: 2+ hours
  • Number of Distortions Played: 1
  • Theoretical Number of Spawns: 500
  • Average Shiny Pokémon: 1 Guaranteed + ~0.85 random Shinies = ~1.85 Shinies

Scenario 2: Using a “Good Enough” Donut:

  • Time spent resetting + Playing: 2 hours resetting + 17 minutes playing
  • Number of Distortions Played: 4
  • Theoretical Number of Spawns: 500 * 4 = 2,000
  • Average Shiny Pokémon: ~2.44 random Shinies

You actually find fewer shiny Pokémon by obsessing over the perfect Sparkling/Size combination even with the guaranteed Shiny from Sparkling Lv. 3. These results doesn’t even consider that “suboptimal” donuts might still roll Sparkling Lv. 3 naturally.

Note: These are extremely simplified scenarios. You might still want a more perfect donut for special scans, like hunting rare Pokémon such as Gimmighoul, Rotom, Porygon-Z or Frigibax, which may be more difficult to find. You might also have less-strict requirements which would increase your chances.

Shiny Alpha Hunting Notes

Now, if your goal is a Shiny Alpha, then the math is even more skewed against resetting for the perfect donut. Keep in mind the following improvements to your chances based on these powers:

  • Sparkling Power: Increasing from Lv. 1 to Lv. 3 is a less than 2x improvement to your shiny chances. 
  • Alpha Power: 
    • Lv. 2 is a 21x improvement to Alpha Spawns. (1% -> 21% spawn rate)
    • Lv. 3 is a 51x improvement to Alpha Spawns. (1% -> 51% spawn rate)

Even if you go into a distortion with a mismatched Sparkling Power (i.e. taking “Fire” into a primarily Ghost-type distortion) finding an Alpha Shiny is significantly more likely with just the Alpha boost alone! Resetting over an Alpha Power Lv. 3 donut because the Sparkling Power isn’t perfect or doesn’t match your target Pokémon might be wasting your time that you could be spending hunting.

Recommendations From the Math

This same logic also applies to Sour Powers like Big Haul and either Berries or Poké Balls. Focus on getting easy donuts and then just go through distortions. As an additional bonus, you're also likely to find non-boosted Shiny Pokémon while searching for the giant Poké Ball orbs.

For shiny hunting, it is also important to remember that Legends: Z-A is perhaps the most generous title for shiny hunters to date. Shiny Charm already gives an extra roll (a 1/1024.38 chance) and the Shiny Stash exists to make sure players don’t miss Shiny Pokémon. Additionally, there are multiple ways to stall the clock in Distortions such as spamming Fly back to the entrance or constantly activating Holovators to refresh spawns.

The point is, unless you are hunting something extremely rare or want to make your Legendary Pokémon Shiny hunts more efficient or really want the best-possible chance for rare spawns, it is probably better to just play the game. The more I look at the algorithm and the chances for specific powers the more convinced I am that the developers intentions are the optimal way to play.

In fact, if you're interested in some low-cost recipes that have a good chance at Sparkling Powers and the Item Powers to replenish your berries while you're running around Hyperspace Distortions, take a look at the appendix.


Conclusion

Donuts are weird. I think that mechanically they're way too random, especially when compared to the sandwich mechanics from Scarlet and Violet. Donuts are far simpler to make, but that comes with the drawback of having to consider and fight the randomness.

Additionally, the Mega Dimension DLC really doesn't have too much additional content, and the Hyperspace Distortions are so small that they are clearly designed to be short and fast experiences. As such, the donut mechanics fit perfectly into the designed gameplay loop. 

It seems the most enjoyable way to play is to just get decent donuts and run into the distortions. The amount of randomness involved for donut crafting and distortion hunting is too high to bother wasting your time resetting unless you're hunting extremely rare or specific things.

Though, play however you want. I'll be keeping myself sane.


Appendix - Some Donut Recipes

Sweet and Sour Low-Cost Rainbow Donuts

For fun, I went through and calculated some Rainbow Donuts that use common berries for both Sweet and Sour Powers. These will give you a decent chance at Sparkling and Item-based Powers.

If you're willing to spend some Tanga and Kasib berries, this recipe gives Sweet and Sour Flavor Powers of 360 to increase high-level powers:

A donut recipe for a Rainbow Donut for 360 Flavor Power in Sweet and Sour

If you just want to hit 300 Sweet and Sour Flavor Powers for lower chances at the high-level powers, this recipe is slightly cheaper:

A recipe for a sweet + sour rainbow donut with 300, but requires two tanga

Or if you don't want to use Hyper Tanga Berries at all for the 300 Sweet and Sour:

A donut recipe for a rainbow that hits 300 with no tanga berries

Finally, if you're all-in on the best Rainbow Donut for Sweet and Sour, you can use 4 Hyper Tanga Berries and 4 Hyper Kasib Berries.

A donut recipe for a rainbow donut that hits 420 for sweet and sour

Sweet and Sour Low-Cost Non-Rainbow Donuts

Additionally, here are a few recipes that are good for Sweet and Sour but give Sweet a higher priority by not being a Rainbow Donut. First, here's a donut where Sweet hits 360 Flavor Power and Sour hits 300 Flavor Power:

a donut recipe that covers high powered sweet with decent sour

Or if you want to use an additional Hyper Tanga Berry and use a Colbur Berry:

a non-rainbow donut that uses an additional Tanga berry but also lowers the cost of other berry usage

Low Cost Sweet Donuts that Allow Sparkling Power

If you just want a chance at Sparkling and don't care much for the Size Powers there are a few fairly cheap recipes that just barely break into the threshold for Sparkling Power. These still need a Hyper Tanga Berry and they don't have a ton of Energy, but they are good for 3-Star Distortions if you're low on berries.

Recipe 1 uses 4 Roseli Berries:

A donut recipe that covers only sweet and is really quite cheap to make with only one hyper tanga

Recipe 2 uses 1 Roseli Berry but 6 Hyper Pecha Berries:

A donut recipe for a Sweet Donut that uses mostly cheap berries, but it low powered