Name: | Pit fix |
Author: | HammerBrother |
Added: | |
Version History: | View |
Tool: | Asar |
Requires Free Space: | Yes |
Bug Fix: | Yes |
Featured: | No |
Description: | This patch fixes a bug that allows the player to go below the level and under blocks to cheat the level. It does this by simply moving the “kill boundary” upwards (position varies depending on Mario's powerup and/or crouching flag to make Mario always invisible). Unlike the Floor Generator made by Chdata, Ladida, and Ramp202, those only sets the player's x speed to #$00, it does work, but it's awkward when NOT touching the walls. UPDATE: fix an exploit that if you grab p-balloon while crouching, and try to go under blocks, the player is able to survive going under. This because the ducking and powerup check have “opposite” flags, for example: to have 16x32 hitbox, $73 has to be clear AND $19 has to be set. Mario is always “small” regardless of crouching or not when powerup is standard Mario. |
Tags: | lorom no cheating sa-1 under the level |
Comments: | 9 (jump to comments) |
Download
2.23 KiB | 568 downloads
Comments (9)
This patch is already up to the standards and requires no remoderation.
On that note, let me just point out 3 things about your code:
1.
yeah... what if? If Mario is small and crouching the first check would pass and the second would branch.
Same if you used ORA.
If you put it into words. Branch if $19 or $73 is not zero. Perfect case for ORA.
2.
The offset difference is always #$08, so unless you have someone who want to do crazy shit like have really different boundries for small and big Mario, you can just let asar do the math:
3.
If you concider the fact that the highbyte of those boundries always has to be 0 (because 01 is far below the screen and FF is inside the status bar), you can leave that part out. If, in combination, you just load the values themselfs and not use a table, you can save a couple of bytes from the code. 9 bytes to be precise, which isn't an awful lot, so I accepted it anyway.
9 bytes shorter code:
not fully tested so feel free to correct me.
You could kill another 2 bytes if you ditched ORA $73, since, given that Mario could only go below the level by swimming and flying, crouching shouldn't be of concern.
As well as maybe another 3 bytes (LDA #$00 : XBA) if the high byte of A is always #$00 when entering the code. Could be, didn't dig that deep.