Merge branch 'OverworldShuffleDev' into OverworldShuffle

This commit is contained in:
codemann8
2023-03-12 21:57:56 -05:00
7 changed files with 28 additions and 21 deletions

View File

@@ -1,5 +1,10 @@
# Changelog
## 0.3.0.3
- Fixed issue with new Cold Fairy Statue location not dropping correct item
- Fixed issue with Multiworld due to new Cold Fairy Statue location
- Improved water collision to only target Heart Piece sprites (rando items)
## 0.3.0.2
- \~Merged in DR v1.2.0.12~
- Fixed some door landing issues

View File

@@ -144,6 +144,7 @@ location_table_uw = {"Blind's Hideout - Top": (0x11d, 0x10),
'Mini Moldorm Cave - Far Right': (0x123, 0x80),
'Mini Moldorm Cave - Generous Guy': (0x123, 0x400),
'Ice Rod Cave': (0x120, 0x10),
'Cold Fairy Statue': (0x120, 0x200),
'Bonk Rock Cave': (0x124, 0x10),
'Desert Palace - Big Chest': (0x73, 0x10),
'Desert Palace - Torch': (0x73, 0x400),
@@ -936,10 +937,11 @@ async def track_locations(ctx : Context, roomid, roomdata):
from OWEdges import OWTileRegions
for location, (_, flag, _, _, region_name, _) in bonk_prize_table.items():
if location not in ctx.locations_checked:
screenid = OWTileRegions[region_name]
ow_unchecked[location] = (screenid, flag)
ow_begin = min(ow_begin, screenid)
ow_end = max(ow_end, screenid + 1)
if region_name in OWTileRegions:
screenid = OWTileRegions[region_name]
ow_unchecked[location] = (screenid, flag)
ow_begin = min(ow_begin, screenid)
ow_end = max(ow_end, screenid + 1)
if ow_begin < ow_end:
ow_data = await snes_read(ctx, SAVEDATA_START + 0x280 + ow_begin, ow_end - ow_begin)
if ow_data is not None:

View File

@@ -148,7 +148,7 @@ def get_boots_clip_exits_lw(world, player):
for names, parent_regions, target_regions in boots_clips:
region_pair = get_world_pair(world, player, get_region_pairs(world, player, names, parent_regions, target_regions), True)
if region_pair and region_pair[2]:
assert(region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}')
assert region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}'
yield(region_pair[0], region_pair[1], region_pair[2])
@@ -164,7 +164,7 @@ def get_boots_clip_exits_dw(world, player):
for names, parent_regions, target_regions in boots_clips:
region_pair = get_world_pair(world, player, get_region_pairs(world, player, names, parent_regions, target_regions), False)
if region_pair and region_pair[2]:
assert(region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}')
assert region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}'
yield(region_pair[0], region_pair[1], region_pair[2])
@@ -191,7 +191,7 @@ def get_mirror_clip_spots(world, player):
for names, parent_regions, target_regions in mirror_clips:
region_pair = get_world_pair(world, player, get_region_pairs(world, player, names, parent_regions, target_regions), False)
if region_pair and region_pair[2] and not world.is_tile_lw_like(OWTileRegions[region_pair[1]], player):
assert(region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}')
assert region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}'
yield(region_pair[0], region_pair[1], region_pair[2])
@@ -205,7 +205,7 @@ def get_mirror_offset_spots(world, player):
for names, parent_regions, target_regions, path_to in mirror_offsets:
region_pair = get_world_pair(world, player, get_region_pairs(world, player, names, parent_regions, target_regions, path_to), False)
if region_pair and region_pair[2] and not world.is_tile_lw_like(OWTileRegions[region_pair[1]], player):
assert(region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}')
assert region_pair[0], f'Exit name missing in OWG pairing from {region_pair[1]} to {region_pair[2]}'
yield(region_pair[0], region_pair[1], region_pair[2], region_pair[3])

View File

@@ -7,7 +7,7 @@ from OWEdges import OWTileRegions, OWEdgeGroups, OWEdgeGroupsTerrain, OWExitType
from OverworldGlitchRules import create_owg_connections
from Utils import bidict
version_number = '0.3.0.2'
version_number = '0.3.0.3'
# branch indicator is intentionally different across branches
version_branch = ''

5
Rom.py
View File

@@ -38,7 +38,7 @@ from source.dungeon.RoomList import Room0127
JAP10HASH = '03a63945398191337e896e5771f77173'
RANDOMIZERBASEHASH = '4458a348e3040d79d0e28d572579fcb5'
RANDOMIZERBASEHASH = 'c27bdd316ea8312214643e0a4ea32c10'
class JsonRom(object):
@@ -1651,7 +1651,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
if world.shuffle_bonk_drops[player]:
# warning, this temporary patch might cause fairies to respawn differently?, limiting this to bonk drop mode only
rom.write_byte(snes_to_pc(0x0DB808), 0x03) # patch fairies sprites to not permadeath like enemies
rom.write_byte(snes_to_pc(0x1DF6D8), 0) # allows sprites to travel across water / same flag as write_enemizer_tweaks
rom.write_byte(snes_to_pc(0x0DB810), 0x8A) # allows heart pieces to travel across water
# rom.write_byte(snes_to_pc(0x0DB730), 0x08) # allows chickens to travel across water
# allow smith into multi-entrance caves in appropriate shuffles
if world.shuffle[player] in ['restricted', 'full', 'lite', 'lean', 'crossed', 'insanity'] or (world.shuffle[player] == 'simple' and world.mode[player] == 'inverted'):

View File

@@ -416,13 +416,13 @@ OWBonkGoodBeeDrop:
LDA.l RoomDataWRAM[$0120].high : AND.b #$02 : PHA : BNE + ; check if collected
LDA.b #$1B : STA $12F ; JSL Sound_SetSfx3PanLong ; seems that when you bonk, there is a pending bonk sfx, so we clear that out and replace with reveal secret sfx
+
LDA.l OWBonkPrizeData+(42*6+4) : BEQ + ; multiworld item
LDA.l OWBonkPrizeData+(42*6+3)
LDA.l OWBonkPrizeTable[42].mw_player : BEQ + ; multiworld item
LDA.l OWBonkPrizeTable[42].loot
JMP .spawn_item
+
.determine_type ; S = Collected, FlagBitmask, X (row + 2)
LDA.l OWBonkPrizeData+(42*6+3) ; A = item id
LDA.l OWBonkPrizeTable[42].loot ; A = item id
CMP.b #$B0 : BNE +
LDA.b #$79 : JMP .sprite_transform ; transform to bees
+ CMP.b #$42 : BNE +
@@ -455,7 +455,7 @@ OWBonkGoodBeeDrop:
+ CMP.b #$B2 : BNE +
LDA.b #$E3 : BRA .sprite_transform ; transform to fairy
+ CMP.b #$B3 : BNE .spawn_item
INX : INX : LDA.l OWBonkPrizeData+(42*6+5)
INX : INX : LDA.l OWBonkPrizeTable[42].vert_offset
CLC : ADC.b #$08 : PHA
LDA.w $0D00,Y : SEC : SBC.b 1,S : STA.w $0D00,Y
LDA.w $0D20,Y : SBC.b #$00 : STA.w $0D20,Y : PLX
@@ -469,14 +469,14 @@ OWBonkGoodBeeDrop:
LDA.l RoomDataWRAM[$0120].high : ORA.b #$02 : STA.l RoomDataWRAM[$0120].high
REP #$20
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter
SEP #$20
BRA .return
; spawn itemget item
.spawn_item ; A = item id ; Y = bonk sprite slot ; S = Collected
PLX : BEQ + : LDA.b #$00 : STA.w $0DD0,Y : BRA .return
+ LDA.l OWBonkPrizeData+(42*6+4) : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
+ LDA.l OWBonkPrizeTable[42].mw_player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDA.b #$01 : STA !REDRAW
@@ -494,10 +494,10 @@ OWBonkGoodBeeDrop:
LDA.b #$00 : STA.w $0F20,Y ; layer the sprite is on
; sets OW event bitmask flag, uses free RAM
LDA.l OWBonkPrizeData+(42*6+2) : STA.w $0ED0,Y
LDA.l OWBonkPrizeTable[42].flag : STA.w $0ED0,Y
; determines the initial spawn point of item
LDA.w $0D00,Y : SEC : SBC.l OWBonkPrizeData+(42*6+5) : STA.w $0D00,Y
LDA.w $0D00,Y : SEC : SBC.l OWBonkPrizeTable[42].vert_offset : STA.w $0D00,Y
LDA.w $0D20,Y : SBC #$00 : STA.w $0D20,Y
LDA.b #$01 : STA !REDRAW : STA !FORCE_HEART_SPAWN
@@ -506,7 +506,6 @@ OWBonkGoodBeeDrop:
PLY
LDA #$08 ; makes original good bee not spawn
RTL
nop #20
}
; Y = sprite slot index of bonk sprite
@@ -591,7 +590,7 @@ OWBonkDrops:
LDX.b $8A : LDA.l OverworldEventDataWRAM,X : ORA 1,S : STA.l OverworldEventDataWRAM,X
REP #$20
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter
LDA.l TotalItemCounter : INC : STA.l TotalItemCounter
SEP #$20
+ JMP .return

Binary file not shown.