mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-14 19:35:25 -05:00
Check scale copy in non-SV formats
Rather than ignoring it
This commit is contained in:
@@ -87,8 +87,19 @@ public override bool IsMatchExact(PKM pk, EvoCriteria evo)
|
||||
{
|
||||
if (TeraType != GemType.Random && pk is ITeraType t && !Tera9RNG.IsMatchTeraType(TeraType, Species, Form, (byte)t.TeraTypeOriginal))
|
||||
return false;
|
||||
if (TeraType != 0 && pk is IScaledSize3 { Scale: < MinScaleStrongTera })
|
||||
return false;
|
||||
if (TeraType != 0)
|
||||
{
|
||||
if (pk is IScaledSize3 size3)
|
||||
{
|
||||
if (size3.Scale < MinScaleStrongTera)
|
||||
return false;
|
||||
}
|
||||
else if (pk is IScaledSize s2)
|
||||
{
|
||||
if (s2.HeightScalar < MinScaleStrongTera)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (FlawlessIVCount != 0 && pk.FlawlessIVCount < FlawlessIVCount)
|
||||
return false;
|
||||
|
||||
@@ -51,11 +51,9 @@ protected override bool IsMatchPartial(PKM pk)
|
||||
if (v.WeightScalar != Size)
|
||||
return true;
|
||||
}
|
||||
if (pk is IScaledSize3 s3)
|
||||
{
|
||||
if (s3.Scale != Size)
|
||||
return true;
|
||||
}
|
||||
var current = pk is IScaledSize3 size3 ? size3.Scale : v.HeightScalar;
|
||||
if (current != Size)
|
||||
return false;
|
||||
}
|
||||
return base.IsMatchPartial(pk);
|
||||
}
|
||||
|
||||
@@ -220,8 +220,16 @@ public static bool IsMatch(PKM pk, in GenerateParam9 enc, in ulong seed)
|
||||
// Scale
|
||||
{
|
||||
var value = enc.ScaleType.GetSizeValue(enc.Scale, ref rand);
|
||||
if (pk is IScaledSize3 s && s.Scale != value)
|
||||
return false;
|
||||
if (pk is IScaledSize3 s)
|
||||
{
|
||||
if (s.Scale != value)
|
||||
return false;
|
||||
}
|
||||
else if (pk is IScaledSize s2)
|
||||
{
|
||||
if (s2.HeightScalar != value)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -728,12 +728,14 @@ public override bool IsMatchExact(PKM pk, EvoCriteria evo)
|
||||
return false;
|
||||
if (s.WeightScalar != WeightValue)
|
||||
return false;
|
||||
if (pk is IScaledSize3 scale)
|
||||
|
||||
if (!IsBeforePatch120(CardID) || (pk.MetDate is { } valid && !IsBeforePatch120(valid)))
|
||||
{
|
||||
if (!IsBeforePatch120(CardID) || (pk.MetDate is { } valid && !IsBeforePatch120(valid)))
|
||||
// S/V 1.2.0 added scale specification.
|
||||
if (Scale != 256)
|
||||
{
|
||||
// S/V 1.2.0 added scale specification.
|
||||
if (Scale != 256 && Scale != scale.Scale)
|
||||
var current = pk is IScaledSize3 s3 ? s3.Scale : s.HeightScalar;
|
||||
if (Scale != current)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ private void PopulateRecords(EntityContext context, ReadOnlySpan<ushort> current
|
||||
cell.Style.SelectionBackColor = Color.Red;
|
||||
|
||||
if (currentMoves.Contains(move))
|
||||
row.Cells[ColumnName].Style.SelectionBackColor = Color.LightBlue;
|
||||
row.Cells[ColumnName].Style.BackColor = Color.LightBlue;
|
||||
|
||||
row.Cells[ColumnIndex].Value = i.ToString("000");
|
||||
row.Cells[ColumnTypeIcon].Value = TypeSpriteUtil.GetTypeSpriteIcon(type);
|
||||
|
||||
Reference in New Issue
Block a user