Only check g6 contest ribbon affection in g6/7

Affection is discarded on PK7->PK8 in favor of friendship, which can be lowered.
This commit is contained in:
Kurt
2020-02-15 11:43:21 -08:00
parent b9e3ddf612
commit 9e16df4970

View File

@@ -247,12 +247,16 @@ private static IEnumerable<RibbonResult> GetInvalidRibbons6Any(PKM pkm, IRibbonS
yield return new RibbonResult(nameof(s6.RibbonContestStar), s6.RibbonContestStar);
// Each contest victory requires a contest participation; each participation gives 20 OT affection (not current trainer).
var affect = pkm.OT_Affection;
var contMemory = s6.RibbonNamesContest();
int contCount = 0;
var present = contMemory.Where((_, i) => contest[i] && affect < 20 * ++contCount);
foreach (var rib in present)
yield return new RibbonResult(rib);
// Affection is discarded on PK7->PK8 in favor of friendship, which can be lowered.
if (pkm.Format <= 7)
{
var affect = pkm.OT_Affection;
var contMemory = s6.RibbonNamesContest();
int contCount = 0;
var present = contMemory.Where((_, i) => contest[i] && affect < 20 * ++contCount);
foreach (var rib in present)
yield return new RibbonResult(rib);
}
const int mem_Chatelaine = 30;
bool hasChampMemory = pkm.HT_Memory == mem_Chatelaine || pkm.OT_Memory == mem_Chatelaine;