Include Ability in fixed pkl, beldum raid moves

Encode beldum's raid moves manually since it's the only one with empty moves (default -> learnset fetch). See pkNX for associated workarounds in pickle build.
This commit is contained in:
Kurt 2023-12-27 00:29:16 -08:00
parent 572b5e98e0
commit 61df1981ce
4 changed files with 3 additions and 6 deletions

View file

@ -20,7 +20,7 @@ public sealed record EncounterFixed9
public Ball FixedBall => Ball.None;
public bool IsShiny => false;
public int EggLocation => 0;
public AbilityPermission Ability => Any12;
public AbilityPermission Ability { get; init; }
public required ushort Species { get; init; }
public required byte Form { get; init; }
@ -54,7 +54,7 @@ public sealed record EncounterFixed9
FlawlessIVCount = data[0x04],
TeraType = (GemType)data[0x05],
Gender = data[0x06],
// 1 byte reserved
Ability = (AbilityPermission)data[0x07],
Moves = new Moveset(
ReadUInt16LittleEndian(data[0x08..]),
ReadUInt16LittleEndian(data[0x0A..]),

View file

@ -201,10 +201,7 @@ public sealed record EncounterTera9
};
SetPINGA(pk, criteria, pi);
if (Moves.HasMoves)
pk.SetMoves(Moves);
else // Beldum
EncounterUtil1.SetEncounterMoves(pk, Version, LevelMin);
pk.SetMoves(Moves);
pk.ResetPartyStats();
return pk;