mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Remove artist ribbon restriction requiring master ribbon
Closes #2997 ty @sarahlicity for an interesting bypass mechanic :P
This commit is contained in:
parent
87ee1b63c0
commit
fd5e38fdda
2 changed files with 1 additions and 13 deletions
|
@ -84,10 +84,8 @@ namespace PKHeX.Core
|
||||||
|
|
||||||
private static IEnumerable<RibbonResult> GetInvalidRibbons(PKM pkm, IEncounterable enc, int gen)
|
private static IEnumerable<RibbonResult> GetInvalidRibbons(PKM pkm, IEncounterable enc, int gen)
|
||||||
{
|
{
|
||||||
bool artist = false;
|
|
||||||
if (pkm is IRibbonSetOnly3 o3)
|
if (pkm is IRibbonSetOnly3 o3)
|
||||||
{
|
{
|
||||||
artist = o3.ShouldHaveArtistRibbon();
|
|
||||||
if (o3.RibbonWorld) // is a part of Event4, but O3 doesn't have the others
|
if (o3.RibbonWorld) // is a part of Event4, but O3 doesn't have the others
|
||||||
yield return new RibbonResult(nameof(o3.RibbonWorld));
|
yield return new RibbonResult(nameof(o3.RibbonWorld));
|
||||||
}
|
}
|
||||||
|
@ -123,9 +121,6 @@ namespace PKHeX.Core
|
||||||
foreach (var z in iter3)
|
foreach (var z in iter3)
|
||||||
yield return z;
|
yield return z;
|
||||||
|
|
||||||
for (int i = 0; i < 5; ++i)
|
|
||||||
artist |= c3[3 | i << 2]; // any master rank ribbon
|
|
||||||
|
|
||||||
var c4 = u4.RibbonBitsContest4();
|
var c4 = u4.RibbonBitsContest4();
|
||||||
var c4n = u4.RibbonNamesContest4();
|
var c4n = u4.RibbonNamesContest4();
|
||||||
var iter4 = (gen == 3 || gen == 4) && IsAllowedInContest4(pkm.Species) ? GetMissingContestRibbons(c4, c4n) : GetInvalidRibbonsNone(c4, c4n);
|
var iter4 = (gen == 3 || gen == 4) && IsAllowedInContest4(pkm.Species) ? GetMissingContestRibbons(c4, c4n) : GetInvalidRibbonsNone(c4, c4n);
|
||||||
|
@ -143,7 +138,6 @@ namespace PKHeX.Core
|
||||||
}
|
}
|
||||||
if (pkm is IRibbonSetCommon6 s6)
|
if (pkm is IRibbonSetCommon6 s6)
|
||||||
{
|
{
|
||||||
artist = s6.RibbonCountMemoryContest >= 4;
|
|
||||||
bool inhabited6 = 3 <= gen && gen <= 6;
|
bool inhabited6 = 3 <= gen && gen <= 6;
|
||||||
|
|
||||||
var iterate = inhabited6
|
var iterate = inhabited6
|
||||||
|
@ -178,7 +172,7 @@ namespace PKHeX.Core
|
||||||
{
|
{
|
||||||
if (s3.RibbonChampionG3Hoenn && gen != 3)
|
if (s3.RibbonChampionG3Hoenn && gen != 3)
|
||||||
yield return new RibbonResult(nameof(s3.RibbonChampionG3Hoenn)); // RSE HoF
|
yield return new RibbonResult(nameof(s3.RibbonChampionG3Hoenn)); // RSE HoF
|
||||||
if (s3.RibbonArtist && (gen != 3 || !artist))
|
if (s3.RibbonArtist && gen != 3)
|
||||||
yield return new RibbonResult(nameof(s3.RibbonArtist)); // RSE Master Rank Portrait
|
yield return new RibbonResult(nameof(s3.RibbonArtist)); // RSE Master Rank Portrait
|
||||||
if (s3.RibbonEffort && gen == 5 && pkm.Format == 5) // unobtainable in Gen 5
|
if (s3.RibbonEffort && gen == 5 && pkm.Format == 5) // unobtainable in Gen 5
|
||||||
yield return new RibbonResult(nameof(s3.RibbonEffort));
|
yield return new RibbonResult(nameof(s3.RibbonEffort));
|
||||||
|
|
|
@ -28,12 +28,6 @@
|
||||||
nameof(IRibbonSetOnly3.Unused3), nameof(IRibbonSetOnly3.Unused4),
|
nameof(IRibbonSetOnly3.Unused3), nameof(IRibbonSetOnly3.Unused4),
|
||||||
};
|
};
|
||||||
|
|
||||||
internal static bool ShouldHaveArtistRibbon(this IRibbonSetOnly3 set) => set.RibbonCountG3Cool == 4
|
|
||||||
|| set.RibbonCountG3Beauty == 4
|
|
||||||
|| set.RibbonCountG3Cute == 4
|
|
||||||
|| set.RibbonCountG3Smart == 4
|
|
||||||
|| set.RibbonCountG3Tough == 4;
|
|
||||||
|
|
||||||
internal static string[] RibbonNames(this IRibbonSetOnly3 _) => RibbonSetNamesOnly3;
|
internal static string[] RibbonNames(this IRibbonSetOnly3 _) => RibbonSetNamesOnly3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue