Allow Gourmand mark on Eggs

Flag it if it's affixed though.
This commit is contained in:
Kurt
2024-01-15 22:50:37 -08:00
parent 5a5ce7c273
commit 3ea44b5eb0
2 changed files with 9 additions and 2 deletions

View File

@@ -22,6 +22,12 @@ public override void Verify(LegalityAnalysis data)
VerifyMarksPresent(data, m);
VerifyAffixedRibbonMark(data, m);
if (pk.IsEgg && pk is IRibbonSetAffixed a && a.AffixedRibbon != -1)
{
// Disallow affixed values on eggs.
var affix = (RibbonIndex)a.AffixedRibbon;
data.AddLine(GetInvalid(string.Format(LRibbonMarkingAffixedF_0, GetRibbonNameSafe(affix))));
}
// Some encounters come with a fixed Mark, and we've not yet checked if it's missing.
if (data.EncounterMatch is IEncounterMarkExtra extra && extra.IsMissingExtraMark(pk, out var missing))

View File

@@ -31,8 +31,9 @@ public static void ParseEgg(this IRibbonSetMark9 r, ref RibbonResultList list)
{
if (r.RibbonMarkAlpha)
list.Add(MarkAlpha);
if (r.RibbonMarkGourmand)
list.Add(MarkGourmand);
// Can apply to eggs if in party. Just can't affix.
// if (r.RibbonMarkGourmand)
// list.Add(MarkGourmand);
if (r.RibbonMarkItemfinder)
list.Add(MarkItemfinder);
if (r.RibbonMarkJumbo)