mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-12 06:37:20 -05:00
Cuts out about half the size; there's still a bunch of apply-value logic but it's not really big enough for a separate class. Rename BallRandomizer->BallApplicator
24 lines
916 B
C#
24 lines
916 B
C#
namespace PKHeX.Core
|
|
{
|
|
public static class HiddenPowerApplicator
|
|
{
|
|
/// <summary>
|
|
/// Sets the <see cref="PKM.IVs"/> to match a provided <see cref="hptype"/>.
|
|
/// </summary>
|
|
/// <param name="pk">Pokémon to modify.</param>
|
|
/// <param name="hptype">Desired Hidden Power typing.</param>
|
|
public static void SetHiddenPower(this PKM pk, int hptype)
|
|
{
|
|
var IVs = pk.IVs;
|
|
HiddenPower.SetIVsForType(hptype, pk.IVs, pk.Format);
|
|
pk.IVs = IVs;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets the <see cref="PKM.IVs"/> to match a provided <see cref="hptype"/>.
|
|
/// </summary>
|
|
/// <param name="pk">Pokémon to modify.</param>
|
|
/// <param name="hptype">Desired Hidden Power typing.</param>
|
|
public static void SetHiddenPower(this PKM pk, MoveType hptype) => pk.SetHiddenPower((int)hptype);
|
|
}
|
|
} |