Debilitator Idea - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html) +--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html) +--- Thread: Debilitator Idea (/thread-3841.html) |
Debilitator Idea - DrakeyC - 06-15-2019 Looking at the code for Debilitator Code: C2/3A8D: 7B TDC Since this effect can be assigned to spells, I had the thought - is there a way to make it non-random which element it makes the enemy weak to? Because if you can set it to give a specific weakness, then we can have spells that do that, like in FF11 with its six-elemental cycle. RE: Debilitator Idea - C-Dude - 06-15-2019 (06-15-2019, 06:42 PM)DrakeyC Wrote: Looking at the code for Debilitator The first six lines are present explicitly to decide which bits should be eligible for random selection. That is, if a target is registered as being weak to fire and bolt (I assume this is 00000101, assuming FF3USME's sorting is based on the element's bit order from lowest to highest) and already has ice nullified (00000010), then 00000111 is subjected to an exclusive or, outputting 11111000 into the subroutine that randomly selects bits. Hence, Debilitator picks between the remaining five elements (Water, Earth, Poison, Pearl, and Wind) to decide which element to set as a weakness. Thus, to make it set a specific weakness... Code: C2/3A98: 20 2A 52 JSR $522A (Randomly pick an element not weak to that hasn't To make it set a weakness to Fire Code: C2/3A98: 49 FE EOR $FE (Set A to the least significant bit, if not already weak or immune) This should be the equivalent of an Oil spell, as seen in later FF installments. However... then the Debilitator effect will ONLY set weakness for that specific element. To get another spell to set weakness for a different element, you'll need to re-purpose another spell attribute (or seven). I may have misunderstood you, though. If you're trying to get the effect to cycle, though, I'm not sure how you'd go about that. RE: Debilitator Idea - DrakeyC - 06-16-2019 No, I understood that the effect would have to be assigned to a different spell attribute. But knowing how to do it is at least something. Thanks, I'll give it a try in the morning. |