Mostly a fix for Blind outside of TT when Blind is the boss of TT (boss enemizer)

Remove RaceRandom use for now
This commit is contained in:
aerinon
2021-02-27 15:33:05 -07:00
parent 7c35b4d14e
commit 6a5bdbee6b
10 changed files with 23 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
import logging
import RaceRandom as random
import random
from BaseClasses import Boss
from Fill import FillError

View File

@@ -1,4 +1,4 @@
import RaceRandom as random
import random
from BaseClasses import Dungeon
from Bosses import BossFactory

View File

@@ -1,4 +1,4 @@
import RaceRandom as random
import random
# ToDo: With shuffle_ganon option, prevent gtower from linking to an exit only location through a 2 entrance cave.
from collections import defaultdict

View File

@@ -1,4 +1,4 @@
import RaceRandom as random
import random
import logging
from BaseClasses import CollectionState

View File

@@ -2,7 +2,6 @@ from collections import namedtuple
import logging
import math
import random
import RaceRandom as random
from BaseClasses import Region, RegionType, Shop, ShopType, Location
from Bosses import place_bosses

View File

@@ -4,7 +4,7 @@ from itertools import zip_longest
import json
import logging
import os
import RaceRandom as random
import random
import time
import zlib
@@ -26,7 +26,7 @@ from Fill import sell_potions, sell_keys, balance_multiworld_progression, balanc
from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops
from Utils import output_path, parse_player_names
__version__ = '0.3.1.3-u'
__version__ = '0.3.1.4-u'
class EnemizerError(RuntimeError):
@@ -40,8 +40,8 @@ def main(args, seed=None, fish=None):
start = time.perf_counter()
if args.securerandom:
random.use_secure()
# if args.securerandom:
# random.use_secure()
# initialize the world
if args.code:

View File

@@ -3,7 +3,7 @@ import argparse
import hashlib
import logging
import os
import RaceRandom as random
import random
import time
import sys

View File

@@ -128,6 +128,10 @@ New item counter modified to show total
# Bug Fixes and Notes.
* 0.3.1.4-u
* Fix for Blind when shuffled to TT and another dungeon
* Remove use of RaceRandom
* Minor update to GameType field
* 0.3.1.3-u
* Fix for the Rom field on the GUI
* 0.3.1.2-u

18
Rom.py
View File

@@ -5,7 +5,7 @@ import json
import hashlib
import logging
import os
import RaceRandom as random
import random
import struct
import sys
import subprocess
@@ -27,7 +27,7 @@ from EntranceShuffle import door_addresses, exit_ids
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '633051ea43b6f6f971a32ed3e0a1bf5e'
RANDOMIZERBASEHASH = '2a9cd9b95c0ad118a3d58a77b7197eab'
class JsonRom(object):
@@ -312,8 +312,10 @@ def patch_enemizer(world, player, rom, baserom_path, enemizercli, random_sprite_
if world.get_dungeon("Thieves Town", player).boss.enemizer_name == "Blind":
rom.write_byte(0x04DE81, 0x6) # maiden spawn
# restore blind spawn code
rom.write_bytes(0xEA081, [0xaf, 0xcc, 0xf3, 0x7e, 0xc9, 0x6, 0xf0, 0x24,
# restore blind spawn code - necessary because the old enemizer clobbers this stuff
# this line could be commented out if ijwu's enemizer is used exclusively
# if keeping this line, note the jump to the dr_baserom's enemizer section
rom.write_bytes(0xEA081, [0x5c, 0x00, 0x80, 0xb7, 0xc9, 0x6, 0xf0, 0x24,
0xad, 0x3, 0x4, 0x29, 0x20, 0xf0, 0x1d])
rom.write_byte(0x200101, 0) # Do not close boss room door on entry.
@@ -1119,11 +1121,11 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
rom.write_bytes(0x180213, [0x00, 0x01]) # Not a Tournament Seed
gametype = 0x04 # item
if world.shuffle[player] != 'vanilla':
gametype |= 0x02 # entrance
if world.shuffle[player] != 'vanilla' or world.doorShuffle[player] != 'vanilla' or world.keydropshuffle[player]:
gametype |= 0x02 # entrance/door
if enemized:
gametype |= 0x01 # enemizer
rom.write_byte(0x180211, gametype) # Game type
gametype |= 0x01 # enemizer
rom.write_byte(0x180211, gametype) # Game type
# assorted fixes
rom.write_byte(0x1800A2, 0x01) # remain in real dark world when dying in dark world dungeon before killing aga1

Binary file not shown.