mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-22 20:13:06 +00:00
Set affixed for encounters w/ Gen9 ribbon/mark
Matches S/V 3.0.0 behavior, better to match
This commit is contained in:
parent
6d0b4f77e4
commit
5316ad6b37
4 changed files with 15 additions and 3 deletions
|
@ -104,9 +104,15 @@ public sealed record EncounterStatic9(GameVersion Version)
|
|||
if (StarterBoxLegend)
|
||||
pk.FormArgument = 1; // Not Ride Form.
|
||||
if (IsTitan)
|
||||
{
|
||||
pk.RibbonMarkTitan = true;
|
||||
pk.AffixedRibbon = (sbyte)RibbonIndex.MarkTitan;
|
||||
}
|
||||
else if (RibbonMarkCrafty)
|
||||
{
|
||||
pk.RibbonMarkCrafty = true;
|
||||
pk.AffixedRibbon = (sbyte)RibbonIndex.MarkCrafty;
|
||||
}
|
||||
|
||||
SetPINGA(pk, criteria, pi);
|
||||
if (Moves.HasMoves)
|
||||
|
|
|
@ -112,7 +112,10 @@ public sealed record EncounterTrade9
|
|||
if (EvolveOnTrade)
|
||||
pk.Species++;
|
||||
if (RibbonPartner)
|
||||
{
|
||||
pk.RibbonPartner = true;
|
||||
pk.AffixedRibbon = (sbyte)RibbonIndex.Partner;
|
||||
}
|
||||
|
||||
pk.ResetPartyStats();
|
||||
|
||||
|
|
|
@ -64,7 +64,8 @@ public sealed class FormArgumentVerifier : Verifier
|
|||
Overqwil => arg switch
|
||||
{
|
||||
> 9_999 => GetInvalid(LFormArgumentHigh),
|
||||
< 20 when !data.Info.EvoChainsAllGens.HasVisitedGen9 || pk.CurrentLevel < 28 => GetInvalid(LFormArgumentLow),
|
||||
0 when enc.Species == (ushort)Overqwil => GetValid(LFormArgumentValid),
|
||||
< 20 when !data.Info.EvoChainsAllGens.HasVisitedGen9 || pk.CurrentLevel < (pk is IHomeTrack { HasTracker: true } ? 15 : 28) => GetInvalid(LFormArgumentLow),
|
||||
>= 20 when !data.Info.EvoChainsAllGens.HasVisitedPLA || pk.CurrentLevel < 25 => GetInvalid(LFormArgumentLow),
|
||||
_ when pk is IHomeTrack { HasTracker: false } and PA8 { CurrentLevel: < 25 } => GetInvalid(LEvoInvalid),
|
||||
_ => GetValid(LFormArgumentValid),
|
||||
|
|
|
@ -529,8 +529,10 @@ public sealed class WC9(byte[] Data) : DataMysteryGift(Data), ILangNick, INature
|
|||
for (var i = 0; i < RibbonBytesCount; i++)
|
||||
{
|
||||
var ribbon = GetRibbonAtIndex(i);
|
||||
if (ribbon != RibbonByteNone)
|
||||
pk.SetRibbon(ribbon);
|
||||
if (ribbon == RibbonByteNone)
|
||||
continue;
|
||||
pk.SetRibbon(ribbon);
|
||||
pk.AffixedRibbon = (sbyte)ribbon;
|
||||
}
|
||||
|
||||
SetPINGA(pk, criteria);
|
||||
|
|
Loading…
Reference in a new issue