mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add new Illegal (clone/glitch abuse) flag + check
This commit is contained in:
parent
0404b94f86
commit
75bd26d056
3 changed files with 10 additions and 0 deletions
|
@ -462,6 +462,7 @@ namespace PKHeX.Core
|
|||
public static string LTransferEgg { get; set; } = "Can't transfer Eggs between Generations.";
|
||||
public static string LTransferEggLocationTransporter { get; set; } = "Invalid Met Location, expected Poké Transfer.";
|
||||
public static string LTransferEggMetLevel { get; set; } = "Invalid Met Level for transfer.";
|
||||
public static string LTransferFlagIllegal { get; set; } = "Flagged as illegal by the game (glitch abuse).";
|
||||
public static string LTransferHTFlagRequired { get; set; } = "Current handler cannot be past gen OT for transferred specimen.";
|
||||
public static string LTransferMet { get; set; } = "Invalid Met Location, expected Poké Transfer or Crown.";
|
||||
public static string LTransferMetLocation { get; set; } = "Invalid Transfer Met Location.";
|
||||
|
|
|
@ -601,6 +601,9 @@ namespace PKHeX.Core
|
|||
if (social != 0)
|
||||
data.AddLine(GetInvalid(LMemorySocialZero, Encounter));
|
||||
|
||||
if (pb8.IsDprIllegal)
|
||||
data.AddLine(GetInvalid(LTransferFlagIllegal));
|
||||
|
||||
VerifyStatNature(data, pb8);
|
||||
|
||||
var bv = pb8.BattleVersion;
|
||||
|
|
|
@ -37,6 +37,12 @@ public sealed class PB8 : G8PKM
|
|||
public PB8(byte[] data) : base(data) { }
|
||||
public override PKM Clone() => new PB8((byte[])Data.Clone());
|
||||
|
||||
public bool IsDprIllegal
|
||||
{
|
||||
get => Data[0x52] != 0;
|
||||
set => Data[0x52] = (byte)((Data[0x52] & 0xFE) | (value ? 1 : 0));
|
||||
}
|
||||
|
||||
public void Trade(ITrainerInfo tr, int Day = 1, int Month = 1, int Year = 2015)
|
||||
{
|
||||
if (IsEgg)
|
||||
|
|
Loading…
Reference in a new issue