private static bool IsUnobtainable(this EncounterSlot slot, ITrainerID 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)     // Unreachable Headbutt Trees.
                {
                    return(Encounters2.GetGSCHeadbuttAvailability(slot, pk.TID) != TreeEncounterAvailable.ValidTree);
                }
                break;

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

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

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

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

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