mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Template fields with species for save file
Fix PP since gen8 has pound at 35 rather than 40
This commit is contained in:
parent
8144a5add2
commit
7497e08f9b
1 changed files with 3 additions and 3 deletions
|
@ -32,14 +32,14 @@ namespace PKHeX.Core
|
||||||
/// <param name="tr">Trainer info to apply</param>
|
/// <param name="tr">Trainer info to apply</param>
|
||||||
public static void TemplateFields(PKM pk, ITrainerInfo tr)
|
public static void TemplateFields(PKM pk, ITrainerInfo tr)
|
||||||
{
|
{
|
||||||
pk.Move1 = 1;
|
pk.Move1 = (int)Move.Pound;
|
||||||
pk.Move1_PP = 40;
|
pk.HealPP();
|
||||||
pk.Ball = 4;
|
pk.Ball = 4;
|
||||||
pk.MetDate = DateTime.Today;
|
pk.MetDate = DateTime.Today;
|
||||||
|
|
||||||
if (tr.Game >= 0)
|
if (tr.Game >= 0)
|
||||||
pk.Version = tr.Game;
|
pk.Version = tr.Game;
|
||||||
int species = ((GameVersion)pk.Version).GetMaxSpeciesID();
|
int species = tr is IGameValueLimit s ? s.MaxSpeciesID : ((GameVersion)pk.Version).GetMaxSpeciesID();
|
||||||
if (species <= 0)
|
if (species <= 0)
|
||||||
species = pk.MaxSpeciesID;
|
species = pk.MaxSpeciesID;
|
||||||
pk.Species = species;
|
pk.Species = species;
|
||||||
|
|
Loading…
Reference in a new issue