Add handling for Wonder Ticket Poipole

See 1ec0f91e08
This commit is contained in:
sora10pls
2024-05-06 13:20:51 -04:00
parent e9b7ccac17
commit bcb7135940
3 changed files with 22 additions and 13 deletions

View File

@@ -30,32 +30,40 @@ public enum PogoType : byte
/// <summary> Mythical Pokémon captured after completing Field Research. </summary>
ResearchM,
/// <summary> Mythical Pokémon captured after completing Field Research. Only Poké Balls can be used. </summary>
ResearchP,
ResearchMP,
/// <summary> Ultra Beasts captured after completing Field Research. Only Beast Balls can be used. </summary>
ResearchUB,
/// <summary> Mythical Pokémon captured after completing Field Research. No HUD is visible during these encounters. </summary>
/// <remarks> Under normal circumstances, only Poké Balls can be used, but Great Balls and Ultra Balls can be used with the Remember Last-Used Poké Ball setting. </remarks>
/// <remarks>
/// Under normal circumstances, only Poké Balls can be used, but Great Balls and Ultra Balls can be used with the Remember Last-Used Poké Ball setting.
/// This was rendered unusable as of version 0.277.3.
/// </remarks>
ResearchMH,
/// <summary> Pokémon captured after completing Field Research. No HUD is visible during these encounters. </summary>
/// <remarks>
/// The encounter defaults to the player's stock of Poké Balls. If they have none, it falls back to Great Balls, and then to Ultra Balls.
/// If the player has no Poké Balls, Great Balls, or Ultra Balls, the HUD fails to load in any Poké Ball at all, even if they have a Master Ball.
/// </remarks>
ResearchNH,
/// <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> Pokémon captured from the GO Battle League during GO Battle Day, excluding Legendary and Mythical Pokémon. </summary>
/// <summary> Pokémon captured from the GO Battle League during GO Battle Day events. Excludes Legendary Pokémon, Mythical Pokémon, and Ultra Beasts. </summary>
GBLD,
/// <summary> Pokémon captured after defeating members of Team GO Rocket. Must be 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,
/// <summary>
/// Pokémon captured from Special Research or Timed Research with a Premier Ball.
/// </summary>
/// <summary> Pokémon captured from Special Research or Timed Research with a Premier Ball. </summary>
/// <remarks>
/// Niantic pushed release 0.269 on April 22, 2023, which contained an issue with the Remember Last-Used Poké Ball setting.
/// Niantic released version 0.269.0 on April 22, 2023, which contained an issue with the Remember Last-Used Poké Ball setting.
/// This allowed for Premier Balls obtained from Raid Battles to be remembered on all future encounters.
/// The moment the Premier Ball touched the floor or a wild Pokémon, the encounter would end, except if it was from a Special Research and Timed Research encounter.
/// The moment the Premier Ball touched the floor or a wild Pokémon, the encounter would end, except if it was from a Special Research, Timed Research, or Collection Challenge encounter.
/// This made it possible for over 300 species of Pokémon to be obtainable in a Poké Ball they were never meant to be captured in.
/// This bug was fixed with the release of version 0.269.2.
/// </remarks>
Research269 = 200,
Research269M,
@@ -79,8 +87,9 @@ public static class PogoTypeExtensions
PogoType.RaidS => 20,
PogoType.Research => 15,
PogoType.ResearchM => 15,
PogoType.ResearchP => 15,
PogoType.ResearchMP => 15,
PogoType.ResearchUB => 15,
PogoType.ResearchMH => 15,
PogoType.ResearchNH => 15,
PogoType.GBL => 20,
PogoType.GBLM => 20,
@@ -101,8 +110,8 @@ public static class PogoTypeExtensions
PogoType.Wild => 0,
PogoType.RaidM => 10,
PogoType.ResearchM => 10,
PogoType.ResearchP => 10,
PogoType.ResearchNH => 10,
PogoType.ResearchMP => 10,
PogoType.ResearchMH => 10,
PogoType.GBLM => 10,
PogoType.GBLD => 0,
PogoType.Research269M => 10,
@@ -131,7 +140,7 @@ public static bool IsBallValid(this PogoType encounterType, Ball ball)
public static bool IsMasterBallUsable(this PogoType encounterType) => encounterType switch
{
PogoType.Egg or PogoType.EggS => false,
PogoType.ResearchP or PogoType.ResearchUB or PogoType.ResearchNH => false,
PogoType.ResearchMP or PogoType.ResearchUB or PogoType.ResearchMH or PogoType.ResearchNH => false,
_ => true,
};
@@ -148,7 +157,7 @@ public static bool IsBallValid(this PogoType encounterType, Ball ball)
PogoType.RaidM => Ball.Premier,
PogoType.RaidUB => Ball.Beast,
PogoType.RaidS => Ball.Premier,
PogoType.ResearchP => Ball.Poke,
PogoType.ResearchMP => Ball.Poke,
PogoType.ResearchUB => Ball.Beast,
PogoType.Shadow => Ball.Premier,
PogoType.Research269 => Ball.Premier,