mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Clean up vc2 legality/transfer stuff
This commit is contained in:
parent
6564987469
commit
3483b4bb91
3 changed files with 3 additions and 4 deletions
|
@ -34,7 +34,6 @@ namespace PKHeX.Core
|
|||
/// <summary>Setting to specify if an analysis should permit data sourced from the physical cartridge era of GameBoy games.</summary>
|
||||
public static bool AllowGBCartEra { get; set; }
|
||||
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); // Pokemon Crystal was never released in Korea
|
||||
public static bool AllowGen2Crystal(PKM pkm) => AllowGen2Crystal(pkm.Korean);
|
||||
|
|
|
@ -180,7 +180,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
private static IEnumerable<GBEncounterData> GenerateFilteredEncounters(PKM pkm)
|
||||
{
|
||||
bool crystal = pkm.Format == 2 && pkm.Met_Location != 0;
|
||||
bool crystal = pkm.Format == 2 && pkm.Met_Location != 0 || pkm.Format >= 7 && pkm.OT_Gender == 1;
|
||||
var g1i = new PeekEnumerator<GBEncounterData>(get1().GetEnumerator());
|
||||
var g2i = new PeekEnumerator<GBEncounterData>(get2().GetEnumerator());
|
||||
var deferred = new List<GBEncounterData>();
|
||||
|
@ -207,7 +207,7 @@ namespace PKHeX.Core
|
|||
}
|
||||
IEnumerable<GBEncounterData> get2()
|
||||
{
|
||||
if (!pkm.Gen1_NotTradeback && AllowGen2VCTransfer)
|
||||
if (!pkm.Gen1_NotTradeback)
|
||||
foreach (var z in GenerateRawEncounters12(pkm, crystal ? GameVersion.C : GameVersion.GSC))
|
||||
yield return z;
|
||||
}
|
||||
|
|
|
@ -424,7 +424,7 @@ namespace PKHeX.Core
|
|||
Move2_PP = Move2_PP,
|
||||
Move3_PP = Move3_PP,
|
||||
Move4_PP = Move4_PP,
|
||||
Met_Location = 30017,
|
||||
Met_Location = Legal.Transfer2, // "Johto region", hardcoded.
|
||||
Gender = Gender,
|
||||
IsNicknamed = false,
|
||||
AltForm = AltForm,
|
||||
|
|
Loading…
Reference in a new issue