private static void CoerceStadium2Language(SK2 sk2, SaveFile sav) { if (sk2.Japanese == (sav.Language == 1)) { return; } var la = new LegalityAnalysis(sk2); if (la.Valid || !sk2.IsPossible(sav.Language == 1)) { return; } sk2.SwapLanguage(); la = new LegalityAnalysis(sk2); if (la.Valid) { return; } var lang = SpeciesName.GetSpeciesNameLanguage(sk2.Species, sk2.Nickname, 2); if (lang >= 1 && (lang == 1 != sk2.Japanese)) // force match language { sk2.SwapLanguage(); } else if (sk2.Japanese != (sav.Language == 1)) // force match save file { sk2.SwapLanguage(); } }
private static void CoerceStadium2Language(SK2 sk2, SaveFile sav) { if (sk2.Japanese == (sav.Language == 1)) { return; } var la = new LegalityAnalysis(sk2); if (la.Valid || !sk2.IsPossible(sav.Language == 1)) { return; } sk2.SwapLanguage(); la = new LegalityAnalysis(sk2); if (!la.Valid) // fail { sk2.SwapLanguage(); } }