Skip to content

Commit

Permalink
only keep trainer related stuff under override trainer
Browse files Browse the repository at this point in the history
fix format check (Thanks @sora10pls)
  • Loading branch information
architdate committed Oct 9, 2020
1 parent dfa60e0 commit 9f93476
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions PKHeX.Core.AutoMod/AutoMod/RegenTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ private void LoadExtraInstructions(List<string> lines)
break;
case "OTGender":
OT_Gender = value == "Female" || value == "F" ? 1 : 0;
OverrideTrainer = true;
break;
default:
continue;
Expand Down Expand Up @@ -148,18 +149,18 @@ public void GetRegenLines(List<string> ShowdownSetLines)
var movesets = movesetgroup == null ? new List<string>() : 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}");
Expand Down

0 comments on commit 9f93476

Please sign in to comment.