Esempio n. 1
0
        private void VerifyECPIDWurmple(LegalityAnalysis data)
        {
            var pkm = data.pkm;

            if (pkm.Species == 265)
            {
                // Indicate what it will evolve into
                uint evoVal = WurmpleUtil.GetWurmpleEvoVal(pkm.EncryptionConstant);
                var  spec   = evoVal == 0 ? LegalityAnalysis.SpeciesStrings[267] : LegalityAnalysis.SpeciesStrings[269];
                var  msg    = string.Format(L_XWurmpleEvo_0, spec);
                data.AddLine(GetValid(msg, CheckIdentifier.EC));
            }
            else if (!WurmpleUtil.IsWurmpleEvoValid(pkm))
            {
                data.AddLine(GetInvalid(LPIDEncryptWurmple, CheckIdentifier.EC));
            }
        }
Esempio n. 2
0
        private static bool IsDeferredSlot(IEncounterable slot, PKM pk)
        {
            if (slot.Species == (int)Core.Species.Wurmple)
            {
                return(!WurmpleUtil.IsWurmpleEvoValid(pk));
            }

            return(slot.Species switch
            {
                (int)Core.Species.Yamask when pk.Species != slot.Species && slot.Form == 1 && pk is IFormArgument f => f.FormArgument == 0,
                (int)Core.Species.Milcery when pk.Species != slot.Species && pk is IFormArgument f => f.FormArgument == 0,

                (int)Core.Species.Runerigus when pk is IFormArgument f && f.FormArgument != 0 => true,
                (int)Core.Species.Alcremie when pk is IFormArgument f && f.FormArgument != 0 => true,

                _ => false,
            });
Esempio n. 3
0
        private void VerifyECPIDWurmple(LegalityAnalysis data)
        {
            var pkm = data.pkm;

            if (pkm.Species == (int)Species.Wurmple)
            {
                // Indicate what it will evolve into
                uint evoVal    = WurmpleUtil.GetWurmpleEvoVal(pkm.EncryptionConstant);
                var  evolvesTo = evoVal == 0 ? (int)Species.Beautifly : (int)Species.Dustox;
                var  spec      = ParseSettings.SpeciesStrings[evolvesTo];
                var  msg       = string.Format(L_XWurmpleEvo_0, spec);
                data.AddLine(GetValid(msg, CheckIdentifier.EC));
            }
            else if (!WurmpleUtil.IsWurmpleEvoValid(pkm))
            {
                data.AddLine(GetInvalid(LPIDEncryptWurmple, CheckIdentifier.EC));
            }
        }
Esempio n. 4
0
 private static bool IsDeferredWurmple(this IEncounterable slot, int currentSpecies, PKM pkm) => slot.Species == 265 && currentSpecies != 265 && !WurmpleUtil.IsWurmpleEvoValid(pkm);