예제 #1
0
        private static bool IsUnobtainable(this EncounterSlot slot, PKM pk)
        {
            switch (slot.Generation)
            {
            case 2:
                if ((slot.Type & SlotType.Safari) != 0)     // Safari Zone is unavailable in Gen 2.
                {
                    return(true);
                }

                if ((slot.Type & SlotType.Headbutt) != 0)
                {
                    if (Legal.GetGSCHeadbuttAvailability(slot, pk.TID) != TreeEncounterAvailable.ValidTree) // Unreachable Headbutt Trees.
                    {
                        return(true);
                    }
                }
                break;

            case 4:
                if (slot.Location == 193 && slot.Type == SlotType.Surf)     // Johto Route 45 surfing encounter. Unreachable Water tiles.
                {
                    return(true);
                }
                break;
            }

            return(false);
        }
예제 #2
0
        private static CheckResult VerifyWildEncounterCrystalHeadbutt(ITrainerID tr, EncounterSlot encounter)
        {
            var tree = Legal.GetGSCHeadbuttAvailability(encounter, tr.TID);

            switch (tree)
            {
            case TreeEncounterAvailable.ValidTree:
                return(new CheckResult(Severity.Valid, V604, CheckIdentifier.Encounter));

            case TreeEncounterAvailable.InvalidTree:
                return(new CheckResult(Severity.Invalid, V605, CheckIdentifier.Encounter));

            default:     // Impossible
                return(new CheckResult(Severity.Invalid, V606, CheckIdentifier.Encounter));
            }
        }