mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-09 18:56:20 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user