Skip to content

Commit da723d8

Browse files
authored
Merge pull request #1 from Exempt-Medic/patch-34
Small fixes
2 parents aa13326 + 781acc5 commit da723d8

2 files changed

Lines changed: 39 additions & 19 deletions

File tree

worlds/dark_souls_3/Options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44
import typing
55

6-
from Options import Choice, DeathLink, DefaultOnToggle, ExcludeLocations, ItemDict, Option, PerGameCommonOptions, Range, Toggle, VerifyKeys
6+
from Options import Choice, DeathLink, DefaultOnToggle, ExcludeLocations, ItemDict, NamedRange, Option, PerGameCommonOptions, Range, Toggle, VerifyKeys
77

88

99
class ExcludedLocationsOption(Choice):
@@ -115,7 +115,7 @@ class RandomizeBossSoulLocations(DefaultOnToggle):
115115
"Exclude Locations" option. It does _not_ cause the locations not be
116116
randomized unless "Excluded Locations" is also set to "Unrandomized".
117117
"""
118-
display_name = "Randomize Key Locations"
118+
display_name = "Randomize Boss Soul Locations"
119119

120120

121121
class RandomizeNPCLocations(DefaultOnToggle):
@@ -233,7 +233,7 @@ class RandomizeInfusionOption(Toggle):
233233
display_name = "Randomize Infusion"
234234

235235

236-
class RandomizeInfusionPercentageOption(Range):
236+
class RandomizeInfusionPercentageOption(NamedRange):
237237
"""The percentage of weapons/shields in the pool to be infused if Randomize Infusion is toggled"""
238238
display_name = "Percentage of Infused Weapons"
239239
range_start = 0

worlds/dark_souls_3/__init__.py

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def generate_early(self):
112112
)
113113
):
114114
self.multiworld.early_items[self.player]['Storm Ruler'] = 1
115-
self.multiworld.local_items[self.player].value.add('Storm Ruler')
115+
self.multiworld.worlds[self.player].options.local_items.value.add('Storm Ruler')
116116
else:
117117
self.yhorm_location = default_yhorm_location
118118

@@ -462,7 +462,21 @@ def set_rules(self) -> None:
462462
state.has("Cinders of a Lord - Lothric Prince", self.player))
463463

464464
if self.options.late_basin_of_vows:
465-
self._add_entrance_rule("Lothric Castle", "Small Lothric Banner")
465+
self._add_entrance_rule("Lothric Castle", lambda state: (
466+
state.has("Small Lothric Banner", self.player)
467+
# Make sure these are actually available early.
468+
and (
469+
"Transposing Kiln" not in randomized_items
470+
or state.has("Transposing Kiln", self.player)
471+
) and (
472+
"Pyromancy Flame" not in randomized_items
473+
or state.has("Pyromancy Flame", self.player)
474+
)
475+
# This isn't really necessary, but it ensures that the game logic knows players will
476+
# want to do Lothric Castle after at least being _able_ to access Catacombs. This is
477+
# useful for smooth item placement.
478+
and self._has_any_scroll(state)
479+
))
466480

467481
# DLC Access Rules Below
468482
if self.options.enable_dlc:
@@ -892,18 +906,27 @@ def _add_npc_rules(self) -> None:
892906

893907
## Orbeck
894908

909+
self._add_location_rule([
910+
"FS: Morion Blade - Yuria for Orbeck's Ashes",
911+
"FS: Clandestine Coat - shop with Orbeck's Ashes"
912+
], lambda state: (
913+
state.has("Golden Scroll", self.player)
914+
and state.has("Logan's Scroll", self.player)
915+
and state.has("Crystal Scroll", self.player)
916+
and state.has("Sage's Scroll", self.player)
917+
))
918+
895919
# Make sure that the player can keep Orbeck around by giving him at least one scroll
896920
# before killing Abyss Watchers.
897-
def has_any_scroll(state):
898-
self._add_location_rule("FK: Soul of the Blood of the Wolf", self._has_any_scroll)
899-
self._add_location_rule("FK: Cinders of a Lord - Abyss Watcher", self._has_any_scroll)
900-
self._add_entrance_rule("Catacombs of Carthus", self._has_any_scroll)
901-
# Not really necessary but ensures players can decide which way to go
902-
if self.options.enable_dlc:
903-
self._add_entrance_rule(
904-
"Painted World of Ariandel (After Contraption)",
905-
self._has_any_scroll
906-
)
921+
self._add_location_rule("FK: Soul of the Blood of the Wolf", self._has_any_scroll)
922+
self._add_location_rule("FK: Cinders of a Lord - Abyss Watcher", self._has_any_scroll)
923+
self._add_entrance_rule("Catacombs of Carthus", self._has_any_scroll)
924+
# Not really necessary but ensures players can decide which way to go
925+
if self.options.enable_dlc:
926+
self._add_entrance_rule(
927+
"Painted World of Ariandel (After Contraption)",
928+
self._has_any_scroll
929+
)
907930

908931

909932
def _add_transposition_rules(self) -> None:
@@ -1022,10 +1045,7 @@ def _add_unnecessary_location_rules(self) -> None:
10221045
for location in unnecessary_locations:
10231046
self._add_item_rule(
10241047
location,
1025-
lambda item: item.classification not in {
1026-
ItemClassification.progression,
1027-
ItemClassification.progression_skip_balancing
1028-
}
1048+
lambda item: not item.advancement
10291049
)
10301050

10311051

0 commit comments

Comments
 (0)