public FullRandomItemLocationRandomizer( Seed seed, ItemInfoProvider itemInfoProvider, ItemUnlockingMap unlockingMap ) : base(seed, itemInfoProvider, unlockingMap) { }
public ItemInfoProvider(SeedOptions options, ItemUnlockingMap unlockingMap) { this.unlockingMap = unlockingMap; useItems = new Dictionary <EInventoryUseItemType, ItemInfo>(); relicItems = new Dictionary <EInventoryRelicType, ItemInfo>(); enquipmentItems = new Dictionary <EInventoryEquipmentType, ItemInfo>(); familierItems = new Dictionary <EInventoryFamiliarType, ItemInfo>(); orbItems = new Dictionary <int, ItemInfo>(); statItems = new Dictionary <EItemType, ItemInfo>(); progressiveItems = new Dictionary <ItemInfo, PogRessiveItemInfo>(); MakeGearsProgressive(); MakeBroochProgressive(); if (options.ProgressiveKeycard) { MakeKeycardsProgressive(); } if (options.ProgressiveVerticalMovement) { MakeVerticalMovementProgressive(); } }
public static void AddRandomItemsToLocationMap( Seed seed, ItemInfoProvider itemInfoProvider, ItemUnlockingMap unlockingMap, ItemLocationMap itemLocationMap, bool progressionOnly) { var random = new Random((int)seed.Id); new FullRandomItemLocationRandomizer(seed.Options, itemInfoProvider, unlockingMap, itemLocationMap, progressionOnly) .AddRandomItemsToLocationMap(random, seed.Options); }
FullRandomItemLocationRandomizer( SeedOptions options, ItemInfoProvider itemInfoProvider, ItemUnlockingMap unlockingMap, ItemLocationMap itemLocationMap, bool progressionOnly ) : base(options, itemInfoProvider, itemLocationMap, unlockingMap, progressionOnly) { }
public ForwardFillingItemLocationRandomizer( Seed seed, ItemInfoProvider itemProvider, ItemUnlockingMap unlockingMap ) : base(seed, itemProvider, unlockingMap) { random = new Random((int)seed.Id); availableRequirements = Requirement.None; unlockableRequirements = unlockingMap.AllUnlockableRequirements; placedItems = new Dictionary <ItemInfo, ItemLocation>(); paths = new Dictionary <ItemInfo, Gate>(); }
ForwardFillingItemLocationRandomizer( Seed seed, ItemInfoProvider itemProvider, ItemUnlockingMap unlockingMap, ItemLocationMap itemLocationMap, bool progressionOnly) : base(seed.Options, itemProvider, itemLocationMap, unlockingMap, progressionOnly) { random = new Random((int)seed.Id); availableRequirements = Requirement.None; unlockableRequirements = unlockingMap.AllUnlockableRequirements; placedItems = new Dictionary <ItemInfo, ItemLocation>(); paths = new Dictionary <ItemInfo, Gate>(); }
public void Should_generate_beatable_seed_in_1_pass() { var seed = new Seed(1U, SeedOptions.None); var unlockingMap = new ItemUnlockingMap(seed); var itemProvder = new ItemInfoProvider(SeedOptions.None, unlockingMap); var itemLocations = new ItemLocationMap(itemProvder, unlockingMap, SeedOptions.None); ForwardFillingItemLocationRandomizer.AddRandomItemsToLocationMap(seed, itemProvder, unlockingMap, itemLocations, true); Assert.That(itemLocations.IsBeatable(), Is.True); }
public void With_doubejump_timestop_spindle_and_cardD_should_get_access_to_past() { var unlockingMap = new ItemUnlockingMap(Seed.Zero); var itemLocations = new ItemLocationMap(new ItemInfoProvider(SeedOptions.None, unlockingMap), unlockingMap, SeedOptions.None); var accessableLocations = itemLocations.GetReachableLocations( Requirement.DoubleJump | Requirement.GateAccessToPast | Requirement.Swimming) .ToArray(); Assert.That(Contains(accessableLocations, new ItemKey(3, 3, 648, 272))); }
public ArchipelagoItemLocationRandomizer( Seed seed, ItemInfoProvider itemInfoProvider, ItemUnlockingMap unlockingMap, GameSave saveGame ) : base(seed, itemInfoProvider, unlockingMap) { this.saveGame = saveGame; TimeSpinnerGame.Localizer.OverrideKey("inv_use_MagicMarbles", "Archipelago Item"); TimeSpinnerGame.Localizer.OverrideKey("inv_use_MagicMarbles_desc", "Item that belongs to a distant timeline somewhere in the Archipelago (cannot be sold)"); }
public void With_given_requirements_shoud_mark_captians_chests_as_available() { var unlockingMap = new ItemUnlockingMap(Seed.Zero); var itemLocations = new ItemLocationMap(new ItemInfoProvider(SeedOptions.None, unlockingMap), unlockingMap, SeedOptions.None); var accessableLocations = itemLocations.GetReachableLocations( Requirement.GassMask | Requirement.AntiWeed | Requirement.Swimming | Requirement.GateLakeSirineRight | Requirement.DoubleJump) .ToArray(); Assert.That(Contains(accessableLocations, new ItemKey(1, 18, 1320, 189))); Assert.That(Contains(accessableLocations, new ItemKey(1, 18, 1272, 192))); Assert.That(Contains(accessableLocations, new ItemKey(1, 18, 1368, 192))); }
public void With_no_items_only_6_item_locatios_should_be_accessable() { var unlockingMap = new ItemUnlockingMap(Seed.Zero); var itemLocations = new ItemLocationMap(new ItemInfoProvider(SeedOptions.None, unlockingMap), unlockingMap, SeedOptions.None); var accessableLocations = itemLocations.GetReachableLocations(Requirement.None).ToArray(); Assert.That(Contains(accessableLocations, ItemKey.TutorialMeleeOrb)); Assert.That(Contains(accessableLocations, ItemKey.TutorialSpellOrb)); Assert.That(Contains(accessableLocations, new ItemKey(1, 1, 1528, 144))); Assert.That(Contains(accessableLocations, new ItemKey(1, 15, 264, 144))); Assert.That(Contains(accessableLocations, new ItemKey(1, 25, 296, 176))); Assert.That(Contains(accessableLocations, new ItemKey(1, 9, 600, 192))); }
public void Should_fill_tuturial_with_melee_and_spellorb(uint seedIndex) { var seed = new Seed(seedIndex, SeedOptions.None); var unlockingMap = new ItemUnlockingMap(seed); var itemProvider = new ItemInfoProvider(SeedOptions.None, unlockingMap); var itemLocations = new ItemLocationMap(itemProvider, unlockingMap, SeedOptions.None); FullRandomItemLocationRandomizer.AddRandomItemsToLocationMap(seed, itemProvider, unlockingMap, itemLocations, true); Assert.That(itemLocations[ItemKey.TutorialMeleeOrb].ItemInfo.Identifier.LootType, Is.EqualTo(LootType.Orb)); Assert.That(itemLocations[ItemKey.TutorialMeleeOrb].ItemInfo.Identifier.OrbSlot, Is.EqualTo(EOrbSlot.Melee)); Assert.That(itemLocations[ItemKey.TutorialSpellOrb].ItemInfo.Identifier.LootType, Is.EqualTo(LootType.Orb)); Assert.That(itemLocations[ItemKey.TutorialSpellOrb].ItemInfo.Identifier.OrbSlot, Is.EqualTo(EOrbSlot.Spell)); }
public ArchipelagoItemLocationMap(ItemInfoProvider itemInfoProvider, ItemUnlockingMap itemUnlockingMap, SeedOptions options, int slot) : base(itemInfoProvider, itemUnlockingMap, options) { this.slot = slot; }
internal SingleItemInfo(ItemUnlockingMap unlockingMap, ItemIdentifier identifier) { Identifier = identifier; Unlocks = unlockingMap.GetAllUnlock(identifier); PickupAction = unlockingMap.GetPickupAction(identifier); }
public static void AddRandomItemsToLocationMap( Seed seed, ItemInfoProvider itemInfoProvider, ItemUnlockingMap unlockingMap, ItemLocationMap itemLocationMap, bool progressionOnly) { new ForwardFillingItemLocationRandomizer(seed, itemInfoProvider, unlockingMap, itemLocationMap, progressionOnly) .AddRandomItemsToLocationMap(); }
protected ItemLocationRandomizer( SeedOptions options, ItemInfoProvider itemInfoProvider, ItemLocationMap itemLocations, ItemUnlockingMap unlockingMap, bool progressionOnly ) { SeedOptions = options; ItemInfoProvider = itemInfoProvider; ItemLocations = itemLocations; UnlockingMap = unlockingMap; ProgressionOnly = progressionOnly; itemsToRemoveFromGame = new List <ItemInfo> { ItemInfoProvider.Get(EInventoryUseItemType.MagicMarbles), ItemInfoProvider.Get(EInventoryUseItemType.GoldRing), ItemInfoProvider.Get(EInventoryUseItemType.GoldNecklace), ItemInfoProvider.Get(EInventoryUseItemType.SilverOre), ItemInfoProvider.Get(EInventoryUseItemType.EssenceCrystal), }; if (SeedOptions.StartWithJewelryBox) { itemsToRemoveFromGame.Add(ItemInfoProvider.Get(EInventoryRelicType.JewelryBox)); } if (SeedOptions.StartWithMeyef) { itemsToRemoveFromGame.Add(ItemInfoProvider.Get(EInventoryFamiliarType.Meyef)); } if (SeedOptions.StartWithTalaria) { itemsToRemoveFromGame.Add(ItemInfoProvider.Get(EInventoryRelicType.Dash)); } itemsToAddToGame = new[] { ItemInfoProvider.Get(EInventoryEquipmentType.SelenBangle), ItemInfoProvider.Get(EInventoryEquipmentType.GlassPumpkin), ItemInfoProvider.Get(EInventoryEquipmentType.EternalCoat), ItemInfoProvider.Get(EInventoryEquipmentType.EternalTiara), ItemInfoProvider.Get(EInventoryEquipmentType.LibrarianHat), ItemInfoProvider.Get(EInventoryEquipmentType.LibrarianRobe), ItemInfoProvider.Get(EInventoryEquipmentType.MetalWristband), ItemInfoProvider.Get(EInventoryEquipmentType.NelisteEarring), ItemInfoProvider.Get(EInventoryEquipmentType.FamiliarEgg), ItemInfoProvider.Get(EInventoryEquipmentType.LuckyCoin), ItemInfoProvider.Get(EInventoryRelicType.EternalBrooch), ItemInfoProvider.Get(EInventoryRelicType.FamiliarAltMeyef), ItemInfoProvider.Get(EInventoryRelicType.FamiliarAltCrow), }; genericItems = new[] { ItemInfoProvider.Get(EInventoryUseItemType.Potion), ItemInfoProvider.Get(EInventoryUseItemType.HiPotion), ItemInfoProvider.Get(EInventoryUseItemType.FuturePotion), ItemInfoProvider.Get(EInventoryUseItemType.FutureHiPotion), ItemInfoProvider.Get(EInventoryUseItemType.Ether), ItemInfoProvider.Get(EInventoryUseItemType.HiEther), ItemInfoProvider.Get(EInventoryUseItemType.FutureEther), ItemInfoProvider.Get(EInventoryUseItemType.FutureHiEther), ItemInfoProvider.Get(EInventoryUseItemType.ChaosHeal), ItemInfoProvider.Get(EInventoryUseItemType.Antidote), ItemInfoProvider.Get(EInventoryUseItemType.SandBottle), ItemInfoProvider.Get(EInventoryUseItemType.HiSandBottle), }; }