Welcome to Battle Factory Buddy
Sets
Ball tech
What is this?
Whenever you KO an opposing mon, the opposing trainer briefly shows up and alongisde it is 3 pokeballs representing their team. KO'd mons are greyed out and healthy mons are colored in. After you KO the first mon there's no useful information here - the rightmost ball is always greyed out. However, after you've KO'd the second mon there is useful information here.
At this point the display can either look like ○ ● ● or ● ○ ●. If it's the second of those then we know the AI specifically chose the 3rd mon in the party and that it wasn't a tie-break.
So what do I put here?
If you see ● ○ ● then the AI sent out the 3rd mon over the second mon, you should pick "third ball".
If you see ○ ● ● then the AI sent out the 2nd mon over the third mon, you should pick "second ball".
Help
What is this?
This site helps you work out what opponents you're facing or likely to face in the Battle Factory in Pokemon Emerald.
Where can I learn the basics of Battle Factory?
This site assumes the user understands how the rounds and pokemon sets work in the Battle Factory. If that's new to you then I highly recommend you go and check out this video guide by LRXC, as well as the linked resources on the video, and then come back here.
What do I do?
Fill in any data you know and hit calculate! If you don't select any fields it'll still run, just give you less specific data. More specifically, if you're starting a new round:
What does this cover?
This covers calculating what pokemon set you're likely up against and which pokemon are likely to be remaining on the opponents team. It does this by factoring in the pokemon on your team, the last team you faced (or pokemon you left in the draft), the scientist information and any moves / items that you've seen the opponent pokemon use. There's also the option to manually specify sets if you know some extra information not covered.
What doesn't it cover?
There's a few things this site doesn't automatically cover, you can factor all of these in and refine the sets yourself if you want to. Some extra ways to get info on sets namely:
- Damage calcs - different sets have different EV spreads and natures (indicated on the set cards), meaning the same moves can do different damage coming from different sets.
- Speed stats - similarly, different EV spreads can result in some sets outspeeding, and other sets underspeeding, your Pokemon.
- Items you haven't seen - e.g. if a pokemon stays paralyzed when it has a Lum Berry set.
- Move selection - AI move selection (in later rounds at least) is complicated, but there's scope to make some deductions. For example, if an opposing Pokemon doesn't fire off a move that'd kill your Pokemon, it's probably not that set.
- Swap logic - The AI has logic about when it hard-swaps its Pokemon and also about which Pokemon to bring out after the first opposing Pokemon is KO'd. If the AI brings in a Gardevoir on your Salamence it's probably more likely to be a set with Ice Punch.
Where do I report bugs / give feedback?
Find Dave Glorbus in the Battle Facilities Discord server
How does it work?
Pretty simple really. All pokemon sets are pulled from the spreadsheet linked in the guide video description. Then all possible opponent teams are worked out, respecting species clause and item clause and then assigned which rounds the team can appear in and which scientist phrases get activated. Working out probabilities is just a case of looking up the teams for given phrases and filtering out your current team, the previous team and sets for your opponent that don't match the moves / items / sets you've selected. It's then counts up all valid teams left and works out the probabilities from there.
Trivia
There are 15,914,824 valid factory teams opponents can have (not accounting for team order, where each team has 6 orders).
No Type / No Phrase is the most common combination (in Open Level Round 5+) - with around 4.4 million valid teams activating it. No Type / High Risk, High Return is next with around 4.1 million. There's a huge drop-off to third place which is No Type / Slow and Steady with only 900k before Water / No Phrase in fourth at 550k. The rarest you can see if Ghost / Total Preparation with only 67 possible teams, there are also a small number of combos (such as Ghost / Weakening the foe to start) that are impossible.
Disclaimer
This is a hobby project, it may be wrong and it may disappear - best of luck in your battling!
Magic Number
TL;DR
This only really matters in Open Level. In L50 and most Open Level cases just set this to 40 and you're good to go. If you've just got a kill using a high BP move, and the opponent has a high Atk/SpAtk matching that move's type then you might need to do a bit more work. In some niche cases finding the value can also provide extra info because of rounding odd numbers.
As a rule of thumb - try plugging in 1000 and 39 and see if either changes much and do a bit more digging if it'd materially change your play.
Credit
All the logic used here is taken from Xavion's fantastic doc explaining switch-in logic.
What should I do to work this out properly?
Glad you asked. Here's the rundown!
If the last move to be used was a status move (e.g. if you protect while the opponent dies to burn) then the number is just 3 (no need for further logic).
Assuming you're not so lucky then do the following.
- Get the relevant mons in your favourite damage calculator. Make sure IVs / EVs, stat boosts, weather, items etc. are all there.
- Give the opposing KO'd mon the last move used before they were KO'd. In most cases this will be the move that knocked them out, but if they die to Double-edge recoil or kill your mon and then die to poison it could be the move they used.
- Remove any relevant immunity abilities from your mon
- Remove any types from the KO'd mon that would give it STAB on that move (if you kill a Whiscash with EQ then take away its Ground type)
- Remove any types that are resisted / supereffective / immune from your mon (e.g. if your Charizard killed a Whiscash with EQ, take away Zard's Flying and Fire types)
- Find the max roll that the move would have done on the mon that killed it. (e.g. this Whiscash's EQ on flightless, fireless Zard)
- That max roll is your magic number.
So for a 31IV Charizard-2 killing a 3IV Whiscash-3 with Earthquake - the magic number would be 73.
Should I bother?
Not for Level 50. In practice in Open Level this is unlikely to be particularly relevant a lot of the time. The two things that matter are whether the number is even or odd and how close it is to 256 when considering multiplying by 1.5 (for STAB) and 2.0 (for SE status moves). To break this down a bit more:
- If the number is odd then various "type ordering" nonsense can break ties on phase 2 scores in a small number of cases.
- If the number is even then some of these will turn into "draws" to turn order on the Section 2 scores.
And for the numbers, a higher number basically means more draws on section 2 scoring, with the following breakpoints and examples in those ranges:
- 512 - most draws.
e.g. Snorlax-7 kill Marowak-2 with Hyper Beam - 256
e.g. Manectric-1 kills Alakazam-1 with Thunderbolt - 170
e.g. Tauros-2 kills Heracross-1 with Double-edge - 128 - Around (and after) this point it starts to make very little difference in practice
e.g. Salamence-1 kills Machamp-1 with Aerial Ace - 85
e.g. Salamence-1 kills Machamp-1 with Aerial Ace - 64
e.g. Venusaur-1 kills Whiscash-4 with Giga Drain - 50 - fewest draws
e.g. Swampert-1 killing Rhydon-1 with Surf
Why is it like this?
No idea.