Users browsing this thread: 2 Guest(s)
Condensing Spell List in Battle
10-04-2017, 07:28 PM
(This post was last modified: 10-04-2017, 07:55 PM by GrayShadows.)
Oh, hah, that is definitely easier. I'll implement that change for sure.
---
I did read that post, and then completely forgot about it while working on this other crashing issue. Oops? XD We're definitely working towards #2, for sure, and I'd love to move more of this back into the original space/less of it using free space.
As for #1: so I coded in the CPY #$00D8 thinking that I needed to jump over the last Spell slot or I risked copying back Lores, not thinking about the fact that the start of .findNextLore actually solves that by exiting if my 'copy from' index hits the first Lore slot. So I think you're right, that entire check isn't actually necessary and it should be save to remove it.
By that same virtue, I think it would even be safe to skip CPY #$0138 / BNE .checkLoreLoop and just BRA .checkLoreLoop instead; again, we're spending a few extra cycles before we exit (at Y = #$013C in .findNextLore), but it's another three bytes of space saved that can be used for other patches. Unless I'm missing something there?
---
OH AND. There maaaaay be an issue with the current code (similar to the Interceptor code) with on-low-HP relics, the Tapir wake-from-sleep, and Condemned's Doom. At this point I am reasonably certain that they bypass the section of code that was causing issues, but I'm reading through the code now to track where things happen.
ETA: Okay, no, it looks like all of the other counter-attacks (including Retort), the Near Fatal relics, etc., all come into C2/4F08 with different commands (if they enter it at all?), and so bypass the issue I was having with Interceptor, which enters C2/4F08 with the Magic command and therefore tried to check the character's spell list for the counterattack ID. Desperation Attacks MAY try to go through C2/4F08 with the Magic command, so I'm going to adjust the Interceptor check accordingly (it's an easy fix that doesn't cost anything), but at this point I don't see a need to check for any other non-Magic/Lore spell IDs/circumstances.
---
I did read that post, and then completely forgot about it while working on this other crashing issue. Oops? XD We're definitely working towards #2, for sure, and I'd love to move more of this back into the original space/less of it using free space.
As for #1: so I coded in the CPY #$00D8 thinking that I needed to jump over the last Spell slot or I risked copying back Lores, not thinking about the fact that the start of .findNextLore actually solves that by exiting if my 'copy from' index hits the first Lore slot. So I think you're right, that entire check isn't actually necessary and it should be save to remove it.
By that same virtue, I think it would even be safe to skip CPY #$0138 / BNE .checkLoreLoop and just BRA .checkLoreLoop instead; again, we're spending a few extra cycles before we exit (at Y = #$013C in .findNextLore), but it's another three bytes of space saved that can be used for other patches. Unless I'm missing something there?
---
OH AND. There maaaaay be an issue with the current code (similar to the Interceptor code) with on-low-HP relics, the Tapir wake-from-sleep, and Condemned's Doom. At this point I am reasonably certain that they bypass the section of code that was causing issues, but I'm reading through the code now to track where things happen.
ETA: Okay, no, it looks like all of the other counter-attacks (including Retort), the Near Fatal relics, etc., all come into C2/4F08 with different commands (if they enter it at all?), and so bypass the issue I was having with Interceptor, which enters C2/4F08 with the Magic command and therefore tried to check the character's spell list for the counterattack ID. Desperation Attacks MAY try to go through C2/4F08 with the Magic command, so I'm going to adjust the Interceptor check accordingly (it's an easy fix that doesn't cost anything), but at this point I don't see a need to check for any other non-Magic/Lore spell IDs/circumstances.
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)