Difference between revisions of "Correct CPZ boss attack behavior"
From Sonic Retro
KingofHarts (talk | contribs) (Added ANOTHER fix.) |
m (Text replacement - "\[\[Category:SCHG How-tos.*" to "") |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | ''Guide by [[redhotsonic]]'' | + | ''(Guide by [[User:Redhotsonic|redhotsonic]] using the 2007 Xenowhirl disassembly)'' |
As many of you are aware, during the CPZ boss, when Eggman drops the blue slime on you, ducking will protect you, and the chemical cannot hurt you, making it too easy to defend against Eggman's attacks. To fix this so you will get hurt whilst ducking, follow this. | As many of you are aware, during the CPZ boss, when Eggman drops the blue slime on you, ducking will protect you, and the chemical cannot hurt you, making it too easy to defend against Eggman's attacks. To fix this so you will get hurt whilst ducking, follow this. | ||
==The Fix== | ==The Fix== | ||
− | Go to "loc_2E692:" and you'll see this: | + | Go to "loc_2E692:" (OR "Obj5D_Gunk_Init:") and you'll see this: |
− | <asm> | + | <syntaxhighlight lang="asm"> |
loc_2E692: | loc_2E692: | ||
addq.b #2,routine_secondary(a0) | addq.b #2,routine_secondary(a0) | ||
Line 18: | Line 18: | ||
move.b #6,routine_secondary(a0) | move.b #6,routine_secondary(a0) | ||
move.w #9,objoff_2A(a0) | move.w #9,objoff_2A(a0) | ||
− | </ | + | </syntaxhighlight> |
See that command? | See that command? | ||
− | <asm> | + | <syntaxhighlight lang="asm"> |
move.b #$20,y_radius(a0) | move.b #$20,y_radius(a0) | ||
− | </ | + | </syntaxhighlight> |
Change #$20 to #$16. So you have this in the end: | Change #$20 to #$16. So you have this in the end: | ||
− | <asm> | + | <syntaxhighlight lang="asm"> |
loc_2E692: | loc_2E692: | ||
addq.b #2,routine_secondary(a0) | addq.b #2,routine_secondary(a0) | ||
Line 39: | Line 39: | ||
move.b #6,routine_secondary(a0) | move.b #6,routine_secondary(a0) | ||
move.w #9,objoff_2A(a0) | move.w #9,objoff_2A(a0) | ||
− | </ | + | </syntaxhighlight> |
'''DONE!''' | '''DONE!''' | ||
==Explanation== | ==Explanation== | ||
− | The slime's y_radius is | + | The slime's y_radius is $20. This is fine normally. But when Sonic "ducks", Sonic's y_radius is "shortened". So, now, when the gunk is falling and hits the ground, it actually doesn't touch Sonic. |
Because we have "lowered" the gunk's y_radius, its distance from the floor has grown just a little bit. Because of this, the chemical now falls down, just a little bit more, and because of this, it will now hit Sonic when he's "ducking", and it will still hurt Sonic in any other position as well. | Because we have "lowered" the gunk's y_radius, its distance from the floor has grown just a little bit. Because of this, the chemical now falls down, just a little bit more, and because of this, it will now hit Sonic when he's "ducking", and it will still hurt Sonic in any other position as well. | ||
Line 50: | Line 50: | ||
==BONUS== | ==BONUS== | ||
THIS IS JUST FOR LAUGHS, but try it anyway! Back at the label "loc_2E692:". See these two lines? | THIS IS JUST FOR LAUGHS, but try it anyway! Back at the label "loc_2E692:". See these two lines? | ||
− | <asm> | + | <syntaxhighlight lang="asm"> |
btst #2,$2D(a1) | btst #2,$2D(a1) | ||
beq.s loc_2E6CA | beq.s loc_2E6CA | ||
− | </ | + | </syntaxhighlight> |
Comment them out! And see what happens for yourself! (SPOILER ALERT: Or, don't be a fun person, and check the OP to see the picture instead... [http://forums.sonicretro.org/index.php?showtopic=29029&view=findpost&p=691690] I hate you.) | Comment them out! And see what happens for yourself! (SPOILER ALERT: Or, don't be a fun person, and check the OP to see the picture instead... [http://forums.sonicretro.org/index.php?showtopic=29029&view=findpost&p=691690] I hate you.) | ||
+ | |||
+ | FOR MORE FUN, CHECK OUT [[SCHG_How-to:Restore_lost_CPZ_boss_feature|THIS GUIDE!]] | ||
{{S2Howtos}} | {{S2Howtos}} | ||
− | + | |{{PAGENAME}}]] |
Latest revision as of 11:11, 25 August 2018
(Guide by redhotsonic using the 2007 Xenowhirl disassembly)
As many of you are aware, during the CPZ boss, when Eggman drops the blue slime on you, ducking will protect you, and the chemical cannot hurt you, making it too easy to defend against Eggman's attacks. To fix this so you will get hurt whilst ducking, follow this.
The Fix
Go to "loc_2E692:" (OR "Obj5D_Gunk_Init:") and you'll see this:
loc_2E692:
addq.b #2,routine_secondary(a0)
move.b #$20,y_radius(a0)
move.b #$19,anim(a0)
move.w #0,y_vel(a0)
movea.l objoff_34(a0),a1 ; a1=object
movea.l $34(a1),a1
btst #2,$2D(a1)
beq.s loc_2E6CA
bclr #2,$2D(a1)
move.b #6,routine_secondary(a0)
move.w #9,objoff_2A(a0)
See that command?
move.b #$20,y_radius(a0)
Change #$20 to #$16. So you have this in the end:
loc_2E692:
addq.b #2,routine_secondary(a0)
move.b #$16,y_radius(a0)
move.b #$19,anim(a0)
move.w #0,y_vel(a0)
movea.l objoff_34(a0),a1 ; a1=object
movea.l $34(a1),a1
btst #2,$2D(a1)
beq.s loc_2E6CA
bclr #2,$2D(a1)
move.b #6,routine_secondary(a0)
move.w #9,objoff_2A(a0)
DONE!
Explanation
The slime's y_radius is $20. This is fine normally. But when Sonic "ducks", Sonic's y_radius is "shortened". So, now, when the gunk is falling and hits the ground, it actually doesn't touch Sonic.
Because we have "lowered" the gunk's y_radius, its distance from the floor has grown just a little bit. Because of this, the chemical now falls down, just a little bit more, and because of this, it will now hit Sonic when he's "ducking", and it will still hurt Sonic in any other position as well.
BONUS
THIS IS JUST FOR LAUGHS, but try it anyway! Back at the label "loc_2E692:". See these two lines?
btst #2,$2D(a1)
beq.s loc_2E6CA
Comment them out! And see what happens for yourself! (SPOILER ALERT: Or, don't be a fun person, and check the OP to see the picture instead... [1] I hate you.)
FOR MORE FUN, CHECK OUT THIS GUIDE!
|Correct CPZ boss attack behavior]]