mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-07-21 14:20:21 -05:00
Add trainer ID checks for cxd/rs
Templates: Add more interfaces for trainer ID properties Closes #4431
This commit is contained in:
parent
f3f89c1f4b
commit
46bb7e3d3b
|
|
@ -183,21 +183,21 @@ public static class Encounters5BW
|
|||
#region Trade Tables
|
||||
internal static readonly EncounterTrade5BW[] TradeGift_BW =
|
||||
[
|
||||
new(TradeNames, 04, BW, 0xD400007F) { Species = 587, Level = 30, Ability = OnlyFirst, ID32 = 11195, OTGender = 0, Gender = 0, IVs = new(20,20,31,20,20,20), Nature = Nature.Lax }, // Emolga
|
||||
new(TradeNames, 05, BW, 0x2A000000) { Species = 479, Level = 60, Ability = OnlyFirst, ID32 = 54673, OTGender = 1, Gender = 2, IVs = new(20,20,20,20,20,31), Nature = Nature.Gentle }, // Rotom
|
||||
new(TradeNames, 06, BW, 0x6200001F) { Species = 446, Level = 60, Ability = OnlySecond, ID32 = 40217, OTGender = 0, Gender = 0, IVs = new(31,20,20,20,20,20), Nature = Nature.Serious }, // Munchlax
|
||||
new(TradeNames, 04, BW, 0xD400007F) { Species = 587, Level = 30, Ability = OnlyFirst, TID16 = 11195, OTGender = 0, Gender = 0, IVs = new(20,20,31,20,20,20), Nature = Nature.Lax }, // Emolga
|
||||
new(TradeNames, 05, BW, 0x2A000000) { Species = 479, Level = 60, Ability = OnlyFirst, TID16 = 54673, OTGender = 1, Gender = 2, IVs = new(20,20,20,20,20,31), Nature = Nature.Gentle }, // Rotom
|
||||
new(TradeNames, 06, BW, 0x6200001F) { Species = 446, Level = 60, Ability = OnlySecond, TID16 = 40217, OTGender = 0, Gender = 0, IVs = new(31,20,20,20,20,20), Nature = Nature.Serious }, // Munchlax
|
||||
];
|
||||
|
||||
internal static readonly EncounterTrade5BW[] TradeGift_B =
|
||||
[
|
||||
new(TradeNames, 00, B , 0x64000000) { Species = 548, Level = 15, Ability = OnlyFirst, ID32 = 39922, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Petilil
|
||||
new(TradeNames, 02, B , 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, ID32 = 27646, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 0 }, // Basculin-Red
|
||||
new(TradeNames, 00, B , 0x64000000) { Species = 548, Level = 15, Ability = OnlyFirst, TID16 = 39922, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Petilil
|
||||
new(TradeNames, 02, B , 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, TID16 = 27646, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 0 }, // Basculin-Red
|
||||
];
|
||||
|
||||
internal static readonly EncounterTrade5BW[] TradeGift_W =
|
||||
[
|
||||
new(TradeNames, 01, W, 0x6400007E) { Species = 546, Level = 15, Ability = OnlyFirst, ID32 = 39922, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Cottonee
|
||||
new(TradeNames, 03, W, 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, ID32 = 27646, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 1 }, // Basculin-Blue
|
||||
new(TradeNames, 01, W, 0x6400007E) { Species = 546, Level = 15, Ability = OnlyFirst, TID16 = 39922, OTGender = 1, Gender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Cottonee
|
||||
new(TradeNames, 03, W, 0x9400007F) { Species = 550, Level = 25, Ability = OnlyFirst, TID16 = 27646, OTGender = 0, Gender = 0, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant, Form = 1 }, // Basculin-Blue
|
||||
];
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,9 +156,9 @@ internal static class Encounters6AO
|
|||
#region Trade Tables
|
||||
internal static readonly EncounterTrade6[] TradeGift_AO =
|
||||
[
|
||||
new(TradeNames, 00, ORAS, 01,3,05,040) { Species = 296, Level = 09, Ability = OnlySecond, ID32 = 30724, Gender = 0, OTGender = 0, IVs = new(-1,31,-1,-1,-1,-1), Nature = Nature.Brave }, // Makuhita
|
||||
new(TradeNames, 01, ORAS, 34,3,13,176) { Species = 300, Level = 30, Ability = OnlyFirst, ID32 = 03239, Gender = 1, OTGender = 1, IVs = new(-1,-1,-1,31,-1,-1), Nature = Nature.Naughty }, // Skitty
|
||||
new(TradeNames, 02, ORAS, 07,4,10,319) { Species = 222, Level = 50, Ability = OnlyHidden, ID32 = 00325, Gender = 1, OTGender = 1, IVs = new(31,-1,-1,-1,-1,31), Nature = Nature.Calm }, // Corsola
|
||||
new(TradeNames, 00, ORAS, 01,3,05,040) { Species = 296, Level = 09, Ability = OnlySecond, TID16 = 30724, Gender = 0, OTGender = 0, IVs = new(-1,31,-1,-1,-1,-1), Nature = Nature.Brave }, // Makuhita
|
||||
new(TradeNames, 01, ORAS, 34,3,13,176) { Species = 300, Level = 30, Ability = OnlyFirst, TID16 = 03239, Gender = 1, OTGender = 1, IVs = new(-1,-1,-1,31,-1,-1), Nature = Nature.Naughty }, // Skitty
|
||||
new(TradeNames, 02, ORAS, 07,4,10,319) { Species = 222, Level = 50, Ability = OnlyHidden, TID16 = 00325, Gender = 1, OTGender = 1, IVs = new(31,-1,-1,-1,-1,31), Nature = Nature.Calm }, // Corsola
|
||||
];
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,17 +90,17 @@ internal static class Encounters6XY
|
|||
#region Trade Tables
|
||||
internal static readonly EncounterTrade6[] TradeGift_XY =
|
||||
[
|
||||
new(TradeNames, 00, XY, 01,3,23,049) { Species = 129, Level = 05, Ability = OnlyFirst, ID32 = 44285, Gender = 0, OTGender = 0, IVs = new(-1,31,-1,-1,31,-1), Nature = Nature.Adamant }, // Magikarp
|
||||
new(TradeNames, 01, XY, 10,3,00,000) { Species = 133, Level = 05, Ability = OnlyFirst, ID32 = 29294, Gender = 1, OTGender = 1, IVs = default, Nature = Nature.Docile }, // Eevee
|
||||
new(TradeNames, 00, XY, 01,3,23,049) { Species = 129, Level = 05, Ability = OnlyFirst, TID16 = 44285, Gender = 0, OTGender = 0, IVs = new(-1,31,-1,-1,31,-1), Nature = Nature.Adamant }, // Magikarp
|
||||
new(TradeNames, 01, XY, 10,3,00,000) { Species = 133, Level = 05, Ability = OnlyFirst, TID16 = 29294, Gender = 1, OTGender = 1, IVs = default, Nature = Nature.Docile }, // Eevee
|
||||
|
||||
new(TradeNames, 02, XY, 15,4,13,017) { Species = 083, Level = 10, Ability = OnlyFirst, ID32 = 00185, Gender = 0, OTGender = 0, IVs = new(-1,-1,-1,31,-1,-1), Nature = Nature.Jolly }, // Farfetch'd
|
||||
new(TradeNames, 03, XY, 17,5,08,025) { Species = 208, Level = 20, Ability = OnlyFirst, ID32 = 19250, Gender = 1, OTGender = 0, IVs = new(-1,-1,31,-1,-1,-1), Nature = Nature.Impish }, // Steelix
|
||||
new(TradeNames, 04, XY, 18,7,20,709) { Species = 625, Level = 50, Ability = OnlyFirst, ID32 = 03447, Gender = 0, OTGender = 1, IVs = new(-1,31,-1,-1,-1,-1), Nature = Nature.Adamant }, // Bisharp
|
||||
new(TradeNames, 02, XY, 15,4,13,017) { Species = 083, Level = 10, Ability = OnlyFirst, TID16 = 00185, Gender = 0, OTGender = 0, IVs = new(-1,-1,-1,31,-1,-1), Nature = Nature.Jolly }, // Farfetch'd
|
||||
new(TradeNames, 03, XY, 17,5,08,025) { Species = 208, Level = 20, Ability = OnlyFirst, TID16 = 19250, Gender = 1, OTGender = 0, IVs = new(-1,-1,31,-1,-1,-1), Nature = Nature.Impish }, // Steelix
|
||||
new(TradeNames, 04, XY, 18,7,20,709) { Species = 625, Level = 50, Ability = OnlyFirst, TID16 = 03447, Gender = 0, OTGender = 1, IVs = new(-1,31,-1,-1,-1,-1), Nature = Nature.Adamant }, // Bisharp
|
||||
|
||||
new(TradeNames, 05, XY, 02,3,11,005) { Species = 656, Level = 05, Ability = OnlyFirst, ID32 = 00037, Gender = 0, OTGender = 1, IVs = new(20,20,20,31,20,20), Nature = Nature.Jolly }, // Froakie
|
||||
new(TradeNames, 06, XY, 02,3,09,005) { Species = 650, Level = 05, Ability = OnlyFirst, ID32 = 00037, Gender = 0, OTGender = 1, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant }, // Chespin
|
||||
new(TradeNames, 07, XY, 02,3,18,005) { Species = 653, Level = 05, Ability = OnlyFirst, ID32 = 00037, Gender = 0, OTGender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Fennekin
|
||||
new(TradeNames, 08, XY, 51,4,04,033) { Species = 280, Level = 05, Ability = OnlyFirst, ID32 = 37110, Gender = 1, OTGender = 1, IVs = new(20,20,20,31,31,20), Nature = Nature.Modest, IsFixedNickname = false }, // Ralts
|
||||
new(TradeNames, 05, XY, 02,3,11,005) { Species = 656, Level = 05, Ability = OnlyFirst, TID16 = 00037, Gender = 0, OTGender = 1, IVs = new(20,20,20,31,20,20), Nature = Nature.Jolly }, // Froakie
|
||||
new(TradeNames, 06, XY, 02,3,09,005) { Species = 650, Level = 05, Ability = OnlyFirst, TID16 = 00037, Gender = 0, OTGender = 1, IVs = new(20,31,20,20,20,20), Nature = Nature.Adamant }, // Chespin
|
||||
new(TradeNames, 07, XY, 02,3,18,005) { Species = 653, Level = 05, Ability = OnlyFirst, TID16 = 00037, Gender = 0, OTGender = 1, IVs = new(20,20,20,20,31,20), Nature = Nature.Modest }, // Fennekin
|
||||
new(TradeNames, 08, XY, 51,4,04,033) { Species = 280, Level = 05, Ability = OnlyFirst, TID16 = 37110, Gender = 1, OTGender = 1, IVs = new(20,20,20,31,31,20), Nature = Nature.Modest, IsFixedNickname = false }, // Ralts
|
||||
];
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,9 +97,9 @@ internal static class Encounters8b
|
|||
|
||||
internal static readonly EncounterTrade8b[] TradeGift_BDSP =
|
||||
[
|
||||
new(TradeNames, 00, BDSP) { Species = 063, EncryptionConstant = 0x0000008E, PID = 0xFF50A8F5, Level = 09, Ability = OnlyFirst, Gender = 0, OTGender = 0, ID32 = 25643, IVs = new(28,10,09,31,11,03), Moves = new(100,000,000,000), HeightScalar = 029, WeightScalar = 202, Nature = Nature.Quiet }, // Abra
|
||||
new(TradeNames, 01, BDSP) { Species = 441, EncryptionConstant = 0x00000867, PID = 0x17DAAB19, Level = 15, Ability = OnlySecond, Gender = 1, OTGender = 0, ID32 = 44142, IVs = new(17,08,29,25,17,23), Moves = new(448,047,064,045), HeightScalar = 088, WeightScalar = 091, Nature = Nature.Lonely }, // Chatot
|
||||
new(TradeNames, 02, BDSP) { Species = 093, EncryptionConstant = 0x00000088, PID = 0xF60AB5BB, Level = 33, Ability = OnlyFirst, Gender = 0, OTGender = 0, ID32 = 19248, IVs = new(18,24,28,02,22,30), Moves = new(247,371,389,109), HeightScalar = 096, WeightScalar = 208, Nature = Nature.Hasty }, // Haunter
|
||||
new(TradeNames, 03, BDSP) { Species = 129, EncryptionConstant = 0x0000045C, PID = 0xFCE82F88, Level = 45, Ability = OnlyFirst, Gender = 1, OTGender = 0, ID32 = 53277, IVs = new(03,03,31,02,11,03), Moves = new(150,000,000,000), HeightScalar = 169, WeightScalar = 068, Nature = Nature.Mild }, // Magikarp
|
||||
new(TradeNames, 00, BDSP) { Species = 063, EncryptionConstant = 0x0000008E, PID = 0xFF50A8F5, Level = 09, Ability = OnlyFirst, Gender = 0, OTGender = 0, TID16 = 25643, IVs = new(28,10,09,31,11,03), Moves = new(100,000,000,000), HeightScalar = 029, WeightScalar = 202, Nature = Nature.Quiet }, // Abra
|
||||
new(TradeNames, 01, BDSP) { Species = 441, EncryptionConstant = 0x00000867, PID = 0x17DAAB19, Level = 15, Ability = OnlySecond, Gender = 1, OTGender = 0, TID16 = 44142, IVs = new(17,08,29,25,17,23), Moves = new(448,047,064,045), HeightScalar = 088, WeightScalar = 091, Nature = Nature.Lonely }, // Chatot
|
||||
new(TradeNames, 02, BDSP) { Species = 093, EncryptionConstant = 0x00000088, PID = 0xF60AB5BB, Level = 33, Ability = OnlyFirst, Gender = 0, OTGender = 0, TID16 = 19248, IVs = new(18,24,28,02,22,30), Moves = new(247,371,389,109), HeightScalar = 096, WeightScalar = 208, Nature = Nature.Hasty }, // Haunter
|
||||
new(TradeNames, 03, BDSP) { Species = 129, EncryptionConstant = 0x0000045C, PID = 0xFCE82F88, Level = 45, Ability = OnlyFirst, Gender = 1, OTGender = 0, TID16 = 53277, IVs = new(03,03,31,02,11,03), Moves = new(150,000,000,000), HeightScalar = 169, WeightScalar = 068, Nature = Nature.Mild }, // Magikarp
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 2 Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade2 : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IFixedGender, IFixedIVSet, IEncounterConvertible<PK2>
|
||||
public sealed record EncounterTrade2 : IEncounterable, IEncounterMatch, IEncounterConvertible<PK2>,
|
||||
IFixedTrainer, IFixedNickname, IFixedGender, IFixedIVSet, ITrainerID16ReadOnly
|
||||
{
|
||||
public byte Generation => 2;
|
||||
public EntityContext Context => EntityContext.Gen2;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 3 Static Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterGift3Colo : IEncounterable, IEncounterMatch, IEncounterConvertible<CK3>, IRandomCorrelation, IFixedTrainer, IMoveset
|
||||
public sealed record EncounterGift3Colo : IEncounterable, IEncounterMatch, IEncounterConvertible<CK3>,
|
||||
IRandomCorrelation, IFixedTrainer, IMoveset, ITrainerID16ReadOnly
|
||||
{
|
||||
public byte Generation => 3;
|
||||
public EntityContext Context => EntityContext.Gen3;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace PKHeX.Core;
|
|||
/// Generation 3 Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade3 : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname,
|
||||
IFixedGender, IFixedNature, IFixedIVSet, IEncounterConvertible<PK3>, IContestStatsReadOnly
|
||||
IFixedGender, IFixedNature, IFixedIVSet, IEncounterConvertible<PK3>, IContestStatsReadOnly, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 3;
|
||||
public EntityContext Context => EntityContext.Gen3;
|
||||
|
|
@ -45,6 +45,7 @@ public sealed record EncounterTrade3 : IEncounterable, IEncounterMatch, IFixedTr
|
|||
|
||||
public required ushort TID16 { get; init; }
|
||||
public ushort SID16 { get; init; }
|
||||
public uint ID32 => TID16 | (uint)(SID16 << 16);
|
||||
|
||||
public byte ContestCool { get; private init; }
|
||||
public byte ContestBeauty { get; private init; }
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 3 Static Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade3XD : IEncounterable, IEncounterMatch, IEncounterConvertible<XK3>, IRandomCorrelation, IFixedTrainer, IFixedNickname, IFatefulEncounterReadOnly, IMoveset
|
||||
public sealed record EncounterTrade3XD : IEncounterable, IEncounterMatch, IEncounterConvertible<XK3>,
|
||||
IRandomCorrelation, IFixedTrainer, IFixedNickname, IFatefulEncounterReadOnly, IMoveset, ITrainerID16ReadOnly
|
||||
{
|
||||
public byte Generation => 3;
|
||||
public EntityContext Context => EntityContext.Gen3;
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 4 Trade Encounter with a fixed PID value.
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade4PID
|
||||
: IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IFixedIVSet, IEncounterConvertible<PK4>, IContestStatsReadOnly, IMoveset, IFixedGender, IFixedNature
|
||||
public sealed record EncounterTrade4PID : IEncounterable, IEncounterMatch, IEncounterConvertible<PK4>,
|
||||
IFixedTrainer, IFixedNickname, IFixedIVSet, IContestStatsReadOnly, IMoveset, IFixedGender, IFixedNature, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 4;
|
||||
public EntityContext Context => EntityContext.Gen4;
|
||||
|
|
@ -39,7 +39,7 @@ public sealed record EncounterTrade4PID
|
|||
|
||||
public Nature Nature => (Nature)(PID % 25);
|
||||
public byte Form => 0;
|
||||
private uint ID32 => (uint)(TID16 | (SID16 << 16));
|
||||
public uint ID32 => (uint)(TID16 | (SID16 << 16));
|
||||
private bool IsMetUnset => MetLocation == 0;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 4 Trade Encounter with a fixed PID value, met location, and version.
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade4RanchGift
|
||||
: IEncounterable, IEncounterMatch, IEncounterConvertible<PK4>, IFatefulEncounterReadOnly, IFixedTrainer,
|
||||
IMoveset, IFixedGender, IFixedNature, IMetLevel
|
||||
public sealed record EncounterTrade4RanchGift : IEncounterable, IEncounterMatch, IEncounterConvertible<PK4>,
|
||||
IFatefulEncounterReadOnly, IFixedTrainer, IMoveset, IFixedGender, IFixedNature, IMetLevel, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 4;
|
||||
public EntityContext Context => EntityContext.Gen4;
|
||||
|
|
@ -36,9 +35,9 @@ public sealed record EncounterTrade4RanchGift
|
|||
|
||||
public bool FatefulEncounter { get; }
|
||||
public required Moveset Moves { get; init; }
|
||||
public const ushort TID16 = 1000;
|
||||
public ushort TID16 => 1000;
|
||||
public required ushort SID16 { get; init; }
|
||||
private uint ID32 => (uint)(TID16 | (SID16 << 16));
|
||||
public uint ID32 => (uint)(TID16 | (SID16 << 16));
|
||||
public required byte OTGender { get; init; }
|
||||
public required byte Gender { get; init; }
|
||||
public required AbilityPermission Ability { get; init; }
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 5 Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade5B2W2 : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IEncounterConvertible<PK5>, IFixedGender, IFixedNature, IFixedIVSet
|
||||
public sealed record EncounterTrade5B2W2 : IEncounterable, IEncounterMatch, IEncounterConvertible<PK5>,
|
||||
IFixedTrainer, IFixedNickname, IFixedGender, IFixedNature, IFixedIVSet, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 5;
|
||||
public EntityContext Context => EntityContext.Gen5;
|
||||
|
|
@ -25,6 +26,8 @@ public sealed record EncounterTrade5B2W2 : IEncounterable, IEncounterMatch, IFix
|
|||
public required AbilityPermission Ability { get; init; }
|
||||
public required byte OTGender { get; init; }
|
||||
public required uint ID32 { get; init; }
|
||||
public ushort TID16 => (ushort)ID32;
|
||||
public ushort SID16 => (ushort)(ID32 >> 16);
|
||||
|
||||
public byte Form { get; init; }
|
||||
public required byte Gender { get; init; }
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
namespace PKHeX.Core;
|
||||
|
||||
/// <summary>Generation 5 Trade with Fixed PID</summary>
|
||||
public sealed record EncounterTrade5BW : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IFixedGender, IFixedNature, IFixedIVSet, IEncounterConvertible<PK5>
|
||||
public sealed record EncounterTrade5BW : IEncounterable, IEncounterMatch, IEncounterConvertible<PK5>,
|
||||
IFixedTrainer, IFixedNickname, IFixedGender, IFixedNature, IFixedIVSet, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 5;
|
||||
public EntityContext Context => EntityContext.Gen5;
|
||||
|
|
@ -26,7 +27,9 @@ public sealed record EncounterTrade5BW : IEncounterable, IEncounterMatch, IFixed
|
|||
public required byte Level { get; init; }
|
||||
public required AbilityPermission Ability { get; init; }
|
||||
public required byte OTGender { get; init; }
|
||||
public required ushort ID32 { get; init; }
|
||||
public required ushort TID16 { get; init; }
|
||||
public ushort SID16 => 0;
|
||||
public uint ID32 => TID16;
|
||||
public required byte Gender { get; init; }
|
||||
public required IndividualValueSet IVs { get; init; }
|
||||
public required Nature Nature { get; init; }
|
||||
|
|
@ -82,7 +85,7 @@ public PK5 ConvertToPKM(ITrainerInfo tr, EncounterCriteria criteria)
|
|||
Nature = Nature,
|
||||
Ball = (byte)FixedBall,
|
||||
|
||||
ID32 = ID32,
|
||||
TID16 = TID16,
|
||||
Version = version,
|
||||
Language = lang == 1 ? 0 : lang, // Trades for JPN games have language ID of 0, not 1.
|
||||
OriginalTrainerGender = OTGender,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 6 Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade6 : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IFixedGender, IFixedNature, IFixedIVSet, IEncounterConvertible<PK6>, IMemoryOTReadOnly
|
||||
public sealed record EncounterTrade6 : IEncounterable, IEncounterMatch, IEncounterConvertible<PK6>,
|
||||
IFixedTrainer, IFixedNickname, IFixedGender, IFixedNature, IFixedIVSet, IMemoryOTReadOnly, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 6;
|
||||
public EntityContext Context => EntityContext.Gen6;
|
||||
|
|
@ -22,7 +23,9 @@ public sealed record EncounterTrade6 : IEncounterable, IEncounterMatch, IFixedTr
|
|||
private readonly ReadOnlyMemory<string> Nicknames;
|
||||
|
||||
public required Nature Nature { get; init; }
|
||||
public required ushort ID32 { get; init; }
|
||||
public required ushort TID16 { get; init; }
|
||||
public ushort SID16 => 0;
|
||||
public uint ID32 => TID16;
|
||||
public required AbilityPermission Ability { get; init; }
|
||||
public required byte Gender { get; init; }
|
||||
public required byte OTGender { get; init; }
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 7 Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade7 : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IEncounterConvertible<PK7>, IMemoryOTReadOnly, IFixedGender, IFixedNature, IFixedIVSet
|
||||
public sealed record EncounterTrade7 : IEncounterable, IEncounterMatch, IEncounterConvertible<PK7>,
|
||||
IFixedTrainer, IFixedNickname, IMemoryOTReadOnly, IFixedGender, IFixedNature, IFixedIVSet, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 7;
|
||||
public EntityContext Context => EntityContext.Gen7;
|
||||
|
|
@ -27,6 +28,8 @@ public sealed record EncounterTrade7 : IEncounterable, IEncounterMatch, IFixedTr
|
|||
|
||||
public required Nature Nature { get; init; }
|
||||
public required uint ID32 { get; init; }
|
||||
public ushort TID16 => (ushort)ID32;
|
||||
public ushort SID16 => (ushort)(ID32 >> 16);
|
||||
public required AbilityPermission Ability { get; init; }
|
||||
public required byte Gender { get; init; }
|
||||
public required byte OTGender { get; init; }
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 7 LGP/E Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade7b(GameVersion Version) : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedIVSet, IEncounterConvertible<PB7>
|
||||
public sealed record EncounterTrade7b(GameVersion Version) : IEncounterable, IEncounterMatch, IEncounterConvertible<PB7>,
|
||||
IFixedTrainer, IFixedIVSet, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 7;
|
||||
public EntityContext Context => EntityContext.Gen7b;
|
||||
|
|
@ -21,6 +22,8 @@ public sealed record EncounterTrade7b(GameVersion Version) : IEncounterable, IEn
|
|||
public required ReadOnlyMemory<string> TrainerNames { get; init; }
|
||||
|
||||
public required uint ID32 { get; init; }
|
||||
public ushort SID16 => (ushort)(ID32 >> 16);
|
||||
public ushort TID16 => (ushort)ID32;
|
||||
public required byte OTGender { get; init; }
|
||||
public required ushort Species { get; init; }
|
||||
public required byte Form { get; init; }
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 8 Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade8 : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IEncounterConvertible<PK8>, IDynamaxLevelReadOnly, IRelearn, IMemoryOTReadOnly, IFlawlessIVCount, IFixedGender, IFixedNature, IFixedIVSet
|
||||
public sealed record EncounterTrade8 : IEncounterable, IEncounterMatch, IEncounterConvertible<PK8>,
|
||||
IFixedTrainer, IFixedNickname, IDynamaxLevelReadOnly, IRelearn, IMemoryOTReadOnly, IFlawlessIVCount,
|
||||
IFixedGender, IFixedNature, IFixedIVSet, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 8;
|
||||
public EntityContext Context => EntityContext.Gen8;
|
||||
|
|
@ -33,6 +35,8 @@ public sealed record EncounterTrade8 : IEncounterable, IEncounterMatch, IFixedTr
|
|||
|
||||
public Nature Nature { get; init; } // always set by either constructor or initializer
|
||||
public required uint ID32 { get; init; }
|
||||
public ushort TID16 => (ushort)ID32;
|
||||
public ushort SID16 => (ushort)(ID32 >> 16);
|
||||
public required AbilityPermission Ability { get; init; }
|
||||
public required byte Gender { get; init; }
|
||||
public required byte OTGender { get; init; }
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 8 BD/SP Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade8b : IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IEncounterConvertible<PB8>, IScaledSizeReadOnly, IFixedOTFriendship, IMoveset, IContestStatsReadOnly, IFixedGender, IFixedNature, IFixedIVSet
|
||||
public sealed record EncounterTrade8b : IEncounterable, IEncounterMatch, IEncounterConvertible<PB8>,
|
||||
IFixedTrainer, IFixedNickname, IScaledSizeReadOnly, IFixedOTFriendship, IMoveset,
|
||||
IContestStatsReadOnly, IFixedGender, IFixedNature, IFixedIVSet, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 8;
|
||||
public EntityContext Context => EntityContext.Gen8b;
|
||||
|
|
@ -23,7 +25,9 @@ public sealed record EncounterTrade8b : IEncounterable, IEncounterMatch, IFixedT
|
|||
private readonly ReadOnlyMemory<string> Nicknames;
|
||||
|
||||
public required Nature Nature { get; init; }
|
||||
public required ushort ID32 { get; init; }
|
||||
public required ushort TID16 { get; init; }
|
||||
public ushort SID16 => 0;
|
||||
public uint ID32 => TID16 | (uint)(SID16 << 16);
|
||||
public required AbilityPermission Ability { get; init; }
|
||||
public required byte Gender { get; init; }
|
||||
public required byte OTGender { get; init; }
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Generation 9 Trade Encounter
|
||||
/// </summary>
|
||||
public sealed record EncounterTrade9
|
||||
: IEncounterable, IEncounterMatch, IFixedTrainer, IFixedNickname, IEncounterConvertible<PK9>, IGemType, IFixedGender, IFixedNature, IRibbonPartner, IMoveset, IFixedIVSet
|
||||
public sealed record EncounterTrade9 : IEncounterable, IEncounterMatch, IEncounterConvertible<PK9>,
|
||||
IFixedTrainer, IFixedNickname, IGemType, IFixedGender, IFixedNature, IRibbonPartner, IMoveset, IFixedIVSet, ITrainerID32ReadOnly
|
||||
{
|
||||
public byte Generation => 9;
|
||||
public EntityContext Context => EntityContext.Gen9;
|
||||
|
|
@ -25,6 +25,8 @@ public sealed record EncounterTrade9
|
|||
|
||||
public required Nature Nature { get; init; }
|
||||
public required uint ID32 { get; init; }
|
||||
public ushort TID16 => (ushort)ID32;
|
||||
public ushort SID16 => (ushort)(ID32 >> 16);
|
||||
public required AbilityPermission Ability { get; init; }
|
||||
public byte Gender { get; init; }
|
||||
public required byte OTGender { get; init; }
|
||||
|
|
|
|||
|
|
@ -480,6 +480,8 @@ public static class LegalityCheckStrings
|
|||
|
||||
public static string LTradeNotAvailable { get; set; } = "Encounter cannot be traded to the active trainer.";
|
||||
|
||||
public static string LTrainerIDNoSeed { get; set; } = "Trainer ID is not obtainable from any RNG seed.";
|
||||
|
||||
public static string LTransferBad { get; set; } = "Incorrectly transferred from previous generation.";
|
||||
|
||||
public static string LTransferCurrentHandlerInvalid { get; set; } = "Invalid Current handler value, trainer details for save file expected another value.";
|
||||
|
|
|
|||
|
|
@ -95,6 +95,27 @@ public static bool SetFromIVsCXD<TEntity>(TEntity pk, EncounterCriteria criteria
|
|||
// Espeon:
|
||||
// Repeat above
|
||||
|
||||
/// <summary>
|
||||
/// Get the first possible starting seed that generates the given trainer ID and secret ID.
|
||||
/// </summary>
|
||||
/// <param name="tid">Generation 3 Trainer ID</param>
|
||||
/// <param name="sid">Generation 3 Secret ID</param>
|
||||
/// <param name="seed">Possible starting seed</param>
|
||||
/// <returns>True if a seed was found, false if no seed was found</returns>
|
||||
public static bool TryGetSeedTrainerID(ushort tid, ushort sid, out uint seed)
|
||||
{
|
||||
Span<uint> seeds = stackalloc uint[XDRNG.MaxCountSeedsPID];
|
||||
var count = XDRNG.GetSeeds(seeds, (uint)tid << 16, (uint)sid << 16);
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
seed = 0;
|
||||
return false;
|
||||
}
|
||||
seed = seeds[0];
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to set a valid PID/IV for the requested criteria for a Colosseum starter (Umbreon and Espeon), preferring to match Trainer IDs.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using static PKHeX.Core.MethodHCondition;
|
||||
using static PKHeX.Core.LeadRequired;
|
||||
using static PKHeX.Core.SlotType3;
|
||||
using System;
|
||||
|
||||
namespace PKHeX.Core;
|
||||
|
||||
|
|
@ -675,4 +676,25 @@ is Old_Rod
|
|||
or Good_Rod
|
||||
or Super_Rod
|
||||
or SwarmFish50;
|
||||
|
||||
/// <summary>
|
||||
/// Get the first possible starting seed that generates the given trainer ID and secret ID.
|
||||
/// </summary>
|
||||
/// <param name="tid">Generation 3 Trainer ID</param>
|
||||
/// <param name="sid">Generation 3 Secret ID</param>
|
||||
/// <param name="seed">Possible starting seed</param>
|
||||
/// <returns>True if a seed was found, false if no seed was found</returns>
|
||||
public static bool TryGetSeedTrainerID(ushort tid, ushort sid, out uint seed)
|
||||
{
|
||||
Span<uint> seeds = stackalloc uint[LCRNG.MaxCountSeedsPID];
|
||||
var count = LCRNGReversal.GetSeeds(seeds, (uint)sid << 16, (uint)tid << 16);
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
seed = 0;
|
||||
return false;
|
||||
}
|
||||
seed = seeds[0];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,12 +38,12 @@ private CheckResult VerifyForm(LegalityAnalysis data)
|
|||
var enc = data.EncounterMatch;
|
||||
var Info = data.Info;
|
||||
|
||||
if (!pi.IsFormWithinRange(form) && !FormInfo.IsValidOutOfBoundsForm(species, form, Info.Generation))
|
||||
if (!pi.IsFormWithinRange(form) && !FormInfo.IsValidOutOfBoundsForm(species, form, enc.Generation))
|
||||
return GetInvalid(string.Format(LFormInvalidRange, count - 1, form));
|
||||
|
||||
switch ((Species)species)
|
||||
{
|
||||
case Pikachu when Info.Generation == 6: // Cosplay
|
||||
case Pikachu when enc.Generation == 6: // Cosplay
|
||||
if (enc is not EncounterStatic6 s6)
|
||||
{
|
||||
if (form == 0)
|
||||
|
|
@ -61,7 +61,7 @@ private CheckResult VerifyForm(LegalityAnalysis data)
|
|||
case Eevee when form is not 0 && ParseSettings.ActiveTrainer is SAV7b {Version:GameVersion.GP}:
|
||||
return GetInvalid(LFormBattle);
|
||||
|
||||
case Pikachu when Info.Generation >= 7: // Cap
|
||||
case Pikachu when enc.Generation >= 7: // Cap
|
||||
var expectForm = enc is EncounterInvalid or EncounterEgg ? 0 : enc.Form;
|
||||
if (form != expectForm)
|
||||
{
|
||||
|
|
@ -70,9 +70,9 @@ private CheckResult VerifyForm(LegalityAnalysis data)
|
|||
return GetInvalid(msg);
|
||||
}
|
||||
break;
|
||||
case Unown when Info.Generation == 2 && form >= 26:
|
||||
case Unown when enc.Generation == 2 && form >= 26:
|
||||
return GetInvalid(string.Format(LFormInvalidRange, "Z", form == 26 ? "!" : "?"));
|
||||
case Unown when Info.Generation == 3 && form != EntityPID.GetUnownForm3(pk.EncryptionConstant):
|
||||
case Unown when enc.Generation == 3 && form != EntityPID.GetUnownForm3(pk.EncryptionConstant):
|
||||
return GetInvalid(string.Format(LFormInvalidExpect_0, EntityPID.GetUnownForm3(pk.EncryptionConstant)));
|
||||
case Dialga or Palkia or Giratina or Arceus when form > 0 && pk is PA8: // can change forms with key items
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public override void Verify(LegalityAnalysis data)
|
|||
return;
|
||||
}
|
||||
|
||||
if (VerifyUnNicknamedEncounter(data, pk, nickname))
|
||||
if (VerifyUnNicknamedEncounter(data, pk, nickname, enc))
|
||||
return;
|
||||
|
||||
// Non-nicknamed strings have already been checked.
|
||||
|
|
@ -70,7 +70,7 @@ public override void Verify(LegalityAnalysis data)
|
|||
var mostRecentNicknameContext = pk.Format >= 8 ? pk.Context : enc.Context;
|
||||
if (WordFilter.IsFiltered(nickname, out var badPattern, pk.Context, mostRecentNicknameContext))
|
||||
data.AddLine(GetInvalid($"Word Filter: {badPattern}"));
|
||||
if (TrainerNameVerifier.ContainsTooManyNumbers(nickname, data.Info.Generation))
|
||||
if (TrainerNameVerifier.ContainsTooManyNumbers(nickname, enc.Generation))
|
||||
data.AddLine(GetInvalid("Word Filter: Too many numbers."));
|
||||
}
|
||||
}
|
||||
|
|
@ -151,11 +151,11 @@ private void VerifyHomeGiftNickname(LegalityAnalysis data, IEncounterTemplate en
|
|||
data.AddLine(GetInvalid(LNickMatchLanguageFlag));
|
||||
}
|
||||
|
||||
private bool VerifyUnNicknamedEncounter(LegalityAnalysis data, PKM pk, ReadOnlySpan<char> nickname)
|
||||
private bool VerifyUnNicknamedEncounter(LegalityAnalysis data, PKM pk, ReadOnlySpan<char> nickname, IEncounterTemplate enc)
|
||||
{
|
||||
if (pk.IsNicknamed)
|
||||
{
|
||||
if (data.Info.Generation >= 8 && CanNicknameForeign8Plus(data, pk))
|
||||
if (enc.Generation >= 8 && CanNicknameForeign8Plus(data, pk))
|
||||
{
|
||||
// Can only nickname if it matches your language.
|
||||
// Setting the nickname to the same as the species name does not set the Nickname flag (equals unmodified, no flag)
|
||||
|
|
@ -176,9 +176,9 @@ private bool VerifyUnNicknamedEncounter(LegalityAnalysis data, PKM pk, ReadOnlyS
|
|||
data.AddLine(GetInvalid(LNickInvalidChar));
|
||||
return true;
|
||||
}
|
||||
if (nickname.Length > Legal.GetMaxLengthNickname(data.Info.Generation, (LanguageID)pk.Language))
|
||||
if (nickname.Length > Legal.GetMaxLengthNickname(enc.Generation, (LanguageID)pk.Language))
|
||||
{
|
||||
int length = GetForeignNicknameLength(pk, data.Info.EncounterOriginal, data.Info.Generation);
|
||||
int length = GetForeignNicknameLength(pk, enc, enc.Generation);
|
||||
var severe = (length != 0 && nickname.Length <= length) ? Severity.Fishy : Severity.Invalid;
|
||||
data.AddLine(Get(LNickLengthLong, severe));
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,20 @@ public override void Verify(LegalityAnalysis data)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (pk.Version == GameVersion.CXD)
|
||||
{
|
||||
var enc = data.EncounterMatch;
|
||||
if (enc is EncounterShadow3Colo or EncounterShadow3XD or EncounterSlot3XD)
|
||||
VerifyTrainerID_CXD(data, pk);
|
||||
}
|
||||
else if (pk.Version is GameVersion.R or GameVersion.S)
|
||||
{
|
||||
var enc = data.EncounterMatch;
|
||||
// If the trainer ID is that of the player, verify it is possible
|
||||
// For eggs, the version does not update on hatch, so it truly is from R/S.
|
||||
if (enc is not ITrainerID16ReadOnly) // all are 32-bit locked anyway
|
||||
VerifyTrainerID_RS(data, pk);
|
||||
}
|
||||
else if (pk.VC)
|
||||
{
|
||||
// Only TID is used for Gen 1/2 VC
|
||||
|
|
@ -55,6 +69,18 @@ public override void Verify(LegalityAnalysis data)
|
|||
data.AddLine(Get(LOTSuspicious, Severity.Fishy));
|
||||
}
|
||||
|
||||
public static void VerifyTrainerID_CXD<T>(LegalityAnalysis data, T tr) where T : ITrainerID32
|
||||
{
|
||||
if (!MethodCXD.TryGetSeedTrainerID(tr.TID16, tr.SID16, out _))
|
||||
data.AddLine(GetInvalid(LTrainerIDNoSeed, CheckIdentifier.Trainer));
|
||||
}
|
||||
|
||||
public static void VerifyTrainerID_RS<T>(LegalityAnalysis data, T tr) where T : ITrainerID32
|
||||
{
|
||||
if (!MethodH.TryGetSeedTrainerID(tr.TID16, tr.SID16, out _))
|
||||
data.AddLine(GetInvalid(LTrainerIDNoSeed, CheckIdentifier.Trainer));
|
||||
}
|
||||
|
||||
public static bool IsOTIDSuspicious(ushort tid16, ushort sid16) => (tid16, sid16) switch
|
||||
{
|
||||
(12345, 54321) => true,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public sealed class TrainerNameVerifier : Verifier
|
|||
public override void Verify(LegalityAnalysis data)
|
||||
{
|
||||
var pk = data.Entity;
|
||||
var enc = data.EncounterMatch;
|
||||
var enc = data.EncounterOriginal;
|
||||
if (!IsPlayerOriginalTrainer(enc))
|
||||
return; // already verified
|
||||
|
||||
|
|
@ -46,9 +46,9 @@ public override void Verify(LegalityAnalysis data)
|
|||
{
|
||||
VerifyOTGB(data);
|
||||
}
|
||||
else if (trainer.Length > Legal.GetMaxLengthOT(data.Info.Generation, (LanguageID)pk.Language))
|
||||
else if (trainer.Length > Legal.GetMaxLengthOT(enc.Generation, (LanguageID)pk.Language))
|
||||
{
|
||||
if (!IsEdgeCaseLength(pk, data.EncounterOriginal, trainer))
|
||||
if (!IsEdgeCaseLength(pk, enc, trainer))
|
||||
data.AddLine(Get(LOTLong, Severity.Invalid));
|
||||
}
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ public override void Verify(LegalityAnalysis data)
|
|||
{
|
||||
if (WordFilter.IsFiltered(trainer, out var badPattern, pk.Context, enc.Context))
|
||||
data.AddLine(GetInvalid($"Word Filter: {badPattern}"));
|
||||
if (ContainsTooManyNumbers(trainer, data.Info.Generation))
|
||||
if (ContainsTooManyNumbers(trainer, enc.Generation))
|
||||
data.AddLine(GetInvalid("Word Filter: Too many numbers."));
|
||||
|
||||
Span<char> ht = stackalloc char[pk.TrashCharCountTrainer];
|
||||
|
|
@ -175,7 +175,7 @@ private static bool IsOTNameSuspicious(ReadOnlySpan<char> name)
|
|||
return false;
|
||||
}
|
||||
|
||||
public static bool ContainsTooManyNumbers(ReadOnlySpan<char> str, int originalGeneration)
|
||||
public static bool ContainsTooManyNumbers(ReadOnlySpan<char> str, byte originalGeneration)
|
||||
{
|
||||
if (originalGeneration <= 3)
|
||||
return false; // no limit from these generations
|
||||
|
|
|
|||
|
|
@ -5,25 +5,46 @@ namespace PKHeX.Core;
|
|||
/// <summary>
|
||||
/// Object stores a numerical trainer ID.
|
||||
/// </summary>
|
||||
public interface ITrainerID32 : ITrainerID16
|
||||
public interface ITrainerID32 : ITrainerID16, ITrainerID32ReadOnly
|
||||
{
|
||||
/// <summary>
|
||||
/// 32-bit Trainer ID (0-4294967295)
|
||||
/// </summary>
|
||||
uint ID32 { get; set; }
|
||||
new uint ID32 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 16-bit Secret ID (0-65535)
|
||||
/// </summary>
|
||||
ushort SID16 { get; set; }
|
||||
new ushort SID16 { get; set; }
|
||||
}
|
||||
|
||||
public interface ITrainerID16 : ITrainerID
|
||||
public interface ITrainerID16 : ITrainerID, ITrainerID16ReadOnly
|
||||
{
|
||||
/// <summary>
|
||||
/// 16-bit Trainer ID (0-65535)
|
||||
/// </summary>
|
||||
ushort TID16 { get; set; }
|
||||
new ushort TID16 { get; set; }
|
||||
}
|
||||
|
||||
public interface ITrainerID16ReadOnly
|
||||
{
|
||||
/// <summary>
|
||||
/// 16-bit Trainer ID (0-65535)
|
||||
/// </summary>
|
||||
ushort TID16 { get; }
|
||||
}
|
||||
|
||||
public interface ITrainerID32ReadOnly : ITrainerID16ReadOnly
|
||||
{
|
||||
/// <summary>
|
||||
/// 32-bit Trainer ID (0-4294967295)
|
||||
/// </summary>
|
||||
uint ID32 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 16-bit Secret ID (0-65535)
|
||||
/// </summary>
|
||||
ushort SID16 { get; }
|
||||
}
|
||||
|
||||
public static class ITrainerID32Extensions
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user