Treat level2 yungoos as scripted encounter

This commit is contained in:
Kurt 2022-12-17 14:54:57 -08:00
parent d9982bcd47
commit c776d8db43
3 changed files with 6 additions and 2 deletions

View file

@ -32,6 +32,9 @@ internal static class Encounters9
new(SL) { Gift = true, Species = 052, Shiny = Never, Level = 05, Location = 130, Form = 2, FlawlessIVCount = 3 }, // Meowth-2
new(VL) { Gift = true, Species = 052, Shiny = Never, Level = 05, Location = 131, Form = 2, FlawlessIVCount = 3 }, // Meowth-2
// Scripted
new (SV) { Gift = true, Species = 734, Level = 02, Location = 064 }, // Yungoos level 2, no Marks in Inlet Grotto. Only Poké Ball available in early game.
// Box Legendary (Battle Form)
new(SL) { Species = 998, Shiny = Never, Level = 72, Location = 124, Size = 128, Ability = OnlyFirst, Nature = Nature.Adamant, TeraType = GemType.Fighting, IVs = new(25,31,25,31,31,25), Moves = new(416,339,878,053) }, // Koraidon
new(VL) { Species = 999, Shiny = Never, Level = 72, Location = 124, Size = 128, Ability = OnlyFirst, Nature = Nature.Modest, TeraType = GemType.Electric, IVs = new(25,31,25,31,31,25), Moves = new(063,268,879,408) }, // Miraidon

View file

@ -13,8 +13,9 @@ public sealed record EncounterStatic9(GameVersion Version) : EncounterStatic(Ver
public bool IsTitan { get; init; }
private bool NoScalarsDefined => Size == 0;
public bool GiftWithLanguage => Gift; // Nice error by GameFreak -- all gifts (including eggs) set the HT_Language memory value in addition to OT_Language.
public bool GiftWithLanguage => Gift && !ScriptedYungoos; // Nice error by GameFreak -- all gifts (including eggs) set the HT_Language memory value in addition to OT_Language.
public bool StarterBoxLegend => Gift && Species is (int)Core.Species.Koraidon or (int)Core.Species.Miraidon;
public bool ScriptedYungoos => Species == (int)Core.Species.Yungoos && Level == 2;
protected override bool IsMatchPartial(PKM pk)
{
@ -47,7 +48,7 @@ public sealed record EncounterStatic9(GameVersion Version) : EncounterStatic(Ver
{
base.ApplyDetails(tr, criteria, pk);
var pk9 = (PK9)pk;
if (Gift)
if (Gift && !ScriptedYungoos)
pk9.HT_Language = (byte)pk.Language;
if (StarterBoxLegend)
pk9.FormArgument = 1; // Not Ride Form.