Users browsing this thread: 1 Guest(s)
Final Requests for Help
05-14-2021, 12:41 PM
(This post was last modified: 05-14-2021, 12:46 PM by PowerPanda.)
Hey Subtraction, I have a question on this section of the code:
Specifically:
JSR $4B5A
AND #$1F ; 1/32 chance of breaking
With it saying #$1F, does that mean that it's actually breaking 1/8th of the time? I was expecting "AND #$05". Reports from players have their tools breaking multiple times before they even hit the Returner's hideout.
Code:
check_break:
PHA
PHP
JSR $2B63 ; Multiply A by 30, size of item data block
REP #$10 ; Set 16-bit X and Y
TAX
LDA $D85012,X ; equipment spell byte. Bit 7: 1 = remove from inventory upon usage, 0 = nope
BPL no_break ; if the flag is not set, this tool never breaks
JSR $4B5A
AND #$1F ; 1/32 chance of breaking
BNE no_break
LDA #$44 ; "Orge Nix broke!" dialog. Works for most tools but gets clobbered by the Air Anchor "Move and you're dust!"
STA $3401
SEP #$10 ; Set 8-bit X and Y
TYX
LDA #$FF
STA $32F4,X ; null item index to add to inventory. This means the item will stay deducted from your inventory.
LDA $3018,X
BRA check_break_end
Specifically:
JSR $4B5A
AND #$1F ; 1/32 chance of breaking
With it saying #$1F, does that mean that it's actually breaking 1/8th of the time? I was expecting "AND #$05". Reports from players have their tools breaking multiple times before they even hit the Returner's hideout.
Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)