Comments and a fix for AllowGen2Crystal function

This commit is contained in:
javierhimura
2017-09-23 21:00:57 +02:00
parent 153206be6c
commit ea86032480
3 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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;