Set affixed for encounters w/ Gen9 ribbon/mark

Matches S/V 3.0.0 behavior, better to match
This commit is contained in:
Kurt 2023-12-21 19:04:58 -08:00
parent 6d0b4f77e4
commit 5316ad6b37
4 changed files with 15 additions and 3 deletions

View file

@ -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)

View file

@ -112,7 +112,10 @@ public sealed record EncounterTrade9
if (EvolveOnTrade)
pk.Species++;
if (RibbonPartner)
{
pk.RibbonPartner = true;
pk.AffixedRibbon = (sbyte)RibbonIndex.Partner;
}
pk.ResetPartyStats();

View file

@ -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),

View file

@ -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);