mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-28 15:00:36 +00:00
f3743e490b
Restriction happens because Korean can not trade with non-Korean GB era games - There is no Korean release for gen 1 pokemon, included VC - With no gen1 pokemon means any Korean gen2 is Gen2_NotTradeback, that means no gen1 origin nor moves are Legal - Crystal was never released in Korean - Pokemon Stadium 2 was never released in Korean, that means no move reminder for gen 2 korean pokemon - Generation 4 can not trade between Korean and not Korean games, but Korean games can use the palpark with any language Chinese language restrictions There is no Chinese release for gen 1 and 2 pokemon games, VC Chinese games are in Japanese
36 lines
1.6 KiB
C#
36 lines
1.6 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace PKHeX.Core
|
|
{
|
|
public class ValidEncounterMoves
|
|
{
|
|
public int EncounterSpecies { get; }
|
|
public DexLevel[][] EvolutionChains { get; }
|
|
public List<int>[] LevelUpMoves { get; } = Empty;
|
|
public List<int>[] TMHMMoves { get; } = Empty;
|
|
public List<int>[] TutorMoves { get; } = Empty;
|
|
public int[] Relearn = new int[0];
|
|
public int MinimumLevelGen1 { get; }
|
|
public int MinimumLevelGen2 { get; }
|
|
|
|
private const int EmptyCount = 7;
|
|
private static readonly List<int>[] Empty = new int[EmptyCount].Select(z => new List<int>()).ToArray();
|
|
|
|
public ValidEncounterMoves(PKM pkm, LegalInfo info)
|
|
{
|
|
MinimumLevelGen1 = pkm.GenNumber <= 2 ? info.EncounterMatch.LevelMin + 1 : 0;
|
|
MinimumLevelGen2 = Legal.AllowGen2MoveReminder(pkm) ? 1 : info.EncounterMatch.LevelMin + 1;
|
|
EncounterSpecies = info.EncounterMatch.Species;
|
|
EvolutionChains = info.EvoChainsAllGens;
|
|
LevelUpMoves = Legal.GetValidMovesAllGens(pkm, EvolutionChains, minLvLG1: MinimumLevelGen1, minLvLG2: MinimumLevelGen2, Tutor: false, Machine: false, RemoveTransferHM: false);
|
|
TMHMMoves = Legal.GetValidMovesAllGens(pkm, EvolutionChains, LVL: false, Tutor: false, MoveReminder: false, RemoveTransferHM: false);
|
|
TutorMoves = Legal.GetValidMovesAllGens(pkm, EvolutionChains, LVL: false, Machine: false, MoveReminder: false, RemoveTransferHM: false);
|
|
}
|
|
|
|
public ValidEncounterMoves(List<int>[] levelup)
|
|
{
|
|
LevelUpMoves = levelup;
|
|
}
|
|
}
|
|
}
|