2017-12-02 01:27:09 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX.Core
|
2017-05-14 21:42:18 +00:00
|
|
|
|
{
|
2017-12-02 01:27:09 +00:00
|
|
|
|
[Flags]
|
2017-05-14 21:42:18 +00:00
|
|
|
|
public enum LeadRequired
|
|
|
|
|
{
|
2017-12-02 01:27:09 +00:00
|
|
|
|
None = 0,
|
|
|
|
|
CuteCharm = 1 << 0,
|
|
|
|
|
Synchronize = 1 << 1,
|
2017-05-15 06:21:34 +00:00
|
|
|
|
|
|
|
|
|
// Slot Modifiers
|
2017-12-02 01:27:09 +00:00
|
|
|
|
StaticMagnet = 1 << 2,
|
2017-05-15 06:21:34 +00:00
|
|
|
|
|
|
|
|
|
// Level Modifiers
|
2017-12-02 01:27:09 +00:00
|
|
|
|
IntimidateKeenEye = 1 << 3,
|
|
|
|
|
PressureHustleSpirit = 1 << 4,
|
|
|
|
|
SuctionCups = 1 << 5,
|
|
|
|
|
|
2017-12-02 05:23:37 +00:00
|
|
|
|
// Compatibility Flags
|
|
|
|
|
UsesLevelCall = 1 << 6,
|
2017-12-02 01:27:09 +00:00
|
|
|
|
Fail = 1 << 7,
|
|
|
|
|
|
|
|
|
|
CuteCharmFail = CuteCharm | Fail,
|
|
|
|
|
SynchronizeFail = Synchronize | Fail,
|
|
|
|
|
StaticMagnetFail = StaticMagnet | Fail,
|
|
|
|
|
PressureHustleSpiritFail = PressureHustleSpirit | Fail,
|
|
|
|
|
|
2017-12-02 05:23:37 +00:00
|
|
|
|
AllFlags = UsesLevelCall | Fail,
|
2017-12-02 01:27:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static partial class Extensions
|
|
|
|
|
{
|
|
|
|
|
internal static bool IsLevelOrSlotModified(this LeadRequired Lead) => Lead.RemoveFlags() > LeadRequired.Synchronize;
|
2019-10-26 19:33:58 +00:00
|
|
|
|
internal static LeadRequired RemoveFlags(this LeadRequired Lead) => Lead & ~LeadRequired.AllFlags;
|
2017-05-14 21:42:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|