using System;
namespace PKHeX.Core
{
public static class HiddenPowerApplicator
{
///
/// Sets the to match a provided .
///
/// Pokémon to modify.
/// Desired Hidden Power typing.
public static void SetHiddenPower(this PKM pk, int hiddenPowerType)
{
Span IVs = stackalloc int[6];
pk.GetIVs(IVs);
HiddenPower.SetIVsForType(hiddenPowerType, IVs, pk.Format);
pk.SetIVs(IVs);
}
///
/// Sets the to match a provided .
///
/// Pokémon to modify.
/// Desired Hidden Power typing.
public static void SetHiddenPower(this PKM pk, MoveType hiddenPowerType) => pk.SetHiddenPower((int)hiddenPowerType);
}
}