;IBJ Prevention by personitis ;v1.1 fixes a crash randomly (but frequently) happening from touching enemies. ;After the defined amount of bomb jumps, bombs give out, no longer propelling you upward. ;Every bomb jump, a counter is increased by 1, and is set to 0 upon touching the ground. ;By default, bomb jumps will work from mid-air morphs. It's possible to remove this feature by commenting out two lines. lorom ;You can change the below value. Sets how many bomb jumps you can do before touching the ground agian. #$0003 allows for double bomb jumping. Anything lower only allows for single bomb jumping. !BOMBS = #$0003 ;You can also change the free space in RAM used for the bomb counter. By default it uses the Reserve Missiles address in RAM. !COUNTER = $09D8 org $91F1E2 JSR $FFF0 org $91FFF0 ;Prevent abuse of the bomb jump counter. THERE IS VERY LITTLE FREE SPACE HERE LDA #$0000 STA !COUNTER STZ $0B36 ;00 = Samus is on the ground (?) 01 = Samus is moving up, 02 = Samus is moving down RTS org $A0984B ;Believe this is where bombjumping changes $0B36 to 01 JSR $F7F0 org $A0F7F0 PHA LDA $0B36 ;Comment this line and the one below to disallow bombs to affect you from mid-air morph BEQ + ;Comment this one too! LDA !COUNTER BEQ ++ + LDA !COUNTER CMP !BOMBS BEQ ++ INC A STA !COUNTER PLA STA $0A56 ;Bomb jump direction RTS ++ PLA STZ !COUNTER STZ $0A56 ;Bomb jump direction RTS