Skip to content

Commit 7232935

Browse files
committed
Add vanilla shop items when not provided by server settings
1 parent f70792a commit 7232935

File tree

2 files changed

+88
-7
lines changed

2 files changed

+88
-7
lines changed

Archipelago.HollowKnight/Archipelago.HollowKnight.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<Description>The Archipelago Multiworld client for Hollow Knight</Description>
99
<Copyright>
1010
</Copyright>
11-
<Version>0.3.0</Version>
11+
<Version>0.4.0</Version>
1212
<OutputPath>bin\$(Configuration)\</OutputPath>
1313
<LangVersion>latest</LangVersion>
1414
<Company>The Archipelago Community</Company>

Archipelago.HollowKnight/ArchipelagoRandomizer.cs

+87-6
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,99 @@ public void Randomize()
9191

9292
if (pmt is ShopPlacement shop)
9393
{
94-
shop.defaultShopItems = DefaultShopItems.IseldaMapPins | DefaultShopItems.IseldaMapMarkers |
95-
DefaultShopItems.LegEaterRepair;
94+
shop.defaultShopItems = DefaultShopItems.IseldaMapPins
95+
| DefaultShopItems.IseldaMapMarkers
96+
| DefaultShopItems.LegEaterRepair;
97+
if (!SlotOptions.RandomizeCharms)
98+
{
99+
shop.defaultShopItems |= DefaultShopItems.SlyCharms
100+
| DefaultShopItems.SlyKeyCharms
101+
| DefaultShopItems.IseldaCharms
102+
| DefaultShopItems.SalubraCharms
103+
| DefaultShopItems.LegEaterCharms;
104+
}
105+
if (!SlotOptions.RandomizeMaps)
106+
{
107+
shop.defaultShopItems |= DefaultShopItems.IseldaMaps
108+
| DefaultShopItems.IseldaQuill;
109+
}
110+
if (!SlotOptions.RandomizeCharmNotches)
111+
{
112+
shop.defaultShopItems |= DefaultShopItems.SalubraNotches
113+
| DefaultShopItems.SalubraBlessing;
114+
}
115+
if (!SlotOptions.RandomizeKeys)
116+
{
117+
shop.defaultShopItems |= DefaultShopItems.SlySimpleKey
118+
| DefaultShopItems.SlyLantern
119+
| DefaultShopItems.SlyKeyElegantKey;
120+
}
121+
if (!SlotOptions.RandomizeMaskShards)
122+
{
123+
shop.defaultShopItems |= DefaultShopItems.SlyMaskShards;
124+
}
125+
if (!SlotOptions.RandomizeVesselFragments)
126+
{
127+
shop.defaultShopItems |= DefaultShopItems.SlyVesselFragments;
128+
}
129+
if (!SlotOptions.RandomizeRancidEggs)
130+
{
131+
shop.defaultShopItems |= DefaultShopItems.SlyRancidEgg;
132+
}
96133
}
97134
else if (name == LocationNames.Grubfather)
98135
{
99-
pmt.AddTag<DestroyGrubRewardTag>().destroyRewards = GrubfatherRewards.AllNonGeo;
136+
DestroyGrubRewardTag t = pmt.AddTag<DestroyGrubRewardTag>();
137+
t.destroyRewards = GrubfatherRewards.None;
138+
if (SlotOptions.RandomizeMaskShards)
139+
{
140+
t.destroyRewards |= GrubfatherRewards.MaskShard;
141+
}
142+
if (SlotOptions.RandomizeCharms)
143+
{
144+
t.destroyRewards |= GrubfatherRewards.Grubsong | GrubfatherRewards.GrubberflysElegy;
145+
}
146+
if (SlotOptions.RandomizeRancidEggs)
147+
{
148+
t.destroyRewards |= GrubfatherRewards.RancidEgg;
149+
}
150+
if (SlotOptions.RandomizeRelics)
151+
{
152+
t.destroyRewards |= GrubfatherRewards.HallownestSeal | GrubfatherRewards.KingsIdol;
153+
}
154+
if (SlotOptions.RandomizePaleOre)
155+
{
156+
t.destroyRewards |= GrubfatherRewards.PaleOre;
157+
}
100158
}
101159
else if (name == LocationNames.Seer)
102160
{
103-
pmt.AddTag<DestroySeerRewardTag>().destroyRewards =
104-
SeerRewards.All & ~SeerRewards.GladeDoor & ~SeerRewards.Ascension;
105-
;
161+
DestroySeerRewardTag t = pmt.AddTag<DestroySeerRewardTag>();
162+
t.destroyRewards = SeerRewards.None;
163+
if (SlotOptions.RandomizeRelics)
164+
{
165+
t.destroyRewards |= SeerRewards.HallownestSeal | SeerRewards.ArcaneEgg;
166+
}
167+
if (SlotOptions.RandomizePaleOre)
168+
{
169+
t.destroyRewards |= SeerRewards.PaleOre;
170+
}
171+
if (SlotOptions.RandomizeCharms)
172+
{
173+
t.destroyRewards |= SeerRewards.DreamWielder;
174+
}
175+
if (SlotOptions.RandomizeVesselFragments)
176+
{
177+
t.destroyRewards |= SeerRewards.VesselFragment;
178+
}
179+
if (SlotOptions.RandomizeSkills)
180+
{
181+
t.destroyRewards |= SeerRewards.DreamGate | SeerRewards.AwokenDreamNail;
182+
}
183+
if (SlotOptions.RandomizeMaskShards)
184+
{
185+
t.destroyRewards |= SeerRewards.MaskShard;
186+
}
106187
}
107188
}
108189

0 commit comments

Comments
 (0)