Users browsing this thread: 1 Guest(s)
Relic that CAUSES Imp status?
Per Lightning's request in Discord, I've produced the following code that will make Relic Effect 4's bit 7 (the second ? mark) trigger the Imp spell as a reaction on anyone who is not imp'd currently and not immune to Imp.
As PowerPanda stated, because this uses bit 7 it will be incompatible with the Full Roster hack. There is a note in the disassembly that explains what would need to be changed to make it instead use Critical->Wall as the triggering byte.
As PowerPanda stated, because this uses bit 7 it will be incompatible with the Full Roster hack. There is a note in the disassembly that explains what would need to be changed to make it instead use Critical->Wall as the triggering byte.
Code:
===================================
Working version of Imp-form Relic
===================================
C2/0A4A
4C 7B 64 JMP $647B [Go to new code that handles the Imp Relic]
C2/647B
BD A0 3A LDA $3AA0,X
89 10 BIT #$10 [This was the vanilla code, it checks that the character isn't dead or unable to act]
F0 03 BNE SkipNextLine [Continue if its not the case]
4C 90 0A JMP $0A90 [Exit]
BD 60 3E LDA $3E60,X [Status 1 byte]
89 20 BIT #$20 [Check for Imp status on this character. This is the Quasi-status bit for counterattacks]
F0 03 BNE SkipNextLine [Continue if Imp status is present]
4C 51 0A JMP $0A51 [Move on to the near fatal checks (Vanilla code)]
BD 1C 33 LDA $331C,X [Immunity 1 byte]
89 20 BIT #$20 [Check for Imp immunity]
D0 03 BEQ SkipNextLine [If not immune to Imp, continue]
4C 51 0A JMP $0A51 [Move on to the near fatal checks (Vanilla code)]
BD 59 3C LDA $3C59,X [Load Equipment special byte 4]
0A 0A ASL Ax2 [Shift byte 7 into the carry] {If you want it to use Wall on Low HP, this needs to change to 4A 4A 4A LSRx3}
90 13 BCC SkipImp [If it isn't present, move on to the near fatal checks]
48 PHA
A9 23 LDA #$23 [Load the Imp Spell]
85 B8 STA $B8 [Save it in the spell to cast]
A9 26 LDA #$26 [Load the reaction cast command]
20 91 4E JSR $4E91 [Add it to the counter queue]
68 PLA
BD 60 3E LDA $3E60,X [Load the Quasi-status byte 1]
09 20 ORA #$20 [Set the Imp bit]
9D 60 3E STA $3E60,X [Save the Quasi-status byte 1]
4C 51 0A JMP $0A51 [Move on to the near fatal checks (Vanilla code)]
Raw Hex
At 20A4A
4C 7B 64
At 2647B
BD A0 3A 89 10 F0 03 4C 90 0A BD 60 3E 89 20 F0 03 4C 51 0A BD 1C 33 89 20 D0 03 4C 51 0A BD 59 3C 0A 0A 90 13 48 A9 23 85 B8 A9 26 20 91 4E 68 BD 60 3E 09 20 9D 60 3E 4C 51 0A
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)