From 9f9347654c6fbf3994288394a1d01d7caae79786 Mon Sep 17 00:00:00 2001 From: Archit Date Date: Sat, 10 Oct 2020 04:49:35 +0800 Subject: [PATCH] only keep trainer related stuff under override trainer fix format check (Thanks @sora10pls) --- PKHeX.Core.AutoMod/AutoMod/RegenTemplate.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/PKHeX.Core.AutoMod/AutoMod/RegenTemplate.cs b/PKHeX.Core.AutoMod/AutoMod/RegenTemplate.cs index 107944dc..70846ebd 100644 --- a/PKHeX.Core.AutoMod/AutoMod/RegenTemplate.cs +++ b/PKHeX.Core.AutoMod/AutoMod/RegenTemplate.cs @@ -120,6 +120,7 @@ private void LoadExtraInstructions(List lines) break; case "OTGender": OT_Gender = value == "Female" || value == "F" ? 1 : 0; + OverrideTrainer = true; break; default: continue; @@ -148,18 +149,18 @@ public void GetRegenLines(List ShowdownSetLines) var movesets = movesetgroup == null ? new List() : movesetgroup.ToList(); var pokedata = splitList.FirstOrDefault(x => !x.Key).Where(x => !x.StartsWith("Shiny:")).ToList(); + var shinyval = "Yes"; + if (Ball != Ball.None) pokedata.Add($"Ball: {Ball} Ball"); + if (ShinyType == Core.Shiny.AlwaysStar) shinyval = "Star"; + if (ShinyType == Core.Shiny.AlwaysSquare) shinyval = "Square"; + if (Shiny) pokedata.Add($"Shiny: {shinyval}"); + if (Language != null) pokedata.Add($"Language: {Language}"); + if (OverrideTrainer) { - var shinyval = "Yes"; - int TIDval = Format > 7 ? TID7 : TID; - int SIDval = Format > 7 ? SID7 : SID; + int TIDval = Format >= 7 ? TID7 : TID; + int SIDval = Format >= 7 ? SID7 : SID; string Genderval = OT_Gender == 0 ? "Male" : "Female"; - - if (Ball != Ball.None) pokedata.Add($"Ball: {Ball} Ball"); - if (ShinyType == Core.Shiny.AlwaysStar) shinyval = "Star"; - if (ShinyType == Core.Shiny.AlwaysSquare) shinyval = "Square"; - if (Shiny) pokedata.Add($"Shiny: {shinyval}"); - if (Language != null) pokedata.Add($"Language: {Language}"); if (OT != string.Empty) pokedata.Add($"OT: {OT}"); pokedata.Add($"TID: {TIDval}"); pokedata.Add($"SID: {SIDval}");