mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-15 08:31:21 -05:00
Add affixed ribbon legality check
https://github.com/kwsch/PKHeX/issues/3001#issuecomment-698749761
This commit is contained in:
parent
6ed60fd35d
commit
7b19e3fb7f
|
|
@ -406,6 +406,7 @@ public static class LegalityCheckStrings
|
|||
public static string LRibbonFInvalid_0 { get; set; } = "Invalid Ribbons: {0}";
|
||||
public static string LRibbonFMissing_0 { get; set; } = "Missing Ribbons: {0}";
|
||||
public static string LRibbonMarkingFInvalid_0 { get; set; } = "Invalid Marking: {0}";
|
||||
public static string LRibbonMarkingAffixedF_0 { get; set; } = "Invalid Affixed Ribbon/Marking: {0}";
|
||||
|
||||
public static string LStatDynamaxInvalid { get; set; } = "Dynamax Level is not within the expected range.";
|
||||
public static string LStatIncorrectHeight { get; set; } = "Calculated Height does not match stored value.";
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@ private void VerifyMarksPresent(LegalityAnalysis data, IRibbonIndex m)
|
|||
|
||||
hasOne = true;
|
||||
}
|
||||
|
||||
if (m is PK8 pk8 && pk8.AffixedRibbon != -1)
|
||||
{
|
||||
if (pk8.AffixedRibbon > (int)RibbonIndex.MarkSlump)
|
||||
data.AddLine(GetInvalid(string.Format(LRibbonMarkingAffixedF_0, pk8.AffixedRibbon)));
|
||||
else if (!hasOne)
|
||||
data.AddLine(GetInvalid(string.Format(LRibbonMarkingAffixedF_0, (RibbonIndex)pk8.AffixedRibbon)));
|
||||
}
|
||||
}
|
||||
|
||||
private static bool VerifyMarking(LegalityAnalysis data, RibbonIndex mark)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user