mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Check scale copy in non-SV formats
Rather than ignoring it
This commit is contained in:
parent
4f560c3ba6
commit
a49508b354
5 changed files with 33 additions and 14 deletions
|
@ -87,8 +87,19 @@ public sealed record EncounterFixed9 : EncounterStatic, IGemType
|
|||
{
|
||||
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 @@ public sealed record EncounterStatic9(GameVersion Version) : EncounterStatic(Ver
|
|||
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 class Encounter9RNG
|
|||
// 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 sealed class WC9 : DataMysteryGift, ILangNick, INature, ITeraType, IRibbo
|
|||
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 @@ public partial class TechRecordEditor : Form
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue