|
43 | 43 |
|
44 | 44 |
|
45 | 45 | JAP10HASH = '03a63945398191337e896e5771f77173' |
46 | | -RANDOMIZERBASEHASH = '72c4b2d00057d1faced32871d8081f3a' |
| 46 | +RANDOMIZERBASEHASH = '2039c11b935d3b81f78810d9f4be19d6' |
47 | 47 |
|
48 | 48 |
|
49 | 49 | class JsonRom(object): |
@@ -1270,8 +1270,11 @@ def get_goal_bytes(type): |
1270 | 1270 | goal_bytes += [req['target']] |
1271 | 1271 | else: |
1272 | 1272 | goal_bytes += int16_as_bytes(req['target']) |
1273 | | - elif 'target' in req: |
1274 | | - if req['condition'] & 0x7F < 0x08: |
| 1273 | + elif req['condition'] & 0x80 == 0: |
| 1274 | + if req['condition'] & 0x7F == 0x06 or req['condition'] & 0x7F == 0x07: |
| 1275 | + # agahnims have no target value |
| 1276 | + pass |
| 1277 | + elif req['condition'] & 0x7F < 0x08: |
1275 | 1278 | goal_bytes += [req['target']] |
1276 | 1279 | else: |
1277 | 1280 | goal_bytes += int16_as_bytes(req['target']) |
@@ -1338,12 +1341,19 @@ def get_goal_bytes(type): |
1338 | 1341 | if start_address > 0x81D8: |
1339 | 1342 | raise Exception("Custom Goal data too long to fit in allocated space, try reducing the amount of requirements.") |
1340 | 1343 |
|
1341 | | - # gt entry |
1342 | | - gtentry = world.custom_goals[player]['gtentry'] |
1343 | | - if gtentry and 'cutscene_gfx' in gtentry: |
1344 | | - gfx = gtentry['cutscene_gfx'] |
1345 | | - write_int16(rom, snes_to_pc(0x3081D8), gfx[0]) |
1346 | | - rom.write_byte(snes_to_pc(0x3081E6), gfx[1]) |
| 1344 | + # goal cutscene gfx |
| 1345 | + goals = { |
| 1346 | + #goal: gfx addr, palette addr |
| 1347 | + 'gtentry': (0x3081D8, 0x3081E6), |
| 1348 | + 'pedgoal': (0x3081ED, 0x3081F3), |
| 1349 | + 'murahgoal': (0x3081F6, 0x3081FC), |
| 1350 | + } |
| 1351 | + for goal_type, gfx_addr in goals.items(): |
| 1352 | + goal = world.custom_goals[player][goal_type] |
| 1353 | + if goal and 'cutscene_gfx' in goal: |
| 1354 | + gfx = goal['cutscene_gfx'] |
| 1355 | + write_int16(rom, snes_to_pc(gfx_addr[0]), gfx[0]) |
| 1356 | + rom.write_byte(snes_to_pc(gfx_addr[1]), gfx[1]) |
1347 | 1357 |
|
1348 | 1358 | # block HC upstairs doors in rain state in standard mode |
1349 | 1359 | prevent_rain = world.mode[player] == 'standard' and world.shuffle[player] != 'vanilla' and world.logic[player] != 'nologic' |
@@ -1751,7 +1761,7 @@ def get_reveal_bytes(itemName): |
1751 | 1761 | gen, seedstring = rom_header.split('|', 1) |
1752 | 1762 | gen = f'{gen:<3}' |
1753 | 1763 | seedstring = f'{int(seedstring):09}' if seedstring.isdigit() else seedstring[:9] |
1754 | | - rom.name = bytearray(f'{gen}_{team+1}_{player}_{seedstring}\0', 'utf8')[:21] |
| 1764 | + rom.name = bytearray(f'OR{gen}_{team+1}_{player}_{seedstring}\0', 'utf8')[:21] |
1755 | 1765 | elif len(rom_header) <= 9: |
1756 | 1766 | seedstring = f'{int(rom_header):09}' if rom_header.isdigit() else rom_header |
1757 | 1767 | rom.name = bytearray(f'OR{__version__.split("-")[0].replace(".","")[0:3]}_{team+1}_{player}_{seedstring}\0', 'utf8')[:21] |
@@ -2581,8 +2591,10 @@ def missing_prize(): |
2581 | 2591 |
|
2582 | 2592 | def get_custom_goal_text(type): |
2583 | 2593 | goal_text = world.custom_goals[player][type]['goaltext'] |
2584 | | - if '%d' in goal_text: |
2585 | | - return goal_text % world.custom_goals[player][type]['requirements'][0]['target'] |
| 2594 | + placeholder_count = goal_text.count('%d') |
| 2595 | + if placeholder_count > 0: |
| 2596 | + targets = [req['target'] for req in world.custom_goals[player][type]['requirements'] if 'target' in req][:placeholder_count] |
| 2597 | + return goal_text % tuple(targets) |
2586 | 2598 | return goal_text |
2587 | 2599 |
|
2588 | 2600 | if world.custom_goals[player]['gtentry'] and 'goaltext' in world.custom_goals[player]['gtentry']: |
|
0 commit comments