Skip to content

Commit cf0dc02

Browse files
committed
let's see if this doesn't break within a month
1 parent ba68af9 commit cf0dc02

1 file changed

Lines changed: 32 additions & 11 deletions

File tree

Helpers/AutoLegality.cs

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,39 @@ private PKM Legalize(PKM pk, GameVersion ver)
103103
if (KeepOriginalData)
104104
{
105105
updated = Legalizer.Legalize(pk);
106-
info.ApplyToPKM(updated);
107-
if(!la.Report().Contains("Handling Trainer"))
106+
var report = la.Report().ToLower();
107+
if(!report.Contains("handling trainer"))
108108
{
109-
updated.HT_Affection = pk.HT_Affection;
110-
updated.HT_Feeling = pk.HT_Feeling;
111-
updated.HT_Friendship = pk.HT_Friendship;
112-
updated.HT_Gender = pk.HT_Gender;
113-
updated.HT_Intensity = pk.HT_Intensity;
114-
updated.HT_Memory = pk.HT_Memory;
115-
updated.HT_Name = pk.HT_Name;
116-
updated.HT_TextVar = pk.HT_TextVar;
117-
updated.HT_Trash = pk.HT_Trash;
109+
if (!report.Contains("untraded"))
110+
{
111+
info.ApplyToPKM(updated);
112+
if (!report.Contains("memory"))
113+
updated.HT_Memory = pk.HT_Memory;
114+
if (!report.Contains("affection"))
115+
updated.HT_Affection = pk.HT_Affection;
116+
if (!report.Contains("feeling"))
117+
updated.HT_Feeling = pk.HT_Feeling;
118+
if (!report.Contains("friendship"))
119+
updated.HT_Friendship = pk.HT_Friendship;
120+
if (!report.Contains("intensity"))
121+
updated.HT_Intensity = pk.HT_Intensity;
122+
if (!report.Contains("trash"))
123+
updated.HT_Trash = pk.HT_Trash;
124+
updated.HT_Gender = pk.HT_Gender;
125+
updated.HT_Name = pk.HT_Name;
126+
updated.HT_TextVar = pk.HT_TextVar;
127+
}
128+
} else
129+
{
130+
updated.OT_Memory = pk.OT_Memory;
131+
updated.OT_Friendship = pk.OT_Friendship;
132+
updated.OT_Name = pk.OT_Name;
133+
updated.OT_Affection = pk.OT_Affection;
134+
updated.OT_Feeling = pk.OT_Feeling;
135+
updated.OT_Gender = pk.OT_Gender;
136+
updated.OT_Intensity = pk.OT_Intensity;
137+
updated.OT_TextVar = pk.OT_TextVar;
138+
updated.OT_Trash = pk.OT_Trash;
118139
}
119140
} else
120141
{

0 commit comments

Comments
 (0)