mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-10 17:43:53 -07:00
Compare commits
34 Commits
NewSoupVi-
...
NewSoupVi-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2e1c66f1d | ||
|
|
03442621f4 | ||
|
|
6803c373e5 | ||
|
|
575c338aa3 | ||
|
|
05ce29f7dc | ||
|
|
74697b679e | ||
|
|
cf6661439e | ||
|
|
6297a4efa5 | ||
|
|
8ddb49f071 | ||
|
|
90446ad175 | ||
|
|
98bb8517e1 | ||
|
|
203c8f4d89 | ||
|
|
c0ef02d6fa | ||
|
|
4620493828 | ||
|
|
75b8c7891c | ||
|
|
53bc4ffa52 | ||
|
|
91f7cf16de | ||
|
|
7c8ea34a02 | ||
|
|
a05dbac55f | ||
|
|
83521e99d9 | ||
|
|
1d19da0c76 | ||
|
|
77e3f9fbef | ||
|
|
954d728005 | ||
|
|
80daa092a7 | ||
|
|
fac72dbc20 | ||
|
|
e764da3dc6 | ||
|
|
ab0903679c | ||
|
|
67f329b96f | ||
|
|
b273852512 | ||
|
|
b77805e5ee | ||
|
|
34141f8de0 | ||
|
|
e38f5d0a61 | ||
|
|
35ed0d4e19 | ||
|
|
e5c9b8ad0c |
112
BaseClasses.py
112
BaseClasses.py
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import collections
|
||||
import copy
|
||||
import itertools
|
||||
import functools
|
||||
@@ -63,7 +64,6 @@ class MultiWorld():
|
||||
state: CollectionState
|
||||
|
||||
plando_options: PlandoOptions
|
||||
accessibility: Dict[int, Options.Accessibility]
|
||||
early_items: Dict[int, Dict[str, int]]
|
||||
local_early_items: Dict[int, Dict[str, int]]
|
||||
local_items: Dict[int, Options.LocalItems]
|
||||
@@ -288,6 +288,86 @@ class MultiWorld():
|
||||
group["non_local_items"] = item_link["non_local_items"]
|
||||
group["link_replacement"] = replacement_prio[item_link["link_replacement"]]
|
||||
|
||||
def link_items(self) -> None:
|
||||
"""Called to link together items in the itempool related to the registered item link groups."""
|
||||
from worlds import AutoWorld
|
||||
|
||||
for group_id, group in self.groups.items():
|
||||
def find_common_pool(players: Set[int], shared_pool: Set[str]) -> Tuple[
|
||||
Optional[Dict[int, Dict[str, int]]], Optional[Dict[str, int]]
|
||||
]:
|
||||
classifications: Dict[str, int] = collections.defaultdict(int)
|
||||
counters = {player: {name: 0 for name in shared_pool} for player in players}
|
||||
for item in self.itempool:
|
||||
if item.player in counters and item.name in shared_pool:
|
||||
counters[item.player][item.name] += 1
|
||||
classifications[item.name] |= item.classification
|
||||
|
||||
for player in players.copy():
|
||||
if all([counters[player][item] == 0 for item in shared_pool]):
|
||||
players.remove(player)
|
||||
del (counters[player])
|
||||
|
||||
if not players:
|
||||
return None, None
|
||||
|
||||
for item in shared_pool:
|
||||
count = min(counters[player][item] for player in players)
|
||||
if count:
|
||||
for player in players:
|
||||
counters[player][item] = count
|
||||
else:
|
||||
for player in players:
|
||||
del (counters[player][item])
|
||||
return counters, classifications
|
||||
|
||||
common_item_count, classifications = find_common_pool(group["players"], group["item_pool"])
|
||||
if not common_item_count:
|
||||
continue
|
||||
|
||||
new_itempool: List[Item] = []
|
||||
for item_name, item_count in next(iter(common_item_count.values())).items():
|
||||
for _ in range(item_count):
|
||||
new_item = group["world"].create_item(item_name)
|
||||
# mangle together all original classification bits
|
||||
new_item.classification |= classifications[item_name]
|
||||
new_itempool.append(new_item)
|
||||
|
||||
region = Region("Menu", group_id, self, "ItemLink")
|
||||
self.regions.append(region)
|
||||
locations = region.locations
|
||||
for item in self.itempool:
|
||||
count = common_item_count.get(item.player, {}).get(item.name, 0)
|
||||
if count:
|
||||
loc = Location(group_id, f"Item Link: {item.name} -> {self.player_name[item.player]} {count}",
|
||||
None, region)
|
||||
loc.access_rule = lambda state, item_name = item.name, group_id_ = group_id, count_ = count: \
|
||||
state.has(item_name, group_id_, count_)
|
||||
|
||||
locations.append(loc)
|
||||
loc.place_locked_item(item)
|
||||
common_item_count[item.player][item.name] -= 1
|
||||
else:
|
||||
new_itempool.append(item)
|
||||
|
||||
itemcount = len(self.itempool)
|
||||
self.itempool = new_itempool
|
||||
|
||||
while itemcount > len(self.itempool):
|
||||
items_to_add = []
|
||||
for player in group["players"]:
|
||||
if group["link_replacement"]:
|
||||
item_player = group_id
|
||||
else:
|
||||
item_player = player
|
||||
if group["replacement_items"][player]:
|
||||
items_to_add.append(AutoWorld.call_single(self, "create_item", item_player,
|
||||
group["replacement_items"][player]))
|
||||
else:
|
||||
items_to_add.append(AutoWorld.call_single(self, "create_filler", item_player))
|
||||
self.random.shuffle(items_to_add)
|
||||
self.itempool.extend(items_to_add[:itemcount - len(self.itempool)])
|
||||
|
||||
def secure(self):
|
||||
self.random = ThreadBarrierProxy(secrets.SystemRandom())
|
||||
self.is_race = True
|
||||
@@ -523,26 +603,22 @@ class MultiWorld():
|
||||
players: Dict[str, Set[int]] = {
|
||||
"minimal": set(),
|
||||
"items": set(),
|
||||
"locations": set()
|
||||
"full": set()
|
||||
}
|
||||
for player, access in self.accessibility.items():
|
||||
players[access.current_key].add(player)
|
||||
for player, world in self.worlds.items():
|
||||
players[world.options.accessibility.current_key].add(player)
|
||||
|
||||
beatable_fulfilled = False
|
||||
|
||||
def location_condition(location: Location):
|
||||
def location_condition(location: Location) -> bool:
|
||||
"""Determine if this location has to be accessible, location is already filtered by location_relevant"""
|
||||
if location.player in players["locations"] or (location.item and location.item.player not in
|
||||
players["minimal"]):
|
||||
return True
|
||||
return False
|
||||
return location.player in players["full"] or \
|
||||
(location.item and location.item.player not in players["minimal"])
|
||||
|
||||
def location_relevant(location: Location):
|
||||
def location_relevant(location: Location) -> bool:
|
||||
"""Determine if this location is relevant to sweep."""
|
||||
if location.progress_type != LocationProgressType.EXCLUDED \
|
||||
and (location.player in players["locations"] or location.advancement):
|
||||
return True
|
||||
return False
|
||||
return location.progress_type != LocationProgressType.EXCLUDED \
|
||||
and (location.player in players["full"] or location.advancement)
|
||||
|
||||
def all_done() -> bool:
|
||||
"""Check if all access rules are fulfilled"""
|
||||
@@ -680,13 +756,13 @@ class CollectionState():
|
||||
def can_reach_region(self, spot: str, player: int) -> bool:
|
||||
return self.multiworld.get_region(spot, player).can_reach(self)
|
||||
|
||||
def sweep_for_events(self, key_only: bool = False, locations: Optional[Iterable[Location]] = None) -> None:
|
||||
def sweep_for_events(self, locations: Optional[Iterable[Location]] = None) -> None:
|
||||
if locations is None:
|
||||
locations = self.multiworld.get_filled_locations()
|
||||
reachable_events = True
|
||||
# since the loop has a good chance to run more than once, only filter the events once
|
||||
locations = {location for location in locations if location.advancement and location not in self.events and
|
||||
not key_only or getattr(location.item, "locked_dungeon_item", False)}
|
||||
locations = {location for location in locations if location.advancement and location not in self.events}
|
||||
|
||||
while reachable_events:
|
||||
reachable_events = {location for location in locations if location.can_reach(self)}
|
||||
locations -= reachable_events
|
||||
@@ -1291,8 +1367,6 @@ class Spoiler:
|
||||
state = CollectionState(multiworld)
|
||||
collection_spheres = []
|
||||
while required_locations:
|
||||
state.sweep_for_events(key_only=True)
|
||||
|
||||
sphere = set(filter(state.can_reach, required_locations))
|
||||
|
||||
for location in sphere:
|
||||
|
||||
1
Fill.py
1
Fill.py
@@ -646,7 +646,6 @@ def balance_multiworld_progression(multiworld: MultiWorld) -> None:
|
||||
|
||||
def get_sphere_locations(sphere_state: CollectionState,
|
||||
locations: typing.Set[Location]) -> typing.Set[Location]:
|
||||
sphere_state.sweep_for_events(key_only=True, locations=locations)
|
||||
return {loc for loc in locations if sphere_state.can_reach(loc)}
|
||||
|
||||
def item_percentage(player: int, num: int) -> float:
|
||||
|
||||
77
Main.py
77
Main.py
@@ -184,82 +184,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No
|
||||
assert len(multiworld.itempool) == len(new_items), "Item Pool amounts should not change."
|
||||
multiworld.itempool[:] = new_items
|
||||
|
||||
# temporary home for item links, should be moved out of Main
|
||||
for group_id, group in multiworld.groups.items():
|
||||
def find_common_pool(players: Set[int], shared_pool: Set[str]) -> Tuple[
|
||||
Optional[Dict[int, Dict[str, int]]], Optional[Dict[str, int]]
|
||||
]:
|
||||
classifications: Dict[str, int] = collections.defaultdict(int)
|
||||
counters = {player: {name: 0 for name in shared_pool} for player in players}
|
||||
for item in multiworld.itempool:
|
||||
if item.player in counters and item.name in shared_pool:
|
||||
counters[item.player][item.name] += 1
|
||||
classifications[item.name] |= item.classification
|
||||
|
||||
for player in players.copy():
|
||||
if all([counters[player][item] == 0 for item in shared_pool]):
|
||||
players.remove(player)
|
||||
del (counters[player])
|
||||
|
||||
if not players:
|
||||
return None, None
|
||||
|
||||
for item in shared_pool:
|
||||
count = min(counters[player][item] for player in players)
|
||||
if count:
|
||||
for player in players:
|
||||
counters[player][item] = count
|
||||
else:
|
||||
for player in players:
|
||||
del (counters[player][item])
|
||||
return counters, classifications
|
||||
|
||||
common_item_count, classifications = find_common_pool(group["players"], group["item_pool"])
|
||||
if not common_item_count:
|
||||
continue
|
||||
|
||||
new_itempool: List[Item] = []
|
||||
for item_name, item_count in next(iter(common_item_count.values())).items():
|
||||
for _ in range(item_count):
|
||||
new_item = group["world"].create_item(item_name)
|
||||
# mangle together all original classification bits
|
||||
new_item.classification |= classifications[item_name]
|
||||
new_itempool.append(new_item)
|
||||
|
||||
region = Region("Menu", group_id, multiworld, "ItemLink")
|
||||
multiworld.regions.append(region)
|
||||
locations = region.locations
|
||||
for item in multiworld.itempool:
|
||||
count = common_item_count.get(item.player, {}).get(item.name, 0)
|
||||
if count:
|
||||
loc = Location(group_id, f"Item Link: {item.name} -> {multiworld.player_name[item.player]} {count}",
|
||||
None, region)
|
||||
loc.access_rule = lambda state, item_name = item.name, group_id_ = group_id, count_ = count: \
|
||||
state.has(item_name, group_id_, count_)
|
||||
|
||||
locations.append(loc)
|
||||
loc.place_locked_item(item)
|
||||
common_item_count[item.player][item.name] -= 1
|
||||
else:
|
||||
new_itempool.append(item)
|
||||
|
||||
itemcount = len(multiworld.itempool)
|
||||
multiworld.itempool = new_itempool
|
||||
|
||||
while itemcount > len(multiworld.itempool):
|
||||
items_to_add = []
|
||||
for player in group["players"]:
|
||||
if group["link_replacement"]:
|
||||
item_player = group_id
|
||||
else:
|
||||
item_player = player
|
||||
if group["replacement_items"][player]:
|
||||
items_to_add.append(AutoWorld.call_single(multiworld, "create_item", item_player,
|
||||
group["replacement_items"][player]))
|
||||
else:
|
||||
items_to_add.append(AutoWorld.call_single(multiworld, "create_filler", item_player))
|
||||
multiworld.random.shuffle(items_to_add)
|
||||
multiworld.itempool.extend(items_to_add[:itemcount - len(multiworld.itempool)])
|
||||
multiworld.link_items()
|
||||
|
||||
if any(multiworld.item_links.values()):
|
||||
multiworld._all_state = None
|
||||
|
||||
@@ -1857,6 +1857,7 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
|
||||
args["cmd"] = "SetReply"
|
||||
value = ctx.stored_data.get(args["key"], args.get("default", 0))
|
||||
args["original_value"] = copy.copy(value)
|
||||
args["slot"] = client.slot
|
||||
for operation in args["operations"]:
|
||||
func = modify_functions[operation["operation"]]
|
||||
value = func(value, operation["value"])
|
||||
|
||||
67
Options.py
67
Options.py
@@ -786,17 +786,22 @@ class VerifyKeys(metaclass=FreezeValidKeys):
|
||||
verify_location_name: bool = False
|
||||
value: typing.Any
|
||||
|
||||
@classmethod
|
||||
def verify_keys(cls, data: typing.Iterable[str]) -> None:
|
||||
if cls.valid_keys:
|
||||
data = set(data)
|
||||
dataset = set(word.casefold() for word in data) if cls.valid_keys_casefold else set(data)
|
||||
extra = dataset - cls._valid_keys
|
||||
def verify_keys(self) -> None:
|
||||
if self.valid_keys:
|
||||
data = set(self.value)
|
||||
dataset = set(word.casefold() for word in data) if self.valid_keys_casefold else set(data)
|
||||
extra = dataset - self._valid_keys
|
||||
if extra:
|
||||
raise Exception(f"Found unexpected key {', '.join(extra)} in {cls}. "
|
||||
f"Allowed keys: {cls._valid_keys}.")
|
||||
raise OptionError(
|
||||
f"Found unexpected key {', '.join(extra)} in {getattr(self, 'display_name', self)}. "
|
||||
f"Allowed keys: {self._valid_keys}."
|
||||
)
|
||||
|
||||
def verify(self, world: typing.Type[World], player_name: str, plando_options: "PlandoOptions") -> None:
|
||||
try:
|
||||
self.verify_keys()
|
||||
except OptionError as validation_error:
|
||||
raise OptionError(f"Player {player_name} has invalid option keys:\n{validation_error}")
|
||||
if self.convert_name_groups and self.verify_item_name:
|
||||
new_value = type(self.value)() # empty container of whatever value is
|
||||
for item_name in self.value:
|
||||
@@ -833,7 +838,6 @@ class OptionDict(Option[typing.Dict[str, typing.Any]], VerifyKeys, typing.Mappin
|
||||
@classmethod
|
||||
def from_any(cls, data: typing.Dict[str, typing.Any]) -> OptionDict:
|
||||
if type(data) == dict:
|
||||
cls.verify_keys(data)
|
||||
return cls(data)
|
||||
else:
|
||||
raise NotImplementedError(f"Cannot Convert from non-dictionary, got {type(data)}")
|
||||
@@ -879,7 +883,6 @@ class OptionList(Option[typing.List[typing.Any]], VerifyKeys):
|
||||
@classmethod
|
||||
def from_any(cls, data: typing.Any):
|
||||
if is_iterable_except_str(data):
|
||||
cls.verify_keys(data)
|
||||
return cls(data)
|
||||
return cls.from_text(str(data))
|
||||
|
||||
@@ -905,7 +908,6 @@ class OptionSet(Option[typing.Set[str]], VerifyKeys):
|
||||
@classmethod
|
||||
def from_any(cls, data: typing.Any):
|
||||
if is_iterable_except_str(data):
|
||||
cls.verify_keys(data)
|
||||
return cls(data)
|
||||
return cls.from_text(str(data))
|
||||
|
||||
@@ -948,6 +950,19 @@ class PlandoTexts(Option[typing.List[PlandoText]], VerifyKeys):
|
||||
self.value = []
|
||||
logging.warning(f"The plando texts module is turned off, "
|
||||
f"so text for {player_name} will be ignored.")
|
||||
else:
|
||||
super().verify(world, player_name, plando_options)
|
||||
|
||||
def verify_keys(self) -> None:
|
||||
if self.valid_keys:
|
||||
data = set(text.at for text in self)
|
||||
dataset = set(word.casefold() for word in data) if self.valid_keys_casefold else set(data)
|
||||
extra = dataset - self._valid_keys
|
||||
if extra:
|
||||
raise OptionError(
|
||||
f"Invalid \"at\" placement {', '.join(extra)} in {getattr(self, 'display_name', self)}. "
|
||||
f"Allowed placements: {self._valid_keys}."
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_any(cls, data: PlandoTextsFromAnyType) -> Self:
|
||||
@@ -971,7 +986,6 @@ class PlandoTexts(Option[typing.List[PlandoText]], VerifyKeys):
|
||||
texts.append(text)
|
||||
else:
|
||||
raise Exception(f"Cannot create plando text from non-dictionary type, got {type(text)}")
|
||||
cls.verify_keys([text.at for text in texts])
|
||||
return cls(texts)
|
||||
else:
|
||||
raise NotImplementedError(f"Cannot Convert from non-list, got {type(data)}")
|
||||
@@ -1144,18 +1158,35 @@ class PlandoConnections(Option[typing.List[PlandoConnection]], metaclass=Connect
|
||||
|
||||
|
||||
class Accessibility(Choice):
|
||||
"""Set rules for reachability of your items/locations.
|
||||
"""
|
||||
Set rules for reachability of your items/locations.
|
||||
|
||||
**Full:** ensure everything can be reached and acquired.
|
||||
|
||||
- **Locations:** ensure everything can be reached and acquired.
|
||||
- **Items:** ensure all logically relevant items can be acquired.
|
||||
- **Minimal:** ensure what is needed to reach your goal can be acquired.
|
||||
**Minimal:** ensure what is needed to reach your goal can be acquired.
|
||||
"""
|
||||
display_name = "Accessibility"
|
||||
rich_text_doc = True
|
||||
option_locations = 0
|
||||
option_items = 1
|
||||
option_full = 0
|
||||
option_minimal = 2
|
||||
alias_none = 2
|
||||
alias_locations = 0
|
||||
alias_items = 0
|
||||
default = 0
|
||||
|
||||
|
||||
class ItemsAccessibility(Accessibility):
|
||||
"""
|
||||
Set rules for reachability of your items/locations.
|
||||
|
||||
**Full:** ensure everything can be reached and acquired.
|
||||
|
||||
**Minimal:** ensure what is needed to reach your goal can be acquired.
|
||||
|
||||
**Items:** ensure all logically relevant items can be acquired. Some items, such as keys, may be self-locking, and
|
||||
some locations may be inaccessible.
|
||||
"""
|
||||
option_items = 1
|
||||
default = 1
|
||||
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ Currently, the following games are supported:
|
||||
* Aquaria
|
||||
* Yu-Gi-Oh! Ultimate Masters: World Championship Tournament 2006
|
||||
* A Hat in Time
|
||||
* Old School Runescape
|
||||
|
||||
For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/).
|
||||
Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled
|
||||
|
||||
@@ -231,6 +231,13 @@ def generate_yaml(game: str):
|
||||
|
||||
del options[key]
|
||||
|
||||
# Detect keys which end with -range, indicating a NamedRange with a possible custom value
|
||||
elif key_parts[-1].endswith("-range"):
|
||||
if options[key_parts[-1][:-6]] == "custom":
|
||||
options[key_parts[-1][:-6]] = val
|
||||
|
||||
del options[key]
|
||||
|
||||
# Detect random-* keys and set their options accordingly
|
||||
for key, val in options.copy().items():
|
||||
if key.startswith("random-"):
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
{% macro NamedRange(option_name, option) %}
|
||||
{{ OptionTitle(option_name, option) }}
|
||||
<div class="named-range-container">
|
||||
<select id="{{ option_name }}-select" data-option-name="{{ option_name }}" {{ "disabled" if option.default == "random" }}>
|
||||
<select id="{{ option_name }}-select" name="{{ option_name }}" data-option-name="{{ option_name }}" {{ "disabled" if option.default == "random" }}>
|
||||
{% for key, val in option.special_range_names.items() %}
|
||||
{% if option.default == val %}
|
||||
<option value="{{ val }}" selected>{{ key|replace("_", " ")|title }} ({{ val }})</option>
|
||||
@@ -64,17 +64,17 @@
|
||||
{% endfor %}
|
||||
<option value="custom" hidden>Custom</option>
|
||||
</select>
|
||||
<div class="named-range-wrapper">
|
||||
<div class="named-range-wrapper js-required">
|
||||
<input
|
||||
type="range"
|
||||
id="{{ option_name }}"
|
||||
name="{{ option_name }}"
|
||||
name="{{ option_name }}-range"
|
||||
min="{{ option.range_start }}"
|
||||
max="{{ option.range_end }}"
|
||||
value="{{ option.default | default(option.range_start) if option.default != "random" else option.range_start }}"
|
||||
{{ "disabled" if option.default == "random" }}
|
||||
/>
|
||||
<span id="{{ option_name }}-value" class="range-value js-required">
|
||||
<span id="{{ option_name }}-value" class="range-value">
|
||||
{{ option.default | default(option.range_start) if option.default != "random" else option.range_start }}
|
||||
</span>
|
||||
{{ RandomizeButton(option_name, option) }}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<noscript>
|
||||
<style>
|
||||
.js-required{
|
||||
display: none;
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
@@ -79,7 +79,7 @@ class TrackerData:
|
||||
|
||||
# Normal lookup tables as well.
|
||||
self.item_name_to_id[game] = game_package["item_name_to_id"]
|
||||
self.location_name_to_id[game] = game_package["item_name_to_id"]
|
||||
self.location_name_to_id[game] = game_package["location_name_to_id"]
|
||||
|
||||
def get_seed_name(self) -> str:
|
||||
"""Retrieves the seed name."""
|
||||
|
||||
@@ -115,6 +115,9 @@
|
||||
# Ocarina of Time
|
||||
/worlds/oot/ @espeon65536
|
||||
|
||||
# Old School Runescape
|
||||
/worlds/osrs @digiholic
|
||||
|
||||
# Overcooked! 2
|
||||
/worlds/overcooked2/ @toasterparty
|
||||
|
||||
|
||||
@@ -261,6 +261,7 @@ Sent to clients in response to a [Set](#Set) package if want_reply was set to tr
|
||||
| key | str | The key that was updated. |
|
||||
| value | any | The new value for the key. |
|
||||
| original_value | any | The value the key had before it was updated. Not present on "_read" prefixed special keys. |
|
||||
| slot | int | The slot that originally sent the Set package causing this change. |
|
||||
|
||||
Additional arguments added to the [Set](#Set) package that triggered this [SetReply](#SetReply) will also be passed along.
|
||||
|
||||
|
||||
1
setup.py
1
setup.py
@@ -66,7 +66,6 @@ non_apworlds: set = {
|
||||
"Adventure",
|
||||
"ArchipIDLE",
|
||||
"Archipelago",
|
||||
"ChecksFinder",
|
||||
"Clique",
|
||||
"Final Fantasy",
|
||||
"Lufia II Ancient Cave",
|
||||
|
||||
@@ -174,8 +174,8 @@ class TestFillRestrictive(unittest.TestCase):
|
||||
player1 = generate_player_data(multiworld, 1, 3, 3)
|
||||
player2 = generate_player_data(multiworld, 2, 3, 3)
|
||||
|
||||
multiworld.accessibility[player1.id].value = multiworld.accessibility[player1.id].option_minimal
|
||||
multiworld.accessibility[player2.id].value = multiworld.accessibility[player2.id].option_locations
|
||||
multiworld.worlds[player1.id].options.accessibility.value = Accessibility.option_minimal
|
||||
multiworld.worlds[player2.id].options.accessibility.value = Accessibility.option_full
|
||||
|
||||
multiworld.completion_condition[player1.id] = lambda state: True
|
||||
multiworld.completion_condition[player2.id] = lambda state: state.has(player2.prog_items[2].name, player2.id)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import unittest
|
||||
|
||||
from BaseClasses import PlandoOptions
|
||||
from BaseClasses import MultiWorld, PlandoOptions
|
||||
from Options import ItemLinks
|
||||
from worlds.AutoWorld import AutoWorldRegister
|
||||
|
||||
@@ -47,3 +47,15 @@ class TestOptions(unittest.TestCase):
|
||||
self.assertIn("Bow", link.value[0]["item_pool"])
|
||||
|
||||
# TODO test that the group created using these options has the items
|
||||
|
||||
def test_item_links_resolve(self):
|
||||
"""Test item link option resolves correctly."""
|
||||
item_link_group = [{
|
||||
"name": "ItemLinkTest",
|
||||
"item_pool": ["Everything"],
|
||||
"link_replacement": False,
|
||||
"replacement_item": None,
|
||||
}]
|
||||
item_links = {1: ItemLinks.from_any(item_link_group), 2: ItemLinks.from_any(item_link_group)}
|
||||
for link in item_links.values():
|
||||
self.assertEqual(link.value[0], item_link_group[0])
|
||||
|
||||
@@ -69,7 +69,7 @@ class TestTwoPlayerMulti(MultiworldTestBase):
|
||||
for world in AutoWorldRegister.world_types.values():
|
||||
self.multiworld = setup_multiworld([world, world], ())
|
||||
for world in self.multiworld.worlds.values():
|
||||
world.options.accessibility.value = Accessibility.option_locations
|
||||
world.options.accessibility.value = Accessibility.option_full
|
||||
self.assertSteps(gen_steps)
|
||||
with self.subTest("filling multiworld", seed=self.multiworld.seed):
|
||||
distribute_items_restrictive(self.multiworld)
|
||||
|
||||
@@ -39,7 +39,7 @@ def create_itempool(world: "HatInTimeWorld") -> List[Item]:
|
||||
continue
|
||||
else:
|
||||
if name == "Scooter Badge":
|
||||
if world.options.CTRLogic is CTRLogic.option_scooter or get_difficulty(world) >= Difficulty.MODERATE:
|
||||
if world.options.CTRLogic == CTRLogic.option_scooter or get_difficulty(world) >= Difficulty.MODERATE:
|
||||
item_type = ItemClassification.progression
|
||||
elif name == "No Bonk Badge" and world.is_dw():
|
||||
item_type = ItemClassification.progression
|
||||
|
||||
@@ -659,6 +659,10 @@ def is_valid_act_combo(world: "HatInTimeWorld", entrance_act: Region,
|
||||
if exit_act.name not in chapter_finales:
|
||||
return False
|
||||
|
||||
exit_chapter: str = act_chapters.get(exit_act.name)
|
||||
# make sure that certain time rift combinations never happen
|
||||
always_block: bool = exit_chapter != "Mafia Town" and exit_chapter != "Subcon Forest"
|
||||
if not ignore_certain_rules or always_block:
|
||||
if entrance_act.name in rift_access_regions and exit_act.name in rift_access_regions[entrance_act.name]:
|
||||
return False
|
||||
|
||||
@@ -684,9 +688,12 @@ def is_valid_first_act(world: "HatInTimeWorld", act: Region) -> bool:
|
||||
if act.name not in guaranteed_first_acts:
|
||||
return False
|
||||
|
||||
if world.options.ActRandomizer == ActRandomizer.option_light and "Time Rift" in act.name:
|
||||
return False
|
||||
|
||||
# If there's only a single level in the starting chapter, only allow Mafia Town or Subcon Forest levels
|
||||
start_chapter = world.options.StartingChapter
|
||||
if start_chapter is ChapterIndex.ALPINE or start_chapter is ChapterIndex.SUBCON:
|
||||
if start_chapter == ChapterIndex.ALPINE or start_chapter == ChapterIndex.SUBCON:
|
||||
if "Time Rift" in act.name:
|
||||
return False
|
||||
|
||||
@@ -723,7 +730,8 @@ def is_valid_first_act(world: "HatInTimeWorld", act: Region) -> bool:
|
||||
elif act.name == "Contractual Obligations" and world.options.ShuffleSubconPaintings:
|
||||
return False
|
||||
|
||||
if world.options.ShuffleSubconPaintings and act_chapters.get(act.name, "") == "Subcon Forest":
|
||||
if world.options.ShuffleSubconPaintings and "Time Rift" not in act.name \
|
||||
and act_chapters.get(act.name, "") == "Subcon Forest":
|
||||
# Only allow Subcon levels if painting skips are allowed
|
||||
if diff < Difficulty.MODERATE or world.options.NoPaintingSkips:
|
||||
return False
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from worlds.AutoWorld import CollectionState
|
||||
from worlds.generic.Rules import add_rule, set_rule
|
||||
from .Locations import location_table, zipline_unlocks, is_location_valid, contract_locations, \
|
||||
shop_locations, event_locs
|
||||
from .Locations import location_table, zipline_unlocks, is_location_valid, shop_locations, event_locs
|
||||
from .Types import HatType, ChapterIndex, hat_type_to_item, Difficulty, HitType
|
||||
from BaseClasses import Location, Entrance, Region
|
||||
from typing import TYPE_CHECKING, List, Callable, Union, Dict
|
||||
@@ -148,14 +147,14 @@ def set_rules(world: "HatInTimeWorld"):
|
||||
if world.is_dlc1():
|
||||
chapter_list.append(ChapterIndex.CRUISE)
|
||||
|
||||
if world.is_dlc2() and final_chapter is not ChapterIndex.METRO:
|
||||
if world.is_dlc2() and final_chapter != ChapterIndex.METRO:
|
||||
chapter_list.append(ChapterIndex.METRO)
|
||||
|
||||
chapter_list.remove(starting_chapter)
|
||||
world.random.shuffle(chapter_list)
|
||||
|
||||
# Make sure Alpine is unlocked before any DLC chapters are, as the Alpine door needs to be open to access them
|
||||
if starting_chapter is not ChapterIndex.ALPINE and (world.is_dlc1() or world.is_dlc2()):
|
||||
if starting_chapter != ChapterIndex.ALPINE and (world.is_dlc1() or world.is_dlc2()):
|
||||
index1 = 69
|
||||
index2 = 69
|
||||
pos: int
|
||||
@@ -165,7 +164,7 @@ def set_rules(world: "HatInTimeWorld"):
|
||||
if world.is_dlc1():
|
||||
index1 = chapter_list.index(ChapterIndex.CRUISE)
|
||||
|
||||
if world.is_dlc2() and final_chapter is not ChapterIndex.METRO:
|
||||
if world.is_dlc2() and final_chapter != ChapterIndex.METRO:
|
||||
index2 = chapter_list.index(ChapterIndex.METRO)
|
||||
|
||||
lowest_index = min(index1, index2)
|
||||
@@ -242,9 +241,6 @@ def set_rules(world: "HatInTimeWorld"):
|
||||
if not is_location_valid(world, key):
|
||||
continue
|
||||
|
||||
if key in contract_locations.keys():
|
||||
continue
|
||||
|
||||
loc = world.multiworld.get_location(key, world.player)
|
||||
|
||||
for hat in data.required_hats:
|
||||
@@ -256,7 +252,7 @@ def set_rules(world: "HatInTimeWorld"):
|
||||
if data.paintings > 0 and world.options.ShuffleSubconPaintings:
|
||||
add_rule(loc, lambda state, paintings=data.paintings: has_paintings(state, world, paintings))
|
||||
|
||||
if data.hit_type is not HitType.none and world.options.UmbrellaLogic:
|
||||
if data.hit_type != HitType.none and world.options.UmbrellaLogic:
|
||||
if data.hit_type == HitType.umbrella:
|
||||
add_rule(loc, lambda state: state.has("Umbrella", world.player))
|
||||
|
||||
@@ -518,7 +514,7 @@ def set_hard_rules(world: "HatInTimeWorld"):
|
||||
lambda state: can_use_hat(state, world, HatType.ICE))
|
||||
|
||||
# Hard: clear Rush Hour with Brewing Hat only
|
||||
if world.options.NoTicketSkips is not NoTicketSkips.option_true:
|
||||
if world.options.NoTicketSkips != NoTicketSkips.option_true:
|
||||
set_rule(world.multiworld.get_location("Act Completion (Rush Hour)", world.player),
|
||||
lambda state: can_use_hat(state, world, HatType.BREWING))
|
||||
else:
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
from BaseClasses import Item, ItemClassification, Tutorial, Location, MultiWorld
|
||||
from .Items import item_table, create_item, relic_groups, act_contracts, create_itempool, get_shop_trap_name, \
|
||||
calculate_yarn_costs
|
||||
calculate_yarn_costs, alps_hooks
|
||||
from .Regions import create_regions, randomize_act_entrances, chapter_act_info, create_events, get_shuffled_region
|
||||
from .Locations import location_table, contract_locations, is_location_valid, get_location_names, TASKSANITY_START_ID, \
|
||||
get_total_locations
|
||||
from .Rules import set_rules
|
||||
from .Rules import set_rules, has_paintings
|
||||
from .Options import AHITOptions, slot_data_options, adjust_options, RandomizeHatOrder, EndGoal, create_option_groups
|
||||
from .Types import HatType, ChapterIndex, HatInTimeItem, hat_type_to_item
|
||||
from .Types import HatType, ChapterIndex, HatInTimeItem, hat_type_to_item, Difficulty
|
||||
from .DeathWishLocations import create_dw_regions, dw_classes, death_wishes
|
||||
from .DeathWishRules import set_dw_rules, create_enemy_events, hit_list, bosses
|
||||
from worlds.AutoWorld import World, WebWorld, CollectionState
|
||||
from worlds.generic.Rules import add_rule
|
||||
from typing import List, Dict, TextIO
|
||||
from worlds.LauncherComponents import Component, components, icon_paths, launch_subprocess, Type
|
||||
from Utils import local_path
|
||||
@@ -86,19 +87,27 @@ class HatInTimeWorld(World):
|
||||
if self.is_dw_only():
|
||||
return
|
||||
|
||||
# If our starting chapter is 4 and act rando isn't on, force hookshot into inventory
|
||||
# If starting chapter is 3 and painting shuffle is enabled, and act rando isn't, give one free painting unlock
|
||||
start_chapter: ChapterIndex = ChapterIndex(self.options.StartingChapter)
|
||||
# Take care of some extremely restrictive starts in other chapters with act shuffle off
|
||||
if not self.options.ActRandomizer:
|
||||
start_chapter = self.options.StartingChapter
|
||||
if start_chapter == ChapterIndex.ALPINE:
|
||||
self.multiworld.push_precollected(self.create_item("Hookshot Badge"))
|
||||
if self.options.UmbrellaLogic:
|
||||
self.multiworld.push_precollected(self.create_item("Umbrella"))
|
||||
|
||||
if start_chapter == ChapterIndex.ALPINE or start_chapter == ChapterIndex.SUBCON:
|
||||
if not self.options.ActRandomizer:
|
||||
if start_chapter == ChapterIndex.ALPINE:
|
||||
self.multiworld.push_precollected(self.create_item("Hookshot Badge"))
|
||||
if self.options.UmbrellaLogic:
|
||||
self.multiworld.push_precollected(self.create_item("Umbrella"))
|
||||
|
||||
if start_chapter == ChapterIndex.SUBCON and self.options.ShuffleSubconPaintings:
|
||||
if self.options.ShuffleAlpineZiplines:
|
||||
ziplines = list(alps_hooks.keys())
|
||||
ziplines.remove("Zipline Unlock - The Twilight Bell Path") # not enough checks from this one
|
||||
self.multiworld.push_precollected(self.create_item(self.random.choice(ziplines)))
|
||||
elif start_chapter == ChapterIndex.SUBCON:
|
||||
if self.options.ShuffleSubconPaintings:
|
||||
self.multiworld.push_precollected(self.create_item("Progressive Painting Unlock"))
|
||||
elif start_chapter == ChapterIndex.BIRDS:
|
||||
if self.options.UmbrellaLogic:
|
||||
if self.options.LogicDifficulty < Difficulty.EXPERT:
|
||||
self.multiworld.push_precollected(self.create_item("Umbrella"))
|
||||
elif self.options.LogicDifficulty < Difficulty.MODERATE:
|
||||
self.multiworld.push_precollected(self.create_item("Umbrella"))
|
||||
|
||||
def create_regions(self):
|
||||
# noinspection PyClassVar
|
||||
@@ -119,7 +128,10 @@ class HatInTimeWorld(World):
|
||||
# place vanilla contract locations if contract shuffle is off
|
||||
if not self.options.ShuffleActContracts:
|
||||
for name in contract_locations.keys():
|
||||
self.multiworld.get_location(name, self.player).place_locked_item(create_item(self, name))
|
||||
loc = self.get_location(name)
|
||||
loc.place_locked_item(create_item(self, name))
|
||||
if self.options.ShuffleSubconPaintings and loc.name != "Snatcher's Contract - The Subcon Well":
|
||||
add_rule(loc, lambda state: has_paintings(state, self, 1))
|
||||
|
||||
def create_items(self):
|
||||
if self.has_yarn():
|
||||
@@ -317,7 +329,7 @@ class HatInTimeWorld(World):
|
||||
|
||||
def remove(self, state: "CollectionState", item: "Item") -> bool:
|
||||
old_count: int = state.count(item.name, self.player)
|
||||
change = super().collect(state, item)
|
||||
change = super().remove(state, item)
|
||||
if change and old_count == 1:
|
||||
if "Stamp" in item.name:
|
||||
if "2 Stamp" in item.name:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import typing
|
||||
|
||||
from BaseClasses import MultiWorld
|
||||
from Options import Choice, Range, Option, Toggle, DefaultOnToggle, DeathLink, \
|
||||
StartInventoryPool, PlandoBosses, PlandoConnections, PlandoTexts, FreeText, Removed
|
||||
from Options import Choice, Range, DeathLink, DefaultOnToggle, FreeText, ItemsAccessibility, Option, \
|
||||
PlandoBosses, PlandoConnections, PlandoTexts, Removed, StartInventoryPool, Toggle
|
||||
from .EntranceShuffle import default_connections, default_dungeon_connections, \
|
||||
inverted_default_connections, inverted_default_dungeon_connections
|
||||
from .Text import TextTable
|
||||
@@ -743,6 +743,7 @@ class ALttPPlandoTexts(PlandoTexts):
|
||||
|
||||
|
||||
alttp_options: typing.Dict[str, type(Option)] = {
|
||||
"accessibility": ItemsAccessibility,
|
||||
"plando_connections": ALttPPlandoConnections,
|
||||
"plando_texts": ALttPPlandoTexts,
|
||||
"start_inventory_from_pool": StartInventoryPool,
|
||||
|
||||
@@ -2,6 +2,7 @@ import collections
|
||||
import logging
|
||||
from typing import Iterator, Set
|
||||
|
||||
from Options import ItemsAccessibility
|
||||
from BaseClasses import Entrance, MultiWorld
|
||||
from worlds.generic.Rules import (add_item_rule, add_rule, forbid_item,
|
||||
item_name_in_location_names, location_item_name, set_rule, allow_self_locking_items)
|
||||
@@ -39,7 +40,7 @@ def set_rules(world):
|
||||
else:
|
||||
# Set access rules according to max glitches for multiworld progression.
|
||||
# Set accessibility to none, and shuffle assuming the no logic players can always win
|
||||
world.accessibility[player] = world.accessibility[player].from_text("minimal")
|
||||
world.accessibility[player].value = ItemsAccessibility.option_minimal
|
||||
world.progression_balancing[player].value = 0
|
||||
|
||||
else:
|
||||
@@ -377,7 +378,7 @@ def global_rules(multiworld: MultiWorld, player: int):
|
||||
or state.has("Cane of Somaria", player)))
|
||||
set_rule(multiworld.get_location('Tower of Hera - Big Chest', player), lambda state: state.has('Big Key (Tower of Hera)', player))
|
||||
set_rule(multiworld.get_location('Tower of Hera - Big Key Chest', player), lambda state: has_fire_source(state, player))
|
||||
if multiworld.accessibility[player] != 'locations':
|
||||
if multiworld.accessibility[player] != 'full':
|
||||
set_always_allow(multiworld.get_location('Tower of Hera - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Tower of Hera)' and item.player == player)
|
||||
|
||||
set_rule(multiworld.get_entrance('Swamp Palace Moat', player), lambda state: state.has('Flippers', player) and state.has('Open Floodgate', player))
|
||||
@@ -393,7 +394,7 @@ def global_rules(multiworld: MultiWorld, player: int):
|
||||
if state.has('Hookshot', player)
|
||||
else state._lttp_has_key('Small Key (Swamp Palace)', player, 4))
|
||||
set_rule(multiworld.get_location('Swamp Palace - Big Chest', player), lambda state: state.has('Big Key (Swamp Palace)', player))
|
||||
if multiworld.accessibility[player] != 'locations':
|
||||
if multiworld.accessibility[player] != 'full':
|
||||
allow_self_locking_items(multiworld.get_location('Swamp Palace - Big Chest', player), 'Big Key (Swamp Palace)')
|
||||
set_rule(multiworld.get_entrance('Swamp Palace (North)', player), lambda state: state.has('Hookshot', player) and state._lttp_has_key('Small Key (Swamp Palace)', player, 5))
|
||||
if not multiworld.small_key_shuffle[player] and multiworld.glitches_required[player] not in ['hybrid_major_glitches', 'no_logic']:
|
||||
@@ -423,7 +424,7 @@ def global_rules(multiworld: MultiWorld, player: int):
|
||||
set_rule(multiworld.get_entrance('Skull Woods First Section West Door', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
|
||||
set_rule(multiworld.get_entrance('Skull Woods First Section (Left) Door to Exit', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
|
||||
set_rule(multiworld.get_location('Skull Woods - Big Chest', player), lambda state: state.has('Big Key (Skull Woods)', player) and can_use_bombs(state, player))
|
||||
if multiworld.accessibility[player] != 'locations':
|
||||
if multiworld.accessibility[player] != 'full':
|
||||
allow_self_locking_items(multiworld.get_location('Skull Woods - Big Chest', player), 'Big Key (Skull Woods)')
|
||||
set_rule(multiworld.get_entrance('Skull Woods Torch Room', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 4) and state.has('Fire Rod', player) and has_sword(state, player)) # sword required for curtain
|
||||
add_rule(multiworld.get_location('Skull Woods - Prize', player), lambda state: state._lttp_has_key('Small Key (Skull Woods)', player, 5))
|
||||
@@ -522,12 +523,12 @@ def global_rules(multiworld: MultiWorld, player: int):
|
||||
|
||||
set_rule(multiworld.get_entrance('Palace of Darkness Big Key Chest Staircase', player), lambda state: can_use_bombs(state, player) and (state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or (
|
||||
location_item_name(state, 'Palace of Darkness - Big Key Chest', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 3))))
|
||||
if multiworld.accessibility[player] != 'locations':
|
||||
if multiworld.accessibility[player] != 'full':
|
||||
set_always_allow(multiworld.get_location('Palace of Darkness - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5))
|
||||
|
||||
set_rule(multiworld.get_entrance('Palace of Darkness Spike Statue Room Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6) or (
|
||||
location_item_name(state, 'Palace of Darkness - Harmless Hellway', player) in [('Small Key (Palace of Darkness)', player)] and state._lttp_has_key('Small Key (Palace of Darkness)', player, 4)))
|
||||
if multiworld.accessibility[player] != 'locations':
|
||||
if multiworld.accessibility[player] != 'full':
|
||||
set_always_allow(multiworld.get_location('Palace of Darkness - Harmless Hellway', player), lambda state, item: item.name == 'Small Key (Palace of Darkness)' and item.player == player and state._lttp_has_key('Small Key (Palace of Darkness)', player, 5))
|
||||
|
||||
set_rule(multiworld.get_entrance('Palace of Darkness Maze Door', player), lambda state: state._lttp_has_key('Small Key (Palace of Darkness)', player, 6))
|
||||
@@ -1200,7 +1201,7 @@ def set_trock_key_rules(world, player):
|
||||
# Must not go in the Chain Chomps chest - only 2 other chests available and 3+ keys required for all other chests
|
||||
forbid_item(world.get_location('Turtle Rock - Chain Chomps', player), 'Big Key (Turtle Rock)', player)
|
||||
forbid_item(world.get_location('Turtle Rock - Pokey 2 Key Drop', player), 'Big Key (Turtle Rock)', player)
|
||||
if world.accessibility[player] == 'locations':
|
||||
if world.accessibility[player] == 'full':
|
||||
if world.big_key_shuffle[player] and can_reach_big_chest:
|
||||
# Must not go in the dungeon - all 3 available chests (Chomps, Big Chest, Crystaroller) must be keys to access laser bridge, and the big key is required first
|
||||
for location in ['Turtle Rock - Chain Chomps', 'Turtle Rock - Compass Chest',
|
||||
@@ -1214,7 +1215,7 @@ def set_trock_key_rules(world, player):
|
||||
location.place_locked_item(item)
|
||||
toss_junk_item(world, player)
|
||||
|
||||
if world.accessibility[player] != 'locations':
|
||||
if world.accessibility[player] != 'full':
|
||||
set_always_allow(world.get_location('Turtle Rock - Big Key Chest', player), lambda state, item: item.name == 'Small Key (Turtle Rock)' and item.player == player
|
||||
and state.can_reach(state.multiworld.get_region('Turtle Rock (Second Section)', player)))
|
||||
|
||||
|
||||
@@ -76,10 +76,6 @@ class ALttPItem(Item):
|
||||
if self.type in {"SmallKey", "BigKey", "Map", "Compass"}:
|
||||
return self.type
|
||||
|
||||
@property
|
||||
def locked_dungeon_item(self):
|
||||
return self.location.locked and self.dungeon_item
|
||||
|
||||
|
||||
class LTTPRegionType(IntEnum):
|
||||
LightWorld = 1
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool
|
||||
from worlds.alttp.Dungeons import get_dungeon_item_pool
|
||||
from worlds.alttp.EntranceShuffle import link_inverted_entrances
|
||||
from worlds.alttp.InvertedRegions import create_inverted_regions
|
||||
from worlds.alttp.ItemPool import difficulties
|
||||
from worlds.alttp.Items import item_factory
|
||||
from worlds.alttp.Regions import mark_light_world_regions
|
||||
from worlds.alttp.Shops import create_shops
|
||||
from test.TestBase import TestBase
|
||||
from test.bases import TestBase
|
||||
|
||||
from worlds.alttp.test import LTTPTestBase
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from worlds.alttp.Items import item_factory
|
||||
from worlds.alttp.Options import GlitchesRequired
|
||||
from worlds.alttp.Regions import mark_light_world_regions
|
||||
from worlds.alttp.Shops import create_shops
|
||||
from test.TestBase import TestBase
|
||||
from test.bases import TestBase
|
||||
|
||||
from worlds.alttp.test import LTTPTestBase
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from worlds.alttp.Items import item_factory
|
||||
from worlds.alttp.Options import GlitchesRequired
|
||||
from worlds.alttp.Regions import mark_light_world_regions
|
||||
from worlds.alttp.Shops import create_shops
|
||||
from test.TestBase import TestBase
|
||||
from test.bases import TestBase
|
||||
|
||||
from worlds.alttp.test import LTTPTestBase
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ item_table = {
|
||||
"Mutant Costume": ItemData(698020, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mutant_costume
|
||||
"Baby Nautilus": ItemData(698021, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_nautilus
|
||||
"Baby Piranha": ItemData(698022, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_piranha
|
||||
"Arnassi Armor": ItemData(698023, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_seahorse_costume
|
||||
"Arnassi Armor": ItemData(698023, 1, ItemType.PROGRESSION, ItemGroup.UTILITY), # collectible_seahorse_costume
|
||||
"Seed Bag": ItemData(698024, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_seed_bag
|
||||
"King's Skull": ItemData(698025, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_skull
|
||||
"Song Plant Spore": ItemData(698026, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_spore_seed
|
||||
|
||||
@@ -45,7 +45,7 @@ class AquariaLocations:
|
||||
"Home Water, bulb below the grouper fish": 698058,
|
||||
"Home Water, bulb in the path below Nautilus Prime": 698059,
|
||||
"Home Water, bulb in the little room above the grouper fish": 698060,
|
||||
"Home Water, bulb in the end of the left path from the Verse Cave": 698061,
|
||||
"Home Water, bulb in the end of the path close to the Verse Cave": 698061,
|
||||
"Home Water, bulb in the top left path": 698062,
|
||||
"Home Water, bulb in the bottom left room": 698063,
|
||||
"Home Water, bulb close to Naija's Home": 698064,
|
||||
@@ -67,7 +67,7 @@ class AquariaLocations:
|
||||
|
||||
locations_song_cave = {
|
||||
"Song Cave, Erulian spirit": 698206,
|
||||
"Song Cave, bulb in the top left part": 698071,
|
||||
"Song Cave, bulb in the top right part": 698071,
|
||||
"Song Cave, bulb in the big anemone room": 698072,
|
||||
"Song Cave, bulb in the path to the singing statues": 698073,
|
||||
"Song Cave, bulb under the rock in the path to the singing statues": 698074,
|
||||
@@ -152,6 +152,9 @@ class AquariaLocations:
|
||||
|
||||
locations_arnassi_path = {
|
||||
"Arnassi Ruins, Arnassi Statue": 698164,
|
||||
}
|
||||
|
||||
locations_arnassi_cave_transturtle = {
|
||||
"Arnassi Ruins, Transturtle": 698217,
|
||||
}
|
||||
|
||||
@@ -269,9 +272,12 @@ class AquariaLocations:
|
||||
}
|
||||
|
||||
locations_forest_bl = {
|
||||
"Kelp Forest bottom left area, Transturtle": 698212,
|
||||
}
|
||||
|
||||
locations_forest_bl_sc = {
|
||||
"Kelp Forest bottom left area, bulb close to the spirit crystals": 698054,
|
||||
"Kelp Forest bottom left area, Walker Baby": 698186,
|
||||
"Kelp Forest bottom left area, Transturtle": 698212,
|
||||
}
|
||||
|
||||
locations_forest_br = {
|
||||
@@ -370,7 +376,7 @@ class AquariaLocations:
|
||||
|
||||
locations_sun_temple_r = {
|
||||
"Sun Temple, first bulb of the temple": 698091,
|
||||
"Sun Temple, bulb on the left part": 698092,
|
||||
"Sun Temple, bulb on the right part": 698092,
|
||||
"Sun Temple, bulb in the hidden room of the right part": 698093,
|
||||
"Sun Temple, Sun Key": 698182,
|
||||
}
|
||||
@@ -402,6 +408,9 @@ class AquariaLocations:
|
||||
"Abyss right area, bulb in the middle path": 698110,
|
||||
"Abyss right area, bulb behind the rock in the middle path": 698111,
|
||||
"Abyss right area, bulb in the left green room": 698112,
|
||||
}
|
||||
|
||||
locations_abyss_r_transturtle = {
|
||||
"Abyss right area, Transturtle": 698214,
|
||||
}
|
||||
|
||||
@@ -499,6 +508,7 @@ location_table = {
|
||||
**AquariaLocations.locations_skeleton_path_sc,
|
||||
**AquariaLocations.locations_arnassi,
|
||||
**AquariaLocations.locations_arnassi_path,
|
||||
**AquariaLocations.locations_arnassi_cave_transturtle,
|
||||
**AquariaLocations.locations_arnassi_crab_boss,
|
||||
**AquariaLocations.locations_sun_temple_l,
|
||||
**AquariaLocations.locations_sun_temple_r,
|
||||
@@ -509,6 +519,7 @@ location_table = {
|
||||
**AquariaLocations.locations_abyss_l,
|
||||
**AquariaLocations.locations_abyss_lb,
|
||||
**AquariaLocations.locations_abyss_r,
|
||||
**AquariaLocations.locations_abyss_r_transturtle,
|
||||
**AquariaLocations.locations_energy_temple_1,
|
||||
**AquariaLocations.locations_energy_temple_2,
|
||||
**AquariaLocations.locations_energy_temple_3,
|
||||
@@ -530,6 +541,7 @@ location_table = {
|
||||
**AquariaLocations.locations_forest_tr,
|
||||
**AquariaLocations.locations_forest_tr_fp,
|
||||
**AquariaLocations.locations_forest_bl,
|
||||
**AquariaLocations.locations_forest_bl_sc,
|
||||
**AquariaLocations.locations_forest_br,
|
||||
**AquariaLocations.locations_forest_boss,
|
||||
**AquariaLocations.locations_forest_boss_entrance,
|
||||
|
||||
@@ -14,97 +14,112 @@ from worlds.generic.Rules import add_rule, set_rule
|
||||
|
||||
# Every condition to connect regions
|
||||
|
||||
def _has_hot_soup(state:CollectionState, player: int) -> bool:
|
||||
def _has_hot_soup(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the hotsoup item"""
|
||||
return state.has("Hot soup", player)
|
||||
return state.has_any({"Hot soup", "Hot soup x 2"}, player)
|
||||
|
||||
|
||||
def _has_tongue_cleared(state:CollectionState, player: int) -> bool:
|
||||
def _has_tongue_cleared(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the Body tongue cleared item"""
|
||||
return state.has("Body tongue cleared", player)
|
||||
|
||||
|
||||
def _has_sun_crystal(state:CollectionState, player: int) -> bool:
|
||||
def _has_sun_crystal(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the Sun crystal item"""
|
||||
return state.has("Has sun crystal", player) and _has_bind_song(state, player)
|
||||
|
||||
|
||||
def _has_li(state:CollectionState, player: int) -> bool:
|
||||
def _has_li(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has Li in its team"""
|
||||
return state.has("Li and Li song", player)
|
||||
|
||||
|
||||
def _has_damaging_item(state:CollectionState, player: int) -> bool:
|
||||
def _has_damaging_item(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the shield song item"""
|
||||
return state.has_any({"Energy form", "Nature form", "Beast form", "Li and Li song", "Baby Nautilus",
|
||||
"Baby Piranha", "Baby Blaster"}, player)
|
||||
return state.has_any({"Energy form", "Nature form", "Beast form", "Li and Li song", "Baby Nautilus",
|
||||
"Baby Piranha", "Baby Blaster"}, player)
|
||||
|
||||
|
||||
def _has_shield_song(state:CollectionState, player: int) -> bool:
|
||||
def _has_energy_attack_item(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has items that can do a lot of damage (enough to beat bosses)"""
|
||||
return _has_energy_form(state, player) or _has_dual_form(state, player)
|
||||
|
||||
|
||||
def _has_shield_song(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the shield song item"""
|
||||
return state.has("Shield song", player)
|
||||
|
||||
|
||||
def _has_bind_song(state:CollectionState, player: int) -> bool:
|
||||
def _has_bind_song(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the bind song item"""
|
||||
return state.has("Bind song", player)
|
||||
|
||||
|
||||
def _has_energy_form(state:CollectionState, player: int) -> bool:
|
||||
def _has_energy_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the energy form item"""
|
||||
return state.has("Energy form", player)
|
||||
|
||||
|
||||
def _has_beast_form(state:CollectionState, player: int) -> bool:
|
||||
def _has_beast_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the beast form item"""
|
||||
return state.has("Beast form", player)
|
||||
|
||||
|
||||
def _has_nature_form(state:CollectionState, player: int) -> bool:
|
||||
def _has_beast_and_soup_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the beast form item"""
|
||||
return _has_beast_form(state, player) and _has_hot_soup(state, player)
|
||||
|
||||
|
||||
def _has_beast_form_or_arnassi_armor(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the beast form item"""
|
||||
return _has_beast_form(state, player) or state.has("Arnassi Armor", player)
|
||||
|
||||
|
||||
def _has_nature_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the nature form item"""
|
||||
return state.has("Nature form", player)
|
||||
|
||||
|
||||
def _has_sun_form(state:CollectionState, player: int) -> bool:
|
||||
def _has_sun_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the sun form item"""
|
||||
return state.has("Sun form", player)
|
||||
|
||||
|
||||
def _has_light(state:CollectionState, player: int) -> bool:
|
||||
def _has_light(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the light item"""
|
||||
return state.has("Baby Dumbo", player) or _has_sun_form(state, player)
|
||||
|
||||
|
||||
def _has_dual_form(state:CollectionState, player: int) -> bool:
|
||||
def _has_dual_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the dual form item"""
|
||||
return _has_li(state, player) and state.has("Dual form", player)
|
||||
|
||||
|
||||
def _has_fish_form(state:CollectionState, player: int) -> bool:
|
||||
def _has_fish_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the fish form item"""
|
||||
return state.has("Fish form", player)
|
||||
|
||||
|
||||
def _has_spirit_form(state:CollectionState, player: int) -> bool:
|
||||
def _has_spirit_form(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has the spirit form item"""
|
||||
return state.has("Spirit form", player)
|
||||
|
||||
|
||||
def _has_big_bosses(state:CollectionState, player: int) -> bool:
|
||||
def _has_big_bosses(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has beated every big bosses"""
|
||||
return state.has_all({"Fallen God beated", "Mithalan God beated", "Drunian God beated",
|
||||
"Sun God beated", "The Golem beated"}, player)
|
||||
"Sun God beated", "The Golem beated"}, player)
|
||||
|
||||
|
||||
def _has_mini_bosses(state:CollectionState, player: int) -> bool:
|
||||
def _has_mini_bosses(state: CollectionState, player: int) -> bool:
|
||||
"""`player` in `state` has beated every big bosses"""
|
||||
return state.has_all({"Nautilus Prime beated", "Blaster Peg Prime beated", "Mergog beated",
|
||||
"Mithalan priests beated", "Octopus Prime beated", "Crabbius Maximus beated",
|
||||
"Mantis Shrimp Prime beated", "King Jellyfish God Prime beated"}, player)
|
||||
"Mithalan priests beated", "Octopus Prime beated", "Crabbius Maximus beated",
|
||||
"Mantis Shrimp Prime beated", "King Jellyfish God Prime beated"}, player)
|
||||
|
||||
|
||||
def _has_secrets(state:CollectionState, player: int) -> bool:
|
||||
return state.has_all({"First secret obtained", "Second secret obtained", "Third secret obtained"},player)
|
||||
def _has_secrets(state: CollectionState, player: int) -> bool:
|
||||
return state.has_all({"First secret obtained", "Second secret obtained", "Third secret obtained"}, player)
|
||||
|
||||
|
||||
class AquariaRegions:
|
||||
@@ -134,6 +149,7 @@ class AquariaRegions:
|
||||
skeleton_path: Region
|
||||
skeleton_path_sc: Region
|
||||
arnassi: Region
|
||||
arnassi_cave_transturtle: Region
|
||||
arnassi_path: Region
|
||||
arnassi_crab_boss: Region
|
||||
simon: Region
|
||||
@@ -152,6 +168,7 @@ class AquariaRegions:
|
||||
forest_tr: Region
|
||||
forest_tr_fp: Region
|
||||
forest_bl: Region
|
||||
forest_bl_sc: Region
|
||||
forest_br: Region
|
||||
forest_boss: Region
|
||||
forest_boss_entrance: Region
|
||||
@@ -179,6 +196,7 @@ class AquariaRegions:
|
||||
abyss_l: Region
|
||||
abyss_lb: Region
|
||||
abyss_r: Region
|
||||
abyss_r_transturtle: Region
|
||||
ice_cave: Region
|
||||
bubble_cave: Region
|
||||
bubble_cave_boss: Region
|
||||
@@ -213,7 +231,7 @@ class AquariaRegions:
|
||||
"""
|
||||
|
||||
def __add_region(self, hint: str,
|
||||
locations: Optional[Dict[str, Optional[int]]]) -> Region:
|
||||
locations: Optional[Dict[str, int]]) -> Region:
|
||||
"""
|
||||
Create a new Region, add it to the `world` regions and return it.
|
||||
Be aware that this function have a side effect on ``world`.`regions`
|
||||
@@ -236,7 +254,7 @@ class AquariaRegions:
|
||||
self.home_water_nautilus = self.__add_region("Home Water, Nautilus nest",
|
||||
AquariaLocations.locations_home_water_nautilus)
|
||||
self.home_water_transturtle = self.__add_region("Home Water, turtle room",
|
||||
AquariaLocations.locations_home_water_transturtle)
|
||||
AquariaLocations.locations_home_water_transturtle)
|
||||
self.naija_home = self.__add_region("Naija's Home", AquariaLocations.locations_naija_home)
|
||||
self.song_cave = self.__add_region("Song Cave", AquariaLocations.locations_song_cave)
|
||||
|
||||
@@ -280,6 +298,8 @@ class AquariaRegions:
|
||||
self.arnassi = self.__add_region("Arnassi Ruins", AquariaLocations.locations_arnassi)
|
||||
self.arnassi_path = self.__add_region("Arnassi Ruins, back entrance path",
|
||||
AquariaLocations.locations_arnassi_path)
|
||||
self.arnassi_cave_transturtle = self.__add_region("Arnassi Ruins, transturtle area",
|
||||
AquariaLocations.locations_arnassi_cave_transturtle)
|
||||
self.arnassi_crab_boss = self.__add_region("Arnassi Ruins, Crabbius Maximus lair",
|
||||
AquariaLocations.locations_arnassi_crab_boss)
|
||||
|
||||
@@ -302,9 +322,9 @@ class AquariaRegions:
|
||||
AquariaLocations.locations_cathedral_r)
|
||||
self.cathedral_underground = self.__add_region("Mithalas Cathedral underground",
|
||||
AquariaLocations.locations_cathedral_underground)
|
||||
self.cathedral_boss_r = self.__add_region("Mithalas Cathedral, Mithalan God room",
|
||||
self.cathedral_boss_r = self.__add_region("Mithalas Cathedral, Mithalan God room", None)
|
||||
self.cathedral_boss_l = self.__add_region("Mithalas Cathedral, after Mithalan God room",
|
||||
AquariaLocations.locations_cathedral_boss)
|
||||
self.cathedral_boss_l = self.__add_region("Mithalas Cathedral, after Mithalan God room", None)
|
||||
|
||||
def __create_forest(self) -> None:
|
||||
"""
|
||||
@@ -320,6 +340,8 @@ class AquariaRegions:
|
||||
AquariaLocations.locations_forest_tr_fp)
|
||||
self.forest_bl = self.__add_region("Kelp Forest bottom left area",
|
||||
AquariaLocations.locations_forest_bl)
|
||||
self.forest_bl_sc = self.__add_region("Kelp Forest bottom left area, spirit crystals",
|
||||
AquariaLocations.locations_forest_bl_sc)
|
||||
self.forest_br = self.__add_region("Kelp Forest bottom right area",
|
||||
AquariaLocations.locations_forest_br)
|
||||
self.forest_sprite_cave = self.__add_region("Kelp Forest spirit cave",
|
||||
@@ -375,9 +397,9 @@ class AquariaRegions:
|
||||
self.sun_temple_r = self.__add_region("Sun Temple right area",
|
||||
AquariaLocations.locations_sun_temple_r)
|
||||
self.sun_temple_boss_path = self.__add_region("Sun Temple before boss area",
|
||||
AquariaLocations.locations_sun_temple_boss_path)
|
||||
AquariaLocations.locations_sun_temple_boss_path)
|
||||
self.sun_temple_boss = self.__add_region("Sun Temple boss area",
|
||||
AquariaLocations.locations_sun_temple_boss)
|
||||
AquariaLocations.locations_sun_temple_boss)
|
||||
|
||||
def __create_abyss(self) -> None:
|
||||
"""
|
||||
@@ -388,6 +410,8 @@ class AquariaRegions:
|
||||
AquariaLocations.locations_abyss_l)
|
||||
self.abyss_lb = self.__add_region("Abyss left bottom area", AquariaLocations.locations_abyss_lb)
|
||||
self.abyss_r = self.__add_region("Abyss right area", AquariaLocations.locations_abyss_r)
|
||||
self.abyss_r_transturtle = self.__add_region("Abyss right area, transturtle",
|
||||
AquariaLocations.locations_abyss_r_transturtle)
|
||||
self.ice_cave = self.__add_region("Ice Cave", AquariaLocations.locations_ice_cave)
|
||||
self.bubble_cave = self.__add_region("Bubble Cave", AquariaLocations.locations_bubble_cave)
|
||||
self.bubble_cave_boss = self.__add_region("Bubble Cave boss area", AquariaLocations.locations_bubble_cave_boss)
|
||||
@@ -407,7 +431,7 @@ class AquariaRegions:
|
||||
self.sunken_city_r = self.__add_region("Sunken City right area",
|
||||
AquariaLocations.locations_sunken_city_r)
|
||||
self.sunken_city_boss = self.__add_region("Sunken City boss area",
|
||||
AquariaLocations.locations_sunken_city_boss)
|
||||
AquariaLocations.locations_sunken_city_boss)
|
||||
|
||||
def __create_body(self) -> None:
|
||||
"""
|
||||
@@ -427,7 +451,7 @@ class AquariaRegions:
|
||||
self.final_boss_tube = self.__add_region("The Body, final boss area turtle room",
|
||||
AquariaLocations.locations_final_boss_tube)
|
||||
self.final_boss = self.__add_region("The Body, final boss",
|
||||
AquariaLocations.locations_final_boss)
|
||||
AquariaLocations.locations_final_boss)
|
||||
self.final_boss_end = self.__add_region("The Body, final boss area", None)
|
||||
|
||||
def __connect_one_way_regions(self, source_name: str, destination_name: str,
|
||||
@@ -455,8 +479,8 @@ class AquariaRegions:
|
||||
"""
|
||||
Connect entrances of the different regions around `home_water`
|
||||
"""
|
||||
self.__connect_regions("Menu", "Verse Cave right area",
|
||||
self.menu, self.verse_cave_r)
|
||||
self.__connect_one_way_regions("Menu", "Verse Cave right area",
|
||||
self.menu, self.verse_cave_r)
|
||||
self.__connect_regions("Verse Cave left area", "Verse Cave right area",
|
||||
self.verse_cave_l, self.verse_cave_r)
|
||||
self.__connect_regions("Verse Cave", "Home Water", self.verse_cave_l, self.home_water)
|
||||
@@ -464,7 +488,8 @@ class AquariaRegions:
|
||||
self.__connect_regions("Home Water", "Song Cave", self.home_water, self.song_cave)
|
||||
self.__connect_regions("Home Water", "Home Water, nautilus nest",
|
||||
self.home_water, self.home_water_nautilus,
|
||||
lambda state: _has_energy_form(state, self.player) and _has_bind_song(state, self.player))
|
||||
lambda state: _has_energy_attack_item(state, self.player) and
|
||||
_has_bind_song(state, self.player))
|
||||
self.__connect_regions("Home Water", "Home Water transturtle room",
|
||||
self.home_water, self.home_water_transturtle)
|
||||
self.__connect_regions("Home Water", "Energy Temple first area",
|
||||
@@ -472,7 +497,7 @@ class AquariaRegions:
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
self.__connect_regions("Home Water", "Energy Temple_altar",
|
||||
self.home_water, self.energy_temple_altar,
|
||||
lambda state: _has_energy_form(state, self.player) and
|
||||
lambda state: _has_energy_attack_item(state, self.player) and
|
||||
_has_bind_song(state, self.player))
|
||||
self.__connect_regions("Energy Temple first area", "Energy Temple second area",
|
||||
self.energy_temple_1, self.energy_temple_2,
|
||||
@@ -482,28 +507,28 @@ class AquariaRegions:
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
self.__connect_regions("Energy Temple idol room", "Energy Temple boss area",
|
||||
self.energy_temple_idol, self.energy_temple_boss,
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
lambda state: _has_energy_attack_item(state, self.player) and
|
||||
_has_fish_form(state, self.player))
|
||||
self.__connect_one_way_regions("Energy Temple first area", "Energy Temple boss area",
|
||||
self.energy_temple_1, self.energy_temple_boss,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_one_way_regions("Energy Temple boss area", "Energy Temple first area",
|
||||
self.energy_temple_boss, self.energy_temple_1,
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
lambda state: _has_energy_attack_item(state, self.player))
|
||||
self.__connect_regions("Energy Temple second area", "Energy Temple third area",
|
||||
self.energy_temple_2, self.energy_temple_3,
|
||||
lambda state: _has_bind_song(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
self.__connect_regions("Energy Temple boss area", "Energy Temple blaster room",
|
||||
self.energy_temple_boss, self.energy_temple_blaster_room,
|
||||
lambda state: _has_nature_form(state, self.player) and
|
||||
_has_bind_song(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_regions("Energy Temple first area", "Energy Temple blaster room",
|
||||
self.energy_temple_1, self.energy_temple_blaster_room,
|
||||
lambda state: _has_nature_form(state, self.player) and
|
||||
_has_bind_song(state, self.player) and
|
||||
_has_energy_form(state, self.player) and
|
||||
_has_energy_attack_item(state, self.player) and
|
||||
_has_beast_form(state, self.player))
|
||||
self.__connect_regions("Home Water", "Open Water top left area",
|
||||
self.home_water, self.openwater_tl)
|
||||
@@ -520,7 +545,7 @@ class AquariaRegions:
|
||||
self.openwater_tl, self.forest_br)
|
||||
self.__connect_regions("Open Water top right area", "Open Water top right area, turtle room",
|
||||
self.openwater_tr, self.openwater_tr_turtle,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
|
||||
self.__connect_regions("Open Water top right area", "Open Water bottom right area",
|
||||
self.openwater_tr, self.openwater_br)
|
||||
self.__connect_regions("Open Water top right area", "Mithalas City",
|
||||
@@ -529,10 +554,9 @@ class AquariaRegions:
|
||||
self.openwater_tr, self.veil_bl)
|
||||
self.__connect_one_way_regions("Open Water top right area", "Veil bottom right",
|
||||
self.openwater_tr, self.veil_br,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
|
||||
self.__connect_one_way_regions("Veil bottom right", "Open Water top right area",
|
||||
self.veil_br, self.openwater_tr,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
self.veil_br, self.openwater_tr)
|
||||
self.__connect_regions("Open Water bottom left area", "Open Water bottom right area",
|
||||
self.openwater_bl, self.openwater_br)
|
||||
self.__connect_regions("Open Water bottom left area", "Skeleton path",
|
||||
@@ -551,10 +575,14 @@ class AquariaRegions:
|
||||
self.arnassi, self.openwater_br)
|
||||
self.__connect_regions("Arnassi", "Arnassi path",
|
||||
self.arnassi, self.arnassi_path)
|
||||
self.__connect_regions("Arnassi ruins, transturtle area", "Arnassi path",
|
||||
self.arnassi_cave_transturtle, self.arnassi_path,
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
self.__connect_one_way_regions("Arnassi path", "Arnassi crab boss area",
|
||||
self.arnassi_path, self.arnassi_crab_boss,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
lambda state: _has_beast_form_or_arnassi_armor(state, self.player) and
|
||||
(_has_energy_attack_item(state, self.player) or
|
||||
_has_nature_form(state, self.player)))
|
||||
self.__connect_one_way_regions("Arnassi crab boss area", "Arnassi path",
|
||||
self.arnassi_crab_boss, self.arnassi_path)
|
||||
|
||||
@@ -564,61 +592,62 @@ class AquariaRegions:
|
||||
"""
|
||||
self.__connect_one_way_regions("Mithalas City", "Mithalas City top path",
|
||||
self.mithalas_city, self.mithalas_city_top_path,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas City_top_path", "Mithalas City",
|
||||
self.mithalas_city_top_path, self.mithalas_city)
|
||||
self.__connect_regions("Mithalas City", "Mithalas City home with fishpass",
|
||||
self.mithalas_city, self.mithalas_city_fishpass,
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
self.__connect_regions("Mithalas City", "Mithalas castle",
|
||||
self.mithalas_city, self.cathedral_l,
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
self.mithalas_city, self.cathedral_l)
|
||||
self.__connect_one_way_regions("Mithalas City top path", "Mithalas castle, flower tube",
|
||||
self.mithalas_city_top_path,
|
||||
self.cathedral_l_tube,
|
||||
lambda state: _has_nature_form(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas castle, flower tube area", "Mithalas City top path",
|
||||
self.cathedral_l_tube,
|
||||
self.mithalas_city_top_path,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_nature_form(state, self.player))
|
||||
lambda state: _has_nature_form(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas castle flower tube area", "Mithalas castle, spirit crystals",
|
||||
self.cathedral_l_tube, self.cathedral_l_sc,
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
self.cathedral_l_tube, self.cathedral_l_sc,
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas castle_flower tube area", "Mithalas castle",
|
||||
self.cathedral_l_tube, self.cathedral_l,
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
self.cathedral_l_tube, self.cathedral_l,
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
self.__connect_regions("Mithalas castle", "Mithalas castle, spirit crystals",
|
||||
self.cathedral_l, self.cathedral_l_sc,
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
self.__connect_regions("Mithalas castle", "Cathedral boss left area",
|
||||
self.cathedral_l, self.cathedral_boss_l,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_energy_form(state, self.player) and
|
||||
_has_bind_song(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas castle", "Cathedral boss right area",
|
||||
self.cathedral_l, self.cathedral_boss_r,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
self.__connect_one_way_regions("Cathedral boss left area", "Mithalas castle",
|
||||
self.cathedral_boss_l, self.cathedral_l,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
self.__connect_regions("Mithalas castle", "Mithalas Cathedral underground",
|
||||
self.cathedral_l, self.cathedral_underground,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_bind_song(state, self.player))
|
||||
self.__connect_regions("Mithalas castle", "Mithalas Cathedral",
|
||||
self.cathedral_l, self.cathedral_r,
|
||||
lambda state: _has_bind_song(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
self.__connect_regions("Mithalas Cathedral", "Mithalas Cathedral underground",
|
||||
self.cathedral_r, self.cathedral_underground,
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas Cathedral underground", "Cathedral boss left area",
|
||||
self.cathedral_underground, self.cathedral_boss_r,
|
||||
lambda state: _has_energy_form(state, self.player) and
|
||||
_has_bind_song(state, self.player))
|
||||
self.__connect_one_way_regions("Cathedral boss left area", "Mithalas Cathedral underground",
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas castle", "Mithalas Cathedral",
|
||||
self.cathedral_l, self.cathedral_r,
|
||||
lambda state: _has_bind_song(state, self.player) and
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas Cathedral", "Mithalas Cathedral underground",
|
||||
self.cathedral_r, self.cathedral_underground)
|
||||
self.__connect_one_way_regions("Mithalas Cathedral underground", "Mithalas Cathedral",
|
||||
self.cathedral_underground, self.cathedral_r,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_one_way_regions("Mithalas Cathedral underground", "Cathedral boss right area",
|
||||
self.cathedral_underground, self.cathedral_boss_r)
|
||||
self.__connect_one_way_regions("Cathedral boss right area", "Mithalas Cathedral underground",
|
||||
self.cathedral_boss_r, self.cathedral_underground,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
self.__connect_regions("Cathedral boss right area", "Cathedral boss left area",
|
||||
self.__connect_one_way_regions("Cathedral boss right area", "Cathedral boss left area",
|
||||
self.cathedral_boss_r, self.cathedral_boss_l,
|
||||
lambda state: _has_bind_song(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_one_way_regions("Cathedral boss left area", "Cathedral boss right area",
|
||||
self.cathedral_boss_l, self.cathedral_boss_r)
|
||||
|
||||
def __connect_forest_regions(self) -> None:
|
||||
"""
|
||||
@@ -628,6 +657,12 @@ class AquariaRegions:
|
||||
self.forest_br, self.veil_bl)
|
||||
self.__connect_regions("Forest bottom right", "Forest bottom left area",
|
||||
self.forest_br, self.forest_bl)
|
||||
self.__connect_one_way_regions("Forest bottom left area", "Forest bottom left area, spirit crystals",
|
||||
self.forest_bl, self.forest_bl_sc,
|
||||
lambda state: _has_energy_attack_item(state, self.player) or
|
||||
_has_fish_form(state, self.player))
|
||||
self.__connect_one_way_regions("Forest bottom left area, spirit crystals", "Forest bottom left area",
|
||||
self.forest_bl_sc, self.forest_bl)
|
||||
self.__connect_regions("Forest bottom right", "Forest top right area",
|
||||
self.forest_br, self.forest_tr)
|
||||
self.__connect_regions("Forest bottom left area", "Forest fish cave",
|
||||
@@ -641,7 +676,7 @@ class AquariaRegions:
|
||||
self.forest_tl, self.forest_tl_fp,
|
||||
lambda state: _has_nature_form(state, self.player) and
|
||||
_has_bind_song(state, self.player) and
|
||||
_has_energy_form(state, self.player) and
|
||||
_has_energy_attack_item(state, self.player) and
|
||||
_has_fish_form(state, self.player))
|
||||
self.__connect_regions("Forest top left area", "Forest top right area",
|
||||
self.forest_tl, self.forest_tr)
|
||||
@@ -649,7 +684,7 @@ class AquariaRegions:
|
||||
self.forest_tl, self.forest_boss_entrance)
|
||||
self.__connect_regions("Forest boss area", "Forest boss entrance",
|
||||
self.forest_boss, self.forest_boss_entrance,
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
lambda state: _has_energy_attack_item(state, self.player))
|
||||
self.__connect_regions("Forest top right area", "Forest top right area fish pass",
|
||||
self.forest_tr, self.forest_tr_fp,
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
@@ -663,7 +698,7 @@ class AquariaRegions:
|
||||
self.__connect_regions("Fermog cave", "Fermog boss",
|
||||
self.mermog_cave, self.mermog_boss,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
_has_energy_attack_item(state, self.player))
|
||||
|
||||
def __connect_veil_regions(self) -> None:
|
||||
"""
|
||||
@@ -681,8 +716,7 @@ class AquariaRegions:
|
||||
self.veil_b_sc, self.veil_br,
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
self.__connect_regions("Veil bottom right", "Veil top left area",
|
||||
self.veil_br, self.veil_tl,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
self.veil_br, self.veil_tl)
|
||||
self.__connect_regions("Veil top left area", "Veil_top left area, fish pass",
|
||||
self.veil_tl, self.veil_tl_fp,
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
@@ -691,20 +725,25 @@ class AquariaRegions:
|
||||
self.__connect_regions("Veil top left area", "Turtle cave",
|
||||
self.veil_tl, self.turtle_cave)
|
||||
self.__connect_regions("Turtle cave", "Turtle cave Bubble Cliff",
|
||||
self.turtle_cave, self.turtle_cave_bubble,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
self.turtle_cave, self.turtle_cave_bubble)
|
||||
self.__connect_regions("Veil right of sun temple", "Sun Temple right area",
|
||||
self.veil_tr_r, self.sun_temple_r)
|
||||
self.__connect_regions("Sun Temple right area", "Sun Temple left area",
|
||||
self.sun_temple_r, self.sun_temple_l,
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
self.__connect_one_way_regions("Sun Temple right area", "Sun Temple left area",
|
||||
self.sun_temple_r, self.sun_temple_l,
|
||||
lambda state: _has_bind_song(state, self.player) or
|
||||
_has_light(state, self.player))
|
||||
self.__connect_one_way_regions("Sun Temple left area", "Sun Temple right area",
|
||||
self.sun_temple_l, self.sun_temple_r,
|
||||
lambda state: _has_light(state, self.player))
|
||||
self.__connect_regions("Sun Temple left area", "Veil left of sun temple",
|
||||
self.sun_temple_l, self.veil_tr_l)
|
||||
self.__connect_regions("Sun Temple left area", "Sun Temple before boss area",
|
||||
self.sun_temple_l, self.sun_temple_boss_path)
|
||||
self.sun_temple_l, self.sun_temple_boss_path,
|
||||
lambda state: _has_light(state, self.player) or
|
||||
_has_sun_crystal(state, self.player))
|
||||
self.__connect_regions("Sun Temple before boss area", "Sun Temple boss area",
|
||||
self.sun_temple_boss_path, self.sun_temple_boss,
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
lambda state: _has_energy_attack_item(state, self.player))
|
||||
self.__connect_one_way_regions("Sun Temple boss area", "Veil left of sun temple",
|
||||
self.sun_temple_boss, self.veil_tr_l)
|
||||
self.__connect_regions("Veil left of sun temple", "Octo cave top path",
|
||||
@@ -712,7 +751,7 @@ class AquariaRegions:
|
||||
lambda state: _has_fish_form(state, self.player) and
|
||||
_has_sun_form(state, self.player) and
|
||||
_has_beast_form(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_regions("Veil left of sun temple", "Octo cave bottom path",
|
||||
self.veil_tr_l, self.octo_cave_b,
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
@@ -728,16 +767,22 @@ class AquariaRegions:
|
||||
self.abyss_lb, self.sunken_city_r,
|
||||
lambda state: _has_li(state, self.player))
|
||||
self.__connect_one_way_regions("Abyss left bottom area", "Body center area",
|
||||
self.abyss_lb, self.body_c,
|
||||
lambda state: _has_tongue_cleared(state, self.player))
|
||||
self.abyss_lb, self.body_c,
|
||||
lambda state: _has_tongue_cleared(state, self.player))
|
||||
self.__connect_one_way_regions("Body center area", "Abyss left bottom area",
|
||||
self.body_c, self.abyss_lb)
|
||||
self.body_c, self.abyss_lb)
|
||||
self.__connect_regions("Abyss left area", "King jellyfish cave",
|
||||
self.abyss_l, self.king_jellyfish_cave,
|
||||
lambda state: _has_energy_form(state, self.player) and
|
||||
_has_beast_form(state, self.player))
|
||||
lambda state: (_has_energy_form(state, self.player) and
|
||||
_has_beast_form(state, self.player)) or
|
||||
_has_dual_form(state, self.player))
|
||||
self.__connect_regions("Abyss left area", "Abyss right area",
|
||||
self.abyss_l, self.abyss_r)
|
||||
self.__connect_one_way_regions("Abyss right area", "Abyss right area, transturtle",
|
||||
self.abyss_r, self.abyss_r_transturtle)
|
||||
self.__connect_one_way_regions("Abyss right area, transturtle", "Abyss right area",
|
||||
self.abyss_r_transturtle, self.abyss_r,
|
||||
lambda state: _has_light(state, self.player))
|
||||
self.__connect_regions("Abyss right area", "Inside the whale",
|
||||
self.abyss_r, self.whale,
|
||||
lambda state: _has_spirit_form(state, self.player) and
|
||||
@@ -747,13 +792,14 @@ class AquariaRegions:
|
||||
lambda state: _has_spirit_form(state, self.player) and
|
||||
_has_sun_form(state, self.player) and
|
||||
_has_bind_song(state, self.player) and
|
||||
_has_energy_form(state, self.player))
|
||||
_has_energy_attack_item(state, self.player))
|
||||
self.__connect_regions("Abyss right area", "Ice Cave",
|
||||
self.abyss_r, self.ice_cave,
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
self.__connect_regions("Abyss right area", "Bubble Cave",
|
||||
self.__connect_regions("Ice cave", "Bubble Cave",
|
||||
self.ice_cave, self.bubble_cave,
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
lambda state: _has_beast_form(state, self.player) or
|
||||
_has_hot_soup(state, self.player))
|
||||
self.__connect_regions("Bubble Cave boss area", "Bubble Cave",
|
||||
self.bubble_cave, self.bubble_cave_boss,
|
||||
lambda state: _has_nature_form(state, self.player) and _has_bind_song(state, self.player)
|
||||
@@ -772,7 +818,7 @@ class AquariaRegions:
|
||||
self.sunken_city_l, self.sunken_city_boss,
|
||||
lambda state: _has_beast_form(state, self.player) and
|
||||
_has_sun_form(state, self.player) and
|
||||
_has_energy_form(state, self.player) and
|
||||
_has_energy_attack_item(state, self.player) and
|
||||
_has_bind_song(state, self.player))
|
||||
|
||||
def __connect_body_regions(self) -> None:
|
||||
@@ -780,11 +826,13 @@ class AquariaRegions:
|
||||
Connect entrances of the different regions around The Body
|
||||
"""
|
||||
self.__connect_regions("Body center area", "Body left area",
|
||||
self.body_c, self.body_l)
|
||||
self.body_c, self.body_l,
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
self.__connect_regions("Body center area", "Body right area top path",
|
||||
self.body_c, self.body_rt)
|
||||
self.__connect_regions("Body center area", "Body right area bottom path",
|
||||
self.body_c, self.body_rb)
|
||||
self.body_c, self.body_rb,
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
self.__connect_regions("Body center area", "Body bottom area",
|
||||
self.body_c, self.body_b,
|
||||
lambda state: _has_dual_form(state, self.player))
|
||||
@@ -803,22 +851,12 @@ class AquariaRegions:
|
||||
self.__connect_one_way_regions("final boss third form area", "final boss end",
|
||||
self.final_boss, self.final_boss_end)
|
||||
|
||||
def __connect_transturtle(self, item_source: str, item_target: str, region_source: Region, region_target: Region,
|
||||
rule=None) -> None:
|
||||
def __connect_transturtle(self, item_source: str, item_target: str, region_source: Region,
|
||||
region_target: Region) -> None:
|
||||
"""Connect a single transturtle to another one"""
|
||||
if item_source != item_target:
|
||||
if rule is None:
|
||||
self.__connect_one_way_regions(item_source, item_target, region_source, region_target,
|
||||
lambda state: state.has(item_target, self.player))
|
||||
else:
|
||||
self.__connect_one_way_regions(item_source, item_target, region_source, region_target, rule)
|
||||
|
||||
def __connect_arnassi_path_transturtle(self, item_source: str, item_target: str, region_source: Region,
|
||||
region_target: Region) -> None:
|
||||
"""Connect the Arnassi Ruins transturtle to another one"""
|
||||
self.__connect_one_way_regions(item_source, item_target, region_source, region_target,
|
||||
lambda state: state.has(item_target, self.player) and
|
||||
_has_fish_form(state, self.player))
|
||||
self.__connect_one_way_regions(item_source, item_target, region_source, region_target,
|
||||
lambda state: state.has(item_target, self.player))
|
||||
|
||||
def _connect_transturtle_to_other(self, item: str, region: Region) -> None:
|
||||
"""Connect a single transturtle to all others"""
|
||||
@@ -827,24 +865,10 @@ class AquariaRegions:
|
||||
self.__connect_transturtle(item, "Transturtle Open Water top right", region, self.openwater_tr_turtle)
|
||||
self.__connect_transturtle(item, "Transturtle Forest bottom left", region, self.forest_bl)
|
||||
self.__connect_transturtle(item, "Transturtle Home Water", region, self.home_water_transturtle)
|
||||
self.__connect_transturtle(item, "Transturtle Abyss right", region, self.abyss_r)
|
||||
self.__connect_transturtle(item, "Transturtle Abyss right", region, self.abyss_r_transturtle)
|
||||
self.__connect_transturtle(item, "Transturtle Final Boss", region, self.final_boss_tube)
|
||||
self.__connect_transturtle(item, "Transturtle Simon Says", region, self.simon)
|
||||
self.__connect_transturtle(item, "Transturtle Arnassi Ruins", region, self.arnassi_path,
|
||||
lambda state: state.has("Transturtle Arnassi Ruins", self.player) and
|
||||
_has_fish_form(state, self.player))
|
||||
|
||||
def _connect_arnassi_path_transturtle_to_other(self, item: str, region: Region) -> None:
|
||||
"""Connect the Arnassi Ruins transturtle to all others"""
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Veil top left", region, self.veil_tl)
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Veil top right", region, self.veil_tr_l)
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Open Water top right", region,
|
||||
self.openwater_tr_turtle)
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Forest bottom left", region, self.forest_bl)
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Home Water", region, self.home_water_transturtle)
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Abyss right", region, self.abyss_r)
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Final Boss", region, self.final_boss_tube)
|
||||
self.__connect_arnassi_path_transturtle(item, "Transturtle Simon Says", region, self.simon)
|
||||
self.__connect_transturtle(item, "Transturtle Arnassi Ruins", region, self.arnassi_cave_transturtle)
|
||||
|
||||
def __connect_transturtles(self) -> None:
|
||||
"""Connect every transturtle with others"""
|
||||
@@ -853,10 +877,10 @@ class AquariaRegions:
|
||||
self._connect_transturtle_to_other("Transturtle Open Water top right", self.openwater_tr_turtle)
|
||||
self._connect_transturtle_to_other("Transturtle Forest bottom left", self.forest_bl)
|
||||
self._connect_transturtle_to_other("Transturtle Home Water", self.home_water_transturtle)
|
||||
self._connect_transturtle_to_other("Transturtle Abyss right", self.abyss_r)
|
||||
self._connect_transturtle_to_other("Transturtle Abyss right", self.abyss_r_transturtle)
|
||||
self._connect_transturtle_to_other("Transturtle Final Boss", self.final_boss_tube)
|
||||
self._connect_transturtle_to_other("Transturtle Simon Says", self.simon)
|
||||
self._connect_arnassi_path_transturtle_to_other("Transturtle Arnassi Ruins", self.arnassi_path)
|
||||
self._connect_transturtle_to_other("Transturtle Arnassi Ruins", self.arnassi_cave_transturtle)
|
||||
|
||||
def connect_regions(self) -> None:
|
||||
"""
|
||||
@@ -893,7 +917,7 @@ class AquariaRegions:
|
||||
self.__add_event_location(self.energy_temple_boss,
|
||||
"Beating Fallen God",
|
||||
"Fallen God beated")
|
||||
self.__add_event_location(self.cathedral_boss_r,
|
||||
self.__add_event_location(self.cathedral_boss_l,
|
||||
"Beating Mithalan God",
|
||||
"Mithalan God beated")
|
||||
self.__add_event_location(self.forest_boss,
|
||||
@@ -970,8 +994,9 @@ class AquariaRegions:
|
||||
"""Since Urns need to be broken, add a damaging item to rules"""
|
||||
add_rule(self.multiworld.get_location("Open Water top right area, first urn in the Mithalas exit", self.player),
|
||||
lambda state: _has_damaging_item(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Open Water top right area, second urn in the Mithalas exit", self.player),
|
||||
lambda state: _has_damaging_item(state, self.player))
|
||||
add_rule(
|
||||
self.multiworld.get_location("Open Water top right area, second urn in the Mithalas exit", self.player),
|
||||
lambda state: _has_damaging_item(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Open Water top right area, third urn in the Mithalas exit", self.player),
|
||||
lambda state: _has_damaging_item(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Mithalas City, first urn in one of the homes", self.player),
|
||||
@@ -1019,66 +1044,46 @@ class AquariaRegions:
|
||||
Modify rules for location that need soup
|
||||
"""
|
||||
add_rule(self.multiworld.get_location("Turtle cave, Urchin Costume", self.player),
|
||||
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Sun Worm path, first cliff bulb", self.player),
|
||||
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Sun Worm path, second cliff bulb", self.player),
|
||||
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
|
||||
lambda state: _has_hot_soup(state, self.player))
|
||||
add_rule(self.multiworld.get_location("The Veil top right area, bulb at the top of the waterfall", self.player),
|
||||
lambda state: _has_hot_soup(state, self.player) and _has_beast_form(state, self.player))
|
||||
lambda state: _has_beast_and_soup_form(state, self.player))
|
||||
|
||||
def __adjusting_under_rock_location(self) -> None:
|
||||
"""
|
||||
Modify rules implying bind song needed for bulb under rocks
|
||||
"""
|
||||
add_rule(self.multiworld.get_location("Home Water, bulb under the rock in the left path from the Verse Cave",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Verse Cave left area, bulb under the rock at the end of the path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Naija's Home, bulb under the rock at the right of the main path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Song Cave, bulb under the rock in the path to the singing statues",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Song Cave, bulb under the rock close to the song door",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Energy Temple second area, bulb under the rock",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Open Water top left area, bulb under the rock in the right path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Open Water top left area, bulb under the rock in the left path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Kelp Forest top right area, bulb under the rock in the right path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("The Veil top left area, bulb under the rock in the top right path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Abyss right area, bulb behind the rock in the whale room",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Abyss right area, bulb in the middle path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("The Veil top left area, bulb under the rock in the top right path",
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
|
||||
def __adjusting_light_in_dark_place_rules(self) -> None:
|
||||
add_rule(self.multiworld.get_location("Kelp Forest top right area, Black Pearl", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Kelp Forest bottom right area, Odd Container", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Veil top left to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Open Water top right to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Veil top right to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Forest bottom left to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Home Water to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Final Boss to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Simon Says to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Transturtle Arnassi Ruins to Transturtle Abyss right", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Body center area to Abyss left bottom area", self.player),
|
||||
lambda state: _has_light(state, self.player))
|
||||
add_rule(self.multiworld.get_entrance("Veil left of sun temple to Octo cave top path", self.player),
|
||||
@@ -1097,12 +1102,14 @@ class AquariaRegions:
|
||||
def __adjusting_manual_rules(self) -> None:
|
||||
add_rule(self.multiworld.get_location("Mithalas Cathedral, Mithalan Dress", self.player),
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Open Water bottom left area, bulb inside the lowest fish pass", self.player),
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
add_rule(
|
||||
self.multiworld.get_location("Open Water bottom left area, bulb inside the lowest fish pass", self.player),
|
||||
lambda state: _has_fish_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby", self.player),
|
||||
lambda state: _has_spirit_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("The Veil top left area, bulb hidden behind the blocking rock", self.player),
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(
|
||||
self.multiworld.get_location("The Veil top left area, bulb hidden behind the blocking rock", self.player),
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Turtle cave, Turtle Egg", self.player),
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Abyss left area, bulb in the bottom fish pass", self.player),
|
||||
@@ -1114,103 +1121,119 @@ class AquariaRegions:
|
||||
add_rule(self.multiworld.get_location("Verse Cave right area, Big Seed", self.player),
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Arnassi Ruins, Song Plant Spore", self.player),
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Energy Temple first area, bulb in the bottom room blocked by a rock",
|
||||
self.player), lambda state: _has_energy_form(state, self.player))
|
||||
self.player), lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Home Water, bulb in the bottom left room", self.player),
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Home Water, bulb in the path below Nautilus Prime", self.player),
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Naija's Home, bulb after the energy door", self.player),
|
||||
lambda state: _has_energy_form(state, self.player))
|
||||
lambda state: _has_energy_attack_item(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Abyss right area, bulb behind the rock in the whale room", self.player),
|
||||
lambda state: _has_spirit_form(state, self.player) and
|
||||
_has_sun_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Arnassi Ruins, Arnassi Armor", self.player),
|
||||
lambda state: _has_fish_form(state, self.player) and
|
||||
_has_spirit_form(state, self.player))
|
||||
lambda state: _has_fish_form(state, self.player) or
|
||||
_has_beast_and_soup_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Mithalas City, urn inside a home fish pass", self.player),
|
||||
lambda state: _has_damaging_item(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Mithalas City, urn in the Castle flower tube entrance", self.player),
|
||||
lambda state: _has_damaging_item(state, self.player))
|
||||
add_rule(self.multiworld.get_location(
|
||||
"The Veil top right area, bulb in the middle of the wall jump cliff", self.player
|
||||
), lambda state: _has_beast_form_or_arnassi_armor(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Kelp Forest top left area, Jelly Egg", self.player),
|
||||
lambda state: _has_beast_form(state, self.player))
|
||||
add_rule(self.multiworld.get_location("Sun Worm path, first cliff bulb", self.player),
|
||||
lambda state: state.has("Sun God beated", self.player))
|
||||
add_rule(self.multiworld.get_location("Sun Worm path, second cliff bulb", self.player),
|
||||
lambda state: state.has("Sun God beated", self.player))
|
||||
add_rule(self.multiworld.get_location("The Body center area, breaking Li's cage", self.player),
|
||||
lambda state: _has_tongue_cleared(state, self.player))
|
||||
|
||||
def __no_progression_hard_or_hidden_location(self) -> None:
|
||||
self.multiworld.get_location("Energy Temple boss area, Fallen God Tooth",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Mithalas boss area, beating Mithalan God",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Kelp Forest boss area, beating Drunian God",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Sun Temple boss area, beating Sun God",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Sunken City, bulb on top of the boss area",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Home Water, Nautilus Egg",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Energy Temple blaster room, Blaster Egg",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Mithalas City Castle, beating the Priests",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Mermog cave, Piranha Egg",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Octopus Cave, Dumbo Egg",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("King Jellyfish Cave, bulb in the right path from King Jelly",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("King Jellyfish Cave, Jellyfish Costume",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Final Boss area, bulb in the boss third form room",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Sun Worm path, first cliff bulb",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Sun Worm path, second cliff bulb",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("The Veil top right area, bulb at the top of the waterfall",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Bubble Cave, bulb in the left cave wall",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Bubble Cave, Verse Egg",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Kelp Forest bottom left area, bulb close to the spirit crystals",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Sun Temple, Sun Key",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("The Body bottom area, Mutant Costume",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Sun Temple, bulb in the hidden room of the right part",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
self.multiworld.get_location("Arnassi Ruins, Arnassi Armor",
|
||||
self.player).item_rule =\
|
||||
self.player).item_rule = \
|
||||
lambda item: item.classification != ItemClassification.progression
|
||||
|
||||
def adjusting_rules(self, options: AquariaOptions) -> None:
|
||||
"""
|
||||
Modify rules for single location or optional rules
|
||||
"""
|
||||
self.multiworld.get_entrance("Before Final Boss to Final Boss", self.player)
|
||||
self.__adjusting_urns_rules()
|
||||
self.__adjusting_crates_rules()
|
||||
self.__adjusting_soup_rules()
|
||||
@@ -1234,7 +1257,7 @@ class AquariaRegions:
|
||||
lambda state: _has_bind_song(state, self.player))
|
||||
if options.unconfine_home_water.value in [0, 2]:
|
||||
add_rule(self.multiworld.get_entrance("Home Water to Open Water top left area", self.player),
|
||||
lambda state: _has_bind_song(state, self.player) and _has_energy_form(state, self.player))
|
||||
lambda state: _has_bind_song(state, self.player) and _has_energy_attack_item(state, self.player))
|
||||
if options.early_energy_form:
|
||||
self.multiworld.early_items[self.player]["Energy form"] = 1
|
||||
|
||||
@@ -1274,6 +1297,7 @@ class AquariaRegions:
|
||||
self.multiworld.regions.append(self.arnassi)
|
||||
self.multiworld.regions.append(self.arnassi_path)
|
||||
self.multiworld.regions.append(self.arnassi_crab_boss)
|
||||
self.multiworld.regions.append(self.arnassi_cave_transturtle)
|
||||
self.multiworld.regions.append(self.simon)
|
||||
|
||||
def __add_mithalas_regions_to_world(self) -> None:
|
||||
@@ -1300,6 +1324,7 @@ class AquariaRegions:
|
||||
self.multiworld.regions.append(self.forest_tr)
|
||||
self.multiworld.regions.append(self.forest_tr_fp)
|
||||
self.multiworld.regions.append(self.forest_bl)
|
||||
self.multiworld.regions.append(self.forest_bl_sc)
|
||||
self.multiworld.regions.append(self.forest_br)
|
||||
self.multiworld.regions.append(self.forest_boss)
|
||||
self.multiworld.regions.append(self.forest_boss_entrance)
|
||||
@@ -1337,6 +1362,7 @@ class AquariaRegions:
|
||||
self.multiworld.regions.append(self.abyss_l)
|
||||
self.multiworld.regions.append(self.abyss_lb)
|
||||
self.multiworld.regions.append(self.abyss_r)
|
||||
self.multiworld.regions.append(self.abyss_r_transturtle)
|
||||
self.multiworld.regions.append(self.ice_cave)
|
||||
self.multiworld.regions.append(self.bubble_cave)
|
||||
self.multiworld.regions.append(self.bubble_cave_boss)
|
||||
|
||||
@@ -141,7 +141,7 @@ after_home_water_locations = [
|
||||
"Sun Temple, bulb at the top of the high dark room",
|
||||
"Sun Temple, Golden Gear",
|
||||
"Sun Temple, first bulb of the temple",
|
||||
"Sun Temple, bulb on the left part",
|
||||
"Sun Temple, bulb on the right part",
|
||||
"Sun Temple, bulb in the hidden room of the right part",
|
||||
"Sun Temple, Sun Key",
|
||||
"Sun Worm path, first path bulb",
|
||||
|
||||
@@ -13,36 +13,16 @@ class BeastFormAccessTest(AquariaTestBase):
|
||||
def test_beast_form_location(self) -> None:
|
||||
"""Test locations that require beast form"""
|
||||
locations = [
|
||||
"Mithalas City Castle, beating the Priests",
|
||||
"Arnassi Ruins, Crab Armor",
|
||||
"Arnassi Ruins, Song Plant Spore",
|
||||
"Mithalas City, first bulb at the end of the top path",
|
||||
"Mithalas City, second bulb at the end of the top path",
|
||||
"Mithalas City, bulb in the top path",
|
||||
"Mithalas City, Mithalas Pot",
|
||||
"Mithalas City, urn in the Castle flower tube entrance",
|
||||
"Mermog cave, Piranha Egg",
|
||||
"Kelp Forest top left area, Jelly Egg",
|
||||
"Mithalas Cathedral, Mithalan Dress",
|
||||
"Turtle cave, bulb in Bubble Cliff",
|
||||
"Turtle cave, Urchin Costume",
|
||||
"Sun Worm path, first cliff bulb",
|
||||
"Sun Worm path, second cliff bulb",
|
||||
"The Veil top right area, bulb at the top of the waterfall",
|
||||
"Bubble Cave, bulb in the left cave wall",
|
||||
"Bubble Cave, bulb in the right cave wall (behind the ice crystal)",
|
||||
"Bubble Cave, Verse Egg",
|
||||
"Sunken City, bulb on top of the boss area",
|
||||
"Octopus Cave, Dumbo Egg",
|
||||
"Beating the Golem",
|
||||
"Beating Mergog",
|
||||
"Beating Crabbius Maximus",
|
||||
"Beating Octopus Prime",
|
||||
"Beating Mantis Shrimp Prime",
|
||||
"King Jellyfish Cave, Jellyfish Costume",
|
||||
"King Jellyfish Cave, bulb in the right path from King Jelly",
|
||||
"Beating King Jellyfish God Prime",
|
||||
"Beating Mithalan priests",
|
||||
"Sunken City cleared"
|
||||
"Sunken City cleared",
|
||||
]
|
||||
items = [["Beast form"]]
|
||||
self.assertAccessDependency(locations, items)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
"""
|
||||
Author: Louis M
|
||||
Date: Thu, 18 Apr 2024 18:45:56 +0000
|
||||
Description: Unit test used to test accessibility of locations with and without the beast form or arnassi armor
|
||||
"""
|
||||
|
||||
from . import AquariaTestBase
|
||||
|
||||
|
||||
class BeastForArnassiArmormAccessTest(AquariaTestBase):
|
||||
"""Unit test used to test accessibility of locations with and without the beast form or arnassi armor"""
|
||||
|
||||
def test_beast_form_arnassi_armor_location(self) -> None:
|
||||
"""Test locations that require beast form or arnassi armor"""
|
||||
locations = [
|
||||
"Mithalas City Castle, beating the Priests",
|
||||
"Arnassi Ruins, Crab Armor",
|
||||
"Arnassi Ruins, Song Plant Spore",
|
||||
"Mithalas City, first bulb at the end of the top path",
|
||||
"Mithalas City, second bulb at the end of the top path",
|
||||
"Mithalas City, bulb in the top path",
|
||||
"Mithalas City, Mithalas Pot",
|
||||
"Mithalas City, urn in the Castle flower tube entrance",
|
||||
"Mermog cave, Piranha Egg",
|
||||
"Mithalas Cathedral, Mithalan Dress",
|
||||
"Kelp Forest top left area, Jelly Egg",
|
||||
"The Veil top right area, bulb in the middle of the wall jump cliff",
|
||||
"The Veil top right area, bulb at the top of the waterfall",
|
||||
"Sunken City, bulb on top of the boss area",
|
||||
"Octopus Cave, Dumbo Egg",
|
||||
"Beating the Golem",
|
||||
"Beating Mergog",
|
||||
"Beating Crabbius Maximus",
|
||||
"Beating Octopus Prime",
|
||||
"Beating Mithalan priests",
|
||||
"Sunken City cleared"
|
||||
]
|
||||
items = [["Beast form", "Arnassi Armor"]]
|
||||
self.assertAccessDependency(locations, items)
|
||||
@@ -17,55 +17,16 @@ class EnergyFormAccessTest(AquariaTestBase):
|
||||
def test_energy_form_location(self) -> None:
|
||||
"""Test locations that require Energy form"""
|
||||
locations = [
|
||||
"Home Water, Nautilus Egg",
|
||||
"Naija's Home, bulb after the energy door",
|
||||
"Energy Temple first area, bulb in the bottom room blocked by a rock",
|
||||
"Energy Temple second area, bulb under the rock",
|
||||
"Energy Temple bottom entrance, Krotite Armor",
|
||||
"Energy Temple third area, bulb in the bottom path",
|
||||
"Energy Temple boss area, Fallen God Tooth",
|
||||
"Energy Temple blaster room, Blaster Egg",
|
||||
"Mithalas City Castle, beating the Priests",
|
||||
"Mithalas Cathedral, first urn in the top right room",
|
||||
"Mithalas Cathedral, second urn in the top right room",
|
||||
"Mithalas Cathedral, third urn in the top right room",
|
||||
"Mithalas Cathedral, urn in the flesh room with fleas",
|
||||
"Mithalas Cathedral, first urn in the bottom right path",
|
||||
"Mithalas Cathedral, second urn in the bottom right path",
|
||||
"Mithalas Cathedral, urn behind the flesh vein",
|
||||
"Mithalas Cathedral, urn in the top left eyes boss room",
|
||||
"Mithalas Cathedral, first urn in the path behind the flesh vein",
|
||||
"Mithalas Cathedral, second urn in the path behind the flesh vein",
|
||||
"Mithalas Cathedral, third urn in the path behind the flesh vein",
|
||||
"Mithalas Cathedral, fourth urn in the top right room",
|
||||
"Mithalas Cathedral, Mithalan Dress",
|
||||
"Mithalas Cathedral, urn below the left entrance",
|
||||
"Mithalas boss area, beating Mithalan God",
|
||||
"Kelp Forest top left area, bulb close to the Verse Egg",
|
||||
"Kelp Forest top left area, Verse Egg",
|
||||
"Kelp Forest boss area, beating Drunian God",
|
||||
"Mermog cave, Piranha Egg",
|
||||
"Octopus Cave, Dumbo Egg",
|
||||
"Sun Temple boss area, beating Sun God",
|
||||
"Arnassi Ruins, Crab Armor",
|
||||
"King Jellyfish Cave, bulb in the right path from King Jelly",
|
||||
"King Jellyfish Cave, Jellyfish Costume",
|
||||
"Sunken City, bulb on top of the boss area",
|
||||
"The Body left area, first bulb in the top face room",
|
||||
"The Body left area, second bulb in the top face room",
|
||||
"The Body left area, bulb below the water stream",
|
||||
"The Body left area, bulb in the top path to the top face room",
|
||||
"The Body left area, bulb in the bottom face room",
|
||||
"The Body right area, bulb in the top path to the bottom face room",
|
||||
"The Body right area, bulb in the bottom face room",
|
||||
"Final Boss area, bulb in the boss third form room",
|
||||
"Beating Fallen God",
|
||||
"Beating Mithalan God",
|
||||
"Beating Drunian God",
|
||||
"Beating Sun God",
|
||||
"Beating the Golem",
|
||||
"Beating Nautilus Prime",
|
||||
"Beating Blaster Peg Prime",
|
||||
"Beating Mergog",
|
||||
"Beating Mithalan priests",
|
||||
"Beating Octopus Prime",
|
||||
"Beating Crabbius Maximus",
|
||||
"Beating King Jellyfish God Prime",
|
||||
"First secret",
|
||||
"Sunken City cleared",
|
||||
"Objective complete",
|
||||
]
|
||||
items = [["Energy form"]]
|
||||
|
||||
92
worlds/aquaria/test/test_energy_form_or_dual_form_access.py
Normal file
92
worlds/aquaria/test/test_energy_form_or_dual_form_access.py
Normal file
@@ -0,0 +1,92 @@
|
||||
"""
|
||||
Author: Louis M
|
||||
Date: Thu, 18 Apr 2024 18:45:56 +0000
|
||||
Description: Unit test used to test accessibility of locations with and without the energy form and dual form (and Li)
|
||||
"""
|
||||
|
||||
from . import AquariaTestBase
|
||||
|
||||
|
||||
class EnergyFormDualFormAccessTest(AquariaTestBase):
|
||||
"""Unit test used to test accessibility of locations with and without the energy form and dual form (and Li)"""
|
||||
options = {
|
||||
"early_energy_form": False,
|
||||
}
|
||||
|
||||
def test_energy_form_or_dual_form_location(self) -> None:
|
||||
"""Test locations that require Energy form or dual form"""
|
||||
locations = [
|
||||
"Naija's Home, bulb after the energy door",
|
||||
"Home Water, Nautilus Egg",
|
||||
"Energy Temple second area, bulb under the rock",
|
||||
"Energy Temple bottom entrance, Krotite Armor",
|
||||
"Energy Temple third area, bulb in the bottom path",
|
||||
"Energy Temple blaster room, Blaster Egg",
|
||||
"Energy Temple boss area, Fallen God Tooth",
|
||||
"Mithalas City Castle, beating the Priests",
|
||||
"Mithalas boss area, beating Mithalan God",
|
||||
"Mithalas Cathedral, first urn in the top right room",
|
||||
"Mithalas Cathedral, second urn in the top right room",
|
||||
"Mithalas Cathedral, third urn in the top right room",
|
||||
"Mithalas Cathedral, urn in the flesh room with fleas",
|
||||
"Mithalas Cathedral, first urn in the bottom right path",
|
||||
"Mithalas Cathedral, second urn in the bottom right path",
|
||||
"Mithalas Cathedral, urn behind the flesh vein",
|
||||
"Mithalas Cathedral, urn in the top left eyes boss room",
|
||||
"Mithalas Cathedral, first urn in the path behind the flesh vein",
|
||||
"Mithalas Cathedral, second urn in the path behind the flesh vein",
|
||||
"Mithalas Cathedral, third urn in the path behind the flesh vein",
|
||||
"Mithalas Cathedral, fourth urn in the top right room",
|
||||
"Mithalas Cathedral, Mithalan Dress",
|
||||
"Mithalas Cathedral, urn below the left entrance",
|
||||
"Kelp Forest top left area, bulb close to the Verse Egg",
|
||||
"Kelp Forest top left area, Verse Egg",
|
||||
"Kelp Forest boss area, beating Drunian God",
|
||||
"Mermog cave, Piranha Egg",
|
||||
"Octopus Cave, Dumbo Egg",
|
||||
"Sun Temple boss area, beating Sun God",
|
||||
"King Jellyfish Cave, bulb in the right path from King Jelly",
|
||||
"King Jellyfish Cave, Jellyfish Costume",
|
||||
"Sunken City right area, crate close to the save crystal",
|
||||
"Sunken City right area, crate in the left bottom room",
|
||||
"Sunken City left area, crate in the little pipe room",
|
||||
"Sunken City left area, crate close to the save crystal",
|
||||
"Sunken City left area, crate before the bedroom",
|
||||
"Sunken City left area, Girl Costume",
|
||||
"Sunken City, bulb on top of the boss area",
|
||||
"The Body center area, breaking Li's cage",
|
||||
"The Body center area, bulb on the main path blocking tube",
|
||||
"The Body left area, first bulb in the top face room",
|
||||
"The Body left area, second bulb in the top face room",
|
||||
"The Body left area, bulb below the water stream",
|
||||
"The Body left area, bulb in the top path to the top face room",
|
||||
"The Body left area, bulb in the bottom face room",
|
||||
"The Body right area, bulb in the top face room",
|
||||
"The Body right area, bulb in the top path to the bottom face room",
|
||||
"The Body right area, bulb in the bottom face room",
|
||||
"The Body bottom area, bulb in the Jelly Zap room",
|
||||
"The Body bottom area, bulb in the nautilus room",
|
||||
"The Body bottom area, Mutant Costume",
|
||||
"Final Boss area, bulb in the boss third form room",
|
||||
"Final Boss area, first bulb in the turtle room",
|
||||
"Final Boss area, second bulb in the turtle room",
|
||||
"Final Boss area, third bulb in the turtle room",
|
||||
"Final Boss area, Transturtle",
|
||||
"Beating Fallen God",
|
||||
"Beating Blaster Peg Prime",
|
||||
"Beating Mithalan God",
|
||||
"Beating Drunian God",
|
||||
"Beating Sun God",
|
||||
"Beating the Golem",
|
||||
"Beating Nautilus Prime",
|
||||
"Beating Mergog",
|
||||
"Beating Mithalan priests",
|
||||
"Beating Octopus Prime",
|
||||
"Beating King Jellyfish God Prime",
|
||||
"Beating the Golem",
|
||||
"Sunken City cleared",
|
||||
"First secret",
|
||||
"Objective complete"
|
||||
]
|
||||
items = [["Energy form", "Dual form", "Li and Li song", "Body tongue cleared"]]
|
||||
self.assertAccessDependency(locations, items)
|
||||
@@ -17,6 +17,7 @@ class FishFormAccessTest(AquariaTestBase):
|
||||
"""Test locations that require fish form"""
|
||||
locations = [
|
||||
"The Veil top left area, bulb inside the fish pass",
|
||||
"Energy Temple first area, Energy Idol",
|
||||
"Mithalas City, Doll",
|
||||
"Mithalas City, urn inside a home fish pass",
|
||||
"Kelp Forest top right area, bulb in the top fish pass",
|
||||
@@ -30,8 +31,7 @@ class FishFormAccessTest(AquariaTestBase):
|
||||
"Octopus Cave, Dumbo Egg",
|
||||
"Octopus Cave, bulb in the path below the Octopus Cave path",
|
||||
"Beating Octopus Prime",
|
||||
"Abyss left area, bulb in the bottom fish pass",
|
||||
"Arnassi Ruins, Arnassi Armor"
|
||||
"Abyss left area, bulb in the bottom fish pass"
|
||||
]
|
||||
items = [["Fish form"]]
|
||||
self.assertAccessDependency(locations, items)
|
||||
|
||||
@@ -39,7 +39,6 @@ class LightAccessTest(AquariaTestBase):
|
||||
"Abyss right area, bulb in the middle path",
|
||||
"Abyss right area, bulb behind the rock in the middle path",
|
||||
"Abyss right area, bulb in the left green room",
|
||||
"Abyss right area, Transturtle",
|
||||
"Ice Cave, bulb in the room to the right",
|
||||
"Ice Cave, first bulb in the top exit room",
|
||||
"Ice Cave, second bulb in the top exit room",
|
||||
|
||||
@@ -30,7 +30,6 @@ class SpiritFormAccessTest(AquariaTestBase):
|
||||
"Sunken City left area, Girl Costume",
|
||||
"Beating Mantis Shrimp Prime",
|
||||
"First secret",
|
||||
"Arnassi Ruins, Arnassi Armor",
|
||||
]
|
||||
items = [["Spirit form"]]
|
||||
self.assertAccessDependency(locations, items)
|
||||
|
||||
@@ -1006,6 +1006,8 @@ def rules(brcworld):
|
||||
lambda state: mataan_challenge2(state, player, limit, glitched))
|
||||
set_rule(multiworld.get_location("Mataan: Score challenge reward", player),
|
||||
lambda state: mataan_challenge3(state, player))
|
||||
set_rule(multiworld.get_location("Mataan: Coil joins the crew", player),
|
||||
lambda state: mataan_deepest(state, player, limit, glitched))
|
||||
if photos:
|
||||
set_rule(multiworld.get_location("Mataan: Trash Polo", player),
|
||||
lambda state: camera(state, player))
|
||||
|
||||
@@ -3,8 +3,8 @@ import typing
|
||||
|
||||
|
||||
class ItemData(typing.NamedTuple):
|
||||
code: typing.Optional[int]
|
||||
progression: bool
|
||||
code: int
|
||||
progression: bool = True
|
||||
|
||||
|
||||
class ChecksFinderItem(Item):
|
||||
@@ -12,16 +12,9 @@ class ChecksFinderItem(Item):
|
||||
|
||||
|
||||
item_table = {
|
||||
"Map Width": ItemData(80000, True),
|
||||
"Map Height": ItemData(80001, True),
|
||||
"Map Bombs": ItemData(80002, True),
|
||||
"Map Width": ItemData(80000),
|
||||
"Map Height": ItemData(80001),
|
||||
"Map Bombs": ItemData(80002),
|
||||
}
|
||||
|
||||
required_items = {
|
||||
}
|
||||
|
||||
item_frequencies = {
|
||||
|
||||
}
|
||||
|
||||
lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in item_table.items() if data.code}
|
||||
lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in item_table.items()}
|
||||
|
||||
@@ -3,46 +3,14 @@ import typing
|
||||
|
||||
|
||||
class AdvData(typing.NamedTuple):
|
||||
id: typing.Optional[int]
|
||||
region: str
|
||||
id: int
|
||||
region: str = "Board"
|
||||
|
||||
|
||||
class ChecksFinderAdvancement(Location):
|
||||
class ChecksFinderLocation(Location):
|
||||
game: str = "ChecksFinder"
|
||||
|
||||
|
||||
advancement_table = {
|
||||
"Tile 1": AdvData(81000, 'Board'),
|
||||
"Tile 2": AdvData(81001, 'Board'),
|
||||
"Tile 3": AdvData(81002, 'Board'),
|
||||
"Tile 4": AdvData(81003, 'Board'),
|
||||
"Tile 5": AdvData(81004, 'Board'),
|
||||
"Tile 6": AdvData(81005, 'Board'),
|
||||
"Tile 7": AdvData(81006, 'Board'),
|
||||
"Tile 8": AdvData(81007, 'Board'),
|
||||
"Tile 9": AdvData(81008, 'Board'),
|
||||
"Tile 10": AdvData(81009, 'Board'),
|
||||
"Tile 11": AdvData(81010, 'Board'),
|
||||
"Tile 12": AdvData(81011, 'Board'),
|
||||
"Tile 13": AdvData(81012, 'Board'),
|
||||
"Tile 14": AdvData(81013, 'Board'),
|
||||
"Tile 15": AdvData(81014, 'Board'),
|
||||
"Tile 16": AdvData(81015, 'Board'),
|
||||
"Tile 17": AdvData(81016, 'Board'),
|
||||
"Tile 18": AdvData(81017, 'Board'),
|
||||
"Tile 19": AdvData(81018, 'Board'),
|
||||
"Tile 20": AdvData(81019, 'Board'),
|
||||
"Tile 21": AdvData(81020, 'Board'),
|
||||
"Tile 22": AdvData(81021, 'Board'),
|
||||
"Tile 23": AdvData(81022, 'Board'),
|
||||
"Tile 24": AdvData(81023, 'Board'),
|
||||
"Tile 25": AdvData(81024, 'Board'),
|
||||
}
|
||||
|
||||
exclusion_table = {
|
||||
}
|
||||
|
||||
events_table = {
|
||||
}
|
||||
|
||||
lookup_id_to_name: typing.Dict[int, str] = {data.id: item_name for item_name, data in advancement_table.items() if data.id}
|
||||
base_id = 81000
|
||||
advancement_table = {f"Tile {i+1}": AdvData(base_id+i) for i in range(25)}
|
||||
lookup_id_to_name: typing.Dict[int, str] = {data.id: item_name for item_name, data in advancement_table.items()}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
import typing
|
||||
from Options import Option
|
||||
|
||||
|
||||
checksfinder_options: typing.Dict[str, type(Option)] = {
|
||||
}
|
||||
@@ -1,44 +1,24 @@
|
||||
from ..generic.Rules import set_rule
|
||||
from BaseClasses import MultiWorld, CollectionState
|
||||
from worlds.generic.Rules import set_rule
|
||||
from BaseClasses import MultiWorld
|
||||
|
||||
|
||||
def _has_total(state: CollectionState, player: int, total: int):
|
||||
return (state.count('Map Width', player) + state.count('Map Height', player) +
|
||||
state.count('Map Bombs', player)) >= total
|
||||
items = ["Map Width", "Map Height", "Map Bombs"]
|
||||
|
||||
|
||||
# Sets rules on entrances and advancements that are always applied
|
||||
def set_rules(world: MultiWorld, player: int):
|
||||
set_rule(world.get_location("Tile 6", player), lambda state: _has_total(state, player, 1))
|
||||
set_rule(world.get_location("Tile 7", player), lambda state: _has_total(state, player, 2))
|
||||
set_rule(world.get_location("Tile 8", player), lambda state: _has_total(state, player, 3))
|
||||
set_rule(world.get_location("Tile 9", player), lambda state: _has_total(state, player, 4))
|
||||
set_rule(world.get_location("Tile 10", player), lambda state: _has_total(state, player, 5))
|
||||
set_rule(world.get_location("Tile 11", player), lambda state: _has_total(state, player, 6))
|
||||
set_rule(world.get_location("Tile 12", player), lambda state: _has_total(state, player, 7))
|
||||
set_rule(world.get_location("Tile 13", player), lambda state: _has_total(state, player, 8))
|
||||
set_rule(world.get_location("Tile 14", player), lambda state: _has_total(state, player, 9))
|
||||
set_rule(world.get_location("Tile 15", player), lambda state: _has_total(state, player, 10))
|
||||
set_rule(world.get_location("Tile 16", player), lambda state: _has_total(state, player, 11))
|
||||
set_rule(world.get_location("Tile 17", player), lambda state: _has_total(state, player, 12))
|
||||
set_rule(world.get_location("Tile 18", player), lambda state: _has_total(state, player, 13))
|
||||
set_rule(world.get_location("Tile 19", player), lambda state: _has_total(state, player, 14))
|
||||
set_rule(world.get_location("Tile 20", player), lambda state: _has_total(state, player, 15))
|
||||
set_rule(world.get_location("Tile 21", player), lambda state: _has_total(state, player, 16))
|
||||
set_rule(world.get_location("Tile 22", player), lambda state: _has_total(state, player, 17))
|
||||
set_rule(world.get_location("Tile 23", player), lambda state: _has_total(state, player, 18))
|
||||
set_rule(world.get_location("Tile 24", player), lambda state: _has_total(state, player, 19))
|
||||
set_rule(world.get_location("Tile 25", player), lambda state: _has_total(state, player, 20))
|
||||
def set_rules(multiworld: MultiWorld, player: int):
|
||||
for i in range(20):
|
||||
set_rule(multiworld.get_location(f"Tile {i+6}", player), lambda state, i=i: state.has_from_list(items, player, i+1))
|
||||
|
||||
|
||||
# Sets rules on completion condition
|
||||
def set_completion_rules(world: MultiWorld, player: int):
|
||||
|
||||
width_req = 10-5
|
||||
height_req = 10-5
|
||||
bomb_req = 20-5
|
||||
completion_requirements = lambda state: \
|
||||
state.has("Map Width", player, width_req) and \
|
||||
state.has("Map Height", player, height_req) and \
|
||||
state.has("Map Bombs", player, bomb_req)
|
||||
world.completion_condition[player] = lambda state: completion_requirements(state)
|
||||
def set_completion_rules(multiworld: MultiWorld, player: int):
|
||||
width_req = 5 # 10 - 5
|
||||
height_req = 5 # 10 - 5
|
||||
bomb_req = 15 # 20 - 5
|
||||
multiworld.completion_condition[player] = lambda state: state.has_all_counts(
|
||||
{
|
||||
"Map Width": width_req,
|
||||
"Map Height": height_req,
|
||||
"Map Bombs": bomb_req,
|
||||
}, player)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification
|
||||
from .Items import ChecksFinderItem, item_table, required_items
|
||||
from .Locations import ChecksFinderAdvancement, advancement_table, exclusion_table
|
||||
from .Options import checksfinder_options
|
||||
from BaseClasses import Region, Entrance, Tutorial, ItemClassification
|
||||
from .Items import ChecksFinderItem, item_table
|
||||
from .Locations import ChecksFinderLocation, advancement_table
|
||||
from Options import PerGameCommonOptions
|
||||
from .Rules import set_rules, set_completion_rules
|
||||
from ..AutoWorld import World, WebWorld
|
||||
from worlds.AutoWorld import World, WebWorld
|
||||
|
||||
client_version = 7
|
||||
|
||||
@@ -25,38 +25,34 @@ class ChecksFinderWorld(World):
|
||||
ChecksFinder is a game where you avoid mines and find checks inside the board
|
||||
with the mines! You win when you get all your items and beat the board!
|
||||
"""
|
||||
game: str = "ChecksFinder"
|
||||
option_definitions = checksfinder_options
|
||||
topology_present = True
|
||||
game = "ChecksFinder"
|
||||
options_dataclass = PerGameCommonOptions
|
||||
web = ChecksFinderWeb()
|
||||
|
||||
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
||||
location_name_to_id = {name: data.id for name, data in advancement_table.items()}
|
||||
|
||||
def _get_checksfinder_data(self):
|
||||
return {
|
||||
'world_seed': self.multiworld.per_slot_randoms[self.player].getrandbits(32),
|
||||
'seed_name': self.multiworld.seed_name,
|
||||
'player_name': self.multiworld.get_player_name(self.player),
|
||||
'player_id': self.player,
|
||||
'client_version': client_version,
|
||||
'race': self.multiworld.is_race,
|
||||
}
|
||||
def create_regions(self):
|
||||
menu = Region("Menu", self.player, self.multiworld)
|
||||
board = Region("Board", self.player, self.multiworld)
|
||||
board.locations += [ChecksFinderLocation(self.player, loc_name, loc_data.id, board)
|
||||
for loc_name, loc_data in advancement_table.items()]
|
||||
|
||||
connection = Entrance(self.player, "New Board", menu)
|
||||
menu.exits.append(connection)
|
||||
connection.connect(board)
|
||||
self.multiworld.regions += [menu, board]
|
||||
|
||||
def create_items(self):
|
||||
|
||||
# Generate item pool
|
||||
itempool = []
|
||||
# Add all required progression items
|
||||
for (name, num) in required_items.items():
|
||||
itempool += [name] * num
|
||||
# Add the map width and height stuff
|
||||
itempool += ["Map Width"] * (10-5)
|
||||
itempool += ["Map Height"] * (10-5)
|
||||
itempool += ["Map Width"] * 5 # 10 - 5
|
||||
itempool += ["Map Height"] * 5 # 10 - 5
|
||||
# Add the map bombs
|
||||
itempool += ["Map Bombs"] * (20-5)
|
||||
itempool += ["Map Bombs"] * 15 # 20 - 5
|
||||
# Convert itempool into real items
|
||||
itempool = [item for item in map(lambda name: self.create_item(name), itempool)]
|
||||
itempool = [self.create_item(item) for item in itempool]
|
||||
|
||||
self.multiworld.itempool += itempool
|
||||
|
||||
@@ -64,28 +60,16 @@ class ChecksFinderWorld(World):
|
||||
set_rules(self.multiworld, self.player)
|
||||
set_completion_rules(self.multiworld, self.player)
|
||||
|
||||
def create_regions(self):
|
||||
menu = Region("Menu", self.player, self.multiworld)
|
||||
board = Region("Board", self.player, self.multiworld)
|
||||
board.locations += [ChecksFinderAdvancement(self.player, loc_name, loc_data.id, board)
|
||||
for loc_name, loc_data in advancement_table.items() if loc_data.region == board.name]
|
||||
|
||||
connection = Entrance(self.player, "New Board", menu)
|
||||
menu.exits.append(connection)
|
||||
connection.connect(board)
|
||||
self.multiworld.regions += [menu, board]
|
||||
|
||||
def fill_slot_data(self):
|
||||
slot_data = self._get_checksfinder_data()
|
||||
for option_name in checksfinder_options:
|
||||
option = getattr(self.multiworld, option_name)[self.player]
|
||||
if slot_data.get(option_name, None) is None and type(option.value) in {str, int}:
|
||||
slot_data[option_name] = int(option.value)
|
||||
return slot_data
|
||||
return {
|
||||
"world_seed": self.random.getrandbits(32),
|
||||
"seed_name": self.multiworld.seed_name,
|
||||
"player_name": self.player_name,
|
||||
"player_id": self.player,
|
||||
"client_version": client_version,
|
||||
"race": self.multiworld.is_race,
|
||||
}
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
def create_item(self, name: str) -> ChecksFinderItem:
|
||||
item_data = item_table[name]
|
||||
item = ChecksFinderItem(name,
|
||||
ItemClassification.progression if item_data.progression else ItemClassification.filler,
|
||||
item_data.code, self.player)
|
||||
return item
|
||||
return ChecksFinderItem(name, ItemClassification.progression, item_data.code, self.player)
|
||||
|
||||
@@ -24,8 +24,3 @@ next to an icon, the number is how many you have gotten and the icon represents
|
||||
Victory is achieved when the player wins a board they were given after they have received all of their Map Width, Map
|
||||
Height, and Map Bomb items. The game will say at the bottom of the screen how many of each you have received.
|
||||
|
||||
## Unique Local Commands
|
||||
|
||||
The following command is only available when using the ChecksFinderClient to play with Archipelago.
|
||||
|
||||
- `/resync` Manually trigger a resync.
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
- ChecksFinder from
|
||||
the [Github releases Page for the game](https://github.com/jonloveslegos/ChecksFinder/releases) (latest version)
|
||||
- Archipelago from the [Archipelago Releases Page](https://github.com/ArchipelagoMW/Archipelago/releases)
|
||||
|
||||
## Configuring your YAML file
|
||||
|
||||
@@ -17,28 +16,15 @@ guide: [Basic Multiworld Setup Guide](/tutorial/Archipelago/setup/en)
|
||||
|
||||
You can customize your options by visiting the [ChecksFinder Player Options Page](/games/ChecksFinder/player-options)
|
||||
|
||||
### Generating a ChecksFinder game
|
||||
## Joining a MultiWorld Game
|
||||
|
||||
**ChecksFinder is meant to be played _alongside_ another game! You may not be playing it for long periods of time if
|
||||
you play it by itself with another person!**
|
||||
|
||||
When you join a multiworld game, you will be asked to provide your YAML file to whoever is hosting. Once that is done,
|
||||
the host will provide you with either a link to download your data file, or with a zip file containing everyone's data
|
||||
files. You do not have a file inside that zip though!
|
||||
|
||||
You need to start ChecksFinder client yourself, it is located within the Archipelago folder.
|
||||
|
||||
### Connect to the MultiServer
|
||||
|
||||
First start ChecksFinder.
|
||||
|
||||
Once both ChecksFinder and the client are started. In the client at the top type in the spot labeled `Server` type the
|
||||
`Ip Address` and `Port` separated with a `:` symbol.
|
||||
|
||||
The client will then ask for the username you chose, input that in the text box at the bottom of the client.
|
||||
|
||||
### Play the game
|
||||
|
||||
When the console tells you that you have joined the room, you're all set. Congratulations on successfully joining a
|
||||
multiworld game!
|
||||
1. Start ChecksFinder
|
||||
2. Enter the following information:
|
||||
- Enter the server url (starting from `wss://` for https connection like archipelago.gg, and starting from `ws://` for http connection and local multiserver)
|
||||
- Enter server port
|
||||
- Enter the name of the slot you wish to connect to
|
||||
- Enter the room password (optional)
|
||||
- Press `Play Online` to connect
|
||||
3. Start playing!
|
||||
|
||||
Game options and controls are described in the readme on the github repository for the game
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
from Options import OptionGroup, Choice, DefaultOnToggle, Range, Toggle, PerGameCommonOptions, StartInventoryPool
|
||||
from Options import (OptionGroup, Choice, DefaultOnToggle, ItemsAccessibility, PerGameCommonOptions, Range, Toggle,
|
||||
StartInventoryPool)
|
||||
|
||||
|
||||
class CharacterStages(Choice):
|
||||
@@ -521,6 +522,7 @@ class DeathLink(Choice):
|
||||
|
||||
@dataclass
|
||||
class CV64Options(PerGameCommonOptions):
|
||||
accessibility: ItemsAccessibility
|
||||
start_inventory_from_pool: StartInventoryPool
|
||||
character_stages: CharacterStages
|
||||
stage_shuffle: StageShuffle
|
||||
|
||||
@@ -660,11 +660,18 @@ commands.add_command("ap-get-technology", "Grant a technology, used by the Archi
|
||||
end
|
||||
local tech
|
||||
local force = game.forces["player"]
|
||||
if call.parameter == nil then
|
||||
game.print("ap-get-technology is only to be used by the Archipelago Factorio Client")
|
||||
return
|
||||
end
|
||||
chunks = split(call.parameter, "\t")
|
||||
local item_name = chunks[1]
|
||||
local index = chunks[2]
|
||||
local source = chunks[3] or "Archipelago"
|
||||
if index == -1 then -- for coop sync and restoring from an older savegame
|
||||
if index == nil then
|
||||
game.print("ap-get-technology is only to be used by the Archipelago Factorio Client")
|
||||
return
|
||||
elseif index == -1 then -- for coop sync and restoring from an older savegame
|
||||
tech = force.technologies[item_name]
|
||||
if tech.researched ~= true then
|
||||
game.print({"", "Received [technology=" .. tech.name .. "] as it is already checked."})
|
||||
|
||||
@@ -71,7 +71,7 @@ class FFMQClient(SNIClient):
|
||||
received = await snes_read(ctx, RECEIVED_DATA[0], RECEIVED_DATA[1])
|
||||
data = await snes_read(ctx, READ_DATA_START, READ_DATA_END - READ_DATA_START)
|
||||
check_2 = await snes_read(ctx, 0xF53749, 1)
|
||||
if check_1 != b'01' or check_2 != b'01':
|
||||
if check_1 != b'\x01' or check_2 != b'\x01':
|
||||
return
|
||||
|
||||
def get_range(data_range):
|
||||
|
||||
@@ -216,7 +216,7 @@ def stage_set_rules(multiworld):
|
||||
multiworld.worlds[player].options.accessibility == "minimal"]) * 3):
|
||||
for player in no_enemies_players:
|
||||
for location in vendor_locations:
|
||||
if multiworld.worlds[player].options.accessibility == "locations":
|
||||
if multiworld.worlds[player].options.accessibility == "full":
|
||||
multiworld.get_location(location, player).progress_type = LocationProgressType.EXCLUDED
|
||||
else:
|
||||
multiworld.get_location(location, player).access_rule = lambda state: False
|
||||
|
||||
@@ -25,14 +25,25 @@ from .Client import FFMQClient
|
||||
|
||||
|
||||
class FFMQWebWorld(WebWorld):
|
||||
tutorials = [Tutorial(
|
||||
setup_en = Tutorial(
|
||||
"Multiworld Setup Guide",
|
||||
"A guide to playing Final Fantasy Mystic Quest with Archipelago.",
|
||||
"English",
|
||||
"setup_en.md",
|
||||
"setup/en",
|
||||
["Alchav"]
|
||||
)]
|
||||
)
|
||||
|
||||
setup_fr = Tutorial(
|
||||
setup_en.tutorial_name,
|
||||
setup_en.description,
|
||||
"Français",
|
||||
"setup_fr.md",
|
||||
"setup/fr",
|
||||
["Artea"]
|
||||
)
|
||||
|
||||
tutorials = [setup_en, setup_fr]
|
||||
|
||||
|
||||
class FFMQWorld(World):
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# Final Fantasy Mystic Quest
|
||||
|
||||
## Game page in other languages:
|
||||
* [Français](/games/Final%20Fantasy%20Mystic%20Quest/info/fr)
|
||||
|
||||
## Where is the options page?
|
||||
|
||||
The [player options page for this game](../player-options) contains all the options you need to configure and export a
|
||||
|
||||
36
worlds/ffmq/docs/fr_Final Fantasy Mystic Quest.md
Normal file
36
worlds/ffmq/docs/fr_Final Fantasy Mystic Quest.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Final Fantasy Mystic Quest
|
||||
|
||||
## Page d'info dans d'autres langues :
|
||||
* [English](/games/Final%20Fantasy%20Mystic%20Quest/info/en)
|
||||
|
||||
## Où se situe la page d'options?
|
||||
|
||||
La [page de configuration](../player-options) contient toutes les options nécessaires pour créer un fichier de configuration.
|
||||
|
||||
## Qu'est-ce qui est rendu aléatoire dans ce jeu?
|
||||
|
||||
Outre les objets mélangés, il y a plusieurs options pour aussi mélanger les villes et donjons, les pièces dans les donjons, les téléporteurs et les champs de bataille.
|
||||
Il y a aussi plusieurs autres options afin d'ajuster la difficulté du jeu et la vitesse d'une partie.
|
||||
|
||||
## Quels objets et emplacements sont mélangés?
|
||||
|
||||
Les objets normalement reçus des coffres rouges, des PNJ et des champs de bataille sont mélangés. Vous pouvez aussi
|
||||
inclure les objets des coffres bruns (qui contiennent normalement des consommables) dans les objets mélangés.
|
||||
|
||||
## Quels objets peuvent être dans les mondes des autres joueurs?
|
||||
|
||||
Tous les objets qui ont été déterminés mélangés dans les options peuvent être placés dans d'autres mondes.
|
||||
|
||||
## À quoi ressemblent les objets des autres joueurs dans Final Fantasy Mystic Quest?
|
||||
|
||||
Les emplacements qui étaient à l'origine des coffres (rouges ou bruns si ceux-ci sont inclus) apparaîtront comme des coffres.
|
||||
Les coffres rouges seront des objets utiles ou de progression, alors que les coffres bruns seront des objets de remplissage.
|
||||
Les pièges peuvent apparaître comme des coffres rouges ou bruns.
|
||||
Lorsque vous ouvrirez un coffre contenant un objet d'un autre joueur, vous recevrez l'icône d'Archipelago et
|
||||
la boîte de dialogue vous indiquera avoir reçu un "Archipelago Item".
|
||||
|
||||
|
||||
## Lorsqu'un joueur reçoit un objet, qu'arrive-t-il?
|
||||
|
||||
Une boîte de dialogue apparaîtra pour vous montrer l'objet que vous avez reçu. Vous ne pourrez pas recevoir d'objet si vous êtes
|
||||
en combat, dans la mappemonde ou dans les menus (à l'exception de lorsque vous fermez le menu).
|
||||
@@ -17,6 +17,12 @@ The Archipelago community cannot supply you with this.
|
||||
|
||||
## Installation Procedures
|
||||
|
||||
### Linux Setup
|
||||
|
||||
1. Download and install [Archipelago](<https://github.com/ArchipelagoMW/Archipelago/releases/latest>). **The installer
|
||||
file is located in the assets section at the bottom of the version information. You'll likely be looking for the `.AppImage`.**
|
||||
2. It is recommended to use either RetroArch or BizHawk if you run on linux, as snes9x-rr isn't compatible.
|
||||
|
||||
### Windows Setup
|
||||
|
||||
1. Download and install [Archipelago](<https://github.com/ArchipelagoMW/Archipelago/releases/latest>). **The installer
|
||||
@@ -75,8 +81,7 @@ Manually launch the SNI Client, and run the patched ROM in your chosen software
|
||||
|
||||
#### With an emulator
|
||||
|
||||
When the client launched automatically, SNI should have also automatically launched in the background. If this is its
|
||||
first time launching, you may be prompted to allow it to communicate through the Windows Firewall.
|
||||
If this is the first time SNI launches, you may be prompted to allow it to communicate through the Windows Firewall.
|
||||
|
||||
##### snes9x-rr
|
||||
|
||||
@@ -133,10 +138,10 @@ page: [usb2snes Supported Platforms Page](http://usb2snes.com/#supported-platfor
|
||||
|
||||
### Connect to the Archipelago Server
|
||||
|
||||
The patch file which launched your client should have automatically connected you to the AP Server. There are a few
|
||||
reasons this may not happen however, including if the game is hosted on the website but was generated elsewhere. If the
|
||||
client window shows "Server Status: Not Connected", simply ask the host for the address of the server, and copy/paste it
|
||||
into the "Server" input field then press enter.
|
||||
SNI serves as the interface between your emulator and the server. Since you launched it manually, you need to tell it what server to connect to.
|
||||
If the server is hosted on Archipelago.gg, get the port the server hosts your game on at the top of the game room (last line before the worlds are listed).
|
||||
In the SNI client, either type `/connect address` (where `address` is the address of the server, for example `/connect archipelago.gg:12345`), or type the address and port on the "Server" input field, then press `Connect`.
|
||||
If the server is hosted locally, simply ask the host for the address of the server, and copy/paste it into the "Server" input field then press `Connect`.
|
||||
|
||||
The client will attempt to reconnect to the new server address, and should momentarily show "Server Status: Connected".
|
||||
|
||||
|
||||
178
worlds/ffmq/docs/setup_fr.md
Normal file
178
worlds/ffmq/docs/setup_fr.md
Normal file
@@ -0,0 +1,178 @@
|
||||
# Final Fantasy Mystic Quest Setup Guide
|
||||
|
||||
## Logiciels requis
|
||||
|
||||
- [Archipelago](https://github.com/ArchipelagoMW/Archipelago/releases)
|
||||
- Une solution logicielle ou matérielle capable de charger et de lancer des fichiers ROM de SNES
|
||||
- Un émulateur capable d'éxécuter des scripts Lua
|
||||
- snes9x-rr de: [snes9x rr](https://github.com/gocha/snes9x-rr/releases),
|
||||
- BizHawk from: [BizHawk Website](http://tasvideos.org/BizHawk.html),
|
||||
- RetroArch 1.10.1 or newer from: [RetroArch Website](https://retroarch.com?page=platforms). Ou,
|
||||
- Un SD2SNES, [FXPak Pro](https://krikzz.com/store/home/54-fxpak-pro.html), ou une autre solution matérielle
|
||||
compatible
|
||||
- Le fichier ROM de la v1.0 ou v1.1 NA de Final Fantasy Mystic Quest obtenu légalement, sûrement nommé `Final Fantasy - Mystic Quest (U) (V1.0).sfc` ou `Final Fantasy - Mystic Quest (U) (V1.1).sfc`
|
||||
La communauté d'Archipelago ne peut vous fournir avec ce fichier.
|
||||
|
||||
## Procédure d'installation
|
||||
|
||||
### Installation sur Linux
|
||||
|
||||
1. Téléchargez et installez [Archipelago](<https://github.com/ArchipelagoMW/Archipelago/releases/latest>).
|
||||
** Le fichier d'installation est situé dans la section "assets" dans le bas de la fenêtre d'information de la version. Vous voulez probablement le `.AppImage`**
|
||||
2. L'utilisation de RetroArch ou BizHawk est recommandé pour les utilisateurs linux, puisque snes9x-rr n'est pas compatible.
|
||||
|
||||
### Installation sur Windows
|
||||
|
||||
1. Téléchargez et installez [Archipelago](<https://github.com/ArchipelagoMW/Archipelago/releases/latest>).
|
||||
** Le fichier d'installation est situé dans la section "assets" dans le bas de la fenêtre d'information de la version.**
|
||||
2. Si vous utilisez un émulateur, il est recommandé d'assigner votre émulateur capable d'éxécuter des scripts Lua comme
|
||||
programme par défaut pour ouvrir vos ROMs.
|
||||
1. Extrayez votre dossier d'émulateur sur votre Bureau, ou à un endroit dont vous vous souviendrez.
|
||||
2. Faites un clic droit sur un fichier ROM et sélectionnez **Ouvrir avec...**
|
||||
3. Cochez la case à côté de **Toujours utiliser cette application pour ouvrir les fichiers `.sfc`**
|
||||
4. Descendez jusqu'en bas de la liste et sélectionnez **Rechercher une autre application sur ce PC**
|
||||
5. Naviguez dans les dossiers jusqu'au fichier `.exe` de votre émulateur et choisissez **Ouvrir**. Ce fichier
|
||||
devrait se trouver dans le dossier que vous avez extrait à la première étape.
|
||||
|
||||
|
||||
## Créer son fichier de configuration (.yaml)
|
||||
|
||||
### Qu'est-ce qu'un fichier de configuration et pourquoi en ai-je besoin ?
|
||||
|
||||
Votre fichier de configuration contient un ensemble d'options de configuration pour indiquer au générateur
|
||||
comment il devrait générer votre seed. Chaque joueur d'un multiworld devra fournir son propre fichier de configuration. Cela permet
|
||||
à chaque joueur d'apprécier une expérience personalisée. Les différents joueurs d'un même multiworld
|
||||
pouront avoir des options de génération différentes.
|
||||
Vous pouvez lire le [guide pour créer un YAML de base](/tutorial/Archipelago/setup/en) en anglais.
|
||||
|
||||
### Où est-ce que j'obtiens un fichier de configuration ?
|
||||
|
||||
La [page d'options sur le site](/games/Final%20Fantasy%20Mystic%20Quest/player-options) vous permet de choisir vos
|
||||
options de génération et de les exporter vers un fichier de configuration.
|
||||
Il vous est aussi possible de trouver le fichier de configuration modèle de Mystic Quest dans votre répertoire d'installation d'Archipelago,
|
||||
dans le dossier Players/Templates.
|
||||
|
||||
### Vérifier son fichier de configuration
|
||||
|
||||
Si vous voulez valider votre fichier de configuration pour être sûr qu'il fonctionne, vous pouvez le vérifier sur la page du
|
||||
[Validateur de YAML](/mysterycheck).
|
||||
|
||||
## Générer une partie pour un joueur
|
||||
|
||||
1. Aller sur la page [Génération de partie](/games/Final%20Fantasy%20Mystic%20Quest/player-options), configurez vos options,
|
||||
et cliquez sur le bouton "Generate Game".
|
||||
2. Il vous sera alors présenté une page d'informations sur la seed
|
||||
3. Cliquez sur le lien "Create New Room".
|
||||
4. Vous verrez s'afficher la page du server, de laquelle vous pourrez télécharger votre fichier patch `.apmq`.
|
||||
5. Rendez-vous sur le [site FFMQR](https://ffmqrando.net/Archipelago).
|
||||
Sur cette page, sélectionnez votre ROM Final Fantasy Mystic Quest original dans le boîte "ROM", puis votre ficher patch `.apmq` dans la boîte "Load Archipelago Config File".
|
||||
Cliquez sur "Generate". Un téléchargement avec votre ROM aléatoire devrait s'amorcer.
|
||||
6. Puisque cette partie est à un seul joueur, vous n'avez plus besoin du client Archipelago ni du serveur, sentez-vous libre de les fermer.
|
||||
|
||||
## Rejoindre un MultiWorld
|
||||
|
||||
### Obtenir son patch et créer sa ROM
|
||||
|
||||
Quand vous rejoignez un multiworld, il vous sera demandé de fournir votre fichier de configuration à celui qui héberge la partie ou
|
||||
s'occupe de la génération. Une fois cela fait, l'hôte vous fournira soit un lien pour télécharger votre patch, soit un
|
||||
fichier `.zip` contenant les patchs de tous les joueurs. Votre patch devrait avoir l'extension `.apmq`.
|
||||
|
||||
Allez au [site FFMQR](https://ffmqrando.net/Archipelago) et sélectionnez votre ROM Final Fantasy Mystic Quest original dans le boîte "ROM", puis votre ficher patch `.apmq` dans la boîte "Load Archipelago Config File".
|
||||
Cliquez sur "Generate". Un téléchargement avec votre ROM aléatoire devrait s'amorcer.
|
||||
|
||||
Ouvrez le client SNI (sur Windows ArchipelagoSNIClient.exe, sur Linux ouvrez le `.appImage` puis cliquez sur SNI Client), puis ouvrez le ROM téléchargé avec votre émulateur choisi.
|
||||
|
||||
### Se connecter au client
|
||||
|
||||
#### Avec un émulateur
|
||||
|
||||
Quand le client se lance automatiquement, QUsb2Snes devrait également se lancer automatiquement en arrière-plan. Si
|
||||
c'est la première fois qu'il démarre, il vous sera peut-être demandé de l'autoriser à communiquer à travers le pare-feu
|
||||
Windows.
|
||||
|
||||
##### snes9x-rr
|
||||
|
||||
1. Chargez votre ROM si ce n'est pas déjà fait.
|
||||
2. Cliquez sur le menu "File" et survolez l'option **Lua Scripting**
|
||||
3. Cliquez alors sur **New Lua Script Window...**
|
||||
4. Dans la nouvelle fenêtre, sélectionnez **Browse...**
|
||||
5. Sélectionnez le fichier connecteur lua fourni avec votre client
|
||||
- Regardez dans le dossier Archipelago et cherchez `/SNI/lua/x64` ou `/SNI/lua/x86`, dépendemment de si votre emulateur
|
||||
est 64-bit ou 32-bit.
|
||||
6. Si vous obtenez une erreur `socket.dll missing` ou une erreur similaire lorsque vous chargez le script lua, vous devez naviguer dans le dossier
|
||||
contenant le script lua, puis copier le fichier `socket.dll` dans le dossier d'installation de votre emulateur snes9x.
|
||||
|
||||
##### BizHawk
|
||||
|
||||
1. Assurez vous d'avoir le coeur BSNES chargé. Cela est possible en cliquant sur le menu "Tools" de BizHawk et suivant
|
||||
ces options de menu :
|
||||
`Config --> Cores --> SNES --> BSNES`
|
||||
Une fois le coeur changé, vous devez redémarrer BizHawk.
|
||||
2. Chargez votre ROM si ce n'est pas déjà fait.
|
||||
3. Cliquez sur le menu "Tools" et cliquez sur **Lua Console**
|
||||
4. Cliquez sur le bouton pour ouvrir un nouveau script Lua, soit par le bouton avec un icône "Ouvrir un dossier",
|
||||
en cliquant `Open Script...` dans le menu Script ou en appuyant sur `ctrl-O`.
|
||||
5. Sélectionnez le fichier `Connector.lua` inclus avec le client
|
||||
- Regardez dans le dossier Archipelago et cherchez `/SNI/lua/x64` ou `/SNI/lua/x86`, dépendemment de si votre emulateur
|
||||
est 64-bit ou 32-bit. Notez que les versions les plus récentes de BizHawk ne sont que 64-bit.
|
||||
|
||||
##### RetroArch 1.10.1 ou plus récent
|
||||
|
||||
Vous ne devez faire ces étapes qu'une fois. À noter que RetroArch 1.9.x ne fonctionnera pas puisqu'il s'agit d'une version moins récente que 1.10.1.
|
||||
|
||||
1. Entrez dans le menu principal de RetroArch.
|
||||
2. Allez dans Settings --> User Interface. Activez l'option "Show Advanced Settings".
|
||||
3. Allez dans Settings --> Network. Activez l'option "Network Commands", qui se trouve sous "Request Device 16".
|
||||
Laissez le "Network Command Port" à sa valeur par defaut, qui devrait être 55355.
|
||||
|
||||
|
||||

|
||||
4. Allez dans le Menu Principal --> Online Updater --> Core Downloader. Trouvez et sélectionnez "Nintendo - SNES / SFC (bsnes-mercury
|
||||
Performance)".
|
||||
|
||||
Lorsque vous chargez un ROM pour Archipelago, assurez vous de toujours sélectionner le coeur **bsnes-mercury**.
|
||||
Ce sont les seuls coeurs qui permettent à des outils extérieurs de lire les données du ROM.
|
||||
|
||||
#### Avec une solution matérielle
|
||||
|
||||
Ce guide suppose que vous avez téléchargé le bon micro-logiciel pour votre appareil. Si ce n'est pas déjà le cas, faites
|
||||
le maintenant. Les utilisateurs de SD2SNES et de FXPak Pro peuvent télécharger le micro-logiciel approprié
|
||||
[ici](https://github.com/RedGuyyyy/sd2snes/releases). Pour les autres solutions, de l'aide peut être trouvée
|
||||
[sur cette page](http://usb2snes.com/#supported-platforms).
|
||||
|
||||
1. Fermez votre émulateur, qui s'est potentiellement lancé automatiquement.
|
||||
2. Ouvrez votre appareil et chargez le ROM.
|
||||
|
||||
### Se connecter au MultiServer
|
||||
|
||||
Puisque vous avez lancé SNI manuellement, vous devrez probablement lui indiquer l'adresse à laquelle il doit se connecter.
|
||||
Si le serveur est hébergé sur le site d'Archipelago, vous verrez l'adresse à laquelle vous connecter dans le haut de la page, dernière ligne avant la liste des mondes.
|
||||
Tapez `/connect adresse` (ou le "adresse" est remplacé par l'adresse archipelago, par exemple `/connect archipelago.gg:12345`) dans la boîte de commande au bas de votre client SNI, ou encore écrivez l'adresse dans la boîte "server" dans le haut du client, puis cliquez `Connect`.
|
||||
Si le serveur n'est pas hébergé sur le site d'Archipelago, demandez à l'hôte l'adresse du serveur, puis tapez `/connect adresse` (ou "adresse" est remplacé par l'adresse fourni par l'hôte) ou copiez/collez cette adresse dans le champ "Server" puis appuyez sur "Connect".
|
||||
|
||||
Le client essaiera de vous reconnecter à la nouvelle adresse du serveur, et devrait mentionner "Server Status:
|
||||
Connected". Si le client ne se connecte pas après quelques instants, il faudra peut-être rafraîchir la page de
|
||||
l'interface Web.
|
||||
|
||||
### Jouer au jeu
|
||||
|
||||
Une fois que l'interface Web affiche que la SNES et le serveur sont connectés, vous êtes prêt à jouer. Félicitations
|
||||
pour avoir rejoint un multiworld !
|
||||
|
||||
## Héberger un MultiWorld
|
||||
|
||||
La méthode recommandée pour héberger une partie est d'utiliser le service d'hébergement fourni par
|
||||
Archipelago. Le processus est relativement simple :
|
||||
|
||||
1. Récupérez les fichiers de configuration (.yaml) des joueurs.
|
||||
2. Créez une archive zip contenant ces fichiers de configuration.
|
||||
3. Téléversez l'archive zip sur le lien ci-dessous.
|
||||
- Generate page: [WebHost Seed Generation Page](/generate)
|
||||
4. Attendez un moment que la seed soit générée.
|
||||
5. Lorsque la seed est générée, vous serez redirigé vers une page d'informations "Seed Info".
|
||||
6. Cliquez sur "Create New Room". Cela vous amènera à la page du serveur. Fournissez le lien de cette page aux autres
|
||||
joueurs afin qu'ils puissent récupérer leurs patchs.
|
||||
7. Remarquez qu'un lien vers le traqueur du MultiWorld est en haut de la page de la salle. Vous devriez également
|
||||
fournir ce lien aux joueurs pour qu'ils puissent suivre la progression de la partie. N'importe quelle personne voulant
|
||||
observer devrait avoir accès à ce lien.
|
||||
8. Une fois que tous les joueurs ont rejoint, vous pouvez commencer à jouer.
|
||||
@@ -102,10 +102,10 @@ See the plando guide for more info on plando options. Plando
|
||||
guide: [Archipelago Plando Guide](/tutorial/Archipelago/plando/en)
|
||||
|
||||
* `accessibility` determines the level of access to the game the generation will expect you to have in order to reach
|
||||
your completion goal. This supports `items`, `locations`, and `minimal` and is set to `locations` by default.
|
||||
* `locations` will guarantee all locations are accessible in your world.
|
||||
your completion goal. This supports `full`, `items`, and `minimal` and is set to `full` by default.
|
||||
* `full` will guarantee all locations are accessible in your world.
|
||||
* `items` will guarantee you can acquire all logically relevant items in your world. Some items, such as keys, may
|
||||
be self-locking.
|
||||
be self-locking. This value only exists in and affects some worlds.
|
||||
* `minimal` will only guarantee that the seed is beatable. You will be guaranteed able to finish the seed logically
|
||||
but may not be able to access all locations or acquire all items. A good example of this is having a big key in
|
||||
the big chest in a dungeon in ALTTP making it impossible to get and finish the dungeon.
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import typing
|
||||
import re
|
||||
from dataclasses import dataclass, make_dataclass
|
||||
|
||||
from .ExtractedData import logic_options, starts, pool_options
|
||||
from .Rules import cost_terms
|
||||
from schema import And, Schema, Optional
|
||||
|
||||
from Options import Option, DefaultOnToggle, Toggle, Choice, Range, OptionDict, NamedRange, DeathLink
|
||||
from Options import Option, DefaultOnToggle, Toggle, Choice, Range, OptionDict, NamedRange, DeathLink, PerGameCommonOptions
|
||||
from .Charms import vanilla_costs, names as charm_names
|
||||
|
||||
if typing.TYPE_CHECKING:
|
||||
@@ -403,9 +405,20 @@ class Goal(Choice):
|
||||
option_radiance = 3
|
||||
option_godhome = 4
|
||||
option_godhome_flower = 5
|
||||
option_grub_hunt = 6
|
||||
default = 0
|
||||
|
||||
|
||||
class GrubHuntGoal(NamedRange):
|
||||
"""The amount of grubs required to finish Grub Hunt.
|
||||
On 'All' any grubs from item links replacements etc. will be counted"""
|
||||
display_name = "Grub Hunt Goal"
|
||||
range_start = 1
|
||||
range_end = 46
|
||||
special_range_names = {"all": -1}
|
||||
default = 46
|
||||
|
||||
|
||||
class WhitePalace(Choice):
|
||||
"""
|
||||
Whether or not to include White Palace or not. Note: Even if excluded, the King Fragment check may still be
|
||||
@@ -520,7 +533,7 @@ hollow_knight_options: typing.Dict[str, type(Option)] = {
|
||||
**{
|
||||
option.__name__: option
|
||||
for option in (
|
||||
StartLocation, Goal, WhitePalace, ExtraPlatforms, AddUnshuffledLocations, StartingGeo,
|
||||
StartLocation, Goal, GrubHuntGoal, WhitePalace, ExtraPlatforms, AddUnshuffledLocations, StartingGeo,
|
||||
DeathLink, DeathLinkShade, DeathLinkBreaksFragileCharms,
|
||||
MinimumGeoPrice, MaximumGeoPrice,
|
||||
MinimumGrubPrice, MaximumGrubPrice,
|
||||
@@ -538,3 +551,5 @@ hollow_knight_options: typing.Dict[str, type(Option)] = {
|
||||
},
|
||||
**cost_sanity_weights
|
||||
}
|
||||
|
||||
HKOptions = make_dataclass("HKOptions", [(name, option) for name, option in hollow_knight_options.items()], bases=(PerGameCommonOptions,))
|
||||
|
||||
@@ -49,3 +49,42 @@ def set_rules(hk_world: World):
|
||||
if term == "GEO": # No geo logic!
|
||||
continue
|
||||
add_rule(location, lambda state, term=term, amount=amount: state.count(term, player) >= amount)
|
||||
|
||||
|
||||
def _hk_nail_combat(state, player) -> bool:
|
||||
return state.has_any({'LEFTSLASH', 'RIGHTSLASH', 'UPSLASH'}, player)
|
||||
|
||||
|
||||
def _hk_can_beat_thk(state, player) -> bool:
|
||||
return (
|
||||
state.has('Opened_Black_Egg_Temple', player)
|
||||
and (state.count('FIREBALL', player) + state.count('SCREAM', player) + state.count('QUAKE', player)) > 1
|
||||
and _hk_nail_combat(state, player)
|
||||
and (
|
||||
state.has_any({'LEFTDASH', 'RIGHTDASH'}, player)
|
||||
or state._hk_option(player, 'ProficientCombat')
|
||||
)
|
||||
and state.has('FOCUS', player)
|
||||
)
|
||||
|
||||
|
||||
def _hk_siblings_ending(state, player) -> bool:
|
||||
return _hk_can_beat_thk(state, player) and state.has('WHITEFRAGMENT', player, 3)
|
||||
|
||||
|
||||
def _hk_can_beat_radiance(state, player) -> bool:
|
||||
return (
|
||||
state.has('Opened_Black_Egg_Temple', player)
|
||||
and _hk_nail_combat(state, player)
|
||||
and state.has('WHITEFRAGMENT', player, 3)
|
||||
and state.has('DREAMNAIL', player)
|
||||
and (
|
||||
(state.has('LEFTCLAW', player) and state.has('RIGHTCLAW', player))
|
||||
or state.has('WINGS', player)
|
||||
)
|
||||
and (state.count('FIREBALL', player) + state.count('SCREAM', player) + state.count('QUAKE', player)) > 1
|
||||
and (
|
||||
(state.has('LEFTDASH', player, 2) and state.has('RIGHTDASH', player, 2)) # Both Shade Cloaks
|
||||
or (state._hk_option(player, 'ProficientCombat') and state.has('QUAKE', player)) # or Dive
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,19 +5,20 @@ import typing
|
||||
from copy import deepcopy
|
||||
import itertools
|
||||
import operator
|
||||
from collections import defaultdict, Counter
|
||||
|
||||
logger = logging.getLogger("Hollow Knight")
|
||||
|
||||
from .Items import item_table, lookup_type_to_names, item_name_groups
|
||||
from .Regions import create_regions
|
||||
from .Rules import set_rules, cost_terms
|
||||
from .Rules import set_rules, cost_terms, _hk_can_beat_thk, _hk_siblings_ending, _hk_can_beat_radiance
|
||||
from .Options import hollow_knight_options, hollow_knight_randomize_options, Goal, WhitePalace, CostSanity, \
|
||||
shop_to_option
|
||||
shop_to_option, HKOptions, GrubHuntGoal
|
||||
from .ExtractedData import locations, starts, multi_locations, location_to_region_lookup, \
|
||||
event_names, item_effects, connectors, one_ways, vanilla_shop_costs, vanilla_location_costs
|
||||
from .Charms import names as charm_names
|
||||
|
||||
from BaseClasses import Region, Location, MultiWorld, Item, LocationProgressType, Tutorial, ItemClassification
|
||||
from BaseClasses import Region, Location, MultiWorld, Item, LocationProgressType, Tutorial, ItemClassification, CollectionState
|
||||
from worlds.AutoWorld import World, LogicMixin, WebWorld
|
||||
|
||||
path_of_pain_locations = {
|
||||
@@ -142,7 +143,8 @@ class HKWorld(World):
|
||||
As the enigmatic Knight, you’ll traverse the depths, unravel its mysteries and conquer its evils.
|
||||
""" # from https://www.hollowknight.com
|
||||
game: str = "Hollow Knight"
|
||||
option_definitions = hollow_knight_options
|
||||
options_dataclass = HKOptions
|
||||
options: HKOptions
|
||||
|
||||
web = HKWeb()
|
||||
|
||||
@@ -154,40 +156,42 @@ class HKWorld(World):
|
||||
ranges: typing.Dict[str, typing.Tuple[int, int]]
|
||||
charm_costs: typing.List[int]
|
||||
cached_filler_items = {}
|
||||
grub_count: int
|
||||
|
||||
def __init__(self, world, player):
|
||||
super(HKWorld, self).__init__(world, player)
|
||||
def __init__(self, multiworld, player):
|
||||
super(HKWorld, self).__init__(multiworld, player)
|
||||
self.created_multi_locations: typing.Dict[str, typing.List[HKLocation]] = {
|
||||
location: list() for location in multi_locations
|
||||
}
|
||||
self.ranges = {}
|
||||
self.created_shop_items = 0
|
||||
self.vanilla_shop_costs = deepcopy(vanilla_shop_costs)
|
||||
self.grub_count = 0
|
||||
|
||||
def generate_early(self):
|
||||
world = self.multiworld
|
||||
charm_costs = world.RandomCharmCosts[self.player].get_costs(world.random)
|
||||
self.charm_costs = world.PlandoCharmCosts[self.player].get_costs(charm_costs)
|
||||
# world.exclude_locations[self.player].value.update(white_palace_locations)
|
||||
options = self.options
|
||||
charm_costs = options.RandomCharmCosts.get_costs(self.random)
|
||||
self.charm_costs = options.PlandoCharmCosts.get_costs(charm_costs)
|
||||
# options.exclude_locations.value.update(white_palace_locations)
|
||||
for term, data in cost_terms.items():
|
||||
mini = getattr(world, f"Minimum{data.option}Price")[self.player]
|
||||
maxi = getattr(world, f"Maximum{data.option}Price")[self.player]
|
||||
mini = getattr(options, f"Minimum{data.option}Price")
|
||||
maxi = getattr(options, f"Maximum{data.option}Price")
|
||||
# if minimum > maximum, set minimum to maximum
|
||||
mini.value = min(mini.value, maxi.value)
|
||||
self.ranges[term] = mini.value, maxi.value
|
||||
world.push_precollected(HKItem(starts[world.StartLocation[self.player].current_key],
|
||||
self.multiworld.push_precollected(HKItem(starts[options.StartLocation.current_key],
|
||||
True, None, "Event", self.player))
|
||||
|
||||
def white_palace_exclusions(self):
|
||||
exclusions = set()
|
||||
wp = self.multiworld.WhitePalace[self.player]
|
||||
wp = self.options.WhitePalace
|
||||
if wp <= WhitePalace.option_nopathofpain:
|
||||
exclusions.update(path_of_pain_locations)
|
||||
if wp <= WhitePalace.option_kingfragment:
|
||||
exclusions.update(white_palace_checks)
|
||||
if wp == WhitePalace.option_exclude:
|
||||
exclusions.add("King_Fragment")
|
||||
if self.multiworld.RandomizeCharms[self.player]:
|
||||
if self.options.RandomizeCharms:
|
||||
# If charms are randomized, this will be junk-filled -- so transitions and events are not progression
|
||||
exclusions.update(white_palace_transitions)
|
||||
exclusions.update(white_palace_events)
|
||||
@@ -200,7 +204,7 @@ class HKWorld(World):
|
||||
|
||||
# check for any goal that godhome events are relevant to
|
||||
all_event_names = event_names.copy()
|
||||
if self.multiworld.Goal[self.player] in [Goal.option_godhome, Goal.option_godhome_flower]:
|
||||
if self.options.Goal in [Goal.option_godhome, Goal.option_godhome_flower, Goal.option_any]:
|
||||
from .GodhomeData import godhome_event_names
|
||||
all_event_names.update(set(godhome_event_names))
|
||||
|
||||
@@ -230,12 +234,12 @@ class HKWorld(World):
|
||||
pool: typing.List[HKItem] = []
|
||||
wp_exclusions = self.white_palace_exclusions()
|
||||
junk_replace: typing.Set[str] = set()
|
||||
if self.multiworld.RemoveSpellUpgrades[self.player]:
|
||||
if self.options.RemoveSpellUpgrades:
|
||||
junk_replace.update(("Abyss_Shriek", "Shade_Soul", "Descending_Dark"))
|
||||
|
||||
randomized_starting_items = set()
|
||||
for attr, items in randomizable_starting_items.items():
|
||||
if getattr(self.multiworld, attr)[self.player]:
|
||||
if getattr(self.options, attr):
|
||||
randomized_starting_items.update(items)
|
||||
|
||||
# noinspection PyShadowingNames
|
||||
@@ -257,7 +261,7 @@ class HKWorld(World):
|
||||
if item_name in junk_replace:
|
||||
item_name = self.get_filler_item_name()
|
||||
|
||||
item = self.create_item(item_name) if not vanilla or location_name == "Start" or self.multiworld.AddUnshuffledLocations[self.player] else self.create_event(item_name)
|
||||
item = self.create_item(item_name) if not vanilla or location_name == "Start" or self.options.AddUnshuffledLocations else self.create_event(item_name)
|
||||
|
||||
if location_name == "Start":
|
||||
if item_name in randomized_starting_items:
|
||||
@@ -281,55 +285,55 @@ class HKWorld(World):
|
||||
location.progress_type = LocationProgressType.EXCLUDED
|
||||
|
||||
for option_key, option in hollow_knight_randomize_options.items():
|
||||
randomized = getattr(self.multiworld, option_key)[self.player]
|
||||
if all([not randomized, option_key in logicless_options, not self.multiworld.AddUnshuffledLocations[self.player]]):
|
||||
randomized = getattr(self.options, option_key)
|
||||
if all([not randomized, option_key in logicless_options, not self.options.AddUnshuffledLocations]):
|
||||
continue
|
||||
for item_name, location_name in zip(option.items, option.locations):
|
||||
if item_name in junk_replace:
|
||||
item_name = self.get_filler_item_name()
|
||||
|
||||
if (item_name == "Crystal_Heart" and self.multiworld.SplitCrystalHeart[self.player]) or \
|
||||
(item_name == "Mothwing_Cloak" and self.multiworld.SplitMothwingCloak[self.player]):
|
||||
if (item_name == "Crystal_Heart" and self.options.SplitCrystalHeart) or \
|
||||
(item_name == "Mothwing_Cloak" and self.options.SplitMothwingCloak):
|
||||
_add("Left_" + item_name, location_name, randomized)
|
||||
_add("Right_" + item_name, "Split_" + location_name, randomized)
|
||||
continue
|
||||
if item_name == "Mantis_Claw" and self.multiworld.SplitMantisClaw[self.player]:
|
||||
if item_name == "Mantis_Claw" and self.options.SplitMantisClaw:
|
||||
_add("Left_" + item_name, "Left_" + location_name, randomized)
|
||||
_add("Right_" + item_name, "Right_" + location_name, randomized)
|
||||
continue
|
||||
if item_name == "Shade_Cloak" and self.multiworld.SplitMothwingCloak[self.player]:
|
||||
if self.multiworld.random.randint(0, 1):
|
||||
if item_name == "Shade_Cloak" and self.options.SplitMothwingCloak:
|
||||
if self.random.randint(0, 1):
|
||||
item_name = "Left_Mothwing_Cloak"
|
||||
else:
|
||||
item_name = "Right_Mothwing_Cloak"
|
||||
if item_name == "Grimmchild2" and self.multiworld.RandomizeGrimmkinFlames[self.player] and self.multiworld.RandomizeCharms[self.player]:
|
||||
if item_name == "Grimmchild2" and self.options.RandomizeGrimmkinFlames and self.options.RandomizeCharms:
|
||||
_add("Grimmchild1", location_name, randomized)
|
||||
continue
|
||||
|
||||
_add(item_name, location_name, randomized)
|
||||
|
||||
if self.multiworld.RandomizeElevatorPass[self.player]:
|
||||
if self.options.RandomizeElevatorPass:
|
||||
randomized = True
|
||||
_add("Elevator_Pass", "Elevator_Pass", randomized)
|
||||
|
||||
for shop, locations in self.created_multi_locations.items():
|
||||
for _ in range(len(locations), getattr(self.multiworld, shop_to_option[shop])[self.player].value):
|
||||
for _ in range(len(locations), getattr(self.options, shop_to_option[shop]).value):
|
||||
loc = self.create_location(shop)
|
||||
unfilled_locations += 1
|
||||
|
||||
# Balance the pool
|
||||
item_count = len(pool)
|
||||
additional_shop_items = max(item_count - unfilled_locations, self.multiworld.ExtraShopSlots[self.player].value)
|
||||
additional_shop_items = max(item_count - unfilled_locations, self.options.ExtraShopSlots.value)
|
||||
|
||||
# Add additional shop items, as needed.
|
||||
if additional_shop_items > 0:
|
||||
shops = list(shop for shop, locations in self.created_multi_locations.items() if len(locations) < 16)
|
||||
if not self.multiworld.EggShopSlots[self.player].value: # No eggshop, so don't place items there
|
||||
if not self.options.EggShopSlots: # No eggshop, so don't place items there
|
||||
shops.remove('Egg_Shop')
|
||||
|
||||
if shops:
|
||||
for _ in range(additional_shop_items):
|
||||
shop = self.multiworld.random.choice(shops)
|
||||
shop = self.random.choice(shops)
|
||||
loc = self.create_location(shop)
|
||||
unfilled_locations += 1
|
||||
if len(self.created_multi_locations[shop]) >= 16:
|
||||
@@ -355,7 +359,7 @@ class HKWorld(World):
|
||||
loc.costs = costs
|
||||
|
||||
def apply_costsanity(self):
|
||||
setting = self.multiworld.CostSanity[self.player].value
|
||||
setting = self.options.CostSanity.value
|
||||
if not setting:
|
||||
return # noop
|
||||
|
||||
@@ -369,10 +373,10 @@ class HKWorld(World):
|
||||
|
||||
return {k: v for k, v in weights.items() if v}
|
||||
|
||||
random = self.multiworld.random
|
||||
hybrid_chance = getattr(self.multiworld, f"CostSanityHybridChance")[self.player].value
|
||||
random = self.random
|
||||
hybrid_chance = getattr(self.options, f"CostSanityHybridChance").value
|
||||
weights = {
|
||||
data.term: getattr(self.multiworld, f"CostSanity{data.option}Weight")[self.player].value
|
||||
data.term: getattr(self.options, f"CostSanity{data.option}Weight").value
|
||||
for data in cost_terms.values()
|
||||
}
|
||||
weights_geoless = dict(weights)
|
||||
@@ -427,31 +431,86 @@ class HKWorld(World):
|
||||
location.sort_costs()
|
||||
|
||||
def set_rules(self):
|
||||
world = self.multiworld
|
||||
multiworld = self.multiworld
|
||||
player = self.player
|
||||
goal = world.Goal[player]
|
||||
goal = self.options.Goal
|
||||
if goal == Goal.option_hollowknight:
|
||||
world.completion_condition[player] = lambda state: state._hk_can_beat_thk(player)
|
||||
multiworld.completion_condition[player] = lambda state: _hk_can_beat_thk(state, player)
|
||||
elif goal == Goal.option_siblings:
|
||||
world.completion_condition[player] = lambda state: state._hk_siblings_ending(player)
|
||||
multiworld.completion_condition[player] = lambda state: _hk_siblings_ending(state, player)
|
||||
elif goal == Goal.option_radiance:
|
||||
world.completion_condition[player] = lambda state: state._hk_can_beat_radiance(player)
|
||||
multiworld.completion_condition[player] = lambda state: _hk_can_beat_radiance(state, player)
|
||||
elif goal == Goal.option_godhome:
|
||||
world.completion_condition[player] = lambda state: state.count("Defeated_Pantheon_5", player)
|
||||
multiworld.completion_condition[player] = lambda state: state.count("Defeated_Pantheon_5", player)
|
||||
elif goal == Goal.option_godhome_flower:
|
||||
world.completion_condition[player] = lambda state: state.count("Godhome_Flower_Quest", player)
|
||||
multiworld.completion_condition[player] = lambda state: state.count("Godhome_Flower_Quest", player)
|
||||
elif goal == Goal.option_grub_hunt:
|
||||
pass # will set in stage_pre_fill()
|
||||
else:
|
||||
# Any goal
|
||||
world.completion_condition[player] = lambda state: state._hk_can_beat_thk(player) or state._hk_can_beat_radiance(player)
|
||||
multiworld.completion_condition[player] = lambda state: _hk_siblings_ending(state, player) and \
|
||||
_hk_can_beat_radiance(state, player) and state.count("Godhome_Flower_Quest", player)
|
||||
|
||||
set_rules(self)
|
||||
|
||||
@classmethod
|
||||
def stage_pre_fill(cls, multiworld: "MultiWorld"):
|
||||
def set_goal(player, grub_rule: typing.Callable[[CollectionState], bool]):
|
||||
world = multiworld.worlds[player]
|
||||
|
||||
if world.options.Goal == "grub_hunt":
|
||||
multiworld.completion_condition[player] = grub_rule
|
||||
else:
|
||||
old_rule = multiworld.completion_condition[player]
|
||||
multiworld.completion_condition[player] = lambda state: old_rule(state) and grub_rule(state)
|
||||
|
||||
worlds = [world for world in multiworld.get_game_worlds(cls.game) if world.options.Goal in ["any", "grub_hunt"]]
|
||||
if worlds:
|
||||
grubs = [item for item in multiworld.get_items() if item.name == "Grub"]
|
||||
all_grub_players = [world.player for world in multiworld.worlds.values() if world.options.GrubHuntGoal == GrubHuntGoal.special_range_names["all"]]
|
||||
|
||||
if all_grub_players:
|
||||
group_lookup = defaultdict(set)
|
||||
for group_id, group in multiworld.groups.items():
|
||||
for player in group["players"]:
|
||||
group_lookup[group_id].add(player)
|
||||
|
||||
grub_count_per_player = Counter()
|
||||
per_player_grubs_per_player = defaultdict(Counter)
|
||||
|
||||
for grub in grubs:
|
||||
player = grub.player
|
||||
if player in group_lookup:
|
||||
for real_player in group_lookup[player]:
|
||||
per_player_grubs_per_player[real_player][player] += 1
|
||||
else:
|
||||
per_player_grubs_per_player[player][player] += 1
|
||||
|
||||
if grub.location and grub.location.player in group_lookup.keys():
|
||||
for real_player in group_lookup[grub.location.player]:
|
||||
grub_count_per_player[real_player] += 1
|
||||
else:
|
||||
grub_count_per_player[player] += 1
|
||||
|
||||
for player, count in grub_count_per_player.items():
|
||||
multiworld.worlds[player].grub_count = count
|
||||
|
||||
for player, grub_player_count in per_player_grubs_per_player.items():
|
||||
if player in all_grub_players:
|
||||
set_goal(player, lambda state, g=grub_player_count: all(state.has("Grub", owner, count) for owner, count in g.items()))
|
||||
|
||||
for world in worlds:
|
||||
if world.player not in all_grub_players:
|
||||
world.grub_count = world.options.GrubHuntGoal.value
|
||||
player = world.player
|
||||
set_goal(player, lambda state, p=player, c=world.grub_count: state.has("Grub", p, c))
|
||||
|
||||
def fill_slot_data(self):
|
||||
slot_data = {}
|
||||
|
||||
options = slot_data["options"] = {}
|
||||
for option_name in self.option_definitions:
|
||||
option = getattr(self.multiworld, option_name)[self.player]
|
||||
for option_name in hollow_knight_options:
|
||||
option = getattr(self.options, option_name)
|
||||
try:
|
||||
optionvalue = int(option.value)
|
||||
except TypeError:
|
||||
@@ -460,10 +519,10 @@ class HKWorld(World):
|
||||
options[option_name] = optionvalue
|
||||
|
||||
# 32 bit int
|
||||
slot_data["seed"] = self.multiworld.per_slot_randoms[self.player].randint(-2147483647, 2147483646)
|
||||
slot_data["seed"] = self.random.randint(-2147483647, 2147483646)
|
||||
|
||||
# Backwards compatibility for shop cost data (HKAP < 0.1.0)
|
||||
if not self.multiworld.CostSanity[self.player]:
|
||||
if not self.options.CostSanity:
|
||||
for shop, terms in shop_cost_types.items():
|
||||
unit = cost_terms[next(iter(terms))].option
|
||||
if unit == "Geo":
|
||||
@@ -483,6 +542,8 @@ class HKWorld(World):
|
||||
|
||||
slot_data["notch_costs"] = self.charm_costs
|
||||
|
||||
slot_data["grub_count"] = self.grub_count
|
||||
|
||||
return slot_data
|
||||
|
||||
def create_item(self, name: str) -> HKItem:
|
||||
@@ -498,7 +559,7 @@ class HKWorld(World):
|
||||
basename = name
|
||||
if name in shop_cost_types:
|
||||
costs = {
|
||||
term: self.multiworld.random.randint(*self.ranges[term])
|
||||
term: self.random.randint(*self.ranges[term])
|
||||
for term in shop_cost_types[name]
|
||||
}
|
||||
elif name in vanilla_location_costs:
|
||||
@@ -512,7 +573,7 @@ class HKWorld(World):
|
||||
|
||||
region = self.multiworld.get_region("Menu", self.player)
|
||||
|
||||
if vanilla and not self.multiworld.AddUnshuffledLocations[self.player]:
|
||||
if vanilla and not self.options.AddUnshuffledLocations:
|
||||
loc = HKLocation(self.player, name,
|
||||
None, region, costs=costs, vanilla=vanilla,
|
||||
basename=basename)
|
||||
@@ -560,26 +621,26 @@ class HKWorld(World):
|
||||
return change
|
||||
|
||||
@classmethod
|
||||
def stage_write_spoiler(cls, world: MultiWorld, spoiler_handle):
|
||||
hk_players = world.get_game_players(cls.game)
|
||||
def stage_write_spoiler(cls, multiworld: MultiWorld, spoiler_handle):
|
||||
hk_players = multiworld.get_game_players(cls.game)
|
||||
spoiler_handle.write('\n\nCharm Notches:')
|
||||
for player in hk_players:
|
||||
name = world.get_player_name(player)
|
||||
name = multiworld.get_player_name(player)
|
||||
spoiler_handle.write(f'\n{name}\n')
|
||||
hk_world: HKWorld = world.worlds[player]
|
||||
hk_world: HKWorld = multiworld.worlds[player]
|
||||
for charm_number, cost in enumerate(hk_world.charm_costs):
|
||||
spoiler_handle.write(f"\n{charm_names[charm_number]}: {cost}")
|
||||
|
||||
spoiler_handle.write('\n\nShop Prices:')
|
||||
for player in hk_players:
|
||||
name = world.get_player_name(player)
|
||||
name = multiworld.get_player_name(player)
|
||||
spoiler_handle.write(f'\n{name}\n')
|
||||
hk_world: HKWorld = world.worlds[player]
|
||||
hk_world: HKWorld = multiworld.worlds[player]
|
||||
|
||||
if world.CostSanity[player].value:
|
||||
if hk_world.options.CostSanity:
|
||||
for loc in sorted(
|
||||
(
|
||||
loc for loc in itertools.chain(*(region.locations for region in world.get_regions(player)))
|
||||
loc for loc in itertools.chain(*(region.locations for region in multiworld.get_regions(player)))
|
||||
if loc.costs
|
||||
), key=operator.attrgetter('name')
|
||||
):
|
||||
@@ -603,15 +664,15 @@ class HKWorld(World):
|
||||
'RandomizeGeoRocks', 'RandomizeSoulTotems', 'RandomizeLoreTablets', 'RandomizeJunkPitChests',
|
||||
'RandomizeRancidEggs'
|
||||
):
|
||||
if getattr(self.multiworld, group):
|
||||
if getattr(self.options, group):
|
||||
fillers.extend(item for item in hollow_knight_randomize_options[group].items if item not in
|
||||
exclusions)
|
||||
self.cached_filler_items[self.player] = fillers
|
||||
return self.multiworld.random.choice(self.cached_filler_items[self.player])
|
||||
return self.random.choice(self.cached_filler_items[self.player])
|
||||
|
||||
|
||||
def create_region(world: MultiWorld, player: int, name: str, location_names=None) -> Region:
|
||||
ret = Region(name, player, world)
|
||||
def create_region(multiworld: MultiWorld, player: int, name: str, location_names=None) -> Region:
|
||||
ret = Region(name, player, multiworld)
|
||||
if location_names:
|
||||
for location in location_names:
|
||||
loc_id = HKWorld.location_name_to_id.get(location, None)
|
||||
@@ -684,42 +745,7 @@ class HKLogicMixin(LogicMixin):
|
||||
return sum(self.multiworld.worlds[player].charm_costs[notch] for notch in notches)
|
||||
|
||||
def _hk_option(self, player: int, option_name: str) -> int:
|
||||
return getattr(self.multiworld, option_name)[player].value
|
||||
return getattr(self.multiworld.worlds[player].options, option_name).value
|
||||
|
||||
def _hk_start(self, player, start_location: str) -> bool:
|
||||
return self.multiworld.StartLocation[player] == start_location
|
||||
|
||||
def _hk_nail_combat(self, player: int) -> bool:
|
||||
return self.has_any({'LEFTSLASH', 'RIGHTSLASH', 'UPSLASH'}, player)
|
||||
|
||||
def _hk_can_beat_thk(self, player: int) -> bool:
|
||||
return (
|
||||
self.has('Opened_Black_Egg_Temple', player)
|
||||
and (self.count('FIREBALL', player) + self.count('SCREAM', player) + self.count('QUAKE', player)) > 1
|
||||
and self._hk_nail_combat(player)
|
||||
and (
|
||||
self.has_any({'LEFTDASH', 'RIGHTDASH'}, player)
|
||||
or self._hk_option(player, 'ProficientCombat')
|
||||
)
|
||||
and self.has('FOCUS', player)
|
||||
)
|
||||
|
||||
def _hk_siblings_ending(self, player: int) -> bool:
|
||||
return self._hk_can_beat_thk(player) and self.has('WHITEFRAGMENT', player, 3)
|
||||
|
||||
def _hk_can_beat_radiance(self, player: int) -> bool:
|
||||
return (
|
||||
self.has('Opened_Black_Egg_Temple', player)
|
||||
and self._hk_nail_combat(player)
|
||||
and self.has('WHITEFRAGMENT', player, 3)
|
||||
and self.has('DREAMNAIL', player)
|
||||
and (
|
||||
(self.has('LEFTCLAW', player) and self.has('RIGHTCLAW', player))
|
||||
or self.has('WINGS', player)
|
||||
)
|
||||
and (self.count('FIREBALL', player) + self.count('SCREAM', player) + self.count('QUAKE', player)) > 1
|
||||
and (
|
||||
(self.has('LEFTDASH', player, 2) and self.has('RIGHTDASH', player, 2)) # Both Shade Cloaks
|
||||
or (self._hk_option(player, 'ProficientCombat') and self.has('QUAKE', player)) # or Dive
|
||||
)
|
||||
)
|
||||
return self.multiworld.worlds[player].options.StartLocation == start_location
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
# Kingdom Hearts 2 Archipelago Setup Guide
|
||||
|
||||
<h2 style="text-transform:none";>Quick Links</h2>
|
||||
|
||||
- [Game Info Page](../../../../games/Kingdom%20Hearts%202/info/en)
|
||||
- [Player Options Page](../../../../games/Kingdom%20Hearts%202/player-options)
|
||||
|
||||
<h2 style="text-transform:none";>Required Software:</h2>
|
||||
`Kingdom Hearts II Final Mix` from the [Epic Games Store](https://store.epicgames.com/en-US/discover/kingdom-hearts)
|
||||
- Follow this Guide to set up these requirements [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/)<br>
|
||||
1. `3.2.0 OpenKH Mod Manager with Panacea`<br>
|
||||
2. `Lua Backend from the OpenKH Mod Manager`
|
||||
3. `Install the mod KH2FM-Mods-Num/GoA-ROM-Edition using OpenKH Mod Manager`<br>
|
||||
|
||||
`Kingdom Hearts II Final Mix` from the [Epic Games Store](https://store.epicgames.com/en-US/discover/kingdom-hearts) or [Steam](https://store.steampowered.com/app/2552430/KINGDOM_HEARTS_HD_1525_ReMIX/)
|
||||
|
||||
- Follow this Guide to set up these requirements [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/)
|
||||
1. `Version 3.3.0 or greater OpenKH Mod Manager with Panacea`
|
||||
2. `Lua Backend from the OpenKH Mod Manager`
|
||||
3. `Install the mod KH2FM-Mods-Num/GoA-ROM-Edition using OpenKH Mod Manager`
|
||||
- Needed for Archipelago
|
||||
1. [`ArchipelagoKH2Client.exe`](https://github.com/ArchipelagoMW/Archipelago/releases)<br>
|
||||
2. `Install the Archipelago Companion mod from JaredWeakStrike/APCompanion using OpenKH Mod Manager`<br>
|
||||
3. `Install the Archipelago Quality Of Life mod from JaredWeakStrike/AP_QOL using OpenKH Mod Manager` <br>
|
||||
4. `Install the mod from KH2FM-Mods-equations19/auto-save using OpenKH Mod Manager`<br>
|
||||
1. [`ArchipelagoKH2Client.exe`](https://github.com/ArchipelagoMW/Archipelago/releases)
|
||||
2. `Install the Archipelago Companion mod from JaredWeakStrike/APCompanion using OpenKH Mod Manager`
|
||||
3. `Install the Archipelago Quality Of Life mod from JaredWeakStrike/AP_QOL using OpenKH Mod Manager`
|
||||
4. `Install the mod from KH2FM-Mods-equations19/auto-save using OpenKH Mod Manager`
|
||||
5. `AP Randomizer Seed`
|
||||
|
||||
<h3 style="text-transform:none";>Required: Archipelago Companion Mod</h3>
|
||||
|
||||
Load this mod just like the <b>GoA ROM</b> you did during the KH2 Rando setup. `JaredWeakStrike/APCompanion`<br>
|
||||
@@ -24,6 +27,7 @@ Have this mod second-highest priority below the .zip seed.<br>
|
||||
This mod is based upon Num's Garden of Assemblege Mod and requires it to work. Without Num this could not be possible.
|
||||
|
||||
<h3 style="text-transform:none";>Required: Auto Save Mod</h3>
|
||||
|
||||
Load this mod just like the GoA ROM you did during the KH2 Rando setup. `KH2FM-Mods-equations19/auto-save` Location doesn't matter, required in case of crashes. See [Best Practices](en#best-practices) on how to load the auto save
|
||||
|
||||
<h3 style="text-transform:none";>Installing A Seed</h3>
|
||||
@@ -33,33 +37,33 @@ Make sure the seed is on the top of the list (Highest Priority)<br>
|
||||
After Installing the seed click `Mod Loader -> Build/Build and Run`. Every slot is a unique mod to install and will be needed be repatched for different slots/rooms.
|
||||
|
||||
<h2 style="text-transform:none";>What the Mod Manager Should Look Like.</h2>
|
||||
|
||||

|
||||
|
||||
<h2 style="text-transform:none";>Using the KH2 Client</h2>
|
||||
|
||||
Once you have started the game through OpenKH Mod Manager and are on the title screen run the [ArchipelagoKH2Client.exe](https://github.com/ArchipelagoMW/Archipelago/releases). <br>
|
||||
Once you have started the game through OpenKH Mod Manager and are on the title screen run the [ArchipelagoKH2Client.exe](https://github.com/ArchipelagoMW/Archipelago/releases).<br>
|
||||
When you successfully connect to the server the client will automatically hook into the game to send/receive checks. <br>
|
||||
If the client ever loses connection to the game, it will also disconnect from the server and you will need to reconnect.<br>
|
||||
`Make sure the game is open whenever you try to connect the client to the server otherwise it will immediately disconnect you.`<br>
|
||||
Most checks will be sent to you anywhere outside a load or cutscene.<br>
|
||||
`If you obtain magic, you will need to pause your game to have it show up in your inventory, then enter a new room for it to become properly usable.`
|
||||
<br>
|
||||
|
||||
<h2 style="text-transform:none";>KH2 Client should look like this: </h2>
|
||||
|
||||

|
||||
<br>
|
||||
|
||||
Enter `The room's port number` into the top box <b> where the x's are</b> and press "Connect". Follow the prompts there and you should be connected
|
||||
|
||||
|
||||
<h2 style="text-transform:none";>Common Pitfalls</h2>
|
||||
- Having an old GOA Lua Script in your `C:\Users\*YourName*\Documents\KINGDOM HEARTS HD 1.5+2.5 ReMIX\scripts\kh2` folder.
|
||||
- Pressing F2 while in game should look like this. 
|
||||
<br>
|
||||
- Not having Lua Backend Configured Correctly.
|
||||
- To fix this look over the guide at [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/). Specifically the Lua Backend Configuration Step.
|
||||
<br>
|
||||
- Loading into Simulated Twilight Town Instead of the GOA.
|
||||
- To fix this look over the guide at [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/). Specifically the Panacea and Lua Backend Steps.
|
||||
|
||||
- Having an old GOA Lua Script in your `C:\Users\*YourName*\Documents\KINGDOM HEARTS HD 1.5+2.5 ReMIX\scripts\kh2` folder.
|
||||
- Pressing F2 while in game should look like this. 
|
||||
- Not having Lua Backend Configured Correctly.
|
||||
- To fix this look over the guide at [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/). Specifically the Lua Backend Configuration Step.
|
||||
|
||||
- Loading into Simulated Twilight Town Instead of the GOA.
|
||||
- To fix this look over the guide at [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/). Specifically the Panacea and Lua Backend Steps.
|
||||
|
||||
<h2 style="text-transform:none"; >Best Practices</h2>
|
||||
|
||||
@@ -70,8 +74,11 @@ Enter `The room's port number` into the top box <b> where the x's are</b> and pr
|
||||
- Make sure to save in a different save slot when playing in an async or disconnecting from the server to play a different seed
|
||||
|
||||
<h2 style="text-transform:none";>Logic Sheet</h2>
|
||||
|
||||
Have any questions on what's in logic? This spreadsheet made by Bulcon has the answer [Requirements/logic sheet](https://docs.google.com/spreadsheets/d/1nNi8ohEs1fv-sDQQRaP45o6NoRcMlLJsGckBonweDMY/edit?usp=sharing)
|
||||
|
||||
<h2 style="text-transform:none";>F.A.Q.</h2>
|
||||
|
||||
- Why is my Client giving me a "Cannot Open Process: " error?
|
||||
- Due to how the client reads kingdom hearts 2 memory some people's computer flags it as a virus. Run the client as admin.
|
||||
- Why is my HP/MP continuously increasing without stopping?
|
||||
@@ -83,11 +90,13 @@ Have any questions on what's in logic? This spreadsheet made by Bulcon has the a
|
||||
- Why did I not load into the correct visit?
|
||||
- You need to trigger a cutscene or visit The World That Never Was for it to register that you have received the item.
|
||||
- What versions of Kingdom Hearts 2 are supported?
|
||||
- Currently `only` the most up to date version on the Epic Game Store is supported: version `1.0.0.8_WW`.
|
||||
- Currently the `only` supported versions are `Epic Games Version 1.0.0.9_WW` and `Steam Build Version 14716933`.
|
||||
- Why am I getting wallpapered while going into a world for the first time?
|
||||
- Your `Lua Backend` was not configured correctly. Look over the step in the [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/) guide.
|
||||
- Your `Lua Backend` was not configured correctly. Look over the step in the [KH2Rando.com](https://tommadness.github.io/KH2Randomizer/setup/Panacea-ModLoader/) guide.
|
||||
- Why am I not getting magic?
|
||||
- If you obtain magic, you will need to pause your game to have it show up in your inventory, then enter a new room for it to become properly usable.
|
||||
- Why did I crash after picking my dream weapon?
|
||||
- This is normally caused by having an outdated GOA mod or having an outdated panacea and/or luabackend. To fix this rerun the setup wizard and reinstall luabackend and panacea. Also make sure all your mods are up-to-date.
|
||||
- Why did I crash?
|
||||
- The port of Kingdom Hearts 2 can and will randomly crash, this is the fault of the game not the randomizer or the archipelago client.
|
||||
- If you have a continuous/constant crash (in the same area/event every time) you will want to reverify your installed files. This can be done by doing the following: Open Epic Game Store --> Library --> Click Triple Dots --> Manage --> Verify
|
||||
@@ -99,5 +108,3 @@ Have any questions on what's in logic? This spreadsheet made by Bulcon has the a
|
||||
- Because Kingdom Hearts 2 is prone to crashes and will keep you from losing your progress.
|
||||
- How do I load an auto save?
|
||||
- To load an auto-save, hold down the Select or your equivalent on your prefered controller while choosing a file. Make sure to hold the button down the whole time.
|
||||
|
||||
|
||||
|
||||
@@ -1556,6 +1556,8 @@
|
||||
room: Owl Hallway
|
||||
door: Shortcut to Hedge Maze
|
||||
Roof: True
|
||||
The Incomparable:
|
||||
door: Observant Entrance
|
||||
panels:
|
||||
DOWN:
|
||||
id: Maze Room/Panel_down_up
|
||||
@@ -1967,6 +1969,9 @@
|
||||
door: Eight Door
|
||||
Orange Tower Sixth Floor:
|
||||
painting: True
|
||||
Hedge Maze:
|
||||
room: Hedge Maze
|
||||
door: Observant Entrance
|
||||
panels:
|
||||
Achievement:
|
||||
id: Countdown Panels/Panel_incomparable_incomparable
|
||||
@@ -7649,6 +7654,8 @@
|
||||
LEAP:
|
||||
id: Double Room/Panel_leap_leap
|
||||
tag: midwhite
|
||||
required_door:
|
||||
door: Door to Cross
|
||||
doors:
|
||||
Door to Cross:
|
||||
id: Double Room Area Doors/Door_room_4a
|
||||
|
||||
Binary file not shown.
@@ -3,15 +3,15 @@ from typing import Dict
|
||||
|
||||
from schema import And, Optional, Or, Schema
|
||||
|
||||
from Options import Accessibility, Choice, DeathLinkMixin, DefaultOnToggle, OptionDict, PerGameCommonOptions, \
|
||||
from Options import Choice, DeathLinkMixin, DefaultOnToggle, ItemsAccessibility, OptionDict, PerGameCommonOptions, \
|
||||
PlandoConnections, Range, StartInventoryPool, Toggle, Visibility
|
||||
from .portals import CHECKPOINTS, PORTALS, SHOP_POINTS
|
||||
|
||||
|
||||
class MessengerAccessibility(Accessibility):
|
||||
default = Accessibility.option_locations
|
||||
class MessengerAccessibility(ItemsAccessibility):
|
||||
# defaulting to locations accessibility since items makes certain items self-locking
|
||||
__doc__ = Accessibility.__doc__.replace(f"default {Accessibility.default}", f"default {default}")
|
||||
default = ItemsAccessibility.option_full
|
||||
__doc__ = ItemsAccessibility.__doc__
|
||||
|
||||
|
||||
class PortalPlando(PlandoConnections):
|
||||
|
||||
@@ -29,7 +29,7 @@ name: TuNombre
|
||||
game: Minecraft
|
||||
|
||||
# Opciones compartidas por todos los juegos:
|
||||
accessibility: locations
|
||||
accessibility: full
|
||||
progression_balancing: 50
|
||||
# Opciones Especficicas para Minecraft
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ description: Template Name
|
||||
# Ditt spelnamn. Mellanslag kommer bli omplacerad med understräck och det är en 16-karaktärsgräns.
|
||||
name: YourName
|
||||
game: Minecraft
|
||||
accessibility: locations
|
||||
accessibility: full
|
||||
progression_balancing: 0
|
||||
advancement_goal:
|
||||
few: 0
|
||||
|
||||
85
worlds/osrs/Items.py
Normal file
85
worlds/osrs/Items.py
Normal file
@@ -0,0 +1,85 @@
|
||||
import typing
|
||||
|
||||
from BaseClasses import Item, ItemClassification
|
||||
from .Names import ItemNames
|
||||
|
||||
|
||||
class ItemRow(typing.NamedTuple):
|
||||
name: str
|
||||
amount: int
|
||||
progression: ItemClassification
|
||||
|
||||
|
||||
class OSRSItem(Item):
|
||||
game: str = "Old School Runescape"
|
||||
|
||||
|
||||
QP_Items: typing.List[str] = [
|
||||
ItemNames.QP_Cooks_Assistant,
|
||||
ItemNames.QP_Demon_Slayer,
|
||||
ItemNames.QP_Restless_Ghost,
|
||||
ItemNames.QP_Romeo_Juliet,
|
||||
ItemNames.QP_Sheep_Shearer,
|
||||
ItemNames.QP_Shield_of_Arrav,
|
||||
ItemNames.QP_Ernest_the_Chicken,
|
||||
ItemNames.QP_Vampyre_Slayer,
|
||||
ItemNames.QP_Imp_Catcher,
|
||||
ItemNames.QP_Prince_Ali_Rescue,
|
||||
ItemNames.QP_Dorics_Quest,
|
||||
ItemNames.QP_Black_Knights_Fortress,
|
||||
ItemNames.QP_Witchs_Potion,
|
||||
ItemNames.QP_Knights_Sword,
|
||||
ItemNames.QP_Goblin_Diplomacy,
|
||||
ItemNames.QP_Pirates_Treasure,
|
||||
ItemNames.QP_Rune_Mysteries,
|
||||
ItemNames.QP_Misthalin_Mystery,
|
||||
ItemNames.QP_Corsair_Curse,
|
||||
ItemNames.QP_X_Marks_the_Spot,
|
||||
ItemNames.QP_Below_Ice_Mountain
|
||||
]
|
||||
|
||||
starting_area_dict: typing.Dict[int, str] = {
|
||||
0: ItemNames.Lumbridge,
|
||||
1: ItemNames.Al_Kharid,
|
||||
2: ItemNames.Central_Varrock,
|
||||
3: ItemNames.West_Varrock,
|
||||
4: ItemNames.Edgeville,
|
||||
5: ItemNames.Falador,
|
||||
6: ItemNames.Draynor_Village,
|
||||
7: ItemNames.Wilderness,
|
||||
}
|
||||
|
||||
chunksanity_starting_chunks: typing.List[str] = [
|
||||
ItemNames.Lumbridge,
|
||||
ItemNames.Lumbridge_Swamp,
|
||||
ItemNames.Lumbridge_Farms,
|
||||
ItemNames.HAM_Hideout,
|
||||
ItemNames.Draynor_Village,
|
||||
ItemNames.Draynor_Manor,
|
||||
ItemNames.Wizards_Tower,
|
||||
ItemNames.Al_Kharid,
|
||||
ItemNames.Citharede_Abbey,
|
||||
ItemNames.South_Of_Varrock,
|
||||
ItemNames.Central_Varrock,
|
||||
ItemNames.Varrock_Palace,
|
||||
ItemNames.East_Of_Varrock,
|
||||
ItemNames.West_Varrock,
|
||||
ItemNames.Edgeville,
|
||||
ItemNames.Barbarian_Village,
|
||||
ItemNames.Monastery,
|
||||
ItemNames.Ice_Mountain,
|
||||
ItemNames.Dwarven_Mines,
|
||||
ItemNames.Falador,
|
||||
ItemNames.Falador_Farm,
|
||||
ItemNames.Crafting_Guild,
|
||||
ItemNames.Rimmington,
|
||||
ItemNames.Port_Sarim,
|
||||
ItemNames.Mudskipper_Point,
|
||||
ItemNames.Wilderness
|
||||
]
|
||||
|
||||
# Some starting areas contain multiple regions, so if that area is rolled for Chunksanity, we need to map it to one
|
||||
chunksanity_special_region_names: typing.Dict[str, str] = {
|
||||
ItemNames.Lumbridge_Farms: 'Lumbridge Farms East',
|
||||
ItemNames.Crafting_Guild: 'Crafting Guild Outskirts',
|
||||
}
|
||||
21
worlds/osrs/Locations.py
Normal file
21
worlds/osrs/Locations.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import typing
|
||||
|
||||
from BaseClasses import Location
|
||||
|
||||
|
||||
class SkillRequirement(typing.NamedTuple):
|
||||
skill: str
|
||||
level: int
|
||||
|
||||
|
||||
class LocationRow(typing.NamedTuple):
|
||||
name: str
|
||||
category: str
|
||||
regions: typing.List[str]
|
||||
skills: typing.List[SkillRequirement]
|
||||
items: typing.List[str]
|
||||
qp: int
|
||||
|
||||
|
||||
class OSRSLocation(Location):
|
||||
game: str = "Old School Runescape"
|
||||
144
worlds/osrs/LogicCSV/LogicCSVToPython.py
Normal file
144
worlds/osrs/LogicCSV/LogicCSVToPython.py
Normal file
@@ -0,0 +1,144 @@
|
||||
"""
|
||||
This is a utility file that converts logic in the form of CSV files into Python files that can be imported and used
|
||||
directly by the world implementation. Whenever the logic files are updated, this script should be run to re-generate
|
||||
the python files containing the data.
|
||||
"""
|
||||
import requests
|
||||
|
||||
# The CSVs are updated at this repository to be shared between generator and client.
|
||||
data_repository_address = "https://raw.githubusercontent.com/digiholic/osrs-archipelago-logic/"
|
||||
# The Github tag of the CSVs this was generated with
|
||||
data_csv_tag = "v1.5"
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
import os
|
||||
import csv
|
||||
import typing
|
||||
|
||||
# makes this module runnable from its world folder. Shamelessly stolen from Subnautica
|
||||
sys.path.remove(os.path.dirname(__file__))
|
||||
new_home = os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
|
||||
os.chdir(new_home)
|
||||
sys.path.append(new_home)
|
||||
|
||||
|
||||
def load_location_csv():
|
||||
this_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
with open(os.path.join(this_dir, "locations_generated.py"), 'w+') as locPyFile:
|
||||
locPyFile.write('"""\nThis file was auto generated by LogicCSVToPython.py\n"""\n')
|
||||
locPyFile.write("from ..Locations import LocationRow, SkillRequirement\n")
|
||||
locPyFile.write("\n")
|
||||
locPyFile.write("location_rows = [\n")
|
||||
|
||||
with requests.get(data_repository_address + "/" + data_csv_tag + "/locations.csv") as req:
|
||||
locations_reader = csv.reader(req.text.splitlines())
|
||||
for row in locations_reader:
|
||||
row_line = "LocationRow("
|
||||
row_line += str_format(row[0])
|
||||
row_line += str_format(row[1].lower())
|
||||
|
||||
region_strings = row[2].split(", ") if row[2] else []
|
||||
row_line += f"{str_list_to_py(region_strings)}, "
|
||||
|
||||
skill_strings = row[3].split(", ")
|
||||
row_line += "["
|
||||
if skill_strings:
|
||||
split_skills = [skill.split(" ") for skill in skill_strings if skill != ""]
|
||||
if split_skills:
|
||||
for split in split_skills:
|
||||
row_line += f"SkillRequirement('{split[0]}', {split[1]}), "
|
||||
row_line += "], "
|
||||
|
||||
item_strings = row[4].split(", ") if row[4] else []
|
||||
row_line += f"{str_list_to_py(item_strings)}, "
|
||||
row_line += f"{row[5]})" if row[5] != "" else "0)"
|
||||
locPyFile.write(f"\t{row_line},\n")
|
||||
locPyFile.write("]\n")
|
||||
|
||||
def load_region_csv():
|
||||
this_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
with open(os.path.join(this_dir, "regions_generated.py"), 'w+') as regPyFile:
|
||||
regPyFile.write('"""\nThis file was auto generated by LogicCSVToPython.py\n"""\n')
|
||||
regPyFile.write("from ..Regions import RegionRow\n")
|
||||
regPyFile.write("\n")
|
||||
regPyFile.write("region_rows = [\n")
|
||||
|
||||
with requests.get(data_repository_address + "/" + data_csv_tag + "/regions.csv") as req:
|
||||
regions_reader = csv.reader(req.text.splitlines())
|
||||
for row in regions_reader:
|
||||
row_line = "RegionRow("
|
||||
row_line += str_format(row[0])
|
||||
row_line += str_format(row[1])
|
||||
connections = row[2].replace("'", "\\'")
|
||||
row_line += f"{str_list_to_py(connections.split(', '))}, "
|
||||
resources = row[3].replace("'", "\\'")
|
||||
row_line += f"{str_list_to_py(resources.split(', '))})"
|
||||
regPyFile.write(f"\t{row_line},\n")
|
||||
regPyFile.write("]\n")
|
||||
|
||||
def load_resource_csv():
|
||||
this_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
with open(os.path.join(this_dir, "resources_generated.py"), 'w+') as resPyFile:
|
||||
resPyFile.write('"""\nThis file was auto generated by LogicCSVToPython.py\n"""\n')
|
||||
resPyFile.write("from ..Regions import ResourceRow\n")
|
||||
resPyFile.write("\n")
|
||||
resPyFile.write("resource_rows = [\n")
|
||||
|
||||
with requests.get(data_repository_address + "/" + data_csv_tag + "/resources.csv") as req:
|
||||
resource_reader = csv.reader(req.text.splitlines())
|
||||
for row in resource_reader:
|
||||
name = row[0].replace("'", "\\'")
|
||||
row_line = f"ResourceRow('{name}')"
|
||||
resPyFile.write(f"\t{row_line},\n")
|
||||
resPyFile.write("]\n")
|
||||
|
||||
|
||||
def load_item_csv():
|
||||
this_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
with open(os.path.join(this_dir, "items_generated.py"), 'w+') as itemPyfile:
|
||||
itemPyfile.write('"""\nThis file was auto generated by LogicCSVToPython.py\n"""\n')
|
||||
itemPyfile.write("from BaseClasses import ItemClassification\n")
|
||||
itemPyfile.write("from ..Items import ItemRow\n")
|
||||
itemPyfile.write("\n")
|
||||
itemPyfile.write("item_rows = [\n")
|
||||
|
||||
with requests.get(data_repository_address + "/" + data_csv_tag + "/items.csv") as req:
|
||||
item_reader = csv.reader(req.text.splitlines())
|
||||
for row in item_reader:
|
||||
row_line = "ItemRow("
|
||||
row_line += str_format(row[0])
|
||||
row_line += f"{row[1]}, "
|
||||
|
||||
row_line += f"ItemClassification.{row[2]})"
|
||||
|
||||
itemPyfile.write(f"\t{row_line},\n")
|
||||
itemPyfile.write("]\n")
|
||||
|
||||
|
||||
def str_format(s) -> str:
|
||||
ret_str = s.replace("'", "\\'")
|
||||
return f"'{ret_str}', "
|
||||
|
||||
|
||||
def str_list_to_py(str_list) -> str:
|
||||
ret_str = "["
|
||||
for s in str_list:
|
||||
ret_str += f"'{s}', "
|
||||
ret_str += "]"
|
||||
return ret_str
|
||||
|
||||
|
||||
|
||||
load_location_csv()
|
||||
print("Generated locations py")
|
||||
load_region_csv()
|
||||
print("Generated regions py")
|
||||
load_resource_csv()
|
||||
print("Generated resource py")
|
||||
load_item_csv()
|
||||
print("Generated item py")
|
||||
43
worlds/osrs/LogicCSV/items_generated.py
Normal file
43
worlds/osrs/LogicCSV/items_generated.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""
|
||||
This file was auto generated by LogicCSVToPython.py
|
||||
"""
|
||||
from BaseClasses import ItemClassification
|
||||
from ..Items import ItemRow
|
||||
|
||||
item_rows = [
|
||||
ItemRow('Area: Lumbridge', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Lumbridge Swamp', 1, ItemClassification.progression),
|
||||
ItemRow('Area: HAM Hideout', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Lumbridge Farms', 1, ItemClassification.progression),
|
||||
ItemRow('Area: South of Varrock', 1, ItemClassification.progression),
|
||||
ItemRow('Area: East Varrock', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Central Varrock', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Varrock Palace', 1, ItemClassification.progression),
|
||||
ItemRow('Area: West Varrock', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Edgeville', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Barbarian Village', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Draynor Manor', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Falador', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Dwarven Mines', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Ice Mountain', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Monastery', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Falador Farms', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Port Sarim', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Mudskipper Point', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Karamja', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Crandor', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Rimmington', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Crafting Guild', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Draynor Village', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Wizard Tower', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Corsair Cove', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Al Kharid', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Citharede Abbey', 1, ItemClassification.progression),
|
||||
ItemRow('Area: Wilderness', 1, ItemClassification.progression),
|
||||
ItemRow('Progressive Armor', 6, ItemClassification.progression),
|
||||
ItemRow('Progressive Weapons', 6, ItemClassification.progression),
|
||||
ItemRow('Progressive Tools', 6, ItemClassification.useful),
|
||||
ItemRow('Progressive Ranged Weapons', 3, ItemClassification.useful),
|
||||
ItemRow('Progressive Ranged Armor', 3, ItemClassification.useful),
|
||||
ItemRow('Progressive Magic', 2, ItemClassification.useful),
|
||||
]
|
||||
127
worlds/osrs/LogicCSV/locations_generated.py
Normal file
127
worlds/osrs/LogicCSV/locations_generated.py
Normal file
@@ -0,0 +1,127 @@
|
||||
"""
|
||||
This file was auto generated by LogicCSVToPython.py
|
||||
"""
|
||||
from ..Locations import LocationRow, SkillRequirement
|
||||
|
||||
location_rows = [
|
||||
LocationRow('Quest: Cook\'s Assistant', 'quest', ['Lumbridge', 'Wheat', 'Windmill', 'Egg', 'Milk', ], [], [], 0),
|
||||
LocationRow('Quest: Demon Slayer', 'quest', ['Central Varrock', 'Varrock Palace', 'Wizard Tower', 'South of Varrock', ], [], [], 0),
|
||||
LocationRow('Quest: The Restless Ghost', 'quest', ['Lumbridge', 'Lumbridge Swamp', 'Wizard Tower', ], [], [], 0),
|
||||
LocationRow('Quest: Romeo & Juliet', 'quest', ['Central Varrock', 'Varrock Palace', 'South of Varrock', 'West Varrock', ], [], [], 0),
|
||||
LocationRow('Quest: Sheep Shearer', 'quest', ['Lumbridge Farms West', 'Spinning Wheel', ], [], [], 0),
|
||||
LocationRow('Quest: Shield of Arrav', 'quest', ['Central Varrock', 'Varrock Palace', 'South of Varrock', 'West Varrock', ], [], [], 0),
|
||||
LocationRow('Quest: Ernest the Chicken', 'quest', ['Draynor Manor', ], [], [], 0),
|
||||
LocationRow('Quest: Vampyre Slayer', 'quest', ['Draynor Village', 'Central Varrock', 'Draynor Manor', ], [], [], 0),
|
||||
LocationRow('Quest: Imp Catcher', 'quest', ['Wizard Tower', 'Imps', ], [], [], 0),
|
||||
LocationRow('Quest: Prince Ali Rescue', 'quest', ['Al Kharid', 'Central Varrock', 'Bronze Ores', 'Clay Ore', 'Sheep', 'Spinning Wheel', 'Draynor Village', ], [], [], 0),
|
||||
LocationRow('Quest: Doric\'s Quest', 'quest', ['Dwarven Mountain Pass', 'Clay Ore', 'Iron Ore', 'Bronze Ores', ], [SkillRequirement('Mining', 15), ], [], 0),
|
||||
LocationRow('Quest: Black Knights\' Fortress', 'quest', ['Dwarven Mines', 'Falador', 'Monastery', 'Ice Mountain', 'Falador Farms', ], [], ['Progressive Armor', ], 12),
|
||||
LocationRow('Quest: Witch\'s Potion', 'quest', ['Rimmington', 'Port Sarim', ], [], [], 0),
|
||||
LocationRow('Quest: The Knight\'s Sword', 'quest', ['Falador', 'Varrock Palace', 'Mudskipper Point', 'South of Varrock', 'Windmill', 'Pie Dish', 'Port Sarim', ], [SkillRequirement('Cooking', 10), SkillRequirement('Mining', 10), ], [], 0),
|
||||
LocationRow('Quest: Goblin Diplomacy', 'quest', ['Goblin Village', 'Draynor Village', 'Falador', 'South of Varrock', 'Onion', ], [], [], 0),
|
||||
LocationRow('Quest: Pirate\'s Treasure', 'quest', ['Port Sarim', 'Karamja', 'Falador', ], [], [], 0),
|
||||
LocationRow('Quest: Rune Mysteries', 'quest', ['Lumbridge', 'Wizard Tower', 'Central Varrock', ], [], [], 0),
|
||||
LocationRow('Quest: Misthalin Mystery', 'quest', ['Lumbridge Swamp', ], [], [], 0),
|
||||
LocationRow('Quest: The Corsair Curse', 'quest', ['Rimmington', 'Falador Farms', 'Corsair Cove', ], [], [], 0),
|
||||
LocationRow('Quest: X Marks the Spot', 'quest', ['Lumbridge', 'Draynor Village', 'Port Sarim', ], [], [], 0),
|
||||
LocationRow('Quest: Below Ice Mountain', 'quest', ['Dwarven Mines', 'Dwarven Mountain Pass', 'Ice Mountain', 'Barbarian Village', 'Falador', 'Central Varrock', 'Edgeville', ], [], [], 16),
|
||||
LocationRow('Quest: Dragon Slayer', 'goal', ['Crandor', 'South of Varrock', 'Edgeville', 'Lumbridge', 'Rimmington', 'Monastery', 'Dwarven Mines', 'Port Sarim', 'Draynor Village', ], [], [], 32),
|
||||
LocationRow('Activate the "Rock Skin" Prayer', 'prayer', [], [SkillRequirement('Prayer', 10), ], [], 0),
|
||||
LocationRow('Activate the "Protect Item" Prayer', 'prayer', [], [SkillRequirement('Prayer', 25), ], [], 2),
|
||||
LocationRow('Pray at the Edgeville Monastery', 'prayer', ['Monastery', ], [SkillRequirement('Prayer', 31), ], [], 6),
|
||||
LocationRow('Cast Bones To Bananas', 'magic', ['Nature Runes', ], [SkillRequirement('Magic', 15), ], [], 0),
|
||||
LocationRow('Teleport to Varrock', 'magic', ['Central Varrock', 'Law Runes', ], [SkillRequirement('Magic', 25), ], [], 0),
|
||||
LocationRow('Teleport to Lumbridge', 'magic', ['Lumbridge', 'Law Runes', ], [SkillRequirement('Magic', 31), ], [], 2),
|
||||
LocationRow('Teleport to Falador', 'magic', ['Falador', 'Law Runes', ], [SkillRequirement('Magic', 37), ], [], 6),
|
||||
LocationRow('Craft an Air Rune', 'runecraft', ['Rune Essence', 'Falador Farms', ], [SkillRequirement('Runecraft', 1), ], [], 0),
|
||||
LocationRow('Craft runes with a Mind Core', 'runecraft', ['Camdozaal', 'Goblin Village', ], [SkillRequirement('Runecraft', 2), ], [], 0),
|
||||
LocationRow('Craft runes with a Body Core', 'runecraft', ['Camdozaal', 'Dwarven Mountain Pass', ], [SkillRequirement('Runecraft', 20), ], [], 0),
|
||||
LocationRow('Make an Unblessed Symbol', 'crafting', ['Silver Ore', 'Furnace', 'Al Kharid', 'Sheep', 'Spinning Wheel', ], [SkillRequirement('Crafting', 16), ], [], 0),
|
||||
LocationRow('Cut a Sapphire', 'crafting', ['Chisel', ], [SkillRequirement('Crafting', 20), ], [], 0),
|
||||
LocationRow('Cut an Emerald', 'crafting', ['Chisel', ], [SkillRequirement('Crafting', 27), ], [], 0),
|
||||
LocationRow('Cut a Ruby', 'crafting', ['Chisel', ], [SkillRequirement('Crafting', 34), ], [], 4),
|
||||
LocationRow('Cut a Diamond', 'crafting', ['Chisel', ], [SkillRequirement('Crafting', 43), ], [], 8),
|
||||
LocationRow('Mine a Blurite Ore', 'mining', ['Mudskipper Point', 'Port Sarim', ], [SkillRequirement('Mining', 10), ], [], 0),
|
||||
LocationRow('Crush a Barronite Deposit', 'mining', ['Camdozaal', ], [SkillRequirement('Mining', 14), ], [], 0),
|
||||
LocationRow('Mine Silver', 'mining', ['Silver Ore', ], [SkillRequirement('Mining', 20), ], [], 0),
|
||||
LocationRow('Mine Coal', 'mining', ['Coal Ore', ], [SkillRequirement('Mining', 30), ], [], 2),
|
||||
LocationRow('Mine Gold', 'mining', ['Gold Ore', ], [SkillRequirement('Mining', 40), ], [], 6),
|
||||
LocationRow('Smelt an Iron Bar', 'smithing', ['Iron Ore', 'Furnace', ], [SkillRequirement('Smithing', 15), SkillRequirement('Mining', 15), ], [], 0),
|
||||
LocationRow('Smelt a Silver Bar', 'smithing', ['Silver Ore', 'Furnace', ], [SkillRequirement('Smithing', 20), SkillRequirement('Mining', 20), ], [], 0),
|
||||
LocationRow('Smelt a Steel Bar', 'smithing', ['Coal Ore', 'Iron Ore', 'Furnace', ], [SkillRequirement('Smithing', 30), SkillRequirement('Mining', 30), ], [], 2),
|
||||
LocationRow('Smelt a Gold Bar', 'smithing', ['Gold Ore', 'Furnace', ], [SkillRequirement('Smithing', 40), SkillRequirement('Mining', 40), ], [], 6),
|
||||
LocationRow('Catch some Anchovies', 'fishing', ['Shrimp Spot', ], [SkillRequirement('Fishing', 15), ], [], 0),
|
||||
LocationRow('Catch a Trout', 'fishing', ['Fly Fishing Spot', ], [SkillRequirement('Fishing', 20), ], [], 0),
|
||||
LocationRow('Prepare a Tetra', 'fishing', ['Camdozaal', ], [SkillRequirement('Fishing', 33), SkillRequirement('Cooking', 33), ], [], 2),
|
||||
LocationRow('Catch a Lobster', 'fishing', ['Lobster Spot', ], [SkillRequirement('Fishing', 40), ], [], 6),
|
||||
LocationRow('Catch a Swordfish', 'fishing', ['Lobster Spot', ], [SkillRequirement('Fishing', 50), ], [], 12),
|
||||
LocationRow('Bake a Redberry Pie', 'cooking', ['Redberry Bush', 'Wheat', 'Windmill', 'Pie Dish', ], [SkillRequirement('Cooking', 10), ], [], 0),
|
||||
LocationRow('Cook some Stew', 'cooking', ['Bowl', 'Meat', 'Potato', ], [SkillRequirement('Cooking', 25), ], [], 0),
|
||||
LocationRow('Bake an Apple Pie', 'cooking', ['Cooking Apple', 'Wheat', 'Windmill', 'Pie Dish', ], [SkillRequirement('Cooking', 30), ], [], 2),
|
||||
LocationRow('Bake a Cake', 'cooking', ['Wheat', 'Windmill', 'Egg', 'Milk', 'Cake Tin', ], [SkillRequirement('Cooking', 40), ], [], 6),
|
||||
LocationRow('Bake a Meat Pizza', 'cooking', ['Wheat', 'Windmill', 'Cheese', 'Tomato', 'Meat', ], [SkillRequirement('Cooking', 45), ], [], 8),
|
||||
LocationRow('Burn some Oak Logs', 'firemaking', ['Oak Tree', ], [SkillRequirement('Firemaking', 15), ], [], 0),
|
||||
LocationRow('Burn some Willow Logs', 'firemaking', ['Willow Tree', ], [SkillRequirement('Firemaking', 30), ], [], 0),
|
||||
LocationRow('Travel on a Canoe', 'woodcutting', ['Canoe Tree', ], [SkillRequirement('Woodcutting', 12), ], [], 0),
|
||||
LocationRow('Cut an Oak Log', 'woodcutting', ['Oak Tree', ], [SkillRequirement('Woodcutting', 15), ], [], 0),
|
||||
LocationRow('Cut a Willow Log', 'woodcutting', ['Willow Tree', ], [SkillRequirement('Woodcutting', 30), ], [], 0),
|
||||
LocationRow('Kill Jeff', 'combat', ['Dwarven Mountain Pass', ], [SkillRequirement('Combat', 2), ], [], 0),
|
||||
LocationRow('Kill a Goblin', 'combat', ['Goblin', ], [SkillRequirement('Combat', 2), ], [], 0),
|
||||
LocationRow('Kill a Monkey', 'combat', ['Karamja', ], [SkillRequirement('Combat', 3), ], [], 0),
|
||||
LocationRow('Kill a Barbarian', 'combat', ['Barbarian', ], [SkillRequirement('Combat', 10), ], [], 0),
|
||||
LocationRow('Kill a Giant Frog', 'combat', ['Lumbridge Swamp', ], [SkillRequirement('Combat', 13), ], [], 0),
|
||||
LocationRow('Kill a Zombie', 'combat', ['Zombie', ], [SkillRequirement('Combat', 13), ], [], 0),
|
||||
LocationRow('Kill a Guard', 'combat', ['Guard', ], [SkillRequirement('Combat', 21), ], [], 0),
|
||||
LocationRow('Kill a Hill Giant', 'combat', ['Hill Giant', ], [SkillRequirement('Combat', 28), ], [], 2),
|
||||
LocationRow('Kill a Deadly Red Spider', 'combat', ['Deadly Red Spider', ], [SkillRequirement('Combat', 34), ], [], 2),
|
||||
LocationRow('Kill a Moss Giant', 'combat', ['Moss Giant', ], [SkillRequirement('Combat', 42), ], [], 2),
|
||||
LocationRow('Kill a Catablepon', 'combat', ['Barbarian Village', ], [SkillRequirement('Combat', 49), ], [], 4),
|
||||
LocationRow('Kill an Ice Giant', 'combat', ['Ice Giant', ], [SkillRequirement('Combat', 53), ], [], 4),
|
||||
LocationRow('Kill a Lesser Demon', 'combat', ['Lesser Demon', ], [SkillRequirement('Combat', 82), ], [], 8),
|
||||
LocationRow('Kill an Ogress Shaman', 'combat', ['Corsair Cove', ], [SkillRequirement('Combat', 82), ], [], 8),
|
||||
LocationRow('Kill Obor', 'combat', ['Edgeville', ], [SkillRequirement('Combat', 106), ], [], 28),
|
||||
LocationRow('Kill Bryophyta', 'combat', ['Central Varrock', ], [SkillRequirement('Combat', 128), ], [], 28),
|
||||
LocationRow('Total XP 5,000', 'general', [], [], [], 0),
|
||||
LocationRow('Combat Level 5', 'general', [], [], [], 0),
|
||||
LocationRow('Total XP 10,000', 'general', [], [], [], 0),
|
||||
LocationRow('Total Level 50', 'general', [], [], [], 0),
|
||||
LocationRow('Total XP 25,000', 'general', [], [], [], 0),
|
||||
LocationRow('Total Level 100', 'general', [], [], [], 0),
|
||||
LocationRow('Total XP 50,000', 'general', [], [], [], 0),
|
||||
LocationRow('Combat Level 15', 'general', [], [], [], 0),
|
||||
LocationRow('Total Level 150', 'general', [], [], [], 2),
|
||||
LocationRow('Total XP 75,000', 'general', [], [], [], 2),
|
||||
LocationRow('Combat Level 25', 'general', [], [], [], 2),
|
||||
LocationRow('Total XP 100,000', 'general', [], [], [], 6),
|
||||
LocationRow('Total Level 200', 'general', [], [], [], 6),
|
||||
LocationRow('Total XP 125,000', 'general', [], [], [], 6),
|
||||
LocationRow('Combat Level 30', 'general', [], [], [], 10),
|
||||
LocationRow('Total Level 250', 'general', [], [], [], 10),
|
||||
LocationRow('Total XP 150,000', 'general', [], [], [], 10),
|
||||
LocationRow('Total Level 300', 'general', [], [], [], 16),
|
||||
LocationRow('Combat Level 40', 'general', [], [], [], 16),
|
||||
LocationRow('Open a Simple Lockbox', 'general', ['Camdozaal', ], [], [], 0),
|
||||
LocationRow('Open an Elaborate Lockbox', 'general', ['Camdozaal', ], [], [], 0),
|
||||
LocationRow('Open an Ornate Lockbox', 'general', ['Camdozaal', ], [], [], 0),
|
||||
LocationRow('Points: Cook\'s Assistant', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Demon Slayer', 'points', [], [], [], 0),
|
||||
LocationRow('Points: The Restless Ghost', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Romeo & Juliet', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Sheep Shearer', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Shield of Arrav', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Ernest the Chicken', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Vampyre Slayer', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Imp Catcher', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Prince Ali Rescue', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Doric\'s Quest', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Black Knights\' Fortress', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Witch\'s Potion', 'points', [], [], [], 0),
|
||||
LocationRow('Points: The Knight\'s Sword', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Goblin Diplomacy', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Pirate\'s Treasure', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Rune Mysteries', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Misthalin Mystery', 'points', [], [], [], 0),
|
||||
LocationRow('Points: The Corsair Curse', 'points', [], [], [], 0),
|
||||
LocationRow('Points: X Marks the Spot', 'points', [], [], [], 0),
|
||||
LocationRow('Points: Below Ice Mountain', 'points', [], [], [], 0),
|
||||
]
|
||||
47
worlds/osrs/LogicCSV/regions_generated.py
Normal file
47
worlds/osrs/LogicCSV/regions_generated.py
Normal file
@@ -0,0 +1,47 @@
|
||||
"""
|
||||
This file was auto generated by LogicCSVToPython.py
|
||||
"""
|
||||
from ..Regions import RegionRow
|
||||
|
||||
region_rows = [
|
||||
RegionRow('Lumbridge', 'Area: Lumbridge', ['Lumbridge Farms East', 'Lumbridge Farms West', 'Al Kharid', 'Lumbridge Swamp', 'HAM Hideout', 'South of Varrock', 'Barbarian Village', 'Edgeville', 'Wilderness', ], ['Mind Runes', 'Spinning Wheel', 'Furnace', 'Chisel', 'Bronze Anvil', 'Fly Fishing Spot', 'Bowl', 'Cake Tin', 'Oak Tree', 'Willow Tree', 'Canoe Tree', 'Goblin', 'Imps', ]),
|
||||
RegionRow('Lumbridge Swamp', 'Area: Lumbridge Swamp', ['Lumbridge', 'HAM Hideout', ], ['Bronze Ores', 'Coal Ore', 'Shrimp Spot', 'Meat', 'Goblin', 'Imps', ]),
|
||||
RegionRow('HAM Hideout', 'Area: HAM Hideout', ['Lumbridge Farms West', 'Lumbridge', 'Lumbridge Swamp', 'Draynor Village', ], ['Goblin', ]),
|
||||
RegionRow('Lumbridge Farms West', 'Area: Lumbridge Farms', ['Sourhog\'s Lair', 'HAM Hideout', 'Draynor Village', ], ['Sheep', 'Meat', 'Wheat', 'Windmill', 'Egg', 'Milk', 'Willow Tree', 'Imps', 'Potato', ]),
|
||||
RegionRow('Lumbridge Farms East', 'Area: Lumbridge Farms', ['South of Varrock', 'Lumbridge', ], ['Meat', 'Egg', 'Milk', 'Willow Tree', 'Goblin', 'Imps', 'Potato', ]),
|
||||
RegionRow('Sourhog\'s Lair', 'Area: South of Varrock', ['Lumbridge Farms West', 'Draynor Manor Outskirts', ], ['', ]),
|
||||
RegionRow('South of Varrock', 'Area: South of Varrock', ['Al Kharid', 'West Varrock', 'Central Varrock', 'East Varrock', 'Lumbridge Farms East', 'Lumbridge', 'Barbarian Village', 'Edgeville', 'Wilderness', ], ['Sheep', 'Bronze Ores', 'Iron Ore', 'Silver Ore', 'Redberry Bush', 'Meat', 'Wheat', 'Oak Tree', 'Willow Tree', 'Canoe Tree', 'Guard', 'Imps', 'Clay Ore', ]),
|
||||
RegionRow('East Varrock', 'Area: East Varrock', ['Wilderness', 'South of Varrock', 'Central Varrock', 'Varrock Palace', ], ['Guard', ]),
|
||||
RegionRow('Central Varrock', 'Area: Central Varrock', ['Varrock Palace', 'East Varrock', 'South of Varrock', 'West Varrock', ], ['Mind Runes', 'Chisel', 'Anvil', 'Bowl', 'Cake Tin', 'Oak Tree', 'Barbarian', 'Guard', 'Rune Essence', 'Imps', ]),
|
||||
RegionRow('Varrock Palace', 'Area: Varrock Palace', ['Wilderness', 'East Varrock', 'Central Varrock', 'West Varrock', ], ['Pie Dish', 'Oak Tree', 'Zombie', 'Guard', 'Deadly Red Spider', 'Moss Giant', 'Nature Runes', 'Law Runes', ]),
|
||||
RegionRow('West Varrock', 'Area: West Varrock', ['Wilderness', 'Varrock Palace', 'South of Varrock', 'Barbarian Village', 'Edgeville', 'Cook\'s Guild', ], ['Anvil', 'Wheat', 'Oak Tree', 'Goblin', 'Guard', 'Onion', ]),
|
||||
RegionRow('Cook\'s Guild', 'Area: West Varrock*', ['West Varrock', ], ['Bowl', 'Cooking Apple', 'Pie Dish', 'Cake Tin', 'Windmill', ]),
|
||||
RegionRow('Edgeville', 'Area: Edgeville', ['Wilderness', 'West Varrock', 'Barbarian Village', 'South of Varrock', 'Lumbridge', ], ['Furnace', 'Chisel', 'Bronze Ores', 'Iron Ore', 'Coal Ore', 'Bowl', 'Meat', 'Cake Tin', 'Willow Tree', 'Canoe Tree', 'Zombie', 'Guard', 'Hill Giant', 'Nature Runes', 'Law Runes', 'Imps', ]),
|
||||
RegionRow('Barbarian Village', 'Area: Barbarian Village', ['Edgeville', 'West Varrock', 'Draynor Manor Outskirts', 'Dwarven Mountain Pass', ], ['Spinning Wheel', 'Coal Ore', 'Anvil', 'Fly Fishing Spot', 'Meat', 'Canoe Tree', 'Barbarian', 'Zombie', 'Law Runes', ]),
|
||||
RegionRow('Draynor Manor Outskirts', 'Area: Draynor Manor', ['Barbarian Village', 'Sourhog\'s Lair', 'Draynor Village', 'Falador East Outskirts', ], ['Goblin', ]),
|
||||
RegionRow('Draynor Manor', 'Area: Draynor Manor', ['Draynor Village', ], ['', ]),
|
||||
RegionRow('Falador East Outskirts', 'Area: Falador', ['Dwarven Mountain Pass', 'Draynor Manor Outskirts', 'Falador Farms', ], ['', ]),
|
||||
RegionRow('Dwarven Mountain Pass', 'Area: Dwarven Mines', ['Goblin Village', 'Monastery', 'Barbarian Village', 'Falador East Outskirts', 'Falador', ], ['Anvil*', 'Wheat', ]),
|
||||
RegionRow('Dwarven Mines', 'Area: Dwarven Mines', ['Monastery', 'Ice Mountain', 'Falador', ], ['Chisel', 'Bronze Ores', 'Iron Ore', 'Coal Ore', 'Gold Ore', 'Anvil', 'Pie Dish', 'Clay Ore', ]),
|
||||
RegionRow('Goblin Village', 'Area: Ice Mountain', ['Wilderness', 'Dwarven Mountain Pass', ], ['Meat', ]),
|
||||
RegionRow('Ice Mountain', 'Area: Ice Mountain', ['Wilderness', 'Monastery', 'Dwarven Mines', 'Camdozaal*', ], ['', ]),
|
||||
RegionRow('Camdozaal', 'Area: Ice Mountain', ['Ice Mountain', ], ['Clay Ore', ]),
|
||||
RegionRow('Monastery', 'Area: Monastery', ['Wilderness', 'Dwarven Mountain Pass', 'Dwarven Mines', 'Ice Mountain', ], ['Sheep', ]),
|
||||
RegionRow('Falador', 'Area: Falador', ['Dwarven Mountain Pass', 'Falador Farms', 'Dwarven Mines', ], ['Furnace', 'Chisel', 'Bowl', 'Cake Tin', 'Oak Tree', 'Guard', 'Imps', ]),
|
||||
RegionRow('Falador Farms', 'Area: Falador Farms', ['Falador', 'Falador East Outskirts', 'Draynor Village', 'Port Sarim', 'Rimmington', 'Crafting Guild Outskirts', ], ['Spinning Wheel', 'Meat', 'Egg', 'Milk', 'Oak Tree', 'Imps', ]),
|
||||
RegionRow('Port Sarim', 'Area: Port Sarim', ['Falador Farms', 'Mudskipper Point', 'Rimmington', 'Karamja Docks', 'Crandor', ], ['Mind Runes', 'Shrimp Spot', 'Meat', 'Cheese', 'Tomato', 'Oak Tree', 'Willow Tree', 'Goblin', 'Potato', ]),
|
||||
RegionRow('Karamja Docks', 'Area: Mudskipper Point', ['Port Sarim', 'Karamja', ], ['', ]),
|
||||
RegionRow('Mudskipper Point', 'Area: Mudskipper Point', ['Rimmington', 'Port Sarim', ], ['Anvil', 'Ice Giant', 'Nature Runes', 'Law Runes', ]),
|
||||
RegionRow('Karamja', 'Area: Karamja', ['Karamja Docks', 'Crandor', ], ['Gold Ore', 'Lobster Spot', 'Bowl', 'Cake Tin', 'Deadly Red Spider', 'Imps', ]),
|
||||
RegionRow('Crandor', 'Area: Crandor', ['Karamja', 'Port Sarim', ], ['Coal Ore', 'Gold Ore', 'Moss Giant', 'Lesser Demon', 'Nature Runes', 'Law Runes', ]),
|
||||
RegionRow('Rimmington', 'Area: Rimmington', ['Falador Farms', 'Port Sarim', 'Mudskipper Point', 'Crafting Guild Peninsula', 'Corsair Cove', ], ['Chisel', 'Bronze Ores', 'Iron Ore', 'Gold Ore', 'Bowl', 'Cake Tin', 'Wheat', 'Oak Tree', 'Willow Tree', 'Crafting Moulds', 'Imps', 'Clay Ore', 'Onion', ]),
|
||||
RegionRow('Crafting Guild Peninsula', 'Area: Crafting Guild', ['Falador Farms', 'Rimmington', ], ['', ]),
|
||||
RegionRow('Crafting Guild Outskirts', 'Area: Crafting Guild', ['Falador Farms', 'Crafting Guild', ], ['Sheep', 'Willow Tree', 'Oak Tree', ]),
|
||||
RegionRow('Crafting Guild', 'Area: Crafting Guild*', ['Crafting Guild', ], ['Spinning Wheel', 'Chisel', 'Silver Ore', 'Gold Ore', 'Meat', 'Milk', 'Clay Ore', ]),
|
||||
RegionRow('Draynor Village', 'Area: Draynor Village', ['Draynor Manor', 'Lumbridge Farms West', 'HAM Hideout', 'Wizard Tower', ], ['Anvil', 'Shrimp Spot', 'Wheat', 'Cheese', 'Tomato', 'Willow Tree', 'Goblin', 'Zombie', 'Nature Runes', 'Law Runes', 'Imps', ]),
|
||||
RegionRow('Wizard Tower', 'Area: Wizard Tower', ['Draynor Village', ], ['Lesser Demon', 'Rune Essence', ]),
|
||||
RegionRow('Corsair Cove', 'Area: Corsair Cove*', ['Rimmington', ], ['Anvil', 'Meat', ]),
|
||||
RegionRow('Al Kharid', 'Area: Al Kharid', ['South of Varrock', 'Citharede Abbey', 'Lumbridge', 'Port Sarim', ], ['Furnace', 'Chisel', 'Bronze Ores', 'Iron Ore', 'Silver Ore', 'Coal Ore', 'Gold Ore', 'Shrimp Spot', 'Bowl', 'Cake Tin', 'Cheese', 'Crafting Moulds', 'Imps', ]),
|
||||
RegionRow('Citharede Abbey', 'Area: Citharede Abbey', ['Al Kharid', ], ['Iron Ore', 'Coal Ore', 'Anvil', 'Hill Giant', 'Nature Runes', 'Law Runes', ]),
|
||||
RegionRow('Wilderness', 'Area: Wilderness', ['East Varrock', 'Varrock Palace', 'West Varrock', 'Edgeville', 'Monastery', 'Ice Mountain', 'Goblin Village', 'South of Varrock', 'Lumbridge', ], ['Furnace', 'Chisel', 'Iron Ore', 'Coal Ore', 'Anvil', 'Meat', 'Cake Tin', 'Cheese', 'Tomato', 'Oak Tree', 'Canoe Tree', 'Zombie', 'Hill Giant', 'Deadly Red Spider', 'Moss Giant', 'Ice Giant', 'Lesser Demon', 'Nature Runes', 'Law Runes', ]),
|
||||
]
|
||||
54
worlds/osrs/LogicCSV/resources_generated.py
Normal file
54
worlds/osrs/LogicCSV/resources_generated.py
Normal file
@@ -0,0 +1,54 @@
|
||||
"""
|
||||
This file was auto generated by LogicCSVToPython.py
|
||||
"""
|
||||
from ..Regions import ResourceRow
|
||||
|
||||
resource_rows = [
|
||||
ResourceRow('Mind Runes'),
|
||||
ResourceRow('Spinning Wheel'),
|
||||
ResourceRow('Sheep'),
|
||||
ResourceRow('Furnace'),
|
||||
ResourceRow('Chisel'),
|
||||
ResourceRow('Bronze Ores'),
|
||||
ResourceRow('Iron Ore'),
|
||||
ResourceRow('Silver Ore'),
|
||||
ResourceRow('Coal Ore'),
|
||||
ResourceRow('Gold Ore'),
|
||||
ResourceRow('Bronze Anvil'),
|
||||
ResourceRow('Anvil'),
|
||||
ResourceRow('Shrimp Spot'),
|
||||
ResourceRow('Fly Fishing Spot'),
|
||||
ResourceRow('Lobster Spot'),
|
||||
ResourceRow('Redberry Bush'),
|
||||
ResourceRow('Bowl'),
|
||||
ResourceRow('Meat'),
|
||||
ResourceRow('Cooking Apple'),
|
||||
ResourceRow('Pie Dish'),
|
||||
ResourceRow('Cake Tin'),
|
||||
ResourceRow('Wheat'),
|
||||
ResourceRow('Windmill'),
|
||||
ResourceRow('Egg'),
|
||||
ResourceRow('Milk'),
|
||||
ResourceRow('Cheese'),
|
||||
ResourceRow('Tomato'),
|
||||
ResourceRow('Oak Tree'),
|
||||
ResourceRow('Willow Tree'),
|
||||
ResourceRow('Canoe Tree'),
|
||||
ResourceRow('Goblin'),
|
||||
ResourceRow('Barbarian'),
|
||||
ResourceRow('Zombie'),
|
||||
ResourceRow('Guard'),
|
||||
ResourceRow('Hill Giant'),
|
||||
ResourceRow('Deadly Red Spider'),
|
||||
ResourceRow('Moss Giant'),
|
||||
ResourceRow('Ice Giant'),
|
||||
ResourceRow('Lesser Demon'),
|
||||
ResourceRow('Rune Essence'),
|
||||
ResourceRow('Crafting Moulds'),
|
||||
ResourceRow('Nature Runes'),
|
||||
ResourceRow('Law Runes'),
|
||||
ResourceRow('Imps'),
|
||||
ResourceRow('Clay Ore'),
|
||||
ResourceRow('Onion'),
|
||||
ResourceRow('Potato'),
|
||||
]
|
||||
212
worlds/osrs/Names.py
Normal file
212
worlds/osrs/Names.py
Normal file
@@ -0,0 +1,212 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class RegionNames(str, Enum):
|
||||
Lumbridge = "Lumbridge"
|
||||
Lumbridge_Swamp = "Lumbridge Swamp"
|
||||
Lumbridge_Farms_East = "Lumbridge Farms East"
|
||||
Lumbridge_Farms_West = "Lumbridge Farms West"
|
||||
HAM_Hideout = "HAM Hideout"
|
||||
Draynor_Village = "Draynor Village"
|
||||
Draynor_Manor = "Draynor Manor"
|
||||
Wizards_Tower = "Wizard Tower"
|
||||
Al_Kharid = "Al Kharid"
|
||||
Citharede_Abbey = "Citharede Abbey"
|
||||
South_Of_Varrock = "South of Varrock"
|
||||
Central_Varrock = "Central Varrock"
|
||||
Varrock_Palace = "Varrock Palace"
|
||||
East_Of_Varrock = "East Varrock"
|
||||
West_Varrock = "West Varrock"
|
||||
Edgeville = "Edgeville"
|
||||
Barbarian_Village = "Barbarian Village"
|
||||
Monastery = "Monastery"
|
||||
Ice_Mountain = "Ice Mountain"
|
||||
Dwarven_Mines = "Dwarven Mines"
|
||||
Falador = "Falador"
|
||||
Falador_Farm = "Falador Farms"
|
||||
Crafting_Guild = "Crafting Guild"
|
||||
Cooks_Guild = "Cook's Guild"
|
||||
Rimmington = "Rimmington"
|
||||
Port_Sarim = "Port Sarim"
|
||||
Mudskipper_Point = "Mudskipper Point"
|
||||
Karamja = "Karamja"
|
||||
Corsair_Cove = "Corsair Cove"
|
||||
Wilderness = "The Wilderness"
|
||||
Crandor = "Crandor"
|
||||
# Resource Regions
|
||||
Egg = "Egg"
|
||||
Sheep = "Sheep"
|
||||
Milk = "Milk"
|
||||
Wheat = "Wheat"
|
||||
Windmill = "Windmill"
|
||||
Spinning_Wheel = "Spinning Wheel"
|
||||
Imp = "Imp"
|
||||
Bronze_Ores = "Bronze Ores"
|
||||
Clay_Rock = "Clay Ore"
|
||||
Coal_Rock = "Coal Ore"
|
||||
Iron_Rock = "Iron Ore"
|
||||
Silver_Rock = "Silver Ore"
|
||||
Gold_Rock = "Gold Ore"
|
||||
Furnace = "Furnace"
|
||||
Anvil = "Anvil"
|
||||
Oak_Tree = "Oak Tree"
|
||||
Willow_Tree = "Willow Tree"
|
||||
Shrimp = "Shrimp Spot"
|
||||
Fly_Fish = "Fly Fishing Spot"
|
||||
Lobster = "Lobster Spot"
|
||||
Mind_Runes = "Mind Runes"
|
||||
Canoe_Tree = "Canoe Tree"
|
||||
|
||||
__str__ = str.__str__
|
||||
|
||||
|
||||
class ItemNames(str, Enum):
|
||||
Lumbridge = "Area: Lumbridge"
|
||||
Lumbridge_Swamp = "Area: Lumbridge Swamp"
|
||||
Lumbridge_Farms = "Area: Lumbridge Farms"
|
||||
HAM_Hideout = "Area: HAM Hideout"
|
||||
Draynor_Village = "Area: Draynor Village"
|
||||
Draynor_Manor = "Area: Draynor Manor"
|
||||
Wizards_Tower = "Area: Wizard Tower"
|
||||
Al_Kharid = "Area: Al Kharid"
|
||||
Citharede_Abbey = "Area: Citharede Abbey"
|
||||
South_Of_Varrock = "Area: South of Varrock"
|
||||
Central_Varrock = "Area: Central Varrock"
|
||||
Varrock_Palace = "Area: Varrock Palace"
|
||||
East_Of_Varrock = "Area: East Varrock"
|
||||
West_Varrock = "Area: West Varrock"
|
||||
Edgeville = "Area: Edgeville"
|
||||
Barbarian_Village = "Area: Barbarian Village"
|
||||
Monastery = "Area: Monastery"
|
||||
Ice_Mountain = "Area: Ice Mountain"
|
||||
Dwarven_Mines = "Area: Dwarven Mines"
|
||||
Falador = "Area: Falador"
|
||||
Falador_Farm = "Area: Falador Farms"
|
||||
Crafting_Guild = "Area: Crafting Guild"
|
||||
Rimmington = "Area: Rimmington"
|
||||
Port_Sarim = "Area: Port Sarim"
|
||||
Mudskipper_Point = "Area: Mudskipper Point"
|
||||
Karamja = "Area: Karamja"
|
||||
Crandor = "Area: Crandor"
|
||||
Corsair_Cove = "Area: Corsair Cove"
|
||||
Wilderness = "Area: Wilderness"
|
||||
Progressive_Armor = "Progressive Armor"
|
||||
Progressive_Weapons = "Progressive Weapons"
|
||||
Progressive_Tools = "Progressive Tools"
|
||||
Progressive_Range_Armor = "Progressive Range Armor"
|
||||
Progressive_Range_Weapon = "Progressive Range Weapon"
|
||||
Progressive_Magic = "Progressive Magic Spell"
|
||||
Lobsters = "10 Lobsters"
|
||||
Swordfish = "5 Swordfish"
|
||||
Energy_Potions = "10 Energy Potions"
|
||||
Coins = "5,000 Coins"
|
||||
Mind_Runes = "50 Mind Runes"
|
||||
Chaos_Runes = "25 Chaos Runes"
|
||||
Death_Runes = "10 Death Runes"
|
||||
Law_Runes = "10 Law Runes"
|
||||
QP_Cooks_Assistant = "1 QP (Cook's Assistant)"
|
||||
QP_Demon_Slayer = "3 QP (Demon Slayer)"
|
||||
QP_Restless_Ghost = "1 QP (The Restless Ghost)"
|
||||
QP_Romeo_Juliet = "5 QP (Romeo & Juliet)"
|
||||
QP_Sheep_Shearer = "1 QP (Sheep Shearer)"
|
||||
QP_Shield_of_Arrav = "1 QP (Shield of Arrav)"
|
||||
QP_Ernest_the_Chicken = "4 QP (Ernest the Chicken)"
|
||||
QP_Vampyre_Slayer = "3 QP (Vampyre Slayer)"
|
||||
QP_Imp_Catcher = "1 QP (Imp Catcher)"
|
||||
QP_Prince_Ali_Rescue = "3 QP (Prince Ali Rescue)"
|
||||
QP_Dorics_Quest = "1 QP (Doric's Quest)"
|
||||
QP_Black_Knights_Fortress = "3 QP (Black Knights' Fortress)"
|
||||
QP_Witchs_Potion = "1 QP (Witch's Potion)"
|
||||
QP_Knights_Sword = "1 QP (The Knight's Sword)"
|
||||
QP_Goblin_Diplomacy = "5 QP (Goblin Diplomacy)"
|
||||
QP_Pirates_Treasure = "2 QP (Pirate's Treasure)"
|
||||
QP_Rune_Mysteries = "1 QP (Rune Mysteries)"
|
||||
QP_Misthalin_Mystery = "1 QP (Misthalin Mystery)"
|
||||
QP_Corsair_Curse = "2 QP (The Corsair Curse)"
|
||||
QP_X_Marks_the_Spot = "1 QP (X Marks The Spot)"
|
||||
QP_Below_Ice_Mountain = "1 QP (Below Ice Mountain)"
|
||||
|
||||
__str__ = str.__str__
|
||||
|
||||
|
||||
class LocationNames(str, Enum):
|
||||
Q_Cooks_Assistant = "Quest: Cook's Assistant"
|
||||
Q_Demon_Slayer = "Quest: Demon Slayer"
|
||||
Q_Restless_Ghost = "Quest: The Restless Ghost"
|
||||
Q_Romeo_Juliet = "Quest: Romeo & Juliet"
|
||||
Q_Sheep_Shearer = "Quest: Sheep Shearer"
|
||||
Q_Shield_of_Arrav = "Quest: Shield of Arrav"
|
||||
Q_Ernest_the_Chicken = "Quest: Ernest the Chicken"
|
||||
Q_Vampyre_Slayer = "Quest: Vampyre Slayer"
|
||||
Q_Imp_Catcher = "Quest: Imp Catcher"
|
||||
Q_Prince_Ali_Rescue = "Quest: Prince Ali Rescue"
|
||||
Q_Dorics_Quest = "Quest: Doric's Quest"
|
||||
Q_Black_Knights_Fortress = "Quest: Black Knights' Fortress"
|
||||
Q_Witchs_Potion = "Quest: Witch's Potion"
|
||||
Q_Knights_Sword = "Quest: The Knight's Sword"
|
||||
Q_Goblin_Diplomacy = "Quest: Goblin Diplomacy"
|
||||
Q_Pirates_Treasure = "Quest: Pirate's Treasure"
|
||||
Q_Rune_Mysteries = "Quest: Rune Mysteries"
|
||||
Q_Misthalin_Mystery = "Quest: Misthalin Mystery"
|
||||
Q_Corsair_Curse = "Quest: The Corsair Curse"
|
||||
Q_X_Marks_the_Spot = "Quest: X Marks the Spot"
|
||||
Q_Below_Ice_Mountain = "Quest: Below Ice Mountain"
|
||||
QP_Cooks_Assistant = "Points: Cook's Assistant"
|
||||
QP_Demon_Slayer = "Points: Demon Slayer"
|
||||
QP_Restless_Ghost = "Points: The Restless Ghost"
|
||||
QP_Romeo_Juliet = "Points: Romeo & Juliet"
|
||||
QP_Sheep_Shearer = "Points: Sheep Shearer"
|
||||
QP_Shield_of_Arrav = "Points: Shield of Arrav"
|
||||
QP_Ernest_the_Chicken = "Points: Ernest the Chicken"
|
||||
QP_Vampyre_Slayer = "Points: Vampyre Slayer"
|
||||
QP_Imp_Catcher = "Points: Imp Catcher"
|
||||
QP_Prince_Ali_Rescue = "Points: Prince Ali Rescue"
|
||||
QP_Dorics_Quest = "Points: Doric's Quest"
|
||||
QP_Black_Knights_Fortress = "Points: Black Knights' Fortress"
|
||||
QP_Witchs_Potion = "Points: Witch's Potion"
|
||||
QP_Knights_Sword = "Points: The Knight's Sword"
|
||||
QP_Goblin_Diplomacy = "Points: Goblin Diplomacy"
|
||||
QP_Pirates_Treasure = "Points: Pirate's Treasure"
|
||||
QP_Rune_Mysteries = "Points: Rune Mysteries"
|
||||
QP_Misthalin_Mystery = "Points: Misthalin Mystery"
|
||||
QP_Corsair_Curse = "Points: The Corsair Curse"
|
||||
QP_X_Marks_the_Spot = "Points: X Marks the Spot"
|
||||
QP_Below_Ice_Mountain = "Points: Below Ice Mountain"
|
||||
Guppy = "Prepare a Guppy"
|
||||
Cavefish = "Prepare a Cavefish"
|
||||
Tetra = "Prepare a Tetra"
|
||||
Barronite_Deposit = "Crush a Barronite Deposit"
|
||||
Oak_Log = "Cut an Oak Log"
|
||||
Willow_Log = "Cut a Willow Log"
|
||||
Catch_Lobster = "Catch a Lobster"
|
||||
Mine_Silver = "Mine Silver"
|
||||
Mine_Coal = "Mine Coal"
|
||||
Mine_Gold = "Mine Gold"
|
||||
Smelt_Silver = "Smelt a Silver Bar"
|
||||
Smelt_Steel = "Smelt a Steel Bar"
|
||||
Smelt_Gold = "Smelt a Gold Bar"
|
||||
Cut_Sapphire = "Cut a Sapphire"
|
||||
Cut_Emerald = "Cut an Emerald"
|
||||
Cut_Ruby = "Cut a Ruby"
|
||||
Cut_Diamond = "Cut a Diamond"
|
||||
K_Lesser_Demon = "Kill a Lesser Demon"
|
||||
K_Ogress_Shaman = "Kill an Ogress Shaman"
|
||||
Bake_Apple_Pie = "Bake an Apple Pie"
|
||||
Bake_Cake = "Bake a Cake"
|
||||
Bake_Meat_Pizza = "Bake a Meat Pizza"
|
||||
Total_XP_5000 = "5,000 Total XP"
|
||||
Total_XP_10000 = "10,000 Total XP"
|
||||
Total_XP_25000 = "25,000 Total XP"
|
||||
Total_XP_50000 = "50,000 Total XP"
|
||||
Total_XP_100000 = "100,000 Total XP"
|
||||
Total_Level_50 = "Total Level 50"
|
||||
Total_Level_100 = "Total Level 100"
|
||||
Total_Level_150 = "Total Level 150"
|
||||
Total_Level_200 = "Total Level 200"
|
||||
Combat_Level_5 = "Combat Level 5"
|
||||
Combat_Level_15 = "Combat Level 15"
|
||||
Combat_Level_25 = "Combat Level 25"
|
||||
Travel_on_a_Canoe = "Travel on a Canoe"
|
||||
Q_Dragon_Slayer = "Quest: Dragon Slayer"
|
||||
|
||||
__str__ = str.__str__
|
||||
474
worlds/osrs/Options.py
Normal file
474
worlds/osrs/Options.py
Normal file
@@ -0,0 +1,474 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
from Options import Choice, Toggle, Range, PerGameCommonOptions
|
||||
|
||||
MAX_COMBAT_TASKS = 16
|
||||
MAX_PRAYER_TASKS = 3
|
||||
MAX_MAGIC_TASKS = 4
|
||||
MAX_RUNECRAFT_TASKS = 3
|
||||
MAX_CRAFTING_TASKS = 5
|
||||
MAX_MINING_TASKS = 5
|
||||
MAX_SMITHING_TASKS = 4
|
||||
MAX_FISHING_TASKS = 5
|
||||
MAX_COOKING_TASKS = 5
|
||||
MAX_FIREMAKING_TASKS = 2
|
||||
MAX_WOODCUTTING_TASKS = 3
|
||||
|
||||
NON_QUEST_LOCATION_COUNT = 22
|
||||
|
||||
|
||||
class StartingArea(Choice):
|
||||
"""
|
||||
Which chunks are available at the start. The player may need to move through locked chunks to reach the starting
|
||||
area, but any areas that require quests, skills, or coins are not available as a starting location.
|
||||
|
||||
"Any Bank" rolls a random region that contains a bank.
|
||||
Chunksanity can start you in any chunk. Hope you like woodcutting!
|
||||
"""
|
||||
display_name = "Starting Region"
|
||||
option_lumbridge = 0
|
||||
option_al_kharid = 1
|
||||
option_varrock_east = 2
|
||||
option_varrock_west = 3
|
||||
option_edgeville = 4
|
||||
option_falador = 5
|
||||
option_draynor = 6
|
||||
option_wilderness = 7
|
||||
option_any_bank = 8
|
||||
option_chunksanity = 9
|
||||
default = 0
|
||||
|
||||
|
||||
class BrutalGrinds(Toggle):
|
||||
"""
|
||||
Whether to allow skill tasks without having reasonable access to the usual skill training path.
|
||||
For example, if enabled, you could be forced to train smithing without an anvil purely by smelting bars,
|
||||
or training fishing to high levels entirely on shrimp.
|
||||
"""
|
||||
display_name = "Allow Brutal Grinds"
|
||||
|
||||
|
||||
class ProgressiveTasks(Toggle):
|
||||
"""
|
||||
Whether skill tasks should always be generated in order of easiest to hardest.
|
||||
If enabled, you would not be assigned "Mine Gold" without also being assigned
|
||||
"Mine Silver", "Mine Coal", and "Mine Iron". Enabling this will result in a generally shorter seed, but with
|
||||
a lower variety of tasks.
|
||||
"""
|
||||
display_name = "Progressive Tasks"
|
||||
|
||||
|
||||
class MaxCombatLevel(Range):
|
||||
"""
|
||||
The highest combat level of monster to possibly be assigned as a task.
|
||||
If set to 0, no combat tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 1520
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxCombatTasks(Range):
|
||||
"""
|
||||
The maximum number of Combat Tasks to possibly be assigned.
|
||||
If set to 0, no combat tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_COMBAT_TASKS
|
||||
default = MAX_COMBAT_TASKS
|
||||
|
||||
|
||||
class CombatTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating combat tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxPrayerLevel(Range):
|
||||
"""
|
||||
The highest Prayer requirement of any task generated.
|
||||
If set to 0, no Prayer tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxPrayerTasks(Range):
|
||||
"""
|
||||
The maximum number of Prayer Tasks to possibly be assigned.
|
||||
If set to 0, no Prayer tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_PRAYER_TASKS
|
||||
default = MAX_PRAYER_TASKS
|
||||
|
||||
|
||||
class PrayerTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Prayer tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxMagicLevel(Range):
|
||||
"""
|
||||
The highest Magic requirement of any task generated.
|
||||
If set to 0, no Magic tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxMagicTasks(Range):
|
||||
"""
|
||||
The maximum number of Magic Tasks to possibly be assigned.
|
||||
If set to 0, no Magic tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_MAGIC_TASKS
|
||||
default = MAX_MAGIC_TASKS
|
||||
|
||||
|
||||
class MagicTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Magic tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxRunecraftLevel(Range):
|
||||
"""
|
||||
The highest Runecraft requirement of any task generated.
|
||||
If set to 0, no Runecraft tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxRunecraftTasks(Range):
|
||||
"""
|
||||
The maximum number of Runecraft Tasks to possibly be assigned.
|
||||
If set to 0, no Runecraft tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_RUNECRAFT_TASKS
|
||||
default = MAX_RUNECRAFT_TASKS
|
||||
|
||||
|
||||
class RunecraftTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Runecraft tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxCraftingLevel(Range):
|
||||
"""
|
||||
The highest Crafting requirement of any task generated.
|
||||
If set to 0, no Crafting tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxCraftingTasks(Range):
|
||||
"""
|
||||
The maximum number of Crafting Tasks to possibly be assigned.
|
||||
If set to 0, no Crafting tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_CRAFTING_TASKS
|
||||
default = MAX_CRAFTING_TASKS
|
||||
|
||||
|
||||
class CraftingTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Crafting tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxMiningLevel(Range):
|
||||
"""
|
||||
The highest Mining requirement of any task generated.
|
||||
If set to 0, no Mining tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxMiningTasks(Range):
|
||||
"""
|
||||
The maximum number of Mining Tasks to possibly be assigned.
|
||||
If set to 0, no Mining tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_MINING_TASKS
|
||||
default = MAX_MINING_TASKS
|
||||
|
||||
|
||||
class MiningTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Mining tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxSmithingLevel(Range):
|
||||
"""
|
||||
The highest Smithing requirement of any task generated.
|
||||
If set to 0, no Smithing tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxSmithingTasks(Range):
|
||||
"""
|
||||
The maximum number of Smithing Tasks to possibly be assigned.
|
||||
If set to 0, no Smithing tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_SMITHING_TASKS
|
||||
default = MAX_SMITHING_TASKS
|
||||
|
||||
|
||||
class SmithingTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Smithing tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxFishingLevel(Range):
|
||||
"""
|
||||
The highest Fishing requirement of any task generated.
|
||||
If set to 0, no Fishing tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxFishingTasks(Range):
|
||||
"""
|
||||
The maximum number of Fishing Tasks to possibly be assigned.
|
||||
If set to 0, no Fishing tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_FISHING_TASKS
|
||||
default = MAX_FISHING_TASKS
|
||||
|
||||
|
||||
class FishingTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Fishing tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxCookingLevel(Range):
|
||||
"""
|
||||
The highest Cooking requirement of any task generated.
|
||||
If set to 0, no Cooking tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxCookingTasks(Range):
|
||||
"""
|
||||
The maximum number of Cooking Tasks to possibly be assigned.
|
||||
If set to 0, no Cooking tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_COOKING_TASKS
|
||||
default = MAX_COOKING_TASKS
|
||||
|
||||
|
||||
class CookingTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Cooking tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxFiremakingLevel(Range):
|
||||
"""
|
||||
The highest Firemaking requirement of any task generated.
|
||||
If set to 0, no Firemaking tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxFiremakingTasks(Range):
|
||||
"""
|
||||
The maximum number of Firemaking Tasks to possibly be assigned.
|
||||
If set to 0, no Firemaking tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_FIREMAKING_TASKS
|
||||
default = MAX_FIREMAKING_TASKS
|
||||
|
||||
|
||||
class FiremakingTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Firemaking tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxWoodcuttingLevel(Range):
|
||||
"""
|
||||
The highest Woodcutting requirement of any task generated.
|
||||
If set to 0, no Woodcutting tasks will be generated.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MaxWoodcuttingTasks(Range):
|
||||
"""
|
||||
The maximum number of Woodcutting Tasks to possibly be assigned.
|
||||
If set to 0, no Woodcutting tasks will be generated.
|
||||
This only determines the maximum possible, fewer than the maximum could be assigned.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = MAX_WOODCUTTING_TASKS
|
||||
default = MAX_WOODCUTTING_TASKS
|
||||
|
||||
|
||||
class WoodcuttingTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating Woodcutting tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
class MinimumGeneralTasks(Range):
|
||||
"""
|
||||
How many guaranteed general progression tasks to be assigned (total level, total XP, etc.).
|
||||
General progression tasks will be used to fill out any holes caused by having fewer possible tasks than needed, so
|
||||
there is no maximum.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = NON_QUEST_LOCATION_COUNT
|
||||
default = 10
|
||||
|
||||
|
||||
class GeneralTaskWeight(Range):
|
||||
"""
|
||||
How much to favor generating General tasks over other types of task.
|
||||
Weights of all Task Types will be compared against each other, a task with 50 weight
|
||||
is twice as likely to appear as one with 25.
|
||||
"""
|
||||
range_start = 0
|
||||
range_end = 99
|
||||
default = 50
|
||||
|
||||
|
||||
@dataclass
|
||||
class OSRSOptions(PerGameCommonOptions):
|
||||
starting_area: StartingArea
|
||||
brutal_grinds: BrutalGrinds
|
||||
progressive_tasks: ProgressiveTasks
|
||||
max_combat_level: MaxCombatLevel
|
||||
max_combat_tasks: MaxCombatTasks
|
||||
combat_task_weight: CombatTaskWeight
|
||||
max_prayer_level: MaxPrayerLevel
|
||||
max_prayer_tasks: MaxPrayerTasks
|
||||
prayer_task_weight: PrayerTaskWeight
|
||||
max_magic_level: MaxMagicLevel
|
||||
max_magic_tasks: MaxMagicTasks
|
||||
magic_task_weight: MagicTaskWeight
|
||||
max_runecraft_level: MaxRunecraftLevel
|
||||
max_runecraft_tasks: MaxRunecraftTasks
|
||||
runecraft_task_weight: RunecraftTaskWeight
|
||||
max_crafting_level: MaxCraftingLevel
|
||||
max_crafting_tasks: MaxCraftingTasks
|
||||
crafting_task_weight: CraftingTaskWeight
|
||||
max_mining_level: MaxMiningLevel
|
||||
max_mining_tasks: MaxMiningTasks
|
||||
mining_task_weight: MiningTaskWeight
|
||||
max_smithing_level: MaxSmithingLevel
|
||||
max_smithing_tasks: MaxSmithingTasks
|
||||
smithing_task_weight: SmithingTaskWeight
|
||||
max_fishing_level: MaxFishingLevel
|
||||
max_fishing_tasks: MaxFishingTasks
|
||||
fishing_task_weight: FishingTaskWeight
|
||||
max_cooking_level: MaxCookingLevel
|
||||
max_cooking_tasks: MaxCookingTasks
|
||||
cooking_task_weight: CookingTaskWeight
|
||||
max_firemaking_level: MaxFiremakingLevel
|
||||
max_firemaking_tasks: MaxFiremakingTasks
|
||||
firemaking_task_weight: FiremakingTaskWeight
|
||||
max_woodcutting_level: MaxWoodcuttingLevel
|
||||
max_woodcutting_tasks: MaxWoodcuttingTasks
|
||||
woodcutting_task_weight: WoodcuttingTaskWeight
|
||||
minimum_general_tasks: MinimumGeneralTasks
|
||||
general_task_weight: GeneralTaskWeight
|
||||
12
worlds/osrs/Regions.py
Normal file
12
worlds/osrs/Regions.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import typing
|
||||
|
||||
|
||||
class RegionRow(typing.NamedTuple):
|
||||
name: str
|
||||
itemReq: str
|
||||
connections: typing.List[str]
|
||||
resources: typing.List[str]
|
||||
|
||||
|
||||
class ResourceRow(typing.NamedTuple):
|
||||
name: str
|
||||
657
worlds/osrs/__init__.py
Normal file
657
worlds/osrs/__init__.py
Normal file
@@ -0,0 +1,657 @@
|
||||
import typing
|
||||
|
||||
from BaseClasses import Item, Tutorial, ItemClassification, Region, MultiWorld
|
||||
from worlds.AutoWorld import WebWorld, World
|
||||
from worlds.generic.Rules import add_rule, CollectionRule
|
||||
from .Items import OSRSItem, starting_area_dict, chunksanity_starting_chunks, QP_Items, ItemRow, \
|
||||
chunksanity_special_region_names
|
||||
from .Locations import OSRSLocation, LocationRow
|
||||
|
||||
from .Options import OSRSOptions, StartingArea
|
||||
from .Names import LocationNames, ItemNames, RegionNames
|
||||
|
||||
from .LogicCSV.LogicCSVToPython import data_csv_tag
|
||||
from .LogicCSV.items_generated import item_rows
|
||||
from .LogicCSV.locations_generated import location_rows
|
||||
from .LogicCSV.regions_generated import region_rows
|
||||
from .LogicCSV.resources_generated import resource_rows
|
||||
from .Regions import RegionRow, ResourceRow
|
||||
|
||||
|
||||
class OSRSWeb(WebWorld):
|
||||
theme = "stone"
|
||||
|
||||
setup_en = Tutorial(
|
||||
"Multiworld Setup Guide",
|
||||
"A guide to setting up the Old School Runescape Randomizer connected to an Archipelago Multiworld",
|
||||
"English",
|
||||
"docs/setup_en.md",
|
||||
"setup/en",
|
||||
["digiholic"]
|
||||
)
|
||||
tutorials = [setup_en]
|
||||
|
||||
|
||||
class OSRSWorld(World):
|
||||
game = "Old School Runescape"
|
||||
options_dataclass = OSRSOptions
|
||||
options: OSRSOptions
|
||||
topology_present = True
|
||||
web = OSRSWeb()
|
||||
base_id = 0x070000
|
||||
data_version = 1
|
||||
|
||||
item_name_to_id = {item_rows[i].name: 0x070000 + i for i in range(len(item_rows))}
|
||||
location_name_to_id = {location_rows[i].name: 0x070000 + i for i in range(len(location_rows))}
|
||||
|
||||
region_name_to_data: typing.Dict[str, Region]
|
||||
location_name_to_data: typing.Dict[str, OSRSLocation]
|
||||
|
||||
location_rows_by_name: typing.Dict[str, LocationRow]
|
||||
region_rows_by_name: typing.Dict[str, RegionRow]
|
||||
resource_rows_by_name: typing.Dict[str, ResourceRow]
|
||||
item_rows_by_name: typing.Dict[str, ItemRow]
|
||||
|
||||
starting_area_item: str
|
||||
|
||||
locations_by_category: typing.Dict[str, typing.List[LocationRow]]
|
||||
|
||||
def __init__(self, world: MultiWorld, player: int):
|
||||
super().__init__(world, player)
|
||||
self.region_name_to_data = {}
|
||||
self.location_name_to_data = {}
|
||||
|
||||
self.location_rows_by_name = {}
|
||||
self.region_rows_by_name = {}
|
||||
self.resource_rows_by_name = {}
|
||||
self.item_rows_by_name = {}
|
||||
|
||||
self.starting_area_item = ""
|
||||
|
||||
self.locations_by_category = {}
|
||||
|
||||
def generate_early(self) -> None:
|
||||
location_categories = [location_row.category for location_row in location_rows]
|
||||
self.locations_by_category = {category:
|
||||
[location_row for location_row in location_rows if
|
||||
location_row.category == category]
|
||||
for category in location_categories}
|
||||
|
||||
self.location_rows_by_name = {loc_row.name: loc_row for loc_row in location_rows}
|
||||
self.region_rows_by_name = {reg_row.name: reg_row for reg_row in region_rows}
|
||||
self.resource_rows_by_name = {rec_row.name: rec_row for rec_row in resource_rows}
|
||||
self.item_rows_by_name = {it_row.name: it_row for it_row in item_rows}
|
||||
|
||||
rnd = self.random
|
||||
starting_area = self.options.starting_area
|
||||
|
||||
if starting_area.value == StartingArea.option_any_bank:
|
||||
self.starting_area_item = rnd.choice(starting_area_dict)
|
||||
elif starting_area.value < StartingArea.option_chunksanity:
|
||||
self.starting_area_item = starting_area_dict[starting_area.value]
|
||||
else:
|
||||
self.starting_area_item = rnd.choice(chunksanity_starting_chunks)
|
||||
|
||||
# Set Starting Chunk
|
||||
self.multiworld.push_precollected(self.create_item(self.starting_area_item))
|
||||
|
||||
"""
|
||||
This function pulls from LogicCSVToPython so that it sends the correct tag of the repository to the client.
|
||||
_Make sure to update that value whenever the CSVs change!_
|
||||
"""
|
||||
|
||||
def fill_slot_data(self):
|
||||
data = self.options.as_dict("brutal_grinds")
|
||||
data["data_csv_tag"] = data_csv_tag
|
||||
return data
|
||||
|
||||
def create_regions(self) -> None:
|
||||
"""
|
||||
called to place player's regions into the MultiWorld's regions list. If it's hard to separate, this can be done
|
||||
during generate_early or basic as well.
|
||||
"""
|
||||
|
||||
# First, create the "Menu" region to start
|
||||
menu_region = self.create_region("Menu")
|
||||
|
||||
for region_row in region_rows:
|
||||
self.create_region(region_row.name)
|
||||
|
||||
for resource_row in resource_rows:
|
||||
self.create_region(resource_row.name)
|
||||
|
||||
# Removes the word "Area: " from the item name to get the region it applies to.
|
||||
# I figured tacking "Area: " at the beginning would make it _easier_ to tell apart. Turns out it made it worse
|
||||
if self.starting_area_item in chunksanity_special_region_names:
|
||||
starting_area_region = chunksanity_special_region_names[self.starting_area_item]
|
||||
else:
|
||||
starting_area_region = self.starting_area_item[6:] # len("Area: ")
|
||||
starting_entrance = menu_region.create_exit(f"Start->{starting_area_region}")
|
||||
starting_entrance.access_rule = lambda state: state.has(self.starting_area_item, self.player)
|
||||
starting_entrance.connect(self.region_name_to_data[starting_area_region])
|
||||
|
||||
# Create entrances between regions
|
||||
for region_row in region_rows:
|
||||
region = self.region_name_to_data[region_row.name]
|
||||
|
||||
for outbound_region_name in region_row.connections:
|
||||
parsed_outbound = outbound_region_name.replace('*', '')
|
||||
entrance = region.create_exit(f"{region_row.name}->{parsed_outbound}")
|
||||
entrance.connect(self.region_name_to_data[parsed_outbound])
|
||||
|
||||
item_name = self.region_rows_by_name[parsed_outbound].itemReq
|
||||
if "*" not in outbound_region_name and "*" not in item_name:
|
||||
entrance.access_rule = lambda state, item_name=item_name: state.has(item_name, self.player)
|
||||
continue
|
||||
|
||||
self.generate_special_rules_for(entrance, region_row, outbound_region_name)
|
||||
|
||||
for resource_region in region_row.resources:
|
||||
if not resource_region:
|
||||
continue
|
||||
|
||||
entrance = region.create_exit(f"{region_row.name}->{resource_region.replace('*', '')}")
|
||||
if "*" not in resource_region:
|
||||
entrance.connect(self.region_name_to_data[resource_region])
|
||||
else:
|
||||
self.generate_special_rules_for(entrance, region_row, resource_region)
|
||||
entrance.connect(self.region_name_to_data[resource_region.replace('*', '')])
|
||||
|
||||
self.roll_locations()
|
||||
|
||||
def generate_special_rules_for(self, entrance, region_row, outbound_region_name):
|
||||
# print(f"Special rules required to access region {outbound_region_name} from {region_row.name}")
|
||||
if outbound_region_name == RegionNames.Cooks_Guild:
|
||||
item_name = self.region_rows_by_name[outbound_region_name].itemReq.replace('*', '')
|
||||
cooking_level_rule = self.get_skill_rule("cooking", 32)
|
||||
entrance.access_rule = lambda state: state.has(item_name, self.player) and \
|
||||
cooking_level_rule(state)
|
||||
return
|
||||
if outbound_region_name == RegionNames.Crafting_Guild:
|
||||
item_name = self.region_rows_by_name[outbound_region_name].itemReq.replace('*', '')
|
||||
crafting_level_rule = self.get_skill_rule("crafting", 40)
|
||||
entrance.access_rule = lambda state: state.has(item_name, self.player) and \
|
||||
crafting_level_rule(state)
|
||||
return
|
||||
if outbound_region_name == RegionNames.Corsair_Cove:
|
||||
item_name = self.region_rows_by_name[outbound_region_name].itemReq.replace('*', '')
|
||||
# Need to be able to start Corsair Curse in addition to having the item
|
||||
entrance.access_rule = lambda state: state.has(item_name, self.player) and \
|
||||
state.can_reach(RegionNames.Falador_Farm, "Region", self.player)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Falador_Farm, self.player), entrance)
|
||||
|
||||
return
|
||||
if outbound_region_name == "Camdozaal*":
|
||||
item_name = self.region_rows_by_name[outbound_region_name.replace('*', '')].itemReq
|
||||
entrance.access_rule = lambda state: state.has(item_name, self.player) and \
|
||||
state.has(ItemNames.QP_Below_Ice_Mountain, self.player)
|
||||
return
|
||||
if region_row.name == "Dwarven Mountain Pass" and outbound_region_name == "Anvil*":
|
||||
entrance.access_rule = lambda state: state.has(ItemNames.QP_Dorics_Quest, self.player)
|
||||
return
|
||||
# Special logic for canoes
|
||||
canoe_regions = [RegionNames.Lumbridge, RegionNames.South_Of_Varrock, RegionNames.Barbarian_Village,
|
||||
RegionNames.Edgeville, RegionNames.Wilderness]
|
||||
if region_row.name in canoe_regions:
|
||||
# Skill rules for greater distances
|
||||
woodcutting_rule_d1 = self.get_skill_rule("woodcutting", 12)
|
||||
woodcutting_rule_d2 = self.get_skill_rule("woodcutting", 27)
|
||||
woodcutting_rule_d3 = self.get_skill_rule("woodcutting", 42)
|
||||
woodcutting_rule_all = self.get_skill_rule("woodcutting", 57)
|
||||
|
||||
if region_row.name == RegionNames.Lumbridge:
|
||||
# Canoe Tree access for the Location
|
||||
if outbound_region_name == RegionNames.Canoe_Tree:
|
||||
entrance.access_rule = \
|
||||
lambda state: (state.can_reach_region(RegionNames.South_Of_Varrock, self.player)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \
|
||||
(state.can_reach_region(RegionNames.Barbarian_Village)
|
||||
and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \
|
||||
(state.can_reach_region(RegionNames.Edgeville)
|
||||
and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42) or \
|
||||
(state.can_reach_region(RegionNames.Wilderness)
|
||||
and woodcutting_rule_all(state) and self.options.max_woodcutting_level >= 57)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance)
|
||||
# Access to other chunks based on woodcutting settings
|
||||
# South of Varrock does not need to be checked, because it's already adjacent
|
||||
if outbound_region_name == RegionNames.Barbarian_Village:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d2(state) \
|
||||
and self.options.max_woodcutting_level >= 27
|
||||
if outbound_region_name == RegionNames.Edgeville:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d3(state) \
|
||||
and self.options.max_woodcutting_level >= 42
|
||||
if outbound_region_name == RegionNames.Wilderness:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_all(state) \
|
||||
and self.options.max_woodcutting_level >= 57
|
||||
|
||||
if region_row.name == RegionNames.South_Of_Varrock:
|
||||
if outbound_region_name == RegionNames.Canoe_Tree:
|
||||
entrance.access_rule = \
|
||||
lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \
|
||||
(state.can_reach_region(RegionNames.Barbarian_Village)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \
|
||||
(state.can_reach_region(RegionNames.Edgeville)
|
||||
and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \
|
||||
(state.can_reach_region(RegionNames.Wilderness)
|
||||
and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance)
|
||||
# Access to other chunks based on woodcutting settings
|
||||
# Lumbridge does not need to be checked, because it's already adjacent
|
||||
if outbound_region_name == RegionNames.Barbarian_Village:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d1(state) \
|
||||
and self.options.max_woodcutting_level >= 12
|
||||
if outbound_region_name == RegionNames.Edgeville:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d3(state) \
|
||||
and self.options.max_woodcutting_level >= 27
|
||||
if outbound_region_name == RegionNames.Wilderness:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_all(state) \
|
||||
and self.options.max_woodcutting_level >= 42
|
||||
if region_row.name == RegionNames.Barbarian_Village:
|
||||
if outbound_region_name == RegionNames.Canoe_Tree:
|
||||
entrance.access_rule = \
|
||||
lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player)
|
||||
and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \
|
||||
(state.can_reach_region(RegionNames.South_Of_Varrock)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \
|
||||
(state.can_reach_region(RegionNames.Edgeville)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \
|
||||
(state.can_reach_region(RegionNames.Wilderness)
|
||||
and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance)
|
||||
# Access to other chunks based on woodcutting settings
|
||||
if outbound_region_name == RegionNames.Lumbridge:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d2(state) \
|
||||
and self.options.max_woodcutting_level >= 27
|
||||
if outbound_region_name == RegionNames.South_Of_Varrock:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d1(state) \
|
||||
and self.options.max_woodcutting_level >= 12
|
||||
# Edgeville does not need to be checked, because it's already adjacent
|
||||
if outbound_region_name == RegionNames.Wilderness:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d3(state) \
|
||||
and self.options.max_woodcutting_level >= 42
|
||||
if region_row.name == RegionNames.Edgeville:
|
||||
if outbound_region_name == RegionNames.Canoe_Tree:
|
||||
entrance.access_rule = \
|
||||
lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player)
|
||||
and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42) or \
|
||||
(state.can_reach_region(RegionNames.South_Of_Varrock)
|
||||
and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \
|
||||
(state.can_reach_region(RegionNames.Barbarian_Village)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \
|
||||
(state.can_reach_region(RegionNames.Wilderness)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance)
|
||||
# Access to other chunks based on woodcutting settings
|
||||
if outbound_region_name == RegionNames.Lumbridge:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d3(state) \
|
||||
and self.options.max_woodcutting_level >= 42
|
||||
if outbound_region_name == RegionNames.South_Of_Varrock:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d2(state) \
|
||||
and self.options.max_woodcutting_level >= 27
|
||||
# Barbarian Village does not need to be checked, because it's already adjacent
|
||||
# Wilderness does not need to be checked, because it's already adjacent
|
||||
if region_row.name == RegionNames.Wilderness:
|
||||
if outbound_region_name == RegionNames.Canoe_Tree:
|
||||
entrance.access_rule = \
|
||||
lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player)
|
||||
and woodcutting_rule_all(state) and self.options.max_woodcutting_level >= 57) or \
|
||||
(state.can_reach_region(RegionNames.South_Of_Varrock)
|
||||
and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42) or \
|
||||
(state.can_reach_region(RegionNames.Barbarian_Village)
|
||||
and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \
|
||||
(state.can_reach_region(RegionNames.Edgeville)
|
||||
and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance)
|
||||
self.multiworld.register_indirect_condition(
|
||||
self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance)
|
||||
# Access to other chunks based on woodcutting settings
|
||||
if outbound_region_name == RegionNames.Lumbridge:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_all(state) \
|
||||
and self.options.max_woodcutting_level >= 57
|
||||
if outbound_region_name == RegionNames.South_Of_Varrock:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d3(state) \
|
||||
and self.options.max_woodcutting_level >= 42
|
||||
if outbound_region_name == RegionNames.Barbarian_Village:
|
||||
entrance.access_rule = lambda state: woodcutting_rule_d2(state) \
|
||||
and self.options.max_woodcutting_level >= 27
|
||||
# Edgeville does not need to be checked, because it's already adjacent
|
||||
|
||||
def roll_locations(self):
|
||||
locations_required = 0
|
||||
generation_is_fake = hasattr(self.multiworld, "generation_is_fake") # UT specific override
|
||||
for item_row in item_rows:
|
||||
locations_required += item_row.amount
|
||||
|
||||
locations_added = 1 # At this point we've already added the starting area, so we start at 1 instead of 0
|
||||
|
||||
# Quests are always added
|
||||
for i, location_row in enumerate(location_rows):
|
||||
if location_row.category in {"quest", "points", "goal"}:
|
||||
self.create_and_add_location(i)
|
||||
if location_row.category == "quest":
|
||||
locations_added += 1
|
||||
|
||||
# Build up the weighted Task Pool
|
||||
rnd = self.random
|
||||
|
||||
# Start with the minimum general tasks
|
||||
general_tasks = [task for task in self.locations_by_category["general"]]
|
||||
if not self.options.progressive_tasks:
|
||||
rnd.shuffle(general_tasks)
|
||||
else:
|
||||
general_tasks.reverse()
|
||||
for i in range(self.options.minimum_general_tasks):
|
||||
task = general_tasks.pop()
|
||||
self.add_location(task)
|
||||
locations_added += 1
|
||||
|
||||
general_weight = self.options.general_task_weight if len(general_tasks) > 0 else 0
|
||||
|
||||
tasks_per_task_type: typing.Dict[str, typing.List[LocationRow]] = {}
|
||||
weights_per_task_type: typing.Dict[str, int] = {}
|
||||
|
||||
task_types = ["prayer", "magic", "runecraft", "mining", "crafting",
|
||||
"smithing", "fishing", "cooking", "firemaking", "woodcutting", "combat"]
|
||||
for task_type in task_types:
|
||||
max_level_for_task_type = getattr(self.options, f"max_{task_type}_level")
|
||||
max_amount_for_task_type = getattr(self.options, f"max_{task_type}_tasks")
|
||||
tasks_for_this_type = [task for task in self.locations_by_category[task_type]
|
||||
if task.skills[0].level <= max_level_for_task_type]
|
||||
if not self.options.progressive_tasks:
|
||||
rnd.shuffle(tasks_for_this_type)
|
||||
else:
|
||||
tasks_for_this_type.reverse()
|
||||
|
||||
tasks_for_this_type = tasks_for_this_type[:max_amount_for_task_type]
|
||||
weight_for_this_type = getattr(self.options,
|
||||
f"{task_type}_task_weight")
|
||||
if weight_for_this_type > 0 and tasks_for_this_type:
|
||||
tasks_per_task_type[task_type] = tasks_for_this_type
|
||||
weights_per_task_type[task_type] = weight_for_this_type
|
||||
|
||||
# Build a list of collections and weights in a matching order for rnd.choices later
|
||||
all_tasks = []
|
||||
all_weights = []
|
||||
for task_type in task_types:
|
||||
if task_type in tasks_per_task_type:
|
||||
all_tasks.append(tasks_per_task_type[task_type])
|
||||
all_weights.append(weights_per_task_type[task_type])
|
||||
|
||||
# Even after the initial forced generals, they can still be rolled randomly
|
||||
if general_weight > 0:
|
||||
all_tasks.append(general_tasks)
|
||||
all_weights.append(general_weight)
|
||||
|
||||
while locations_added < locations_required or (generation_is_fake and len(all_tasks) > 0):
|
||||
if all_tasks:
|
||||
chosen_task = rnd.choices(all_tasks, all_weights)[0]
|
||||
if chosen_task:
|
||||
task = chosen_task.pop()
|
||||
self.add_location(task)
|
||||
locations_added += 1
|
||||
|
||||
# This isn't an else because chosen_task can become empty in the process of resolving the above block
|
||||
# We still want to clear this list out while we're doing that
|
||||
if not chosen_task:
|
||||
index = all_tasks.index(chosen_task)
|
||||
del all_tasks[index]
|
||||
del all_weights[index]
|
||||
|
||||
else:
|
||||
if len(general_tasks) == 0:
|
||||
raise Exception(f"There are not enough available tasks to fill the remaining pool for OSRS " +
|
||||
f"Please adjust {self.player_name}'s settings to be less restrictive of tasks.")
|
||||
task = general_tasks.pop()
|
||||
self.add_location(task)
|
||||
locations_added += 1
|
||||
|
||||
def add_location(self, location):
|
||||
index = [i for i in range(len(location_rows)) if location_rows[i].name == location.name][0]
|
||||
self.create_and_add_location(index)
|
||||
|
||||
def create_items(self) -> None:
|
||||
for item_row in item_rows:
|
||||
if item_row.name != self.starting_area_item:
|
||||
for c in range(item_row.amount):
|
||||
item = self.create_item(item_row.name)
|
||||
self.multiworld.itempool.append(item)
|
||||
|
||||
def get_filler_item_name(self) -> str:
|
||||
return self.random.choice(
|
||||
[ItemNames.Progressive_Armor, ItemNames.Progressive_Weapons, ItemNames.Progressive_Magic,
|
||||
ItemNames.Progressive_Tools, ItemNames.Progressive_Range_Armor, ItemNames.Progressive_Range_Weapon])
|
||||
|
||||
def create_and_add_location(self, row_index) -> None:
|
||||
location_row = location_rows[row_index]
|
||||
# print(f"Adding task {location_row.name}")
|
||||
|
||||
# Create Location
|
||||
location_id = self.base_id + row_index
|
||||
if location_row.category == "points" or location_row.category == "goal":
|
||||
location_id = None
|
||||
location = OSRSLocation(self.player, location_row.name, location_id)
|
||||
self.location_name_to_data[location_row.name] = location
|
||||
|
||||
# Add the location to its first region, or if it doesn't belong to one, to Menu
|
||||
region = self.region_name_to_data["Menu"]
|
||||
if location_row.regions:
|
||||
region = self.region_name_to_data[location_row.regions[0]]
|
||||
location.parent_region = region
|
||||
region.locations.append(location)
|
||||
|
||||
def set_rules(self) -> None:
|
||||
"""
|
||||
called to set access and item rules on locations and entrances.
|
||||
"""
|
||||
quest_attr_names = ["Cooks_Assistant", "Demon_Slayer", "Restless_Ghost", "Romeo_Juliet",
|
||||
"Sheep_Shearer", "Shield_of_Arrav", "Ernest_the_Chicken", "Vampyre_Slayer",
|
||||
"Imp_Catcher", "Prince_Ali_Rescue", "Dorics_Quest", "Black_Knights_Fortress",
|
||||
"Witchs_Potion", "Knights_Sword", "Goblin_Diplomacy", "Pirates_Treasure",
|
||||
"Rune_Mysteries", "Misthalin_Mystery", "Corsair_Curse", "X_Marks_the_Spot",
|
||||
"Below_Ice_Mountain"]
|
||||
for qp_attr_name in quest_attr_names:
|
||||
loc_name = getattr(LocationNames, f"QP_{qp_attr_name}")
|
||||
item_name = getattr(ItemNames, f"QP_{qp_attr_name}")
|
||||
self.multiworld.get_location(loc_name, self.player) \
|
||||
.place_locked_item(self.create_event(item_name))
|
||||
|
||||
for quest_attr_name in quest_attr_names:
|
||||
qp_loc_name = getattr(LocationNames, f"QP_{quest_attr_name}")
|
||||
q_loc_name = getattr(LocationNames, f"Q_{quest_attr_name}")
|
||||
add_rule(self.multiworld.get_location(qp_loc_name, self.player), lambda state, q_loc_name=q_loc_name: (
|
||||
self.multiworld.get_location(q_loc_name, self.player).can_reach(state)
|
||||
))
|
||||
|
||||
# place "Victory" at "Dragon Slayer" and set collection as win condition
|
||||
self.multiworld.get_location(LocationNames.Q_Dragon_Slayer, self.player) \
|
||||
.place_locked_item(self.create_event("Victory"))
|
||||
self.multiworld.completion_condition[self.player] = lambda state: (state.has("Victory", self.player))
|
||||
|
||||
for location_name, location in self.location_name_to_data.items():
|
||||
location_row = self.location_rows_by_name[location_name]
|
||||
# Set up requirements for region
|
||||
for region_required_name in location_row.regions:
|
||||
region_required = self.region_name_to_data[region_required_name]
|
||||
add_rule(location,
|
||||
lambda state, region_required=region_required: state.can_reach(region_required, "Region",
|
||||
self.player))
|
||||
for skill_req in location_row.skills:
|
||||
add_rule(location, self.get_skill_rule(skill_req.skill, skill_req.level))
|
||||
for item_req in location_row.items:
|
||||
add_rule(location, lambda state, item_req=item_req: state.has(item_req, self.player))
|
||||
if location_row.qp:
|
||||
add_rule(location, lambda state, location_row=location_row: self.quest_points(state) > location_row.qp)
|
||||
|
||||
def create_region(self, name: str) -> "Region":
|
||||
region = Region(name, self.player, self.multiworld)
|
||||
self.region_name_to_data[name] = region
|
||||
self.multiworld.regions.append(region)
|
||||
return region
|
||||
|
||||
def create_item(self, item_name: str) -> "Item":
|
||||
item = [item for item in item_rows if item.name == item_name][0]
|
||||
index = item_rows.index(item)
|
||||
return OSRSItem(item.name, item.progression, self.base_id + index, self.player)
|
||||
|
||||
def create_event(self, event: str):
|
||||
# while we are at it, we can also add a helper to create events
|
||||
return OSRSItem(event, ItemClassification.progression, None, self.player)
|
||||
|
||||
def quest_points(self, state):
|
||||
qp = 0
|
||||
for qp_event in QP_Items:
|
||||
if state.has(qp_event, self.player):
|
||||
qp += int(qp_event[0])
|
||||
return qp
|
||||
|
||||
"""
|
||||
Ensures a target level can be reached with available resources
|
||||
"""
|
||||
|
||||
def get_skill_rule(self, skill, level) -> CollectionRule:
|
||||
if skill.lower() == "fishing":
|
||||
if self.options.brutal_grinds or level < 5:
|
||||
return lambda state: state.can_reach(RegionNames.Shrimp, "Region", self.player)
|
||||
if level < 20:
|
||||
return lambda state: state.can_reach(RegionNames.Shrimp, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Port_Sarim, "Region", self.player)
|
||||
else:
|
||||
return lambda state: state.can_reach(RegionNames.Shrimp, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Port_Sarim, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Fly_Fish, "Region", self.player)
|
||||
if skill.lower() == "mining":
|
||||
if self.options.brutal_grinds or level < 15:
|
||||
return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) or \
|
||||
state.can_reach(RegionNames.Clay_Rock, "Region", self.player)
|
||||
else:
|
||||
# Iron is the best way to train all the way to 99, so having access to iron is all you need to check for
|
||||
return lambda state: (state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) or
|
||||
state.can_reach(RegionNames.Clay_Rock, "Region", self.player)) and \
|
||||
state.can_reach(RegionNames.Iron_Rock, "Region", self.player)
|
||||
if skill.lower() == "woodcutting":
|
||||
if self.options.brutal_grinds or level < 15:
|
||||
# I've checked. There is not a single chunk in the f2p that does not have at least one normal tree.
|
||||
# Even the desert.
|
||||
return lambda state: True
|
||||
if level < 30:
|
||||
return lambda state: state.can_reach(RegionNames.Oak_Tree, "Region", self.player)
|
||||
else:
|
||||
return lambda state: state.can_reach(RegionNames.Oak_Tree, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Willow_Tree, "Region", self.player)
|
||||
if skill.lower() == "smithing":
|
||||
if self.options.brutal_grinds:
|
||||
return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Furnace, "Region", self.player)
|
||||
if level < 15:
|
||||
# Lumbridge has a special bronze-only anvil. This is the only anvil of its type so it's not included
|
||||
# in the "Anvil" resource region. We still need to check for it though.
|
||||
return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Furnace, "Region", self.player) and \
|
||||
(state.can_reach(RegionNames.Anvil, "Region", self.player) or
|
||||
state.can_reach(RegionNames.Lumbridge, "Region", self.player))
|
||||
if level < 30:
|
||||
# For levels between 15 and 30, the lumbridge anvil won't cut it. Only a real one will do
|
||||
return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Iron_Rock, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Furnace, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Anvil, "Region", self.player)
|
||||
else:
|
||||
return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Iron_Rock, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Coal_Rock, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Furnace, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Anvil, "Region", self.player)
|
||||
if skill.lower() == "crafting":
|
||||
# Crafting is really complex. Need a lot of sub-rules to make this even remotely readable
|
||||
def can_spin(state):
|
||||
return state.can_reach(RegionNames.Sheep, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Spinning_Wheel, "Region", self.player)
|
||||
|
||||
def can_pot(state):
|
||||
return state.can_reach(RegionNames.Clay_Rock, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Barbarian_Village, "Region", self.player)
|
||||
|
||||
def can_tan(state):
|
||||
return state.can_reach(RegionNames.Milk, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Al_Kharid, "Region", self.player)
|
||||
|
||||
def mould_access(state):
|
||||
return state.can_reach(RegionNames.Al_Kharid, "Region", self.player) or \
|
||||
state.can_reach(RegionNames.Rimmington, "Region", self.player)
|
||||
|
||||
def can_silver(state):
|
||||
|
||||
return state.can_reach(RegionNames.Silver_Rock, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Furnace, "Region", self.player) and mould_access(state)
|
||||
|
||||
def can_gold(state):
|
||||
return state.can_reach(RegionNames.Gold_Rock, "Region", self.player) and \
|
||||
state.can_reach(RegionNames.Furnace, "Region", self.player) and mould_access(state)
|
||||
|
||||
if self.options.brutal_grinds or level < 5:
|
||||
return lambda state: can_spin(state) or can_pot(state) or can_tan(state)
|
||||
|
||||
can_smelt_gold = self.get_skill_rule("smithing", 40)
|
||||
can_smelt_silver = self.get_skill_rule("smithing", 20)
|
||||
if level < 16:
|
||||
return lambda state: can_pot(state) or can_tan(state) or (can_gold(state) and can_smelt_gold(state))
|
||||
else:
|
||||
return lambda state: can_tan(state) or (can_silver(state) and can_smelt_silver(state)) or \
|
||||
(can_gold(state) and can_smelt_gold(state))
|
||||
if skill.lower() == "Cooking":
|
||||
if self.options.brutal_grinds or level < 15:
|
||||
return lambda state: state.can_reach(RegionNames.Milk, "Region", self.player) or \
|
||||
state.can_reach(RegionNames.Egg, "Region", self.player) or \
|
||||
state.can_reach(RegionNames.Shrimp, "Region", self.player) or \
|
||||
(state.can_reach(RegionNames.Wheat, "Region", self.player) and
|
||||
state.can_reach(RegionNames.Windmill, "Region", self.player))
|
||||
else:
|
||||
can_catch_fly_fish = self.get_skill_rule("fishing", 20)
|
||||
return lambda state: state.can_reach(RegionNames.Fly_Fish, "Region", self.player) and \
|
||||
can_catch_fly_fish(state) and \
|
||||
(state.can_reach(RegionNames.Milk, "Region", self.player) or
|
||||
state.can_reach(RegionNames.Egg, "Region", self.player) or
|
||||
state.can_reach(RegionNames.Shrimp, "Region", self.player) or
|
||||
(state.can_reach(RegionNames.Wheat, "Region", self.player) and
|
||||
state.can_reach(RegionNames.Windmill, "Region", self.player)))
|
||||
if skill.lower() == "runecraft":
|
||||
return lambda state: state.has(ItemNames.QP_Rune_Mysteries, self.player)
|
||||
if skill.lower() == "magic":
|
||||
return lambda state: state.can_reach(RegionNames.Mind_Runes, "Region", self.player)
|
||||
|
||||
return lambda state: True
|
||||
114
worlds/osrs/docs/en_Old School Runescape.md
Normal file
114
worlds/osrs/docs/en_Old School Runescape.md
Normal file
@@ -0,0 +1,114 @@
|
||||
# Old School Runescape
|
||||
|
||||
## What is the Goal of this Randomizer?
|
||||
The goal is to complete the quest "Dragon Slayer I" with limited access to gear and map chunks while following normal
|
||||
Ironman/Group Ironman restrictions on a fresh free-to-play account.
|
||||
|
||||
## Where is the options page?
|
||||
|
||||
The [player options page for this game](../player-options) contains all the options you need to configure and export a
|
||||
config file. OSRS contains many options for a highly customizable experience. The options available to you are:
|
||||
|
||||
* **Starting Area** - The starting region of your run. This is the first region you will have available, and you can always
|
||||
freely return to it (see the section below for when it is allowed to cross locked regions to access it)
|
||||
* You may select a starting city from the list of Lumbridge, Al Kharid, Varrock (East or West), Edgeville, Falador,
|
||||
Draynor Village, or The Wilderness (Ferox Enclave)
|
||||
* The option "Any Bank" will choose one of the above regions at random
|
||||
* The option "Chunksanity" can start you in _any_ chunk, regardless of whether it has access to a bank.
|
||||
* **Brutal Grinds** - If enabled, the logic will assume you are willing to go to great lengths to train skills.
|
||||
* As an example, when enabled, it might be in logic to obtain tin and copper from mob drops and smelt bronze bars to
|
||||
reach Smithing Level 40 to smelt gold for a task.
|
||||
* If left disabled, the logic will always ensure you have a reasonable method for training a skill to reach a specific
|
||||
task, such as having access to intermediate-level training options
|
||||
* **Progressive Tasks** - If enabled, tasks for a skill are generated in order from earliest to latest.
|
||||
* For example, your first Smithing task would always be "Smelt an Iron Bar", then "Smelt a Silver Bar", and so on.
|
||||
You would never have the task "Smelt a Gold Bar" without having every previous Smithing task as well.
|
||||
This can lead to a more consistent length of run, and is generally shorter than disabling it, but with less variety.
|
||||
* **Skill Category Weighting Options**
|
||||
* These are available in each task category (all trainable skills plus "Combat" and "General")
|
||||
* **Max [Category] Level** - The highest level you intend to have to reach in order to complete all tasks for this
|
||||
category. For the Combat category, this is the max level of monster you are willing to fight.
|
||||
General tasks do not have a level and thus do not have this option.
|
||||
* **Max [Category] Tasks** - The highest number of tasks in this category you are willing to be assigned.
|
||||
Note that you can end up with _less_ than this amount, but never more. The "General" category is used to fill remaining
|
||||
spots so a maximum is not specified, instead it has a _minimum_ count.
|
||||
* **[Category] Task Weighting** - The relative weighting of this category to all of the others. Increase this to make
|
||||
tasks in this category more likely.
|
||||
|
||||
## What does randomization do to this game?
|
||||
The OSRS Archipelago Randomizer takes the form of a "Chunkman" account, a form of challenge account
|
||||
where you are limited to specific regions of the map (known as "chunks") until you complete tasks to unlock
|
||||
more. The plugin will interface with the [Region Locker Plugin](https://github.com/slaytostay/region-locker) to
|
||||
visually display these chunk borders and highlight them as locked or unlocked. The optional included GPU plugin for the
|
||||
Region Locker can tint the locked areas gray, but is incompatible with other GPU plugins such as 117's HD OSRS.
|
||||
If you choose not to include it, the world map will show locked and unlocked regions instead.
|
||||
|
||||
In order to access a region, you will need to access it entirely through unlocked regions. At no point are you
|
||||
ever allowed to cross through locked regions, with the following exceptions:
|
||||
* If your starting region is not Lumbridge, when you complete Tutorial Island, you will need to traverse locked regions
|
||||
to reach your intended starting location.
|
||||
* If your starting region is not Lumbridge, you are allowed to "Home Teleport" to your starting region by using the
|
||||
Lumbridge Home Teleport Spell and then walking to your start location. This is to prevent you from getting "stuck" after
|
||||
using one-way transportation such as the Port Sarim Jail Teleport from Shantay Pass and being locked out of progression.
|
||||
* All of your starting Tutorial Island items are assumed to be available at all times. If you have lost an important
|
||||
item such as a Tinderbox, and cannot re-obtain it in your unlocked region, you are allowed to enter locked regions to
|
||||
replace it in the least obtrusive way possible.
|
||||
* If you need to adjust Group Ironman settings, such as adding or removing a member, you may freely access The Node
|
||||
to do so.
|
||||
|
||||
When passing through locked regions for such exceptions, do not interact with any NPCs, items, or enemies and attempt
|
||||
to spend as little time in them as possible.
|
||||
|
||||
The plugin will prevent equipping items that you have not unlocked the ability to wield. For example, attempting
|
||||
to equip an Iron Platebody before the first Progressive Armor unlock will display a chat message and will not
|
||||
equip the item.
|
||||
|
||||
The plugin will show a list of your current tasks in the sidebar. The plugin will be able to detect the completion
|
||||
of most tasks, but in the case that a task cannot be detected (for example, killing an enemy with no
|
||||
drop table such as Deadly Red Spiders), the task can be marked as complete manually by clicking
|
||||
on the button. This button can also be used to mark completed tasks you have done while playing OSRS mobile or
|
||||
on a different client without having the plugin available. Simply click the button the next time you are logged in to
|
||||
Runelite and connected to send the check.
|
||||
|
||||
Due to the nature of randomizing a live MMO with no ability to freely edit the character or adjust game logic or
|
||||
balancing, this randomizer relies heavily on **the honor system**. The plugin cannot prevent you from walking through
|
||||
locked regions or equipping locked items with the plugin disabled before connecting. It is important
|
||||
to acknowledge before starting that the entire purpose of the randomizer is a self-imposed challenge, and there
|
||||
is little point in cheating by circumventing the plugin's restrictions or marking a task complete without actually
|
||||
completing it. If you wish to play OSRS with no restrictions, that is always available without the plugin.
|
||||
|
||||
In order to access the AP Text Client commands (such as `!hint` or to chat with other players in the seed), enter your
|
||||
command in chat prefaced by the string `!ap`. Example commands:
|
||||
|
||||
`!ap buying gf 100k` -> Sends the message "buying gf 100k" to the server
|
||||
`!ap !hint Area: Lumbridge` -> Attempts to hint for the "Area: Lumbridge" item. Results will appear in your chat box.
|
||||
|
||||
Other server messages, such as chat, will appear in your chat box, prefaced by the Archipelago icon.
|
||||
|
||||
## What items and locations get shuffled?
|
||||
Items:
|
||||
- Every map region (at least one chunk but sometimes more)
|
||||
- Weapon tiers from iron to Rune (bronze is available from the start)
|
||||
- Armor tiers from iron to Rune (bronze is available from the start)
|
||||
- Two Spell Tiers (bolt and blast spells)
|
||||
- Three tiers of Ranged Armor (leather, studded leather + vambraces, green dragonhide)
|
||||
- Three tiers of Ranged Weapons (oak, willow, maple bows and their respective highest tier of arrows)
|
||||
|
||||
Locations:
|
||||
* Every Quest is a location that will always be included in every seed
|
||||
* A random assortment of tasks, separated into categories based on the skill required.
|
||||
These task categories can have different weights, minimums, and maximums based on your options.
|
||||
* For a full list of Locations, items, and regions, see the
|
||||
[Logic Document](https://docs.google.com/spreadsheets/d/1R8Cm8L6YkRWeiN7uYrdru8Vc1DlJ0aFAinH_fwhV8aU/edit?usp=sharing)
|
||||
|
||||
## Which items can be in another player's world?
|
||||
Any item or region unlock can be found in any player's world.
|
||||
|
||||
## What does another world's item look like in Old School Runescape?
|
||||
Upon completing a task, the item and recipient will be listed in the player's chatbox.
|
||||
|
||||
## When the player receives an item, what happens?
|
||||
In addition to the message appearing in the chatbox, a UI window will appear listing the item and who sent it.
|
||||
These boxes also appear when connecting to a seed already in progress to list the items you have acquired while offline.
|
||||
The sidebar will list all received items below the task list, starting with regions, then showing the highest tier of
|
||||
equipment in each category.
|
||||
58
worlds/osrs/docs/setup_en.md
Normal file
58
worlds/osrs/docs/setup_en.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Setup Guide for Old School Runescape
|
||||
|
||||
## Required Software
|
||||
|
||||
- [RuneLite](https://runelite.net/)
|
||||
- If the account being used has been migrated to a Jagex Account, the [Jagex Launcher](https://www.jagex.com/en-GB/launcher)
|
||||
will also be necessary to run RuneLite
|
||||
|
||||
## Configuring your YAML file
|
||||
|
||||
### What is a YAML file and why do I need one?
|
||||
|
||||
Your YAML file contains a set of configuration options which provide the generator with information about how it should
|
||||
generate your game. Each player of a multiworld will provide their own YAML file. This setup allows each player to enjoy
|
||||
an experience customized for their taste, and different players in the same multiworld can all have different options.
|
||||
|
||||
### Where do I get a YAML file?
|
||||
|
||||
You can customize your settings by visiting the
|
||||
[Old School Runescape Player Options Page](/games/Old%20School%20Runescape/player-options).
|
||||
|
||||
## Joining a MultiWorld Game
|
||||
|
||||
### Install the RuneLite Plugins
|
||||
Open RuneLite and click on the wrench icon on the right side. From there, click on the plug icon to access the
|
||||
Plugin Hub. You will need to install the [Archipelago Plugin](https://github.com/digiholic/osrs-archipelago)
|
||||
and [Region Locker Plugin](https://github.com/slaytostay/region-locker). The Region Locker plugin
|
||||
will include three plugins; only the `Region Locker` plugin itself is required. The `Region Locker GPU` plugin can be
|
||||
used to display locked chunks in gray, but is incompatible with other GPU plugins such as 117's HD OSRS and can be
|
||||
disabled.
|
||||
|
||||
### Create a new OSRS Account
|
||||
The OSRS Randomizer assumes you are playing on a newly created f2p Ironman account. As such, you will need to [create a
|
||||
new Runescape account](https://secure.runescape.com/m=account-creation/create_account?theme=oldschool).
|
||||
|
||||
If you already have a [Jagex Account](https://www.jagex.com/en-GB/accounts) you can add up to 20 characters on
|
||||
one account through the Jagex Launcher. Note that there is currently no way to _remove_ characters
|
||||
from a Jagex Account, as such, you might want to create a separate account to hold your Archipelago
|
||||
characters if you intend to use your main Jagex account for more characters in the future.
|
||||
|
||||
**Protip**: In order to avoid having to remember random email addresses for many accounts, take advantage of an email
|
||||
alias, a feature supported by most email providers. Any text after a `+` in your email address will redirect to your
|
||||
normal address, but the email will be recognized by the Jagex login as a new email address. For example, if your email
|
||||
were `Archipelago@gmail.com`, entering `Archipelago+OSRSRandomizer@gmail.com` would cause the confirmation email to
|
||||
be sent to your primary address, but the alias can be used to create a new account. One recommendation would be to
|
||||
include the date of generation in the account, such as `Archipelago+APYYMMDD@gmail.com` for easy memorability.
|
||||
|
||||
After creating an account, you may run through Tutorial Island without connecting; the randomizer has no
|
||||
effect on the Tutorial.
|
||||
|
||||
### Connect to the Multiserver
|
||||
In the Archipelago Plugin, enter your server information. The `Auto Reconnect on Login For` field should remain blank;
|
||||
it will be populated by the character name you first connect with, and it will reconnect to the AP server whenever that
|
||||
character logs in. Open the Archipelago panel on the right-hand side to connect to the multiworld while logged in to
|
||||
a game world to associate this character to the randomizer.
|
||||
|
||||
For further information about how to connect to the server in the RuneLite plugin,
|
||||
please see the [Archipelago Plugin](https://github.com/digiholic/osrs-archipelago) instructions.
|
||||
@@ -443,7 +443,7 @@ class PokemonRedBlueWorld(World):
|
||||
self.multiworld.elite_four_pokedex_condition[self.player].total = \
|
||||
int((len(reachable_mons) / 100) * self.multiworld.elite_four_pokedex_condition[self.player].value)
|
||||
|
||||
if self.multiworld.accessibility[self.player] == "locations":
|
||||
if self.multiworld.accessibility[self.player] == "full":
|
||||
balls = [self.create_item(ball) for ball in ["Poke Ball", "Great Ball", "Ultra Ball"]]
|
||||
traps = [self.create_item(trap) for trap in item_groups["Traps"]]
|
||||
locations = [location for location in self.multiworld.get_locations(self.player) if "Pokedex - " in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from Options import Toggle, Choice, Range, NamedRange, TextChoice, DeathLink
|
||||
from Options import Toggle, Choice, Range, NamedRange, TextChoice, DeathLink, ItemsAccessibility
|
||||
|
||||
|
||||
class GameVersion(Choice):
|
||||
@@ -287,7 +287,7 @@ class AllPokemonSeen(Toggle):
|
||||
|
||||
class DexSanity(NamedRange):
|
||||
"""Adds location checks for Pokemon flagged "owned" on your Pokedex. You may specify a percentage of Pokemon to
|
||||
have checks added. If Accessibility is set to locations, this will be the percentage of all logically reachable
|
||||
have checks added. If Accessibility is set to full, this will be the percentage of all logically reachable
|
||||
Pokemon that will get a location check added to it. With items or minimal Accessibility, it will be the percentage
|
||||
of all 151 Pokemon.
|
||||
If Pokedex is required, the items for Pokemon acquired before acquiring the Pokedex can be found by talking to
|
||||
@@ -418,10 +418,10 @@ class ExpModifier(NamedRange):
|
||||
"""Modifier for EXP gained. When specifying a number, exp is multiplied by this amount and divided by 16."""
|
||||
display_name = "Exp Modifier"
|
||||
default = 16
|
||||
range_start = default / 4
|
||||
range_start = default // 4
|
||||
range_end = 255
|
||||
special_range_names = {
|
||||
"half": default / 2,
|
||||
"half": default // 2,
|
||||
"normal": default,
|
||||
"double": default * 2,
|
||||
"triple": default * 3,
|
||||
@@ -861,6 +861,7 @@ class RandomizePokemonPalettes(Choice):
|
||||
|
||||
|
||||
pokemon_rb_options = {
|
||||
"accessibility": ItemsAccessibility,
|
||||
"game_version": GameVersion,
|
||||
"trainer_name": TrainerName,
|
||||
"rival_name": RivalName,
|
||||
@@ -959,4 +960,4 @@ pokemon_rb_options = {
|
||||
"ice_trap_weight": IceTrapWeight,
|
||||
"randomize_pokemon_palettes": RandomizePokemonPalettes,
|
||||
"death_link": DeathLink
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ def set_rules(multiworld, player):
|
||||
item_rules["Celadon Prize Corner - Item Prize 2"] = prize_rule
|
||||
item_rules["Celadon Prize Corner - Item Prize 3"] = prize_rule
|
||||
|
||||
if multiworld.accessibility[player] != "locations":
|
||||
if multiworld.accessibility[player] != "full":
|
||||
multiworld.get_location("Cerulean Bicycle Shop", player).always_allow = (lambda state, item:
|
||||
item.name == "Bike Voucher"
|
||||
and item.player == player)
|
||||
|
||||
@@ -31,23 +31,17 @@ def has_all_items(multiworld: MultiWorld, items: Set[str], region: str, player:
|
||||
# Checks to see if chest/shrine are accessible
|
||||
def has_location_access_rule(multiworld: MultiWorld, environment: str, player: int, item_number: int, item_type: str)\
|
||||
-> None:
|
||||
if item_number == 1:
|
||||
multiworld.get_location(f"{environment}: {item_type} {item_number}", player).access_rule = \
|
||||
lambda state: state.has(environment, player)
|
||||
location_name = f"{environment}: {item_type} {item_number}"
|
||||
if item_type == "Scavenger":
|
||||
# scavengers need to be locked till after a full loop since that is when they are capable of spawning.
|
||||
# (While technically the requirement is just beating 5 stages, this will ensure that the player will have
|
||||
# a long enough run to have enough director credits for scavengers and
|
||||
# help prevent being stuck in the same stages until that point).
|
||||
if item_type == "Scavenger":
|
||||
multiworld.get_location(f"{environment}: {item_type} {item_number}", player).access_rule = \
|
||||
lambda state: state.has(environment, player) and state.has("Stage 5", player)
|
||||
multiworld.get_location(location_name, player).access_rule = \
|
||||
lambda state: state.has(environment, player) and state.has("Stage 5", player)
|
||||
else:
|
||||
multiworld.get_location(f"{environment}: {item_type} {item_number}", player).access_rule = \
|
||||
lambda state: check_location(state, environment, player, item_number, item_type)
|
||||
|
||||
|
||||
def check_location(state, environment: str, player: int, item_number: int, item_name: str) -> bool:
|
||||
return state.can_reach(f"{environment}: {item_name} {item_number - 1}", "Location", player)
|
||||
multiworld.get_location(location_name, player).access_rule = \
|
||||
lambda state: state.has(environment, player)
|
||||
|
||||
|
||||
def set_rules(ror2_world: "RiskOfRainWorld") -> None:
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
nest-asyncio >= 1.5.5
|
||||
six >= 1.16.0
|
||||
@@ -33,28 +33,38 @@ item_table = {
|
||||
"Lightning Pot Top": ItemData(SHIVERS_ITEM_ID_OFFSET + 17, "pot"),
|
||||
"Sand Pot Top": ItemData(SHIVERS_ITEM_ID_OFFSET + 18, "pot"),
|
||||
"Metal Pot Top": ItemData(SHIVERS_ITEM_ID_OFFSET + 19, "pot"),
|
||||
"Water Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 20, "pot_type2"),
|
||||
"Wax Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 21, "pot_type2"),
|
||||
"Ash Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 22, "pot_type2"),
|
||||
"Oil Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 23, "pot_type2"),
|
||||
"Cloth Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 24, "pot_type2"),
|
||||
"Wood Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 25, "pot_type2"),
|
||||
"Crystal Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 26, "pot_type2"),
|
||||
"Lightning Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 27, "pot_type2"),
|
||||
"Sand Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 28, "pot_type2"),
|
||||
"Metal Pot Complete": ItemData(SHIVERS_ITEM_ID_OFFSET + 29, "pot_type2"),
|
||||
|
||||
#Keys
|
||||
"Key for Office Elevator": ItemData(SHIVERS_ITEM_ID_OFFSET + 20, "key"),
|
||||
"Key for Bedroom Elevator": ItemData(SHIVERS_ITEM_ID_OFFSET + 21, "key"),
|
||||
"Key for Three Floor Elevator": ItemData(SHIVERS_ITEM_ID_OFFSET + 22, "key"),
|
||||
"Key for Workshop": ItemData(SHIVERS_ITEM_ID_OFFSET + 23, "key"),
|
||||
"Key for Office": ItemData(SHIVERS_ITEM_ID_OFFSET + 24, "key"),
|
||||
"Key for Prehistoric Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 25, "key"),
|
||||
"Key for Greenhouse Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 26, "key"),
|
||||
"Key for Ocean Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 27, "key"),
|
||||
"Key for Projector Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 28, "key"),
|
||||
"Key for Generator Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 29, "key"),
|
||||
"Key for Egypt Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 30, "key"),
|
||||
"Key for Library Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 31, "key"),
|
||||
"Key for Shaman Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 32, "key"),
|
||||
"Key for UFO Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 33, "key"),
|
||||
"Key for Torture Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 34, "key"),
|
||||
"Key for Puzzle Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 35, "key"),
|
||||
"Key for Bedroom": ItemData(SHIVERS_ITEM_ID_OFFSET + 36, "key"),
|
||||
"Key for Underground Lake Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 37, "key"),
|
||||
"Key for Janitor Closet": ItemData(SHIVERS_ITEM_ID_OFFSET + 38, "key"),
|
||||
"Key for Front Door": ItemData(SHIVERS_ITEM_ID_OFFSET + 39, "key-optional"),
|
||||
"Key for Office Elevator": ItemData(SHIVERS_ITEM_ID_OFFSET + 30, "key"),
|
||||
"Key for Bedroom Elevator": ItemData(SHIVERS_ITEM_ID_OFFSET + 31, "key"),
|
||||
"Key for Three Floor Elevator": ItemData(SHIVERS_ITEM_ID_OFFSET + 32, "key"),
|
||||
"Key for Workshop": ItemData(SHIVERS_ITEM_ID_OFFSET + 33, "key"),
|
||||
"Key for Office": ItemData(SHIVERS_ITEM_ID_OFFSET + 34, "key"),
|
||||
"Key for Prehistoric Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 35, "key"),
|
||||
"Key for Greenhouse Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 36, "key"),
|
||||
"Key for Ocean Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 37, "key"),
|
||||
"Key for Projector Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 38, "key"),
|
||||
"Key for Generator Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 39, "key"),
|
||||
"Key for Egypt Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 40, "key"),
|
||||
"Key for Library Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 41, "key"),
|
||||
"Key for Shaman Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 42, "key"),
|
||||
"Key for UFO Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 43, "key"),
|
||||
"Key for Torture Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 44, "key"),
|
||||
"Key for Puzzle Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 45, "key"),
|
||||
"Key for Bedroom": ItemData(SHIVERS_ITEM_ID_OFFSET + 46, "key"),
|
||||
"Key for Underground Lake Room": ItemData(SHIVERS_ITEM_ID_OFFSET + 47, "key"),
|
||||
"Key for Janitor Closet": ItemData(SHIVERS_ITEM_ID_OFFSET + 48, "key"),
|
||||
"Key for Front Door": ItemData(SHIVERS_ITEM_ID_OFFSET + 49, "key-optional"),
|
||||
|
||||
#Abilities
|
||||
"Crawling": ItemData(SHIVERS_ITEM_ID_OFFSET + 50, "ability"),
|
||||
@@ -83,6 +93,16 @@ item_table = {
|
||||
"Lightning Pot Top DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 87, "potduplicate"),
|
||||
"Sand Pot Top DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 88, "potduplicate"),
|
||||
"Metal Pot Top DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 89, "potduplicate"),
|
||||
"Water Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 140, "potduplicate_type2"),
|
||||
"Wax Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 141, "potduplicate_type2"),
|
||||
"Ash Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 142, "potduplicate_type2"),
|
||||
"Oil Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 143, "potduplicate_type2"),
|
||||
"Cloth Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 144, "potduplicate_type2"),
|
||||
"Wood Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 145, "potduplicate_type2"),
|
||||
"Crystal Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 146, "potduplicate_type2"),
|
||||
"Lightning Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 147, "potduplicate_type2"),
|
||||
"Sand Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 148, "potduplicate_type2"),
|
||||
"Metal Pot Complete DUPE": ItemData(SHIVERS_ITEM_ID_OFFSET + 149, "potduplicate_type2"),
|
||||
|
||||
#Filler
|
||||
"Empty": ItemData(SHIVERS_ITEM_ID_OFFSET + 90, "filler"),
|
||||
|
||||
@@ -1,21 +1,37 @@
|
||||
from Options import Choice, DefaultOnToggle, Toggle, PerGameCommonOptions
|
||||
from Options import Choice, DefaultOnToggle, Toggle, PerGameCommonOptions, Range
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
class IxupiCapturesNeeded(Range):
|
||||
"""
|
||||
Number of Ixupi Captures needed for goal condition.
|
||||
"""
|
||||
display_name = "Number of Ixupi Captures Needed"
|
||||
range_start = 1
|
||||
range_end = 10
|
||||
default = 10
|
||||
|
||||
class LobbyAccess(Choice):
|
||||
"""Chooses how keys needed to reach the lobby are placed.
|
||||
"""
|
||||
Chooses how keys needed to reach the lobby are placed.
|
||||
- Normal: Keys are placed anywhere
|
||||
- Early: Keys are placed early
|
||||
- Local: Keys are placed locally"""
|
||||
- Local: Keys are placed locally
|
||||
"""
|
||||
display_name = "Lobby Access"
|
||||
option_normal = 0
|
||||
option_early = 1
|
||||
option_local = 2
|
||||
default = 1
|
||||
|
||||
class PuzzleHintsRequired(DefaultOnToggle):
|
||||
"""If turned on puzzle hints will be available before the corresponding puzzle is required. For example: The Shaman
|
||||
Drums puzzle will be placed after access to the security cameras which give you the solution. Turning this off
|
||||
allows for greater randomization."""
|
||||
"""
|
||||
If turned on puzzle hints/solutions will be available before the corresponding puzzle is required.
|
||||
|
||||
For example: The Red Door puzzle will be logically required only after access to the Beth's Address Book which gives you the solution.
|
||||
|
||||
Turning this off allows for greater randomization.
|
||||
"""
|
||||
display_name = "Puzzle Hints Required"
|
||||
|
||||
class InformationPlaques(Toggle):
|
||||
@@ -26,7 +42,9 @@ class InformationPlaques(Toggle):
|
||||
display_name = "Include Information Plaques"
|
||||
|
||||
class FrontDoorUsable(Toggle):
|
||||
"""Adds a key to unlock the front door of the museum."""
|
||||
"""
|
||||
Adds a key to unlock the front door of the museum.
|
||||
"""
|
||||
display_name = "Front Door Usable"
|
||||
|
||||
class ElevatorsStaySolved(DefaultOnToggle):
|
||||
@@ -37,7 +55,9 @@ class ElevatorsStaySolved(DefaultOnToggle):
|
||||
display_name = "Elevators Stay Solved"
|
||||
|
||||
class EarlyBeth(DefaultOnToggle):
|
||||
"""Beth's body is open at the start of the game. This allows any pot piece to be placed in the slide and early checks on the second half of the final riddle."""
|
||||
"""
|
||||
Beth's body is open at the start of the game. This allows any pot piece to be placed in the slide and early checks on the second half of the final riddle.
|
||||
"""
|
||||
display_name = "Early Beth"
|
||||
|
||||
class EarlyLightning(Toggle):
|
||||
@@ -47,9 +67,34 @@ class EarlyLightning(Toggle):
|
||||
"""
|
||||
display_name = "Early Lightning"
|
||||
|
||||
class LocationPotPieces(Choice):
|
||||
"""
|
||||
Chooses where pot pieces will be located within the multiworld.
|
||||
- Own World: Pot pieces will be located within your own world
|
||||
- Different World: Pot pieces will be located in another world
|
||||
- Any World: Pot pieces will be located in any world
|
||||
"""
|
||||
display_name = "Location of Pot Pieces"
|
||||
option_own_world = 0
|
||||
option_different_world = 1
|
||||
option_any_world = 2
|
||||
|
||||
class FullPots(Choice):
|
||||
"""
|
||||
Chooses if pots will be in pieces or already completed
|
||||
- Pieces: Only pot pieces will be added to the item pool
|
||||
- Complete: Only completed pots will be added to the item pool
|
||||
- Mixed: Each pot will be randomly chosen to be pieces or already completed.
|
||||
"""
|
||||
display_name = "Full Pots"
|
||||
option_pieces = 0
|
||||
option_complete = 1
|
||||
option_mixed = 2
|
||||
|
||||
|
||||
@dataclass
|
||||
class ShiversOptions(PerGameCommonOptions):
|
||||
ixupi_captures_needed: IxupiCapturesNeeded
|
||||
lobby_access: LobbyAccess
|
||||
puzzle_hints_required: PuzzleHintsRequired
|
||||
include_information_plaques: InformationPlaques
|
||||
@@ -57,3 +102,5 @@ class ShiversOptions(PerGameCommonOptions):
|
||||
elevators_stay_solved: ElevatorsStaySolved
|
||||
early_beth: EarlyBeth
|
||||
early_lightning: EarlyLightning
|
||||
location_pot_pieces: LocationPotPieces
|
||||
full_pots: FullPots
|
||||
|
||||
@@ -8,58 +8,58 @@ if TYPE_CHECKING:
|
||||
|
||||
|
||||
def water_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Lobby", "Region", player) or (state.can_reach("Janitor Closet", "Region", player) and cloth_capturable(state, player))) \
|
||||
and state.has_all({"Water Pot Bottom", "Water Pot Top", "Water Pot Bottom DUPE", "Water Pot Top DUPE"}, player)
|
||||
return state.has_all({"Water Pot Bottom", "Water Pot Top", "Water Pot Bottom DUPE", "Water Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Water Pot Complete", "Water Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def wax_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Library", "Region", player) or state.can_reach("Anansi", "Region", player)) \
|
||||
and state.has_all({"Wax Pot Bottom", "Wax Pot Top", "Wax Pot Bottom DUPE", "Wax Pot Top DUPE"}, player)
|
||||
return state.has_all({"Wax Pot Bottom", "Wax Pot Top", "Wax Pot Bottom DUPE", "Wax Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Wax Pot Complete", "Wax Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def ash_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Office", "Region", player) or state.can_reach("Burial", "Region", player)) \
|
||||
and state.has_all({"Ash Pot Bottom", "Ash Pot Top", "Ash Pot Bottom DUPE", "Ash Pot Top DUPE"}, player)
|
||||
return state.has_all({"Ash Pot Bottom", "Ash Pot Top", "Ash Pot Bottom DUPE", "Ash Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Ash Pot Complete", "Ash Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def oil_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Prehistoric", "Region", player) or state.can_reach("Tar River", "Region", player)) \
|
||||
and state.has_all({"Oil Pot Bottom", "Oil Pot Top", "Oil Pot Bottom DUPE", "Oil Pot Top DUPE"}, player)
|
||||
return state.has_all({"Oil Pot Bottom", "Oil Pot Top", "Oil Pot Bottom DUPE", "Oil Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Oil Pot Complete", "Oil Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def cloth_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Egypt", "Region", player) or state.can_reach("Burial", "Region", player) or state.can_reach("Janitor Closet", "Region", player)) \
|
||||
and state.has_all({"Cloth Pot Bottom", "Cloth Pot Top", "Cloth Pot Bottom DUPE", "Cloth Pot Top DUPE"}, player)
|
||||
return state.has_all({"Cloth Pot Bottom", "Cloth Pot Top", "Cloth Pot Bottom DUPE", "Cloth Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Cloth Pot Complete", "Cloth Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def wood_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Workshop", "Region", player) or state.can_reach("Blue Maze", "Region", player) or state.can_reach("Gods Room", "Region", player) or state.can_reach("Anansi", "Region", player)) \
|
||||
and state.has_all({"Wood Pot Bottom", "Wood Pot Top", "Wood Pot Bottom DUPE", "Wood Pot Top DUPE"}, player)
|
||||
return state.has_all({"Wood Pot Bottom", "Wood Pot Top", "Wood Pot Bottom DUPE", "Wood Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Wood Pot Complete", "Wood Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def crystal_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Lobby", "Region", player) or state.can_reach("Ocean", "Region", player)) \
|
||||
and state.has_all({"Crystal Pot Bottom", "Crystal Pot Top", "Crystal Pot Bottom DUPE", "Crystal Pot Top DUPE"}, player)
|
||||
return state.has_all({"Crystal Pot Bottom", "Crystal Pot Top", "Crystal Pot Bottom DUPE", "Crystal Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Crystal Pot Complete", "Crystal Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def sand_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Greenhouse", "Region", player) or state.can_reach("Ocean", "Region", player)) \
|
||||
and state.has_all({"Sand Pot Bottom", "Sand Pot Top", "Sand Pot Bottom DUPE", "Sand Pot Top DUPE"}, player)
|
||||
return state.has_all({"Sand Pot Bottom", "Sand Pot Top", "Sand Pot Bottom DUPE", "Sand Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Sand Pot Complete", "Sand Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def metal_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (state.can_reach("Projector Room", "Region", player) or state.can_reach("Prehistoric", "Region", player) or state.can_reach("Bedroom", "Region", player)) \
|
||||
and state.has_all({"Metal Pot Bottom", "Metal Pot Top", "Metal Pot Bottom DUPE", "Metal Pot Top DUPE"}, player)
|
||||
return state.has_all({"Metal Pot Bottom", "Metal Pot Top", "Metal Pot Bottom DUPE", "Metal Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Metal Pot Complete", "Metal Pot Complete DUPE"}, player)
|
||||
|
||||
|
||||
def lightning_capturable(state: CollectionState, player: int) -> bool:
|
||||
return (first_nine_ixupi_capturable or state.multiworld.early_lightning[player].value) \
|
||||
and state.can_reach("Generator", "Region", player) \
|
||||
and state.has_all({"Lightning Pot Bottom", "Lightning Pot Top", "Lightning Pot Bottom DUPE", "Lightning Pot Top DUPE"}, player)
|
||||
return (first_nine_ixupi_capturable(state, player) or state.multiworld.worlds[player].options.early_lightning.value) \
|
||||
and (state.has_all({"Lightning Pot Bottom", "Lightning Pot Top", "Lightning Pot Bottom DUPE", "Lightning Pot Top DUPE"}, player) or \
|
||||
state.has_all({"Lightning Pot Complete", "Lightning Pot Complete DUPE"}, player))
|
||||
|
||||
|
||||
def beths_body_available(state: CollectionState, player: int) -> bool:
|
||||
return (first_nine_ixupi_capturable(state, player) or state.multiworld.early_beth[player].value) \
|
||||
return (first_nine_ixupi_capturable(state, player) or state.multiworld.worlds[player].options.early_beth.value) \
|
||||
and state.can_reach("Generator", "Region", player)
|
||||
|
||||
|
||||
@@ -123,7 +123,8 @@ def get_rules_lookup(player: int):
|
||||
"To Burial From Egypt": lambda state: state.can_reach("Egypt", "Region", player),
|
||||
"To Gods Room From Anansi": lambda state: state.can_reach("Gods Room", "Region", player),
|
||||
"To Slide Room": lambda state: all_skull_dials_available(state, player),
|
||||
"To Lobby From Slide Room": lambda state: (beths_body_available(state, player))
|
||||
"To Lobby From Slide Room": lambda state: beths_body_available(state, player),
|
||||
"To Water Capture From Janitor Closet": lambda state: cloth_capturable(state, player)
|
||||
},
|
||||
"locations_required": {
|
||||
"Puzzle Solved Anansi Musicbox": lambda state: state.can_reach("Clock Tower", "Region", player),
|
||||
@@ -207,8 +208,10 @@ def set_rules(world: "ShiversWorld") -> None:
|
||||
# forbid cloth in janitor closet and oil in tar river
|
||||
forbid_item(multiworld.get_location("Accessible: Storage: Janitor Closet", player), "Cloth Pot Bottom DUPE", player)
|
||||
forbid_item(multiworld.get_location("Accessible: Storage: Janitor Closet", player), "Cloth Pot Top DUPE", player)
|
||||
forbid_item(multiworld.get_location("Accessible: Storage: Janitor Closet", player), "Cloth Pot Complete DUPE", player)
|
||||
forbid_item(multiworld.get_location("Accessible: Storage: Tar River", player), "Oil Pot Bottom DUPE", player)
|
||||
forbid_item(multiworld.get_location("Accessible: Storage: Tar River", player), "Oil Pot Top DUPE", player)
|
||||
forbid_item(multiworld.get_location("Accessible: Storage: Tar River", player), "Oil Pot Complete DUPE", player)
|
||||
|
||||
# Filler Item Forbids
|
||||
forbid_item(multiworld.get_location("Puzzle Solved Lyre", player), "Easier Lyre", player)
|
||||
@@ -234,4 +237,8 @@ def set_rules(world: "ShiversWorld") -> None:
|
||||
forbid_item(multiworld.get_location("Ixupi Captured Metal", player), "Metal Always Available in Prehistoric", player)
|
||||
|
||||
# Set completion condition
|
||||
multiworld.completion_condition[player] = lambda state: (first_nine_ixupi_capturable(state, player) and lightning_capturable(state, player))
|
||||
multiworld.completion_condition[player] = lambda state: ((
|
||||
water_capturable(state, player) + wax_capturable(state, player) + ash_capturable(state, player) \
|
||||
+ oil_capturable(state, player) + cloth_capturable(state, player) + wood_capturable(state, player) \
|
||||
+ crystal_capturable(state, player) + sand_capturable(state, player) + metal_capturable(state, player) \
|
||||
+ lightning_capturable(state, player)) >= world.options.ixupi_captures_needed.value)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from typing import List
|
||||
from .Items import item_table, ShiversItem
|
||||
from .Rules import set_rules
|
||||
from BaseClasses import Item, Tutorial, Region, Location
|
||||
@@ -22,7 +23,7 @@ class ShiversWorld(World):
|
||||
Shivers is a horror themed point and click adventure. Explore the mysteries of Windlenot's Museum of the Strange and Unusual.
|
||||
"""
|
||||
|
||||
game: str = "Shivers"
|
||||
game = "Shivers"
|
||||
topology_present = False
|
||||
web = ShiversWeb()
|
||||
options_dataclass = ShiversOptions
|
||||
@@ -30,7 +31,13 @@ class ShiversWorld(World):
|
||||
|
||||
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
||||
location_name_to_id = Constants.location_name_to_id
|
||||
|
||||
shivers_item_id_offset = 27000
|
||||
pot_completed_list: List[int]
|
||||
|
||||
|
||||
def generate_early(self):
|
||||
self.pot_completed_list = []
|
||||
|
||||
def create_item(self, name: str) -> Item:
|
||||
data = item_table[name]
|
||||
return ShiversItem(name, data.classification, data.code, self.player)
|
||||
@@ -78,9 +85,28 @@ class ShiversWorld(World):
|
||||
#Add items to item pool
|
||||
itempool = []
|
||||
for name, data in item_table.items():
|
||||
if data.type in {"pot", "key", "ability", "filler2"}:
|
||||
if data.type in {"key", "ability", "filler2"}:
|
||||
itempool.append(self.create_item(name))
|
||||
|
||||
# Pot pieces/Completed/Mixed:
|
||||
for i in range(10):
|
||||
if self.options.full_pots == "pieces":
|
||||
itempool.append(self.create_item(self.item_id_to_name[self.shivers_item_id_offset + i]))
|
||||
itempool.append(self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 10 + i]))
|
||||
elif self.options.full_pots == "complete":
|
||||
itempool.append(self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 20 + i]))
|
||||
else:
|
||||
# Roll for if pieces or a complete pot will be used.
|
||||
# Pot Pieces
|
||||
if self.random.randint(0, 1) == 0:
|
||||
self.pot_completed_list.append(0)
|
||||
itempool.append(self.create_item(self.item_id_to_name[self.shivers_item_id_offset + i]))
|
||||
itempool.append(self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 10 + i]))
|
||||
# Completed Pot
|
||||
else:
|
||||
self.pot_completed_list.append(1)
|
||||
itempool.append(self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 20 + i]))
|
||||
|
||||
#Add Filler
|
||||
itempool += [self.create_item("Easier Lyre") for i in range(9)]
|
||||
|
||||
@@ -88,7 +114,6 @@ class ShiversWorld(World):
|
||||
filler_needed = len(self.multiworld.get_unfilled_locations(self.player)) - 24 - len(itempool)
|
||||
itempool += [self.random.choices([self.create_item("Heal"), self.create_item("Easier Lyre")], weights=[95, 5])[0] for i in range(filler_needed)]
|
||||
|
||||
|
||||
#Place library escape items. Choose a location to place the escape item
|
||||
library_region = self.multiworld.get_region("Library", self.player)
|
||||
librarylocation = self.random.choice([loc for loc in library_region.locations if not loc.name.startswith("Accessible:")])
|
||||
@@ -123,14 +148,14 @@ class ShiversWorld(World):
|
||||
self.multiworld.itempool += itempool
|
||||
|
||||
#Lobby acess:
|
||||
if self.options.lobby_access == 1:
|
||||
if self.options.lobby_access == "early":
|
||||
if lobby_access_keys == 1:
|
||||
self.multiworld.early_items[self.player]["Key for Underground Lake Room"] = 1
|
||||
self.multiworld.early_items[self.player]["Key for Office Elevator"] = 1
|
||||
self.multiworld.early_items[self.player]["Key for Office"] = 1
|
||||
elif lobby_access_keys == 2:
|
||||
self.multiworld.early_items[self.player]["Key for Front Door"] = 1
|
||||
if self.options.lobby_access == 2:
|
||||
if self.options.lobby_access == "local":
|
||||
if lobby_access_keys == 1:
|
||||
self.multiworld.local_early_items[self.player]["Key for Underground Lake Room"] = 1
|
||||
self.multiworld.local_early_items[self.player]["Key for Office Elevator"] = 1
|
||||
@@ -138,6 +163,12 @@ class ShiversWorld(World):
|
||||
elif lobby_access_keys == 2:
|
||||
self.multiworld.local_early_items[self.player]["Key for Front Door"] = 1
|
||||
|
||||
#Pot piece shuffle location:
|
||||
if self.options.location_pot_pieces == "own_world":
|
||||
self.options.local_items.value |= {name for name, data in item_table.items() if data.type == "pot" or data.type == "pot_type2"}
|
||||
if self.options.location_pot_pieces == "different_world":
|
||||
self.options.non_local_items.value |= {name for name, data in item_table.items() if data.type == "pot" or data.type == "pot_type2"}
|
||||
|
||||
def pre_fill(self) -> None:
|
||||
# Prefills event storage locations with duplicate pots
|
||||
storagelocs = []
|
||||
@@ -149,7 +180,23 @@ class ShiversWorld(World):
|
||||
if loc_name.startswith("Accessible: "):
|
||||
storagelocs.append(self.multiworld.get_location(loc_name, self.player))
|
||||
|
||||
storageitems += [self.create_item(name) for name, data in item_table.items() if data.type == 'potduplicate']
|
||||
#Pot pieces/Completed/Mixed:
|
||||
if self.options.full_pots == "pieces":
|
||||
storageitems += [self.create_item(name) for name, data in item_table.items() if data.type == 'potduplicate']
|
||||
elif self.options.full_pots == "complete":
|
||||
storageitems += [self.create_item(name) for name, data in item_table.items() if data.type == 'potduplicate_type2']
|
||||
storageitems += [self.create_item("Empty") for i in range(10)]
|
||||
else:
|
||||
for i in range(10):
|
||||
#Pieces
|
||||
if self.pot_completed_list[i] == 0:
|
||||
storageitems += [self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 70 + i])]
|
||||
storageitems += [self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 80 + i])]
|
||||
#Complete
|
||||
else:
|
||||
storageitems += [self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 140 + i])]
|
||||
storageitems += [self.create_item("Empty")]
|
||||
|
||||
storageitems += [self.create_item("Empty") for i in range(3)]
|
||||
|
||||
state = self.multiworld.get_all_state(True)
|
||||
@@ -166,11 +213,13 @@ class ShiversWorld(World):
|
||||
def fill_slot_data(self) -> dict:
|
||||
|
||||
return {
|
||||
"storageplacements": self.storage_placements,
|
||||
"excludedlocations": {str(excluded_location).replace('ExcludeLocations(', '').replace(')', '') for excluded_location in self.multiworld.exclude_locations.values()},
|
||||
"elevatorsstaysolved": {self.options.elevators_stay_solved.value},
|
||||
"earlybeth": {self.options.early_beth.value},
|
||||
"earlylightning": {self.options.early_lightning.value},
|
||||
"StoragePlacements": self.storage_placements,
|
||||
"ExcludedLocations": list(self.options.exclude_locations.value),
|
||||
"IxupiCapturesNeeded": self.options.ixupi_captures_needed.value,
|
||||
"ElevatorsStaySolved": self.options.elevators_stay_solved.value,
|
||||
"EarlyBeth": self.options.early_beth.value,
|
||||
"EarlyLightning": self.options.early_lightning.value,
|
||||
"FrontDoorUsable": self.options.front_door_usable.value
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
"Information Plaque: (Ocean) Poseidon",
|
||||
"Information Plaque: (Ocean) Colossus of Rhodes",
|
||||
"Information Plaque: (Ocean) Poseidon's Temple",
|
||||
"Information Plaque: (Underground Maze) Subterranean World",
|
||||
"Information Plaque: (Underground Maze Staircase) Subterranean World",
|
||||
"Information Plaque: (Underground Maze) Dero",
|
||||
"Information Plaque: (Egypt) Tomb of the Ixupi",
|
||||
"Information Plaque: (Egypt) The Sphinx",
|
||||
@@ -119,16 +119,6 @@
|
||||
"Outside": [
|
||||
"Puzzle Solved Gears",
|
||||
"Puzzle Solved Stone Henge",
|
||||
"Ixupi Captured Water",
|
||||
"Ixupi Captured Wax",
|
||||
"Ixupi Captured Ash",
|
||||
"Ixupi Captured Oil",
|
||||
"Ixupi Captured Cloth",
|
||||
"Ixupi Captured Wood",
|
||||
"Ixupi Captured Crystal",
|
||||
"Ixupi Captured Sand",
|
||||
"Ixupi Captured Metal",
|
||||
"Ixupi Captured Lightning",
|
||||
"Puzzle Solved Office Elevator",
|
||||
"Puzzle Solved Three Floor Elevator",
|
||||
"Puzzle Hint Found: Combo Lock in Mailbox",
|
||||
@@ -182,7 +172,8 @@
|
||||
"Accessible: Storage: Transforming Mask"
|
||||
],
|
||||
"Generator": [
|
||||
"Final Riddle: Beth's Body Page 17"
|
||||
"Final Riddle: Beth's Body Page 17",
|
||||
"Ixupi Captured Lightning"
|
||||
],
|
||||
"Theater Back Hallways": [
|
||||
"Puzzle Solved Clock Tower Door"
|
||||
@@ -210,6 +201,7 @@
|
||||
"Information Plaque: (Ocean) Poseidon's Temple"
|
||||
],
|
||||
"Maze Staircase": [
|
||||
"Information Plaque: (Underground Maze Staircase) Subterranean World",
|
||||
"Puzzle Solved Maze Door"
|
||||
],
|
||||
"Egypt": [
|
||||
@@ -305,7 +297,6 @@
|
||||
],
|
||||
"Tar River": [
|
||||
"Accessible: Storage: Tar River",
|
||||
"Information Plaque: (Underground Maze) Subterranean World",
|
||||
"Information Plaque: (Underground Maze) Dero"
|
||||
],
|
||||
"Theater": [
|
||||
@@ -320,6 +311,33 @@
|
||||
"Skull Dial Bridge": [
|
||||
"Accessible: Storage: Skull Bridge",
|
||||
"Puzzle Solved Skull Dial Door"
|
||||
],
|
||||
"Water Capture": [
|
||||
"Ixupi Captured Water"
|
||||
],
|
||||
"Wax Capture": [
|
||||
"Ixupi Captured Wax"
|
||||
],
|
||||
"Ash Capture": [
|
||||
"Ixupi Captured Ash"
|
||||
],
|
||||
"Oil Capture": [
|
||||
"Ixupi Captured Oil"
|
||||
],
|
||||
"Cloth Capture": [
|
||||
"Ixupi Captured Cloth"
|
||||
],
|
||||
"Wood Capture": [
|
||||
"Ixupi Captured Wood"
|
||||
],
|
||||
"Crystal Capture": [
|
||||
"Ixupi Captured Crystal"
|
||||
],
|
||||
"Sand Capture": [
|
||||
"Ixupi Captured Sand"
|
||||
],
|
||||
"Metal Capture": [
|
||||
"Ixupi Captured Metal"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,35 +7,35 @@
|
||||
["Underground Lake", ["To Underground Tunnels From Underground Lake", "To Underground Blue Tunnels From Underground Lake"]],
|
||||
["Underground Blue Tunnels", ["To Underground Lake From Underground Blue Tunnels", "To Office Elevator From Underground Blue Tunnels"]],
|
||||
["Office Elevator", ["To Underground Blue Tunnels From Office Elevator","To Office From Office Elevator"]],
|
||||
["Office", ["To Office Elevator From Office", "To Workshop", "To Lobby From Office", "To Bedroom Elevator From Office"]],
|
||||
["Workshop", ["To Office From Workshop"]],
|
||||
["Office", ["To Office Elevator From Office", "To Workshop", "To Lobby From Office", "To Bedroom Elevator From Office", "To Ash Capture From Office"]],
|
||||
["Workshop", ["To Office From Workshop", "To Wood Capture From Workshop"]],
|
||||
["Bedroom Elevator", ["To Office From Bedroom Elevator", "To Bedroom"]],
|
||||
["Bedroom", ["To Bedroom Elevator From Bedroom"]],
|
||||
["Lobby", ["To Office From Lobby", "To Library From Lobby", "To Theater From Lobby", "To Prehistoric From Lobby", "To Egypt From Lobby", "To Tar River From Lobby", "To Outside From Lobby"]],
|
||||
["Library", ["To Lobby From Library", "To Maintenance Tunnels From Library"]],
|
||||
["Bedroom", ["To Bedroom Elevator From Bedroom", "To Metal Capture From Bedroom"]],
|
||||
["Lobby", ["To Office From Lobby", "To Library From Lobby", "To Theater From Lobby", "To Prehistoric From Lobby", "To Egypt From Lobby", "To Tar River From Lobby", "To Outside From Lobby", "To Water Capture From Lobby", "To Crystal Capture From Lobby"]],
|
||||
["Library", ["To Lobby From Library", "To Maintenance Tunnels From Library", "To Wax Capture From Library"]],
|
||||
["Maintenance Tunnels", ["To Library From Maintenance Tunnels", "To Three Floor Elevator From Maintenance Tunnels", "To Generator"]],
|
||||
["Generator", ["To Maintenance Tunnels From Generator"]],
|
||||
["Theater", ["To Lobby From Theater", "To Theater Back Hallways From Theater"]],
|
||||
["Theater Back Hallways", ["To Theater From Theater Back Hallways", "To Clock Tower Staircase From Theater Back Hallways", "To Maintenance Tunnels From Theater Back Hallways", "To Projector Room"]],
|
||||
["Clock Tower Staircase", ["To Theater Back Hallways From Clock Tower Staircase", "To Clock Tower"]],
|
||||
["Clock Tower", ["To Clock Tower Staircase From Clock Tower"]],
|
||||
["Projector Room", ["To Theater Back Hallways From Projector Room"]],
|
||||
["Prehistoric", ["To Lobby From Prehistoric", "To Greenhouse", "To Ocean From Prehistoric"]],
|
||||
["Greenhouse", ["To Prehistoric From Greenhouse"]],
|
||||
["Ocean", ["To Prehistoric From Ocean", "To Maze Staircase From Ocean"]],
|
||||
["Projector Room", ["To Theater Back Hallways From Projector Room", "To Metal Capture From Projector Room"]],
|
||||
["Prehistoric", ["To Lobby From Prehistoric", "To Greenhouse", "To Ocean From Prehistoric", "To Oil Capture From Prehistoric", "To Metal Capture From Prehistoric"]],
|
||||
["Greenhouse", ["To Prehistoric From Greenhouse", "To Sand Capture From Greenhouse"]],
|
||||
["Ocean", ["To Prehistoric From Ocean", "To Maze Staircase From Ocean", "To Crystal Capture From Ocean", "To Sand Capture From Ocean"]],
|
||||
["Maze Staircase", ["To Ocean From Maze Staircase", "To Maze From Maze Staircase"]],
|
||||
["Maze", ["To Maze Staircase From Maze", "To Tar River"]],
|
||||
["Tar River", ["To Maze From Tar River", "To Lobby From Tar River"]],
|
||||
["Egypt", ["To Lobby From Egypt", "To Burial From Egypt", "To Blue Maze From Egypt"]],
|
||||
["Burial", ["To Egypt From Burial", "To Shaman From Burial"]],
|
||||
["Shaman", ["To Burial From Shaman", "To Gods Room"]],
|
||||
["Gods Room", ["To Shaman From Gods Room", "To Anansi From Gods Room"]],
|
||||
["Anansi", ["To Gods Room From Anansi", "To Werewolf From Anansi"]],
|
||||
["Tar River", ["To Maze From Tar River", "To Lobby From Tar River", "To Oil Capture From Tar River"]],
|
||||
["Egypt", ["To Lobby From Egypt", "To Burial From Egypt", "To Blue Maze From Egypt", "To Cloth Capture From Egypt"]],
|
||||
["Burial", ["To Egypt From Burial", "To Shaman From Burial", "To Ash Capture From Burial", "To Cloth Capture From Burial"]],
|
||||
["Shaman", ["To Burial From Shaman", "To Gods Room", "To Wax Capture From Shaman"]],
|
||||
["Gods Room", ["To Shaman From Gods Room", "To Anansi From Gods Room", "To Wood Capture From Gods Room"]],
|
||||
["Anansi", ["To Gods Room From Anansi", "To Werewolf From Anansi", "To Wax Capture From Anansi", "To Wood Capture From Anansi"]],
|
||||
["Werewolf", ["To Anansi From Werewolf", "To Night Staircase From Werewolf"]],
|
||||
["Night Staircase", ["To Werewolf From Night Staircase", "To Janitor Closet", "To UFO"]],
|
||||
["Janitor Closet", ["To Night Staircase From Janitor Closet"]],
|
||||
["Janitor Closet", ["To Night Staircase From Janitor Closet", "To Water Capture From Janitor Closet", "To Cloth Capture From Janitor Closet"]],
|
||||
["UFO", ["To Night Staircase From UFO", "To Inventions From UFO"]],
|
||||
["Blue Maze", ["To Egypt From Blue Maze", "To Three Floor Elevator From Blue Maze Bottom", "To Three Floor Elevator From Blue Maze Top", "To Fortune Teller", "To Inventions From Blue Maze"]],
|
||||
["Blue Maze", ["To Egypt From Blue Maze", "To Three Floor Elevator From Blue Maze Bottom", "To Three Floor Elevator From Blue Maze Top", "To Fortune Teller", "To Inventions From Blue Maze", "To Wood Capture From Blue Maze"]],
|
||||
["Three Floor Elevator", ["To Maintenance Tunnels From Three Floor Elevator", "To Blue Maze From Three Floor Elevator"]],
|
||||
["Fortune Teller", ["To Blue Maze From Fortune Teller"]],
|
||||
["Inventions", ["To Blue Maze From Inventions", "To UFO From Inventions", "To Torture From Inventions"]],
|
||||
@@ -43,7 +43,16 @@
|
||||
["Puzzle Room Mastermind", ["To Torture", "To Puzzle Room Marbles From Puzzle Room Mastermind"]],
|
||||
["Puzzle Room Marbles", ["To Puzzle Room Mastermind From Puzzle Room Marbles", "To Skull Dial Bridge From Puzzle Room Marbles"]],
|
||||
["Skull Dial Bridge", ["To Puzzle Room Marbles From Skull Dial Bridge", "To Slide Room"]],
|
||||
["Slide Room", ["To Skull Dial Bridge From Slide Room", "To Lobby From Slide Room"]]
|
||||
["Slide Room", ["To Skull Dial Bridge From Slide Room", "To Lobby From Slide Room"]],
|
||||
["Water Capture", []],
|
||||
["Wax Capture", []],
|
||||
["Ash Capture", []],
|
||||
["Oil Capture", []],
|
||||
["Cloth Capture", []],
|
||||
["Wood Capture", []],
|
||||
["Crystal Capture", []],
|
||||
["Sand Capture", []],
|
||||
["Metal Capture", []]
|
||||
],
|
||||
"mandatory_connections": [
|
||||
["To Registry", "Registry"],
|
||||
@@ -140,6 +149,29 @@
|
||||
["To Puzzle Room Marbles From Skull Dial Bridge", "Puzzle Room Marbles"],
|
||||
["To Skull Dial Bridge From Puzzle Room Marbles", "Skull Dial Bridge"],
|
||||
["To Skull Dial Bridge From Slide Room", "Skull Dial Bridge"],
|
||||
["To Slide Room", "Slide Room"]
|
||||
["To Slide Room", "Slide Room"],
|
||||
["To Wax Capture From Library", "Wax Capture"],
|
||||
["To Wax Capture From Shaman", "Wax Capture"],
|
||||
["To Wax Capture From Anansi", "Wax Capture"],
|
||||
["To Water Capture From Lobby", "Water Capture"],
|
||||
["To Water Capture From Janitor Closet", "Water Capture"],
|
||||
["To Ash Capture From Office", "Ash Capture"],
|
||||
["To Ash Capture From Burial", "Ash Capture"],
|
||||
["To Oil Capture From Prehistoric", "Oil Capture"],
|
||||
["To Oil Capture From Tar River", "Oil Capture"],
|
||||
["To Cloth Capture From Egypt", "Cloth Capture"],
|
||||
["To Cloth Capture From Burial", "Cloth Capture"],
|
||||
["To Cloth Capture From Janitor Closet", "Cloth Capture"],
|
||||
["To Wood Capture From Workshop", "Wood Capture"],
|
||||
["To Wood Capture From Gods Room", "Wood Capture"],
|
||||
["To Wood Capture From Anansi", "Wood Capture"],
|
||||
["To Wood Capture From Blue Maze", "Wood Capture"],
|
||||
["To Crystal Capture From Lobby", "Crystal Capture"],
|
||||
["To Crystal Capture From Ocean", "Crystal Capture"],
|
||||
["To Sand Capture From Greenhouse", "Sand Capture"],
|
||||
["To Sand Capture From Ocean", "Sand Capture"],
|
||||
["To Metal Capture From Bedroom", "Metal Capture"],
|
||||
["To Metal Capture From Projector Room", "Metal Capture"],
|
||||
["To Metal Capture From Prehistoric", "Metal Capture"]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ these are randomized. Crawling has been added and is required to use any crawl s
|
||||
|
||||
## What is considered a location check in Shivers?
|
||||
|
||||
1. All puzzle solves are location checks excluding elevator puzzles.
|
||||
2. All Ixupi captures are location checks excluding Lightning.
|
||||
1. All puzzle solves are location checks.
|
||||
2. All Ixupi captures are location checks.
|
||||
3. Puzzle hints/solutions are location checks. For example, looking at the Atlantis map.
|
||||
4. Optionally information plaques are location checks.
|
||||
|
||||
@@ -23,9 +23,9 @@ If the player receives a key then the corresponding door will be unlocked. If th
|
||||
|
||||
## What is the victory condition?
|
||||
|
||||
Victory is achieved when the player captures Lightning in the generator room.
|
||||
Victory is achieved when the player has captured the required number Ixupi set in their options.
|
||||
|
||||
## Encountered a bug?
|
||||
|
||||
Please contact GodlFire on Discord for bugs related to Shivers world generation.\
|
||||
Please contact GodlFire on Discord for bugs related to Shivers world generation.<br>
|
||||
Please contact GodlFire or mouse on Discord for bugs related to the Shivers Randomizer.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
- [Shivers (GOG version)](https://www.gog.com/en/game/shivers) or original disc
|
||||
- [ScummVM](https://www.scummvm.org/downloads/) version 2.7.0 or later
|
||||
- [Shivers Randomizer](https://www.speedrun.com/shivers/resources)
|
||||
- [Shivers Randomizer](https://github.com/GodlFire/Shivers-Randomizer-CSharp/releases/latest) Latest release version
|
||||
|
||||
## Setup ScummVM for Shivers
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import typing
|
||||
from Options import Choice, Option, Toggle, DefaultOnToggle, Range
|
||||
from Options import Choice, Option, Toggle, DefaultOnToggle, Range, ItemsAccessibility
|
||||
|
||||
class SMLogic(Choice):
|
||||
"""This option selects what kind of logic to use for item placement inside
|
||||
@@ -128,6 +128,7 @@ class EnergyBeep(DefaultOnToggle):
|
||||
|
||||
|
||||
smz3_options: typing.Dict[str, type(Option)] = {
|
||||
"accessibility": ItemsAccessibility,
|
||||
"sm_logic": SMLogic,
|
||||
"sword_location": SwordLocation,
|
||||
"morph_location": MorphLocation,
|
||||
|
||||
@@ -215,7 +215,6 @@ class SMZ3World(World):
|
||||
|
||||
niceItems = TotalSMZ3Item.Item.CreateNicePool(self.smz3World)
|
||||
junkItems = TotalSMZ3Item.Item.CreateJunkPool(self.smz3World)
|
||||
allJunkItems = niceItems + junkItems
|
||||
self.junkItemsNames = [item.Type.name for item in junkItems]
|
||||
|
||||
if (self.smz3World.Config.Keysanity):
|
||||
@@ -228,7 +227,8 @@ class SMZ3World(World):
|
||||
self.multiworld.push_precollected(SMZ3Item(item.Type.name, ItemClassification.filler, item.Type, self.item_name_to_id[item.Type.name], self.player, item))
|
||||
|
||||
itemPool = [SMZ3Item(item.Type.name, ItemClassification.progression, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in progressionItems] + \
|
||||
[SMZ3Item(item.Type.name, ItemClassification.filler, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in allJunkItems]
|
||||
[SMZ3Item(item.Type.name, ItemClassification.useful, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in niceItems] + \
|
||||
[SMZ3Item(item.Type.name, ItemClassification.filler, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in junkItems]
|
||||
self.smz3DungeonItems = [SMZ3Item(item.Type.name, ItemClassification.progression, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in self.dungeon]
|
||||
self.multiworld.itempool += itemPool
|
||||
|
||||
@@ -244,7 +244,7 @@ class SMZ3World(World):
|
||||
set_rule(entrance, lambda state, region=region: region.CanEnter(state.smz3state[self.player]))
|
||||
for loc in region.Locations:
|
||||
l = self.locations[loc.Name]
|
||||
if self.multiworld.accessibility[self.player] != 'locations':
|
||||
if self.multiworld.accessibility[self.player] != 'full':
|
||||
l.always_allow = lambda state, item, loc=loc: \
|
||||
item.game == "SMZ3" and \
|
||||
loc.alwaysAllow(item.item, state.smz3state[self.player])
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import typing
|
||||
from Options import TextChoice, Option, Range, Toggle
|
||||
from dataclasses import dataclass
|
||||
|
||||
from Options import TextChoice, Range, Toggle, PerGameCommonOptions
|
||||
|
||||
|
||||
class Character(TextChoice):
|
||||
@@ -55,9 +57,18 @@ class Downfall(Toggle):
|
||||
default = 0
|
||||
|
||||
|
||||
spire_options: typing.Dict[str, type(Option)] = {
|
||||
"character": Character,
|
||||
"ascension": Ascension,
|
||||
"final_act": FinalAct,
|
||||
"downfall": Downfall,
|
||||
}
|
||||
class DeathLink(Range):
|
||||
"""Percentage of health to lose when a death link is received."""
|
||||
display_name = "Death Link %"
|
||||
range_start = 0
|
||||
range_end = 100
|
||||
default = 0
|
||||
|
||||
|
||||
@dataclass
|
||||
class SpireOptions(PerGameCommonOptions):
|
||||
character: Character
|
||||
ascension: Ascension
|
||||
final_act: FinalAct
|
||||
downfall: Downfall
|
||||
death_link: DeathLink
|
||||
|
||||
@@ -3,7 +3,7 @@ import string
|
||||
from BaseClasses import Entrance, Item, ItemClassification, Location, MultiWorld, Region, Tutorial
|
||||
from .Items import event_item_pairs, item_pool, item_table
|
||||
from .Locations import location_table
|
||||
from .Options import spire_options
|
||||
from .Options import SpireOptions
|
||||
from .Regions import create_regions
|
||||
from .Rules import set_rules
|
||||
from ..AutoWorld import WebWorld, World
|
||||
@@ -27,7 +27,8 @@ class SpireWorld(World):
|
||||
immense power, and Slay the Spire!
|
||||
"""
|
||||
|
||||
option_definitions = spire_options
|
||||
options_dataclass = SpireOptions
|
||||
options: SpireOptions
|
||||
game = "Slay the Spire"
|
||||
topology_present = False
|
||||
web = SpireWeb()
|
||||
@@ -63,15 +64,13 @@ class SpireWorld(World):
|
||||
|
||||
def fill_slot_data(self) -> dict:
|
||||
slot_data = {
|
||||
'seed': "".join(self.multiworld.per_slot_randoms[self.player].choice(string.ascii_letters) for i in range(16))
|
||||
'seed': "".join(self.random.choice(string.ascii_letters) for i in range(16))
|
||||
}
|
||||
for option_name in spire_options:
|
||||
option = getattr(self.multiworld, option_name)[self.player]
|
||||
slot_data[option_name] = option.value
|
||||
slot_data.update(self.options.as_dict("character", "ascension", "final_act", "downfall", "death_link"))
|
||||
return slot_data
|
||||
|
||||
def get_filler_item_name(self) -> str:
|
||||
return self.multiworld.random.choice(["Card Draw", "Card Draw", "Card Draw", "Relic", "Relic"])
|
||||
return self.random.choice(["Card Draw", "Card Draw", "Card Draw", "Relic", "Relic"])
|
||||
|
||||
|
||||
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
|
||||
|
||||
@@ -2212,7 +2212,7 @@ id,region,name,tags,mod_name
|
||||
3808,Shipping,Shipsanity: Mystery Box,"SHIPSANITY",
|
||||
3809,Shipping,Shipsanity: Golden Tag,"SHIPSANITY",
|
||||
3810,Shipping,Shipsanity: Deluxe Bait,"SHIPSANITY",
|
||||
3811,Shipping,Shipsanity: Moss,"SHIPSANITY,SHIPSANITY_CROP,SHIPSANITY_FULL_SHIPMENT",
|
||||
3811,Shipping,Shipsanity: Moss,"SHIPSANITY,SHIPSANITY_FULL_SHIPMENT",
|
||||
3812,Shipping,Shipsanity: Mossy Seed,"SHIPSANITY",
|
||||
3813,Shipping,Shipsanity: Sonar Bobber,"SHIPSANITY",
|
||||
3814,Shipping,Shipsanity: Tent Kit,"SHIPSANITY",
|
||||
|
||||
|
@@ -58,7 +58,7 @@ all_random_settings = {
|
||||
|
||||
easy_settings = {
|
||||
"progression_balancing": ProgressionBalancing.default,
|
||||
"accessibility": Accessibility.option_items,
|
||||
"accessibility": Accessibility.option_full,
|
||||
Goal.internal_name: Goal.option_community_center,
|
||||
FarmType.internal_name: "random",
|
||||
StartingMoney.internal_name: "very rich",
|
||||
@@ -104,7 +104,7 @@ easy_settings = {
|
||||
|
||||
medium_settings = {
|
||||
"progression_balancing": 25,
|
||||
"accessibility": Accessibility.option_locations,
|
||||
"accessibility": Accessibility.option_full,
|
||||
Goal.internal_name: Goal.option_community_center,
|
||||
FarmType.internal_name: "random",
|
||||
StartingMoney.internal_name: "rich",
|
||||
@@ -150,7 +150,7 @@ medium_settings = {
|
||||
|
||||
hard_settings = {
|
||||
"progression_balancing": 0,
|
||||
"accessibility": Accessibility.option_locations,
|
||||
"accessibility": Accessibility.option_full,
|
||||
Goal.internal_name: Goal.option_grandpa_evaluation,
|
||||
FarmType.internal_name: "random",
|
||||
StartingMoney.internal_name: "extra",
|
||||
@@ -196,7 +196,7 @@ hard_settings = {
|
||||
|
||||
nightmare_settings = {
|
||||
"progression_balancing": 0,
|
||||
"accessibility": Accessibility.option_locations,
|
||||
"accessibility": Accessibility.option_full,
|
||||
Goal.internal_name: Goal.option_community_center,
|
||||
FarmType.internal_name: "random",
|
||||
StartingMoney.internal_name: "vanilla",
|
||||
@@ -242,7 +242,7 @@ nightmare_settings = {
|
||||
|
||||
short_settings = {
|
||||
"progression_balancing": ProgressionBalancing.default,
|
||||
"accessibility": Accessibility.option_items,
|
||||
"accessibility": Accessibility.option_full,
|
||||
Goal.internal_name: Goal.option_bottom_of_the_mines,
|
||||
FarmType.internal_name: "random",
|
||||
StartingMoney.internal_name: "filthy rich",
|
||||
@@ -334,7 +334,7 @@ minsanity_settings = {
|
||||
|
||||
allsanity_settings = {
|
||||
"progression_balancing": ProgressionBalancing.default,
|
||||
"accessibility": Accessibility.option_locations,
|
||||
"accessibility": Accessibility.option_full,
|
||||
Goal.internal_name: Goal.default,
|
||||
FarmType.internal_name: "random",
|
||||
StartingMoney.internal_name: StartingMoney.default,
|
||||
|
||||
@@ -6,7 +6,7 @@ from argparse import Namespace
|
||||
from contextlib import contextmanager
|
||||
from typing import Dict, ClassVar, Iterable, Tuple, Optional, List, Union, Any
|
||||
|
||||
from BaseClasses import MultiWorld, CollectionState, get_seed, Location, Item, ItemClassification
|
||||
from BaseClasses import MultiWorld, CollectionState, PlandoOptions, get_seed, Location, Item, ItemClassification
|
||||
from Options import VerifyKeys
|
||||
from test.bases import WorldTestBase
|
||||
from test.general import gen_steps, setup_solo_multiworld as setup_base_solo_multiworld
|
||||
@@ -365,7 +365,7 @@ def setup_solo_multiworld(test_options: Optional[Dict[Union[str, StardewValleyOp
|
||||
|
||||
if issubclass(option, VerifyKeys):
|
||||
# Values should already be verified, but just in case...
|
||||
option.verify_keys(value.value)
|
||||
value.verify(StardewValleyWorld, "Tester", PlandoOptions.bosses)
|
||||
|
||||
setattr(args, name, {1: value})
|
||||
multiworld.set_options(args)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import List, Optional, Callable, NamedTuple
|
||||
from BaseClasses import MultiWorld, CollectionState
|
||||
from .Options import is_option_enabled
|
||||
from BaseClasses import CollectionState
|
||||
from .Options import TimespinnerOptions
|
||||
from .PreCalculatedWeights import PreCalculatedWeights
|
||||
from .LogicExtensions import TimespinnerLogic
|
||||
|
||||
@@ -14,11 +14,10 @@ class LocationData(NamedTuple):
|
||||
rule: Optional[Callable[[CollectionState], bool]] = None
|
||||
|
||||
|
||||
def get_location_datas(world: Optional[MultiWorld], player: Optional[int],
|
||||
precalculated_weights: PreCalculatedWeights) -> List[LocationData]:
|
||||
|
||||
flooded: PreCalculatedWeights = precalculated_weights
|
||||
logic = TimespinnerLogic(world, player, precalculated_weights)
|
||||
def get_location_datas(player: Optional[int], options: Optional[TimespinnerOptions],
|
||||
precalculated_weights: Optional[PreCalculatedWeights]) -> List[LocationData]:
|
||||
flooded: Optional[PreCalculatedWeights] = precalculated_weights
|
||||
logic = TimespinnerLogic(player, options, precalculated_weights)
|
||||
|
||||
# 1337000 - 1337155 Generic locations
|
||||
# 1337171 - 1337175 New Pickup checks
|
||||
@@ -203,7 +202,7 @@ def get_location_datas(world: Optional[MultiWorld], player: Optional[int],
|
||||
]
|
||||
|
||||
# 1337156 - 1337170 Downloads
|
||||
if not world or is_option_enabled(world, player, "DownloadableItems"):
|
||||
if not options or options.downloadable_items:
|
||||
location_table += (
|
||||
LocationData('Library', 'Library: Terminal 2 (Lachiem)', 1337156, lambda state: state.has('Tablet', player)),
|
||||
LocationData('Library', 'Library: Terminal 1 (Windaria)', 1337157, lambda state: state.has('Tablet', player)),
|
||||
@@ -223,13 +222,13 @@ def get_location_datas(world: Optional[MultiWorld], player: Optional[int],
|
||||
)
|
||||
|
||||
# 1337176 - 1337176 Cantoran
|
||||
if not world or is_option_enabled(world, player, "Cantoran"):
|
||||
if not options or options.cantoran:
|
||||
location_table += (
|
||||
LocationData('Left Side forest Caves', 'Lake Serene: Cantoran', 1337176),
|
||||
)
|
||||
|
||||
# 1337177 - 1337198 Lore Checks
|
||||
if not world or is_option_enabled(world, player, "LoreChecks"):
|
||||
if not options or options.lore_checks:
|
||||
location_table += (
|
||||
LocationData('Lower lake desolation', 'Lake Desolation: Memory - Coyote Jump (Time Messenger)', 1337177),
|
||||
LocationData('Library', 'Library: Memory - Waterway (A Message)', 1337178),
|
||||
@@ -258,7 +257,7 @@ def get_location_datas(world: Optional[MultiWorld], player: Optional[int],
|
||||
# 1337199 - 1337236 Reserved for future use
|
||||
|
||||
# 1337237 - 1337245 GyreArchives
|
||||
if not world or is_option_enabled(world, player, "GyreArchives"):
|
||||
if not options or options.gyre_archives:
|
||||
location_table += (
|
||||
LocationData('Ravenlord\'s Lair', 'Ravenlord: Post fight (pedestal)', 1337237),
|
||||
LocationData('Ifrit\'s Lair', 'Ifrit: Post fight (pedestal)', 1337238),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import Union
|
||||
from BaseClasses import MultiWorld, CollectionState
|
||||
from .Options import is_option_enabled
|
||||
from typing import Union, Optional
|
||||
from BaseClasses import CollectionState
|
||||
from .Options import TimespinnerOptions
|
||||
from .PreCalculatedWeights import PreCalculatedWeights
|
||||
|
||||
|
||||
@@ -10,17 +10,18 @@ class TimespinnerLogic:
|
||||
flag_unchained_keys: bool
|
||||
flag_eye_spy: bool
|
||||
flag_specific_keycards: bool
|
||||
pyramid_keys_unlock: Union[str, None]
|
||||
present_keys_unlock: Union[str, None]
|
||||
past_keys_unlock: Union[str, None]
|
||||
time_keys_unlock: Union[str, None]
|
||||
pyramid_keys_unlock: Optional[str]
|
||||
present_keys_unlock: Optional[str]
|
||||
past_keys_unlock: Optional[str]
|
||||
time_keys_unlock: Optional[str]
|
||||
|
||||
def __init__(self, world: MultiWorld, player: int, precalculated_weights: PreCalculatedWeights):
|
||||
def __init__(self, player: int, options: Optional[TimespinnerOptions],
|
||||
precalculated_weights: Optional[PreCalculatedWeights]):
|
||||
self.player = player
|
||||
|
||||
self.flag_specific_keycards = is_option_enabled(world, player, "SpecificKeycards")
|
||||
self.flag_eye_spy = is_option_enabled(world, player, "EyeSpy")
|
||||
self.flag_unchained_keys = is_option_enabled(world, player, "UnchainedKeys")
|
||||
self.flag_specific_keycards = bool(options and options.specific_keycards)
|
||||
self.flag_eye_spy = bool(options and options.eye_spy)
|
||||
self.flag_unchained_keys = bool(options and options.unchained_keys)
|
||||
|
||||
if precalculated_weights:
|
||||
if self.flag_unchained_keys:
|
||||
|
||||
@@ -1,59 +1,50 @@
|
||||
from typing import Dict, Union, List
|
||||
from BaseClasses import MultiWorld
|
||||
from Options import Toggle, DefaultOnToggle, DeathLink, Choice, Range, Option, OptionDict, OptionList
|
||||
from dataclasses import dataclass
|
||||
from typing import Type, Any
|
||||
from typing import Dict
|
||||
from Options import Toggle, DefaultOnToggle, DeathLink, Choice, Range, OptionDict, OptionList, Visibility, Option
|
||||
from Options import PerGameCommonOptions, DeathLinkMixin, AssembleOptions
|
||||
from schema import Schema, And, Optional, Or
|
||||
|
||||
|
||||
class StartWithJewelryBox(Toggle):
|
||||
"Start with Jewelry Box unlocked"
|
||||
display_name = "Start with Jewelry Box"
|
||||
|
||||
|
||||
class DownloadableItems(DefaultOnToggle):
|
||||
"With the tablet you will be able to download items at terminals"
|
||||
display_name = "Downloadable items"
|
||||
|
||||
|
||||
class EyeSpy(Toggle):
|
||||
"Requires Oculus Ring in inventory to be able to break hidden walls."
|
||||
display_name = "Eye Spy"
|
||||
|
||||
|
||||
class StartWithMeyef(Toggle):
|
||||
"Start with Meyef, ideal for when you want to play multiplayer."
|
||||
display_name = "Start with Meyef"
|
||||
|
||||
|
||||
class QuickSeed(Toggle):
|
||||
"Start with Talaria Attachment, Nyoom!"
|
||||
display_name = "Quick seed"
|
||||
|
||||
|
||||
class SpecificKeycards(Toggle):
|
||||
"Keycards can only open corresponding doors"
|
||||
display_name = "Specific Keycards"
|
||||
|
||||
|
||||
class Inverted(Toggle):
|
||||
"Start in the past"
|
||||
display_name = "Inverted"
|
||||
|
||||
|
||||
class GyreArchives(Toggle):
|
||||
"Gyre locations are in logic. New warps are gated by Merchant Crow and Kobo"
|
||||
display_name = "Gyre Archives"
|
||||
|
||||
|
||||
class Cantoran(Toggle):
|
||||
"Cantoran's fight and check are available upon revisiting his room"
|
||||
display_name = "Cantoran"
|
||||
|
||||
|
||||
class LoreChecks(Toggle):
|
||||
"Memories and journal entries contain items."
|
||||
display_name = "Lore Checks"
|
||||
|
||||
|
||||
class BossRando(Choice):
|
||||
"Wheter all boss locations are shuffled, and if their damage/hp should be scaled."
|
||||
display_name = "Boss Randomization"
|
||||
@@ -62,7 +53,6 @@ class BossRando(Choice):
|
||||
option_unscaled = 2
|
||||
alias_true = 1
|
||||
|
||||
|
||||
class EnemyRando(Choice):
|
||||
"Wheter enemies will be randomized, and if their damage/hp should be scaled."
|
||||
display_name = "Enemy Randomization"
|
||||
@@ -72,7 +62,6 @@ class EnemyRando(Choice):
|
||||
option_ryshia = 3
|
||||
alias_true = 1
|
||||
|
||||
|
||||
class DamageRando(Choice):
|
||||
"Randomly nerfs and buffs some orbs and their associated spells as well as some associated rings."
|
||||
display_name = "Damage Rando"
|
||||
@@ -85,7 +74,6 @@ class DamageRando(Choice):
|
||||
option_manual = 6
|
||||
alias_true = 2
|
||||
|
||||
|
||||
class DamageRandoOverrides(OptionDict):
|
||||
"""Manual +/-/normal odds for an orb. Put 0 if you don't want a certain nerf or buff to be a possibility. Orbs that
|
||||
you don't specify will roll with 1/1/1 as odds"""
|
||||
@@ -191,7 +179,6 @@ class DamageRandoOverrides(OptionDict):
|
||||
"Radiant": { "MinusOdds": 1, "NormalOdds": 1, "PlusOdds": 1 },
|
||||
}
|
||||
|
||||
|
||||
class HpCap(Range):
|
||||
"Sets the number that Lunais's HP maxes out at."
|
||||
display_name = "HP Cap"
|
||||
@@ -199,7 +186,6 @@ class HpCap(Range):
|
||||
range_end = 999
|
||||
default = 999
|
||||
|
||||
|
||||
class LevelCap(Range):
|
||||
"""Sets the max level Lunais can achieve."""
|
||||
display_name = "Level Cap"
|
||||
@@ -207,20 +193,17 @@ class LevelCap(Range):
|
||||
range_end = 99
|
||||
default = 99
|
||||
|
||||
|
||||
class ExtraEarringsXP(Range):
|
||||
"""Adds additional XP granted by Galaxy Earrings."""
|
||||
display_name = "Extra Earrings XP"
|
||||
range_start = 0
|
||||
range_end = 24
|
||||
default = 0
|
||||
|
||||
|
||||
class BossHealing(DefaultOnToggle):
|
||||
"Enables/disables healing after boss fights. NOTE: Currently only applicable when Boss Rando is enabled."
|
||||
display_name = "Heal After Bosses"
|
||||
|
||||
|
||||
class ShopFill(Choice):
|
||||
"""Sets the items for sale in Merchant Crow's shops.
|
||||
Default: No sunglasses or trendy jacket, but sand vials for sale.
|
||||
@@ -233,12 +216,10 @@ class ShopFill(Choice):
|
||||
option_vanilla = 2
|
||||
option_empty = 3
|
||||
|
||||
|
||||
class ShopWarpShards(DefaultOnToggle):
|
||||
"Shops always sell warp shards (when keys possessed), ignoring inventory setting."
|
||||
display_name = "Always Sell Warp Shards"
|
||||
|
||||
|
||||
class ShopMultiplier(Range):
|
||||
"Multiplier for the cost of items in the shop. Set to 0 for free shops."
|
||||
display_name = "Shop Price Multiplier"
|
||||
@@ -246,7 +227,6 @@ class ShopMultiplier(Range):
|
||||
range_end = 10
|
||||
default = 1
|
||||
|
||||
|
||||
class LootPool(Choice):
|
||||
"""Sets the items that drop from enemies (does not apply to boss reward checks)
|
||||
Vanilla: Drops are the same as the base game
|
||||
@@ -257,7 +237,6 @@ class LootPool(Choice):
|
||||
option_randomized = 1
|
||||
option_empty = 2
|
||||
|
||||
|
||||
class DropRateCategory(Choice):
|
||||
"""Sets the drop rate when 'Loot Pool' is set to 'Random'
|
||||
Tiered: Based on item rarity/value
|
||||
@@ -271,7 +250,6 @@ class DropRateCategory(Choice):
|
||||
option_randomized = 2
|
||||
option_fixed = 3
|
||||
|
||||
|
||||
class FixedDropRate(Range):
|
||||
"Base drop rate percentage when 'Drop Rate Category' is set to 'Fixed'"
|
||||
display_name = "Fixed Drop Rate"
|
||||
@@ -279,7 +257,6 @@ class FixedDropRate(Range):
|
||||
range_end = 100
|
||||
default = 5
|
||||
|
||||
|
||||
class LootTierDistro(Choice):
|
||||
"""Sets how often items of each rarity tier are placed when 'Loot Pool' is set to 'Random'
|
||||
Default Weight: Rarer items will be assigned to enemy drop slots less frequently than common items
|
||||
@@ -291,32 +268,26 @@ class LootTierDistro(Choice):
|
||||
option_full_random = 1
|
||||
option_inverted_weight = 2
|
||||
|
||||
|
||||
class ShowBestiary(Toggle):
|
||||
"All entries in the bestiary are visible, without needing to kill one of a given enemy first"
|
||||
display_name = "Show Bestiary Entries"
|
||||
|
||||
|
||||
class ShowDrops(Toggle):
|
||||
"All item drops in the bestiary are visible, without needing an enemy to drop one of a given item first"
|
||||
display_name = "Show Bestiary Item Drops"
|
||||
|
||||
|
||||
class EnterSandman(Toggle):
|
||||
"The Ancient Pyramid is unlocked by the Twin Pyramid Keys, but the final boss door opens if you have all 5 Timespinner pieces"
|
||||
display_name = "Enter Sandman"
|
||||
|
||||
|
||||
class DadPercent(Toggle):
|
||||
"""The win condition is beating the boss of Emperor's Tower"""
|
||||
display_name = "Dad Percent"
|
||||
|
||||
|
||||
class RisingTides(Toggle):
|
||||
"""Random areas are flooded or drained, can be further specified with RisingTidesOverrides"""
|
||||
display_name = "Rising Tides"
|
||||
|
||||
|
||||
def rising_tide_option(location: str, with_save_point_option: bool = False) -> Dict[Optional, Or]:
|
||||
if with_save_point_option:
|
||||
return {
|
||||
@@ -341,7 +312,6 @@ def rising_tide_option(location: str, with_save_point_option: bool = False) -> D
|
||||
"Flooded")
|
||||
}
|
||||
|
||||
|
||||
class RisingTidesOverrides(OptionDict):
|
||||
"""Odds for specific areas to be flooded or drained, only has effect when RisingTides is on.
|
||||
Areas that are not specified will roll with the default 33% chance of getting flooded or drained"""
|
||||
@@ -373,13 +343,11 @@ class RisingTidesOverrides(OptionDict):
|
||||
"Lab": { "Dry": 67, "Flooded": 33 },
|
||||
}
|
||||
|
||||
|
||||
class UnchainedKeys(Toggle):
|
||||
"""Start with Twin Pyramid Key, which does not give free warp;
|
||||
warp items for Past, Present, (and ??? with Enter Sandman) can be found."""
|
||||
display_name = "Unchained Keys"
|
||||
|
||||
|
||||
class TrapChance(Range):
|
||||
"""Chance of traps in the item pool.
|
||||
Traps will only replace filler items such as potions, vials and antidotes"""
|
||||
@@ -388,67 +356,256 @@ class TrapChance(Range):
|
||||
range_end = 100
|
||||
default = 10
|
||||
|
||||
|
||||
class Traps(OptionList):
|
||||
"""List of traps that may be in the item pool to find"""
|
||||
display_name = "Traps Types"
|
||||
valid_keys = { "Meteor Sparrow Trap", "Poison Trap", "Chaos Trap", "Neurotoxin Trap", "Bee Trap" }
|
||||
default = [ "Meteor Sparrow Trap", "Poison Trap", "Chaos Trap", "Neurotoxin Trap", "Bee Trap" ]
|
||||
|
||||
|
||||
class PresentAccessWithWheelAndSpindle(Toggle):
|
||||
"""When inverted, allows using the refugee camp warp when both the Timespinner Wheel and Spindle is acquired."""
|
||||
display_name = "Past Wheel & Spindle Warp"
|
||||
display_name = "Back to the future"
|
||||
|
||||
@dataclass
|
||||
class TimespinnerOptions(PerGameCommonOptions, DeathLinkMixin):
|
||||
start_with_jewelry_box: StartWithJewelryBox
|
||||
downloadable_items: DownloadableItems
|
||||
eye_spy: EyeSpy
|
||||
start_with_meyef: StartWithMeyef
|
||||
quick_seed: QuickSeed
|
||||
specific_keycards: SpecificKeycards
|
||||
inverted: Inverted
|
||||
gyre_archives: GyreArchives
|
||||
cantoran: Cantoran
|
||||
lore_checks: LoreChecks
|
||||
boss_rando: BossRando
|
||||
damage_rando: DamageRando
|
||||
damage_rando_overrides: DamageRandoOverrides
|
||||
hp_cap: HpCap
|
||||
level_cap: LevelCap
|
||||
extra_earrings_xp: ExtraEarringsXP
|
||||
boss_healing: BossHealing
|
||||
shop_fill: ShopFill
|
||||
shop_warp_shards: ShopWarpShards
|
||||
shop_multiplier: ShopMultiplier
|
||||
loot_pool: LootPool
|
||||
drop_rate_category: DropRateCategory
|
||||
fixed_drop_rate: FixedDropRate
|
||||
loot_tier_distro: LootTierDistro
|
||||
show_bestiary: ShowBestiary
|
||||
show_drops: ShowDrops
|
||||
enter_sandman: EnterSandman
|
||||
dad_percent: DadPercent
|
||||
rising_tides: RisingTides
|
||||
rising_tides_overrides: RisingTidesOverrides
|
||||
unchained_keys: UnchainedKeys
|
||||
back_to_the_future: PresentAccessWithWheelAndSpindle
|
||||
trap_chance: TrapChance
|
||||
traps: Traps
|
||||
|
||||
# Some options that are available in the timespinner randomizer arent currently implemented
|
||||
timespinner_options: Dict[str, Option] = {
|
||||
"StartWithJewelryBox": StartWithJewelryBox,
|
||||
"DownloadableItems": DownloadableItems,
|
||||
"EyeSpy": EyeSpy,
|
||||
"StartWithMeyef": StartWithMeyef,
|
||||
"QuickSeed": QuickSeed,
|
||||
"SpecificKeycards": SpecificKeycards,
|
||||
"Inverted": Inverted,
|
||||
"GyreArchives": GyreArchives,
|
||||
"Cantoran": Cantoran,
|
||||
"LoreChecks": LoreChecks,
|
||||
"BossRando": BossRando,
|
||||
"EnemyRando": EnemyRando,
|
||||
"DamageRando": DamageRando,
|
||||
"DamageRandoOverrides": DamageRandoOverrides,
|
||||
"HpCap": HpCap,
|
||||
"LevelCap": LevelCap,
|
||||
"ExtraEarringsXP": ExtraEarringsXP,
|
||||
"BossHealing": BossHealing,
|
||||
"ShopFill": ShopFill,
|
||||
"ShopWarpShards": ShopWarpShards,
|
||||
"ShopMultiplier": ShopMultiplier,
|
||||
"LootPool": LootPool,
|
||||
"DropRateCategory": DropRateCategory,
|
||||
"FixedDropRate": FixedDropRate,
|
||||
"LootTierDistro": LootTierDistro,
|
||||
"ShowBestiary": ShowBestiary,
|
||||
"ShowDrops": ShowDrops,
|
||||
"EnterSandman": EnterSandman,
|
||||
"DadPercent": DadPercent,
|
||||
"RisingTides": RisingTides,
|
||||
"RisingTidesOverrides": RisingTidesOverrides,
|
||||
"UnchainedKeys": UnchainedKeys,
|
||||
"TrapChance": TrapChance,
|
||||
"Traps": Traps,
|
||||
"PresentAccessWithWheelAndSpindle": PresentAccessWithWheelAndSpindle,
|
||||
"DeathLink": DeathLink,
|
||||
}
|
||||
class HiddenDamageRandoOverrides(DamageRandoOverrides):
|
||||
"""Manual +/-/normal odds for an orb. Put 0 if you don't want a certain nerf or buff to be a possibility. Orbs that
|
||||
you don't specify will roll with 1/1/1 as odds"""
|
||||
visibility = Visibility.none
|
||||
|
||||
class HiddenRisingTidesOverrides(RisingTidesOverrides):
|
||||
"""Odds for specific areas to be flooded or drained, only has effect when RisingTides is on.
|
||||
Areas that are not specified will roll with the default 33% chance of getting flooded or drained"""
|
||||
visibility = Visibility.none
|
||||
|
||||
def is_option_enabled(world: MultiWorld, player: int, name: str) -> bool:
|
||||
return get_option_value(world, player, name) > 0
|
||||
class HiddenTraps(Traps):
|
||||
"""List of traps that may be in the item pool to find"""
|
||||
visibility = Visibility.none
|
||||
|
||||
class OptionsHider:
|
||||
@classmethod
|
||||
def hidden(cls, option: Type[Option[Any]]) -> Type[Option]:
|
||||
new_option = AssembleOptions(f"{option}Hidden", option.__bases__, vars(option).copy())
|
||||
new_option.visibility = Visibility.none
|
||||
new_option.__doc__ = option.__doc__
|
||||
return new_option
|
||||
|
||||
class HasReplacedCamelCase(Toggle):
|
||||
"""For internal use will display a warning message if true"""
|
||||
visibility = Visibility.none
|
||||
|
||||
def get_option_value(world: MultiWorld, player: int, name: str) -> Union[int, Dict, List]:
|
||||
option = getattr(world, name, None)
|
||||
if option == None:
|
||||
return 0
|
||||
@dataclass
|
||||
class BackwardsCompatiableTimespinnerOptions(TimespinnerOptions):
|
||||
StartWithJewelryBox: OptionsHider.hidden(StartWithJewelryBox) # type: ignore
|
||||
DownloadableItems: OptionsHider.hidden(DownloadableItems) # type: ignore
|
||||
EyeSpy: OptionsHider.hidden(EyeSpy) # type: ignore
|
||||
StartWithMeyef: OptionsHider.hidden(StartWithMeyef) # type: ignore
|
||||
QuickSeed: OptionsHider.hidden(QuickSeed) # type: ignore
|
||||
SpecificKeycards: OptionsHider.hidden(SpecificKeycards) # type: ignore
|
||||
Inverted: OptionsHider.hidden(Inverted) # type: ignore
|
||||
GyreArchives: OptionsHider.hidden(GyreArchives) # type: ignore
|
||||
Cantoran: OptionsHider.hidden(Cantoran) # type: ignore
|
||||
LoreChecks: OptionsHider.hidden(LoreChecks) # type: ignore
|
||||
BossRando: OptionsHider.hidden(BossRando) # type: ignore
|
||||
DamageRando: OptionsHider.hidden(DamageRando) # type: ignore
|
||||
DamageRandoOverrides: HiddenDamageRandoOverrides
|
||||
HpCap: OptionsHider.hidden(HpCap) # type: ignore
|
||||
LevelCap: OptionsHider.hidden(LevelCap) # type: ignore
|
||||
ExtraEarringsXP: OptionsHider.hidden(ExtraEarringsXP) # type: ignore
|
||||
BossHealing: OptionsHider.hidden(BossHealing) # type: ignore
|
||||
ShopFill: OptionsHider.hidden(ShopFill) # type: ignore
|
||||
ShopWarpShards: OptionsHider.hidden(ShopWarpShards) # type: ignore
|
||||
ShopMultiplier: OptionsHider.hidden(ShopMultiplier) # type: ignore
|
||||
LootPool: OptionsHider.hidden(LootPool) # type: ignore
|
||||
DropRateCategory: OptionsHider.hidden(DropRateCategory) # type: ignore
|
||||
FixedDropRate: OptionsHider.hidden(FixedDropRate) # type: ignore
|
||||
LootTierDistro: OptionsHider.hidden(LootTierDistro) # type: ignore
|
||||
ShowBestiary: OptionsHider.hidden(ShowBestiary) # type: ignore
|
||||
ShowDrops: OptionsHider.hidden(ShowDrops) # type: ignore
|
||||
EnterSandman: OptionsHider.hidden(EnterSandman) # type: ignore
|
||||
DadPercent: OptionsHider.hidden(DadPercent) # type: ignore
|
||||
RisingTides: OptionsHider.hidden(RisingTides) # type: ignore
|
||||
RisingTidesOverrides: HiddenRisingTidesOverrides
|
||||
UnchainedKeys: OptionsHider.hidden(UnchainedKeys) # type: ignore
|
||||
PresentAccessWithWheelAndSpindle: OptionsHider.hidden(PresentAccessWithWheelAndSpindle) # type: ignore
|
||||
TrapChance: OptionsHider.hidden(TrapChance) # type: ignore
|
||||
Traps: HiddenTraps # type: ignore
|
||||
DeathLink: OptionsHider.hidden(DeathLink) # type: ignore
|
||||
has_replaced_options: HasReplacedCamelCase
|
||||
|
||||
return option[player].value
|
||||
def handle_backward_compatibility(self) -> None:
|
||||
if self.StartWithJewelryBox != StartWithJewelryBox.default and \
|
||||
self.start_with_jewelry_box == StartWithJewelryBox.default:
|
||||
self.start_with_jewelry_box.value = self.StartWithJewelryBox.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.DownloadableItems != DownloadableItems.default and \
|
||||
self.downloadable_items == DownloadableItems.default:
|
||||
self.downloadable_items.value = self.DownloadableItems.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.EyeSpy != EyeSpy.default and \
|
||||
self.eye_spy == EyeSpy.default:
|
||||
self.eye_spy.value = self.EyeSpy.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.StartWithMeyef != StartWithMeyef.default and \
|
||||
self.start_with_meyef == StartWithMeyef.default:
|
||||
self.start_with_meyef.value = self.StartWithMeyef.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.QuickSeed != QuickSeed.default and \
|
||||
self.quick_seed == QuickSeed.default:
|
||||
self.quick_seed.value = self.QuickSeed.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.SpecificKeycards != SpecificKeycards.default and \
|
||||
self.specific_keycards == SpecificKeycards.default:
|
||||
self.specific_keycards.value = self.SpecificKeycards.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.Inverted != Inverted.default and \
|
||||
self.inverted == Inverted.default:
|
||||
self.inverted.value = self.Inverted.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.GyreArchives != GyreArchives.default and \
|
||||
self.gyre_archives == GyreArchives.default:
|
||||
self.gyre_archives.value = self.GyreArchives.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.Cantoran != Cantoran.default and \
|
||||
self.cantoran == Cantoran.default:
|
||||
self.cantoran.value = self.Cantoran.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.LoreChecks != LoreChecks.default and \
|
||||
self.lore_checks == LoreChecks.default:
|
||||
self.lore_checks.value = self.LoreChecks.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.BossRando != BossRando.default and \
|
||||
self.boss_rando == BossRando.default:
|
||||
self.boss_rando.value = self.BossRando.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.DamageRando != DamageRando.default and \
|
||||
self.damage_rando == DamageRando.default:
|
||||
self.damage_rando.value = self.DamageRando.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.DamageRandoOverrides != DamageRandoOverrides.default and \
|
||||
self.damage_rando_overrides == DamageRandoOverrides.default:
|
||||
self.damage_rando_overrides.value = self.DamageRandoOverrides.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.HpCap != HpCap.default and \
|
||||
self.hp_cap == HpCap.default:
|
||||
self.hp_cap.value = self.HpCap.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.LevelCap != LevelCap.default and \
|
||||
self.level_cap == LevelCap.default:
|
||||
self.level_cap.value = self.LevelCap.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.ExtraEarringsXP != ExtraEarringsXP.default and \
|
||||
self.extra_earrings_xp == ExtraEarringsXP.default:
|
||||
self.extra_earrings_xp.value = self.ExtraEarringsXP.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.BossHealing != BossHealing.default and \
|
||||
self.boss_healing == BossHealing.default:
|
||||
self.boss_healing.value = self.BossHealing.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.ShopFill != ShopFill.default and \
|
||||
self.shop_fill == ShopFill.default:
|
||||
self.shop_fill.value = self.ShopFill.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.ShopWarpShards != ShopWarpShards.default and \
|
||||
self.shop_warp_shards == ShopWarpShards.default:
|
||||
self.shop_warp_shards.value = self.ShopWarpShards.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.ShopMultiplier != ShopMultiplier.default and \
|
||||
self.shop_multiplier == ShopMultiplier.default:
|
||||
self.shop_multiplier.value = self.ShopMultiplier.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.LootPool != LootPool.default and \
|
||||
self.loot_pool == LootPool.default:
|
||||
self.loot_pool.value = self.LootPool.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.DropRateCategory != DropRateCategory.default and \
|
||||
self.drop_rate_category == DropRateCategory.default:
|
||||
self.drop_rate_category.value = self.DropRateCategory.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.FixedDropRate != FixedDropRate.default and \
|
||||
self.fixed_drop_rate == FixedDropRate.default:
|
||||
self.fixed_drop_rate.value = self.FixedDropRate.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.LootTierDistro != LootTierDistro.default and \
|
||||
self.loot_tier_distro == LootTierDistro.default:
|
||||
self.loot_tier_distro.value = self.LootTierDistro.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.ShowBestiary != ShowBestiary.default and \
|
||||
self.show_bestiary == ShowBestiary.default:
|
||||
self.show_bestiary.value = self.ShowBestiary.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.ShowDrops != ShowDrops.default and \
|
||||
self.show_drops == ShowDrops.default:
|
||||
self.show_drops.value = self.ShowDrops.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.EnterSandman != EnterSandman.default and \
|
||||
self.enter_sandman == EnterSandman.default:
|
||||
self.enter_sandman.value = self.EnterSandman.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.DadPercent != DadPercent.default and \
|
||||
self.dad_percent == DadPercent.default:
|
||||
self.dad_percent.value = self.DadPercent.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.RisingTides != RisingTides.default and \
|
||||
self.rising_tides == RisingTides.default:
|
||||
self.rising_tides.value = self.RisingTides.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.RisingTidesOverrides != RisingTidesOverrides.default and \
|
||||
self.rising_tides_overrides == RisingTidesOverrides.default:
|
||||
self.rising_tides_overrides.value = self.RisingTidesOverrides.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.UnchainedKeys != UnchainedKeys.default and \
|
||||
self.unchained_keys == UnchainedKeys.default:
|
||||
self.unchained_keys.value = self.UnchainedKeys.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.PresentAccessWithWheelAndSpindle != PresentAccessWithWheelAndSpindle.default and \
|
||||
self.back_to_the_future == PresentAccessWithWheelAndSpindle.default:
|
||||
self.back_to_the_future.value = self.PresentAccessWithWheelAndSpindle.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.TrapChance != TrapChance.default and \
|
||||
self.trap_chance == TrapChance.default:
|
||||
self.trap_chance.value = self.TrapChance.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.Traps != Traps.default and \
|
||||
self.traps == Traps.default:
|
||||
self.traps.value = self.Traps.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
if self.DeathLink != DeathLink.default and \
|
||||
self.death_link == DeathLink.default:
|
||||
self.death_link.value = self.DeathLink.value
|
||||
self.has_replaced_options.value = Toggle.option_true
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user