mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Add frlg flag toggles from thread
This commit is contained in:
parent
10d73d1bf3
commit
ca0a533779
3 changed files with 18 additions and 5 deletions
|
@ -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
|
|
@ -262,7 +262,7 @@ namespace PKHeX.Core
|
||||||
public override int NickLength => 10;
|
public override int NickLength => 10;
|
||||||
public override int MaxMoney => 999999;
|
public override int MaxMoney => 999999;
|
||||||
protected override int EventFlagMax => 8 * (E ? 300 : 288); // 0x960 E, else 0x900
|
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;
|
public override bool HasParty => true;
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ namespace PKHeX.Core
|
||||||
|
|
||||||
public override bool GetEventFlag(int flagNumber)
|
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}).");
|
throw new ArgumentException($"Event Flag to get ({flagNumber}) is greater than max ({EventFlagMax}).");
|
||||||
|
|
||||||
var start = EventFlag;
|
var start = EventFlag;
|
||||||
|
@ -397,7 +397,7 @@ namespace PKHeX.Core
|
||||||
|
|
||||||
public override void SetEventFlag(int flagNumber, bool value)
|
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}).");
|
throw new ArgumentException($"Event Flag to set ({flagNumber}) is greater than max ({EventFlagMax}).");
|
||||||
|
|
||||||
var start = EventFlag;
|
var start = EventFlag;
|
||||||
|
|
|
@ -311,7 +311,7 @@ namespace PKHeX.Core
|
||||||
/// <returns>Flag is Set (true) or not Set (false)</returns>
|
/// <returns>Flag is Set (true) or not Set (false)</returns>
|
||||||
public virtual bool GetEventFlag(int flagNumber)
|
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}).");
|
throw new ArgumentException($"Event Flag to get ({flagNumber}) is greater than max ({EventFlagMax}).");
|
||||||
return GetFlag(EventFlag + (flagNumber >> 3), flagNumber & 7);
|
return GetFlag(EventFlag + (flagNumber >> 3), flagNumber & 7);
|
||||||
}
|
}
|
||||||
|
@ -324,7 +324,7 @@ namespace PKHeX.Core
|
||||||
/// <remarks>Flag is Set (true) or not Set (false)</remarks>
|
/// <remarks>Flag is Set (true) or not Set (false)</remarks>
|
||||||
public virtual void SetEventFlag(int flagNumber, bool value)
|
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}).");
|
throw new ArgumentException($"Event Flag to set ({flagNumber}) is greater than max ({EventFlagMax}).");
|
||||||
SetFlag(EventFlag + (flagNumber >> 3), flagNumber & 7, value);
|
SetFlag(EventFlag + (flagNumber >> 3), flagNumber & 7, value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue