public static bool CanAccessDeathMountainPortal(this Progression items) { return((items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph); }
public virtual bool CanEnter(Progression items) { return(true); }
public static bool CanExtendMagic(this Progression items, int bars = 2) { return((items.HalfMagic ? 2 : 1) * (items.Bottle ? 2 : 1) >= bars); }
public static bool CanKillManyEnemies(this Progression items) { return(items.Sword || items.Hammer || items.Bow || items.Firerod || items.Somaria || items.Byrna && items.CanExtendMagic()); }
public static bool CanLightTorches(this Progression items) { return(items.Firerod || items.Lamp); }
public static bool CanMeltFreezors(this Progression items) { return(items.Firerod || items.Bombos && items.Sword); }
public static bool CanLiftLight(this Progression items) => items.Glove;
public bool CanAcquireAll(Progression items, RewardType rewardsMask) { return(rewardLookup[(int)rewardsMask].All(x => x.CanComplete(items))); }
public bool Available(Progression items) { return(Region.CanEnter(items) && canAccess(items)); }
public virtual bool CanFill(Item item, Progression items) { return(Config.Keysanity || !item.IsDungeonItem || IsRegionItem(item)); }
public static IEnumerable <Location> Available(this IEnumerable <Location> locations, IEnumerable <Item> items) { var progression = new Progression(items); return(locations.Where(l => l.Available(progression))); }
// For logic unit tests internal bool CanAccess(Progression items) => canAccess(items);
public bool CanAcquireAtLeast(int amount, Progression items, RewardType rewardsMask) { return(rewardLookup[(int)rewardsMask].Where(x => x.CanComplete(items)).Count() >= amount); }
public bool CanAquire(Progression items, RewardType reward) { return(Regions.OfType <IReward>().First(x => reward == x.Reward).CanComplete(items)); }
public static bool CanLiftHeavy(this Progression items) => items.Mitt;
public bool CanAquireAll(Progression items, params RewardType[] rewards) { return(Regions.OfType <IReward>().Where(x => rewards.Contains(x.Reward)).All(x => x.CanComplete(items))); }
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); }