Add frlg flag toggles from thread

This commit is contained in:
Kurt 2018-09-27 20:01:34 -07:00
parent 10d73d1bf3
commit ca0a533779
3 changed files with 18 additions and 5 deletions

View file

@ -0,0 +1,13 @@
0082 Moltres Captured
0093 Zapdos Captured
0129 Mewtwo Captured
0130 Articuno Captured
0703 Zapdos Defeated
0x820 BADGE01_GET
0x821 BADGE02_GET
0x822 BADGE03_GET
0x823 BADGE04_GET
0x824 BADGE05_GET
0x825 BADGE06_GET
0x826 BADGE07_GET
0x827 BADGE08_GET

View file

@ -262,7 +262,7 @@ namespace PKHeX.Core
public override int NickLength => 10;
public override int MaxMoney => 999999;
protected override int EventFlagMax => 8 * (E ? 300 : 288); // 0x960 E, else 0x900
protected override int EventConstMax => EventConst > 0 ? 0x100 : int.MinValue;
protected override int EventConstMax => 0x100;
public override bool HasParty => true;
@ -383,7 +383,7 @@ namespace PKHeX.Core
public override bool GetEventFlag(int flagNumber)
{
if (flagNumber > EventFlagMax)
if (flagNumber >= EventFlagMax)
throw new ArgumentException($"Event Flag to get ({flagNumber}) is greater than max ({EventFlagMax}).");
var start = EventFlag;
@ -397,7 +397,7 @@ namespace PKHeX.Core
public override void SetEventFlag(int flagNumber, bool value)
{
if (flagNumber > EventFlagMax)
if (flagNumber >= EventFlagMax)
throw new ArgumentException($"Event Flag to set ({flagNumber}) is greater than max ({EventFlagMax}).");
var start = EventFlag;

View file

@ -311,7 +311,7 @@ namespace PKHeX.Core
/// <returns>Flag is Set (true) or not Set (false)</returns>
public virtual bool GetEventFlag(int flagNumber)
{
if (flagNumber > EventFlagMax)
if (flagNumber >= EventFlagMax)
throw new ArgumentException($"Event Flag to get ({flagNumber}) is greater than max ({EventFlagMax}).");
return GetFlag(EventFlag + (flagNumber >> 3), flagNumber & 7);
}
@ -324,7 +324,7 @@ namespace PKHeX.Core
/// <remarks>Flag is Set (true) or not Set (false)</remarks>
public virtual void SetEventFlag(int flagNumber, bool value)
{
if (flagNumber > EventFlagMax)
if (flagNumber >= EventFlagMax)
throw new ArgumentException($"Event Flag to set ({flagNumber}) is greater than max ({EventFlagMax}).");
SetFlag(EventFlag + (flagNumber >> 3), flagNumber & 7, value);
}