spike floor damage

Page 1 of 2 1, 2  Next

Go down

spike floor damage Empty spike floor damage

Post by wizzrobemaster Tue 26 Dec 2017 - 9:41

Where is the hex address for spiked floor damage?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Tue 26 Dec 2017 - 15:21

wizzrobemaster wrote:Where is the hex address for spiked floor damage?  
I suggest you do something on your own, rather than to drop a one-line question for each and every small edit you want to make.
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Erockbrox Tue 26 Dec 2017 - 15:58

the hex address is 0x00524R2D2
Erockbrox
Erockbrox

spike floor damage Image211

Since : 2013-02-05

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Conn Tue 26 Dec 2017 - 16:13

It's in the Rom Smile

Open Mon's sram log, look where your health is stored, make a trace in Geiger while walking into spikes and trace back where health (7ef36d) is written to and trace back to rom data.


$36D. Actual Health. Same as above, but this reflects
your current health status rather than potential.


Last edited by Conn on Tue 26 Dec 2017 - 17:25; edited 1 time in total
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by SunGodPortal Tue 26 Dec 2017 - 17:15

Puzzledude wrote:
wizzrobemaster wrote:Where is the hex address for spiked floor damage?  
I suggest you do something on your own, rather than to drop a one-line question for each and every small edit you want to make.

I second this notion. It's like you're not even trying most of the time.
SunGodPortal
SunGodPortal

spike floor damage Image213

Since : 2015-01-26

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster Tue 26 Dec 2017 - 18:51

The compendium could use an update. Anyway, is Geiger how you usually find hex codes?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Tue 26 Dec 2017 - 19:12

Conn wrote:It's in the Rom Smile

Open Mon's sram log, look where your health is stored, make a trace in Geiger while walking into spikes and trace back where health (7ef36d) is written to and trace back to rom data.


                   $36D. Actual Health. Same as above, but this reflects
                         your current health status rather than potential.

This is what I got, however still can't see where it subtracts one heart= 08 in hex.

Code:
$07/80F7 8F 6D F3 7E STA $7EF36D[$7E:F36D]   A:FF08 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdizc HC:0844 VC:260 FC:27 I:00
$07/80FB A5 5D       LDA $5D    [$00:005D]   A:FF08 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdizc HC:0900 VC:260 FC:27 I:00
$07/80FD F0 03       BEQ $03    [$8102]      A:FF00 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdiZc HC:0940 VC:260 FC:27 I:00
$07/8102 A5 5D       LDA $5D    [$00:005D]   A:FF00 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdiZc HC:0978 VC:260 FC:27 I:00
$07/8104 0A          ASL A                   A:FF00 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdiZc HC:1018 VC:260 FC:27 I:00
$07/8105 AA          TAX                     A:FF00 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdiZc HC:1048 VC:260 FC:27 I:00
$07/8106 7C 41 80    JMP ($8041,x)[$07:8109] A:FF00 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdiZc HC:1078 VC:260 FC:27 I:00
$07/8109 20 14 F5    JSR $F514  [$07:F514]   A:FF00 X:0000 Y:0007 D:0000 DB:07 S:01F4 P:envMXdiZc HC:1134 VC:260 FC:27 I:00
$07/F514 A5 1B       LDA $1B    [$00:001B]   A:FF00 X:0000 Y:0007 D:0000 DB:07 S:01F2 P:envMXdiZc HC:1196 VC:260 FC:27 I:00
$07/F516 D0 04       BNE $04    [$F51C]      A:FF01 X:0000 Y:0007 D:0000 DB:07 S:01F2 P:envMXdizc HC:1236 VC:260 FC:27 I:00
$07/F51C 60          RTS                     A:FF01 X:0000 Y:0007 D:0000 DB:07 S:01F2 P:envMXdizc HC:1274 VC:260 FC:27 I:00
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Tue 26 Dec 2017 - 19:18

If you touch the spikes your health gets reduced from 18 to 10, then to 08.

This value is stored to $07/80F7 = 0380F7.
New value is here: A:FF10 or A:FF08. When it is 00, Link is dead.

But then LDA $5D, BEQ $03 ?
No idea where it subtracts 08.


Entire code in hex from 0380F7 on:
8F 6D F3 7E
A5 5D
F0 03
20 8F AE
A5 5D
0A AA 7C 41 80 20 14 F5


Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Conn Tue 26 Dec 2017 - 21:13

You simply need to trace backwards:

Code:

$07/80C6 AF 6D F3 7E LDA $7EF36D[$7E:F36D]   A:FFA6 X:0000 Y:0007
$07/80CA 38          SEC                     A:FF98 X:0000 Y:0007
$07/80CB E5 00       SBC $00    [$00:0000]   A:FF98 X:0000 Y:0007
$07/80CD C9 00       CMP #$00                A:FF90 X:0000 Y:0007
$07/80CF F0 04       BEQ $04    [$80D5]      A:FF90 X:0000 Y:0007
$07/80D1 C9 A8       CMP #$A8                A:FF90 X:0000 Y:0007
$07/80D3 90 22       BCC $22    [$80F7]      A:FF90 X:0000 Y:0007
$07/80F7 8F 6D F3 7E STA $7EF36D[$7E:F36D]  
As you can see it loads your current health with
LDA $7EF36D
then it substracts
SBC $00
And THEN stores it to $7ef36d
means the value at $00 (which holds the 08), look in A: - it has 98-08=90
so look further up where 08 get stored to $00

Code:
$07/8096 AD 73 03    LDA $0373  [$07:0373]   A:1700 X:0000 Y:0007
$07/8099 85 00       STA $00   [$00:0000]   A:1708
So value $0373 has 08 (you see it in A:xx08, that is stored to $00 which eventually is substracted from $7EF36D
Now let's look further up for sta $0373:

Code:
$07/D242 B9 6C D0    LDA $D06C,y[$07:D06E]   A:0002 X:00FF Y:0002 D:0000 DB:07
$07/D245 8D 73 03    STA $0373  [$07:0373]   A:0008
and voila, it is loaded from 07D06C+y=07D06c+02=07d06e:
damage through floor spikes can be found at 07:D06E,
which is pc: 03/D06E. Here you should find the 08. When giving it a 00, floor spikes will have zero damage.

It might be confusing if you make it the first time, but it is really easy.

note:You need to be careful if it is sbc $00 or sbc #$00.
Without #, the content of the adress is referred, ram 7e0000 in this case which has the value #$08. If it is with #, the value is adressed, like sbc #$08 -then directly 08 is substracted...
But I think it will make you also invulnerable to other enemies with boots, since this is a main health substracting code.


Last edited by Conn on Wed 27 Dec 2017 - 14:40; edited 1 time in total
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster Tue 26 Dec 2017 - 23:50

There were 3 values of 08, but it turns out it is 03/D06D. I set the value to 04.

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 6:33

Conn wrote:You simply need to trace backwards:

Code:

$07/80C6 AF 6D F3 7E LDA $7EF36D[$7E:F36D]   A:FFA6 X:0000 Y:0007
$07/80CA 38          SEC                     A:FF98 X:0000 Y:0007
$07/80CB E5 00       SBC $00    [$00:0000]   A:FF98 X:0000 Y:0007
$07/80CD C9 00       CMP #$00                A:FF90 X:0000 Y:0007
$07/80CF F0 04       BEQ $04    [$80D5]      A:FF90 X:0000 Y:0007
$07/80D1 C9 A8       CMP #$A8                A:FF90 X:0000 Y:0007
$07/80D3 90 22       BCC $22    [$80F7]      A:FF90 X:0000 Y:0007
$07/80F7 8F 6D F3 7E STA $7EF36D[$7E:F36D]  
As you can see it loads your current health with
LDA $7EF36D
then it substracts
SBC $00
And THEN stores it to $7ef36d
means the value at $00 (which holds the 08), look in A: - it has 98-08=90
so look further up where 08 get stored to $00

Code:
$07/8096 AD 73 03    LDA $0373  [$07:0373]   A:1700 X:0000 Y:0007
$07/8099 85 00       STA $00   [$00:0000]   A:1708
So value $0373 has 08 (you see it in A:xx08, that is stored to $00 which eventually is substracted from $7EF36D
Now let's look further up for sta $0373:

Code:
$07/D242 B9 6C D0    LDA $D06C,y[$07:D06E]   A:0002 X:00FF Y:0002 D:0000 DB:07
$07/D245 8D 73 03    STA $0373  [$07:0373]   A:0008
and voila, it is loaded from 07D06C+y=07D06c+02=07d06e:
damage through floor spikes can be found at 07:D06E,
which is pc: 03/D06E. Here you should find the 08. When giving it a 00, floor spikes will have zero damage.

It might be confusing if you make it the first time, but it is really easy.

note:You need to be careful if it is sbc $00 or sbc #$00.
Without #, the content of the adress is referred, ram 7e0000 in this case which has the value #$08. If it is with #, the value is adressed, like sbc #$08 -then directly 08 is substracted
Great. Thank you for this. Smile
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 7:00

Conn wrote:
which is pc: 03/D06E
Wizz wrote:
There were 3 values of 08, but it turns out it is 03/D06D
The irony is that it is actually 03D06C for some reason.
At least this address works for me. All 3 addresses are 08 though.
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Conn Wed 27 Dec 2017 - 7:52

I think this depends on where or from which direction you walk into the spike floors, I was in turtle rock and walked in from right to left.
To be on the safe side you definitiely should alter all 3 bytes.
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 8:03

Conn wrote:I think this depends on where or from which direction you walk into the spike floors, I was in turtle rock and walked in from right to left.
To be on the safe side you definitiely should alter all 3 bytes.
Oh yea, I never though about that.
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster Wed 27 Dec 2017 - 9:34

I was testing all directions and so far he is taking half a heart.


wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 9:49

Conn wrote:You simply need to trace backwards:

Code:

$07/80C6 AF 6D F3 7E LDA $7EF36D[$7E:F36D]   A:FFA6 X:0000 Y:0007
$07/80CA 38          SEC                     A:FF98 X:0000 Y:0007
$07/80CB E5 00       SBC $00    [$00:0000]   A:FF98 X:0000 Y:0007
$07/80CD C9 00       CMP #$00                A:FF90 X:0000 Y:0007
$07/80CF F0 04       BEQ $04    [$80D5]      A:FF90 X:0000 Y:0007
$07/80D1 C9 A8       CMP #$A8                A:FF90 X:0000 Y:0007
$07/80D3 90 22       BCC $22    [$80F7]      A:FF90 X:0000 Y:0007
$07/80F7 8F 6D F3 7E STA $7EF36D[$7E:F36D]  
I made something else as well:

at
0380C6,
OLD CODE
AF 6D F3 7E 38 E5 00
----------------------------------

at
0380C6,
instant death on spikes
AF 6D F3 7E 38 A9 00
----------------------------------


and also the IRON shoes!
at
0380C6, jump to 120000
22 00 80 24 EA EA EA

at
120000,
AF 55 F3 7E
C9 01
F0 08
AF 6D F3 7E 38 A9 00 6B
AF 6D F3 7E 38 E5 00 6B

means:
if shooes are = 01 = so if have shoes then
branch 08 bytes to code with E5= subtract 01 heart on spikes,
otherwise instant death on spikes (if no shoes)

if also:
03D06C,
subtract health on spikes (separate)
04 04 04

Pegasus Shoes are now also Iron Shoes (if you have them, you can walk on spikes with half a heart damage; but if you don't have these shoes, then instant death on spikes).
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster Wed 27 Dec 2017 - 10:04

Conn, how did you manage to code the lucky shield to bypass spike blocks?

Anyway, PD, what I was thinking is that could the iron shoes give total protection if you change the values to 00?

also when i see the value is at 07, do I subtract the digit's value by 4?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 10:07

Anyway, PD, what I was thinking is that could the iron shoes give total protection if you change the values to 00?
This was my goal, but unfortunately this doesn't work. When you change those 3 bytes to 00, then you are invincible on spikes, even if no iron shoes. But you can change the bytes to 01, then you are alsmost invincible, since you can take 4 hits on spikes for just half a heart reduction.

Conn, how did you manage to code the lucky shield to bypass spike blocks?
As far as I remember, this is completely different method, since here you manipulate the tile-properties on condition. So the tile property then goes to type-0, instead of the spike type.

also when i see the value is at 07, do I subtract the digit's value by 4?
No idea, what you mean here. Heart values should be 08, 10, 18, 20. So they rise by 08 (one heart). Or if you want by 04 (half a heart). So then 04, 08, 0C, 10 etc. There is no 07.



Last edited by Puzzledude on Wed 27 Dec 2017 - 10:17; edited 1 time in total
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster Wed 27 Dec 2017 - 10:15

what about changing instant death to 2 hearts taken? Does the same problem occur?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 10:22

what about changing instant death to 2 hearts taken?
You can not change instant death to 2 hearts taken. Instant death is instant death, it loads health on 00, it doesn't subtract, for debug purposes.

You also can not load multiple subtractions on condition, which is probably what you wanted. This is because of the complex procedure the game is making for this reduce.

If you want 2 hearts reduced, change those 3 bytes from 08 08 08 to 10 10 10 (so +08 for one heart). However this will not be on condition. But note: this will become bugged!

Does the same problem occur?
No, it will just become bugged! Imagine you have 1 heart and step on spikes, which will subtract 2 hearts. The game has no -1 heart value, so it will bug-out your health. You can only subtract half a heart or one heart. For instance if you have 3 hearts and reduce 5 hearts on spikes (thus 08 08 08 is now 28 28 28), the game might bring your health to +18 hearts, since it doesn't know the value -2. Same goes if you want to have beyond 20 heart containers.
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 10:32

how did you manage to code the lucky shield to bypass spike blocks?
I decoded this a while back. Its a complex tile-properties procedure. I made it for Armor-3= anti spike-block Armor-3,
in a combo with the Mirror for anti spike-floor.

Code:
Anti spike-block armor3
***********************


-here we need Immediate and Permanent custom codes

-if only immediate, it will load anti-spike, but reset back to spike after you save and quit

-if only permanent, it will load spike, but will load anti-spike after you save and quit

-if both, it will load anti-spike because of the immediate, but it will also load anti-spike after save and quit because of the permanent

---------------------------------------


1.) IMMEDIATE
here we need to write to RAM directly
E6 FF 7E
F6 FF 7E

-these 2 values need a 00 immediately after
 you get the armor-3 from chest
-to actually work on the spike, you need to at least go to another indoor room in any way (so no spikes in the room where you get the armor-3)

but this will reset to 68 (44 in hex) after you save and quit, since this value does not go to SRAM



hook at
pal elementov iz skrinje
(always active when opening any chest,
also the one with armor-3)


446A4,
BF 9C 84 09 -->
22 00 80 2E
jump to 170000,


170000, (we are in 8 bit cmp)
AF 5B F3 7E
C9 02
F0 05
BF 9C 84 09
6B
A9 00
8F E6 FF 7E
A9 00
8F F6 FF 7E
BF 9C 84 09
6B

---------------------------------------


2.) PERMANENT


pointer at
71805,
BF 99 97 0E

points to
71799, (block is 40 automated)

code is
27 27 00 27 60 60 01 01 01 01 02 02 0D 00 00 4B
67 67 67 67 66 66 66 66 00 00 20 20 20 20 20 20
27 63 27 55 55 01 44 00 01 20 02 02 1C 3A 3B 00
27 63 27 53 53 01 44 01 0D 00 00 00 09 09 09 09

44 is spike property of 2 tiles which will draw a spike


----changes:
71805,
BF 99 97 0E -->
22 00 82 2E
jumps to 170200

170200, (we are in 16bit)
AF 5B F3 7E
29 FF 00
C9 02 00
F0 05
BF 99 97 0E
6B
BF 00 84 2E
6B

170400,
27 27 00 27 60 60 01 01 01 01 02 02 0D 00 00 4B
67 67 67 67 66 66 66 66 00 00 20 20 20 20 20 20
27 63 27 55 55 01 00 00 01 20 02 02 1C 3A 3B 00
27 63 27 53 53 01 00 01 0D 00 00 00 09 09 09 09


And then Armor-3 and Mirror. The Armor-3 for anti spike-block and also Mirror for anti spike-floor.
So if Armor-3= then can walk through spike blocks, and if
Armor-3 and Mirror) then can walk through spike block and across spike floor:
Code:
Anti spike-floor Mirror
***********************


Basic info
----------
-spike floor is type 13= 0D
-is 4the from right to left, most upper row.
-Ram for type 13 is 7EFFCC (and 0D= 13 for spike load, and 00 for regular floor)
-Ram for Mirror is 7EF353 (and 02 for having mirror, and 00 for Not having mirror)

We will expand and merge with the previous code for Armor-3, since this can not be done otherwise.



1.) IMMEDIATE

446A4,
BF 9C 84 09 -->
22 00 80 2E
jump to 170000,
the jump remains the same as before


Old code: Armor-3 only
170000, (we are in 8 bit cmp)
AF 5B F3 7E
C9 02
F0 05
BF 9C 84 09
6B
A9 00
8F E6 FF 7E
A9 00
8F F6 FF 7E
BF 9C 84 09
6B


New code: Armor-3 and Mirror
170000, (we are in 8 bit cmp)
AF 5B F3 7E
C9 02
F0 05
BF 9C 84 09
6B
AF 53 F3 7E
C9 02
F0 11
A9 00
8F E6 FF 7E
A9 00
8F F6 FF 7E
BF 9C 84 09
6B
A9 00
8F CC FF 7E
A9 00
8F E6 FF 7E
A9 00
8F F6 FF 7E
BF 9C 84 09
6B

result is:
-armor-3= walk through spike-blocks
-armor-3 and mirror= walk through spike-blocks and across spike-floor
-mirror only= do nothing,
-if no armor-3= do nothing, since you need armor-3 as base

in game it is thus logical to give armor-3 cronologically before mirror


---------------------------------------



2.) PERMANENT


71805,
BF 99 97 0E -->
22 00 82 2E
jumps to 170200
the jump remains the same as before



170200, (we are in 16bit) Armor-3 and Mirror
AF 5B F3 7E
29 FF 00
C9 02 00
F0 05
BF 99 97 0E
6B
AF 53 F3 7E
29 FF 00
C9 02 00
F0 05
BF 00 84 2E
6B
BF 00 86 2E
6B


170400,
27 27 00 27 60 60 01 01 01 01 02 02 0D 00 00 4B
67 67 67 67 66 66 66 66 00 00 20 20 20 20 20 20
27 63 27 55 55 01 00 00 01 20 02 02 1C 3A 3B 00
27 63 27 53 53 01 00 01 0D 00 00 00 09 09 09 09


170600,
27 27 00 27 60 60 01 01 01 01 02 02 00 00 00 4B
67 67 67 67 66 66 66 66 00 00 20 20 20 20 20 20
27 63 27 55 55 01 00 00 01 20 02 02 1C 3A 3B 00
27 63 27 53 53 01 00 01 0D 00 00 00 09 09 09 09
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster Wed 27 Dec 2017 - 10:35

I like the idea of having the armor 3 giving immunity to spike block immunity. the cactus share the same properties as the spikes right?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 10:41

wizzrobemaster wrote:I like the idea of having the armor 3 giving immunity to spike block immunity.  the cactus share the same properties as the spikes right?  
Yes, however this code is based on indoor GFX-set tile properties, so it will not work on overworlds, which have a different GFX-set and a different code. Also, the code-hook is at chest-opening, which is indoors. So it will not work on a cactus, which will still hurt you.

Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Conn Wed 27 Dec 2017 - 14:26

The lucky by-pass was major asm, no easy reproducable by beginners.


No, it will just become bugged! Imagine you have 1 heart and step on spikes, which will subtract 2 hearts. The game has no -1 heart value, so it will bug-out your health. You can only subtract half a heart or one heart. For instance if you have 3 hearts and reduce 5 hearts on spikes (thus 08 08 08 is now 28 28 28), the game might bring your health to +18 hearts, since it doesn't know the value -2. Same goes if you want to have beyond 20 heart containers.
I think you can go below 00, imagine you have a half heart (04) and 08 is substracted, then you die
Code:
$07/80D1 C9 A8       CMP #$A8                A:FF90 X:0000 Y:0007
$07/80D3 90 22       BCC $22    [$80F7]      A:FF90 X:0000 Y:0007
$07/80F7 8F 6D F3 7E STA $7EF36D[$7E:F36D]
The maximum hearts is A0, which is compared here by A8. BCC means branch on carry clear (<=). So if the value after substract is inbetween A8 and FF (00-08=F8 for example) you should die due to the bcc comparison. Not sure, no time to test.

This was my goal, but unfortunately this doesn't work. When you change those 3 bytes to 00, then you are invincible on spikes, even if no iron shoes. But you can change the bytes to 01, then you are alsmost invincible, since you can take 4 hits on spikes for just half a heart reduction.

Your code surely will bug, it is a main health substracting routine, when normal enemies hit you with boots on, you should be invulnerable as well.

Code:

To make it specific you must hook here:
$07/D242 B9 6C D0    LDA $D06C,y[$07:D06E]  
$07/D245 8D 73 03    STA $0373  [$07:0373]  

so:
03D242:
22 00 80 24 EA EA

at
120000, you need to repeat the deleted code
B9 6C D0    LDA $D06C,y
8D 73 03    STA $0373  
C0 00 cpy #$00  ; and compare to the y-values for floor damage
F0 09 BEQ no damage
C0 01 cpy #$01
F0 05 BEQ no damage
C0 02 cpy #$02
F0  01 BEQ no damage
6B RTL
AF 55 F3 7E LDA $7ef355
C9 01 cmp #$01 Now compare to the boots
D0 03 BNE #$03
9c 73 03 STZ $0373 ; if boots, store no damage to 0373
6B RTL
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Puzzledude Wed 27 Dec 2017 - 15:35

Your code surely will bug, it is a main health substracting routine, when normal enemies hit you with boots on, you should be invulnerable as well.
You were correct. But it is not invulnarebility with Shoes, it is the opposite, it is one hit by enemies defeat you LoL.

So it bugs like you said. Basically with Shoes everything is normal, since indeed it is the old code if shoes, but with no shoes, not just spikes but also all enemies (and all health reduction) will defeat you completely with one hit.
Puzzledude
Puzzledude

spike floor damage Image213

Since : 2012-06-20

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum