diff --git a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs index 16826e937..d3fa43be0 100644 --- a/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs +++ b/PKHeX.Core/Legality/Encounters/Templates/Gen7/EncounterStatic7.cs @@ -4,7 +4,7 @@ namespace PKHeX.Core; /// Generation 7 Static Encounter /// public sealed record EncounterStatic7(GameVersion Version) - : IEncounterable, IEncounterMatch, IEncounterConvertible, IRelearn, IEncounterFormRandom, IFlawlessIVCount, IFatefulEncounterReadOnly, IFixedGender, IFixedNature, IFixedIVSet + : IEncounterable, IEncounterMatch, IEncounterConvertible, IRelearn, IMoveset, IEncounterFormRandom, IFlawlessIVCount, IFatefulEncounterReadOnly, IFixedGender, IFixedNature, IFixedIVSet { public byte Generation => 7; public EntityContext Context => EntityContext.Gen7; @@ -16,6 +16,7 @@ public sealed record EncounterStatic7(GameVersion Version) public bool IsShiny => false; public Moveset Relearn { get; init; } + public Moveset Moves => Relearn; public IndividualValueSet IVs { get; init; } public ushort Location { get; init; } public ushort EggLocation { get; init; } @@ -95,8 +96,14 @@ public PK7 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria) } if (Relearn.HasMoves) + { + pk.SetMoves(Relearn); pk.SetRelearnMoves(Relearn); - EncounterUtil.SetEncounterMoves(pk, version, LevelMin); + } + else + { + EncounterUtil.SetEncounterMoves(pk, version, LevelMin); + } SetPINGA(pk, criteria, pi); pk.ResetPartyStats(); diff --git a/PKHeX.Core/Legality/RNG/ClassicEra/Gen4/CuteCharm4.cs b/PKHeX.Core/Legality/RNG/ClassicEra/Gen4/CuteCharm4.cs index 501989999..86cfcee28 100644 --- a/PKHeX.Core/Legality/RNG/ClassicEra/Gen4/CuteCharm4.cs +++ b/PKHeX.Core/Legality/RNG/ClassicEra/Gen4/CuteCharm4.cs @@ -81,7 +81,11 @@ public static bool IsCuteCharm(PKM pk, uint pid) return false; var (species, gender) = GetGenderSpecies(pk, pid, pk.Species); + return IsCuteCharm(pid, gender, species); + } + private static bool IsCuteCharm(uint pid, byte gender, ushort species) + { switch (gender) { // case 2: break; // can't cute charm a genderless pk @@ -126,10 +130,10 @@ public static bool IsCuteCharm(PKM pk, uint pid) (int)Marill or (int)Azumarill when IsAzurillMale(pid) => ((int)Azurill, 0), // Future evolutions - _ => (GetSpeciesGen4(currentSpecies), pk.Gender), + _ => (DevolveToSpeciesFromGen4(currentSpecies), pk.Gender), }; - private static ushort GetSpeciesGen4(ushort species) => species switch + private static ushort DevolveToSpeciesFromGen4(ushort species) => species switch { <= Legal.MaxSpeciesID_4 => species, // has a valid personal reference, all good (int)Sylveon => (int)Eevee,