Skip to content

Commit

Permalink
disable getting items while riding a ride armor
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLX5 committed May 23, 2024
1 parent 0ed8bd3 commit 1b01c43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion worlds/mmx3/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
MMX3_ACTIVE_CHARACTER = WRAM_START + 0x00A8E
MMX3_ZSABER = WRAM_START + 0x01FB2
MMX3_CAN_MOVE = WRAM_START + 0x01F45
MMX3_ON_RIDE_ARMOR = WRAM_START + 0x01F22
MMX3_GOING_THROUGH_GATE = WRAM_START + 0x01F25
MMX3_HYPER_CANNON = WRAM_START + 0x01FCC
MMX3_VICTORY = WRAM_START + 0x0F46B
Expand Down Expand Up @@ -360,17 +361,18 @@ async def handle_item_queue(self, ctx):
self.item_queue.pop(0)
return


# Do not give items if you can't move, are in pause state, not in the correct mode or not in gameplay state
receiving_item = await snes_read(ctx, MMX3_RECEIVING_ITEM, 0x1)
menu_state = await snes_read(ctx, MMX3_MENU_STATE, 0x1)
gameplay_state = await snes_read(ctx, MMX3_GAMEPLAY_STATE, 0x1)
can_move = await snes_read(ctx, MMX3_CAN_MOVE, 0x1)
on_ride_armor = await snes_read(ctx, MMX3_ON_RIDE_ARMOR, 0x1)
going_through_gate = await snes_read(ctx, MMX3_GOING_THROUGH_GATE, 0x4)
pause_state = await snes_read(ctx, MMX3_PAUSE_STATE, 0x1)
if menu_state[0] != 0x04 or \
gameplay_state[0] != 0x04 or \
can_move[0] != 0x00 or \
on_ride_armor[0] == 0x0A or \
pause_state[0] != 0x00 or \
receiving_item[0] != 0x00 or \
going_through_gate != b'\x00\x00\x00\x00':
Expand Down

0 comments on commit 1b01c43

Please sign in to comment.