protected virtual void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk) { pk.EncryptionConstant = Util.Rand32(); pk.Species = Species; pk.AltForm = Form; int lang = (int)Language.GetSafeLanguage(Generation, (LanguageID)sav.Language); int level = GetMinimalLevel(); var version = this.GetCompatibleVersion((GameVersion)sav.Game); SanityCheckVersion(ref version); pk.Language = lang = GetEdgeCaseLanguage(pk, lang); pk.Nickname = SpeciesName.GetSpeciesNameGeneration(Species, lang, Generation); pk.CurrentLevel = level; pk.Version = (int)version; pk.Ball = Ball; pk.HeldItem = HeldItem; pk.OT_Friendship = pk.PersonalInfo.BaseFriendship; var today = DateTime.Today; SetMetData(pk, level, today); if (EggEncounter) { SetEggMetData(pk, sav, today); } SetPINGA(pk, criteria); SetEncounterMoves(pk, version, level); if (Fateful) { pk.FatefulEncounter = true; } if (pk.Format < 6) { return; } if (this is IRelearn relearn) { pk.SetRelearnMoves(relearn.Relearn); } sav.ApplyHandlingTrainerInfo(pk); pk.SetRandomEC(); if (this is IGigantamax g && pk is IGigantamax pg) { pg.CanGigantamax = g.CanGigantamax; } if (this is IDynamaxLevel d && pk is IDynamaxLevel pd) { pd.DynamaxLevel = d.DynamaxLevel; } }
protected override void ApplyDetails(ITrainerInfo SAV, EncounterCriteria criteria, PKM pk) { if (pk is IDynamaxLevel d) { d.DynamaxLevel = DynamaxLevel; } pk.SetRelearnMoves(Relearn); ((PK8)pk).HT_Language = SAV.Language; base.ApplyDetails(SAV, criteria, pk); }
protected override void ApplyDetails(ITrainerInfo SAV, EncounterCriteria criteria, PKM pk) { base.ApplyDetails(SAV, criteria, pk); pk.SetRelearnMoves(Relearn); var pk8 = (PK8)pk; pk8.DynamaxLevel = DynamaxLevel; pk8.HT_Language = SAV.Language; pk8.OT_Memory = OT_Memory; pk8.OT_TextVar = OT_TextVar; pk8.OT_Feeling = OT_Feeling; pk8.OT_Intensity = OT_Intensity; }