Remove MAX giveRegular for ORAS

level 3 is the legitimate max
This commit is contained in:
Kurt 2018-06-10 12:27:53 -07:00
parent 75f4318335
commit 19cb2cda2e
2 changed files with 8 additions and 8 deletions

View File

@ -69,9 +69,9 @@ public bool MasterFlag
}
public void UnlockAll() => ToggleFlags(allEvents: true);
public void UnlockRegular(bool ORAS) => ToggleFlags(ORAS: ORAS);
public void UnlockRegular(bool ORAS) => ToggleFlags();
public void ClearAll() => ToggleFlags(clearOnly: true);
private void ToggleFlags(bool allEvents = false, bool clearOnly = false, bool ORAS = false)
private void ToggleFlags(bool allEvents = false, bool clearOnly = false)
{
foreach (var m in Mapping)
{
@ -83,12 +83,13 @@ private void ToggleFlags(bool allEvents = false, bool clearOnly = false, bool OR
if (clearOnly)
continue;
int lvl = ORAS || allEvents ? m.BaseCount : (m.BaseCount != 1 ? 3 : 0); // Full_Recovery is ORAS/event only @ 1 level
int lvl = allEvents ? m.BaseCount : (m.BaseCount != 1 ? 3 : 0); // Full_Recovery is ORAS/event only @ 1 level
m.SetOPowerLevel(Data, Offset, lvl);
if (allEvents)
m.SetOPowerS(Data, Offset, true);
if (ORAS || allEvents)
m.SetOPowerMAX(Data, Offset, true);
if (!allEvents)
continue;
m.SetOPowerS(Data, Offset, true);
m.SetOPowerMAX(Data, Offset, true);
}
}

View File

@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Windows.Forms;
using PKHeX.Core;