mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-24 19:33:10 +00:00
ef3cb34387
* Make EvolutionCriteria struct 8 bytes per object instead of 26 Unify LevelMin/LevelMax to match EncounterTemplate bubble up precise array type for better iteration * Inline queue operations, less allocation * Inline some logic * Update EvolutionChain.cs * Improve clarity on duplicate move check * Search reverse For a dual stage chain, finds it first iteration rather than second.
16 lines
528 B
C#
16 lines
528 B
C#
namespace PKHeX.Core;
|
|
|
|
public readonly record struct EvoCriteria : IDexLevel
|
|
{
|
|
public ushort Species { get; init; }
|
|
public byte Form { get; init; }
|
|
public byte LevelUpRequired { get; init; }
|
|
public byte LevelMax { get; init; }
|
|
public byte LevelMin { get; init; }
|
|
|
|
public EvolutionType Method { get; init; }
|
|
|
|
public bool RequiresLvlUp => LevelUpRequired != 0;
|
|
|
|
public override string ToString() => $"{(Species) Species}{(Form != 0 ? $"-{Form}" : "")}}} [{LevelMin},{LevelMax}] via {Method}";
|
|
}
|