mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-30 07:50:32 +00:00
Add PogoType for Ultra Beasts via Field Research
Will need to verify if Beast Balls can be used on other Pokémon, and if generic Poké Balls can be used on Ultra Beasts. We'll see when GO Fest Berlin starts.
This commit is contained in:
parent
569010c402
commit
2e9f73ab4d
1 changed files with 27 additions and 23 deletions
|
@ -7,39 +7,41 @@ public enum PogoType : byte
|
|||
{
|
||||
None, // Don't use this.
|
||||
|
||||
/// <summary> Wild encounter, no special requirements </summary>
|
||||
/// <summary> Pokémon captured in the wild. </summary>
|
||||
Wild,
|
||||
|
||||
/// <summary> Pokémon Egg, requires Lv. 1 and IV = 1 </summary>
|
||||
/// <summary> Pokémon hatched from 2km, 5km, 7km, or 10km Eggs. </summary>
|
||||
Egg,
|
||||
/// <summary> Strange Egg, requires Lv. 8 and IV = 1 </summary>
|
||||
/// <summary> Pokémon hatched from Strange Eggs received from the Leaders of Team GO Rocket. </summary>
|
||||
EggS,
|
||||
|
||||
/// <summary> Raid Boss, requires Lv. 20 and IV = 1 </summary>
|
||||
/// <summary> Pokémon captured after completing Raid Battles. </summary>
|
||||
Raid = 10,
|
||||
/// <summary> Raid Boss (Mythical), requires Lv. 20 and IV = 10 </summary>
|
||||
/// <summary> Mythical Pokémon captured after completing Raid Battles. </summary>
|
||||
RaidM,
|
||||
|
||||
/// <summary> Field Research Reward, requires Lv. 15 and IV = 1 </summary>
|
||||
/// <summary> Pokémon captured after completing Field Research. </summary>
|
||||
Research = 20,
|
||||
/// <summary> Field Research Reward (Mythical), requires Lv. 15 and IV = 10 </summary>
|
||||
/// <summary> Mythical Pokémon captured after completing Field Research. </summary>
|
||||
ResearchM,
|
||||
/// <summary> Field Research Reward, requires Lv. 15 and IV = 10 (Poké Ball only) </summary>
|
||||
/// <summary> Mythical Pokémon captured after completing Field Research. Only Poké Balls can be used. </summary>
|
||||
ResearchP,
|
||||
/// <summary> Ultra Beasts captured after completing Field Research. Only Beast Balls can be used. </summary>
|
||||
ResearchUB,
|
||||
|
||||
/// <summary> GO Battle League Reward, requires Lv. 20 and IV = 1 </summary>
|
||||
GBL,
|
||||
/// <summary> GO Battle League Reward (Mythical), requires Lv. 20 and IV = 10 </summary>
|
||||
/// <summary> Pokémon captured from the GO Battle League. </summary>
|
||||
GBL = 30,
|
||||
/// <summary> Mythical Pokémon captured from the GO Battle League. </summary>
|
||||
GBLM,
|
||||
/// <summary> GO Battle League Reward, requires Lv. 20 and IV = 0 </summary>
|
||||
/// <summary> Pokémon captured from the GO Battle League during GO Battle Day, excluding Legendary and Mythical Pokémon. </summary>
|
||||
/// <remarks> On GO Battle Day (September 18, 2021), IV floor and ceiling were both temporarily set to 0 for non-Legendary encounters. This was fixed at 14:43 UTC (September 17, 2021). </remarks>
|
||||
GBLZero,
|
||||
/// <summary> GO Battle League Reward, requires Lv. 20 and IV = 0 </summary>
|
||||
/// <remarks> On GO Battle Day (September 18, 2021), IV floor was set to 0 after a mishap that also set the IV ceiling to 0. </remarks>
|
||||
/// <summary> Pokémon captured from the GO Battle League during GO Battle Day, excluding Legendary and Mythical Pokémon. </summary>
|
||||
GBLDay,
|
||||
|
||||
/// <summary> Purified, requires Lv. 8 and IV = 1 (Premier Ball only) </summary>
|
||||
Shadow = 30,
|
||||
/// <summary> Pokémon captured after defeating members of Team GO Rocket. Must become Purified before transferring to Pokémon HOME. </summary>
|
||||
/// <remarks> Pokémon with this <see cref="PogoType"/> can not be moved to <see cref="GameVersion.GG"/>. </remarks>
|
||||
Shadow = 40,
|
||||
}
|
||||
|
||||
public static class PogoTypeExtensions
|
||||
|
@ -47,7 +49,7 @@ public static class PogoTypeExtensions
|
|||
/// <summary>
|
||||
/// Gets the minimum level (relative to GO's 1-<see cref="EncountersGO.MAX_LEVEL"/>) the <see cref="encounterType"/> must have.
|
||||
/// </summary>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
public static byte GetMinLevel(this PogoType encounterType) => encounterType switch
|
||||
{
|
||||
PogoType.EggS => 8,
|
||||
|
@ -56,6 +58,7 @@ public static class PogoTypeExtensions
|
|||
PogoType.Research => 15,
|
||||
PogoType.ResearchM => 15,
|
||||
PogoType.ResearchP => 15,
|
||||
PogoType.ResearchUB => 15,
|
||||
PogoType.GBL => 20,
|
||||
PogoType.GBLM => 20,
|
||||
PogoType.GBLZero => 20,
|
||||
|
@ -67,7 +70,7 @@ public static class PogoTypeExtensions
|
|||
/// <summary>
|
||||
/// Gets the minimum IVs (relative to GO's 0-15) the <see cref="encounterType"/> must have.
|
||||
/// </summary>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <returns>Required minimum IV (0-15)</returns>
|
||||
public static int GetMinIV(this PogoType encounterType) => encounterType switch
|
||||
{
|
||||
|
@ -84,7 +87,7 @@ public static class PogoTypeExtensions
|
|||
/// <summary>
|
||||
/// Gets the minimum IVs (relative to GO's 0-15) the <see cref="encounterType"/> must have.
|
||||
/// </summary>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <returns>Required minimum IV (0-15)</returns>
|
||||
public static int GetMaxIV(this PogoType encounterType) => encounterType switch
|
||||
{
|
||||
|
@ -95,8 +98,8 @@ public static class PogoTypeExtensions
|
|||
/// <summary>
|
||||
/// Checks if the <see cref="ball"/> is valid for the <see cref="encounterType"/>.
|
||||
/// </summary>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <param name="ball">Current <see cref="Ball"/> the Pokémon is in.</param>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <param name="ball">Current <see cref="Ball"/> the Pokémon is in.</param>
|
||||
/// <returns>True if valid, false if invalid.</returns>
|
||||
public static bool IsBallValid(this PogoType encounterType, Ball ball)
|
||||
{
|
||||
|
@ -107,9 +110,9 @@ public static class PogoTypeExtensions
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a valid ball that the <see cref="encounterType"/> can have based on the type of capture in Pokémon GO.
|
||||
/// Gets a valid ball that the <see cref="encounterType"/> can have based on the type of capture in Pokémon GO.
|
||||
/// </summary>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <param name="encounterType">Descriptor indicating how the Pokémon was encountered in GO.</param>
|
||||
/// <returns><see cref="Ball.None"/> if no specific ball is required, otherwise returns the required ball.</returns>
|
||||
public static Ball GetValidBall(this PogoType encounterType) => encounterType switch
|
||||
{
|
||||
|
@ -118,6 +121,7 @@ public static class PogoTypeExtensions
|
|||
PogoType.Raid => Ball.Premier,
|
||||
PogoType.RaidM => Ball.Premier,
|
||||
PogoType.ResearchP => Ball.Poke,
|
||||
PogoType.ResearchUB => Ball.Beast,
|
||||
PogoType.Shadow => Ball.Premier,
|
||||
_ => Ball.None, // Poke, Great, Ultra
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue