Core Components
LearnVerifier
Top-level move verifier.- Load current moves from PKM
- Verify each move can be learned
- Check for duplicates and gaps
- Validate first move slot is not empty
PKHeX.Core/Legality/LearnSource/Verify/LearnVerifier.cs
Example:
MoveResult
Represents validation result for a single move.MoveLearnInfo
Describes how a move was learned.Learn Sources
ILearnSource
Interface for game-specific move learning data.PKHeX.Core/Legality/LearnSource/Sources/Shared/ILearnSource.cs
LearnEnvironment
Identifies which game(s) a move was learned in.PKHeX.Core/Legality/LearnSource/LearnEnvironment.cs
Learn Source Implementations
Learn Methods
LearnMethod
Describes how a move can be learned.PKHeX.Core/Legality/LearnSource/LearnMethod.cs
MoveSourceType
Flags for filtering move sources.PKHeX.Core/Legality/MoveSourceType.cs
Learnsets
Learnset
Species-specific level-up moves.Move Validation
Current Moves
Validates the 4 current moves:Egg Moves
Validates egg move inheritance:PKHeX.Core/Legality/LearnSource/Verify/LearnVerifierEgg.cs
Relearn Moves
Validates the 4 relearn moves (Gen 6+):- Egg moves (bred Pokémon)
- Event moves (Mystery Gift)
- Initial moves (when hatched)
- Evolved moves (from evolution)
PKHeX.Core/Legality/LearnSource/Verify/LearnVerifierRelearn.cs
Move History
Validates moves across evolution chain:PKHeX.Core/Legality/LearnSource/Verify/LearnVerifierHistory.cs
Special Cases
Form-Exclusive Moves
Some moves are exclusive to specific forms:Smeargle Sketch
Smeargle can learn any move via Sketch:Event Moves
Mystery Gift events can have special moves:Shared Egg Moves (Gen 8+)
Gen 8 introduced move sharing at picnic:Move Reminder
Move Reminder allows relearning any level-up move:- Gen 1-2: Not available
- Gen 3: Limited to current level moves
- Gen 4-7: All level-up moves
- Gen 8+: All level-up moves + egg moves
TM/HM Validation
Technical Machines have generation-specific compatibility:- Gen 1-7: Species-specific TM flags
- Gen 8: TRs (one-time use)
- Gen 9: Crafted TMs (unlimited use)
Move Tutors
Move tutors are game-specific:Example: Full Move Validation
Related Documentation
- Encounters - Encounter matching
- Evolutions - Evolution chains
- Verifiers - Other validation checks