mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Removed remnants of team stuff, make hide_goal default
This commit is contained in:
10
Rom.py
10
Rom.py
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
JAP10HASH = '03a63945398191337e896e5771f77173'
|
||||
RANDOMIZERBASEHASH = '93538d51eb018955a90181600e3384ba'
|
||||
RANDOMIZERBASEHASH = '9cbbc0876dd5748125eda8b315347ad2'
|
||||
|
||||
import io
|
||||
import json
|
||||
@@ -110,7 +110,6 @@ class LocalRom(object):
|
||||
|
||||
@staticmethod
|
||||
def verify(buffer, expected: str = RANDOMIZERBASEHASH) -> bool:
|
||||
return True
|
||||
buffermd5 = hashlib.md5()
|
||||
buffermd5.update(buffer)
|
||||
return expected == buffermd5.hexdigest()
|
||||
@@ -1106,10 +1105,6 @@ def patch_rom(world, rom, player, team, enemized):
|
||||
# set up goals for treasure hunt
|
||||
rom.write_bytes(0x180163, [0x0E, 0x28] if world.treasure_hunt_icon[player] == 'Triforce Piece' else [0x0D, 0x28])
|
||||
rom.write_int16(0x180166, world.treasure_hunt_count[player])
|
||||
if 'local' in world.goal[player]:
|
||||
total_treasures = sum([world.treasure_hunt_count[x] for x in range(1, world.players + 1)])
|
||||
rom.write_byte(0x180165, rom.read_byte(0x180165) | 0x80)
|
||||
rom.write_int16(0x180166, total_treasures)
|
||||
rom.write_byte(0x180194, 1) # Must turn in triforced pieces (instant win not enabled)
|
||||
|
||||
rom.write_bytes(0x180213, [0x00, 0x01]) # Not a Tournament Seed
|
||||
@@ -1664,7 +1659,8 @@ def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, tri
|
||||
rom.write_byte(0x65561, {'red': 0x05, 'blue': 0x0D, 'green': 0x19, 'yellow': 0x09}[color])
|
||||
|
||||
# set triforcehud
|
||||
triforce_flag = (rom.read_byte(0x180165) & 0x80) | {'normal': 0x00, 'hide_goal': 0x01, 'hide_total': 0x02, 'hide_both': 0x03}[triforcehud]
|
||||
triforce_flag = (rom.read_byte(0x180165) & 0x80) | {'normal': 0x00, 'hide_goal': 0x01, 'hide_required': 0x02, 'hide_both': 0x03}[triforcehud]
|
||||
print(triforcehud, triforce_flag)
|
||||
rom.write_byte(0x180165, triforce_flag)
|
||||
|
||||
if z3pr:
|
||||
|
||||
Reference in New Issue
Block a user