Level down to match game mechanics#43
Open
mlyoung25 wants to merge 10 commits intosteiner26:masterfrom
Open
Conversation
rosella500
reviewed
Feb 24, 2025
src/variables.js
Outdated
| Array.from({ length: level }, (_, i) => relative(i + 1, level)) | ||
| ) | ||
| export function levelDown(flippedtiles, level) { | ||
| return max(level-flippedtiles,1) |
There was a problem hiding this comment.
Am I missing something or would this mean flipping 0 tiles is the way to stay at your level, where flipping more would actually guarantee you get sent back down to 1?
return max(min(level,flippedtiles),1) seems like it makes more sense. If you're at level 5, you've flipped 8 tiles, you return to the max of 5 and 1, or stay at level 5. If you're at level 8 and flipped 0 tiles, you return the max of 0 and 1 and fall all the way back to 1.
Author
There was a problem hiding this comment.
Important note here is that you need to count only flipped tiles > 1, but yea you were right
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Steiner,
not sure if this is still maintained as I'm sure its very old but I'm a big fan of your simulator. I use it during classes to pass the time. I wanted to make this simulator more cartridge accurate and slightly less frustrating by making the level down feel more in player control though by making the simulator levelDown function act how it does in game.
"Flipping a Voltorb will cause the player to lose all coins earned during the current string of multipliers and end the game. If the player flipped fewer multiplier cards (including ×1 cards) than the current level number before the round ends, they drop down to the level equal to the number of multiplier cards flipped. For example, flipping 3 cards before losing will cause the player to regress to level 3." -Bulbapedia (https://bulbapedia.bulbagarden.net/wiki/Voltorb_Flip)
I will still probably play even if you don't pull but if you pull and it works correctly I would enjoy it more alongside others who have apparently had this as an issue since 2021.
Best,