Removed "good bee" from Mothula logic

Fixed an issue with Mystery generation and windows file path
This commit is contained in:
aerinon
2022-08-24 15:00:48 -06:00
parent 5d419210af
commit 0dfdbfd39e
4 changed files with 19 additions and 18 deletions

View File

@@ -1093,16 +1093,16 @@ class CollectionState(object):
return self.has('Bow', player) and (self.can_buy_unlimited('Single Arrow', player) or self.has('Single Arrow', player)) return self.has('Bow', player) and (self.can_buy_unlimited('Single Arrow', player) or self.has('Single Arrow', player))
return self.has('Bow', player) return self.has('Bow', player)
def can_get_good_bee(self, player): # def can_get_good_bee(self, player):
cave = self.world.get_region('Good Bee Cave', player) # cave = self.world.get_region('Good Bee Cave', player)
return ( # return (
self.can_use_bombs(player) and # self.can_use_bombs(player) and
self.has_bottle(player) and # self.has_bottle(player) and
self.has('Bug Catching Net', player) and # self.has('Bug Catching Net', player) and
(self.has_Boots(player) or (self.has_sword(player) and self.has('Quake', player))) and # (self.has_Boots(player) or (self.has_sword(player) and self.has('Quake', player))) and
cave.can_reach(self) and # cave.can_reach(self) and
self.is_not_bunny(cave, player) # self.is_not_bunny(cave, player)
) # )
def has_sword(self, player): def has_sword(self, player):
return self.has('Fighter Sword', player) or self.has('Master Sword', player) or self.has('Tempered Sword', player) or self.has('Golden Sword', player) return self.has('Fighter Sword', player) or self.has('Master Sword', player) or self.has('Tempered Sword', player) or self.has('Golden Sword', player)

View File

@@ -61,8 +61,7 @@ def MothulaDefeatRule(state, player):
# TODO: Not sure how much (if any) extend magic is needed for these two, since they only apply # TODO: Not sure how much (if any) extend magic is needed for these two, since they only apply
# to non-vanilla locations, so are harder to test, so sticking with what VT has for now: # to non-vanilla locations, so are harder to test, so sticking with what VT has for now:
(state.has('Cane of Somaria', player) and state.can_extend_magic(player, 16)) or (state.has('Cane of Somaria', player) and state.can_extend_magic(player, 16)) or
(state.has('Cane of Byrna', player) and state.can_extend_magic(player, 16)) or (state.has('Cane of Byrna', player) and state.can_extend_magic(player, 16))
state.can_get_good_bee(player)
) )
def BlindDefeatRule(state, player): def BlindDefeatRule(state, player):

View File

@@ -1,5 +1,7 @@
import argparse import argparse
import logging import logging
from pathlib import Path
import os
import RaceRandom as random import RaceRandom as random
import urllib.request import urllib.request
import urllib.parse import urllib.parse
@@ -104,13 +106,11 @@ def main():
DRMain(erargs, seed, BabelFish()) DRMain(erargs, seed, BabelFish())
def get_weights(path): def get_weights(path):
try: if os.path.exists(Path(path)):
if urllib.parse.urlparse(path).scheme: with open(path, "r", encoding="utf-8") as f:
return yaml.load(urllib.request.urlopen(path), Loader=yaml.FullLoader)
with open(path, 'r', encoding='utf-8') as f:
return yaml.load(f, Loader=yaml.SafeLoader) return yaml.load(f, Loader=yaml.SafeLoader)
except Exception as e: elif urllib.parse.urlparse(path).scheme in ['http', 'https']:
raise Exception(f'Failed to read weights file: {e}') return yaml.load(urllib.request.urlopen(path), Loader=yaml.FullLoader)
def roll_settings(weights): def roll_settings(weights):
def get_choice(option, root=None): def get_choice(option, root=None):

View File

@@ -184,6 +184,8 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o
#### Unstable #### Unstable
* 1.0.1.2 * 1.0.1.2
* Removed "good bee" as an in-logic way of killing Mothula
* Fixed an issue with Mystery generation and Windows path
* Fixed an issue with small key bias rework * Fixed an issue with small key bias rework
* Fixed an issue where trinity goal would open pyramid unexpectedly. (No longer does so if ER mdoe is shuffling holes). Crystals goal updated to match that behavior. * Fixed an issue where trinity goal would open pyramid unexpectedly. (No longer does so if ER mdoe is shuffling holes). Crystals goal updated to match that behavior.
* Fixed a playthrough issue that was not respecting pot rules * Fixed a playthrough issue that was not respecting pot rules