Example #1
0
        /// <summary>
        /// Sets the <see cref="PKM.IVs"/> to match a provided <see cref="hiddenPowerType"/>.
        /// </summary>
        /// <param name="pk">Pokémon to modify.</param>
        /// <param name="hiddenPowerType">Desired Hidden Power typing.</param>
        public static void SetHiddenPower(this PKM pk, int hiddenPowerType)
        {
            Span <int> IVs = stackalloc int[6];

            pk.GetIVs(IVs);
            HiddenPower.SetIVsForType(hiddenPowerType, IVs, pk.Format);
            pk.SetIVs(IVs);
        }
Example #2
0
        /// <summary>
        /// Sets the <see cref="PKM.Markings"/> to indicate flawless (or near-flawless) <see cref="PKM.IVs"/>.
        /// </summary>
        /// <param name="pk">Pokémon to modify.</param>
        public static void SetMarkings(this PKM pk)
        {
            if (pk.Format <= 3)
            {
                return; // no markings (gen3 only has 4; can't mark stats intelligently
            }
            Span <int> IVs = stackalloc int[6];

            pk.GetIVs(IVs);
            pk.SetMarkings(IVs);
        }