Users browsing this thread: 1 Guest(s)
[Patch] Relics Damage
10-04-2022, 03:26 PM
(This post was last modified: 10-04-2022, 07:13 PM by PowerPanda.)
Necropost!
First off, I love this hack. The way that you have coded the damage bonuses makes so much more sense than the original, and is the way it should have been coded.
Now, the unfortunate side. This patch can cause damage overflow. If the Damage that was stored in $11B0 after the Offering/Gauntlet/Genji Glove calculation is higher than #$AAAA (dec 43,690), then this patch can cause a 16-bit overflow and result in fractional damage being dealt. I combined this with Drakkhen's damage overflow patch, which drops total damage to #$FFFF if it overflows the 16-bit field. This is presumably so that people can remove the 9999 cap if they want to. There are 2 ways to fix this. Since I am retaining the 9999 cap, I made a change to Drakkhen's code that it drops total damage to #$270F (9999) before it passes off the damage to your code.
However, if you wanted to fix this in this patch itself, then you'd simply need to add a check that says, "If $11B0 is already higher than #270F, skip over adding the bonus."
First off, I love this hack. The way that you have coded the damage bonuses makes so much more sense than the original, and is the way it should have been coded.
Now, the unfortunate side. This patch can cause damage overflow. If the Damage that was stored in $11B0 after the Offering/Gauntlet/Genji Glove calculation is higher than #$AAAA (dec 43,690), then this patch can cause a 16-bit overflow and result in fractional damage being dealt. I combined this with Drakkhen's damage overflow patch, which drops total damage to #$FFFF if it overflows the 16-bit field. This is presumably so that people can remove the 9999 cap if they want to. There are 2 ways to fix this. Since I am retaining the 9999 cap, I made a change to Drakkhen's code that it drops total damage to #$270F (9999) before it passes off the damage to your code.
However, if you wanted to fix this in this patch itself, then you'd simply need to add a check that says, "If $11B0 is already higher than #270F, skip over adding the bonus."
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)