mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-25 17:04:10 -05:00
Minor clean
invert nesting, add missing if( space, group OT checks together
This commit is contained in:
@@ -30,26 +30,25 @@ public static ModifyResult SetSuggestedRelearnData(BatchInfo info, string propVa
|
||||
public static ModifyResult SetSuggestedMasteryData(BatchInfo info, string propValue)
|
||||
{
|
||||
var pk = info.Entity;
|
||||
if (pk is IMoveShop8Mastery t)
|
||||
if (pk is not IMoveShop8Mastery t)
|
||||
return ModifyResult.Invalid;
|
||||
|
||||
if (IsAll(propValue))
|
||||
{
|
||||
if (IsAll(propValue))
|
||||
{
|
||||
t.SetMoveShopFlags();
|
||||
t.SetMoveShopFlagsMastered();
|
||||
}
|
||||
else if (!IsNone(propValue))
|
||||
{
|
||||
// whatever fit the current moves
|
||||
t.SetMoveShopFlags(pk.Moves);
|
||||
t.SetMoveShopFlagsMastered();
|
||||
}
|
||||
else
|
||||
{
|
||||
t.ClearMoveShopFlags();
|
||||
}
|
||||
return ModifyResult.Modified;
|
||||
t.SetMoveShopFlags();
|
||||
t.SetMoveShopFlagsMastered();
|
||||
}
|
||||
return ModifyResult.Invalid;
|
||||
else if (!IsNone(propValue))
|
||||
{
|
||||
// whatever fit the current moves
|
||||
t.SetMoveShopFlags(pk.Moves);
|
||||
t.SetMoveShopFlagsMastered();
|
||||
}
|
||||
else
|
||||
{
|
||||
t.ClearMoveShopFlags();
|
||||
}
|
||||
return ModifyResult.Modified;
|
||||
}
|
||||
|
||||
public static ModifyResult SetSuggestedRibbons(BatchInfo info, string value)
|
||||
|
||||
@@ -122,7 +122,7 @@ public override EncounterMatchRating GetMatchRating(PKM pkm)
|
||||
return EncounterMatchRating.DeferredErrors;
|
||||
|
||||
// Galar Mine hidden encounters can only be found via Curry or Fishing.
|
||||
if(Location is (30 or 54) && SlotType is AreaSlotType8.HiddenMain && !m.RibbonMarkCurry && !SlotType.CanEncounterViaFishing(Weather))
|
||||
if (Location is (30 or 54) && SlotType is AreaSlotType8.HiddenMain && !m.RibbonMarkCurry && !SlotType.CanEncounterViaFishing(Weather))
|
||||
return EncounterMatchRating.DeferredErrors;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,10 +46,11 @@ public override void Verify(LegalityAnalysis data)
|
||||
{
|
||||
if (WordFilter.IsFiltered(ot, out string bad))
|
||||
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
|
||||
if (WordFilter.IsFiltered(pkm.HT_Name, out bad))
|
||||
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
|
||||
if (ContainsTooManyNumbers(ot, data.Info.Generation))
|
||||
data.AddLine(GetInvalid("Wordfilter: Too many numbers."));
|
||||
|
||||
if (WordFilter.IsFiltered(pkm.HT_Name, out bad))
|
||||
data.AddLine(GetInvalid($"Wordfilter: {bad}"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ private void ProcessSAV(IList<SlotCache> data, IReadOnlyList<StringInstruction>
|
||||
|
||||
if (entry.Source is SlotInfoBox info && SAV.GetSlotFlags(info.Box, info.Slot).IsOverwriteProtected())
|
||||
editor.AddSkipped();
|
||||
else if(!BatchEditing.IsFilterMatchMeta(filterMeta, entry))
|
||||
else if (!BatchEditing.IsFilterMatchMeta(filterMeta, entry))
|
||||
editor.AddSkipped();
|
||||
else
|
||||
editor.Process(pk, Filters, Instructions);
|
||||
|
||||
Reference in New Issue
Block a user