Check out my first novel, midnight's simulacra!
Pokémon Go: Difference between revisions
| Line 240: | Line 240: | ||
==Battle mechanics== | ==Battle mechanics== | ||
Each named Attack (both Fast and Charged) has a base ''power'' P, a non-negative integer. This P can (and usually is) different depending on whether it's a PvE (raids, Team Rocket, gyms, Max) or PvP battle. | Each named Attack (both Fast and Charged) has a base ''power'' P, a non-negative integer. This P can (and usually is) different depending on whether it's a PvE (raids, Team Rocket, gyms, Max) or PvP battle. PvE Power ranges from 0 to 32, while PvP Power ranges from 0 to 20. | ||
{| class="mw-collapsible mw-collapsed wikitable" | {| class="mw-collapsible mw-collapsed wikitable sortable" | ||
! Attack !! Power !! Energy !! Cooldown !! DPS !! EPS !! Power !! Energy !! Turns !! DPT !! EPT | ! Attack !! Power !! Energy !! Cooldown !! DPS !! EPS !! Power !! Energy !! Turns !! DPT !! EPT | ||
|- | |- | ||
Revision as of 09:08, 7 May 2025
I know very little about the other Pokémon games.
Fucking with the APK
The APK can be downloaded from APKMirror and analyzed with e.g. Apktool.
Important content includes (in base/assets/):
- the plaintext, key-value text/i18n_en-us.json (salt for your language)
- the binary bin/Data/Managed/Metadata/global-metadata.dat
On-device
- Android/data/com.nianticlabs.pokemongo/files/il2cpp/Metadata/global-metadata.dat (salt for your OS)
- il2cpp indicates Unity stuff fwiw
Essential constants
CP multipliers are defined at increments of 0.5 for all levels 1 through 50 (plus a few more), constant across all species and stats. CPMs range from 0.094 to 0.8403.
| Level | CPM | Stardust requirement |
|---|---|---|
| 1 | 0.094 | 200 |
| 1.5 | 0.1351374318 | 200 |
| 2 | 0.16639787 | 200 |
| 2.5 | 0.192650919 | 200 |
| 3 | 0.21573247 | 400 |
| 3.5 | 0.2365726613 | 400 |
| 4 | 0.25572005 | 400 |
| 4.5 | 0.2735303812 | 400 |
| 5 | 0.29024988 | 600 |
| 5.5 | 0.3060573775 | 600 |
| 6 | 0.3210876 | 600 |
| 6.5 | 0.3354450362 | 600 |
| 7 | 0.34921268 | 800 |
| 7.5 | 0.3624577511 | 800 |
| 8 | 0.3752356 | 800 |
| 8.5 | 0.387592416 | 800 |
| 9 | 0.39956728 | 1000 |
| 9.5 | 0.4111935514 | 1000 |
| 10 | 0.4225 | 1000 |
| 10.5 | 0.4329264091 | 1000 |
| 11 | 0.44310755 | 1300 |
| 11.5 | 0.4530599591 | 1300 |
| 12 | 0.4627984 | 1300 |
| 12.5 | 0.472336093 | 1300 |
| 13 | 0.48168495 | 1600 |
| 13.5 | 0.4908558003 | 1600 |
| 14 | 0.49985844 | 1600 |
| 14.5 | 0.508701765 | 1600 |
| 15 | 0.51739395 | 1900 |
| 15.5 | 0.5259425113 | 1900 |
| 16 | 0.5343543 | 1900 |
| 16.5 | 0.5426357375 | 1900 |
| 17 | 0.5507927 | 2200 |
| 17.5 | 0.5588305862 | 2200 |
| 18 | 0.5667545 | 2200 |
| 18.5 | 0.5745691333 | 2200 |
| 19 | 0.5822789 | 2500 |
| 19.5 | 0.5898879072 | 2500 |
| 20 | 0.5974 | 2500 |
| 20.5 | 0.6048236651 | 2500 |
| 21 | 0.6121573 | 3000 |
| 21.5 | 0.6194041216 | 3000 |
| 22 | 0.6265671 | 3000 |
| 22.5 | 0.6336491432 | 3000 |
| 23 | 0.64065295 | 3500 |
| 23.5 | 0.6475809666 | 3500 |
| 24 | 0.65443563 | 3500 |
| 24.5 | 0.6612192524 | 3500 |
| 25 | 0.667934 | 4000 |
| 25.5 | 0.6745818959 | 4000 |
| 26 | 0.6811649 | 4000 |
| 26.5 | 0.6876849038 | 4000 |
| 27 | 0.69414365 | 4500 |
| 27.5 | 0.70054287 | 4500 |
| 28 | 0.7068842 | 4500 |
| 28.5 | 0.7131691091 | 4500 |
| 29 | 0.7193991 | 5000 |
| 29.5 | 0.7255756136 | 5000 |
| 30 | 0.7317 | 5000 |
| 30.5 | 0.7347410093 | 5000 |
| 31 | 0.7377695 | 6000 |
| 31.5 | 0.7407855938 | 6000 |
| 32 | 0.74378943 | 6000 |
| 32.5 | 0.7467812109 | 6000 |
| 33 | 0.74976104 | 7000 |
| 33.5 | 0.7527290867 | 7000 |
| 34 | 0.7556855 | 7000 |
| 34.5 | 0.7586303683 | 7000 |
| 35 | 0.76156384 | 8000 |
| 35.5 | 0.7644860647 | 8000 |
| 36 | 0.76739717 | 8000 |
| 36.5 | 0.7702972656 | 8000 |
| 37 | 0.7731865 | 9000 |
| 37.5 | 0.7760649616 | 9000 |
| 38 | 0.77893275 | 9000 |
| 38.5 | 0.7817900548 | 9000 |
| 39 | 0.784637 | 10000 |
| 39.5 | 0.7874736075 | 10000 |
| 40 | 0.7903 | 10000 |
| 40.5 | 0.792803968 | 10000 |
| 41 | 0.79530001 | 11000 |
| 41.5 | 0.797800015 | 11000 |
| 42 | 0.8003 | 11000 |
| 42.5 | 0.802799995 | 11000 |
| 43 | 0.8053 | 12000 |
| 43.5 | 0.8078 | 12000 |
| 44 | 0.81029999 | 12000 |
| 44.5 | 0.812799985 | 12000 |
| 45 | 0.81529999 | 13000 |
| 45.5 | 0.81779999 | 13000 |
| 46 | 0.82029999 | 13000 |
| 46.5 | 0.82279999 | 13000 |
| 47 | 0.82529999 | 14000 |
| 47.5 | 0.82779999 | 14000 |
| 48 | 0.83029999 | 14000 |
| 48.5 | 0.83279999 | 14000 |
| 49 | 0.83529999 | 15000 |
| 49.5 | 0.83779999 | 15000 |
| 50 | 0.84029999 | |
| 50.5 | 0.84279999 | |
| 51 | 0.84529999 |
Additionally, each Pokémon species has three base stats defined at each level:
- Attack (ATK): 17 (Shuckle) to 414 (Deoxys (Attack Forme))
- Defense (DEF): 32 (Igglybuff) to 396 (Shuckle again)
- Stamina (STA): 1 (Shedinja) to 496 (Blissey)
Effective stats
Each individual Pokémon augments its base species stats with three individual values (IVs) ranging from 0 to 15. Adding the former to the latter and scaling by the appropriate CPM generates an effective attack EffA, effective defense EffD, and maximum HP MHP for that Pokémon, all positive rationals.
- Effx = (Basex + IVx) * CPM(Level) = Basex * CPM(Level) + IVx * CPM(Level)
Shadow Pokémon have their A divided by ⅚, and their D multiplied by ⅚.
FIXME need hitpoint calculation
Battle mechanics
Each named Attack (both Fast and Charged) has a base power P, a non-negative integer. This P can (and usually is) different depending on whether it's a PvE (raids, Team Rocket, gyms, Max) or PvP battle. PvE Power ranges from 0 to 32, while PvP Power ranges from 0 to 20.
| Attack | Power | Energy | Cooldown | DPS | EPS | Power | Energy | Turns | DPT | EPT |
|---|---|---|---|---|---|---|---|---|---|---|
| Acid | 11 | 10 | 1 | 11 | 10 | 6 | 5 | 2 | 3 | 2.5 |
| Air Slash | 12 | 8 | 1 | 12 | 8 | 9 | 9 | 3 | 3 | 3 |
| Astonish | 7 | 13 | 1 | 7 | 13 | 12 | 10 | 3 | 4 | 3.33 |
| Bite | 6 | 4 | 0.5 | 12 | 8 | 4 | 2 | 1 | 4 | 2 |
| Bubble | 10 | 12 | 1 | 10 | 12 | 8 | 11 | 3 | 2.67 | 3.67 |
| Bug Bite | 5 | 6 | 0.5 | 10 | 12 | 3 | 3 | 1 | 3 | 3 |
| Bullet Punch | 10 | 11 | 1 | 10 | 11 | 6 | 7 | 2 | 3 | 3.5 |
| Bullet Seed | 7 | 13 | 1 | 7 | 13 | 5 | 13 | 3 | 1.67 | 4.33 |
| Charge Beam | 7 | 14 | 1 | 7 | 14 | 5 | 11 | 3 | 1.67 | 3.67 |
| Charm | 20 | 11 | 1.5 | 13.33 | 7.33 | 15 | 6 | 3 | 5 | 2 |
| Confusion | 19 | 14 | 1.5 | 12.67 | 9.33 | 16 | 12 | 4 | 4 | 3 |
| Counter | 13 | 9 | 1 | 13 | 9 | 8 | 6 | 2 | 4 | 3 |
| Cut | 5 | 5 | 0.5 | 10 | 10 | 3 | 2 | 1 | 3 | 2 |
| Double Kick | 10 | 13 | 1 | 10 | 13 | 8 | 12 | 3 | 2.67 | 4 |
| Dragon Breath | 6 | 4 | 0.5 | 12 | 8 | 4 | 3 | 1 | 4 | 3 |
| Dragon Tail | 14 | 8 | 1 | 14 | 8 | 13 | 9 | 3 | 4.33 | 3 |
| Ember | 10 | 10 | 1 | 10 | 10 | 7 | 6 | 2 | 3.5 | 3 |
| Extrasensory | 11 | 11 | 1 | 11 | 11 | 8 | 10 | 3 | 2.67 | 3.33 |
| Fairy Wind | 9 | 13 | 1 | 9 | 13 | 4 | 9 | 2 | 2 | 4.5 |
| Feint Attack | 11 | 10 | 1 | 11 | 10 | 6 | 6 | 2 | 3 | 3 |
| Fire Fang | 13 | 9 | 1 | 13 | 9 | 8 | 6 | 2 | 4 | 3 |
| Fire Spin | 13 | 9 | 1 | 13 | 9 | 11 | 10 | 3 | 3.67 | 3.33 |
| Force Palm | 10 | 16 | 1 | 10 | 16 | 13 | 10 | 3 | 4.33 | 3.33 |
| Frost Breath | 11 | 9 | 1 | 11 | 9 | 7 | 5 | 2 | 3.5 | 2.5 |
| Fury Cutter | 4 | 8 | 0.5 | 8 | 16 | 2 | 4 | 1 | 2 | 4 |
| Geomancy | 20 | 14 | 1.5 | 13.33 | 9.33 | 4 | 13 | 3 | 1.33 | 4.33 |
| Gust | 25 | 20 | 2 | 12.5 | 10 | 16 | 12 | 4 | 4 | 3 |
| Hex | 8 | 13 | 1 | 8 | 13 | 7 | 13 | 3 | 2.33 | 4.33 |
| Hidden Power | 15 | 15 | 1.5 | 10 | 10 | 9 | 8 | 3 | 3 | 2.67 |
| Ice Fang | 12 | 20 | 1.5 | 8 | 13.33 | 8 | 6 | 2 | 4 | 3 |
| Ice Shard | 10 | 10 | 1 | 10 | 10 | 9 | 10 | 3 | 3 | 3.33 |
| Incinerate | 32 | 22 | 2.5 | 12.8 | 8.8 | 20 | 20 | 5 | 4 | 4 |
| Infestation | 9 | 13 | 1 | 9 | 13 | 6 | 12 | 3 | 2 | 4 |
| Iron Tail | 14 | 6 | 1 | 14 | 6 | 10 | 7 | 3 | 3.33 | 2.33 |
| Karate Chop | 10 | 13 | 1 | 10 | 13 | 5 | 9 | 2 | 2.5 | 4.5 |
| Leafage | 6 | 4 | 0.5 | 12 | 8 | 6 | 7 | 2 | 3 | 3.5 |
| Lick | 5 | 6 | 0.5 | 10 | 12 | 3 | 3 | 1 | 3 | 3 |
| Lock-On | 2 | 10 | 0.5 | 4 | 20 | 1 | 5 | 1 | 1 | 5 |
| Low Kick | 5 | 5 | 0.5 | 10 | 10 | 4 | 5 | 2 | 2 | 2.5 |
| Magical Leaf | 17 | 17 | 1.5 | 11.33 | 11.33 | 10 | 10 | 3 | 3.33 | 3.33 |
| Metal Claw | 6 | 5 | 0.5 | 12 | 10 | 5 | 7 | 2 | 2.5 | 3.5 |
| Metal Sound | 4 | 6 | 0.5 | 8 | 12 | 3 | 8 | 2 | 1.5 | 4 |
| Mud Shot | 4 | 6 | 0.5 | 8 | 12 | 4 | 8 | 2 | 2 | 4 |
| Mud-Slap | 19 | 13 | 1.5 | 12.67 | 8.67 | 12 | 10 | 3 | 4 | 3.33 |
| Peck | 10 | 10 | 1 | 10 | 10 | 6 | 5 | 2 | 3 | 2.5 |
| Poison Jab | 13 | 9 | 1 | 13 | 9 | 7 | 7 | 2 | 3.5 | 3.5 |
| Poison Sting | 4 | 6 | 0.5 | 8 | 12 | 4 | 9 | 2 | 2 | 4.5 |
| Pound | 6 | 5 | 0.5 | 12 | 10 | 4 | 4 | 2 | 2 | 2 |
| Powder Snow | 6 | 15 | 1 | 6 | 15 | 5 | 8 | 2 | 2.5 | 4 |
| Present | 6 | 23 | 1.5 | 4 | 15.33 | 3 | 12 | 3 | 1 | 4 |
| Psycho Cut | 4 | 7 | 0.5 | 8 | 14 | 3 | 9 | 2 | 1.5 | 4.5 |
| Psywave | 4 | 7 | 0.5 | 8 | 14 | 3 | 4 | 1 | 3 | 4 |
| Quick Attack | 10 | 13 | 1 | 10 | 13 | 5 | 8 | 2 | 2.5 | 4 |
| Razor Leaf | 13 | 7 | 1 | 13 | 7 | 9 | 4 | 2 | 4.5 | 2 |
| Rock Smash | 17 | 12 | 1.5 | 11.33 | 8 | 9 | 7 | 3 | 3 | 2.33 |
| Rock Throw | 13 | 8 | 1 | 13 | 8 | 8 | 5 | 2 | 4 | 2.5 |
| Rollout | 15 | 19 | 1.5 | 10 | 12.67 | 7 | 13 | 3 | 2.33 | 4.33 |
| Sand Attack | 4 | 7 | 0.5 | 8 | 14 | 2 | 4 | 1 | 2 | 4 |
| Scratch | 6 | 4 | 0.5 | 12 | 8 | 4 | 2 | 1 | 4 | 2 |
| Shadow Claw | 6 | 4 | 0.5 | 12 | 8 | 6 | 8 | 2 | 3 | 4 |
| Smack Down | 13 | 7 | 1 | 13 | 7 | 11 | 8 | 3 | 3.67 | 2.67 |
| Snarl | 11 | 13 | 1 | 11 | 13 | 5 | 13 | 3 | 1.67 | 4.33 |
| Spark | 4 | 6 | 0.5 | 8 | 12 | 5 | 7 | 2 | 2.5 | 3.5 |
| Splash | 0 | 17 | 1.5 | 0 | 11.33 | 0 | 12 | 4 | 0 | 3 |
| Steel Wing | 14 | 8 | 1 | 14 | 8 | 7 | 6 | 2 | 3.5 | 3 |
| Struggle Bug | 15 | 15 | 1.5 | 10 | 10 | 9 | 8 | 3 | 3 | 2.67 |
| Sucker Punch | 5 | 6 | 0.5 | 10 | 12 | 8 | 7 | 2 | 4 | 3.5 |
| Tackle | 5 | 5 | 0.5 | 10 | 10 | 3 | 3 | 1 | 3 | 3 |
| Take Down | 7 | 8 | 1 | 7 | 8 | 5 | 8 | 3 | 1.67 | 2.67 |
| Thunder Fang | 10 | 13 | 1 | 10 | 13 | 8 | 6 | 2 | 4 | 3 |
| Thunder Shock | 4 | 7 | 0.5 | 8 | 14 | 4 | 9 | 2 | 2 | 4.5 |
| Transform | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 3 | 0 | 0 |
| Vine Whip | 6 | 5 | 0.5 | 12 | 10 | 5 | 8 | 2 | 2.5 | 4 |
| Volt Switch | 13 | 20 | 1.5 | 8.67 | 13.33 | 12 | 16 | 4 | 3 | 4 |
| Water Gun | 5 | 5 | 0.5 | 10 | 10 | 3 | 3 | 1 | 3 | 3 |
| Water Shuriken | 9 | 14 | 1 | 9 | 14 | 6 | 14 | 3 | 2 | 4.67 |
| Waterfall | 13 | 7 | 1 | 13 | 7 | 12 | 8 | 3 | 4 | 2.67 |
| Wing Attack | 10 | 11 | 1 | 10 | 11 | 5 | 7 | 2 | 2.5 | 3.5 |
| Yawn | 0 | 13 | 1.5 | 0 | 8.67 | 0 | 12 | 4 | 0 | 3 |
| Zen Headbutt | 11 | 9 | 1 | 11 | 9 | 8 | 6 | 3 | 2.67 | 2 |
Calculating an Attack's damage requires the attacker's EffA, the defender's EffD, two multipliers M and MM, and the Attack's P. The result is subtracted from the defender's HP. We will see that damage is always a positive integer, and thus HP is always an integer.
Multiplier M is defined as the product of:
- the Attack's type effectiveness relative to the defender (see below)
- the Attack's type effectiveness relative to the attacker
- 1.2 if the attacker shares type with the Attack, 1 otherwise (Same Type Attack Bonus, STAB)
A subsequent multiplier MM is different depending on whether the battle is PvE or PvP.
PvE mode
Multiplier MM is defined as the product of
- 0.5
- 0.25 if the Attack is dodged, 1 otherwise
- 1.2 if the Attack is weather-boosted, 1 otherwise
- A friendship bonus: 1 unless
- 1.03 if battling with at least one Good Friend, unless
- 1.05 if battling with at least one Great Friend, unless
- 1.07 if battling with at least one Ultra Friend, unless
- 1.1 if battling with at least one Best Friend
- A Mega bonus: 1 unless
- 1.1 if battling with at least one Mega Pokémon, unless
- 1.3 if battling with at least one Mega Pokémon of the Attack's type
- A Max bonus at Power Stops: 1 unless
- 1.1 for level 1 support (1 placed Pokémon), unless
- 1.15 for level 2 support (2–3 placed Pokémon), unless
- 1.188 for level 3 support (4–14 placed Pokémon), unless
- 1.2 for level 4 support (15+ placed Pokémon)
PvP mode
Multiplier MM is defined as the product of
- 0.65
- Minigame score for Charged Attacks, ranging from 0.25 to 1
- "Excellent!" is necessary and sufficient for a 1
- "Great!" maps to [0.75, 1)
- "Nice!" maps to [0.5, 0.75)
- otherwise [0.25, 0.5)
Damage calculation
At this point, P is a non-negative integer, while EffA, EffD, M, and MM are positive rationals.
Damage = ⌊P * EffA / EffD * M * MM⌋ + 1
Some notes:
- A / D yields a positive rational
- The floor function yields an integer, but A / D is calculated with reasonable precision
- Damage is always a positive integer
- P is typically the dominant term
- Maximum A / D is 414/32 = 12.9375, worst A / D is 17/396 = 0.0429
- Maximum (Base+IV)A / (Base+IV)D is 429/32 = 13.40625, a ~3.6% gain
- Minimum (Base+IV)D / (Base+IV)D is 17/411 = 0.0413625, a ~3.4% loss
- Now make both sides 15: for A, 429 / 47 = 9.12765, a ~29.5% loss
- Now make both sides 15: for D,
- All CPMs are less than 1, shrinking the effective values
- We can factor out the CPM ratio and define a constant 100x100 symmetric matrix
- Minimum value: 0.094 / 0.8403 ~= 0.11186
- Maximum value: 0.8403 / 0.094 ~= 8.939
Type effectiveness
| Attacker | Normal |
|---|---|
| Normal | |
| Fire | |
| Water | |
| Grass | |
| Electric | |
| Ice | |
| Fighting | |
| Poison | |
| Ground | |
| Flying | |
| Psychic |
Catch rate
Stardust rewards
XP rewards
Many events in Pokémon Go result in XP. Lucky Eggs double XP rewards while active (only one can be used at a time). Certain events double XP as well (this stacks with a Lucky Egg). Research can award various amounts of XP; a Research Breakthrough always awards 3000 XP.
Things which typically do not reward XP include:
- opening the game or leaving it running (whether moving or stationary)
- accepting or sending a Friend request
- interactions with Team Rocket
- PvP battles
- buddy hearts and buddy level progression
- trading Pokémon
- use of berries in an encounter
- creation of a Route or Pokéstop
- any non-capturing throws in an encounter
- opening gifts (from Friends or Mateo)
- receiving items (from gifts, Pokéstops, route completion, or battles)
- using items
- and transferring Pokémon to the Professor for soul harvesting.
Of course, XP can result when these are part of Research tasks.
Encounters
An "encounter" includes all interactions with a distinct Pokémon, including those following wins against Team Rocket and those following wins in Raids and Max Battles. Leaving the encounter screen and returning to the same Pokémon, even multiple times, is all one encounter. An encounter does not end until the Pokémon is captured or flees.
- If the Pokémon flees, the reward is 25 XP.
- If the Pokémon is captured, the reward is 100 XP, plus zero or more bonuses:
- A possible bonus for capture with a high-quality throw:
- 1000 XP for Excellent, or
- 100 XP for Great, or
- 20 XP for Nice.
- 20 XP for capture with a curveball.
- 50 XP for capture with the first throw of the encounter.
- 100 XP for 100th collection of each species (all subtypes count as one species) ("Collector")
- 300 XP for using AR Plus ("Expert Handler")
- A possible bonus for first capture of the day:
- 6000 XP for a 7 day streak of at least one capture (the streak resets), or
- 1500 XP otherwise.
- 1000 XP for capture with a Master Ball.
- A possible bonus for capture with a high-quality throw:
Hatching eggs
Hatching an Egg yields XP corresponding to the class of the Egg as expressed in kilometers.
| Km | XP |
|---|---|
| 2 | 500 |
| 5 | 1000 |
| 7 | 1000 |
| 10 | 2000 |
| 12 | 4000 |
Battles
No XP is awarded for battling Team Rocket, nor PvP games.
| Event | XP |
|---|---|
| Giving a berry to a Pokémon in a gym | 50 |
Friendship
200 XP is awarded whenever one sends a Gift (this is awarded when the Gift is sent, not when it is opened). You can open up to 30 and send up to 200 Gifts per day.
XP is awarded whenever a friendship reaches a new level.
| Level | XP |
|---|---|
| Good Friend | 3000 |
| Great Friend | 10000 |
| Ultra Friend | 50000 |
| Best Friend | 100000 |
Removing a friend does not reset the friendship level until 120 days (of Sodom?) have passed. Adding the friend back during this period will reset the counter.
Routes
Completing a Route always awards XP. The first Route completed on a given day yields 4000 XP. Subsequent Routes award 2000 XP each. Route awards are limited only by time.
A streak of seven days with completed Routes awards 12000 XP, and resets the streak counter.
Strategy
Leveling up
Leveling up (through Level 40) is strictly a matter of accumulating XP. Level 2 requires only one thousand XP; Level 40 requires five million beyond Level 39, for twenty million total. Levels 41 through 50 have additional, formidable Research requirements beyond their already brutal XP demands.