Exemple #1
0
 public static bool CanAccessDeathMountainPortal(this Progression items)
 {
     return((items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph);
 }
Exemple #2
0
 public virtual bool CanEnter(Progression items)
 {
     return(true);
 }
Exemple #3
0
 public static bool CanExtendMagic(this Progression items, int bars = 2)
 {
     return((items.HalfMagic ? 2 : 1) * (items.Bottle ? 2 : 1) >= bars);
 }
Exemple #4
0
 public static bool CanKillManyEnemies(this Progression items)
 {
     return(items.Sword || items.Hammer || items.Bow || items.Firerod ||
            items.Somaria || items.Byrna && items.CanExtendMagic());
 }
Exemple #5
0
 public static bool CanLightTorches(this Progression items)
 {
     return(items.Firerod || items.Lamp);
 }
Exemple #6
0
 public static bool CanMeltFreezors(this Progression items)
 {
     return(items.Firerod || items.Bombos && items.Sword);
 }
Exemple #7
0
 public static bool CanLiftLight(this Progression items) => items.Glove;
Exemple #8
0
 public bool CanAcquireAll(Progression items, RewardType rewardsMask)
 {
     return(rewardLookup[(int)rewardsMask].All(x => x.CanComplete(items)));
 }
Exemple #9
0
 public bool Available(Progression items)
 {
     return(Region.CanEnter(items) && canAccess(items));
 }
Exemple #10
0
 public virtual bool CanFill(Item item, Progression items)
 {
     return(Config.Keysanity || !item.IsDungeonItem || IsRegionItem(item));
 }
Exemple #11
0
        public static IEnumerable <Location> Available(this IEnumerable <Location> locations, IEnumerable <Item> items)
        {
            var progression = new Progression(items);

            return(locations.Where(l => l.Available(progression)));
        }
Exemple #12
0
 // For logic unit tests
 internal bool CanAccess(Progression items) => canAccess(items);
Exemple #13
0
 public bool CanAcquireAtLeast(int amount, Progression items, RewardType rewardsMask)
 {
     return(rewardLookup[(int)rewardsMask].Where(x => x.CanComplete(items)).Count() >= amount);
 }
Exemple #14
0
 public bool CanAquire(Progression items, RewardType reward)
 {
     return(Regions.OfType <IReward>().First(x => reward == x.Reward).CanComplete(items));
 }
Exemple #15
0
 public static bool CanLiftHeavy(this Progression items) => items.Mitt;
Exemple #16
0
 public bool CanAquireAll(Progression items, params RewardType[] rewards)
 {
     return(Regions.OfType <IReward>().Where(x => rewards.Contains(x.Reward)).All(x => x.CanComplete(items)));
 }
Exemple #17
0
 public bool CanAcquire(Progression items, RewardType reward)
 {
     // For the purpose of logic unit tests, if no region has the reward then CanAcquire is satisfied
     return(Regions.OfType <IReward>().FirstOrDefault(x => reward == x.Reward)?.CanComplete(items) ?? true);
 }