mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 08:47:14 +00:00
Add den crossover via online share
fix ability deferral for non-HA (eg. A4 mr rime encounter)
This commit is contained in:
parent
b29fc5216e
commit
e70a2f40b8
3 changed files with 12 additions and 7 deletions
|
@ -26,8 +26,10 @@ namespace PKHeX.Core
|
|||
|
||||
StaticSW = GetStaticEncounters(Encounter_SWSH, SW);
|
||||
StaticSH = GetStaticEncounters(Encounter_SWSH, SH);
|
||||
StaticSW = ArrayUtil.ConcatAll(StaticSW, Nest_Common, Nest_SW, GetStaticEncounters(Crystal_SWSH, SW));
|
||||
StaticSH = ArrayUtil.ConcatAll(StaticSH, Nest_Common, Nest_SH, GetStaticEncounters(Crystal_SWSH, SH));
|
||||
|
||||
// Include Nest Tables for both versions -- online play can share them across versions! In the IsMatch method we check if it's a valid share.
|
||||
StaticSW = ArrayUtil.ConcatAll(StaticSW, Nest_Common, Nest_SW, Nest_SH, GetStaticEncounters(Crystal_SWSH, SW));
|
||||
StaticSH = ArrayUtil.ConcatAll(StaticSH, Nest_Common, Nest_SW, Nest_SH, GetStaticEncounters(Crystal_SWSH, SH));
|
||||
|
||||
MarkEncountersGeneration(8, SlotsSW, SlotsSH);
|
||||
MarkEncountersGeneration(8, StaticSW, StaticSH, TradeGift_SWSH);
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace PKHeX.Core
|
|||
private const byte Nest91 = 91;
|
||||
private const byte Nest92 = 92;
|
||||
|
||||
internal static IReadOnlyList<IReadOnlyList<byte>> NestLocations = new []
|
||||
internal static readonly IReadOnlyList<IReadOnlyList<byte>> NestLocations = new []
|
||||
{
|
||||
new byte[] {144, 134, 122}, // 00 : Stony Wilderness, South Lake Miloch, Rolling Fields
|
||||
new byte[] {144, 126}, // 01 : Stony Wilderness, Watchtower Ruins
|
||||
|
@ -196,10 +196,10 @@ namespace PKHeX.Core
|
|||
new byte[] {142, 124}, // 91 : Bridge Field, Dappled Grove
|
||||
new byte[] {146}, // 92 : Dusty Bowl
|
||||
};
|
||||
|
||||
|
||||
// Abilities Allowed
|
||||
internal const int A3 = 0; // 1/2 only
|
||||
internal const int A4 = -1; // 1/2/H
|
||||
private const int A4 = -1; // 1/2/H
|
||||
|
||||
internal static readonly EncounterStatic8N[] Nest_Common =
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace PKHeX.Core
|
|||
protected override bool IsMatchLocation(PKM pkm)
|
||||
{
|
||||
var loc = pkm.Met_Location;
|
||||
return loc == OnlineNest || loc <= 255 && NestLocations.Contains((byte)loc);
|
||||
return loc == OnlineNest || (loc <= 255 && NestLocations.Contains((byte)loc));
|
||||
}
|
||||
|
||||
public override bool IsMatch(PKM pkm, int lvl)
|
||||
|
@ -66,6 +66,9 @@ namespace PKHeX.Core
|
|||
if (pkm.FlawlessIVCount < MinRank + 1)
|
||||
return false;
|
||||
|
||||
if (Version != GameVersion.SWSH && pkm.Version != (int) Version && pkm.Met_Location != OnlineNest)
|
||||
return false;
|
||||
|
||||
return base.IsMatch(pkm, lvl);
|
||||
}
|
||||
|
||||
|
@ -74,7 +77,7 @@ namespace PKHeX.Core
|
|||
if (base.IsMatchDeferred(pkm))
|
||||
return true;
|
||||
if (Ability == Encounters8Nest.A3 && pkm.AbilityNumber == 4)
|
||||
return false;
|
||||
return true;
|
||||
if (pkm is IGigantamax g && g.CanGigantamax != CanGigantamax)
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue