Users browsing this thread: 1 Guest(s)
Debilitator Idea
Looking at the code for Debilitator
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.
Code:
C2/3A8D: 7B TDC
C2/3A8E: B9 E0 3B LDA $3BE0,Y (Elements weak against)
C2/3A91: 0D C8 3E ORA $3EC8 (Elements nullified by ForceField)
C2/3A94: 49 FF EOR #$FF
C2/3A96: F0 F2 BEQ $3A8A (Miss if weak to all)
C2/3A98: 20 2A 52 JSR $522A (Randomly pick an element not weak to that hasn't
been nullified by ForceField)
C2/3A9B: 48 PHA
C2/3A9C: 20 F0 51 JSR $51F0
C2/3A9F: 8A TXA
C2/3AA0: 18 CLC
C2/3AA1: 69 0B ADC #$0B
C2/3AA3: 8D 01 34 STA $3401 (Set to display that element as text)
C2/3AA6: A3 01 LDA $01,S
C2/3AA8: 19 E0 3B ORA $3BE0,Y
C2/3AAB: 99 E0 3B STA $3BE0,Y (Make weak vs. that element)
C2/3AAE: 68 PLA
C2/3AAF: 49 FF EOR #$FF
C2/3AB1: 48 PHA
C2/3AB2: 39 E1 3B AND $3BE1,Y
C2/3AB5: 99 E1 3B STA $3BE1,Y (Make not resist that element)
C2/3AB8: A3 01 LDA $01,S
C2/3ABA: EB XBA
C2/3ABB: 68 PLA
C2/3ABC: C2 20 REP #$20 (Set 16-bit accumulator)
C2/3ABE: 39 CC 3B AND $3BCC,Y
C2/3AC1: 99 CC 3B STA $3BCC,Y (Make not absorb or nullify that element)
C2/3AC4: 60 RTS
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.
06-15-2019, 08:12 PM
(This post was last modified: 06-15-2019, 08:19 PM by C-Dude.
Edit Reason: Forum code blew up my post.
)
(06-15-2019, 06:42 PM)DrakeyC Wrote: Looking at the code for Debilitator
Code:C2/3A8D: 7B TDC
C2/3A8E: B9 E0 3B LDA $3BE0,Y (Elements weak against)
C2/3A91: 0D C8 3E ORA $3EC8 (Elements nullified by ForceField)
C2/3A94: 49 FF EOR #$FF
C2/3A96: F0 F2 BEQ $3A8A (Miss if weak to all)
C2/3A98: 20 2A 52 JSR $522A (Randomly pick an element not weak to that hasn't
been nullified by ForceField)
C2/3A9B: 48 PHA
C2/3A9C: 20 F0 51 JSR $51F0
C2/3A9F: 8A TXA
C2/3AA0: 18 CLC
C2/3AA1: 69 0B ADC #$0B
C2/3AA3: 8D 01 34 STA $3401 (Set to display that element as text)
C2/3AA6: A3 01 LDA $01,S
C2/3AA8: 19 E0 3B ORA $3BE0,Y
C2/3AAB: 99 E0 3B STA $3BE0,Y (Make weak vs. that element)
C2/3AAE: 68 PLA
C2/3AAF: 49 FF EOR #$FF
C2/3AB1: 48 PHA
C2/3AB2: 39 E1 3B AND $3BE1,Y
C2/3AB5: 99 E1 3B STA $3BE1,Y (Make not resist that element)
C2/3AB8: A3 01 LDA $01,S
C2/3ABA: EB XBA
C2/3ABB: 68 PLA
C2/3ABC: C2 20 REP #$20 (Set 16-bit accumulator)
C2/3ABE: 39 CC 3B AND $3BCC,Y
C2/3AC1: 99 CC 3B STA $3BCC,Y (Make not absorb or nullify that element)
C2/3AC4: 60 RTS
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.
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
been nullified by ForceField)
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)
C2/3A9A: EA NOP (May be unstable here, might be safer to move up the rest of the effect's hex)
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.
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.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)