Add deferral case for gen6 magmar classic ribbon

use "when" for easy src code

Thanks Nessus!
This commit is contained in:
Kurt 2017-10-18 18:28:17 -07:00
parent cd6dfceb9e
commit 5a09cd9122

View File

@ -1078,9 +1078,14 @@ private static IEnumerable<MysteryGift> GetMatchingWC6(PKM pkm, IEnumerable<Myst
if (!GetIsMatchWC6(pkm, wc, vs))
continue;
if (wc.CardID == 0525 && wc.IV_HP == 0xFE) // 3IV collision, yield the non 3IV first
deferred.Add(wc);
else if (wc.Species == pkm.Species) // best match
switch (wc.CardID)
{
case 0525 when wc.IV_HP == 0xFE: // Diancie was distributed with no IV enforcement & 3IVs
case 0504 when wc.RibbonClassic != ((IRibbonSetEvent4)pkm).RibbonClassic: // magmar with/without classic
deferred.Add(wc);
continue;
}
if (wc.Species == pkm.Species) // best match
yield return wc;
else
deferred.Add(wc);