mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add TR flags to emoveset generator
This commit is contained in:
parent
6089268b53
commit
a524032f61
2 changed files with 16 additions and 1 deletions
|
@ -173,6 +173,9 @@ namespace PKHeX.Core
|
|||
var shared = MoveEgg.GetEggMoves(8, evo.Species, evo.Form, GameVersion.SW);
|
||||
if (shared.Length != 0)
|
||||
moves = moves.Concat(shared);
|
||||
|
||||
// TR moves -- default logic checks the TR flags, so we need to add all possible ones here.
|
||||
moves = moves.Concat(MoveTechnicalMachine.GetAllPossibleRecords(pk.Species, pk.Form));
|
||||
}
|
||||
if (pk.Species == (int)Species.Shedinja)
|
||||
{
|
||||
|
|
|
@ -484,5 +484,17 @@ namespace PKHeX.Core
|
|||
r.Add(Legal.TMHM_SWSH[i + 100]);
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<int> GetAllPossibleRecords(int species, int form)
|
||||
{
|
||||
var pi = PersonalTable.SWSH.GetFormEntry(species, form);
|
||||
var tmhm = pi.TMHM;
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
if (!tmhm[i + 100])
|
||||
continue;
|
||||
yield return Legal.TMHM_SWSH[i + 100];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue