Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fourkeys mode for Frue derived ROMs + VIP Card/Door Key naming fix #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions randomizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6423,6 +6423,8 @@ def make_four_keys():
assert 1 <= opcode <= 6 or opcode == 0x40
key_index = script.script[0][2][0]
key = ItemObject.get(key_index)
if key.name.upper() in ['DOOR KEY', 'VIP CARD']:
continue
key.set_name('Useless key')
locations = [loc for loc in keydict if key in keydict[loc]]
if not locations:
Expand Down Expand Up @@ -6874,9 +6876,14 @@ class VanillaObject(TableObject):


def get_keydict():
tower = {'sky', 'wind', 'cloud', 'light', 'trial', 'truth', 'narcysus'}
frue = bool(re.search(r'FRUE|KUREJI|SPEKKIO', get_global_label()))
narcysus_name = 'sacral' if frue else 'narcysus'
gratze_name = 'jail' if frue else 'basement'
dankirk_name = 'angel' if frue else 'dankirk'

tower = {'sky', 'wind', 'cloud', 'light', 'trial', 'truth', narcysus_name}
shrine = {'sword', 'heart', 'ghost'}
dungeon = {'lake', 'ruby', 'dankirk', 'basement', 'ancient'}
dungeon = {'lake', 'ruby', 'ancient', dankirk_name, gratze_name}
mountain = {'magma', 'flower', 'tree'}

keys = lange(0x1af, 0x1c0) + [0x1c2]
Expand Down