Replace teleporters that can't be placed with red rupees

This commit is contained in:
2025-03-05 19:23:40 -06:00
parent 88224a5aca
commit 1df52ecf6e
4 changed files with 11 additions and 6 deletions

View File

@@ -216,6 +216,11 @@ class World(object):
self.state.collect(item, location.event, location) self.state.collect(item, location.event, location)
logging.getLogger('').debug('Placed %s at %s', item, location) logging.getLogger('').debug('Placed %s at %s', item, location)
else:
if item.name == 'Teleporter':
from Items import ItemFactory
print('Cannot assign item %s to location %s, replacing with red rupee.' % (item, location))
self.push_item(location, ItemFactory('Rupees (20)', item.player), collect)
else: else:
raise RuntimeError('Cannot assign item %s to location %s.' % (item, location)) raise RuntimeError('Cannot assign item %s to location %s.' % (item, location))

View File

@@ -22,7 +22,7 @@ normalbottles = ['Bottle', 'Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bott
hardbottles = ['Bottle', 'Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Bee)', 'Bottle (Good Bee)'] hardbottles = ['Bottle', 'Bottle (Red Potion)', 'Bottle (Green Potion)', 'Bottle (Blue Potion)', 'Bottle (Bee)', 'Bottle (Good Bee)']
normalbaseitems = (['Sanctuary Heart Container', 'Bombs (10)'] + normalbaseitems = (['Sanctuary Heart Container', 'Bombs (10)'] +
['Rupees (300)'] * 4 + ['Boss Heart Container'] * 11 + ['Piece of Heart'] * 20) ['Rupees (300)'] * 4 + ['Boss Heart Container'] * 12 + ['Piece of Heart'] * 16)
expertbaseitems = (['Sanctuary Heart Container', 'Bombs (10)'] + expertbaseitems = (['Sanctuary Heart Container', 'Bombs (10)'] +
['Rupees (300)'] * 4 + ['Boss Heart Container'] * 10 + ['Piece of Heart'] * 24) ['Rupees (300)'] * 4 + ['Boss Heart Container'] * 10 + ['Piece of Heart'] * 24)
normalfirst15extra = ['Rupees (100)', 'Rupees (300)', 'Rupees (50)'] + ['Bombs (3)'] * 6 normalfirst15extra = ['Rupees (100)', 'Rupees (300)', 'Rupees (50)'] + ['Bombs (3)'] * 6
@@ -56,7 +56,7 @@ difficulties = {
basicbow = ['Bow', 'Silver Arrows'], basicbow = ['Bow', 'Silver Arrows'],
magicitems = ['Bombos', 'Bombos', 'Cane of Somaria', 'Ether', 'Ether', 'Fire Rod', 'Ice Rod', 'Lamp', 'Cape', 'Cape', magicitems = ['Bombos', 'Bombos', 'Cane of Somaria', 'Ether', 'Ether', 'Fire Rod', 'Ice Rod', 'Lamp', 'Cape', 'Cape',
'Quake', 'Quake', 'Cane of Byrna'], 'Quake', 'Quake', 'Cane of Byrna'],
teleporters = 10, teleporters = 13,
retro = ['Small Key (Universal)'] * 17 + ['Rupees (20)'] * 10, retro = ['Small Key (Universal)'] * 17 + ['Rupees (20)'] * 10,
extras = [normalfirst15extra, normalsecond15extra, normalthird10extra, normalfourth5extra, normalfinal25extra], extras = [normalfirst15extra, normalsecond15extra, normalthird10extra, normalfourth5extra, normalfinal25extra],
progressive_sword_limit = 4, progressive_sword_limit = 4,
@@ -78,7 +78,7 @@ difficulties = {
progressivesword = ['Progressive Sword'] * 3, progressivesword = ['Progressive Sword'] * 3,
basicbow = ['Bow'] * 2, basicbow = ['Bow'] * 2,
magicitems = ['Bombos', 'Cane of Somaria', 'Ether', 'Fire Rod', 'Ice Rod', 'Cape', 'Quake', 'Cane of Byrna'], magicitems = ['Bombos', 'Cane of Somaria', 'Ether', 'Fire Rod', 'Ice Rod', 'Cape', 'Quake', 'Cane of Byrna'],
teleporters = 15, teleporters = 18,
retro = ['Small Key (Universal)'] * 12 + ['Rupees (5)'] * 15, retro = ['Small Key (Universal)'] * 12 + ['Rupees (5)'] * 15,
extras = [normalfirst15extra, normalsecond15extra, normalthird10extra, normalfourth5extra, normalfinal25extra], extras = [normalfirst15extra, normalsecond15extra, normalthird10extra, normalfourth5extra, normalfinal25extra],
progressive_sword_limit = 3, progressive_sword_limit = 3,

2
Rom.py
View File

@@ -19,7 +19,7 @@ from EntranceShuffle import door_addresses
JAP10HASH = '03a63945398191337e896e5771f77173' JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = 'a56edc4d337ec48eefefabf82c4f8695' RANDOMIZERBASEHASH = 'afc388f2f389b3bd4378210042e6590b'
class JsonRom(object): class JsonRom(object):

File diff suppressed because one or more lines are too long