;----------------------------------------------------------- ;---------------Metroids Stay Dead-------------------------- ;----------------Speed 1 Version---------------------------- ;-----------------OmegaDragnet9----------------------------- ;----------------------------------------------------------- ;-10-07-2024- ;If Event matching metroid's Speed 1 (Parameter 1 in SMART) ;is set, the metroid will not respawn upon entering a room. ;Because clearing any gray door will set Event 00 ;leaving the Speed 1 to default setting will ;allow for a completely vanilla-behaving metroid ;that will respawn upon reentering the room. ;As with the Room Index version, ;the intention is to spare you from having multiple states ;when all you want is just a hall clear of metroids. ;Thanks to P.JBoy for the Banklogs ;Thanks to MetroidNerd#9001 for Room Index Events. ;This works best with JAM's, dewhi100's, or my Event PLMs. ;This ASM does NOT set events. lorom ;--------------Defines----------------------- !VanillaInitial = $EA4F !A3Freespace = $A3FA00 ;$A3F330 ;in SMART the Initial AI must be changed to THIS. !A7Freespace = $A7FF82 org !A3Freespace LDX $0E54 ;Enemy Index LDA $0FB4,x ;Speed 1 Value JSL $808233 ;Check against Event A with Enemy Speed 1 Value BCS SECONDCHECK ;Event set, mark enemies as dead JMP !VanillaInitial ;Otherwise load them as usual. SECONDCHECK: LDX $0E54 ;This check ensures unaltered enemies don't self-delete LDA $0FB4,x CMP #$0000 BNE END ;Speed 1 is not zero, proceed to END JMP !VanillaInitial ;Load enemies as usual. END: JSL !A7Freespace : RTL org !A7Freespace JSR $A943 : RTL ;Sets enemy properties as dead