mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-17 01:28:00 +00:00
e79f46673c
SetPINGA{S}(pk, criteria) -> pid,iv, nature, gender, ability (stats future?) memes aside, this is where criteria data is forced Split N encounterstatic (has fixed PID and special flag) from EncounterStaticPID
25 lines
No EOL
727 B
C#
25 lines
No EOL
727 B
C#
namespace PKHeX.Core
|
|
{
|
|
/// <summary>
|
|
/// Trade Encounter data with a fixed PID.
|
|
/// </summary>
|
|
public sealed class EncounterTradePID : EncounterTrade
|
|
{
|
|
public uint PID;
|
|
public override Shiny Shiny { get; set; } = Shiny.FixedValue;
|
|
|
|
protected override void SetPINGA(PKM pk, EncounterCriteria criteria)
|
|
{
|
|
int gender = criteria.GetGender(PKX.GetGenderFromPID(Species, PID), pk.PersonalInfo);
|
|
int nature = (int)criteria.GetNature(Nature);
|
|
int ability = Ability >> 1;
|
|
|
|
pk.PID = PID;
|
|
pk.Nature = nature;
|
|
pk.Gender = gender;
|
|
pk.RefreshAbility(ability);
|
|
|
|
SetIVs(pk);
|
|
}
|
|
}
|
|
} |