예제 #1
0
    private static void ParseMovesPre3DS(PKM pk, CheckMoveResult[] parse, int[] currentMoves, LegalInfo info)
    {
        if (info.EncounterMatch is EncounterEgg e)
        {
            if (pk.IsEgg)
            {
                VerifyRelearnMoves.VerifyEggMoveset(e, parse, currentMoves, CurrentMove);
            }
            else
            {
                ParseMovesWasEggPreRelearn(pk, parse, currentMoves, info, e);
            }
            return;
        }

        // Not all games have a re-learner. Initial moves may not fill out all 4 slots.
        int gen = info.EncounterMatch.Generation;

        if (gen == 1 || (gen == 2 && !AllowGen2MoveReminder(pk)))
        {
            ParseMovesGenGB(pk, currentMoves, info, parse);
        }

        ParseMovesSpecialMoveset(pk, currentMoves, info, parse);
    }
예제 #2
0
    /// <summary>
    /// Gets the current <see cref="PKM.RelearnMoves"/> array of four moves that might be legal.
    /// </summary>
    /// <remarks>Use <see cref="GetSuggestedRelearnMovesFromEncounter"/> instead of calling directly; this method just puts default values in without considering the final moveset.</remarks>
    public static IReadOnlyList <int> GetSuggestedRelearn(this IEncounterTemplate enc, PKM pk)
    {
        if (VerifyRelearnMoves.ShouldNotHaveRelearnMoves(enc, pk))
        {
            return(Empty);
        }

        return(GetSuggestedRelearnInternal(enc, pk));
    }