Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Super Mario World's randomizer logic for Chocolate Island 2 Dragon Coins seems incorrect #4082

Open
sugar700 opened this issue Oct 22, 2024 · 2 comments
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world.

Comments

@sugar700
Copy link

sugar700 commented Oct 22, 2024

What happened?

Chocolate Island 2 has the following logic for Dragon Coins:

add_location_to_region(multiworld, player, active_locations, LocationName.chocolate_island_2_region, LocationName.chocolate_island_2_dragon,
lambda state: (state.has(ItemName.blue_switch_palace, player) and
(state.has(ItemName.p_switch, player) or
state.has(ItemName.green_switch_palace, player) or
(state.has(ItemName.yellow_switch_palace, player) or state.has(ItemName.red_switch_palace, player)))))

However, this doesn't seem right to me. The logic if I read it correctly considers Dragon Coins to be possible to obtain if the player has blue switch + yellow switch.

The problem however is that in such a situation, the jump for last dragon coin would be a ten tile jump.

image

I tried performing this jump with 0013E46D Pro Action Replay cheat to simulate the effect of not having Run (it's very similar to what the actual code does: https://github.com/TheLX5/APSMW-BasePatch/blob/8414cdb7559c8b7b3ad8c4e8ba0fc4bcfa0cf0ea/code/abilities.asm#L14), as Run isn't a logic requirement here (with Run it's easy to do a 10 tile jump):

I was barely able to make a 9 tile horizontal jump, but not a 10 tile horizontal jump.

What were the expected results?

It feels like there should be (yellow_switch_palace and red_switch_palace) condition, not (yellow_switch_palace or red_switch_palace) condition. The otherwise unnecessary parentheses suggest that this was the intent.

Software

Website

@sugar700 sugar700 changed the title Bug: Super Mario World's randomizer logic for Chocolate Island 2 seems incorrect Bug: Super Mario World's randomizer logic for Chocolate Island 2 Dragon Coins seems incorrect Oct 22, 2024
@Exempt-Medic
Copy link
Member

@PoryGone

@ScipioWright ScipioWright added is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. labels Jan 13, 2025
@PoryGone
Copy link
Collaborator

The last or should have been an and. I believe this is fixed on a dev branch somewhere. I know I've already looked at this at some point in the last 6 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world.
Projects
None yet
Development

No branches or pull requests

4 participants