From ea86032480a10fbe0a0db885cf4a79f8f8e39c7f Mon Sep 17 00:00:00 2001 From: javierhimura Date: Sat, 23 Sep 2017 21:00:57 +0200 Subject: [PATCH] Comments and a fix for AllowGen2Crystal function --- PKHeX.Core/Legality/Analysis.cs | 1 + PKHeX.Core/Legality/Checks.cs | 1 + PKHeX.Core/Legality/Core.cs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PKHeX.Core/Legality/Analysis.cs b/PKHeX.Core/Legality/Analysis.cs index b338ab2c5..964c3a0b9 100644 --- a/PKHeX.Core/Legality/Analysis.cs +++ b/PKHeX.Core/Legality/Analysis.cs @@ -219,6 +219,7 @@ private void UpdateTradebackG12() if (pkm.Format == 2 || pkm.VC2) { // check for impossible tradeback scenarios + // Korean gen2 games can't tradeback because there is no gen1 korean games released if (pkm.Korean || pkm.IsEgg || pkm.HasOriginalMetLocation || pkm.Species > Legal.MaxSpeciesID_1 && !Legal.FutureEvolutionsGen1.Contains(pkm.Species)) pkm.TradebackStatus = TradebackType.Gen2_NotTradeback; else diff --git a/PKHeX.Core/Legality/Checks.cs b/PKHeX.Core/Legality/Checks.cs index 2ab63405d..450ef5473 100644 --- a/PKHeX.Core/Legality/Checks.cs +++ b/PKHeX.Core/Legality/Checks.cs @@ -164,6 +164,7 @@ private bool verifyLanguage() } if(pkm.Format == 4 && pkm.Gen4 && (pkm.Language == 8) != (Legal.SavegameLanguage == 8)) { + // Korean gen 4 games can not trade with non-korean gen 4 games, but can use palpark with any gen3 game AddLine(Severity.Invalid, pkm.Language == 8 ? V610 : V611, CheckIdentifier.Language); return false; } diff --git a/PKHeX.Core/Legality/Core.cs b/PKHeX.Core/Legality/Core.cs index 8269a55e2..c4d57de64 100644 --- a/PKHeX.Core/Legality/Core.cs +++ b/PKHeX.Core/Legality/Core.cs @@ -36,9 +36,9 @@ public static partial class Legal public static bool AllowGen1Tradeback { get; set; } public static bool AllowGen2VCTransfer => true; public static bool AllowGen2VCCrystal => false; - public static bool AllowGen2Crystal(bool Korean) => Korean && (AllowGBCartEra || AllowGen2VCCrystal); + public static bool AllowGen2Crystal(bool Korean) => !Korean && (AllowGBCartEra || AllowGen2VCCrystal); // Pokemon Crystal was never released in Korea public static bool AllowGen2Crystal(PKM pkm) => AllowGen2Crystal(pkm.Korean); - public static bool AllowGen2MoveReminder(PKM pkm) => !pkm.Korean && AllowGBCartEra; + public static bool AllowGen2MoveReminder(PKM pkm) => !pkm.Korean && AllowGBCartEra; // Pokemon Stadium 2 was never released in Korea public static bool CheckWordFilter { get; set; } = true;