mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 12:03:10 +00:00
Add weather marks, rebuild fixed encs
Still a few stragglers, but better overall.
This commit is contained in:
parent
09590a46b4
commit
9c0e9c31da
7 changed files with 27 additions and 6 deletions
|
@ -105,6 +105,18 @@ public sealed record EncounterSlot9(EncounterArea9 Parent, ushort Species, byte
|
|||
168 => Standard, // Infernal Pass
|
||||
170 => Standard, // Chilling Waterhead
|
||||
|
||||
174 => Standard, // Savanna Biome
|
||||
176 => Standard, // Coastal Biome
|
||||
178 => Standard, // Canyon Biome
|
||||
180 => Snow, // Polar Biome
|
||||
182 => Standard, // Central Plaza
|
||||
184 => Standard, // Savanna Plaza
|
||||
186 => Standard, // Coastal Plaza
|
||||
188 => Standard, // Canyon Plaza
|
||||
190 => Standard, // Polar Plaza
|
||||
192 => Standard, // Chargestone Cavern
|
||||
194 => Standard, // Torchlit Labyrinth
|
||||
|
||||
_ => None,
|
||||
};
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace PKHeX.Core;
|
|||
/// Generation 9 Tera Raid Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTera9
|
||||
: IEncounterable, IEncounterMatch, IEncounterConvertible<PK9>, ITeraRaid9, IMoveset, IFlawlessIVCount, IFixedGender
|
||||
: IEncounterable, IEncounterMatch, IEncounterConvertible<PK9>, ITeraRaid9, IMoveset, IFlawlessIVCount, IFixedGender, IEncounterFormRandom
|
||||
{
|
||||
public int Generation => 9;
|
||||
public EntityContext Context => EntityContext.Gen9;
|
||||
|
@ -39,6 +39,8 @@ public sealed record EncounterTera9
|
|||
public bool IsAvailableHostViolet => RandRateMinViolet != -1;
|
||||
public required TeraRaidMapParent Map { get; init; }
|
||||
|
||||
public bool IsRandomUnspecificForm => Form >= EncounterUtil1.FormDynamic;
|
||||
|
||||
public string Name => $"Tera Raid Encounter [{(Index == 0 ? "Base" : Index)}] {Stars}★";
|
||||
public string LongName => Name;
|
||||
public byte LevelMin => Level;
|
||||
|
@ -230,7 +232,7 @@ public sealed record EncounterTera9
|
|||
return false;
|
||||
if (!IsMatchLocation(pk))
|
||||
return false;
|
||||
if (Form != evo.Form && !FormInfo.IsFormChangeable(Species, Form, pk.Form, Context, pk.Context))
|
||||
if (Form != evo.Form && !IsRandomUnspecificForm && !FormInfo.IsFormChangeable(Species, Form, pk.Form, Context, pk.Context))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -259,9 +261,9 @@ public sealed record EncounterTera9
|
|||
return IsMatchDeferred(pk);
|
||||
}
|
||||
|
||||
private bool IsMatchLocationExact(PKM pk) => pk.Met_Location == Location;
|
||||
private static bool IsMatchLocationExact(PKM pk) => pk.Met_Location == Location;
|
||||
|
||||
private bool IsMatchLocationRemapped(PKM pk)
|
||||
private static bool IsMatchLocationRemapped(PKM pk)
|
||||
{
|
||||
var met = (ushort)pk.Met_Location;
|
||||
var version = pk.Version;
|
||||
|
|
|
@ -61,6 +61,13 @@ public sealed class FormArgumentVerifier : Verifier
|
|||
> 9_999 => GetInvalid(LFormArgumentHigh),
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
},
|
||||
Overqwil => arg switch
|
||||
{
|
||||
> 9_999 => GetInvalid(LFormArgumentHigh),
|
||||
< 20 when !data.Info.EvoChainsAllGens.HasVisitedGen9 => GetInvalid(LFormArgumentLow),
|
||||
>= 20 when !data.Info.EvoChainsAllGens.HasVisitedPLA => GetInvalid(LFormArgumentLow),
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
},
|
||||
Stantler => arg switch
|
||||
{
|
||||
not 0 when pk.IsEgg => GetInvalid(LFormArgumentNotAllowed),
|
||||
|
@ -90,7 +97,6 @@ public sealed class FormArgumentVerifier : Verifier
|
|||
Alcremie => VerifyFormArgumentRange(enc.Species, Alcremie, arg, 0, (uint)AlcremieDecoration.Ribbon),
|
||||
Wyrdeer => VerifyFormArgumentRange(enc.Species, Wyrdeer, arg, 20, 9999),
|
||||
Basculegion => VerifyFormArgumentRange(enc.Species, Basculegion, arg, 294, 9999),
|
||||
Overqwil => VerifyFormArgumentRange(enc.Species, Overqwil, arg, 20, 9999),
|
||||
Annihilape => VerifyFormArgumentRange(enc.Species, Annihilape, arg, 20, 9999),
|
||||
Kingambit => VerifyFormArgumentRange(enc.Species, Kingambit, arg, 3, 9999),
|
||||
Gholdengo => VerifyFormArgumentRange(enc.Species, Gholdengo, arg, 999, 999),
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -104,7 +104,8 @@ public static class SpriteUtil
|
|||
if (SpriteBuilder.ShowTeraType != SpriteBackgroundType.None && pk is ITeraType t)
|
||||
{
|
||||
var type = t.TeraType;
|
||||
sprite = ApplyTeraColor((byte)type, sprite, SpriteBuilder.ShowTeraType);
|
||||
if (TeraTypeUtil.IsOverrideValid((byte)type))
|
||||
sprite = ApplyTeraColor((byte)type, sprite, SpriteBuilder.ShowTeraType);
|
||||
}
|
||||
if (flagIllegal)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue